!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=283)}([function(e,t,n){e.exports=n(349)()},function(e,t,n){"use strict";e.exports=n(284)},function(e,t,n){var r; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t{this.removeCancellationToken(n),n.isCancelled||e(t)}}addCancellationDelegate(...e){this._cancellationDelegates.splice(this._cancellationDelegates.length-1,0,...e)}addInterval(e){return this._intervalHandles.push(e),e}addPromise(e,t){const n=this.createCancellationToken(t);return new Promise((t,r)=>e.then(e=>{this.removeCancellationToken(n),n.isCancelled?r({isCancelled:!0}):t(e)}).catch(e=>{this.removeCancellationToken(n),n.isCancelled?r({isCancelled:!0}):r(e)}))}addTimeout(e){return this._timeoutHandles.push(e),e}cancelAll(e){if(e)this._cancellationTokens.forEach(t=>{t.tag===e&&(t.isCancelled=!0)});else{for(;this._animationFrameHandles.length;)window.cancelAnimationFrame(this._animationFrameHandles.splice(0,1)[0]);for(;this._cancellationDelegates.length;)this._cancellationDelegates.splice(0,1)[0]();for(this._cancellationTokens.forEach(e=>{e.isCancelled=!0});this._intervalHandles.length;)window.clearInterval(this._intervalHandles.splice(0,1)[0]);for(;this._timeoutHandles.length;)window.clearTimeout(this._timeoutHandles.splice(0,1)[0])}}removeCancellationDelegate(e){const t=this._cancellationDelegates.findIndex(t=>t===e);t>-1&&this._cancellationDelegates.splice(t,1)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2),i=n(73);t.default=e=>r.createElement("span",{className:a.default("icon_rour3d",e.className,e.display||"inline"),onClick:e.onClick},"number"==typeof e.badge?r.createElement(i.default,{count:e.badge}):null,r.createElement("svg",{className:"icon"},e.title?r.createElement("title",null,e.title):null,r.createElement("use",{xlinkHref:"#icon-"+e.name})))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscordInviteLink=void 0;const r=n(1),a=n(2),i=n(7),o=n(74),s=n(73),l=n(15),c=n(13);function u(e){return"string"==typeof e.href}function p(e){return"number"==typeof e.screen}class h extends r.Component{constructor(){super(...arguments),this._handleClick=e=>{e.preventDefault(),null!=this.props.stopPropagation&&!1!==this.props.stopPropagation&&e.stopPropagation(),"busy"!==this.props.state&&"disabled"!==this.props.state&&(u(this.props)?this.props.onClick(this.props.href):p(this.props)?this.props.onClick({key:this.props.screen,params:this.props.params}):this.props.onClick())}}render(){var e;const t=a.default("link_ke15oa",this.props.className,{disabled:"disabled"===this.props.state,busy:"busy"===this.props.state}),n=null!==(e=this.props.text)&&void 0!==e?e:this.props.children,h=r.createElement(r.Fragment,null,"busy"===this.props.state?r.createElement(o.default,{key:"spinner"}):this.props.iconLeft?r.createElement(i.default,{className:"icon-left",badge:this.props.badge,key:"icon-left",name:this.props.iconLeft}):null,n?r.createElement("span",null,n):null,this.props.iconRight?r.createElement(i.default,{className:"icon-right",badge:this.props.badge,key:"icon-right",name:this.props.iconRight}):null,null!=this.props.badge?r.createElement(s.default,{count:this.props.badge}):null),d=u(this.props)?this.props.href:p(this.props)?l.findRouteByKey(c.default,this.props.screen).createUrl(this.props.params):null;return d?r.createElement("a",{onAnimationEnd:this.props.onAnimationEnd,className:t,href:d,onClick:this._handleClick},h):r.createElement("span",{onAnimationEnd:this.props.onAnimationEnd,className:t,onClick:this._handleClick},h)}}t.default=h,t.DiscordInviteLink=e=>r.createElement(h,{onClick:e.onClick,href:"https://discord.gg/XQZa8pHdVs"},e.children)},function(e,t,n){var r=n(40),a=n(65),i=n(167),o=n(171),s=n(174),l=function(e,t,n){var c,u,p,h,d=e&l.F,f=e&l.G,m=e&l.S,g=e&l.P,y=e&l.B,v=f?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,b=f?a:a[t]||(a[t]={}),w=b.prototype||(b.prototype={});for(c in f&&(n=t),n)p=((u=!d&&v&&void 0!==v[c])?v:n)[c],h=y&&u?s(p,r):g&&"function"==typeof p?s(Function.call,p):p,v&&o(v,c,p,e&l.U),b[c]!=p&&i(b,c,h),g&&w[c]!=p&&(w[c]=p)};r.core=a,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapPromiseErrorToResultIfNotCancelled=t.getPromiseErrorMessage=t.generateRandomString=t.pad=t.formatCountable=t.formatPossessive=t.truncateText=t.formatTimestamp=t.formatProblemDetails=t.formatList=t.formatFetchable=t.formatIsoDateAsUtc=t.formatIsoDateAsDotNet=t.formatCurrency=void 0;const r=n(295),a=n(296);function i(e){var t;return null!==(t=e.detail)&&void 0!==t?t:e.title}function o(e){return e?r.isProblemDetails(e)?i(e):Array.isArray(e)&&"string"==typeof e[0]?e[0]:"message"in e?e.message:"string"==typeof e?e:"An unknown error occurred.":"An unknown error occurred."}t.formatCurrency=function(e){return(e/100).toLocaleString("en-US",{style:"currency",currency:"usd"})},t.formatIsoDateAsDotNet=function(e){return e.replace(/z$/i,"")},t.formatIsoDateAsUtc=function(e){return e.endsWith("Z")?e:e+"Z"},t.formatFetchable=function(e,t,n,r){return e.isLoading?n:e.errors?r:t(e.value)},t.formatList=function(e){return e&&0!==e.length?1===e.length?e[0]:`${e.slice(0,e.length-1).join(", ")} & ${e[e.length-1]}`:""},t.formatProblemDetails=i,t.formatTimestamp=function(e){return!e||e.length<10?e:parseInt(e.substr(5,2))+"/"+parseInt(e.substr(8,2))+"/"+e.substr(2,2)},t.truncateText=function(e,t){return e&&e.length>t?e.substring(0,t-1)+"…":e},t.formatPossessive=function(e){return`${e}'${e.endsWith("s")?"":"s"}`},t.formatCountable=function(e,t,n){return 1===e?t:n||t+"s"},t.pad=function(e,t,n,r){for(;n.lengthe+t.toString(16),"")},t.getPromiseErrorMessage=o,t.mapPromiseErrorToResultIfNotCancelled=function(e,t){var n;(null===(n=e)||void 0===n?void 0:n.isCancelled)||t({type:a.ResultType.Failure,error:o(e)})}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.About=0]="About",e[e.Admin=1]="Admin",e[e.AotdHistory=2]="AotdHistory",e[e.Author=3]="Author",e[e.BestEver=4]="BestEver",e[e.Blog=5]="Blog",e[e.Comments=6]="Comments",e[e.Contenders=7]="Contenders",e[e.EmailConfirmation=8]="EmailConfirmation",e[e.EmailSubscriptions=9]="EmailSubscriptions",e[e.ExtensionRemoval=10]="ExtensionRemoval",e[e.Faq=11]="Faq",e[e.Home=12]="Home",e[e.Leaderboards=13]="Leaderboards",e[e.MyFeed=14]="MyFeed",e[e.MyReads=15]="MyReads",e[e.Notifications=16]="Notifications",e[e.Password=17]="Password",e[e.PrivacyPolicy=18]="PrivacyPolicy",e[e.Profile=19]="Profile",e[e.Read=20]="Read",e[e.Search=21]="Search",e[e.Settings=22]="Settings",e[e.Stats=23]="Stats"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2),i=n(7),o=n(74),s=n(73);class l extends r.PureComponent{constructor(){super(...arguments),this._click=e=>{this.props.href&&this.props.hrefPreventDefault&&e.preventDefault(),this.props.stopPropagation&&e.stopPropagation(),!this.props.onClick||this.props.state&&"normal"!==this.props.state&&"selected"!==this.props.state||this.props.onClick(e)}}render(){let e,t;switch(this.props.state){case"busy":e=r.createElement(o.default,null);break;case"set":e=r.createElement(i.default,{name:"checkmark"})}"number"==typeof this.props.badge&&(t=this.props.badge);const n={children:r.createElement(r.Fragment,null,this.props.iconLeft?r.createElement(i.default,{badge:t,name:this.props.iconLeft}):null,r.createElement("span",{className:"text"},this.props.text,!t||this.props.iconLeft||this.props.iconRight?"beta"===this.props.badge?r.createElement("span",{className:"beta-badge"},"Beta"):null:r.createElement(s.default,{count:t})),this.props.iconRight?r.createElement(i.default,{badge:t,name:this.props.iconRight}):null,e?r.createElement("span",{className:"overlay"},e):null),className:a.default("button_ovrlmi",this.props.className,this.props.style,this.props.size,this.props.display,this.props.align,this.props.intent,this.props.state,{indicator:this.props.showIndicator,overlay:!!e}),onClick:this._click,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave};return this.props.href?r.createElement("a",Object.assign({},Object.assign(Object.assign({},n),{href:this.props.href}))):r.createElement("button",Object.assign({},n))}}t.default=l,l.defaultProps={align:"left",display:"inline",hrefPreventDefault:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createArticleSlug=void 0;const r=n(103),a=n(11),i=n(163),o=n(21),s=[{createUrl:()=>"/",pathRegExp:/^\/$/,screenKey:a.default.Home},{createUrl:()=>"/about",pathRegExp:/^\/about$/,screenKey:a.default.About},{createUrl:e=>`/?reset-password&email=${e.email}&token=${e.token}`,dialogKey:r.default.ResetPassword,pathRegExp:/^\/$/,queryStringKeys:["reset-password","email","token"],screenKey:a.default.Home},{createUrl:e=>`/?${o.authServiceTokenQueryStringKey}=${e[o.authServiceTokenQueryStringKey]}`,dialogKey:r.default.CreateAuthServiceAccount,pathRegExp:/^\/$/,queryStringKeys:[o.authServiceTokenQueryStringKey],screenKey:a.default.Home},{createUrl:e=>`/?${o.authenticateQueryStringKey}=${e[o.authenticateQueryStringKey]}`,dialogKey:r.default.Authenticate,pathRegExp:/^\/$/,queryStringKeys:[o.authenticateQueryStringKey],screenKey:a.default.Home},{createUrl:()=>"/?"+o.extensionInstalledQueryStringKey,dialogKey:r.default.ExtensionInstalled,pathRegExp:/^\/$/,queryStringKeys:[o.extensionInstalledQueryStringKey],screenKey:a.default.Home},{authLevel:i.default.Admin,createUrl:()=>"/admin",pathRegExp:/^\/admin$/,screenKey:a.default.Admin},{createUrl:()=>"/aotd/history",pathRegExp:/^\/aotd\/history$/,screenKey:a.default.AotdHistory},{createUrl:()=>"/top-articles-of-all-time",pathRegExp:/^\/top-articles-of-all-time$/,screenKey:a.default.BestEver},{createUrl:()=>"/blog",noIndex:()=>!0,pathRegExp:/^\/blog$/,screenKey:a.default.Blog},function(){const e=/^\/comments\/([^/]+)\/([^/]+)(?:\/([^/]+))?$/;return{createUrl:e=>{let t=`/comments/${e.sourceSlug}/${e.articleSlug}`;return e.commentId&&(t+="/"+e.commentId),t},getPathParams:t=>{const[,n,r,a]=t.match(e);let i={articleSlug:r,sourceSlug:n};return null!=a&&(i.commentId=a),i},pathRegExp:e,screenKey:a.default.Comments}}(),{createUrl:()=>"/contenders",pathRegExp:/^\/contenders$/,screenKey:a.default.Contenders},{createUrl:e=>"/email/confirm/"+e.result,noIndex:()=>!0,pathRegExp:/^\/email\/confirm\/([^/]+)$/,screenKey:a.default.EmailConfirmation},{createUrl:e=>"/email/subscriptions?token="+e.token,noIndex:()=>!0,pathRegExp:/^\/email\/subscriptions$/,queryStringKeys:["token"],screenKey:a.default.EmailSubscriptions},{createUrl:()=>"/extension/uninstall",noIndex:()=>!0,pathRegExp:/^\/extension\/uninstall$/,screenKey:a.default.ExtensionRemoval},{createUrl:e=>"/extension/uninstall?installationId="+e.installationId,noIndex:()=>!0,pathRegExp:/^\/extension\/uninstall$/,queryStringKeys:["installationId"],screenKey:a.default.ExtensionRemoval},{createUrl:()=>"/faq",pathRegExp:/^\/faq$/,screenKey:a.default.Faq},{createUrl:()=>"/my-feed",pathRegExp:/^\/my-feed$/,screenKey:a.default.MyFeed},function(){const e=/^\/leaderboards\/?(writers|readers)?$/;return{createUrl:e=>!e||"writers"!==e.view&&"readers"!==e.view?"/leaderboards/writers":"/leaderboards/"+e.view,getPathParams:t=>{const[,n]=t.match(e);return{view:"readers"===n?n:"writers"}},pathRegExp:e,screenKey:a.default.Leaderboards}}(),{authLevel:i.default.Regular,createUrl:()=>"/notifications",pathRegExp:/^\/notifications$/,screenKey:a.default.Notifications},function(){const e=/^\/(starred|history)$/;return{createUrl:e=>!e||"starred"!==e.view&&"history"!==e.view?"/starred":"/"+e.view,getPathParams:t=>{const[,n]=t.match(e);return{view:"history"===n?n:"starred"}},pathRegExp:e,screenKey:a.default.MyReads}}(),{createUrl:e=>`/password/${e.action}/${e.result}`,noIndex:()=>!0,pathRegExp:/^\/password\/([^/]+)\/([^/]+)$/,screenKey:a.default.Password},{createUrl:()=>"/privacy",pathRegExp:/^\/privacy$/,screenKey:a.default.PrivacyPolicy},function(){const e=/^\/@([^/]+)(?:\/(comment|post)\/([^/]+))?$/;return{createUrl:e=>{let t="/@"+e.userName;return e.highlightedType&&("comment"===e.highlightedType||"post"===e.highlightedType)&&e.highlightedId&&(t+=`/${e.highlightedType}/${e.highlightedId}`),t},getPathParams:t=>{const[,n,r,a]=t.match(e),i={userName:n};return"comment"!==r&&"post"!==r||(i.highlightedType=r),a&&(i.highlightedId=a),i},pathRegExp:e,screenKey:a.default.Profile}}(),function(){const e=/^\/read\/([^/]+)\/([^/]+)$/;return{createUrl:e=>`/read/${e.sourceSlug}/${e.articleSlug}`,getPathParams:t=>{const[,n,r]=t.match(e);return{articleSlug:r,sourceSlug:n}},noIndex:()=>!0,pathRegExp:e,screenKey:a.default.Read}}(),{authLevel:i.default.Regular,createUrl:()=>"/search",pathRegExp:/^\/search$/,screenKey:a.default.Search},{authLevel:i.default.Regular,createUrl:()=>"/settings",pathRegExp:/^\/settings$/,screenKey:a.default.Settings},{authLevel:i.default.Regular,createUrl:()=>"/stats",pathRegExp:/^\/stats$/,screenKey:a.default.Stats},function(){const e=/^\/writers\/([^/]+)$/;return{createUrl:e=>"/writers/"+e.slug,getPathParams:t=>({slug:decodeURIComponent(t.match(e)[1])}),pathRegExp:e,screenKey:a.default.Author}}()];t.default=s,t.createArticleSlug=function(e){return e.sourceSlug+"_"+e.articleSlug}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(519);t.default=()=>r.createElement("div",{className:"loading-overlay_zfgtd1"},r.createElement(a.default,null))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUrlForRoute=t.findRouteByKey=t.findRouteByLocation=void 0;const r=n(21),a=n(13);function i(e,t,n){let a,i=e.filter(e=>e.pathRegExp.test(t.path));return i?(i=t.queryString&&(a=Object.keys(r.parseQueryString(t.queryString)).filter(e=>!(n||[]).includes(e))).length?i.filter(e=>e.queryStringKeys&&e.queryStringKeys.length===a.length&&e.queryStringKeys.every(e=>a.includes(e))):i.filter(e=>!e.queryStringKeys),1===i.length?i[0]:null):null}t.findRouteByLocation=i,t.findRouteByKey=function(e,t,n){let r=e.filter(e=>e.screenKey===t);return r?(r=null!=n?r.filter(e=>e.dialogKey===n):r.filter(e=>null==e.dialogKey),r.length?r[0]:null):null},t.parseUrlForRoute=function(e){try{const t=new URL(e);if(/^(dev\.)?(readup\.(com|org)|reallyread\.it)$/.test(t.hostname)){const e=i(a.default,{path:t.pathname,queryString:t.search},r.unroutableQueryStringKeys);return e?{isInternal:!0,route:e,url:t}:{isInternal:!0,route:null,url:t}}return{isInternal:!1,route:null,url:t}}catch(e){return{isInternal:!1,route:null,url:null}}}},function(e,t,n){var r=n(119);e.exports=function(e,t){return r(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Intent=void 0;const r=n(1),a=n(2);var i;!function(e){e[e.Success=0]="Success",e[e.Danger=1]="Danger",e[e.Neutral=2]="Neutral"}(i=t.Intent||(t.Intent={}));const o={[i.Success]:"success",[i.Danger]:"danger",[i.Neutral]:"neutral"};class s extends r.PureComponent{constructor(){super(...arguments),this._removeToast=e=>{"toaster_2zbeib-pop-out"===e.animationName&&this.props.onRemoveToast(parseInt(e.currentTarget.getAttribute("data-timeout-handle")))}}render(){return r.createElement("div",{className:"toaster_2zbeib"},r.createElement("ul",{className:"toasts"},this.props.toasts.map(e=>r.createElement("li",{className:a.default("toast",o[e.intent],{remove:e.remove}),key:e.timeoutHandle,"data-timeout-handle":e.timeoutHandle,onAnimationEnd:this._removeToast},e.content))))}}t.default=s},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(78);e.exports=function(e,t,n){var a=null==e?void 0:r(e,t);return void 0===a?n:a}},function(e,t,n){"use strict";function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t}(u(Error)),f=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return i(t,e),t}(d),m=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return i(t,e),t}(d),g=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return i(t,e),t}(d),y=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t}(d),v=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return i(t,e),t}(d),b=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t}(d),w=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return i(t,e),t}(d),_="numeric",E="short",S="long",A={year:_,month:_,day:_},x={year:_,month:E,day:_},C={year:_,month:E,day:_,weekday:E},k={year:_,month:S,day:_},O={year:_,month:S,day:_,weekday:S},P={hour:_,minute:_},T={hour:_,minute:_,second:_},N={hour:_,minute:_,second:_,timeZoneName:E},D={hour:_,minute:_,second:_,timeZoneName:S},j={hour:_,minute:_,hour12:!1},R={hour:_,minute:_,second:_,hour12:!1},M={hour:_,minute:_,second:_,hour12:!1,timeZoneName:E},I={hour:_,minute:_,second:_,hour12:!1,timeZoneName:S},L={year:_,month:_,day:_,hour:_,minute:_},F={year:_,month:_,day:_,hour:_,minute:_,second:_},U={year:_,month:E,day:_,hour:_,minute:_},z={year:_,month:E,day:_,hour:_,minute:_,second:_},q={year:_,month:E,day:_,weekday:E,hour:_,minute:_},B={year:_,month:S,day:_,hour:_,minute:_,timeZoneName:E},V={year:_,month:S,day:_,hour:_,minute:_,second:_,timeZoneName:E},W={year:_,month:S,day:_,weekday:S,hour:_,minute:_,timeZoneName:S},H={year:_,month:S,day:_,weekday:S,hour:_,minute:_,second:_,timeZoneName:S};function G(e){return void 0===e}function K(e){return"number"==typeof e}function $(e){return"number"==typeof e&&e%1==0}function Z(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function Y(){return!G(Intl.DateTimeFormat.prototype.formatToParts)}function Q(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function X(e,t,n){if(0!==e.length)return e.reduce((function(e,r){var a=[t(r),r];return e&&n(e[0],a[0])===e[0]?e:a}),null)[1]}function J(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}function ee(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function te(e,t,n){return $(e)&&e>=t&&e<=n}function ne(e,t){void 0===t&&(t=2);var n=e<0?"-":"",r=n?-1*e:e;return""+n+(r.toString().length=0&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function ue(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===r?53:52}function pe(e){return e>99?e:e>60?1900+e:2e3+e}function he(e,t,n,r){void 0===r&&(r=null);var a=new Date(e),i={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);var o=Object.assign({timeZoneName:t},i),s=Z();if(s&&Y()){var l=new Intl.DateTimeFormat(n,o).formatToParts(a).find((function(e){return"timezonename"===e.type.toLowerCase()}));return l?l.value:null}if(s){var c=new Intl.DateTimeFormat(n,i).format(a);return new Intl.DateTimeFormat(n,o).format(a).substring(c.length).replace(/^[, \u200e]+/,"")}return null}function de(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function fe(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new b("Invalid unit value "+e);return t}function me(e,t,n){var r={};for(var a in e)if(ee(e,a)){if(n.indexOf(a)>=0)continue;var i=e[a];if(null==i)continue;r[t(a)]=fe(i)}return r}function ge(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),a=e>=0?"+":"-";switch(t){case"short":return""+a+ne(n,2)+":"+ne(r,2);case"narrow":return""+a+n+(r>0?":"+r:"");case"techie":return""+a+ne(n,2)+ne(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function ye(e){return J(e,["hour","minute","second","millisecond"])}var ve=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function be(e){return JSON.stringify(e,Object.keys(e).sort())}var we=["January","February","March","April","May","June","July","August","September","October","November","December"],_e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ee=["J","F","M","A","M","J","J","A","S","O","N","D"];function Se(e){switch(e){case"narrow":return Ee;case"short":return _e;case"long":return we;case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Ae=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],xe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ce=["M","T","W","T","F","S","S"];function ke(e){switch(e){case"narrow":return Ce;case"short":return xe;case"long":return Ae;case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Oe=["AM","PM"],Pe=["Before Christ","Anno Domini"],Te=["BC","AD"],Ne=["B","A"];function De(e){switch(e){case"narrow":return Ne;case"short":return Te;case"long":return Pe;default:return null}}function je(e,t){for(var n,r="",a=h(e);!(n=a()).done;){var i=n.value;i.literal?r+=i.val:r+=t(i.val)}return r}var Re={D:A,DD:x,DDD:k,DDDD:O,t:P,tt:T,ttt:N,tttt:D,T:j,TT:R,TTT:M,TTTT:I,f:L,ff:U,fff:B,ffff:W,F:F,FF:z,FFF:V,FFFF:H},Me=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",r=!1,a=[],i=0;i0&&a.push({literal:r,val:n}),t=null,n="",r=!r):r||o===t?n+=o:(n.length>0&&a.push({literal:!1,val:n}),n=o,t=o)}return n.length>0&&a.push({literal:r,val:n}),a},e.macroTokenToFormatOpts=function(e){return Re[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return ne(e,t);var n=Object.assign({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var r=this,a="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&Y(),o=function(e,n){return r.loc.extract(t,e,n)},s=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},l=function(){return a?function(e){return Oe[e.hour<12?0:1]}(t):o({hour:"numeric",hour12:!0},"dayperiod")},c=function(e,n){return a?function(e,t){return Se(t)[e.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month")},u=function(e,n){return a?function(e,t){return ke(t)[e.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},p=function(e){return a?function(e,t){return De(t)[e.year<0?0:1]}(t,e):o({era:e},"era")};return je(e.parseFormat(n),(function(n){switch(n){case"S":return r.num(t.millisecond);case"u":case"SSS":return r.num(t.millisecond,3);case"s":return r.num(t.second);case"ss":return r.num(t.second,2);case"m":return r.num(t.minute);case"mm":return r.num(t.minute,2);case"h":return r.num(t.hour%12==0?12:t.hour%12);case"hh":return r.num(t.hour%12==0?12:t.hour%12,2);case"H":return r.num(t.hour);case"HH":return r.num(t.hour,2);case"Z":return s({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return s({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:r.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return i?o({day:"numeric"},"day"):r.num(t.day);case"dd":return i?o({day:"2-digit"},"day"):r.num(t.day,2);case"c":return r.num(t.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return r.num(t.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):r.num(t.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):r.num(t.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return i?o({month:"numeric"},"month"):r.num(t.month);case"MM":return i?o({month:"2-digit"},"month"):r.num(t.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return i?o({year:"numeric"},"year"):r.num(t.year);case"yy":return i?o({year:"2-digit"},"year"):r.num(t.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):r.num(t.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):r.num(t.year,6);case"G":return p("short");case"GG":return p("long");case"GGGGG":return p("narrow");case"kk":return r.num(t.weekYear.toString().slice(-2),2);case"kkkk":return r.num(t.weekYear,4);case"W":return r.num(t.weekNumber);case"WW":return r.num(t.weekNumber,2);case"o":return r.num(t.ordinal);case"ooo":return r.num(t.ordinal,3);case"q":return r.num(t.quarter);case"qq":return r.num(t.quarter,2);case"X":return r.num(Math.floor(t.ts/1e3));case"x":return r.num(t.ts);default:return function(n){var a=e.macroTokenToFormatOpts(n);return a?r.formatWithSystemDefault(t,a):n}(n)}}))},t.formatDurationFromString=function(t,n){var r,a=this,i=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},o=e.parseFormat(n),s=o.reduce((function(e,t){var n=t.literal,r=t.val;return n?e:e.concat(r)}),[]),l=t.shiftTo.apply(t,s.map(i).filter((function(e){return e})));return je(o,(r=l,function(e){var t=i(e);return t?a.num(r.get(t),e.length):e}))},e}(),Ie=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Le=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new w},t.formatOffset=function(e,t){throw new w},t.offset=function(e){throw new w},t.equals=function(e){throw new w},a(e,[{key:"type",get:function(){throw new w}},{key:"name",get:function(){throw new w}},{key:"universal",get:function(){throw new w}},{key:"isValid",get:function(){throw new w}}]),e}(),Fe=null,Ue=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.offsetName=function(e,t){return he(e,t.format,t.locale)},n.formatOffset=function(e,t){return ge(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},a(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return Z()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Fe&&(Fe=new t),Fe}}]),t}(Le),ze=RegExp("^"+ve.source+"$"),qe={};var Be={year:0,month:1,day:2,hour:3,minute:4,second:5};var Ve={},We=function(e){function t(n){var r;return(r=e.call(this)||this).zoneName=n,r.valid=t.isValidZone(n),r}i(t,e),t.create=function(e){return Ve[e]||(Ve[e]=new t(e)),Ve[e]},t.resetCache=function(){Ve={},qe={}},t.isValidSpecifier=function(e){return!(!e||!e.match(ze))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var n=t.prototype;return n.offsetName=function(e,t){return he(e,t.format,t.locale,this.name)},n.formatOffset=function(e,t){return ge(this.offset(e),t)},n.offset=function(e){var t,n=new Date(e),r=(t=this.name,qe[t]||(qe[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),qe[t]),a=r.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=[],a=0;a=0?u:1e3+u))/6e4},n.equals=function(e){return"iana"===e.type&&e.name===this.name},a(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Le),He=null,Ge=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}i(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(de(n[1],n[2]))}return null},a(t,null,[{key:"utcInstance",get:function(){return null===He&&(He=new t(0)),He}}]);var n=t.prototype;return n.offsetName=function(){return this.name},n.formatOffset=function(e,t){return ge(this.fixed,t)},n.offset=function(){return this.fixed},n.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},a(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+ge(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Le),Ke=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}i(t,e);var n=t.prototype;return n.offsetName=function(){return null},n.formatOffset=function(){return""},n.offset=function(){return NaN},n.equals=function(){return!1},a(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Le);function $e(e,t){var n;if(G(e)||null===e)return t;if(e instanceof Le)return e;if("string"==typeof e){var r=e.toLowerCase();return"local"===r?t:"utc"===r||"gmt"===r?Ge.utcInstance:null!=(n=We.parseGMTOffset(e))?Ge.instance(n):We.isValidSpecifier(r)?We.create(e):Ge.parseSpecifier(r)||new Ke(e)}return K(e)?Ge.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Ke(e)}var Ze=function(){return Date.now()},Ye=null,Qe=null,Xe=null,Je=null,et=!1,tt=function(){function e(){}return e.resetCaches=function(){ht.resetCache(),We.resetCache()},a(e,null,[{key:"now",get:function(){return Ze},set:function(e){Ze=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){Ye=e?$e(e):null}},{key:"defaultZone",get:function(){return Ye||Ue.instance}},{key:"defaultLocale",get:function(){return Qe},set:function(e){Qe=e}},{key:"defaultNumberingSystem",get:function(){return Xe},set:function(e){Xe=e}},{key:"defaultOutputCalendar",get:function(){return Je},set:function(e){Je=e}},{key:"throwOnInvalid",get:function(){return et},set:function(e){et=e}}]),e}(),nt={};function rt(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=nt[n];return r||(r=new Intl.DateTimeFormat(e,t),nt[n]=r),r}var at={};var it={};function ot(e,t){void 0===t&&(t={});var n=t,r=(n.base,function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(n,["base"])),a=JSON.stringify([e,r]),i=it[a];return i||(i=new Intl.RelativeTimeFormat(e,t),it[a]=i),i}var st=null;function lt(e,t,n,r,a){var i=e.listingMode(n);return"error"===i?null:"en"===i?r(t):a(t)}var ct=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&Z()){var r={useGrouping:!1};n.padTo>0&&(r.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=at[n];return r||(r=new Intl.NumberFormat(e,t),at[n]=r),r}(e,r)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return ne(this.floor?Math.floor(e):ie(e,3),this.padTo)},e}(),ut=function(){function e(e,t,n){var r;if(this.opts=n,this.hasIntl=Z(),e.zone.universal&&this.hasIntl){var a=e.offset/60*-1;a>=-14&&a<=12&&a%1==0?(r=a>=0?"Etc/GMT+"+a:"Etc/GMT"+a,this.dt=e):(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:ur.fromMillis(e.ts+60*e.offset*1e3))}else"local"===e.zone.type?this.dt=e:(this.dt=e,r=e.zone.name);if(this.hasIntl){var i=Object.assign({},this.opts);r&&(i.timeZone=r),this.dtf=rt(t,i)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){switch(be(J(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case be(A):return"M/d/yyyy";case be(x):return"LLL d, yyyy";case be(C):return"EEE, LLL d, yyyy";case be(k):return"LLLL d, yyyy";case be(O):return"EEEE, LLLL d, yyyy";case be(P):return"h:mm a";case be(T):return"h:mm:ss a";case be(N):case be(D):return"h:mm a";case be(j):return"HH:mm";case be(R):return"HH:mm:ss";case be(M):case be(I):return"HH:mm";case be(L):return"M/d/yyyy, h:mm a";case be(U):return"LLL d, yyyy, h:mm a";case be(B):return"LLLL d, yyyy, h:mm a";case be(W):return"EEEE, LLLL d, yyyy, h:mm a";case be(F):return"M/d/yyyy, h:mm:ss a";case be(z):return"LLL d, yyyy, h:mm:ss a";case be(q):return"EEE, d LLL yyyy, h:mm a";case be(V):return"LLLL d, yyyy, h:mm:ss a";case be(H):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return"EEEE, LLLL d, yyyy, h:mm a"}}(this.opts),t=ht.create("en-US");return Me.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&Y()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),pt=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&Q()&&(this.rtf=ot(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var a={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+a[e][0];case-1:return o?"yesterday":"last "+a[e][0];case 0:return o?"today":"this "+a[e][0]}}var s=Object.is(t,-0)||t<0,l=Math.abs(t),c=1===l,u=a[e],p=r?c?u[1]:u[2]||u[1]:c?a[e][0]:e;return s?l+" "+p+" ago":"in "+l+" "+p}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),ht=function(){function e(e,t,n,r){var a=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,r=e.substring(0,t);try{n=rt(e).resolvedOptions()}catch(e){n=rt(r).resolvedOptions()}var a=n;return[r,a.numberingSystem,a.calendar]}(e),i=a[0],o=a[1],s=a[2];this.locale=i,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.intl=function(e,t,n){return Z()?n||t?(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e:[]}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,r,a){void 0===a&&(a=!1);var i=t||tt.defaultLocale;return new e(i||(a?"en-US":function(){if(st)return st;if(Z()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return st=e&&"und"!==e?e:"en-US"}return st="en-US"}()),n||tt.defaultNumberingSystem,r||tt.defaultOutputCalendar,i)},e.resetCache=function(){st=null,nt={},at={},it={}},e.fromObject=function(t){var n=void 0===t?{}:t,r=n.locale,a=n.numberingSystem,i=n.outputCalendar;return e.create(r,a,i)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=Z()&&Y(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),lt(this,e,n,Se,(function(){var n=t?{month:e,day:"numeric"}:{month:e},a=t?"format":"standalone";return r.monthsCache[a][e]||(r.monthsCache[a][e]=function(e){for(var t=[],n=1;n<=12;n++){var r=ur.utc(2016,n,1);t.push(e(r))}return t}((function(e){return r.extract(e,n,"month")}))),r.monthsCache[a][e]}))},t.weekdays=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),lt(this,e,n,ke,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},a=t?"format":"standalone";return r.weekdaysCache[a][e]||(r.weekdaysCache[a][e]=function(e){for(var t=[],n=1;n<=7;n++){var r=ur.utc(2016,11,13+n);t.push(e(r))}return t}((function(e){return r.extract(e,n,"weekday")}))),r.weekdaysCache[a][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),lt(this,void 0,e,(function(){return Oe}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[ur.utc(2016,11,13,9),ur.utc(2016,11,13,19)].map((function(n){return t.extract(n,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),lt(this,e,t,De,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[ur.utc(-40,1,1),ur.utc(2017,1,1)].map((function(e){return n.extract(e,t,"era")}))),n.eraCache[e]}))},t.extract=function(e,t,n){var r=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return r?r.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new ct(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new ut(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new pt(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Z()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},a(e,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||Z()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function dt(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r3?Ae.indexOf(e)+1:xe.indexOf(e)+1),s}var Mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function It(e){var t,n=e[1],r=e[2],a=e[3],i=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],p=e[10],h=e[11],d=Rt(n,i,a,r,o,s,l);return t=c?jt[c]:u?0:de(p,h),[d,new Ge(t)]}var Lt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ft=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ut=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function zt(e){var t=e[1],n=e[2],r=e[3];return[Rt(t,e[4],r,n,e[5],e[6],e[7]),Ge.utcInstance]}function qt(e){var t=e[1],n=e[2],r=e[3],a=e[4],i=e[5],o=e[6];return[Rt(t,e[7],n,r,a,i,o),Ge.utcInstance]}var Bt=dt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,wt),Vt=dt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,wt),Wt=dt(/(\d{4})-?(\d{3})/,wt),Ht=dt(bt),Gt=ft(Ct,kt,Ot),Kt=ft(_t,kt,Ot),$t=ft(Et,kt),Zt=ft(kt,Ot);var Yt=ft(kt);var Qt=dt(/(\d{4})-(\d\d)-(\d\d)/,At),Xt=dt(St),Jt=ft(Ct,kt,Ot,Pt),en=ft(kt,Ot,Pt);var tn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},nn=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},tn),rn=Object.assign({years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:30.436875/7,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},tn),an=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],on=an.slice(0).reverse();function sn(e,t,n){void 0===n&&(n=!1);var r={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new cn(r)}function ln(e,t,n,r,a){var i=e[a][n],o=t[n]/i,s=!(Math.sign(o)===Math.sign(r[a]))&&0!==r[a]&&Math.abs(o)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(o):Math.trunc(o);r[a]+=s,t[n]-=s*i}var cn=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||ht.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?rn:nn,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!=typeof t)throw new b("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:me(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:ht.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var r=function(e){return mt(e,[Nt,Dt])}(t)[0];if(r){var a=Object.assign(r,n);return e.fromObject(a)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.fromISOTime=function(t,n){var r=function(e){return mt(e,[Tt,Yt])}(t)[0];if(r){var a=Object.assign(r,n);return e.fromObject(a)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new b("need to specify a reason the Duration is invalid");var r=t instanceof Ie?t:new Ie(t,n);if(tt.throwOnInvalid)throw new g(r);return new e({invalid:r})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new v(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Me.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=ie(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||t>=864e5)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var n=this.shiftTo("hours","minutes","seconds","milliseconds"),r="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(r+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===n.milliseconds||(r+=".SSS"));var a=n.toFormat(r);return e.includePrefix&&(a="T"+a),a},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.toMillis=function(){return this.as("milliseconds")},t.valueOf=function(){return this.toMillis()},t.plus=function(e){if(!this.isValid)return this;for(var t,n=un(e),r={},a=h(an);!(t=a()).done;){var i=t.value;(ee(n.values,i)||ee(this.values,i))&&(r[i]=n.get(i)+this.get(i))}return sn(this,{values:r},!0)},t.minus=function(e){if(!this.isValid)return this;var t=un(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n=0){a=u;var p=0;for(var d in s)p+=this.matrix[d][u]*s[d],s[d]=0;K(l[u])&&(p+=l[u]);var f=Math.trunc(p);for(var m in o[u]=f,s[u]=p-f,l)an.indexOf(m)>an.indexOf(u)&&ln(this.matrix,l,m,o,u)}else K(l[u])&&(s[u]=l[u])}for(var g in s)0!==s[g]&&(o[a]+=g===a?s[g]:s[g]/this.matrix[a][g]);return sn(this,{values:o},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);te},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},t.set=function(t){var n=void 0===t?{}:t,r=n.start,a=n.end;return this.isValid?e.fromDateTimes(r||this.s,a||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,r=new Array(n),a=0;a+this.e?this.e:c;o.push(e.fromDateTimes(s,u)),s=u,l+=1}return o},t.splitBy=function(t){var n=un(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var r,a,i=this.s,o=[];i+this.e?this.e:r,o.push(e.fromDateTimes(i,a)),i=a;return o},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s=e.e)},t.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,r=this.er?null:e.fromDateTimes(n,r)},t.union=function(t){if(!this.isValid)return this;var n=this.st.e?this.e:t.e;return e.fromDateTimes(n,r)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],r=e[1];return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]}),[[],null]),n=t[0],r=t[1];return r&&n.push(r),n},e.xor=function(t){for(var n,r,a=null,i=0,o=[],s=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),l=h((n=Array.prototype).concat.apply(n,s).sort((function(e,t){return e.time-t.time})));!(r=l()).done;){var c=r.value;1===(i+="s"===c.type?1:-1)?a=c.time:(a&&+a!=+c.time&&o.push(e.fromDateTimes(a,c.time)),a=null)}return e.merge(o)},t.difference=function(){for(var t=this,n=arguments.length,r=new Array(n),a=0;a=0){var p;r=c;var h,d=u(e,t);if((a=e.plus(((p={})[c]=d,p)))>t)e=e.plus(((h={})[c]=d-1,h)),d-=1;else e=a;i[c]=d}}return[e,i,a,r]}(e,t,n),i=a[0],o=a[1],s=a[2],l=a[3],c=t-i,u=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===u.length){var p;if(s0?(h=cn.fromMillis(c,r)).shiftTo.apply(h,u).plus(d):d}var yn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},vn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},bn=yn.hanidec.replace(/[\[|\]]/g,"").split("");function wn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+yn[n||"latn"]+t)}function _n(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n=o&&r<=s&&(t+=r-o)}}return parseInt(t,10)}return t}(n))}}}var En="( |"+String.fromCharCode(160)+")",Sn=new RegExp(En,"g");function An(e){return e.replace(/\./g,"\\.?").replace(Sn,En)}function xn(e){return e.replace(/\./g,"").replace(Sn," ").toLowerCase()}function Cn(e,t){return null===e?null:{regex:RegExp(e.map(An).join("|")),deser:function(n){var r=n[0];return e.findIndex((function(e){return xn(r)===xn(e)}))+t}}}function kn(e,t){return{regex:e,deser:function(e){return de(e[1],e[2])},groups:t}}function On(e){return{regex:e,deser:function(e){return e[0]}}}var Pn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var Tn=null;function Nn(e,t){if(e.literal)return e;var n=Me.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Me.create(t,n).formatDateTimeParts((Tn||(Tn=ur.fromMillis(1555555555555)),Tn)).map((function(e){return function(e,t,n){var r=e.type,a=e.value;if("literal"===r)return{literal:!0,val:a};var i=n[r],o=Pn[r];return"object"==typeof o&&(o=o[i]),o?{literal:!1,val:o}:void 0}(e,0,n)}));return r.includes(void 0)?e:r}function Dn(e,t,n){var r=function(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return Nn(e,t)})))}(Me.parseFormat(n),e),a=r.map((function(t){return n=t,a=wn(r=e),i=wn(r,"{2}"),o=wn(r,"{3}"),s=wn(r,"{4}"),l=wn(r,"{6}"),c=wn(r,"{1,2}"),u=wn(r,"{1,3}"),p=wn(r,"{1,6}"),h=wn(r,"{1,9}"),d=wn(r,"{2,4}"),f=wn(r,"{4,6}"),m=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},(g=function(e){if(n.literal)return m(e);switch(e.val){case"G":return Cn(r.eras("short",!1),0);case"GG":return Cn(r.eras("long",!1),0);case"y":return _n(p);case"yy":return _n(d,pe);case"yyyy":return _n(s);case"yyyyy":return _n(f);case"yyyyyy":return _n(l);case"M":return _n(c);case"MM":return _n(i);case"MMM":return Cn(r.months("short",!0,!1),1);case"MMMM":return Cn(r.months("long",!0,!1),1);case"L":return _n(c);case"LL":return _n(i);case"LLL":return Cn(r.months("short",!1,!1),1);case"LLLL":return Cn(r.months("long",!1,!1),1);case"d":return _n(c);case"dd":return _n(i);case"o":return _n(u);case"ooo":return _n(o);case"HH":return _n(i);case"H":return _n(c);case"hh":return _n(i);case"h":return _n(c);case"mm":return _n(i);case"m":case"q":return _n(c);case"qq":return _n(i);case"s":return _n(c);case"ss":return _n(i);case"S":return _n(u);case"SSS":return _n(o);case"u":return On(h);case"a":return Cn(r.meridiems(),0);case"kkkk":return _n(s);case"kk":return _n(d,pe);case"W":return _n(c);case"WW":return _n(i);case"E":case"c":return _n(a);case"EEE":return Cn(r.weekdays("short",!1,!1),1);case"EEEE":return Cn(r.weekdays("long",!1,!1),1);case"ccc":return Cn(r.weekdays("short",!0,!1),1);case"cccc":return Cn(r.weekdays("long",!0,!1),1);case"Z":case"ZZ":return kn(new RegExp("([+-]"+c.source+")(?::("+i.source+"))?"),2);case"ZZZ":return kn(new RegExp("([+-]"+c.source+")("+i.source+")?"),2);case"z":return On(/[a-z_+-/]{1,256}?/i);default:return m(e)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"}).token=n,g;var n,r,a,i,o,s,l,c,u,p,h,d,f,m,g})),i=a.find((function(e){return e.invalidReason}));if(i)return{input:t,tokens:r,invalidReason:i.invalidReason};var o=function(e){return["^"+e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",e]}(a),s=o[0],l=o[1],c=RegExp(s,"i"),u=function(e,t,n){var r=e.match(t);if(r){var a={},i=1;for(var o in n)if(ee(n,o)){var s=n[o],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(a[s.token.val[0]]=s.deser(r.slice(i,i+l))),i+=l}return[r,a]}return[r,{}]}(t,c,l),p=u[0],h=u[1],d=h?function(e){var t;return t=G(e.Z)?G(e.z)?null:We.create(e.z):new Ge(e.Z),G(e.q)||(e.M=3*(e.q-1)+1),G(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),G(e.u)||(e.S=ae(e.u)),[Object.keys(e).reduce((function(t,n){var r=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return r&&(t[r]=e[n]),t}),{}),t]}(h):[null,null],f=d[0],m=d[1];if(ee(h,"a")&&ee(h,"H"))throw new y("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:c,rawMatches:p,matches:h,result:f,zone:m}}var jn=[0,31,59,90,120,151,181,212,243,273,304,334],Rn=[0,31,60,91,121,152,182,213,244,274,305,335];function Mn(e,t){return new Ie("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function In(e,t,n){var r=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===r?7:r}function Ln(e,t,n){return n+(oe(e)?Rn:jn)[t-1]}function Fn(e,t){var n=oe(e)?Rn:jn,r=n.findIndex((function(e){return eue(n)?(t=n+1,s=1):t=n,Object.assign({weekYear:t,weekNumber:s,weekday:o},ye(e))}function zn(e){var t,n=e.weekYear,r=e.weekNumber,a=e.weekday,i=In(n,1,4),o=se(n),s=7*r+a-i-3;s<1?s+=se(t=n-1):s>o?(t=n+1,s-=se(n)):t=n;var l=Fn(t,s),c=l.month,u=l.day;return Object.assign({year:t,month:c,day:u},ye(e))}function qn(e){var t=e.year,n=Ln(t,e.month,e.day);return Object.assign({year:t,ordinal:n},ye(e))}function Bn(e){var t=e.year,n=Fn(t,e.ordinal),r=n.month,a=n.day;return Object.assign({year:t,month:r,day:a},ye(e))}function Vn(e){var t=$(e.year),n=te(e.month,1,12),r=te(e.day,1,le(e.year,e.month));return t?n?!r&&Mn("day",e.day):Mn("month",e.month):Mn("year",e.year)}function Wn(e){var t=e.hour,n=e.minute,r=e.second,a=e.millisecond,i=te(t,0,23)||24===t&&0===n&&0===r&&0===a,o=te(n,0,59),s=te(r,0,59),l=te(a,0,999);return i?o?s?!l&&Mn("millisecond",a):Mn("second",r):Mn("minute",n):Mn("hour",t)}function Hn(e){return new Ie("unsupported zone",'the zone "'+e.name+'" is not supported')}function Gn(e){return null===e.weekData&&(e.weekData=Un(e.c)),e.weekData}function Kn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new ur(Object.assign({},n,t,{old:n}))}function $n(e,t,n){var r=e-60*t*1e3,a=n.offset(r);if(t===a)return[r,t];r-=60*(a-t)*1e3;var i=n.offset(r);return a===i?[r,a]:[e-60*Math.min(a,i)*1e3,Math.max(a,i)]}function Zn(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Yn(e,t,n){return $n(ce(e),t,n)}function Qn(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),a=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i=Object.assign({},e.c,{year:r,month:a,day:Math.min(e.c.day,le(r,a))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),o=cn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=$n(ce(i),n,e.zone),l=s[0],c=s[1];return 0!==o&&(l+=o,c=e.zone.offset(l)),{ts:l,o:c}}function Xn(e,t,n,r,a){var i=n.setZone,o=n.zone;if(e&&0!==Object.keys(e).length){var s=t||o,l=ur.fromObject(Object.assign(e,n,{zone:s,setZone:void 0}));return i?l:l.setZone(o)}return ur.invalid(new Ie("unparsable",'the input "'+a+"\" can't be parsed as "+r))}function Jn(e,t,n){return void 0===n&&(n=!0),e.isValid?Me.create(ht.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function er(e,t){var n=t.suppressSeconds,r=void 0!==n&&n,a=t.suppressMilliseconds,i=void 0!==a&&a,o=t.includeOffset,s=t.includePrefix,l=void 0!==s&&s,c=t.includeZone,u=void 0!==c&&c,p=t.spaceZone,h=void 0!==p&&p,d=t.format,f=void 0===d?"extended":d,m="basic"===f?"HHmm":"HH:mm";r&&0===e.second&&0===e.millisecond||(m+="basic"===f?"ss":":ss",i&&0===e.millisecond||(m+=".SSS")),(u||o)&&h&&(m+=" "),u?m+="z":o&&(m+="basic"===f?"ZZZ":"ZZ");var g=Jn(e,m);return l&&(g="T"+g),g}var tr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},nr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},rr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ar=["year","month","day","hour","minute","second","millisecond"],ir=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],or=["year","ordinal","hour","minute","second","millisecond"];function sr(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new v(e);return t}function lr(e,t){for(var n,r=h(ar);!(n=r()).done;){var a=n.value;G(e[a])&&(e[a]=tr[a])}var i=Vn(e)||Wn(e);if(i)return ur.invalid(i);var o=tt.now(),s=Yn(e,t.offset(o),t),l=s[0],c=s[1];return new ur({ts:l,zone:t,o:c})}function cr(e,t,n){var r=!!G(n.round)||n.round,a=function(e,a){return e=ie(e,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,a)},i=function(r){return n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r)};if(n.unit)return a(i(n.unit),n.unit);for(var o,s=h(n.units);!(o=s()).done;){var l=o.value,c=i(l);if(Math.abs(c)>=1)return a(c,l)}return a(0,n.units[n.units.length-1])}var ur=function(){function e(e){var t=e.zone||tt.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Ie("invalid input"):null)||(t.isValid?null:Hn(t));this.ts=G(e.ts)?tt.now():e.ts;var r=null,a=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var i=[e.old.c,e.old.o];r=i[0],a=i[1]}else{var o=t.offset(this.ts);r=Zn(this.ts,o),r=(n=Number.isNaN(r.year)?new Ie("invalid input"):null)?null:r,a=n?null:o}this._zone=t,this.loc=e.loc||ht.create(),this.invalid=n,this.weekData=null,this.c=r,this.o=a,this.isLuxonDateTime=!0}e.now=function(){return new e({})},e.local=function(t,n,r,a,i,o,s){return G(t)?new e({}):lr({year:t,month:n,day:r,hour:a,minute:i,second:o,millisecond:s},tt.defaultZone)},e.utc=function(t,n,r,a,i,o,s){return G(t)?new e({ts:tt.now(),zone:Ge.utcInstance}):lr({year:t,month:n,day:r,hour:a,minute:i,second:o,millisecond:s},Ge.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var r,a=(r=t,"[object Date]"===Object.prototype.toString.call(r)?t.valueOf():NaN);if(Number.isNaN(a))return e.invalid("invalid input");var i=$e(n.zone,tt.defaultZone);return i.isValid?new e({ts:a,zone:i,loc:ht.fromObject(n)}):e.invalid(Hn(i))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),K(t))return t<-864e13||t>864e13?e.invalid("Timestamp out of range"):new e({ts:t,zone:$e(n.zone,tt.defaultZone),loc:ht.fromObject(n)});throw new b("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),K(t))return new e({ts:1e3*t,zone:$e(n.zone,tt.defaultZone),loc:ht.fromObject(n)});throw new b("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=$e(t.zone,tt.defaultZone);if(!n.isValid)return e.invalid(Hn(n));var r=tt.now(),a=n.offset(r),i=me(t,sr,["zone","locale","outputCalendar","numberingSystem"]),o=!G(i.ordinal),s=!G(i.year),l=!G(i.month)||!G(i.day),c=s||l,u=i.weekYear||i.weekNumber,p=ht.fromObject(t);if((c||o)&&u)throw new y("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new y("Can't mix ordinal dates with month/day");var d,f,m=u||i.weekday&&!c,g=Zn(r,a);m?(d=ir,f=nr,g=Un(g)):o?(d=or,f=rr,g=qn(g)):(d=ar,f=tr);for(var v,b=!1,w=h(d);!(v=w()).done;){var _=v.value;G(i[_])?i[_]=b?f[_]:g[_]:b=!0}var E=(m?function(e){var t=$(e.weekYear),n=te(e.weekNumber,1,ue(e.weekYear)),r=te(e.weekday,1,7);return t?n?!r&&Mn("weekday",e.weekday):Mn("week",e.week):Mn("weekYear",e.weekYear)}(i):o?function(e){var t=$(e.year),n=te(e.ordinal,1,se(e.year));return t?!n&&Mn("ordinal",e.ordinal):Mn("year",e.year)}(i):Vn(i))||Wn(i);if(E)return e.invalid(E);var S=Yn(m?zn(i):o?Bn(i):i,a,n),A=new e({ts:S[0],zone:n,o:S[1],loc:p});return i.weekday&&c&&t.weekday!==A.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+i.weekday+" and a date of "+A.toISO()):A},e.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return mt(e,[Bt,Gt],[Vt,Kt],[Wt,$t],[Ht,Zt])}(e);return Xn(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return mt(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Mt,It])}(e);return Xn(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return mt(e,[Lt,zt],[Ft,zt],[Ut,qt])}(e);return Xn(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,r){if(void 0===r&&(r={}),G(t)||G(n))throw new b("fromFormat requires an input string and a format");var a=r,i=a.locale,o=void 0===i?null:i,s=a.numberingSystem,l=void 0===s?null:s,c=function(e,t,n){var r=Dn(e,t,n);return[r.result,r.zone,r.invalidReason]}(ht.fromOpts({locale:o,numberingSystem:l,defaultToEN:!0}),t,n),u=c[0],p=c[1],h=c[2];return h?e.invalid(h):Xn(u,p,r,"format "+n,t)},e.fromString=function(t,n,r){return void 0===r&&(r={}),e.fromFormat(t,n,r)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=function(e){return mt(e,[Qt,Jt],[Xt,en])}(e);return Xn(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new b("need to specify a reason the DateTime is invalid");var r=t instanceof Ie?t:new Ie(t,n);if(tt.throwOnInvalid)throw new f(r);return new e({invalid:r})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Me.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(Ge.instance(e),t)},t.toLocal=function(){return this.setZone(tt.defaultZone)},t.setZone=function(t,n){var r=void 0===n?{}:n,a=r.keepLocalTime,i=void 0!==a&&a,o=r.keepCalendarTime,s=void 0!==o&&o;if((t=$e(t,tt.defaultZone)).equals(this.zone))return this;if(t.isValid){var l=this.ts;if(i||s){var c=t.offset(this.ts);l=Yn(this.toObject(),c,t)[0]}return Kn(this,{ts:l,zone:t})}return e.invalid(Hn(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,a=t.outputCalendar;return Kn(this,{loc:this.loc.clone({locale:n,numberingSystem:r,outputCalendar:a})})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=me(e,sr,[]);!G(n.weekYear)||!G(n.weekNumber)||!G(n.weekday)?t=zn(Object.assign(Un(this.c),n)):G(n.ordinal)?(t=Object.assign(this.toObject(),n),G(n.day)&&(t.day=Math.min(le(t.year,t.month),t.day))):t=Bn(Object.assign(qn(this.c),n));var r=Yn(t,this.o,this.zone);return Kn(this,{ts:r[0],o:r[1]})},t.plus=function(e){return this.isValid?Kn(this,Qn(this,un(e))):this},t.minus=function(e){return this.isValid?Kn(this,Qn(this,un(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=cn.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){var r=Math.ceil(this.month/3);t.month=3*(r-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Me.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):"Invalid DateTime"},t.toLocaleString=function(e){return void 0===e&&(e=A),this.isValid?Me.create(this.loc.clone(e),e).formatDateTime(this):"Invalid DateTime"},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Me.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),Jn(this,n)},t.toISOWeekDate=function(){return Jn(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,r=void 0!==n&&n,a=t.suppressSeconds,i=void 0!==a&&a,o=t.includeOffset,s=void 0===o||o,l=t.includePrefix,c=void 0!==l&&l,u=t.format;return er(this,{suppressSeconds:i,suppressMilliseconds:r,includeOffset:s,includePrefix:c,format:void 0===u?"extended":u})},t.toRFC2822=function(){return Jn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return Jn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return Jn(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,r=void 0===n||n,a=t.includeZone;return er(this,{includeOffset:r,includeZone:void 0!==a&&a,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():"Invalid DateTime"},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return cn.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var r,a=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),i=(r=t,Array.isArray(r)?r:[r]).map(cn.normalizeUnit),o=e.valueOf()>this.valueOf(),s=gn(o?this:e,o?e:this,i,a);return o?s.negate():s},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.now(),t,n)},t.until=function(e){return this.isValid?dn.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(t)<=n&&n<=r.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),r=t.padding?thisthis.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return oe(this.year)}},{key:"daysInMonth",get:function(){return le(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?se(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?ue(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return A}},{key:"DATE_MED",get:function(){return x}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return C}},{key:"DATE_FULL",get:function(){return k}},{key:"DATE_HUGE",get:function(){return O}},{key:"TIME_SIMPLE",get:function(){return P}},{key:"TIME_WITH_SECONDS",get:function(){return T}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return N}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return D}},{key:"TIME_24_SIMPLE",get:function(){return j}},{key:"TIME_24_WITH_SECONDS",get:function(){return R}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return M}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return I}},{key:"DATETIME_SHORT",get:function(){return L}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return F}},{key:"DATETIME_MED",get:function(){return U}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return z}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return q}},{key:"DATETIME_FULL",get:function(){return B}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return V}},{key:"DATETIME_HUGE",get:function(){return W}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return H}}]),e}();function pr(e){if(ur.isDateTime(e))return e;if(e&&e.valueOf&&K(e.valueOf()))return ur.fromJSDate(e);if(e&&"object"==typeof e)return ur.fromObject(e);throw new b("Unknown datetime argument: "+e+", of type "+typeof e)}t.DateTime=ur,t.Duration=cn,t.FixedOffsetZone=Ge,t.IANAZone=We,t.Info=fn,t.Interval=dn,t.InvalidZone=Ke,t.LocalZone=Ue,t.Settings=tt,t.VERSION="1.26.0",t.Zone=Le},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unroutableQueryStringKeys=t.subscribeQueryStringKey=t.referrerUrlQueryStringKey=t.marketingVariantQueryStringKey=t.marketingScreenVariantQueryStringKey=t.messageQueryStringKey=t.extensionInstalledQueryStringKey=t.authenticateQueryStringKey=t.deviceTypeQueryStringKey=t.clientTypeQueryStringKey=t.authServiceTokenQueryStringKey=t.appVersion=t.appReferralQueryStringKey=t.appPlatformQueryStringKey=t.createQueryString=t.parseQueryString=void 0,t.parseQueryString=function(e){return e?(e.startsWith("?")&&(e=e.substring(1)),e.split("&").reduce((e,t)=>{const n=t.split("=");return e[decodeURIComponent(n[0])]=decodeURIComponent(n[1]),e},{})):{}},t.createQueryString=function(e){if(e){const t=Object.keys(e).reduce((t,n)=>{const r=encodeURIComponent(n),a=e[n];return null==a?t.push(r):"string"==typeof a||"number"==typeof a||"boolean"==typeof a?t.push(r+"="+encodeURIComponent(a)):Array.isArray(a)&&a.forEach(e=>{t.push(r+"="+encodeURIComponent(e))}),t},[]);if(t.length)return"?"+t.join("&")}return""},t.appPlatformQueryStringKey="appPlatform",t.appReferralQueryStringKey="appReferral",t.appVersion="appVersion",t.authServiceTokenQueryStringKey="authServiceToken",t.clientTypeQueryStringKey="clientType",t.deviceTypeQueryStringKey="deviceType",t.authenticateQueryStringKey="authenticate",t.extensionInstalledQueryStringKey="extensionInstalled",t.messageQueryStringKey="message",t.marketingScreenVariantQueryStringKey="marketingScreenVariant",t.marketingVariantQueryStringKey="marketingVariant",t.referrerUrlQueryStringKey="referrerUrl",t.subscribeQueryStringKey="subscribe",t.unroutableQueryStringKeys=[t.appPlatformQueryStringKey,t.appReferralQueryStringKey,t.appVersion,t.clientTypeQueryStringKey,t.deviceTypeQueryStringKey,t.messageQueryStringKey,t.marketingScreenVariantQueryStringKey,t.marketingVariantQueryStringKey,t.referrerUrlQueryStringKey,t.subscribeQueryStringKey]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(10),i=n(233),o=n(11),s=n(13),l=n(15),c=n(147),u=n(7),p=n(104),h=n(544),d=n(30),f=n(235),m=n(545),g=n(546),y=n(8),v=n(25),b=n(2),w=n(236);class _ extends r.PureComponent{constructor(e){super(e),this._getShareData=()=>h.default("Article",this.props.article),this._shouldShowImage=()=>this.props.showImage&&this.props.article.imageUrl,this._read=e=>{e.stopPropagation(),this.props.onRead(this.props.article,e)},this._toggleStar=e=>{e&&e.stopPropagation(),this.setState({isStarring:!0}),this.props.onToggleStar(this.props.article).then(()=>{this.setState({isStarring:!1})}).catch(()=>{this.setState({isStarring:!1})})},this._viewComments=e=>{e.stopPropagation(),e.preventDefault(),this.props.onViewComments(this.props.article)},this._getArticleUrlParams=()=>{const[e,t]=this.props.article.slug.split("_");return{articleSlug:t,sourceSlug:e}},this._renderAuthorLinks=()=>this.props.article.articleAuthors.map((e,t,n)=>r.createElement(r.Fragment,{key:e.slug},r.createElement(y.default,{className:"data",screen:o.default.Author,params:{slug:e.slug},onClick:this.props.onNavTo,text:e.name,stopPropagation:!0}),t!==n.length-1?r.createElement("span",null,", "):null)),this._renderCommentsLinkHref=()=>l.findRouteByKey(s.default,o.default.Comments).createUrl(this._getArticleUrlParams()),this._renderEstimatedReadTime=()=>p.calculateEstimatedReadTime(this.props.article.wordCount)+" min",this._renderRatingControl=()=>r.createElement(m.default,{article:this.props.article,menuPosition:c.MenuPosition.TopCenter,onRateArticle:this.props.onRateArticle,stopPropagation:!0}),this._renderShareControl=()=>r.createElement(c.default,{onGetData:this._getShareData,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,menuPosition:v.isMobileDevice(this.props.deviceType)?c.MenuPosition.LeftTop:this.props.shareMenuPosition,stopPropagation:!0},r.createElement(u.default,{display:"block",name:this.props.deviceType===v.DeviceType.Ios?"share":"share-android"})),this.MAX_DESCRIPTION_LENGTH=250,this.state={isStarring:!1}}render(){return r.createElement("div",{className:b("article-details_d2vnmv",{"has-image":this._shouldShowImage(),"is-featured":this.props.isFeatured},this.props.className)},this.props.showAotdMetadata?r.createElement(g.default,{article:this.props.article,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onViewProfile:this.props.onViewProfile,pointsCallout:this.props.pointsCallout,rankCallout:this.props.rankCallout,showPoints:this.props.showPoints,showScout:this.props.showScout}):null,r.createElement(d.default,{className:"article-container image--"+this.props.imagePosition,highlight:this.props.highlight,onClick:this._read},this._shouldShowImage()?r.createElement(w.default,{src:this.props.article.imageUrl}):null,r.createElement("div",{className:"content"},r.createElement("div",{className:"title"},this.props.user?r.createElement(i.default,{starred:!!this.props.article.dateStarred,busy:this.state.isStarring,onClick:this._toggleStar}):null,this._renderShareControl(),!this.props.article.isRead&&this.props.article.percentComplete>=1?r.createElement("div",{className:"bookmark"},r.createElement("span",{className:"percent-complete"},Math.floor(this.props.article.percentComplete),"%"),r.createElement(u.default,{name:"bookmark"})):null,r.createElement("a",{className:"title-link",href:this.props.article.url},this.props.article.title)),r.createElement("div",{className:"columns"},r.createElement("div",{className:"article"},r.createElement("div",{className:"meta"},r.createElement("span",null,this.props.article.source),r.createElement("i",{className:"spacer"}),this._renderAuthorLinks(),this._renderAuthorLinks().length?r.createElement("i",{className:"spacer"}):null,this.props.article.datePublished?r.createElement(r.Fragment,null,r.createElement("span",null,a.formatTimestamp(this.props.article.datePublished)),r.createElement("i",{className:"spacer"})):null,r.createElement("span",null,this._renderEstimatedReadTime())),this.props.showDescription&&this.props.article.description?r.createElement("p",{className:"description"},a.truncateText(this.props.article.description,this.MAX_DESCRIPTION_LENGTH)):null,this.props.showMetaActions?r.createElement("div",{className:"stats"},r.createElement("span",{className:"reads"},this.props.article.readCount," ",a.formatCountable(this.props.article.readCount,"read")),r.createElement("a",{className:"comments",href:this._renderCommentsLinkHref(),onClick:this._viewComments},this.props.article.commentCount," ",a.formatCountable(this.props.article.commentCount,"comment")),this._renderRatingControl()):null),r.createElement("div",{className:"small-stats-article"},r.createElement("div",{className:"meta"},r.createElement("div",{className:"publisher"},this.props.article.source),r.createElement("div",{className:"author-date-length"},this._renderAuthorLinks().length?r.createElement("span",{className:"author"},this._renderAuthorLinks()):null,this._renderAuthorLinks().length&&this.props.article.datePublished?r.createElement("span",{className:"spacer"}):null,this.props.article.datePublished?r.createElement("span",{className:"date"},a.formatTimestamp(this.props.article.datePublished)):null,this._renderAuthorLinks().length||this.props.article.datePublished?r.createElement("span",{className:"spacer"}):null,r.createElement("span",{className:"length"},this._renderEstimatedReadTime()))),this.props.showDescription&&this.props.article.description?r.createElement("p",{className:"description"},a.truncateText(this.props.article.description,this.MAX_DESCRIPTION_LENGTH)):null,this.props.showMetaActions?r.createElement("div",{className:"stats"},r.createElement("div",{className:"reads"},r.createElement("span",null,this.props.article.readCount," ",a.formatCountable(this.props.article.readCount,"read"))),r.createElement("div",{className:"comments"},r.createElement("a",{href:this._renderCommentsLinkHref(),onClick:this._viewComments},this.props.article.commentCount," ",a.formatCountable(this.props.article.commentCount,"comment"))),this._renderRatingControl()):null),this.props.onPost&&(this.props.article.isRead||this.props.article.datesPosted.length)?r.createElement("div",{className:"post"},r.createElement(f.default,{article:this.props.article,menuPosition:c.MenuPosition.LeftMiddle,onPost:this.props.onPost,stopPropagation:!0})):null))))}}t.default=_,_.defaultProps={shareMenuPosition:c.MenuPosition.LeftTop,showAotdMetadata:!0,showImage:!1,showMetaActions:!0,showPoints:!0,showScout:!0,imagePosition:"right",isFeatured:!1}},function(e,t,n){"use strict";n.r(t),function(e){var r;n.d(t,"Immer",(function(){return se})),n.d(t,"applyPatches",(function(){return de})),n.d(t,"castDraft",(function(){return ge})),n.d(t,"castImmutable",(function(){return ye})),n.d(t,"createDraft",(function(){return fe})),n.d(t,"finishDraft",(function(){return me})),n.d(t,"immerable",(function(){return u})),n.d(t,"isDraft",(function(){return m})),n.d(t,"isDraftable",(function(){return g})),n.d(t,"nothing",(function(){return c})),n.d(t,"original",(function(){return y})),n.d(t,"produce",(function(){return ce})),n.d(t,"produceWithPatches",(function(){return ue})),n.d(t,"setAutoFreeze",(function(){return pe})),n.d(t,"setUseProxies",(function(){return he}));var a,i,o="undefined"!=typeof Symbol,s="undefined"!=typeof Map,l="undefined"!=typeof Set,c=o?Symbol("immer-nothing"):((r={})["immer-nothing"]=!0,r),u=o?Symbol("immer-draftable"):"__$immer_draftable",p=o?Symbol("immer-state"):"__$immer_state",h=o?Symbol.iterator:"@@iterator",d=function(e,t){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function f(e,t){function n(){this.constructor=e}d(e,t),e.prototype=(n.prototype=t.prototype,new n)}function m(e){return!!e&&!!e[p]}function g(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return!t||t===Object.prototype}(e)||Array.isArray(e)||!!e[u]||!!e.constructor[u]||A(e)||x(e))}function y(e){if(e&&e[p])return e[p].base}!function(e){e[e.Object=0]="Object",e[e.Array=1]="Array",e[e.Map=2]="Map",e[e.Set=3]="Set"}(a||(a={})),function(e){e[e.ProxyObject=0]="ProxyObject",e[e.ProxyArray=1]="ProxyArray",e[e.ES5Object=2]="ES5Object",e[e.ES5Array=3]="ES5Array",e[e.Map=4]="Map",e[e.Set=5]="Set"}(i||(i={}));var v="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function b(e,t){w(e)===a.Object?v(e).forEach((function(n){return t(n,e[n],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function w(e){if(e||T(),e[p])switch(e[p].type){case i.ES5Object:case i.ProxyObject:return a.Object;case i.ES5Array:case i.ProxyArray:return a.Array;case i.Map:return a.Map;case i.Set:return a.Set}return Array.isArray(e)?a.Array:A(e)?a.Map:x(e)?a.Set:a.Object}function _(e,t){return w(e)===a.Map?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function E(e,t){return w(e)===a.Map?e.get(t):e[t]}function S(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function A(e){return s&&e instanceof Map}function x(e){return l&&e instanceof Set}function C(e){return e.copy||e.base}function k(e,t){if(void 0===t&&(t=!1),Array.isArray(e))return e.slice();var n=Object.create(Object.getPrototypeOf(e));return v(e).forEach((function(r){if(r!==p){var a=Object.getOwnPropertyDescriptor(e,r),i=a.value;if(a.get){if(!t)throw new Error("Immer drafts cannot have computed properties");i=a.get.call(e)}a.enumerable?n[r]=i:Object.defineProperty(n,r,{value:i,writable:!0,configurable:!0})}})),n}function O(e,t){if(g(e)&&!m(e)&&!Object.isFrozen(e)){var n=w(e);n===a.Set?e.add=e.clear=e.delete=P:n===a.Map&&(e.set=e.clear=e.delete=P),Object.freeze(e),t&&b(e,(function(e,t){return O(t,!0)}))}}function P(){throw new Error("This object has been frozen and should not be mutated")}function T(){throw new Error("Illegal state, please file a bug")}var N=function(){function e(e,t){this.drafts=[],this.parent=e,this.immer=t,this.canAutoFreeze=!0}return e.prototype.usePatches=function(e){e&&(this.patches=[],this.inversePatches=[],this.patchListener=e)},e.prototype.revoke=function(){this.leave(),this.drafts.forEach(D),this.drafts=null},e.prototype.leave=function(){this===e.current&&(e.current=this.parent)},e.enter=function(t){var n=new e(e.current,t);return e.current=n,n},e}();function D(e){var t=e[p];t.type===i.ProxyObject||t.type===i.ProxyArray?t.revoke():t.revoked=!0}function j(e,t,n){var r=n.drafts[0],a=void 0!==t&&t!==r;if(e.willFinalize(n,t,a),a){if(r[p].modified)throw n.revoke(),new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.");g(t)&&(t=R(e,t,n),n.parent||I(e,t)),n.patches&&(n.patches.push({op:"replace",path:[],value:t}),n.inversePatches.push({op:"replace",path:[],value:r[p].base}))}else t=R(e,r,n,[]);return n.revoke(),n.patches&&n.patchListener(n.patches,n.inversePatches),t!==c?t:void 0}function R(e,t,n,r){var a=t[p];if(!a)return Object.isFrozen(t)?t:M(e,t,n);if(a.scope!==n)return t;if(!a.modified)return I(e,a.base,!0),a.base;if(!a.finalized){if(a.finalized=!0,M(e,a.draft,n,r),e.onDelete&&a.type!==i.Set)if(e.useProxies){b(a.assigned,(function(t,n){n||e.onDelete(a,t)}))}else{var o=a.base,s=a.copy;b(o,(function(t){_(s,t)||e.onDelete(a,t)}))}e.onCopy&&e.onCopy(a),e.autoFreeze&&n.canAutoFreeze&&O(a.copy,!1),r&&n.patches&&function(e,t,n,r){switch(e.type){case i.ProxyObject:case i.ES5Object:case i.Map:return function(e,t,n,r){var a=e.base,i=e.copy;b(e.assigned,(function(e,o){var s=E(a,e),l=E(i,e),c=o?_(a,e)?"replace":"add":"remove";if(s!==l||"replace"!==c){var u=t.concat(e);n.push("remove"===c?{op:c,path:u}:{op:c,path:u,value:l}),r.push("add"===c?{op:"remove",path:u}:"remove"===c?{op:"add",path:u,value:s}:{op:"replace",path:u,value:s})}}))}(e,t,n,r);case i.ES5Array:case i.ProxyArray:return function(e,t,n,r){var a,i,o=e.base,s=e.assigned,l=e.copy;l||T();l.lengthu&&o[p-1]===l[p+c-1];)--p;for(var h=u;h=p;--h){d=t.concat([h]);n[f+h-p]={op:"add",path:d,value:l[h]},r.push({op:"remove",path:d})}}(e,t,n,r);case i.Set:(function(e,t,n,r){var a=e.base,i=e.copy,o=0;a.forEach((function(e){if(!i.has(e)){var a=t.concat([o]);n.push({op:"remove",path:a,value:e}),r.unshift({op:"add",path:a,value:e})}o++})),o=0,i.forEach((function(e){if(!a.has(e)){var i=t.concat([o]);n.push({op:"add",path:i,value:e}),r.unshift({op:"remove",path:i,value:e})}o++}))})(e,t,n,r)}}(a,r,n.patches,n.inversePatches)}return a.copy}function M(e,t,n,r){var o=t[p];return o&&(o.type!==i.ES5Object&&o.type!==i.ES5Array||(o.copy=k(o.draft,!0)),t=o.copy),b(t,(function(i,s){return function e(t,n,r,i,o,s,l,c){if(l===o)throw Error("Immer forbids circular references");var u=!!i&&o===r,p=x(o);if(m(l)){var h=c&&u&&!p&&!_(i.assigned,s)?c.concat(s):void 0;l=R(t,l,n,h),function(e,t,n){switch(w(e)){case a.Map:e.set(t,n);break;case a.Set:e.delete(t),e.add(n);break;default:e[t]=n}}(o,s,l),m(l)&&(n.canAutoFreeze=!1)}else{if(u&&S(l,E(i.base,s)))return;g(l)&&(b(l,(function(a,o){return e(t,n,r,i,l,a,o,c)})),n.parent||I(t,l))}u&&t.onAssign&&!p&&t.onAssign(i,s,l)}(e,n,t,o,t,i,s,r)})),t}function I(e,t,n){void 0===n&&(n=!1),e.autoFreeze&&!m(t)&&O(t,n)}var L={get:function(e,t){if(t===p)return e;var n=e.drafts;if(!e.modified&&_(n,t))return n[t];var r=C(e)[t];if(e.finalized||!g(r))return r;if(e.modified){if(r!==U(e.base,t))return r;n=e.copy}return n[t]=e.scope.immer.createProxy(r,e)},has:function(e,t){return t in C(e)},ownKeys:function(e){return Reflect.ownKeys(C(e))},set:function(e,t,n){if(!e.modified){var r=U(e.base,t);if(n?S(r,n)||n===e.drafts[t]:S(r,n)&&t in e.base)return!0;q(e),z(e)}return e.assigned[t]=!0,e.copy[t]=n,!0},deleteProperty:function(e,t){return void 0!==U(e.base,t)||t in e.base?(e.assigned[t]=!1,q(e),z(e)):e.assigned[t]&&delete e.assigned[t],e.copy&&delete e.copy[t],!0},getOwnPropertyDescriptor:function(e,t){var n=C(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&(r.writable=!0,r.configurable=e.type!==i.ProxyArray||"length"!==t),r},defineProperty:function(){throw new Error("Object.defineProperty() cannot be used on an Immer draft")},getPrototypeOf:function(e){return Object.getPrototypeOf(e.base)},setPrototypeOf:function(){throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft")}},F={};function U(e,t){var n=e[p],r=Reflect.getOwnPropertyDescriptor(n?C(n):e,t);return r&&r.value}function z(e){if(!e.modified){if(e.modified=!0,e.type===i.ProxyObject||e.type===i.ProxyArray){var t=e.copy=k(e.base);b(e.drafts,(function(e,n){t[e]=n})),e.drafts=void 0}e.parent&&z(e.parent)}}function q(e){e.copy||(e.copy=k(e.base))}function B(e,t,n){e.drafts.forEach((function(e){e[p].finalizing=!0})),n?m(t)&&t[p].scope===e&&Y(e.drafts):(e.patches&&function e(t){if(!t||"object"!=typeof t)return;var n=t[p];if(!n)return;var r=n.base,a=n.draft,o=n.assigned,s=n.type;if(s===i.ES5Object)b(a,(function(t){t!==p&&(void 0!==r[t]||_(r,t)?o[t]||e(a[t]):(o[t]=!0,H(n)))})),b(r,(function(e){void 0!==a[e]||_(a,e)||(o[e]=!1,H(n))}));else if(s===i.ES5Array){if(X(n)&&(H(n),o.length=!0),a.length=0;t--){var n=e[t][p];if(!n.modified)switch(n.type){case i.ES5Array:X(n)&&H(n);break;case i.ES5Object:Q(n)&&H(n)}}}function Q(e){for(var t=e.base,n=e.draft,r=Object.keys(n),a=r.length-1;a>=0;a--){var i=r[a],o=t[i];if(void 0===o&&!_(t,i))return!0;var s=n[i],l=s&&s[p];if(l?l.base!==o:!S(s,o))return!0}return r.length!==Object.keys(t).length}function X(e){var t=e.draft;if(t.length!==e.base.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var J=function(e){if(!e)throw new Error("Map is not polyfilled");function t(e,t){return this[p]={type:i.Map,parent:t,scope:t?t.scope:N.current,modified:!1,finalized:!1,copy:void 0,assigned:void 0,base:e,draft:this,isManual:!1,revoked:!1},this}f(t,e);var n=t.prototype;return Object.defineProperty(n,"size",{get:function(){return C(this[p]).size},enumerable:!0,configurable:!0}),n.has=function(e){return C(this[p]).has(e)},n.set=function(e,t){var n=this[p];return Z(n),C(n).get(e)!==t&&(ee(n),n.scope.immer.markChanged(n),n.assigned.set(e,!0),n.copy.set(e,t),n.assigned.set(e,!0)),this},n.delete=function(e){if(!this.has(e))return!1;var t=this[p];return Z(t),ee(t),t.scope.immer.markChanged(t),t.assigned.set(e,!1),t.copy.delete(e),!0},n.clear=function(){var e=this[p];return Z(e),ee(e),e.scope.immer.markChanged(e),e.assigned=new Map,e.copy.clear()},n.forEach=function(e,t){var n=this;C(this[p]).forEach((function(r,a,i){e.call(t,n.get(a),a,n)}))},n.get=function(e){var t=this[p];Z(t);var n=C(t).get(e);if(t.finalized||!g(n))return n;if(n!==t.base.get(e))return n;var r=t.scope.immer.createProxy(n,t);return ee(t),t.copy.set(e,r),r},n.keys=function(){return C(this[p]).keys()},n.values=function(){var e,t=this,n=this.keys();return(e={})[h]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},n.entries=function(){var e,t=this,n=this.keys();return(e={})[h]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},n[h]=function(){return this.entries()},t}(Map);function ee(e){e.copy||(e.assigned=new Map,e.copy=new Map(e.base))}var te=function(e){if(!e)throw new Error("Set is not polyfilled");function t(e,t){return this[p]={type:i.Set,parent:t,scope:t?t.scope:N.current,modified:!1,finalized:!1,copy:void 0,base:e,draft:this,drafts:new Map,revoked:!1,isManual:!1},this}f(t,e);var n=t.prototype;return Object.defineProperty(n,"size",{get:function(){return C(this[p]).size},enumerable:!0,configurable:!0}),n.has=function(e){var t=this[p];return Z(t),t.copy?!!t.copy.has(e)||!(!t.drafts.has(e)||!t.copy.has(t.drafts.get(e))):t.base.has(e)},n.add=function(e){var t=this[p];return Z(t),t.copy?t.copy.add(e):t.base.has(e)||(ne(t),t.scope.immer.markChanged(t),t.copy.add(e)),this},n.delete=function(e){if(!this.has(e))return!1;var t=this[p];return Z(t),ne(t),t.scope.immer.markChanged(t),t.copy.delete(e)||!!t.drafts.has(e)&&t.copy.delete(t.drafts.get(e))},n.clear=function(){var e=this[p];return Z(e),ne(e),e.scope.immer.markChanged(e),e.copy.clear()},n.values=function(){var e=this[p];return Z(e),ne(e),e.copy.values()},n.entries=function(){var e=this[p];return Z(e),ne(e),e.copy.entries()},n.keys=function(){return this.values()},n[h]=function(){return this.values()},n.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},t}(Set);function ne(e){e.copy||(e.copy=new Set,e.base.forEach((function(t){if(g(t)){var n=e.scope.immer.createProxy(t,e);e.drafts.set(t,n),e.copy.add(n)}else e.copy.add(t)})))}function re(e,t){return t.forEach((function(t){var n=t.path,r=t.op;n.length||T();for(var i=e,o=0;o=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}return m(e)?re(e,t):this.produce(e,(function(e){return re(e,t.slice(n+1))}))},e.prototype.createProxy=function(e,t){var n=A(e)?function(e,t){return new J(e,t)}(e,t):x(e)?function(e,t){return new te(e,t)}(e,t):this.useProxies?function(e,t){var n=Array.isArray(e),r={type:n?i.ProxyArray:i.ProxyObject,scope:t?t.scope:N.current,modified:!1,finalized:!1,assigned:{},parent:t,base:e,draft:null,drafts:{},copy:null,revoke:null,isManual:!1},a=r,o=L;n&&(a=[r],o=F);var s=Proxy.revocable(a,o),l=s.revoke,c=s.proxy;return r.draft=c,r.revoke=l,c}(e,t):V(e,t);return(t?t.scope:N.current).drafts.push(n),n},e.prototype.willFinalize=function(e,t,n){this.useProxies||B(e,t,n)},e.prototype.markChanged=function(e){this.useProxies?z(e):H(e)},e}(),le=new se,ce=le.produce,ue=le.produceWithPatches.bind(le),pe=le.setAutoFreeze.bind(le),he=le.setUseProxies.bind(le),de=le.applyPatches.bind(le),fe=le.createDraft.bind(le),me=le.finishDraft.bind(le);function ge(e){return e}function ye(e){return e}t.default=ce}.call(this,n(199))},function(e,t,n){var r=n(379),a=n(402),i=n(58),o=n(5),s=n(406);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?o(e)?a(e[0],e[1]):r(e):s(e)}},function(e,t,n){"use strict";var r;function a(e){return e===r.DesktopChrome||e===r.DesktopEdge||e===r.DesktopFirefox||e===r.DesktopSafari}Object.defineProperty(t,"__esModule",{value:!0}),t.isMobileDevice=t.isCompatibleDevice=t.isCompatibleBrowser=t.getBrowserIconName=t.getStoreUrl=t.getExtensionName=t.getDeviceType=t.DeviceType=void 0,function(e){e.Unknown="Unknown Browser",e.Ios="iOS",e.Android="Android",e.DesktopChrome="Chrome",e.DesktopFirefox="Firefox",e.DesktopSafari="Safari",e.DesktopEdge="Edge"}(r=t.DeviceType||(t.DeviceType={})),t.getDeviceType=function(e){return/(iphone|ipad|ipod)/i.test(e)?r.Ios:/(android)/i.test(e)?r.Android:/(firefox)/i.test(e)?r.DesktopFirefox:/(edg)/i.test(e)?r.DesktopEdge:/(chrome)/i.test(e)?r.DesktopChrome:/(safari)/i.test(e)?r.DesktopSafari:r.Unknown},t.getExtensionName=function(e){switch(e){case r.DesktopChrome:return"extension";case r.DesktopEdge:return"add-on";case r.DesktopSafari:return"extension";case r.DesktopFirefox:return"add-on"}},t.getStoreUrl=function(e){switch(e){case r.DesktopChrome:return"https://chrome.google.com/webstore/detail/readup/mkeiglkfdfamdjehidenkklibndmljfi";case r.DesktopEdge:return"https://microsoftedge.microsoft.com/addons/detail/readup/nnnlnihiejbbkikldbfeeefljhpplhcm";case r.DesktopFirefox:return"https://addons.mozilla.org/en-US/firefox/addon/readup/";case r.DesktopSafari:case r.Ios:return"https://apps.apple.com/us/app/readup-social-reading/id1441825432"}},t.getBrowserIconName=function(e){switch(e){case r.DesktopChrome:return"chrome";case r.DesktopEdge:return"edge";case r.DesktopFirefox:return"firefox";case r.DesktopSafari:return"safari"}},t.isCompatibleBrowser=a,t.isCompatibleDevice=function(e){return a(e)||e===r.Ios},t.isMobileDevice=function(e){return e===r.Android||e===r.Ios}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1);t.default=e=>r.createElement("ul",{className:"list_prxe9g"},e.children)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2),i=n(12);class o extends r.PureComponent{constructor(e){super(e),this._close=()=>{this.props.onClose()},this._submit=()=>{this.setState({isSubmitting:!0}),this.props.onSubmit().then(()=>{this.props.onClose?this.props.onClose():this.setState({isSubmitting:!1})}).catch(()=>{this.setState({isSubmitting:!1})})},this.state={isSubmitting:!1}}render(){return r.createElement("div",{className:a.default("form-dialog_jnqz4n",this.props.className,{small:"small"===this.props.size})},r.createElement("div",{className:"header"},this.props.title),r.createElement("div",{className:a.default("children",this.props.textAlign||"left")},this.props.children),r.createElement("div",{className:a.default("buttons",this.props.onClose&&this.props.onSubmit?"double":"single")},this.props.onClose?r.createElement(i.default,{onClick:this._close,state:this.props.buttonsDisabled||this.state.isSubmitting?"disabled":"normal",text:this.props.closeButtonText||"Close"}):null,this.props.onSubmit?r.createElement(i.default,{onClick:this._submit,state:this.state.isSubmitting?"busy":this.props.buttonsDisabled?"disabled":"normal",style:"preferred",text:this.props.submitButtonText||"Submit"}):null),this.props.footer)}}t.default=o},function(e,t,n){var r=n(181),a="object"==typeof self&&self&&self.Object===Object&&self,i=r||a||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2),i=n(234);t.default=e=>{const t=a.default("content-box_kkp9lc",e.className);return e.highlight?r.createElement(i.default,{className:t,highlight:e.highlight},e.children):r.createElement("div",{className:t,onClick:e.onClick},e.children)}},function(e,t,n){var r=n(44),a=n(5),i=n(29);e.exports=function(e){return"string"==typeof e||!a(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a{const{className:t,labelPosition:n}=e,l=r(e,["className","labelPosition"]);return a.createElement(i.default,{label:e.label,className:s.default(e.className,"input-field"),labelPosition:e.labelPosition,subtext:e.subtext},a.createElement(o.default,Object.assign({},l)))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(7),i=n(2);t.default=e=>r.createElement("div",{className:i.default("info-box_8xzdd8",e.className,{success:"success"===e.style,warning:"warning"===e.style})},r.createElement("div",{className:"box"},e.icon?r.createElement("div",{className:"icon-container"},r.createElement(a.default,{name:e.icon})):null,r.createElement("div",{className:"content"},e.children)))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Apple=0]="Apple",e[e.Twitter=1]="Twitter"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(39);class i extends r.PureComponent{constructor(){super(...arguments),this._updatePageNumber=e=>this.props.onChange(parseInt(e.currentTarget.value))}render(){return this.props.pageCount<=1?null:r.createElement("form",{autoComplete:"off",className:"page-selector_a8tbpb"},"Page",r.createElement(a.default,{disabled:this.props.disabled,onChange:this._updatePageNumber,options:Array.from(new Array(this.props.pageCount),(e,t)=>({key:t+1})),value:this.props.pageNumber}))}}t.default=i,i.defaultProps={disabled:!1}},function(e,t,n){var r=n(46);e.exports=function(e){return r(e)&&e!=+e}},function(e,t,n){var r=n(88),a=n(211),i=n(58);e.exports=function(e){return e&&e.length?r(e,i,a):void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasAnyAlerts=t.areEqual=void 0;const r=n(41);t.areEqual=function(e,t){return!(!e||!t)&&(e.id===t.id&&e.name===t.name&&e.email===t.email&&e.dateCreated===t.dateCreated&&e.role===t.role&&e.isEmailConfirmed===t.isEmailConfirmed&&e.timeZoneId===t.timeZoneId&&e.aotdAlert===t.aotdAlert&&e.replyAlertCount===t.replyAlertCount&&e.loopbackAlertCount===t.loopbackAlertCount&&e.postAlertCount===t.postAlertCount&&e.followerAlertCount===t.followerAlertCount&&e.isPasswordSet===t.isPasswordSet&&e.hasLinkedTwitterAccount===t.hasLinkedTwitterAccount&&e.dateOrientationCompleted===t.dateOrientationCompleted)},t.hasAnyAlerts=function(e,t){return!!e&&(null!=t?!!(t&r.default.Aotd&&e.aotdAlert)||(!!(t&r.default.Reply&&e.replyAlertCount)||(!!(t&r.default.Loopback&&e.loopbackAlertCount)||(!!(t&r.default.Post&&e.postAlertCount)||!!(t&r.default.Follower&&e.followerAlertCount)))):!!(e.aotdAlert||e.replyAlertCount||e.loopbackAlertCount||e.postAlertCount||e.followerAlertCount))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2);class i extends r.Component{constructor(){super(...arguments),this._handleBlur=()=>{0!==window.scrollY&&window.scrollTo(0,0)}}render(){return r.createElement("select",{className:a.default("select-list_guiajx",this.props.className),disabled:this.props.disabled,onBlur:this._handleBlur,onChange:this.props.onChange,value:this.props.value},this.props.options.map(e=>r.createElement("option",{key:e.key,value:null!=e.value?e.value:e.key},e.key)))}}t.default=i},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Aotd=1]="Aotd",e[e.Reply=2]="Reply",e[e.Loopback=4]="Loopback",e[e.Post=8]="Post",e[e.Follower=16]="Follower"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(17),i=n(27),o=n(2);class s extends r.PureComponent{constructor(e,t){super(t),this._submit=()=>(this.setState({showErrors:!0}),this.getClientErrors().some(e=>Object.keys(e).some(t=>!!e[t]))?Promise.reject():(this.setState({errorMessage:null}),this.submitForm().then(e=>{this.props.onCloseDialog(),this._successMessage&&this.props.onShowToast(this._successMessage,a.Intent.Success),this.onSuccess(e)}).catch(e=>{throw this.onError(e),new Error}))),this._className=e.className,this._title=e.title,this._submitButtonText=e.submitButtonText,this._successMessage=e.successMessage,this.state={errorMessage:null,showErrors:!1,isLoading:!1}}renderFooter(){return null}getClientErrors(){return[]}onSuccess(e){}onError(e){}render(){return r.createElement(i.default,{className:o.default("fieldset-dialog_y5ez5w",this._className),closeButtonText:"Cancel",footer:this.renderFooter(),onClose:this.props.onCloseDialog,onSubmit:this._submit,submitButtonText:this._submitButtonText,title:this._title},this.state.errorMessage?r.createElement("div",{className:"error-message",dangerouslySetInnerHTML:{__html:this.state.errorMessage.replace(/\n/g,"
")}}):null,this.renderFields())}}t.default=s},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(54),a=n(351),i=n(352),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?a(e):i(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e){const t=e.match(/(\d+)\.(\d+)\.(\d+)/);if(!t)throw new Error("Invalid version format");this._major=parseInt(t[1]),this._minor=parseInt(t[2]),this._patch=parseInt(t[3])}static greatest(...e){return e.sort((e,t)=>t.compareTo(e))[0]}canUpgradeTo(e){return e.major===this._major&&(e.minor>this._minor||e.minor===this._minor&&e.patch>this._patch)}compareTo(e){return this._major!==e._major?this._major-e._major:this._minor!==e._minor?this._minor-e._minor:this._patch!==e._patch?this._patch-e._patch:0}toString(){return`${this._major}.${this._minor}.${this._patch}`}get major(){return this._major}get minor(){return this._minor}get patch(){return this._patch}}},function(e,t,n){var r=n(44),a=n(29);e.exports=function(e){return"number"==typeof e||a(e)&&"[object Number]"==r(e)}},function(e,t,n){(function(t){for(var r=n(415),a="undefined"==typeof window?t:window,i=["moz","webkit"],o="AnimationFrame",s=a["request"+o],l=a["cancel"+o]||a["cancelRequest"+o],c=0;!s&&c{e.preventDefault();const t=this._asyncTracker.addCallback(e=>{this.setState({data:e})});let n;n=s(this.props)?this.props.onFetchData({startDate:this.state.startDate,endDate:this.state.endDate},t):this.props.onFetchData(null,t),this.setState({data:n})},this._setStartDate=e=>{this.setState({startDate:e})},this._setEndDate=e=>{this.setState({endDate:e})},s(e)?this.state={data:null,startDate:e.initialStartDate,endDate:e.initialEndDate}:this.state={data:null,startDate:"",endDate:""}}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){var e,t;const n=this.props.onGetHeaders(null===(e=this.state.data)||void 0===e?void 0:e.value),o=n[0].reduce((e,t)=>{var n;return e+(null!==(n=t.colSpan)&&void 0!==n?n:1)},0);let l,c,u;return(null===(t=this.state.data)||void 0===t?void 0:t.value)&&(this.props.onRenderChart&&(l=this.props.onRenderChart(this.state.data.value)),c=this.props.onRenderBody(this.state.data.value,o),this.props.onRenderFooter&&(u=this.props.onRenderFooter(this.state.data.value,o))),c||(c=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{colSpan:o},this.state.data?this.state.data.isLoading?"Loading...":this.state.data.errors?"Error loading data.":"No data found.":'Click "Run Report" to load data.')))),r.createElement("div",{className:"report-table_gitemz"},r.createElement("table",null,r.createElement("caption",null,r.createElement("div",{className:"content"},r.createElement("div",{className:"header"},r.createElement("label",null,this.props.title),r.createElement("form",null,s(this.props)?r.createElement(r.Fragment,null,r.createElement(a.default,{type:"text",label:"Start Date",value:this.state.startDate,onChange:this._setStartDate}),r.createElement(a.default,{type:"text",label:"End Date",value:this.state.endDate,onChange:this._setEndDate})):null,r.createElement(i.default,{onClick:this._runReport,text:"Run Report"}))),l?r.createElement("div",{className:"chart"},l):null)),r.createElement("thead",null,n.map(e=>r.createElement("tr",{key:e.map(e=>e.name).join(",")},e.map((e,t)=>{var n;return r.createElement("th",{colSpan:null!==(n=e.colSpan)&&void 0!==n?n:1,key:`${e.name}-${t}`},e.name)})))),c,u))}}t.ReportTable=l},function(e,t,n){var r=n(88),a=n(212),i=n(58);e.exports=function(e){return e&&e.length?r(e,i,a):void 0}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(43)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(28).Symbol;e.exports=r},function(e,t,n){var r=n(44),a=n(29);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n{e.animationName.startsWith("menu_qla37i-pop-out")&&this.props.onClose()},this._handleBlur=()=>{this._childElementWillReceiveFocus?this._childElementWillReceiveFocus=!1:this.props.menuState===o.Opened&&this.props.onBeginClosing()},this._handleChildrenClick=e=>{this.props.stopPropagation&&e.stopPropagation(),this.props.menuState===o.Opened?this.props.onBeginClosing():this.props.onOpen(e)},this._registerImpendingChildFocusTransition=()=>{this._childElementWillReceiveFocus=!0}}render(){return r.createElement("span",{className:a.default("popover_r7v81v",this.props.className),onAnimationEnd:this._handleAnimationEnd,onBlur:this._handleBlur,tabIndex:-1},r.createElement("span",{className:"children",onClick:this._handleChildrenClick},this.props.children),this.props.menuState!==o.Closed?r.createElement(i.default,{isClosing:this.props.menuState===o.Closing,onMouseDown:this._registerImpendingChildFocusTransition,position:this.props.menuPosition,stopPropagation:this.props.stopPropagation},this.props.menuChildren):null)}}t.default=s},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Hot=0]="Hot",e[e.Top=1]="Top",e[e.New=2]="New"}(r||(r={})),t.default=r},function(e,t,n){var r=n(132),a=n(435),i=n(200),o=n(87),s=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&o(e,t[0],t[1])?t=[]:n>2&&o(t[0],t[1],t[2])&&(t=[t[0]]),a(e,r(t,1),[])}));e.exports=s},function(e,t,n){var r=n(24),a=n(409);e.exports=function(e,t){return e&&e.length?a(e,r(t,2)):[]}},function(e,t,n){var r=n(457)();e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseNavReference=t.NavMethod=void 0;const r=n(1),a=n(38),i=n(17),o=n(21),s=n(11),l=n(103),c=n(15),u=n(13),p=n(291),h=n(292),d=n(501),f=n(502),m=n(503),g=n(504),y=n(507),v=n(20),b=n(6),w=n(2),_=n(512),E=n(514),S=n(515),A=n(90),x=n(516),C=n(45),k=n(517),O=n(518),P=n(521),T=n(522),N=n(138),D=n(524),j=n(41),R=n(224),M=n(139),I=n(140),L=n(141),F=n(525),U=n(225),z=n(532),q=n(145),B=n(146);var V;!function(e){e[e.Pop=0]="Pop",e[e.Push=1]="Push",e[e.Replace=2]="Replace",e[e.ReplaceAll=3]="ReplaceAll"}(V=t.NavMethod||(t.NavMethod={})),t.parseNavReference=function(e){var t,n,r;if("string"==typeof e){const a=c.parseUrlForRoute(e);return{isInternal:a.isInternal,screenKey:null===(t=a.route)||void 0===t?void 0:t.screenKey,screenParams:(null===(n=a.route)||void 0===n?void 0:n.getPathParams)?a.route.getPathParams(a.url.pathname):null,url:null===(r=a.url)||void 0===r?void 0:r.href}}return{isInternal:!0,screenKey:e.key,screenParams:e.params,url:null}};class W extends r.Component{constructor(e,t,n){var c,u,w;super(n),this._asyncTracker=new b.default,this._assignAuthorToArticle=e=>this.props.serverApi.assignAuthorToArticle(e),this._rateArticle=(e,t)=>this.props.serverApi.rateArticle(e.id,t).then(e=>(this.onArticleUpdated({article:e.article,isCompletionCommit:!1}),e.rating)),this._toggleArticleStar=e=>(e.dateStarred?this.props.serverApi.unstarArticle:this.props.serverApi.starArticle)(e.id).then(e=>{this.onArticleUpdated({article:e,isCompletionCommit:!1})}),this._unassignAuthorFromArticle=e=>this.props.serverApi.unassignAuthorFromArticle(e),this._assignUserAccountToAuthor=e=>this.props.serverApi.assignUserAccountToAuthor(e),this._deleteComment=e=>this.props.serverApi.deleteComment(e).then(e=>(this.onCommentUpdated(e),e)),this._postComment=e=>this.props.serverApi.postComment(e).then(e=>(this.onArticleUpdated({article:e.article,isCompletionCommit:!1}),this.onCommentPosted(e.comment),e.comment)),this._postCommentAddendum=e=>this.props.serverApi.postCommentAddendum(e).then(e=>(this.onCommentUpdated(e),e)),this._postCommentRevision=e=>this.props.serverApi.postCommentRevision(e).then(e=>(this.onCommentUpdated(e),e)),this._viewComments=(e,t)=>{const[n,r]=e.slug.split("_"),a={articleSlug:r,sourceSlug:n};null!=t&&(a.commentId=t),this.navTo({key:s.default.Comments,params:a},{method:V.Push})},this._viewRead=e=>{const[t,n]=e.slug.split("_"),r={articleSlug:n,sourceSlug:t};this.navTo({key:s.default.Read,params:r},{method:V.Push})},this._viewThread=e=>{this._viewComments({slug:e.articleSlug},e.id)},this._dialog=new D.default({setState:(e,t)=>{this.setState(e,t)}}),this._dialogCreatorMap={[l.default.ResetPassword]:(e,t)=>{const n=o.parseQueryString(e.queryString);return r.createElement(U.default,{captcha:this.props.captcha,onClose:this._dialog.closeDialog,onCreateAccount:this._createAccount,onCreateAuthServiceAccount:this._createAuthServiceAccount,onRequestPasswordReset:this.props.serverApi.requestPasswordReset,onResetPassword:this._resetPassword,onShowToast:this._toaster.addToast,onSignIn:this._signIn,onSignInWithApple:this._signInWithApple,onSignInWithTwitter:this._signInWithTwitter,user:t.user,passwordResetEmail:n.email,passwordResetToken:n.token})},[l.default.Authenticate]:(e,t)=>r.createElement(U.default,{analyticsAction:"authenticateQueryString",initialAuthenticationStep:"signIn"===o.parseQueryString(e.queryString)[o.authenticateQueryStringKey]?U.Step.SignIn:U.Step.CreateAccount,captcha:this.props.captcha,onClose:this._dialog.closeDialog,onCreateAccount:this._createAccount,onCreateAuthServiceAccount:this._createAuthServiceAccount,onRequestPasswordReset:this.props.serverApi.requestPasswordReset,onResetPassword:this._resetPassword,onShowToast:this._toaster.addToast,onSignIn:this._signIn,onSignInWithApple:this._signInWithApple,onSignInWithTwitter:this._signInWithTwitter,user:t.user})},this._openNewPlatformNotificationRequestDialog=()=>{this._dialog.openDialog(r.createElement(F.default,{onCloseDialog:this._dialog.closeDialog,onShowToast:this._toaster.addToast,onSubmitRequest:this.props.serverApi.logNewPlatformNotificationRequest}))},this._openPostDialog=e=>{this._dialog.openDialog(r.createElement(T.default,{article:e,onCloseDialog:this._dialog.closeDialog,onOpenDialog:this._dialog.openDialog,onLinkAuthServiceAccount:this._linkAuthServiceAccount,onShowToast:this._toaster.addToast,onSubmit:this._postArticle,user:this.state.user}))},this._openRequestPasswordResetDialog=e=>{this._dialog.openDialog(r.createElement(p.default,{authServiceToken:e,autoFocus:this._autoFocusInputs,captcha:this.props.captcha,onCloseDialog:this._dialog.closeDialog,onRequestPasswordReset:this.props.serverApi.requestPasswordReset,onShowToast:this._toaster.addToast}))},this._eventManager=new k.default,this._registerArticleChangeEventHandler=e=>this._eventManager.addListener("articleUpdated",e),this._registerArticlePostedEventHandler=e=>this._eventManager.addListener("articlePosted",e),this._registerArticleStarredEventHandler=e=>this._eventManager.addListener("articleStarred",e),this._registerAuthChangedEventHandler=e=>this._eventManager.addListener("authChanged",e),this._registerCommentPostedEventHandler=e=>this._eventManager.addListener("commentPosted",e),this._registerCommentUpdatedEventHandler=e=>this._eventManager.addListener("commentUpdated",e),this._registerFolloweeCountChangedEventHandler=e=>this._eventManager.addListener("followeeCountChanged",e),this._registerNotificationPreferenceChangedEventHandler=e=>this._eventManager.addListener("notificationPreferenceChanged",e),this._clearAlerts=e=>{if(!a.hasAnyAlerts(this.state.user,e))return;let t=Object.assign({},this.state.user);e&j.default.Aotd&&(t.aotdAlert=!1),e&j.default.Reply&&(t.replyAlertCount=0),e&j.default.Loopback&&(t.loopbackAlertCount=0),e&j.default.Post&&(t.postAlertCount=0),e&j.default.Follower&&(t.followerAlertCount=0),this.props.serverApi.clearAlerts({alerts:e}),this.onUserUpdated(t,L.default.Local)},this._createStaticContentUrl=e=>A.createUrl(this.props.staticServerEndpoint,e),this._followUser=e=>this.props.serverApi.followUser(e).then(()=>{this._eventManager.triggerEvent("followeeCountChanged",R.default.Increment)}),this._postArticle=e=>this.props.serverApi.postArticle(e).then(e=>(this.onArticlePosted(e),this.onArticleUpdated({article:e.article,isCompletionCommit:!1}),e.comment&&this.onCommentPosted(N.createCommentThread(e)),e)),this._unfollowUser=e=>this.props.serverApi.unfollowUser(e).then(()=>{this._eventManager.triggerEvent("followeeCountChanged",R.default.Decrement)}),this._viewProfile=(e,t)=>{this.navTo({key:s.default.Profile,params:{userName:e||this.state.user.name}},null!=t?t:{method:e?V.Push:V.ReplaceAll})},this._screenId=0,this._setScreenState=(e,t)=>{const n=this.state.screens.find(t=>t.id===e);if(n){const e=this.state.screens.slice(),r=e.indexOf(n),a=t(n);e.splice(r,1,Object.assign(Object.assign({},n),a)),this.setState({screens:e}),r===e.length-1&&("location"in a&&a.location.path!==n.location.path?this.onLocationChanged(a.location.path,a.title):"title"in a&&a.title!==n.title&&this.onTitleChanged(a.title))}},this._toaster=new E.default({asyncTracker:this._asyncTracker,setState:e=>{this.setState(e)}}),this._beginOnboardingAtCreateAccount=e=>{this._dialog.openDialog(t=>r.createElement(U.default,{analyticsAction:e,initialAuthenticationStep:U.Step.CreateAccount,captcha:this.props.captcha,onClose:this._dialog.closeDialog,onCreateAccount:this._createAccount,onCreateAuthServiceAccount:this._createAuthServiceAccount,onRequestPasswordReset:this.props.serverApi.requestPasswordReset,onResetPassword:this._resetPassword,onShowToast:this._toaster.addToast,onSignIn:this._signIn,onSignInWithApple:this._signInWithApple,onSignInWithTwitter:this._signInWithTwitter,user:t.user}))},this._beginOnboardingAtSignIn=e=>{this._dialog.openDialog(t=>r.createElement(U.default,{analyticsAction:e,initialAuthenticationStep:U.Step.SignIn,captcha:this.props.captcha,onClose:this._dialog.closeDialog,onCreateAccount:this._createAccount,onCreateAuthServiceAccount:this._createAuthServiceAccount,onRequestPasswordReset:this.props.serverApi.requestPasswordReset,onResetPassword:this._resetPassword,onShowToast:this._toaster.addToast,onSignIn:this._signIn,onSignInWithApple:this._signInWithApple,onSignInWithTwitter:this._signInWithTwitter,user:t.user}))},this._changeDisplayPreference=e=>(this.onDisplayPreferenceChanged(e,L.default.Local),this.props.serverApi.changeDisplayPreference(e)),this._changeEmailAddress=e=>this.props.serverApi.changeEmailAddress(e).then(e=>{this.onUserUpdated(e,L.default.Local)}),this._changeNotificationPreference=e=>this.props.serverApi.changeNotificationPreference(e).then(e=>(this.onNotificationPreferenceChanged(e),e)),this._changePassword=(e,t)=>this.props.serverApi.changePassword(e,t),this._changeTimeZone=e=>this.props.serverApi.changeTimeZone(e).then(e=>{this.onUserUpdated(e,L.default.Local)}),this._createAccount=e=>this.props.serverApi.createUserAccount({name:e.name,email:e.email,password:e.password,captchaResponse:e.captchaResponse,timeZoneName:v.DateTime.local().zoneName,theme:I.getClientPreferredColorScheme(),analytics:this.getSignUpAnalyticsForm(e.analyticsAction),pushDevice:this.getPushDeviceForm()}).then(e=>{this.onUserSignedIn(e,M.default.NewUser,L.default.Local)}),this._createAuthServiceAccount=e=>this.props.serverApi.createAuthServiceAccount(Object.assign(Object.assign({},e),{timeZoneName:v.DateTime.local().zoneName,theme:I.getClientPreferredColorScheme(),pushDevice:this.getPushDeviceForm()})).then(e=>{this.onUserSignedIn(e,M.default.NewUser,L.default.Local)}),this._deleteAccount=()=>{const e=this.getPushDeviceForm();return this.props.serverApi.deleteUserAccount({installationId:e&&e.installationId}).then(()=>this.onUserSignedOut())},this._getSettings=e=>this.props.serverApi.getSettings(t=>{t.value&&this.onDisplayPreferenceChanged(t.value.displayPreference,L.default.Local),e(t)}),this._resendConfirmationEmail=()=>this.props.serverApi.resendConfirmationEmail().then(()=>{this._toaster.addToast("Confirmation email sent",i.Intent.Success)}).catch(e=>{this._toaster.addToast(e.includes("ResendLimitExceeded")?"Error sending email.\nPlease try again in a few minutes.":"Error sending email.\nPlease try again later.",i.Intent.Danger)}),this._sendPasswordCreationEmail=()=>this.props.serverApi.sendPasswordCreationEmail(),this._showTrackingAnimation=e=>{this._dialog.openDialog(r.createElement(z.default,{onClose:async()=>{if(e)if(this.setState({showTrackingAnimationPrompt:!1},()=>{this._dialog.closeDialog()}),this.state.user){if(!this.state.user.dateOrientationCompleted)try{await this.props.serverApi.registerOrientationCompletion()}catch(e){}}else q.get(B.hideTrackingAnimationPromptCookieKey)||q.set(B.hideTrackingAnimationPromptCookieKey,"true",{domain:"."+this.props.webServerEndpoint.host,sameSite:"none",secure:"https"===this.props.webServerEndpoint.protocol,expires:365});else this._dialog.closeDialog()}}))},this._signIn=e=>this.props.serverApi.signIn(Object.assign(Object.assign({},e),{pushDevice:this.getPushDeviceForm()})).then(e=>this.onUserSignedIn(e,M.default.ExistingUser,L.default.Local)),this._signOut=()=>{const e=this.getPushDeviceForm();return this.props.serverApi.signOut({installationId:e&&e.installationId}).then(()=>this.onUserSignedOut())},this._submitAuthorEmailVerificationRequest=e=>this.props.serverApi.submitAuthorEmailVerificationRequest(e),this._updateEmailSubscriptions=(e,t)=>this.props.serverApi.updateEmailSubscriptions(e,t).then(()=>{this.state.user&&this.onNotificationPreferenceChanged(t)}),this._reloadWindow=()=>{this.reloadWindow()},this._autoFocusInputs=t,this._concreteClassName=e,this.state={displayTheme:null===(u=null===(c=n.initialUserProfile)||void 0===c?void 0:c.displayPreference)||void 0===u?void 0:u.theme,showTrackingAnimationPrompt:n.initialShowTrackingAnimationPrompt,toasts:[],user:null===(w=n.initialUserProfile)||void 0===w?void 0:w.userAccount},this._clipboard=new x.default((e,t)=>{this._toaster.addToast(e,t)}),this._navTo=this.navTo.bind(this),this._readArticle=this.readArticle.bind(this),this._createAbsoluteUrl=e=>`${n.webServerEndpoint.protocol}://${n.webServerEndpoint.host}${e}`,this._screenFactoryMap={[s.default.Admin]:h.default(s.default.Admin,{onAssignAuthorToArticle:this._assignAuthorToArticle,onAssignUserAccountToAuthor:this._assignUserAccountToAuthor,onGetAuthorMetadataAssignmentQueue:this.props.serverApi.getAuthorMetadataAssignmentQueue,onCloseDialog:this._dialog.closeDialog,onGetArticleIssueReports:this.props.serverApi.getArticleIssueReportAnalytics,onGetBulkMailings:this.props.serverApi.getBulkMailings,onGetConversions:this.props.serverApi.getConversionAnalytics,onGetDailyTotals:this.props.serverApi.getDailyTotalAnalytics,onGetPayoutReport:this.props.serverApi.getPayoutReport,onGetRevenueReport:this.props.serverApi.getAdminSubscriptionRevenueReport,onGetSignups:this.props.serverApi.getSignupAnalytics,onGetUserStats:this.props.serverApi.getUserAccountStats,onGetWeeklyUserActivityReport:this.props.serverApi.getWeeklyUserActivityReport,onNavTo:this._navTo,onOpenDialog:this._dialog.openDialog,onSendBulkMailing:this.props.serverApi.sendBulkMailing,onSendTestBulkMailing:this.props.serverApi.sendTestBulkMailing,onShowToast:this._toaster.addToast,onUnassignAuthorFromArticle:this._unassignAuthorFromArticle}),[s.default.EmailConfirmation]:f.createScreenFactory(s.default.EmailConfirmation),[s.default.EmailSubscriptions]:g.createScreenFactory(s.default.EmailSubscriptions,{onGetEmailSubscriptions:this.props.serverApi.getEmailSubscriptions,onUpdateEmailSubscriptions:this._updateEmailSubscriptions}),[s.default.ExtensionRemoval]:P.default(s.default.ExtensionRemoval,{onLogExtensionRemovalFeedback:this.props.serverApi.logExtensionRemovalFeedback}),[s.default.Password]:m.createScreenFactory(s.default.Password),[s.default.PrivacyPolicy]:d.createScreenFactory(s.default.PrivacyPolicy,{onNavTo:this._navTo}),[s.default.Stats]:O.createScreenFactory(s.default.Stats,{onGetReadingTimeStats:this.props.serverApi.getReadingTimeStats,onRegisterArticleChangeHandler:this._registerArticleChangeEventHandler}),[s.default.About]:y.createScreenFactory(s.default.About,{onCreateStaticContentUrl:this._createStaticContentUrl,onGetPublisherArticles:this.props.serverApi.getPublisherArticles,onNavTo:this._navTo})}}checkProfileForUnsetValues(e){null==e.userAccount.timeZoneId&&this._changeTimeZone({name:v.DateTime.local().zoneName}),null==e.displayPreference&&this._changeDisplayPreference(I.getClientDefaultDisplayPreference())}setThemeAttribute(e){document.documentElement.dataset.com_readup_theme=null!=e?e===I.DisplayTheme.Dark?"dark":"light":"",window.dispatchEvent(new CustomEvent("com.readup.themechange",{detail:e}))}setUserAuthChangedState(e,t){var n;return this.setThemeAttribute(null===(n=null==e?void 0:e.displayPreference)||void 0===n?void 0:n.theme),new Promise(n=>{this.setState(Object.assign(Object.assign({},t),{displayTheme:null==e?void 0:e.displayPreference.theme,showTrackingAnimationPrompt:e?!e.userAccount.dateOrientationCompleted:!q.get(B.hideTrackingAnimationPromptCookieKey),user:null==e?void 0:e.userAccount}),()=>{this._eventManager.triggerEvent("authChanged",null==e?void 0:e.userAccount),n()})})}fetchUpdateStatus(){const e=Date.now(),t=localStorage.getItem("lastUpdateCheck");return!t||e-parseInt(t)>=36e5?(localStorage.setItem("lastUpdateCheck",e.toString()),fetch("/version").then(e=>{if(e.ok)return e.text().then(e=>{const t=new C.default(e);return this.props.version.compareTo(t)<0?{isAvailable:!0,version:t}:{isAvailable:!1}});throw new Error}).catch(()=>(localStorage.setItem("lastUpdateCheck",t||"0"),{isAvailable:!1}))):Promise.resolve({isAvailable:!1})}createScreen(e,t,n){const[r,a]=c.findRouteByKey(u.default,e).createUrl(t).split("?"),i=this._screenFactoryMap[e].create(this._screenId++,{path:r,queryString:a},this.getSharedState());return n&&(i.isReplacement=n.isReplacement),i}getLocationDependentState(e){const t=c.findRouteByLocation(u.default,e,o.unroutableQueryStringKeys),n=this.getSharedState();return{dialog:null!=t.dialogKey?this._dialogCreatorMap[t.dialogKey](e,n):null,screen:this._screenFactoryMap[t.screenKey].create(this._screenId++,e,n)}}onArticleUpdated(e){this._eventManager.triggerEvent("articleUpdated",e)}onArticlePosted(e){this._eventManager.triggerEvent("articlePosted",e)}onCommentPosted(e){this._eventManager.triggerEvent("commentPosted",e)}onCommentUpdated(e){this._eventManager.triggerEvent("commentUpdated",e)}onDisplayPreferenceChanged(e,t){this.setThemeAttribute(e.theme),this.setState({displayTheme:e.theme})}onLocationChanged(e,t){}onNotificationPreferenceChanged(e){this._eventManager.triggerEvent("notificationPreferenceChanged",e)}onTitleChanged(e){}onUserSignedIn(e,t,n,r){return t===M.default.ExistingUser&&n===L.default.Local&&this.checkProfileForUnsetValues(e),this.setUserAuthChangedState(e,r)}onUserSignedOut(e){return this.setUserAuthChangedState(null,e)}onUserUpdated(e,t,n){this.setState(Object.assign(Object.assign({},n),{user:e}))}componentDidMount(){this.props.initialUserProfile&&this.checkProfileForUnsetValues(this.props.initialUserProfile)}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){return r.createElement("div",{className:w.default("root_9rc2fv",this._concreteClassName)},r.createElement(_.default,{onNavTo:this._navTo,onReloadWindow:this._reloadWindow},this.renderBody(),r.createElement(S.default,{onSetRef:this._clipboard.setTextInputRef})))}}t.default=W},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(55);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){var r=n(216),a=n(134);e.exports=function(e,t,n,i){var o=!n;n||(n={});for(var s=-1,l=t.length;++se.state===s.Saving?r.createElement(a.default,{className:"save-indicator_5lgdsz"}):r.createElement(i.default,{className:o.default("save-indicator_5lgdsz",{none:e.state===s.None,saved:e.state===s.Saved}),name:"checkmark"})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(8);t.default=e=>r.createElement("div",{className:"update-banner_7zu7hd"},r.createElement(a.default,{onClick:e.onClick,state:e.isBusy?"busy":"normal",text:e.text}))},function(e,t,n){var r=n(44),a=n(133),i=n(29),o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=a(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2);class i extends r.PureComponent{constructor(e){super(e),this._handleAnimationEnd=e=>{"alert-badge_ejzklr-scale-down"===e.animationName&&this.setState({visibility:"hidden"})},this.state={visibility:e.count?"visible":"hidden"}}componentDidUpdate(e){this.props.count&&!e.count?this.setState({visibility:"visible"}):!this.props.count&&e.count&&this.setState({visibility:"hiding"})}render(){return r.createElement("span",{className:a.default("alert-badge_ejzklr",this.state.visibility),onAnimationEnd:this._handleAnimationEnd},this.props.count)}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(7),i=n(2);t.default=e=>r.createElement(a.default,{badge:!1,className:i.default("spinner-icon_6s5uk2",e.className),name:"spinner"})},function(e,t,n){var r=n(52);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(79),a=n(67);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&nt.protocol===e.protocol)[0];t&&t.port===e.port||(o+=":"+e.port)}return e.path&&(o+=i(e.path)),t&&(o+=i(t)),n&&(o+=r.createQueryString(n)),o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(27);t.default=e=>r.createElement(a.default,{className:"markdown-dialog_1fmodc",closeButtonText:"Ok",onClose:e.onClose,title:"Formatting Guide"},r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,r.createElement("th",null,"Text entered as..."),r.createElement("th",null,"Will display as..."))),r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",null,"*italics*"),r.createElement("td",null,r.createElement("em",null,"italics"))),r.createElement("tr",null,r.createElement("td",null,"**bold**"),r.createElement("td",null,r.createElement("strong",null,"bold"))),r.createElement("tr",null,r.createElement("td",null,"[link](https://link.com)"),r.createElement("td",null,r.createElement("span",{className:"link"},"link"))),r.createElement("tr",null,r.createElement("td",null,"> Quoted text"),r.createElement("td",null,r.createElement("blockquote",null,"Quoted text"))),r.createElement("tr",null,r.createElement("td",null,"- List Item 1",r.createElement("br",null),"- List Item 2"),r.createElement("td",null,r.createElement("ul",null,r.createElement("li",null,"List Item 1"),r.createElement("li",null,"List Item 2")))))))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(8),i=n(2),o=n(15),s=n(13),l=n(11),c=o.findRouteByKey(s.default,l.default.Profile);class u extends r.Component{constructor(){super(...arguments),this._viewProfile=()=>{this.props.onViewProfile(this.props.userName)}}render(){return r.createElement(a.default,{className:i.default("profile-link_7fs028",this.props.className),href:this.props.onCreateAbsoluteUrl(c.createUrl({userName:this.props.userName})),onClick:this._viewProfile,text:this.props.userName})}}t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2);t.default=e=>r.createElement("div",{className:a.default("panel_zd0n2d",e.className),"data-nosnippet":e.noGoogleSnippet?"":null},r.createElement("div",{className:"content"},e.children))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2),i=e=>r.createElement("span",{className:a("sticky-note_zcw6jg",{"type--straight":"straight"===e.type},e.className)},e.children);i.defaultProps={type:"inclined"},t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2),i=n(73);class o extends r.Component{constructor(){super(...arguments),this._change=e=>{this.props.onChange(e.currentTarget.value)}}render(){return r.createElement("div",{className:a.default("header-selector_9li9z5",this.props.style)},this.props.items.map(e=>r.createElement("button",{className:a.default({selected:this.props.value===e.value}),disabled:this.props.disabled,key:e.value,onClick:this._change,value:e.value},e.value,r.createElement(i.default,{count:e.badge}))))}}t.default=o,o.defaultProps={style:"auto"}},function(e,t,n){"use strict";var r=s(n(427)),a=s(n(432)),i=s(n(208)),o=s(n(205));function s(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:o.default,TransitionGroup:i.default,ReplaceTransition:a.default,CSSTransition:r.default}},function(e,t,n){var r=n(88),a=n(211),i=n(24);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),a):void 0}},function(e,t,n){var r=n(460),a=n(461),i=n(24),o=n(5),s=n(87);e.exports=function(e,t,n){var l=o(e)?r:a;return n&&s(e,t,n)&&(t=void 0),l(e,i(t,3))}},function(e,t,n){var r=n(56),a=n(465),i=n(487),o=n(79),s=n(69),l=n(490),c=n(491),u=n(218),p=c((function(e,t){var n={};if(null==e)return n;var c=!1;t=r(t,(function(t){return t=o(t,e),c||(c=t.length>1),t})),s(e,u(e),n),c&&(n=a(n,7,l));for(var p=t.length;p--;)i(n,t[p]);return n}));e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encode=t.decodeStrict=t.decode=void 0;var r=n(240),a=n(243);t.decode=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?a.encodeXML:a.encodeHTML)(e)};var i=n(243);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return i.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return i.encodeHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return i.escape}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return i.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return i.encodeHTML}});var o=n(240);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return o.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return o.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return o.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return o.decodeXML}})},function(e,t,n){var r,a=n(446),i=n(447),o=n(449),s=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g;e.exports=function(e,t){function n(e,i,l){if(r++>100)throw r=0,new Error("Call stack overflow for "+l);if(""===e)throw new Error(i+"(): '"+l+"' must contain a non-whitespace string");var c=function(e){var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,a=r.exec(e);for(;a;)a&&a[1]&&(-1===n.indexOf(a[1].toLowerCase())&&(t.push(a[1]),n.push(a[1].toLowerCase())),a=r.exec(e));return t}(e=function(e,t){e=e.replace(/((?:\-[a-z]+\-)?calc)/g,"");var r,i="",o=e;for(;r=s.exec(o);){r[0].index>0&&(i+=o.substring(0,r[0].index));var l=a("(",")",o.substring([0].index));if(""===l.body)throw new Error("'"+e+"' must contain a non-whitespace string");var c=n(l.body,"",t);i+=l.pre+c,o=l.post}return i+o}(e,l));if(c.length>1||e.indexOf("var(")>-1)return i+"("+e+")";var u=c[0]||"";"%"===u&&(e=e.replace(/\b[0-9\.]+%/g,(function(e){return.01*parseFloat(e.slice(0,-1))})));var p,h=e.replace(new RegExp(u,"gi"),"");try{p=o.eval(h)}catch(t){return i+"("+e+")"}return"%"===u&&(p*=100),(i.length||"%"===u)&&(p=Math.round(p*t)/t),p+=u}return r=0,t=Math.pow(10,void 0===t?5:t),e=e.replace(/\n+/g," "),i(e,/((?:\-[a-z]+\-)?calc)\(/,n)}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(285)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Authenticate=0]="Authenticate",e[e.CreateAuthServiceAccount=1]="CreateAuthServiceAccount",e[e.ExtensionInstalled=2]="ExtensionInstalled",e[e.ResetPassword=3]="ResetPassword"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateEstimatedReadTime=void 0,t.calculateEstimatedReadTime=function(e){return Math.max(1,Math.floor(e/184))}},function(e,t,n){var r=n(75),a=n(168),i=n(106),o=Object.defineProperty;t.f=n(53)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),a)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(52);e.exports=function(e,t){if(!r(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!r(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(326),a=n(111);e.exports=function(e){return r(a(e))}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(9),a=n(111),i=n(43),o=n(114),s="["+o+"]",l=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),u=function(e,t,n){var a={},s=i((function(){return!!o[e]()||"​…"!="​…"[e]()})),l=a[e]=s?t(p):o[e];n&&(a[n]=l),r(r.P+r.F*s,"String",a)},p=u.trim=function(e,t){return e=String(a(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(c,"")),e};e.exports=u},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){var r=n(5),a=n(55),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||(o.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(356),a=n(372),i=n(374),o=n(375),s=n(376);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){(function(e){var r=n(181),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,o=i&&i.exports===a&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=s}).call(this,n(127)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(123),a=n(434);e.exports=function e(t,n,i,o,s){var l=-1,c=t.length;for(i||(i=a),s||(s=[]);++l0&&i(u)?n>1?e(u,n-1,i,o,s):r(s,u):o||(s[s.length]=u)}return s}},function(e,t,n){var r=n(192)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(203);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(190),a=n(469),i=n(49);e.exports=function(e){return i(e)?r(e,!0):a(e)}},function(e,t,n){var r=n(185);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2);t.default=e=>r.createElement("div",{className:a.default("home-panel_w65z7c",e.className),id:null!=e.id?e.id:null,"data-nosnippet":e.noGoogleSnippet?"":null},r.createElement("div",{className:"content"},e.children))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCommentThread=void 0,t.createCommentThread=function(e){return{id:e.comment&&e.comment.id||"",dateCreated:e.date,text:e.comment&&e.comment.text||"",addenda:e.comment&&e.comment.addenda||[],articleId:e.article.id,articleTitle:e.article.title,articleSlug:e.article.slug,userAccount:e.userName,badge:e.badge,isAuthor:!1,parentCommentId:null,dateDeleted:e.dateDeleted,children:[]}}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.NewUser=1]="NewUser",e[e.ExistingUser=2]="ExistingUser"}(r||(r={})),t.default=r},function(e,t,n){"use strict";var r;function a(){return window.matchMedia("(prefers-color-scheme: dark)").matches?r.Dark:r.Light}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisplayPreferenceChangeMessage=t.getClientDefaultDisplayPreference=t.getClientPreferredColorScheme=t.areEqual=t.DisplayTheme=void 0,function(e){e[e.Light=1]="Light",e[e.Dark=2]="Dark"}(r=t.DisplayTheme||(t.DisplayTheme={})),t.areEqual=function(e,t){return e.hideLinks===t.hideLinks&&e.textSize===t.textSize&&e.theme===t.theme},t.getClientPreferredColorScheme=a,t.getClientDefaultDisplayPreference=function(){return{hideLinks:!0,textSize:1,theme:a()}},t.getDisplayPreferenceChangeMessage=function(e,t){let n;return t.hideLinks!==e.hideLinks?n="Links "+(t.hideLinks?"Disabled":"Enabled"):t.textSize!==e.textSize?n="Text Size "+(t.textSize>e.textSize?"Increased":"Decreased"):t.theme!==e.theme&&(n=(t.theme===r.Dark?"Dark":"Light")+" Theme Enabled"),n}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Local=0]="Local",e[e.Remote=1]="Remote"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(32);t.default=e=>r.createElement(a.default,{autoFocus:e.autoFocus,error:e.error,label:"Email",labelPosition:e.labelPosition,maxLength:256,onChange:e.onChange,onEnterKeyPressed:e.onEnterKeyPressed,required:!0,showError:e.showError,type:"email",value:e.value})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(6),i=n(34),o=n(74),s=n(2);class l extends r.PureComponent{constructor(e){super(e),this._asyncTracker=new a.default,this._submit=()=>{this.setState(e=>{if(e.isSubmitting)return null;const t=this.props.onClick(this.props.provider);return t?(this._asyncTracker.addPromise(t).then(this._stopSubmitting).catch(e=>{var t;(null===(t=e)||void 0===t?void 0:t.isCancelled)||this._stopSubmitting()}),{isSubmitting:!0}):null})},this._stopSubmitting=()=>{this.setState({isSubmitting:!1})},this.state={isSubmitting:!1}}getContent(){var e,t;let n;switch(this.props.provider){case i.default.Apple:n=r.createElement("span",{className:"content"}," ",null!==(e=this.props.text)&&void 0!==e?e:"Sign in with Apple");break;case i.default.Twitter:n=r.createElement("span",{className:"content"},r.createElement("span",{className:"icon"})," ",null!==(t=this.props.text)&&void 0!==t?t:"Sign in with Twitter")}return n}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){let e;switch(this.props.provider){case i.default.Apple:e="apple";break;case i.default.Twitter:e="twitter"}return r.createElement("div",{className:s("auth-service-button_bj12nx",e),onClick:this._submit},this.state.isSubmitting?r.createElement(o.default,null):this.getContent())}}t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(7);class i extends r.Component{render(){return r.createElement("div",{className:"dialog_1wfm87"},r.createElement("div",{className:"titlebar"},r.createElement("div",{className:"icon-right"},this.props.onClose?r.createElement(a.default,{display:"block",name:"cancel",onClick:this.props.onClose}):null)),r.createElement("div",{className:"content"},this.props.title?r.createElement("h1",null,this.props.title):null,r.createElement("div",null,this.props.children)))}}t.default=i},function(e,t,n){var r,a; /*! * JavaScript Cookie v2.2.1 * https://github.com/js-cookie/js-cookie * * Copyright 2006, 2015 Klaus Hartl & Fagner Brack * Released under the MIT license */!function(i){if(void 0===(a="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=a),!0,e.exports=i(),!!0){var o=window.Cookies,s=window.Cookies=i();s.noConflict=function(){return window.Cookies=o,s}}}((function(){function e(){for(var e=0,t={};e{this.setState({menuState:s.MenuState.Closing})},this._copyLink=()=>{this.props.onShareViaChannel({channel:i.default.Clipboard,text:this.props.onGetData().url}),this.completeWithActivityType("Copy")},this._closeMenu=()=>{this.setState({data:null,menuState:s.MenuState.Closed,shareChannels:[]}),this._shareResponseCompletionHandler=null},this._openMenu=e=>{const t=this.props.onGetData(),n=e.currentTarget.getBoundingClientRect(),r=this.props.onShare(Object.assign(Object.assign({},t),{selection:{x:n.x,y:n.y,width:n.width,height:n.height}}));r.channels.length&&(this.setState({data:t,menuState:s.MenuState.Opened,shareChannels:r.channels}),r.completionHandler&&(this._shareResponseCompletionHandler=r.completionHandler))},this._openEmailComposer=()=>{this.props.onShareViaChannel({channel:i.default.Email,body:this.state.data.email.body,subject:this.state.data.email.subject}),this.completeWithActivityType("Email")},this._openTweetComposer=()=>{this.props.onShareViaChannel({channel:i.default.Twitter,text:o.truncateText(this.state.data.text,255),url:this.state.data.url,hashtags:["ReadOnReadup"],via:"ReadupDotCom"}),this.completeWithActivityType("Twitter")},this.state={data:null,menuState:s.MenuState.Closed,shareChannels:[]}}completeWithActivityType(e){if(this._beginClosingMenu(),this.props.onComplete||this._shareResponseCompletionHandler){const t={id:null,action:this.state.data.action,activityType:e,completed:null,error:null};this.props.onComplete&&this.props.onComplete(t),this._shareResponseCompletionHandler&&this._shareResponseCompletionHandler(t)}}render(){return r.createElement(s.default,{className:"share-control_mnbspk",menuChildren:r.createElement(r.Fragment,null,this.state.shareChannels.includes(i.default.Clipboard)?r.createElement("button",{className:"button",onClick:this._copyLink},r.createElement(a.default,{name:"link"}),r.createElement("label",null,"Copy Link")):null,this.state.shareChannels.includes(i.default.Email)?r.createElement("button",{className:"button",onClick:this._openEmailComposer},r.createElement(a.default,{name:"paper-plane"}),r.createElement("label",null,"Email")):null,this.state.shareChannels.includes(i.default.Twitter)?r.createElement("button",{className:"button",onClick:this._openTweetComposer},r.createElement(a.default,{name:"twitter"}),r.createElement("label",null,"Tweet")):null),menuPosition:this.props.menuPosition,menuState:this.state.menuState,onBeginClosing:this._beginClosingMenu,onClose:this._closeMenu,onOpen:this._openMenu,stopPropagation:this.props.stopPropagation},this.props.children)}}t.default=c},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Clipboard=0]="Clipboard",e[e.Email=1]="Email",e[e.Twitter=2]="Twitter"}(r||(r={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.None=0]="None",e[e.LongestRead=1]="LongestRead",e[e.ReadCount=2]="ReadCount",e[e.Scout=4]="Scout",e[e.Scribe=8]="Scribe",e[e.Streak=16]="Streak",e[e.WeeklyReadCount=32]="WeeklyReadCount"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2);t.default=e=>r.createElement("div",{className:a("centering-container_e32hih",e.className)},e.children)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.isAppleAppPlatform=t.AppPlatform=void 0,function(e){e.Android="Android",e.Ios="iOS",e.Linux="Linux",e.MacOs="macOS",e.Windows="Windows"}(r=t.AppPlatform||(t.AppPlatform={})),t.isAppleAppPlatform=function(e){return e===r.Ios||e===r.MacOs}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getStoreUrl=t.isIosDevice=t.isAndroidDevice=void 0;const r="https://apps.apple.com/us/app/readup-social-reading/id1441825432";function a(){return/(android)/i.test(navigator.userAgent)}function i(){return/(iphone|ipad|ipod)/i.test(navigator.userAgent)||/^mac/i.test(navigator.platform)&&navigator.maxTouchPoints>0}t.isAndroidDevice=a,t.isIosDevice=i,t.getStoreUrl=function(){const e=navigator.userAgent;return i()?r:a()?null:/(firefox)/i.test(e)?"https://addons.mozilla.org/en-US/firefox/addon/readup/":/(edg)/i.test(e)?"https://microsoftedge.microsoft.com/addons/detail/readup/nnnlnihiejbbkikldbfeeefljhpplhcm":/(chrome)/i.test(e)?"https://chrome.google.com/webstore/detail/readup/mkeiglkfdfamdjehidenkklibndmljfi":/(safari)/i.test(e)?r:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(138),i=n(22),o=n(237),s=n(30),l=n(238),c=n(2),u=n(244);class p extends u.default{render(){const e=this._getCommentThread();return r.createElement("div",{className:"post-details_8qx033"},this._hasComment()?r.createElement(l.default,{article:this.props.post.article,userName:e.userAccount,leaderboardBadge:e.badge,isAuthor:e.isAuthor,isReply:this.props.isReply,isComment:!0,date:e.dateCreated,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onGetShareData:this._getShareData,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onViewProfile:this.props.onViewProfile,verbose:!0}):r.createElement(l.default,{article:this.props.post.article,userName:this.props.post.userName,leaderboardBadge:this.props.post.badge,isComment:!1,date:this.props.post.date,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onViewProfile:this.props.onViewProfile,verbose:!0}),r.createElement(s.default,{className:c.default("content",{alert:this.props.post.hasAlert}),highlight:this.props.post.silentPostId&&this.props.post.silentPostId===this.props.highlightedPostId||this.props.post.comment&&this.props.post.comment.id===this.props.highlightedCommentId},r.createElement(i.default,{article:this.props.post.article,deviceType:this.props.deviceType,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onPost:this.props.onPost,onRateArticle:this.props.onRateArticle,onRead:this.props.onRead,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleStar:this.props.onToggleStar,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,showAotdMetadata:!1,showMetaActions:!1,user:this.props.user}),this._hasComment()?r.createElement(o.default,{comment:a.createCommentThread(this.props.post),onCloseDialog:this.props.onCloseDialog,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onOpenDialog:this.props.onOpenDialog,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onViewProfile:this.props.onViewProfile,onViewThread:this.props.onViewThread,user:this.props.user,showPostHeader:!1}):null))}}t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.listeners=[]}getListener(e,t){return this.listeners.filter(n=>n.type===e&&n.delegate===t)[0]}emitEvent(e,t){this.listeners.filter(t=>t.type===e).forEach(e=>e.delegate(t))}addListener(e,t){return void 0===this.getListener(e,t)&&this.listeners.push({type:e,delegate:t}),this}removeListener(e,t){const n=this.getListener(e,t);return void 0!==n&&this.listeners.splice(this.listeners.indexOf(n),1),this}}},function(e,t,n){var r=n(18),a=n(439),i=n(210),o=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,u,p,h,d,f=0,m=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=l,r=c;return l=c=void 0,f=t,p=e.apply(r,n)}function b(e){return f=e,h=setTimeout(_,t),m?v(e):p}function w(e){var n=e-d;return void 0===d||n>=t||n<0||g&&e-f>=u}function _(){var e=a();if(w(e))return E(e);h=setTimeout(_,function(e){var n=t-(e-d);return g?s(n,u-(e-f)):n}(e))}function E(e){return h=void 0,y&&l?v(e):(l=c=void 0,p)}function S(){var e=a(),n=w(e);if(l=arguments,c=this,d=e,n){if(void 0===h)return b(d);if(g)return clearTimeout(h),h=setTimeout(_,t),v(d)}return void 0===h&&(h=setTimeout(_,t)),p}return t=i(t)||0,r(n)&&(m=!!n.leading,u=(g="maxWait"in n)?o(i(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),S.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=d=c=h=void 0},S.flush=function(){return void 0===h?p:E(a())},S}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getTickValues",{enumerable:!0,get:function(){return r.getTickValues}}),Object.defineProperty(t,"getNiceTickValues",{enumerable:!0,get:function(){return r.getNiceTickValues}}),Object.defineProperty(t,"getTickValuesFixedDomain",{enumerable:!0,get:function(){return r.getTickValuesFixedDomain}});var r=n(455)},function(e,t,n){var r=n(134),a=n(204),i=n(24);e.exports=function(e,t){var n={};return t=i(t,3),a(e,(function(e,a,i){r(n,a,t(e,a,i))})),n}},,,,function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=o(e),c=1;cr.createElement("div",{className:a.default("form-field_uv9cq4",e.className),"data-label-position":e.labelPosition},r.createElement("div",{className:a.default("control",e.labelPosition)},r.createElement("label",null,e.label),r.createElement("div",{className:"field-container"},e.children)),e.subtext?r.createElement("div",{className:"subtext"},e.subtext):null);i.defaultProps={labelPosition:"auto"},t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=/.+@.+/,i=/^[A-Za-z0-9\-_]+$/;class o extends r.PureComponent{constructor(e){super(e),this._handleFocus=()=>{window.reallyreadit&&window.reallyreadit.app&&(window.reallyreadit.app.isFocusedOnField=!0)},this._handleBlur=()=>{this.setState({isEditing:!1}),window.reallyreadit&&window.reallyreadit.app&&(window.reallyreadit.app.isFocusedOnField=!1,window.setTimeout(()=>{window.reallyreadit.app.isFocusedOnField||0===window.scrollY||window.scrollTo(0,0)},100))},this._handleChange=e=>{this.setState({isEditing:!0}),this.props.onChange(e.currentTarget.value,this._validate(e.currentTarget.value))},this._handleKeyPress=e=>{13===e.which&&this.props.onEnterKeyPressed&&(this.setState({isEditing:!1}),this.props.onEnterKeyPressed())},this.state={isEditing:!1}}_validate(e){if(!1===this.props.validate)return null;if(this.props.required&&""===e)return this.props.label+" is required.";if("number"==typeof this.props.minLength&&e.length1?"s":""} required`;if("number"==typeof this.props.maxLength&&e.length>this.props.maxLength)return`No more than ${this.props.maxLength} character${this.props.maxLength>1?"s":""} allowed`;switch(this.props.type){case"email":if(!a.test(e))return`Invalid ${this.props.label}.`;break;case"username":if(!i.test(e))return"Only letters/numbers/-_ allowed."}return null}componentDidMount(){this.props.onChange(this.props.value,this._validate(this.props.value))}componentDidUpdate(e){this.props.validate!==e.validate&&this.props.onChange(this.props.value,this._validate(this.props.value))}render(){const e=!this.state.isEditing&&this.props.showError&&!!this.props.error,t={autoCapitalize:this.props.autoCapitalize,autoFocus:this.props.autoFocus,value:this.props.value,onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this._handleBlur};return r.createElement("div",{className:"input-control_k7j7i9"},"multiline"===this.props.type?r.createElement("textarea",Object.assign({},t)):r.createElement("input",Object.assign({},Object.assign(Object.assign({},t),{type:this.props.type,onKeyPress:this._handleKeyPress}))),e?r.createElement("div",{className:"error"},this.props.error):null)}}t.default=o,o.defaultProps={value:"",validate:!0,showError:!1,onChange:()=>{},autoFocus:!1,required:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BulkEmailSubscriptionStatusFilter=void 0,function(e){e[e.CurrentlySubscribed=1]="CurrentlySubscribed",e[e.NotCurrentlySubscribed=2]="NotCurrentlySubscribed",e[e.NeverSubscribed=3]="NeverSubscribed"}(t.BulkEmailSubscriptionStatusFilter||(t.BulkEmailSubscriptionStatusFilter={}))},function(e,t,n){var r=n(105),a=n(170);e.exports=n(53)?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=!n(53)&&!n(43)((function(){return 7!=Object.defineProperty(n(169)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(52),a=n(40).document,i=r(a)&&r(a.createElement);e.exports=function(e){return i?a.createElement(e):{}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(40),a=n(167),i=n(76),o=n(172)("src"),s=n(301),l=(""+s).split("toString");n(65).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(i(n,"name")||a(n,"name",t)),e[t]!==n&&(c&&(i(n,o)||a(n,o,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(65),a=n(40),i=a["__core-js_shared__"]||(a["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(302)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(303);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){var r=n(325),a=n(170),i=n(110),o=n(106),s=n(76),l=n(168),c=Object.getOwnPropertyDescriptor;t.f=n(53)?c:function(e,t){if(e=i(e),t=o(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(76),a=n(110),i=n(328)(!1),o=n(178)("IE_PROTO");e.exports=function(e,t){var n,s=a(e),l=0,c=[];for(n in s)n!=o&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var r=n(173)("keys"),a=n(172);e.exports=function(e){return r[e]||(r[e]=a(e))}},function(e,t,n){var r=n(109);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(52),a=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&a(e)===e}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(66))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(120),a=n(184),i=n(121);e.exports=function(e,t,n,o,s,l){var c=1&n,u=e.length,p=t.length;if(u!=p&&!(c&&p>u))return!1;var h=l.get(e),d=l.get(t);if(h&&d)return h==t&&d==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f-1}},function(e,t){e.exports=function(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i1)for(var n=1;n=0||(a[n]=e[n]);return a}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var i=a.default.Children.only(n);return a.default.cloneElement(i,r)},r}(a.default.Component);function c(){}l.contextTypes={transitionGroup:r.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:c,onEntering:c,onEntered:c,onExit:c,onExiting:c,onExited:c},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var u=(0,o.polyfill)(l);t.default=u},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function a(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==o?"\n "+o:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=a),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return o})),r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(0))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(0)),a=s(n(1)),i=n(206),o=n(433);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,["component","childFactory"]),i=u(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i:a.default.createElement(t,r,i)},r}(a.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var h=(0,i.polyfill)(p);t.default=h,e.exports=t.default},function(e,t,n){var r=n(86),a=n(49);e.exports=function(e,t){var n=-1,i=a(e)?Array(e.length):[];return r(e,(function(e,r,a){i[++n]=t(e,r,a)})),i}},function(e,t,n){var r=n(440),a=n(18),i=n(55),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):o.test(e)?NaN:+e}},function(e,t){e.exports=function(e,t){return e>t}},function(e,t){e.exports=function(e,t){return e(l=(o=Math.ceil(h/7))>l?o+1:l+1)&&(i=l,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((l=c.length)-(i=u.length)<0&&(i=l,r=u,u=c,c=r),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/f|0,c[i]%=f;for(n&&(c.unshift(n),++a),l=c.length;0==c[--l];)c.pop();return t.d=c,t.e=a,s?k(t,h):t}function v(e,t,n){if(e!==~~e||en)throw Error(c+e)}function b(e){var t,n,r,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;te.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(a=e.d.length)?r:a;te.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return w(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this.constructor;return k(w(this,new t(e),0,1),t.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return E(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return 0===this.s},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,a=r.precision,o=a+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(i))throw Error(l+"NaN");if(n.s<1)throw Error(l+(n.s?"NaN":"-Infinity"));return n.eq(i)?new r(0):(s=!1,t=w(x(n,o),x(e,o),o),s=!0,k(t,a))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):y(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(!(e=new r(e)).s)throw Error(l+"NaN");return n.s?(s=!1,t=w(n,e,0,1).times(e),s=!0,n.minus(t)):k(new r(n),a)},g.naturalExponential=g.exp=function(){return _(this)},g.naturalLogarithm=g.ln=function(){return x(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?y(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,a=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(c+e);if(t=E(a)+1,n=7*(r=a.d.length-1)+1,r=a.d[r]){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,a,i,o,c=this,u=c.constructor;if(c.s<1){if(!c.s)return new u(0);throw Error(l+"NaN")}for(e=E(c),s=!1,0==(a=Math.sqrt(+c))||a==1/0?(((t=b(c.d)).length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=p((e+1)/2)-(e<0||e%2),r=new u(t=a==1/0?"5e"+e:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new u(a.toString()),a=o=(n=u.precision)+3;;)if(r=(i=r).plus(w(c,i,o+2)).times(.5),b(i.d).slice(0,o)===(t=b(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&"4999"==t){if(k(i,n+1,0),i.times(i).eq(c)){r=i;break}}else if("9999"!=t)break;o+=4}return s=!0,k(r,n)},g.times=g.mul=function(e){var t,n,r,a,i,o,l,c,u,p=this,h=p.constructor,d=p.d,m=(e=new h(e)).d;if(!p.s||!e.s)return new h(0);for(e.s*=p.s,n=p.e+e.e,(c=d.length)<(u=m.length)&&(i=d,d=m,m=i,o=c,c=u,u=o),i=[],r=o=c+u;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=c+r;a>r;)l=i[a]+m[r]*d[a-r-1]+t,i[a--]=l%f|0,t=l/f|0;i[a]=(i[a]+t)%f|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,s?k(e,h.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(v(e,0,1e9),void 0===t?t=r.rounding:v(t,0,8),k(n,e+E(n)+1,t))},g.toExponential=function(e,t){var n,r=this,a=r.constructor;return void 0===e?n=P(r,!0):(v(e,0,1e9),void 0===t?t=a.rounding:v(t,0,8),n=P(r=k(new a(r),e+1,t),!0,e+1)),n},g.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return void 0===e?P(a):(v(e,0,1e9),void 0===t?t=i.rounding:v(t,0,8),n=P((r=k(new i(a),e+E(a)+1,t)).abs(),!1,e+E(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return k(new t(e),E(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,a,o,c,u=this,h=u.constructor,d=+(e=new h(e));if(!e.s)return new h(i);if(!(u=new h(u)).s){if(e.s<1)throw Error(l+"Infinity");return u}if(u.eq(i))return u;if(r=h.precision,e.eq(i))return k(u,r);if(c=(t=e.e)>=(n=e.d.length-1),o=u.s,c){if((n=d<0?-d:d)<=9007199254740991){for(a=new h(i),t=Math.ceil(r/7+4),s=!1;n%2&&T((a=a.times(u)).d,t),0!==(n=p(n/2));)T((u=u.times(u)).d,t);return s=!0,e.s<0?new h(i).div(a):k(a,r)}}else if(o<0)throw Error(l+"NaN");return o=o<0&&1&e.d[Math.max(t,n)]?-1:1,u.s=1,s=!1,a=e.times(x(u,r+12)),s=!0,(a=_(a)).s=o,a},g.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return void 0===e?r=P(a,(n=E(a))<=i.toExpNeg||n>=i.toExpPos):(v(e,1,1e9),void 0===t?t=i.rounding:v(t,0,8),r=P(a=k(new i(a),e,t),e<=(n=E(a))||n<=i.toExpNeg,e)),r},g.toSignificantDigits=g.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(v(e,1,1e9),void 0===t?t=n.rounding:v(t,0,8)),k(new n(this),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=E(e),n=e.constructor;return P(e,t<=n.toExpNeg||t>=n.toExpPos)};var w=function(){function e(e,t){var n,r=0,a=e.length;for(e=e.slice();a--;)n=e[a]*t+r,e[a]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;at[a]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]1;)e.shift()}return function(r,a,i,o){var s,c,u,p,h,d,m,g,y,v,b,w,_,S,A,x,C,O,P=r.constructor,T=r.s==a.s?1:-1,N=r.d,D=a.d;if(!r.s)return new P(r);if(!a.s)throw Error(l+"Division by zero");for(c=r.e-a.e,C=D.length,A=N.length,g=(m=new P(T)).d=[],u=0;D[u]==(N[u]||0);)++u;if(D[u]>(N[u]||0)&&--c,(w=null==i?i=P.precision:o?i+(E(r)-E(a))+1:i)<0)return new P(0);if(w=w/7+2|0,u=0,1==C)for(p=0,D=D[0],w++;(u1&&(D=e(D,p),N=e(N,p),C=D.length,A=N.length),S=C,v=(y=N.slice(0,C)).length;v=f/2&&++x;do{p=0,(s=t(D,y,C,v))<0?(b=y[0],C!=v&&(b=b*f+(y[1]||0)),(p=b/x|0)>1?(p>=f&&(p=f-1),1==(s=t(h=e(D,p),y,d=h.length,v=y.length))&&(p--,n(h,C16)throw Error(u+E(e));if(!e.s)return new d(i);for(null==t?(s=!1,l=f):l=t,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),p+=5;for(l+=Math.log(h(2,p))/Math.LN10*2+5|0,n=r=a=new d(i),d.precision=l;;){if(r=k(r.times(e),l),n=n.times(++c),b((o=a.plus(w(r,n,l))).d).slice(0,l)===b(a.d).slice(0,l)){for(;p--;)a=k(a.times(a),l);return d.precision=f,null==t?(s=!0,k(a,f)):a}a=o}}function E(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function S(e,t,n){if(t>e.LN10.sd())throw s=!0,n&&(e.precision=n),Error(l+"LN10 precision limit exceeded");return k(new e(e.LN10),t)}function A(e){for(var t="";e--;)t+="0";return t}function x(e,t){var n,r,a,o,c,u,p,h,d,f=1,m=e,g=m.d,y=m.constructor,v=y.precision;if(m.s<1)throw Error(l+(m.s?"NaN":"-Infinity"));if(m.eq(i))return new y(0);if(null==t?(s=!1,h=v):h=t,m.eq(10))return null==t&&(s=!0),S(y,h);if(h+=10,y.precision=h,r=(n=b(g)).charAt(0),o=E(m),!(Math.abs(o)<15e14))return p=S(y,h+2,v).times(o+""),m=x(new y(r+"."+n.slice(1)),h-10).plus(p),y.precision=v,null==t?(s=!0,k(m,v)):m;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=b((m=m.times(e)).d)).charAt(0),f++;for(o=E(m),r>1?(m=new y("0."+n),o++):m=new y(r+"."+n.slice(1)),u=c=m=w(m.minus(i),m.plus(i),h),d=k(m.times(m),h),a=3;;){if(c=k(c.times(d),h),b((p=u.plus(w(c,new y(a),h))).d).slice(0,h)===b(u.d).slice(0,h))return u=u.times(2),0!==o&&(u=u.plus(S(y,h+2,v).times(o+""))),u=w(u,new y(f),h),y.precision=v,null==t?(s=!0,k(u,v)):u;u=p,a+=2}}function C(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(a=t.length;48===t.charCodeAt(a-1);)--a;if(t=t.slice(r,a)){if(a-=r,n=n-r-1,e.e=p(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),rm||e.e<-m))throw Error(u+n)}else e.s=0,e.e=0,e.d=[0];return e}function k(e,t,n){var r,a,i,o,l,c,d,g,y=e.d;for(o=1,i=y[0];i>=10;i/=10)o++;if((r=t-o)<0)r+=7,a=t,d=y[g=0];else{if((g=Math.ceil((r+1)/7))>=(i=y.length))return e;for(d=i=y[g],o=1;i>=10;i/=10)o++;a=(r%=7)-7+o}if(void 0!==n&&(l=d/(i=h(10,o-a-1))%10|0,c=t<0||void 0!==y[g+1]||d%i,c=n<4?(l||c)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||c||6==n&&(r>0?a>0?d/h(10,o-a):0:y[g-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return c?(i=E(e),y.length=1,t=t-i-1,y[0]=h(10,(7-t%7)%7),e.e=p(-t/7)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(0==r?(y.length=g,i=1,g--):(y.length=g+1,i=h(10,7-r),y[g]=a>0?(d/h(10,o-a)%h(10,a)|0)*i:0),c)for(;;){if(0==g){(y[0]+=i)==f&&(y[0]=1,++e.e);break}if(y[g]+=i,y[g]!=f)break;y[g--]=0,i=1}for(r=y.length;0===y[--r];)y.pop();if(s&&(e.e>m||e.e<-m))throw Error(u+E(e));return e}function O(e,t){var n,r,a,i,o,l,c,u,p,h,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),s?k(t,m):t;if(c=e.d,h=t.d,r=t.e,u=e.e,c=c.slice(),o=u-r){for((p=o<0)?(n=c,o=-o,l=h.length):(n=h,r=u,l=c.length),o>(a=Math.max(Math.ceil(m/7),l)+2)&&(o=a,n.length=1),n.reverse(),a=o;a--;)n.push(0);n.reverse()}else{for((p=(a=c.length)<(l=h.length))&&(l=a),a=0;a0;--a)c[l++]=0;for(a=h.length;a>o;){if(c[--a]0?i=i.charAt(0)+"."+i.slice(1)+A(r):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+A(-a-1)+i,n&&(r=n-o)>0&&(i+=A(r))):a>=o?(i+=A(a+1-o),n&&(r=n-a-1)>0&&(i=i+"."+A(r))):((r=a+1)0&&(a+1===o&&(i+="."),i+=A(r))),e.s<0?"-"+i:i}function T(e,t){if(e.length>t)return e.length=t,!0}function N(e){if(!e||"object"!=typeof e)throw Error(l+"Object expected");var t,n,r,a=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t=a[t+1]&&r<=a[t+2]))throw Error(c+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(c+n+": "+r);this[n]=new this(r)}return this}(o=function e(t){var n,r,a;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(c+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):C(t,e.toString())}if("string"!=typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!d.test(e))throw Error(c+e);C(t,e)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=N,void 0===t&&(t={}),t)for(a=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n=t?n.apply(void 0,l):e(t-u,s((function(){for(var e=arguments.length,t=new Array(e),a=0;ar.createElement("ol",{className:"chart-key_s05buv"},r.createElement("li",null,e.item1),r.createElement("li",null,e.item2))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(505),i=n(221);function o(e){return e.email!==i.default.None||e.push}function s(e,t){return null!=e?e:t}function l(e,t){return{email:s(e.email,t.email),extension:t.extension,push:s(e.push,t.push)}}class c extends r.Component{constructor(e){var t;super(e),this._changeCompanyUpdate=e=>this.saveChanges({isCompanyUpdateEnabled:e.isEnabled,companyUpdate:e.isEnabled}),this._changeAotd=e=>{const t=l(e,this.state.aotd);return this.saveChanges({isAotdEnabled:o(t),aotd:t})},this._changePost=e=>{const t=l(e,this.state.post);return this.saveChanges({isPostEnabled:o(t),post:t})},this._changeReply=e=>{const t=l(e,this.state.reply);return this.saveChanges({isReplyEnabled:o(t),reply:t})},this._changeLoopback=e=>{const t=l(e,this.state.loopback);return this.saveChanges({isLoopbackEnabled:o(t),loopback:t})},this._changeFollower=e=>{const t=l(e,this.state.follower);return this.saveChanges({isFollowerEnabled:o(t),follower:t})},this.state=(t=e.preference,Object.assign(Object.assign({},t),{isCompanyUpdateEnabled:t.companyUpdate,isAotdEnabled:o(t.aotd),isPostEnabled:o(t.post),isReplyEnabled:o(t.reply),isLoopbackEnabled:o(t.loopback),isFollowerEnabled:o(t.follower)}))}saveChanges(e){const t=Object.assign(Object.assign({},this.state),e);return this.setState(e),this.props.onChangeNotificationPreference({companyUpdate:t.companyUpdate,aotd:t.aotd,post:t.post,reply:t.reply,loopback:t.loopback,follower:t.follower})}render(){return r.createElement("div",{className:"notification-preferences-control_m5xqhx"},r.createElement("div",null,"Digest emails are sent at 6 AM EST. Weekly digests go out on Tuesday."),r.createElement(a.default,{title:"Product updates",subtitle:"The inside scoop on Readup.",showChannels:!1,onChange:this._changeCompanyUpdate,isEnabled:this.state.isCompanyUpdateEnabled}),r.createElement(a.default,{title:"Article of the Day",subtitle:"(Recommended)",emailOptions:i.default.Immediately|i.default.WeeklyDigest,onChange:this._changeAotd,isEnabled:this.state.isAotdEnabled,email:this.state.aotd.email,push:this.state.aotd.push}),r.createElement(a.default,{title:"Posts from people I follow",onChange:this._changePost,isEnabled:this.state.isPostEnabled,email:this.state.post.email,push:this.state.post.push}),r.createElement(a.default,{title:"Replies to my comments",onChange:this._changeReply,isEnabled:this.state.isReplyEnabled,email:this.state.reply.email,push:this.state.reply.push}),r.createElement(a.default,{title:"Comments on articles I've read",onChange:this._changeLoopback,isEnabled:this.state.isLoopbackEnabled,email:this.state.loopback.email,push:this.state.loopback.push}),r.createElement(a.default,{title:"New followers",onChange:this._changeFollower,isEnabled:this.state.isFollowerEnabled,email:this.state.follower.email,push:this.state.follower.push}))}}t.default=c},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.None=0]="None",e[e.Immediately=1]="Immediately",e[e.DailyDigest=2]="DailyDigest",e[e.WeeklyDigest=4]="WeeklyDigest"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(506),i=n(70),o=n(2);class s extends r.PureComponent{constructor(){super(...arguments),this._toggleEnabled=()=>{this.props.onChange(!this.props.isEnabled)}}render(){return r.createElement("div",{className:o("toggle-switch-expandable-input_i54wnk",this.props.className)},r.createElement("div",{className:"switch-container"},r.createElement(a.default,{isChecked:this.props.isEnabled,onChange:this._toggleEnabled})),r.createElement("div",{className:"controls"},r.createElement("div",{className:"header"},r.createElement("label",{onClick:this._toggleEnabled},this.props.title),this.props.subtitle?r.createElement("span",null,this.props.subtitle):null,r.createElement(i.default,{state:this.props.saveIndicator})),r.createElement("div",{className:"children"},this.props.children)))}}t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2);class i extends r.PureComponent{constructor(){super(...arguments),this._selectRating=e=>{const t=parseInt(e.currentTarget.value);(t!==this.props.value||this.props.allowDeselect)&&this.props.onChange(t!==this.props.value?t:null)}}render(){return r.createElement("div",{className:"rating-selector_epcgq9"},this.props.promptText?r.createElement("div",{className:"prompt-text"},r.createElement("strong",null,this.props.promptText)):null,r.createElement("div",{className:"rating-bar"},this.props.showLabels?r.createElement("label",null,"No"):null,r.createElement("div",{className:"buttons"},Array.from(new Array(10)).map((e,t)=>{const n=t+1;return r.createElement("button",{className:a.default("rating-button",{selected:n===this.props.value}),key:t,onClick:this._selectRating,value:n},n)})),this.props.showLabels?r.createElement("label",null,"Yes"):null))}}t.default=i},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Increment=0]="Increment",e[e.Decrement=1]="Decrement"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Step=void 0;const r=n(1),a=n(526),i=n(527),o=n(528),s=n(529),l=n(530),c=n(229),u=n(34),p=n(230);var h;!function(e){e[e.CreateAccount=0]="CreateAccount",e[e.SignIn=1]="SignIn",e[e.CreateAuthServiceAccount=2]="CreateAuthServiceAccount",e[e.LinkAccount=3]="LinkAccount",e[e.RequestPasswordReset=4]="RequestPasswordReset",e[e.ResetPassword=5]="ResetPassword"}(h=t.Step||(t.Step={}));class d extends c.default{constructor(e){let t;if(super(e),this._createAccount=e=>this.props.onCreateAccount(e).then(this._handleAccountCreation),this._createAuthServiceAccount=e=>this.props.onCreateAuthServiceAccount(e).then(this._handleAccountCreation),this._goToCreateAccountStep=()=>{this.goToStep(h.CreateAccount)},this._goToLinkAccountStep=()=>{this.goToStep(h.LinkAccount)},this._goToPasswordResetRequestStep=()=>{this.goToStep(h.RequestPasswordReset)},this._goToSignInStep=()=>{this.goToStep(h.SignIn)},this._handleAccountCreation=()=>{this._complete()},this._handleExistingUserAuthentication=()=>{this._complete()},this._resetPassword=(e,t)=>this.props.onResetPassword(e,t).then(()=>{this._abort()}),this._signIn=e=>this.props.onSignIn(e).then(this._handleExistingUserAuthentication),this._signInWithAuthService=(e,t)=>{let n;switch(e){case u.default.Apple:n=this.props.onSignInWithApple;break;case u.default.Twitter:n=this.props.onSignInWithTwitter;break;default:throw new Error("Unexpected auth service provider.")}return n(t).then(e=>{p.isAuthServiceCredentialAuthTokenResponse(e)?(this._authServiceToken=e.authServiceToken,this.goToStep(h.CreateAuthServiceAccount)):this._handleExistingUserAuthentication()})},this._stepMap={[h.CreateAccount]:e=>r.createElement(a.default,{analyticsAction:this._analyticsAction,captcha:this.props.captcha,onCreateAccount:this._createAccount,onShowToast:this.props.onShowToast,onSignIn:this._goToSignInStep,onSignInWithAuthService:this._signInWithAuthService}),[h.SignIn]:e=>r.createElement(i.default,{analyticsAction:this._analyticsAction,onCreateAccount:this._goToCreateAccountStep,onRequestPasswordReset:this._goToPasswordResetRequestStep,onShowToast:this.props.onShowToast,onSignIn:this._signIn,onSignInWithAuthService:this._signInWithAuthService}),[h.CreateAuthServiceAccount]:e=>r.createElement(s.default,{analyticsAction:this._analyticsAction,authServiceToken:this._authServiceToken,onCreateAuthServiceAccount:this._createAuthServiceAccount,onLinkExistingAccount:this._goToLinkAccountStep}),[h.LinkAccount]:e=>r.createElement(i.default,{analyticsAction:this._analyticsAction,authServiceToken:this._authServiceToken,onRequestPasswordReset:this._goToPasswordResetRequestStep,onShowToast:this.props.onShowToast,onSignIn:this._signIn}),[h.RequestPasswordReset]:e=>r.createElement(o.default,{authServiceToken:this._authServiceToken,captcha:this.props.captcha,onRequestPasswordReset:this.props.onRequestPasswordReset}),[h.ResetPassword]:e=>r.createElement(l.default,{email:this._passwordResetEmail,onResetPassword:this._resetPassword,token:this._passwordResetToken})},function(e){return"authServiceToken"in e}(e))t=h.CreateAuthServiceAccount,this._authServiceToken=e.authServiceToken;else if(function(e){return"initialAuthenticationStep"in e}(e))t=e.initialAuthenticationStep,this._analyticsAction=e.analyticsAction;else{if(!function(e){return"passwordResetEmail"in e&&"passwordResetToken"in e}(e))throw new Error("Unexpected props type.");t=h.ResetPassword,this._passwordResetEmail=e.passwordResetEmail,this._passwordResetToken=e.passwordResetToken}this.state=Object.assign(Object.assign({},this.state),{step:t})}getStepRenderer(e){return this._stepMap[e]}shouldAllowCancellation(){return!0}}t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(32);t.default=e=>r.createElement(a.default,{autoCapitalize:"none",autoFocus:e.autoFocus,error:e.error,label:"Reader Name",labelPosition:e.labelPosition,minLength:3,maxLength:30,onChange:e.onChange,onEnterKeyPressed:e.onEnterKeyPressed,required:!0,showError:e.showError,subtext:"Your reader name will be public, but you can choose to be as anonymous as you wish. (ex: JenFox or Human123)",type:"username",value:e.value})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(32);t.default=e=>r.createElement(a.default,{error:e.error,label:"Password",labelPosition:e.labelPosition,minLength:8,maxLength:256,onChange:e.onChange,onEnterKeyPressed:e.onEnterKeyPressed,required:!0,showError:e.showError,type:"password",value:e.value})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1);t.default=()=>r.createElement("div",{className:"form-partition_eo32pq"},"or")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExitReason=void 0;const r=n(1),a=n(7),i=n(531);var o;!function(e){e[e.Aborted=0]="Aborted",e[e.Completed=1]="Completed"}(o=t.ExitReason||(t.ExitReason={}));class s extends r.Component{constructor(e){super(e),this._completeStepTransition=()=>{this.setState({goingToStep:null,step:this.state.goingToStep})},this._abort=()=>{this.props.onClose(o.Aborted)},this._complete=()=>{this.props.onClose(o.Completed)},this.state={exitReason:null,goingToStep:null,step:null}}shouldAllowCancellation(){return!0}goToStep(e){this.setState({goingToStep:e})}render(){return r.createElement("div",{className:"flow_fhdgte"},r.createElement("div",{className:"steps"},r.createElement("div",{className:"titlebar"},r.createElement("div",{className:"icon-right"},this.shouldAllowCancellation()?r.createElement(a.default,{display:"block",name:"cancel",onClick:this._abort}):null)),r.createElement(i.default,{isTransitioning:null!=this.state.goingToStep,onTransitionComplete:this._completeStepTransition},r.createElement("div",{className:"content"},this.getStepRenderer(this.state.step)(this.props.user)))))}}t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAuthServiceCredentialAuthTokenResponse=void 0,t.isAuthServiceCredentialAuthTokenResponse=function(e){return null!=e.authServiceToken}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2);class i extends r.Component{constructor(){super(...arguments),this._handleAnimationEnd=e=>{if(e.animationName){const t=parseInt(e.currentTarget.dataset.key);e.animationName.startsWith("dialog-manager_b1yvhp-dialog-slide-in")&&this.props.onTransitionComplete(t,"opening"),e.animationName.startsWith("dialog-manager_b1yvhp-dialog-slide-out")&&this.props.onTransitionComplete(t,"closing")}}}render(){return this.props.dialogs.length?r.createElement("ol",{className:a.default("dialog-manager_b1yvhp",this.props.verticalAlignment)},this.props.dialogs.filter((e,t,n)=>n.slice(0,t).every(e=>"closing"!==e.value.stage)).map((e,t,n)=>r.createElement("li",{className:a.default("overlay",{animated:0!==t||0===e.key&&"closing"!==e.value.stage||n.length===this.props.dialogs.length&&"closing"===e.value.stage,closing:"closing"===e.value.stage,obscured:t{},this._asyncTracker=new d.default,this._postComment=e=>this.props.onPostComment(e).then(()=>{}),this._asyncTracker.addCancellationDelegate(e.onRegisterArticleChangeHandler(e=>{this.props.article.value&&this.props.article.value.id===e.article.id&&this.props.onSetScreenState(this.props.screenId,f.default(t=>{t.componentState.value=e.article}))}),e.onRegisterCommentPostedHandler(e=>{this.props.article.value&&this.props.article.value.id===e.articleId&&this.state.comments.value&&this.setState({comments:Object.assign(Object.assign({},this.state.comments),{value:m.mergeComment(e,this.state.comments.value.slice())})})}),e.onRegisterCommentUpdatedHandler(e=>{this.props.article.value&&this.props.article.value.id===e.articleId&&this.state.comments.value&&this.setState({comments:Object.assign(Object.assign({},this.state.comments),{value:m.updateComment(e,this.state.comments.value.slice())})})}),e.onRegisterUserChangeHandler(e=>{this.props.onReloadArticle(this.props.screenId,this.props.articleSlug)})),this.state={comments:this.props.onGetComments({slug:this.props.articleSlug},this._asyncTracker.addCallback(e=>{this.setState({comments:e})}))}}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){return this.props.article.isLoading||this.state.comments.isLoading?r.createElement(s.default,null):this.props.article.value&&this.state.comments.value?r.createElement("div",{className:"comments-screen_udh2l6"},r.createElement(p.default,{className:"main"},r.createElement(a.default,{article:this.props.article.value,deviceType:this.props.deviceType,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onRateArticle:this.props.onRateArticle,onPost:this.props.onPostArticle,onRead:this.props.onReadArticle,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleStar:this.props.onToggleArticleStar,onViewComments:this._noop,onViewProfile:this.props.onViewProfile,user:this.props.user}),r.createElement(c.default,{comments:this.state.comments.value,highlightedCommentId:this.props.highlightedCommentId,isAllowedToPost:this.props.article.value.isRead,noCommentsMessage:"Be the first to post a comment on this article.",onCloseDialog:this.props.onCloseDialog,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onDeleteComment:this.props.onDeleteComment,onNavTo:this.props.onNavTo,onOpenDialog:this.props.onOpenDialog,onPostComment:this._postComment,onPostCommentAddendum:this.props.onPostCommentAddendum,onPostCommentRevision:this.props.onPostCommentRevision,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onViewProfile:this.props.onViewProfile,user:this.props.user})),r.createElement(h.JsonLd,{item:{"@context":"https://schema.org","@type":"AggregateRating",bestRating:"10",itemReviewed:{"@type":"Article",articleSection:this.props.article.value.section,datePublished:this.props.article.value.datePublished,description:this.props.article.value.description,headline:this.props.article.value.title,name:this.props.article.value.title,publisher:{"@type":"Organization",name:this.props.article.value.source},url:this.props.article.value.url},ratingCount:this.props.article.value.ratingCount,ratingExplanation:"Readup verifies that users have read the article to completion before allowing them to leave a rating or review.",ratingValue:this.props.article.value.averageRatingScore,reviewCount:this.props.article.value.commentCount}})):r.createElement(u.default,{style:"normal"},this.props.article.value?r.createElement("p",null,"Error loading comments."):r.createElement("p",null,"Article not found."))}}t.default=function(e,t){const n=(e,n)=>{t.onGetArticle({slug:n},n=>{t.onSetScreenState(e,f.default(e=>{e.componentState=n}))})};return{create:(n,r,a)=>{const i=g(r),o=t.onGetArticle({slug:i.slug},e=>{t.onSetScreenState(n,f.default(t=>{t.componentState=e,t.title=y(e)}))});return{id:n,componentState:o,key:e,location:r,title:y(o)}},render:(e,a)=>{const i=g(e.location);return r.createElement(v,Object.assign({},Object.assign(Object.assign(Object.assign({},t),a),{article:e.componentState,articleSlug:i.slug,highlightedCommentId:i.commentId,location:e.location,onReloadArticle:n,screenId:e.id})))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2),i=n(7),o=e=>r.createElement("div",{className:a.default("star_n3lkaj",{starred:e.starred,busy:e.busy},"look--"+e.look,e.className),title:e.starred?"Unstar Article":"Star Article"},r.createElement(i.default,{badge:!1,name:"article-details-star",onClick:e.onClick}));o.defaultProps={look:"muted"},t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2),i=n(6);class o extends r.PureComponent{constructor(e){super(e),this._asyncTracker=new i.default,this.state={fadeHighlight:!1},e.highlight&&(this._elementRef=r.createRef())}componentDidMount(){this.props.highlight&&this._asyncTracker.addTimeout(window.setTimeout(()=>{"IntersectionObserver"in window&&(this._intersectionObserver=new IntersectionObserver(e=>{const t=e[0];t&&t.isIntersecting&&(this.setState({fadeHighlight:!0}),this._intersectionObserver.unobserve(t.target))}),this._intersectionObserver.observe(this._elementRef.current));const e=this._elementRef.current.getBoundingClientRect();(e.top<0||e.bottom>window.innerHeight)&&this._elementRef.current.scrollIntoView({behavior:"smooth",block:"start"})},100))}componentWillUnmount(){this._asyncTracker.cancelAll(),this._intersectionObserver&&this._intersectionObserver.disconnect()}render(){return r.createElement("div",{className:a.default("highlighter_trojkf",this.props.className,{"fade-highlight":this.state.fadeHighlight,highlight:this.props.highlight}),ref:this._elementRef},this.props.children)}}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(59),i=n(12),o=n(10),s=n(8);class l extends r.PureComponent{constructor(e){super(e),this._beginClosingMenu=()=>{this.setState({menuState:a.MenuState.Closing})},this._closeMenu=()=>{this.setState({menuState:a.MenuState.Closed})},this._openMenu=()=>{this.setState({menuState:a.MenuState.Opened})},this._post=()=>{this.props.onPost(this.props.article),this.state.menuState===a.MenuState.Opened&&this._beginClosingMenu()},this.state={menuState:a.MenuState.Closed}}render(){return this.props.article.datesPosted.length?r.createElement(a.default,{className:"post-button_euo01q",menuChildren:r.createElement("div",{className:"content"},r.createElement("ol",null,this.props.article.datesPosted.map(e=>r.createElement("li",{key:e},"Posted on ",o.formatTimestamp(e)))),r.createElement(s.default,{text:"Post again",onClick:this._post})),menuPosition:this.props.menuPosition,menuState:this.state.menuState,onBeginClosing:this._beginClosingMenu,onClose:this._closeMenu,onOpen:this._openMenu,stopPropagation:this.props.stopPropagation},r.createElement(i.default,{intent:"success",state:"set",text:"Post",stopPropagation:this.props.stopPropagation})):r.createElement(i.default,{className:"post-button_euo01q",intent:"success",onClick:this._post,text:"Post",stopPropagation:this.props.stopPropagation})}}t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2),i=n(7);t.default=({src:e,alwaysShowPlaceholder:t})=>{const[n,o,s]=(()=>{const[e,t]=r.useState(!1),n=r.useRef();return r.useEffect(()=>{n.current&&n.current.complete&&t(!0)},[]),[n,e,t]})();return r.createElement("div",{className:"image_1ctn9c"},r.createElement("div",{className:"positioner"},r.createElement("div",{className:a("image","placeholder",{"always-show-placeholder":!!t,loading:!t&&!o}),style:{display:t||!o?"flex":"none"}},r.createElement(i.default,{name:"trophy"})),!t&&r.createElement("img",{ref:n,style:{display:o?"block":"none"},className:"image",onLoad:()=>s(!0),src:e})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(550),i=n(8),o=n(2),s=n(6),l=n(10),c=n(30),u=n(238),p=n(551),h=n(27),d=n(552),f=n(20),m=n(553),g=n(244);var y;!function(e){e[e.None=0]="None",e[e.Reply=1]="Reply",e[e.Revision=2]="Revision",e[e.Addendum=3]="Addendum"}(y||(y={}));class v extends g.default{constructor(e){super(e),this._asyncTracker=new s.default,this._openEditComposer=()=>{-1*f.DateTime.fromISO(l.formatIsoDateAsUtc(this.props.comment.dateCreated)).diffNow("seconds").seconds<170?this.setState({compositionState:y.Revision}):this.setState({compositionState:y.Addendum})},this._openReplyComposer=()=>{const e=()=>{this.setState({compositionState:y.Reply})};if(this.props.user)e();else if(this.props.onAuthenticationRequired){const t=this.props.onAuthenticationRequired(()=>{t(),this._asyncTracker.removeCancellationDelegate(t),e()});this._asyncTracker.addCancellationDelegate(t)}},this._closeComposer=()=>{this.setState({compositionState:y.None})},this._openDeleteDialog=()=>{this.props.onOpenDialog(r.createElement(h.default,{closeButtonText:"Cancel",onClose:this.props.onCloseDialog,onSubmit:()=>this.props.onDeleteComment({commentId:this.props.comment.id}),size:"small",textAlign:"center",title:"Delete Comment"},r.createElement("p",null,"Are you sure?"),r.createElement("p",null,"Comment deletion is permanent. You can't undo this action.")))},this._navTo=e=>{const t=this.props.onNavTo(e);return t||this.props.onOpenDialog(r.createElement(h.default,{closeButtonText:"Ok",onClose:this.props.onCloseDialog,size:"small",textAlign:"center",title:"Navigation Error"},r.createElement("p",null,"This link is invalid."))),t},this._postComment=e=>this.props.onPostComment(e).then(this._asyncTracker.addCallback(()=>{this.setState({compositionState:y.None})})),this._postCommentRevision=e=>this._asyncTracker.addPromise(this.props.onPostCommentRevision(e)).then(e=>(this.setState({compositionState:y.None}),e)),this._postCommentAddendum=e=>this._asyncTracker.addPromise(this.props.onPostCommentAddendum(e)).then(e=>(this.setState({compositionState:y.None}),e)),this._viewThread=()=>{this.props.onViewThread(this.props.comment)},this.state={compositionState:y.None},this.props.onPostComment&&this.props.user&&this.props.user.name===this.props.comment.userAccount&&(this._textDivRef=r.createRef())}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){var e;const t=this.props.comment.dateDeleted?"This comment was deleted on "+f.DateTime.fromISO(l.formatIsoDateAsUtc(this.props.comment.dateDeleted)).toLocaleString(f.DateTime.DATE_SHORT):this.props.comment.text;return r.createElement(c.default,{className:"comment-details_qker1u",highlight:this.props.highlightedCommentId===this.props.comment.id},this.props.showPostHeader?r.createElement(u.default,{userName:this.props.comment.userAccount,leaderboardBadge:this.props.comment.badge,isAuthor:this.props.comment.isAuthor,date:this.props.comment.dateCreated,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onGetShareData:this._getShareData,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onViewProfile:this.props.onViewProfile}):null,this.state.compositionState===y.Revision?r.createElement(p.default,{comment:this.props.comment,initialHeight:this._textDivRef.current&&this._textDivRef.current.offsetHeight+30||0,onClose:this._closeComposer,onCloseDialog:this.props.onCloseDialog,onCreateAddendum:this._openEditComposer,onOpenDialog:this.props.onOpenDialog,onPostRevision:this._postCommentRevision}):r.createElement(r.Fragment,null,r.createElement("div",{className:"text-wrapper",ref:this._textDivRef},r.createElement(m.default,{className:o.default("text",{deleted:!!this.props.comment.dateDeleted}),onNavTo:this._navTo,text:t})),this.props.comment.addenda.length?r.createElement("ol",{className:"addenda"},this.props.comment.addenda.map(e=>r.createElement("li",{className:"addendum",key:e.dateCreated},r.createElement("span",{className:"date"},"Update (",f.DateTime.fromISO(l.formatIsoDateAsUtc(e.dateCreated)).toLocaleString(f.DateTime.DATE_SHORT),"):"),r.createElement(m.default,{className:"text",onNavTo:this._navTo,text:e.textContent})))):null),this.state.compositionState===y.Addendum?r.createElement(d.default,{comment:this.props.comment,onClose:this._closeComposer,onCloseDialog:this.props.onCloseDialog,onOpenDialog:this.props.onOpenDialog,onPostAddendum:this._postCommentAddendum}):null,this.state.compositionState===y.Reply?r.createElement(a.default,{articleId:this.props.comment.articleId,onCancel:this._closeComposer,onCloseDialog:this.props.onCloseDialog,onOpenDialog:this.props.onOpenDialog,onPostComment:this._postComment,parentCommentId:this.props.comment.id}):null,this.state.compositionState!==y.None||!this.props.onPostComment&&!this.props.onViewThread||this.props.comment.dateDeleted?null:r.createElement("div",{className:"actions"},this.props.onPostComment?(null===(e=this.props.user)||void 0===e?void 0:e.name)===this.props.comment.userAccount?r.createElement(r.Fragment,null,r.createElement(i.default,{text:"Edit",onClick:this._openEditComposer}),r.createElement(i.default,{text:"Delete",onClick:this._openDeleteDialog})):r.createElement(i.default,{text:"Reply",onClick:this._openReplyComposer}):this.props.onViewThread?r.createElement(i.default,{href:this.getCommentAbsoluteUrl(),text:"View Thread",onClick:this._viewThread}):null),this.props.comment.children.length?r.createElement("ul",{className:"replies"},this.props.comment.children.map(e=>r.createElement("li",{key:e.id},r.createElement(v,{comment:e,highlightedCommentId:this.props.highlightedCommentId,onAuthenticationRequired:this.props.onAuthenticationRequired,onCloseDialog:this.props.onCloseDialog,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onDeleteComment:this.props.onDeleteComment,onNavTo:this.props.onNavTo,onOpenDialog:this.props.onOpenDialog,onPostComment:this.props.onPostComment,onPostCommentAddendum:this.props.onPostCommentAddendum,onPostCommentRevision:this.props.onPostCommentRevision,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onViewProfile:this.props.onViewProfile,onViewThread:this.props.onViewThread,parentCommentId:this.props.comment.id,user:this.props.user})))):null)}}t.default=v,v.defaultProps={showPostHeader:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(149),i=n(239),o=n(635),s=n(147),l=n(7),c=n(92),u=n(2);function p(e){return"boolean"==typeof e.verbose}const h=e=>r.createElement("div",{className:u("post-header_f4a846",{"has-flair":e.isAuthor,"is-verbose":p(e)&&e.verbose})},!e.userName||e.user&&e.user.name===e.userName?r.createElement("span",{className:"user-name"},e.userName||"[user]"):r.createElement(c.default,{className:"user-name",onCreateAbsoluteUrl:e.onCreateAbsoluteUrl,onViewProfile:e.onViewProfile,userName:e.userName}),e.leaderboardBadge!==a.default.None?r.createElement(i.default,{badge:e.leaderboardBadge}):null,p(e)&&e.verbose?r.createElement("span",{className:"posted-copy"},function(e){return e.isReply?"replied":e.userName===e.article.firstPoster?"scouted":e.isComment?"commented":"read"}(e)):null,r.createElement("span",{className:"age"},o.format(e.date.replace(/([^Z])$/,"$1Z"))),e.userName&&e.onGetShareData&&e.onShare&&e.onShareViaChannel?r.createElement(s.default,{menuPosition:s.MenuPosition.RightMiddle,onGetData:e.onGetShareData,onShare:e.onShare,onShareViaChannel:e.onShareViaChannel},r.createElement(l.default,{display:"block",name:"share"})):null,e.isAuthor?r.createElement("span",{className:"author"},r.createElement(l.default,{name:"verified-user"}),r.createElement("span",null,"Writer")):null);h.defaultProps={verbose:!1},t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(149),i=n(7);t.default=e=>{let t=[];return e.badge&a.default.WeeklyReadCount&&t.push({iconName:"power",title:"Top reader this week"}),e.badge&a.default.ReadCount&&t.push({iconName:"medal",title:"Top reader of all time"}),e.badge&a.default.Streak&&t.push({iconName:"fire",title:"Reading streak"}),e.badge&a.default.LongestRead&&t.push({iconName:"graduation",title:"Longest recent read"}),e.badge&a.default.Scout&&t.push({iconName:"binoculars",title:"Scout"}),e.badge&a.default.Scribe&&t.push({iconName:"quill",title:"Scribe"}),r.createElement("div",{className:"leaderboard-badges_s4o6nj"},t.map(e=>r.createElement(i.default,{className:"badge",key:e.iconName,name:e.iconName,title:e.title})))}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeHTML=t.decodeHTMLStrict=t.decodeXML=void 0;var a=r(n(241)),i=r(n(554)),o=r(n(242)),s=r(n(555));function l(e){var t=Object.keys(e).join("|"),n=u(e),r=new RegExp("&(?:"+(t+="|#[xX][\\da-fA-F]+|#\\d+")+");","g");return function(e){return String(e).replace(r,n)}}t.decodeXML=l(o.default),t.decodeHTMLStrict=l(a.default);var c=function(e,t){return e","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')},function(e){e.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escape=t.encodeHTML=t.encodeXML=void 0;var a=l(r(n(242)).default),i=c(a);t.encodeXML=h(a,i);var o=l(r(n(241)).default),s=c(o);function l(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function c(e){for(var t=[],n=[],r=0,a=Object.keys(e);r!!this.props.post.comment,this._getCommentThread=()=>this.props.post&&this.props.post.comment?i.createCommentThread(this.props.post):this.props.comment?this.props.comment:void 0,this._getShareData=()=>{const e=this._getCommentThread().articleTitle,t=this._getCommentThread().userAccount,n=this._getCommentThread().text.split(/\n\n+/).map((e,t,n)=>`"${e}${t===n.length-1?'"':""}`).join("\n\n"),r=this.getCommentAbsoluteUrl();return{action:"Comment",email:{body:`${n}\n\n${r}`,subject:this.props.user&&this.props.user.name===t?`My comment on "${e}"`:`Check out ${a.formatPossessive(t)} comment on "${e}"`},text:this.props.user&&this.props.user.name===t?this._getCommentThread().text:`Check out ${a.formatPossessive(t)} comment on "${e}"`,url:r}}}getCommentAbsoluteUrl(){const[e,t]=this._getCommentThread().articleSlug.split("_");return this.props.onCreateAbsoluteUrl(this._commentsScreenRoute.createUrl({articleSlug:t,commentId:this._getCommentThread().id,sourceSlug:e}))}}t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateCommunityReads=void 0;const r=n(1),a=n(23),i=n(566);t.updateCommunityReads=function(e,t){this.state.communityReads.value&&([this.state.communityReads.value.aotd].concat(this.state.communityReads.value.articles.items).some(t=>t.id===e.id)||!this.state.communityReads.value.userReadCount&&t)&&this.setState(a.default(n=>{n.communityReads.value.aotd.id===e.id&&(n.communityReads.value.aotd=Object.assign(Object.assign(Object.assign({},n.communityReads.value.aotd),e),{dateStarred:e.dateStarred})),n.communityReads.value.articles.items.forEach((t,n,r)=>{t.id===e.id&&r.splice(r.indexOf(t),1,Object.assign(Object.assign(Object.assign({},t),e),{dateStarred:e.dateStarred}))}),!n.communityReads.value.userReadCount&&t&&(n.communityReads.value.userReadCount=1)}))};class o extends r.PureComponent{render(){return r.createElement("div",{className:"community-reads-list_g4cy3n"},r.createElement(i.default,{aotd:this.props.aotd,aotdHasAlert:this.props.aotdHasAlert,articles:this.props.articles,deviceType:this.props.deviceType,isLoading:this.props.isLoading,onChangeSort:this.props.onChangeSort,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onPostArticle:this.props.onPostArticle,onRateArticle:this.props.onRateArticle,onReadArticle:this.props.onReadArticle,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onShowTrackingAnimation:this.props.onShowTrackingAnimation,onToggleArticleStar:this.props.onToggleArticleStar,onViewAotdHistory:this.props.onViewAotdHistory,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,showTrackingAnimationPrompt:this.props.showTrackingAnimationPrompt,sort:this.props.sort,user:this.props.user}))}}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(6),i=n(8);class o extends r.Component{constructor(e){super(e),this._asyncTracker=new a.default,this._resend=()=>{this.setState({isBusy:!0}),this._asyncTracker.addPromise(this.props.onClick()).then(()=>{this.setState({isBusy:!1})}).catch(e=>{var t;(null===(t=e)||void 0===t?void 0:t.isCancelled)||this.setState({isBusy:!1})})},this.state={isBusy:!1}}render(){return r.createElement(i.default,{text:this.props.text,iconLeft:this.props.icon,state:this.state.isBusy?"busy":"normal",onClick:this._resend})}}t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(38),i=n(245),o=n(14),s=n(6),l=n(35),c=n(60),u=n(41),p=n(71);class h extends r.Component{constructor(e){super(e),this._asyncTracker=new s.default,this._changePage=e=>{this.setState({isLoading:!0,isLoadingNewItems:!1,newAotd:!1}),this.fetchItems(this.state.minLength,this.state.maxLength,e,this.state.sort)},this._changeSort=e=>{this.setState({isLoading:!0,newAotd:!1,sort:e}),this.fetchItems(this.state.minLength,this.state.maxLength,1,e)},this._loadNewItems=()=>{this.setState({isLoadingNewItems:!0}),this.fetchItems(null,null,1,this.state.sort)},this._hasClearedAlert=!1;const t=c.default.Hot;this.state={communityReads:e.onGetCommunityReads({maxLength:null,minLength:null,pageNumber:1,pageSize:40,sort:t},this._asyncTracker.addCallback(e=>{this.setState({communityReads:e}),this.clearAlertIfNeeded()})),isLoading:!1,isLoadingNewItems:!1,newAotd:!1,sort:t},this._asyncTracker.addCancellationDelegate(e.onRegisterArticleChangeHandler(e=>{i.updateCommunityReads.call(this,e.article,e.isCompletionCommit)}),e.onRegisterUserChangeHandler(t=>{this.setState({communityReads:e.onGetCommunityReads({maxLength:null,minLength:null,pageNumber:1,pageSize:40,sort:c.default.Hot},this._asyncTracker.addCallback(e=>{this.setState({communityReads:e}),this.clearAlertIfNeeded()})),isLoading:!1,maxLength:null,minLength:null,newAotd:!1})}))}clearAlertIfNeeded(){!this._hasClearedAlert&&a.hasAnyAlerts(this.props.user,u.default.Aotd)&&(this.props.onClearAlerts(u.default.Aotd),this._hasClearedAlert=!0)}fetchItems(e,t,n,r){this.props.onGetCommunityReads({maxLength:t,minLength:e,pageNumber:n,pageSize:40,sort:r},this._asyncTracker.addCallback(e=>{this.setState({communityReads:e,isLoading:!1,isLoadingNewItems:!1,newAotd:!1}),this.clearAlertIfNeeded()}))}componentDidMount(){this.state.communityReads.isLoading||this.clearAlertIfNeeded()}componentDidUpdate(e){this.props.user&&this.props.user.aotdAlert&&e.user&&!e.user.aotdAlert&&(this.setState({newAotd:!0}),this._hasClearedAlert=!1)}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){return this.state.communityReads&&this.state.communityReads.isLoading?r.createElement(o.default,null):r.createElement("div",{className:"home-screen_1sjipy"},this.state.newAotd?r.createElement(p.default,{isBusy:this.state.isLoadingNewItems,onClick:this._loadNewItems,text:"Show new Article of the Day"}):null,r.createElement(i.default,{aotd:this.state.communityReads&&this.state.communityReads.value.aotd,aotdHasAlert:this.state.communityReads&&this.state.communityReads.value.aotdHasAlert,articles:this.state.communityReads&&this.state.communityReads.value.articles,deviceType:this.props.deviceType,isLoading:this.state.isLoading,maxLength:this.state.maxLength,minLength:this.state.minLength,onChangeSort:this._changeSort,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onPostArticle:this.props.onPostArticle,onRateArticle:this.props.onRateArticle,onReadArticle:this.props.onReadArticle,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onShowTrackingAnimation:this.props.onShowTrackingAnimation,onToggleArticleStar:this.props.onToggleArticleStar,onViewAotdHistory:this.props.onViewAotdHistory,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,showTrackingAnimationPrompt:this.props.showTrackingAnimationPrompt,sort:this.state.sort,user:this.props.user}),this.state.isLoading?null:r.createElement(l.default,{pageNumber:this.state.communityReads.value.articles.pageNumber,pageCount:this.state.communityReads.value.articles.pageCount,onChange:this._changePage}))}}t.default=function(e,t){return{create:(t,n,r)=>({id:t,key:e,location:n,title:{default:"Article of the Day",seo:"Readup: Social Reading"}}),render:(e,n)=>r.createElement(h,Object.assign({},Object.assign(Object.assign(Object.assign({},t),n),{location:e.location})))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LeaderboardsViewParams=void 0;const r=n(1),a=n(27),i=n(573),o=n(6),s=n(14),l=n(95),c=n(577),u=n(93),p=n(250),h=n(11),d=n(15),f=n(13);var m,g;!function(e){e.Authors="Writers",e.Readers="Readers"}(m||(m={})),function(e){e.Readers="readers",e.Writers="writers"}(g=t.LeaderboardsViewParams||(t.LeaderboardsViewParams={}));class y extends r.Component{constructor(e){super(e),this._asyncTracker=new o.default,this._changeAuthorLeaderboardsTimeWindow=e=>{this.setState({authorLeaderboards:this.props.onGetAuthorLeaderboards({timeWindow:e},this._asyncTracker.addCallback(e=>{this.setState({authorLeaderboards:e})})),authorLeaderboardsTimeWindow:e})},this._changeView=e=>{const t=e;if(t!==this.props.view){switch(t){case m.Authors:this.setState({authorLeaderboards:this.props.onGetAuthorLeaderboards({timeWindow:this.state.authorLeaderboardsTimeWindow},this._asyncTracker.addCallback(e=>{this.setState({authorLeaderboards:e})})),readerLeaderboards:null});break;case m.Readers:this.setState({authorLeaderboards:null,authorLeaderboardsTimeWindow:p.default.PastWeek,readerLeaderboards:this.props.onGetReaderLeaderboards(this._asyncTracker.addCallback(e=>{this.setState({readerLeaderboards:e})}))})}this.props.onSetScreenState(this.props.screenId,()=>({location:{path:t===m.Readers?"/leaderboards/readers":"/leaderboards/writers"}}))}},this._headerSelectorItems=[{value:m.Authors},{value:m.Readers}],this._openExplainer=(e,t)=>{this.props.onOpenDialog(r.createElement(a.default,{closeButtonText:"Ok",onClose:this.props.onCloseDialog,size:"small",title:e},t))};const t=p.default.PastWeek;if(e.view===m.Readers){const e=this.props.onGetReaderLeaderboards(this._asyncTracker.addCallback(e=>{this.setState({readerLeaderboards:e,isScreenLoading:!1})}));this.state={isScreenLoading:e.isLoading,readerLeaderboards:e,authorLeaderboards:null,authorLeaderboardsTimeWindow:t}}else{const n=e.onGetAuthorLeaderboards({timeWindow:t},this._asyncTracker.addCallback(e=>{this.setState({authorLeaderboards:e,isScreenLoading:!1})}));this.state={isScreenLoading:n.isLoading,authorLeaderboards:n,authorLeaderboardsTimeWindow:t,readerLeaderboards:null}}this._asyncTracker.addCancellationDelegate(e.onRegisterArticleChangeHandler(t=>{if(t.isCompletionCommit)switch(e.view){case m.Authors:e.onGetAuthorLeaderboards({timeWindow:this.state.authorLeaderboardsTimeWindow},this._asyncTracker.addCallback(e=>{this.setState({authorLeaderboards:e})}));break;case m.Readers:e.onGetReaderLeaderboards(this._asyncTracker.addCallback(e=>{this.setState({readerLeaderboards:e})}))}}))}componentDidUpdate(e){!this.props.user!=!e.user&&this.props.view===m.Readers&&this.setState({readerLeaderboards:this.props.onGetReaderLeaderboards(this._asyncTracker.addCallback(e=>{this.setState({readerLeaderboards:e})}))})}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){var e,t;return this.state.isScreenLoading?r.createElement(s.default,null):r.createElement("div",{className:"leaderboards-screen_wuzsob"},r.createElement(u.default,{className:"main"},r.createElement(l.default,{disabled:(null===(e=this.state.authorLeaderboards)||void 0===e?void 0:e.isLoading)||(null===(t=this.state.readerLeaderboards)||void 0===t?void 0:t.isLoading),items:this._headerSelectorItems,onChange:this._changeView,value:this.props.view}),this.props.view===m.Authors?r.createElement(c.default,{onChangeTimeWindow:this._changeAuthorLeaderboardsTimeWindow,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onViewAuthor:this.props.onViewAuthor,rankings:this.state.authorLeaderboards,timeWindow:this.state.authorLeaderboardsTimeWindow}):r.createElement(i.default,{leaderboards:this.state.readerLeaderboards,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onOpenExplainer:this._openExplainer,onViewProfile:this.props.onViewProfile,user:this.props.user})))}}t.default=function(e,t){const n=d.findRouteByKey(f.default,h.default.Leaderboards);return{create:(t,n)=>({id:t,key:e,location:n,title:{default:"Leaderboards"}}),render:(e,a)=>r.createElement(y,{deviceType:t.deviceType,location:e.location,onBeginOnboarding:t.onBeginOnboarding,onCopyAppReferrerTextToClipboard:t.onCopyAppReferrerTextToClipboard,onCloseDialog:t.onCloseDialog,onCreateAbsoluteUrl:t.onCreateAbsoluteUrl,onCreateStaticContentUrl:t.onCreateStaticContentUrl,onOpenNewPlatformNotificationRequestDialog:t.onOpenNewPlatformNotificationRequestDialog,onGetAuthorLeaderboards:t.onGetAuthorLeaderboards,onGetReaderLeaderboards:t.onGetReaderLeaderboards,onNavTo:t.onNavTo,onOpenDialog:t.onOpenDialog,onRegisterArticleChangeHandler:t.onRegisterArticleChangeHandler,onSetScreenState:t.onSetScreenState,onViewAuthor:t.onViewAuthor,onViewProfile:t.onViewProfile,screenId:e.id,user:a.user,view:n.getPathParams(e.location.path).view===g.Readers?m.Readers:m.Authors})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(2);t.default=e=>r.createElement("div",{className:a("leaderboard-table_2664hr",{"fixed-height":null!=e.overflowLimit,overflowing:null!=e.overflowLimit&&e.rows.length>e.overflowLimit})},r.createElement("table",null,r.createElement("tbody",null,e.rows.map(e=>r.createElement("tr",{key:e.key},r.createElement("td",null,e.rank),r.createElement("td",null,r.createElement("span",{className:"cell-liner"},r.createElement("span",{className:"overflow-container"},e.name))),r.createElement("td",null,e.score))))))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.AllTime=0]="AllTime",e[e.PastWeek=1]="PastWeek",e[e.PastMonth=2]="PastMonth",e[e.PastYear=3]="PastYear"}(r||(r={})),t.default=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.App="App",e.Browser="Browser"}(r||(r={})),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(8);class i extends r.PureComponent{constructor(e){super(e),this._update=()=>{"reload"===this.props.updateAction&&this.setState({isReloading:!0}),this.props.onUpdate()},this.state={isReloading:!1}}render(){let e,t,n;switch(this.props.updateAction){case"download":e="Download App",n="arrow-right";break;case"reload":e="Reload App",t="refresh2"}return r.createElement(r.Fragment,null,r.createElement("p",null,"A new version of Readup is available"),r.createElement("p",null,r.createElement(a.default,{iconLeft:t,iconRight:n,onClick:this._update,state:this.state.isReloading?"busy":"normal",text:this.state.isReloading?"Reloading":e})))}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(14),i=n(6),o=n(23),s=n(26),l=n(35),c=n(22),u=n(95),p=n(15),h=n(13),d=n(11),f=n(71),m=n(10),g=n(150),y=n(94),v=n(27),b=n(151),w=n(8),_=n(33),E=n(152),S=n(17);var A;!function(e){e.History="History",e.Starred="Starred"}(A||(A={}));const x=[{value:A.Starred},{value:A.History}];class C extends r.Component{constructor(e){super(e),this._asyncTracker=new i.default,this._changeList=e=>{const t=e;t!==this.props.view&&(this.setState({articles:{isLoading:!0},isChangingList:!0}),this.props.onSetScreenState(this.props.screenId,()=>({location:{path:t===A.Starred?"/starred":"/history"}})),this.fetchArticles(t,1,this.state.minLength,this.state.maxLength))},this._changePageNumber=e=>{this.setState({articles:{isLoading:!0}}),this.fetchArticles(this.props.view,e,this.state.minLength,this.state.maxLength)},this._openImportDialog=()=>{this.props.onOpenDialog(r.createElement(v.default,{onClose:this.props.onCloseDialog,size:"small",title:"Save Articles to Readup"},r.createElement("img",{src:this.props.onCreateStaticContentUrl("/app/images/import-screenshot.png"),alt:"Save Screenshot",style:{maxWidth:"100%"}})))},this._openSignInPrompt=()=>{this.props.onOpenSignInPrompt("MyReads")},this._openExtensionStore=()=>{const e=E.getStoreUrl();e?window.open(e):this.props.onShowToast("Sorry, this browser is not supported.",S.Intent.Neutral)};const t=e.user?this.fetchArticles(e.view,1,null,null):{isLoading:!1,value:{items:[],totalCount:0,pageNumber:0,pageSize:0,pageCount:0}};this.state={articles:t,isChangingList:!1,isScreenLoading:t.isLoading,maxLength:null,minLength:null,newStarsCount:0},this._asyncTracker.addCancellationDelegate(e.onRegisterArticleChangeHandler(e=>{this.state.articles.value&&this.state.articles.value.items.some(t=>t.id===e.article.id)&&this.setState(o.default(t=>{t.articles.value.items.forEach((t,n,r)=>{t.id===e.article.id&&r.splice(r.indexOf(t),1,Object.assign(Object.assign(Object.assign({},t),e.article),{dateStarred:e.article.dateStarred}))})}))})),this._asyncTracker.addCancellationDelegate(e.onRegisterArticleStarredHandler(e=>{this.state.articles.value&&this.setState(o.default(t=>{const n=t.articles.value.items,r=n.findIndex(t=>t.id===e.article.id),a=-1!==r?r:40===n.length?n.length-1:null;null!=a&&n.splice(a,1),n.unshift(e.article)}))})),e.onRegisterNewStarsHandler&&e.onRegisterNewStarsHandler(e=>{this.props.view===A.Starred&&(this.setState({minLength:null,maxLength:null,newStarsCount:e}),this.fetchArticles(this.props.view,1,null,null))})}fetchArticles(e,t,n,r){let a;switch(e){case A.History:a=this.props.onGetUserArticleHistory;break;case A.Starred:a=this.props.onGetStarredArticles}return a({pageNumber:t,minLength:n,maxLength:r},this._asyncTracker.addCallback(e=>{this.setState({articles:e,isChangingList:!1,isScreenLoading:!1,newStarsCount:0})}))}renderStickyNote(){return r.createElement(y.default,null,this.props.view===A.Starred?r.createElement(r.Fragment,null,r.createElement("strong",null,"Star the articles you want to read."),this.props.appPlatform===b.AppPlatform.Ios?r.createElement("span",null,"Pro tip: Save articles from other apps using the Readup share extension."," ",r.createElement("span",{onClick:this._openImportDialog,style:{textDecoration:"underline",cursor:"pointer"}},"Learn more.")):r.createElement("span",null,"Pro tip: Save articles from your web browser with one click using the Readup"," ",r.createElement(w.default,{onClick:this._openExtensionStore},"browser extension"),".")):r.createElement(r.Fragment,null,r.createElement("strong",null,"Your reading history is private."),r.createElement("span",null,"You choose what you want to post.")))}componentDidUpdate(e){this.props.user&&!e.user&&this.setState({articles:this.fetchArticles(this.props.view,1,null,null),isChangingList:!1,isScreenLoading:!0,maxLength:null,minLength:null,newStarsCount:0})}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){return this.props.user?this.state.isScreenLoading?r.createElement(a.default,null):r.createElement("div",{className:"my-reads-screen_56ihtk"},this.state.newStarsCount?r.createElement(f.default,{isBusy:!0,text:`Loading ${this.state.newStarsCount} new ${m.formatCountable(this.state.newStarsCount,"article")}`}):null,r.createElement("div",{className:"controls"},r.createElement(u.default,{disabled:this.state.articles.isLoading,items:x,onChange:this._changeList,value:this.props.view})),this.state.articles.isLoading?r.createElement(a.default,null):this.state.articles.value.items.length?r.createElement(r.Fragment,null,r.createElement(s.default,null,this.state.articles.value.items.map(e=>r.createElement("li",{key:e.id},r.createElement(c.default,{article:e,deviceType:this.props.deviceType,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onPost:this.props.onPostArticle,onRateArticle:this.props.onRateArticle,onRead:this.props.onReadArticle,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleStar:this.props.onToggleArticleStar,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,user:this.props.user})))),this.state.articles.value.pageNumber<2?this.renderStickyNote():null,r.createElement(l.default,{pageNumber:this.state.articles.value.pageNumber,pageCount:this.state.articles.value.pageCount,onChange:this._changePageNumber})):r.createElement(g.default,null,this.renderStickyNote())):r.createElement(_.default,{style:"normal"},r.createElement("p",null,r.createElement(w.default,{onClick:this._openSignInPrompt},"Log in")," to view your saved articles and reading history."))}}t.default=function(e,t){const n=p.findRouteByKey(h.default,d.default.MyReads);return{create:(t,n)=>({id:t,key:e,location:n,title:{default:"My Reads"}}),render:(e,a)=>r.createElement(C,Object.assign({},Object.assign(Object.assign({},t),{view:"starred"===n.getPathParams(e.location.path).view?A.Starred:A.History,screenId:e.id,user:a.user})))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathParams=void 0;const r=n(1),a=n(14),i=n(239),o=n(15),s=n(13),l=n(11),c=n(255),u=n(149),p=n(33),h=n(93),d=n(89),f=n(7),m=n(2),g=n(580),y=n(95),v=n(581),b=n(256),w=n(23);var _;!function(e){e.Articles="Articles",e.Indeterminate="Indeterminate",e.Posts="Posts"}(_||(_={}));const E=[{value:_.Posts},{value:_.Articles}];class S extends b.default{constructor(e){super(e),this._changeArticles=e=>{this.setState({view:_.Articles,isFollowingButtonBusy:this.state.isFollowingButtonBusy,articles:e})},this._changeArticlesPageNumber=e=>{this.setState({view:_.Articles,isFollowingButtonBusy:this.state.isFollowingButtonBusy,articles:{isLoading:!0}}),this.fetchArticles()},this._changePosts=e=>{this.setState({view:_.Posts,isFollowingButtonBusy:this.state.isFollowingButtonBusy,posts:e})},this._changePostsPageNumber=e=>{this.setState({view:_.Posts,isFollowingButtonBusy:this.state.isFollowingButtonBusy,posts:{isLoading:!0}}),this.fetchPosts(e)},this._changeView=e=>{const t=e;if(t!==this.state.view)switch(t){case _.Articles:this.setState({view:t,isFollowingButtonBusy:this.state.isFollowingButtonBusy,articles:{isLoading:!0}}),this.fetchArticles();break;case _.Posts:this.setState({view:t,isFollowingButtonBusy:this.state.isFollowingButtonBusy,posts:{isLoading:!0}}),this.fetchPosts(1)}},e.profile.isLoading||!e.profile.value?this.state={view:_.Indeterminate,isFollowingButtonBusy:!1}:this.state={view:_.Posts,isFollowingButtonBusy:!1,posts:this.fetchPosts(1)}}fetchArticles(){return this.props.onGetAuthorArticles({maxLength:null,minLength:null,pageNumber:1,pageSize:40,slug:this.props.profile.value.authorProfile.slug},this._asyncTracker.addCallback(e=>{this.setState({view:_.Articles,isFollowingButtonBusy:this.state.isFollowingButtonBusy,articles:e})}))}fetchPosts(e){return this.props.onGetPosts({userName:this.props.userName,pageNumber:e,pageSize:40},this._asyncTracker.addCallback(e=>{this.setState({view:_.Posts,isFollowingButtonBusy:this.state.isFollowingButtonBusy,posts:e})}))}renderList(){switch(this.state.view){case _.Indeterminate:return null;case _.Articles:return r.createElement(v.ArticleList,{articles:this.state.articles,emptyListMessage:"No articles found.",deviceType:this.props.deviceType,onChangeArticles:this._changeArticles,onChangePageNumber:this._changeArticlesPageNumber,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onPostArticle:this.props.onPostArticle,onRateArticle:this.props.onRateArticle,onReadArticle:this.props.onReadArticle,onRegisterArticleChangeHandler:this.props.onRegisterArticleChangeHandler,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleArticleStar:this.props.onToggleArticleStar,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,paginate:!1,userAccount:this.props.userAccount});case _.Posts:return r.createElement(g.PostList,{addNewPosts:this.isOwnProfile(),deviceType:this.props.deviceType,emptyListMessage:this.isOwnProfile()?"You haven't posted anything yet.":this.props.userName+" hasn't posted anything yet.",highlightedCommentId:this.props.highlightedCommentId,highlightedPostId:this.props.highlightedPostId,onChangePageNumber:this._changePostsPageNumber,onChangePosts:this._changePosts,onCloseDialog:this.props.onCloseDialog,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onOpenDialog:this.props.onOpenDialog,onPostArticle:this.props.onPostArticle,onRateArticle:this.props.onRateArticle,onReadArticle:this.props.onReadArticle,onRegisterArticleChangeHandler:this.props.onRegisterArticleChangeHandler,onRegisterArticlePostedHandler:this.props.onRegisterArticlePostedHandler,onRegisterCommentUpdatedHandler:this.props.onRegisterCommentUpdatedHandler,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleArticleStar:this.props.onToggleArticleStar,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,onViewThread:this.props.onViewThread,paginate:!!this.props.userAccount,posts:this.state.posts,userAccount:this.props.userAccount})}}componentDidUpdate(e){this._profileUserChangedOrUserChanged(e)&&this.setState({view:_.Indeterminate,isFollowingButtonBusy:!1},()=>{this.props.onReloadProfile(this.props.screenId,this.props.userName,this.props.userAccount)}),this.props.profile.value&&e.profile.isLoading&&this.setState({view:_.Posts,isFollowingButtonBusy:this.state.isFollowingButtonBusy,posts:this.fetchPosts(1)})}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){if(this.props.profile.isLoading)return r.createElement(a.default,null);if(!this.props.profile.value)return r.createElement(p.default,{style:"normal"},r.createElement("p",null,"Profile not found."));const e=this.isOwnProfile();let t;switch(this.state.view){case _.Articles:t=this.state.articles.isLoading;break;case _.Indeterminate:t=!0;break;case _.Posts:t=this.state.posts.isLoading}return r.createElement("div",{className:"profile-screen_1u1j1e"},r.createElement(h.default,{className:"main"},r.createElement("div",{className:"profile","data-nosnippet":!0},this.props.profile.value.authorProfile?r.createElement("div",{className:"author"},this.props.profile.value.authorProfile.name,r.createElement(f.default,{name:"verified-user",title:"Verified"})):null,r.createElement("div",{className:m("user-name",{small:!!this.props.profile.value.authorProfile})},r.createElement("span",{className:"name"},"@",this.props.profile.value.userName),this.props.profile.value.leaderboardBadge!==u.default.None?r.createElement(i.default,{badge:this.props.profile.value.leaderboardBadge}):null),!e&&this.props.userAccount?r.createElement(c.default,{following:this.props.profile.value,isBusy:this.state.isFollowingButtonBusy,onFollow:this._followUser,onUnfollow:this._unfollowUser,size:"large"}):null),this.props.profile.value.authorProfile?r.createElement("div",{className:"controls","data-nosnippet":!0},r.createElement(y.default,{disabled:t,items:E,onChange:this._changeView,style:"compact",value:this.state.view})):null,this.renderList()),r.createElement(d.JsonLd,{item:{"@context":"https://schema.org","@type":"ProfilePage",description:"Join Readup to read with "+this.props.profile.value.userName,name:this.props.profile.value.userName}}))}}function A(e){const t=o.findRouteByKey(s.default,l.default.Profile).getPathParams(e.path);return{highlightedCommentId:"comment"===t.highlightedType?t.highlightedId:null,highlightedPostId:"post"===t.highlightedType?t.highlightedId:null,userName:t.userName}}function x(e,t){return e.isLoading?{default:"Loading..."}:e.value?{default:e.value.userName===(null==t?void 0:t.name)?"My Profile":e.value.authorProfile?"Writer":"Reader",seo:e.value.userName===(null==t?void 0:t.name)?"My Profile":`@${e.value.userName} • Readup`}:{default:"Profile not found"}}t.getPathParams=A;const C=(e,t)=>w.default(n=>{n.componentState=e,n.title=x(e,t)});t.default=function(e,t){const n=Object.assign(Object.assign({},t),{createNewScreenState:C});return{create:(n,r,a)=>{const i=t.onGetProfile({userName:A(r).userName},e=>{t.onSetScreenState(n,C(e,a.user))});return{id:n,componentState:i,key:e,location:r,title:x(i,a.user)}},render:(e,a)=>{const i=A(e.location);return r.createElement(S,Object.assign({},Object.assign(Object.assign(Object.assign({},t),i),{location:e.location,onReloadProfile:b.reloadProfile.bind(null,n),onUpdateProfile:b.updateProfile.bind(null,n),profile:e.componentState,screenId:e.id,userAccount:a.user})))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(12);class i extends r.PureComponent{constructor(e){super(e),this._follow=()=>{this.setState({isBusy:!0}),this.props.onFollow(this.props.following).then(()=>{this.setState({isBusy:!1,isHovering:!1})})},this._startHovering=()=>{this.setState({isHovering:!0})},this._stopHovering=()=>{this.setState({isHovering:!1})},this._unfollow=()=>{this.setState({isBusy:!0}),this.props.onUnfollow(this.props.following).then(()=>{this.setState({isBusy:!1})})},this.state={isBusy:!1,isHovering:!1}}render(){const e=this.state.isBusy||this.props.isBusy;return r.createElement(a.default,{className:"follow-button_bz2yn",text:this.props.following.isFollowed?this.state.isHovering?"Unfollow":"Following":"Follow",state:e?"busy":"normal",size:this.props.size,intent:this.props.following.isFollowed?this.state.isHovering&&!e?"warning":"default":"loud",onClick:this.props.following.isFollowed?this._unfollow:this._follow,onMouseEnter:this._startHovering,onMouseLeave:this._stopHovering})}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateProfile=t.reloadProfile=t.noop=void 0;const r=n(1),a=n(6),i=n(10),o=n(582),s=n(583),l=n(23),c=n(224);class u extends r.Component{constructor(e){super(e),this._asyncTracker=new a.default,this._openGetFollowersDialog=()=>{this.props.onOpenDialog(r.createElement(s.default,{onCloseDialog:this.props.onCloseDialog,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,userName:this.props.userAccount.name}))},this._showFollowees=()=>{this.props.onOpenDialog(r.createElement(o.default,{onClearAlerts:this.props.onClearAlerts,onCloseDialog:this.props.onCloseDialog,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onFollowUser:this._followUser,onGetFollowings:this.props.onGetFollowees,onUnfollowUser:this._unfollowUser,onViewProfile:this.props.onViewProfile,title:"Following",userAccount:this.props.userAccount}))},this._showFollowers=()=>{const e=this.isOwnProfile();this.props.onOpenDialog(r.createElement(o.default,{clearFollowersAlerts:e,onClearAlerts:this.props.onClearAlerts,onCloseDialog:this.props.onCloseDialog,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onFollowUser:this._followUser,onGetFollowings:e=>this.props.onGetFollowers({userName:this.props.userName},e),onUnfollowUser:this._unfollowUser,onViewProfile:this.props.onViewProfile,title:e?"Followers":"Following "+this.props.userName,userAccount:this.props.userAccount}))},this._followUser=e=>this.props.onFollowUser(e).then(()=>{e.userName===this.props.userName&&this.setIsFollowed()}),this._unfollowUser=e=>this.props.onUnfollowUser(e).then(()=>{e.userName===this.props.userName&&this.props.onUpdateProfile(this.props.screenId,{isFollowed:!1,followerCount:this.props.profile.value.followerCount-1})}),this._asyncTracker.addCancellationDelegate(this.props.onRegisterFolloweeCountChangedHandler(e=>{this.props.profile.value&&this.isOwnProfile()&&this.props.onUpdateProfile(this.props.screenId,{followeeCount:Math.max(this.props.profile.value.followeeCount+(e===c.default.Increment?1:-1),0)})}))}isOwnProfile(){return this.props.userAccount&&this.props.userAccount.name===this.props.userName}setIsFollowed(){this.props.onUpdateProfile(this.props.screenId,{isFollowed:!0,followerCount:this.props.profile.value.followerCount+1})}_getFollowersText(){return this.props.profile.value.followerCount+" "+i.formatCountable(this.props.profile.value.followerCount,"follower")}_getFolloweesText(){return"Following "+this.props.profile.value.followeeCount}_profileUserChangedOrUserChanged(e){return this.props.userName!==e.userName||(this.props.userAccount?!e.userAccount||e.userAccount.id!==this.props.userAccount.id:!!e.userAccount)}componentDidUpdate(e){this._profileUserChangedOrUserChanged(e)&&this.props.onReloadProfile(this.props.screenId,this.props.userName,this.props.userAccount)}}t.default=u,t.noop=()=>{},t.reloadProfile=(e,t,n,r)=>(e.onSetScreenState(t,e.createNewScreenState({isLoading:!0},r)),new Promise((a,i)=>{e.onGetProfile({userName:n},n=>{e.onSetScreenState(t,e.createNewScreenState(n,r)),n.value?a(n.value):i(n.errors)})})),t.updateProfile=(e,t,n)=>{e.onSetScreenState(t,l.default(e=>{e.componentState.value=Object.assign(Object.assign({},e.componentState.value),n)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(14),i=n(6),o=n(23),s=n(26),l=n(35),c=n(22),u=n(95),p=n(60);var h;!function(e){e.Recent="Recent",e.BestEver="Best Ever"}(h||(h={}));class d extends r.Component{constructor(e){super(e),this._asyncTracker=new i.default,this._changeList=e=>{const t=e;t!==this.state.view&&(this.setState({articles:{isLoading:!0},view:t}),this.fetchArticles(t,1,this.state.minLength,this.state.maxLength))},this._changePageNumber=e=>{this.setState({articles:{isLoading:!0}}),this.fetchArticles(this.state.view,e,this.state.minLength,this.state.maxLength)},this._headerSelectorItems=[{value:h.Recent},{value:h.BestEver}];const t=h.Recent,n=this.fetchArticles(t,1,null,null);this.state={articles:n,view:t,isScreenLoading:n.isLoading,maxLength:null,minLength:null},this._asyncTracker.addCancellationDelegate(e.onRegisterArticleChangeHandler(e=>{this.state.articles.value&&this.state.articles.value.items.some(t=>t.id===e.article.id)&&this.setState(o.default(t=>{t.articles.value.items.forEach((t,n,r)=>{t.id===e.article.id&&r.splice(r.indexOf(t),1,Object.assign(Object.assign(Object.assign({},t),e.article),{dateStarred:e.article.dateStarred}))})}))}))}fetchArticles(e,t,n,r){switch(e){case h.Recent:return this.props.onGetAotdHistory({maxLength:r,minLength:n,pageNumber:t},this._asyncTracker.addCallback(e=>{this.setState({articles:e,isScreenLoading:!1})}));case h.BestEver:return this.props.onGetCommunityReads({maxLength:r,minLength:n,pageNumber:t,pageSize:40,sort:p.default.Top},this._asyncTracker.addCallback(e=>{this.setState({articles:{isLoading:!1,value:e.value.articles},isScreenLoading:!1})}))}}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){return this.state.isScreenLoading?r.createElement(a.default,null):r.createElement("div",{className:"aotd-history-screen_lpelxe"},r.createElement("div",{className:"controls"},r.createElement(u.default,{disabled:this.state.articles.isLoading,items:this._headerSelectorItems,onChange:this._changeList,value:this.state.view})),this.state.articles.isLoading?r.createElement(a.default,null):r.createElement(r.Fragment,null,r.createElement(s.default,null,this.state.articles.value.items.map(e=>r.createElement("li",{key:e.id},r.createElement(c.default,{article:e,deviceType:this.props.deviceType,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onPost:this.props.onPostArticle,onRateArticle:this.props.onRateArticle,onRead:this.props.onReadArticle,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleStar:this.props.onToggleArticleStar,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,user:this.props.user})))),r.createElement(l.default,{pageNumber:this.state.articles.value.pageNumber,pageCount:this.state.articles.value.pageCount,onChange:this._changePageNumber})))}}t.default=function(e,t){return{create:(t,n)=>({id:t,key:e,location:n,title:{default:"Winners"}}),render:(e,n)=>r.createElement(d,Object.assign({},Object.assign(Object.assign({},t),{location:e.location,user:n.user})))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(585),i=n(8),o=n(7),s=n(586),l=n(587),c=n(588),u=n(246),p=n(6),h=n(14),d=n(220),f=n(34),m=n(589),g=n(20),y=n(10),v=n(590),b=n(30),w=n(591),_=n(12),E=n(15),S=n(13),A=n(11),x=n(593),C=n(594),k=n(597),O=n(163);class P extends r.PureComponent{constructor(e){super(e),this._asyncTracker=new p.default,this._changeTimeZone=(e,t)=>this.props.onChangeTimeZone({id:e}).then(()=>{this.setState({settings:Object.assign(Object.assign({},this.state.settings),{value:Object.assign(Object.assign({},this.state.settings.value),{timeZoneDisplayName:t})})})}),this._linkAuthServiceAccount=e=>this.props.onLinkAuthServiceAccount(e).then(e=>(this._mergeAuthServiceAccount(e),e)),this._mergeAuthServiceAccount=e=>{const t=this.state.settings.value.authServiceAccounts.slice(),n=t.findIndex(t=>t.identityId===e.identityId);-1!==n?t.splice(n,1,e):t.unshift(e),this.setState({highlightedAuthServiceAccountId:-1===n?e.identityId:this.state.highlightedAuthServiceAccountId,settings:Object.assign(Object.assign({},this.state.settings),{value:Object.assign(Object.assign({},this.state.settings.value),{authServiceAccounts:t})})})},this._openAccountDeletionDialog=()=>{this.props.onOpenDialog(r.createElement(x.AccountDeletionDialog,{onCloseDialog:this.props.onCloseDialog,onDeleteAccount:this.props.onDeleteAccount,onShowToast:this.props.onShowToast}))},this._openChangePasswordDialog=()=>{this.props.onOpenDialog(r.createElement(s.default,{onCloseDialog:this.props.onCloseDialog,onChangePassword:this.props.onChangePassword,onShowToast:this.props.onShowToast}))},this._openChangeEmailAddressDialog=()=>{this.props.onOpenDialog(r.createElement(l.default,{currentEmailAddress:this.props.user.email,onCloseDialog:this.props.onCloseDialog,onChangeEmailAddress:this.props.onChangeEmailAddress,onShowToast:this.props.onShowToast}))},this._openChangeTimeZoneDialog=()=>{this.props.onOpenDialog(r.createElement(c.default,{currentTimeZoneId:this.props.user.timeZoneId,onCloseDialog:this.props.onCloseDialog,onChangeTimeZone:this._changeTimeZone,onGetTimeZones:this.props.onGetTimeZones,onShowToast:this.props.onShowToast}))},this._openLinkAccountDialog=()=>{this.props.onOpenDialog(r.createElement(v.default,{onCloseDialog:this.props.onCloseDialog,onLinkAuthServiceAccount:this._linkAuthServiceAccount,onShowToast:this.props.onShowToast}))},this._openSetPasswordDialog=()=>{this.props.onOpenDialog(r.createElement(m.default,{email:this.props.user.email,onCloseDialog:this.props.onCloseDialog,onSendPasswordCreationEmail:this.props.onSendPasswordCreationEmail,onShowToast:this.props.onShowToast}))},this._signOut=()=>{this.setState(e=>e.isSigningOut?null:(this._asyncTracker.addPromise(this.props.onSignOut()).then(()=>{this.setState({isSigningOut:!1})}).catch(e=>{var t;(null===(t=e)||void 0===t?void 0:t.isCancelled)||this.setState({isSigningOut:!1})}),{isSigningOut:!0}))},this.state={highlightedAuthServiceAccountId:0,isSigningOut:!1,settings:e.onGetSettings(this._asyncTracker.addCallback(e=>{this.setState({settings:e})}))},this._asyncTracker.addCancellationDelegate(e.onRegisterNotificationPreferenceChangedEventHandler(e=>{this.setState({settings:Object.assign(Object.assign({},this.state.settings),{value:Object.assign(Object.assign({},this.state.settings.value),{notificationPreference:e})})})}))}componentDidUpdate(e){this.props.user.timeZoneId!==e.user.timeZoneId&&this.props.onGetSettings(this._asyncTracker.addCallback(e=>{this.setState({settings:e})}))}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){const e=this.props.user;return r.createElement("div",{className:"settings-page_ejwkk"},this.props.user.role===O.default.Admin?r.createElement(_.default,{onClick:()=>this.props.onNavTo({key:A.default.Admin}),className:"admin-button",text:"Admin",size:"large",intent:"loud",display:"block"}):null,r.createElement(k.default,{iconName:"question-circle",screenKey:A.default.Faq,onNavTo:this.props.onNavTo},"Got a question? We’re here to help"),r.createElement(k.default,{iconName:"chart",screenKey:A.default.Stats,onNavTo:this.props.onNavTo},"View your personal reading stats"),this.state.settings.isLoading?r.createElement(h.default,null):r.createElement(r.Fragment,null,r.createElement("div",{className:"setting"},r.createElement("div",{className:"header"},r.createElement("span",{className:"label"},"Reader Name"),r.createElement(a.default,null),e.isPasswordSet?r.createElement(i.default,{text:"Change Password",iconLeft:"locked",onClick:this._openChangePasswordDialog}):r.createElement(i.default,{iconLeft:"locked",onClick:this._openSetPasswordDialog,text:"Set Password"})),r.createElement("div",{className:"section"},e.name)),r.createElement("div",{className:"setting"},r.createElement("div",{className:"header"},r.createElement("span",{className:"label"},"Email Address"),r.createElement(a.default,null),r.createElement(i.default,{text:"Change",iconLeft:"write",onClick:this._openChangeEmailAddressDialog})),r.createElement("div",{className:"section"},e.email,r.createElement("div",{className:"indicators"},e.isEmailConfirmed?r.createElement("div",{className:"status on"},r.createElement(o.default,{name:"checkmark"}),"Confirmed"):r.createElement(r.Fragment,null,r.createElement("div",{className:"status warn"},r.createElement(o.default,{name:"exclamation"}),"Not Confirmed"),r.createElement("div",{className:"status"},r.createElement(u.default,{icon:"email",onClick:this.props.onResendConfirmationEmail,text:"Send confirmation email"})))))),r.createElement("div",{className:"setting"},r.createElement("div",{className:"header"},r.createElement("span",{className:"label"},"Display")),r.createElement("div",{className:"section"},r.createElement(w.default,{onChangeDisplayPreference:this.props.onChangeDisplayPreference,preference:Object.assign(Object.assign({},this.state.settings.value.displayPreference),{theme:this.props.displayTheme})}))),r.createElement("div",{className:"setting"},r.createElement("div",{className:"header"},r.createElement("span",{className:"label"},"Notifications")),r.createElement("div",{className:"section"},r.createElement(d.default,{preference:this.state.settings.value.notificationPreference,onChangeNotificationPreference:this.props.onChangeNotificationPreference}))),r.createElement("div",{className:"setting"},r.createElement("div",{className:"header"},r.createElement("span",{className:"label"},"Time Zone"),r.createElement(a.default,null),r.createElement(i.default,{text:"Change",iconLeft:"write",onClick:this._openChangeTimeZoneDialog})),r.createElement("div",{className:"section"},this.state.settings.value.timeZoneDisplayName)),r.createElement("div",{className:"setting accounts"},r.createElement("div",{className:"header"},r.createElement("span",{className:"label"},"Linked Accounts"),r.createElement(a.default,null),r.createElement(i.default,{text:"Add",iconLeft:"plus",onClick:this._openLinkAccountDialog})),r.createElement("div",{className:"section"},this.state.settings.value.authServiceAccounts.length?this.state.settings.value.authServiceAccounts.map(e=>{let t,n;switch(e.provider){case f.default.Apple:n="Apple",t=e.emailAddress;break;case f.default.Twitter:n="Twitter",t="@"+e.handle}return r.createElement(b.default,{className:"account",highlight:e.identityId===this.state.highlightedAuthServiceAccountId,key:e.identityId},r.createElement("div",{className:"provider"},n),r.createElement("div",{className:"date"},"Added on"," ",g.DateTime.fromISO(y.formatIsoDateAsUtc(e.dateAssociated)).toLocaleString(g.DateTime.DATE_MED)),r.createElement("div",{className:"identity"},t))}):"No linked accounts found.")),r.createElement("div",{className:"setting"},r.createElement("div",{className:"header"},r.createElement("span",{className:"label"},"Writer Account")),r.createElement("div",{className:"section"},r.createElement(C.WriterAccountControl,{authorProfile:this.state.settings.value.authorProfile,onCloseDialog:this.props.onCloseDialog,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onOpenDialog:this.props.onOpenDialog,onOpenTweetComposer:this.props.onOpenTweetComposer,onShowToast:this.props.onShowToast,onSubmitAuthorEmailVerificationRequest:this.props.onSubmitAuthorEmailVerificationRequest}))),r.createElement("div",{className:"setting"},r.createElement("div",{className:"header"},r.createElement("span",{className:"label"},"Current Session")),r.createElement("div",{className:"section"},r.createElement(_.default,{intent:"loud",onClick:this._signOut,state:this.state.isSigningOut?"busy":"normal",style:"preferred",text:"Log Out"}))),r.createElement("div",{className:"setting"},r.createElement("div",{className:"header"},r.createElement("span",{className:"label"},"Legal")),r.createElement("div",{className:"section"},r.createElement(i.default,{href:E.findRouteByKey(S.default,A.default.PrivacyPolicy).createUrl(),onClick:this.props.onViewPrivacyPolicy,text:"Privacy Policy and Terms of Use"}))),r.createElement("div",{className:"setting"},r.createElement("div",{className:"header"},r.createElement("span",{className:"label"},"Account Deletion")),r.createElement("div",{className:"section"},r.createElement(i.default,{onClick:this._openAccountDeletionDialog,text:"Delete My Account"})))))}}t.default=function(e,t){return{create:(t,n)=>({id:t,key:e,location:n,title:{default:"Settings"}}),render:(e,n)=>r.createElement(P,{displayTheme:n.displayTheme,onCloseDialog:t.onCloseDialog,onChangeDisplayPreference:t.onChangeDisplayPreference,onChangeEmailAddress:t.onChangeEmailAddress,onChangeNotificationPreference:t.onChangeNotificationPreference,onChangePassword:t.onChangePassword,onChangeTimeZone:t.onChangeTimeZone,onCreateAbsoluteUrl:t.onCreateAbsoluteUrl,onDeleteAccount:t.onDeleteAccount,onOpenDialog:t.onOpenDialog,onOpenTweetComposer:t.onOpenTweetComposer,onGetSettings:t.onGetSettings,onGetTimeZones:t.onGetTimeZones,onRegisterNotificationPreferenceChangedEventHandler:t.onRegisterNotificationPreferenceChangedEventHandler,onLinkAuthServiceAccount:t.onLinkAuthServiceAccount,onNavTo:t.onNavTo,onResendConfirmationEmail:t.onResendConfirmationEmail,onSendPasswordCreationEmail:t.onSendPasswordCreationEmail,onShowToast:t.onShowToast,onSignOut:t.onSignOut,onSubmitAuthorEmailVerificationRequest:t.onSubmitAuthorEmailVerificationRequest,onViewPrivacyPolicy:t.onViewPrivacyPolicy,user:n.user})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(14),i=n(6),o=n(23),s=n(26),l=n(35),c=n(22),u=n(33),p=n(89),h=n(64),d=n(15),f=n(13),m=n(11),g=n(93);class y extends r.Component{constructor(e){super(e),this._asyncTracker=new i.default,this._changePageNumber=e=>{this.setState({articles:{isLoading:!0}}),this.fetchArticles(e)};const t=this.fetchArticles(1);this.state={articles:t,isScreenLoading:e.profile.isLoading||t.isLoading},this._asyncTracker.addCancellationDelegate(e.onRegisterArticleChangeHandler(e=>{this.state.articles.value&&this.state.articles.value.items.some(t=>t.id===e.article.id)&&this.setState(o.default(t=>{t.articles.value.items.forEach((t,n,r)=>{t.id===e.article.id&&r.splice(r.indexOf(t),1,Object.assign(Object.assign(Object.assign({},t),e.article),{dateStarred:e.article.dateStarred}))})}))}))}fetchArticles(e){return this.props.onGetAuthorArticles({slug:this.props.authorSlug,pageSize:40,pageNumber:e,minLength:null,maxLength:null},this._asyncTracker.addCallback(e=>{this.setState({articles:e,isScreenLoading:this.props.profile.isLoading})}))}componentDidUpdate(e){!e.profile.isLoading||this.props.profile.isLoading||this.state.articles.isLoading||this.setState({isScreenLoading:!1})}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){return this.state.isScreenLoading?r.createElement(a.default,null):this.props.profile.value?r.createElement("div",{className:"author-screen_2cri7v"},r.createElement(g.default,{className:"main"},r.createElement("div",{className:"profile"},r.createElement("h1",null,this.props.profile.value.name)),this.state.articles.isLoading?r.createElement(a.default,null):this.state.articles.value?this.state.articles.value.items.length?r.createElement(r.Fragment,null,r.createElement(s.default,null,this.state.articles.value.items.map(e=>r.createElement("li",{key:e.id},r.createElement(c.default,{article:e,deviceType:this.props.deviceType,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onPost:this.props.onPostArticle,onRateArticle:this.props.onRateArticle,onRead:this.props.onReadArticle,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleStar:this.props.onToggleArticleStar,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,showAotdMetadata:!1,user:this.props.user})))),r.createElement(l.default,{pageNumber:this.state.articles.value.pageNumber,pageCount:this.state.articles.value.pageCount,onChange:this._changePageNumber})):r.createElement(u.default,{style:"normal"},r.createElement("p",null,"No articles found.")):r.createElement(u.default,{style:"normal"},r.createElement("p",null,"Error loading articles.")),r.createElement(p.JsonLd,{item:{"@context":"https://schema.org","@type":"ProfilePage",description:"Articles written by "+this.props.profile.value.name,name:this.props.profile.value.name}}))):r.createElement(u.default,{style:"normal"},r.createElement("p",null,"Author not found."))}}function v(e){return d.findRouteByKey(f.default,m.default.Author).getPathParams(e.path).slug}function b(e){return e.isLoading?{default:"Loading..."}:e.value?{default:"Writer",seo:e.value.name+" • Readup"}:{default:"Author not found"}}t.default=function(e,t){return{create:(n,r,a)=>{const i=t.onGetAuthorProfile({slug:v(r)},e=>{var r,a;(null===(r=e.value)||void 0===r?void 0:r.userName)?t.onViewProfile(null===(a=e.value)||void 0===a?void 0:a.userName,{method:h.NavMethod.Replace,screenId:n}):t.onSetScreenState(n,o.default(t=>{t.componentState=e,t.title=b(e)}))});return{id:n,componentState:i,key:e,location:r,title:b(i)}},render:(e,n)=>r.createElement(y,{authorSlug:v(e.location),deviceType:t.deviceType,location:e.location,onBeginOnboarding:t.onBeginOnboarding,onCopyAppReferrerTextToClipboard:t.onCopyAppReferrerTextToClipboard,onCreateAbsoluteUrl:t.onCreateAbsoluteUrl,onCreateStaticContentUrl:t.onCreateStaticContentUrl,onGetAuthorArticles:t.onGetAuthorArticles,onNavTo:t.onNavTo,onOpenNewPlatformNotificationRequestDialog:t.onOpenNewPlatformNotificationRequestDialog,onPostArticle:t.onPostArticle,onRateArticle:t.onRateArticle,onReadArticle:t.onReadArticle,onRegisterArticleChangeHandler:t.onRegisterArticleChangeHandler,onShare:t.onShare,onShareViaChannel:t.onShareViaChannel,onToggleArticleStar:t.onToggleArticleStar,onViewComments:t.onViewComments,onViewProfile:t.onViewProfile,profile:e.componentState,user:n.user})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(14),i=n(71),o=n(10),s=n(26),l=n(153),c=n(35),u=n(150),p=n(94),h=n(41),d=n(38),f=n(6),m=n(23);class g extends r.Component{constructor(e){super(e),this._asyncTracker=new f.default,this._changePage=e=>{this.setState({isLoadingNewItems:!1,newItemCount:0,replies:this.fetchReplies(e)})},this._loadNewItems=()=>{this.setState({isLoadingNewItems:!0}),this.fetchReplies(1)};const t=this.fetchReplies(1);this.state={isLoadingNewItems:!1,isScreenLoading:t.isLoading,newItemCount:0,replies:t},this._asyncTracker.addCancellationDelegate(e.onRegisterArticleChangeHandler(e=>{this.state.replies.value&&this.state.replies.value.items.some(t=>t.article.id===e.article.id)&&this.setState(m.default(t=>{t.replies.value.items.forEach((t,n,r)=>{t.article.id===e.article.id&&(t.article=Object.assign(Object.assign(Object.assign({},t.article),e.article),{dateStarred:e.article.dateStarred}))})}))}))}checkAlertState(){let e=h.default.Reply;d.hasAnyAlerts(this.props.user,e)&&this.props.onClearAlerts(e)}fetchReplies(e){return this.props.onGetReplyPosts({pageNumber:e},this._asyncTracker.addCallback(e=>{this.setState({isLoadingNewItems:!1,isScreenLoading:!1,replies:e,newItemCount:0}),this.checkAlertState()}))}getUpdateBannerText(){return`Show ${this.state.newItemCount} new ${o.formatCountable(this.state.newItemCount,"reply","replies")}`}componentDidMount(){this.checkAlertState()}componentDidUpdate(e){let t=Math.max(0,this.props.user.replyAlertCount-e.user.replyAlertCount);t&&this.setState({newItemCount:t})}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){return this.state.isScreenLoading?r.createElement(a.default,null):r.createElement("div",{className:"notifications-screen_qjaly4"},this.state.newItemCount?r.createElement(i.default,{isBusy:this.state.isLoadingNewItems,onClick:this._loadNewItems,text:this.getUpdateBannerText()}):null,this.state.replies.isLoading?r.createElement(a.default,null):this.state.replies.value.items.length?r.createElement(r.Fragment,null,r.createElement(s.default,null,this.state.replies.value.items.map(e=>r.createElement("li",{key:e.date},r.createElement(l.default,{deviceType:this.props.deviceType,isReply:!0,onCloseDialog:this.props.onCloseDialog,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onOpenDialog:this.props.onOpenDialog,onRateArticle:this.props.onRateArticle,onRead:this.props.onReadArticle,onPost:this.props.onPostArticle,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleStar:this.props.onToggleArticleStar,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,onViewThread:this.props.onViewThread,post:e,user:this.props.user})))),r.createElement(c.default,{pageNumber:this.state.replies.value.pageNumber,pageCount:this.state.replies.value.pageCount,onChange:this._changePage})):r.createElement(u.default,null,r.createElement(p.default,null,r.createElement("span",null,"No replies found."))))}}t.default=function(e,t){return{create:(t,n)=>({id:t,key:e,location:n,title:{default:"Replies"}}),render:(e,n)=>r.createElement(g,{deviceType:t.deviceType,onClearAlerts:t.onClearAlerts,onCloseDialog:t.onCloseDialog,onCreateAbsoluteUrl:t.onCreateAbsoluteUrl,onGetNotificationPosts:t.onGetNotificationPosts,onGetReplyPosts:t.onGetReplyPosts,onNavTo:t.onNavTo,onOpenDialog:t.onOpenDialog,onPostArticle:t.onPostArticle,onRateArticle:t.onRateArticle,onReadArticle:t.onReadArticle,onRegisterArticleChangeHandler:t.onRegisterArticleChangeHandler,onShare:t.onShare,onShareViaChannel:t.onShareViaChannel,onToggleArticleStar:t.onToggleArticleStar,onViewComments:t.onViewComments,onViewProfile:t.onViewProfile,onViewThread:t.onViewThread,user:n.user})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(6),i=n(14),o=n(599),s=n(30),l=n(600),c=n(26),u=n(22);class p extends r.Component{constructor(e){super(e),this._asyncTracker=new a.default,this._changeAuthors=e=>{this.setState({authors:e},this._search)},this._changeLength=(e,t)=>{this.setState({maxLength:t,minLength:e},this._search)},this._changeSources=e=>{this.setState({sources:e},this._search)},this._changeTags=e=>{this.setState({tags:e},this._search)},this._search=()=>{0!==this.state.authors.length||0!==this.state.sources.length||0!==this.state.tags.length?(this._asyncTracker.cancelAll("search"),this.setState({articles:{isLoading:!0}},()=>{this._asyncTracker.addPromise(this.props.onSearchArticles({authors:this.state.authors,maxLength:this.state.maxLength,minLength:this.state.minLength,sources:this.state.sources,tags:this.state.tags}),"search").then(e=>{this.setState({articles:{isLoading:!1,value:e}})})})):this.setState({articles:{isLoading:!1,value:null}})},this.state={articles:{isLoading:!1,value:null},authors:[],maxLength:null,minLength:null,options:e.onGetSearchOptions(this._asyncTracker.addCallback(e=>{this.setState({options:e})})),sources:[],tags:[]},this._asyncTracker.addCancellationDelegate(this.props.onRegisterArticleChangeHandler(e=>{var t;const n=null===(t=this.state.articles.value)||void 0===t?void 0:t.items;(null==n?void 0:n.some(t=>t.id===e.article.id))&&this.setState({articles:{isLoading:!1,value:Object.assign(Object.assign({},this.state.articles.value),{items:n.slice().map(t=>e.article.id===t.id?e.article:t)})}})}))}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){return this.state.options.isLoading?r.createElement(i.default,null):r.createElement("div",{className:"search-screen_cdqndl"},r.createElement(s.default,{className:"filters"},r.createElement(o.default,{onChange:this._changeSources,options:this.state.options.value.sources,title:"Publications",value:this.state.sources}),r.createElement(o.default,{onChange:this._changeTags,options:this.state.options.value.tags,title:"Topics",value:this.state.tags}),r.createElement(o.default,{onChange:this._changeAuthors,options:this.state.options.value.authors,title:"Writers",value:this.state.authors}),r.createElement(l.default,{max:this.state.maxLength,min:this.state.minLength,onChange:this._changeLength})),this.state.articles.isLoading?r.createElement(i.default,null):this.state.articles.value?this.state.articles.value.items.length?r.createElement(c.default,null,this.state.articles.value.items.map(e=>r.createElement("li",{key:e.id},r.createElement(u.default,{article:e,deviceType:this.props.deviceType,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onPost:this.props.onPostArticle,onRateArticle:this.props.onRateArticle,onRead:this.props.onReadArticle,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleStar:this.props.onToggleArticleStar,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,user:this.props.user})))):r.createElement("div",{className:"no-results"},"No articles found."):null)}}t.default=function(e,t){return{create:(t,n)=>({id:t,key:e,location:n,title:{default:"Search"}}),render:(e,n)=>r.createElement(p,{deviceType:t.deviceType,onCreateAbsoluteUrl:t.onCreateAbsoluteUrl,onGetSearchOptions:t.onGetSearchOptions,onNavTo:t.onNavTo,onPostArticle:t.onPostArticle,onRateArticle:t.onRateArticle,onReadArticle:t.onReadArticle,onRegisterArticleChangeHandler:t.onRegisterArticleChangeHandler,onSearchArticles:t.onSearchArticles,onShare:t.onShare,onShareViaChannel:t.onShareViaChannel,onToggleArticleStar:t.onToggleArticleStar,onViewComments:t.onViewComments,onViewProfile:t.onViewProfile,onViewThread:t.onViewThread,user:n.user})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.measureAutoHeight=void 0;const r=n(1),a=n(2),i=n(7);function o(e){const t=e.current.cloneNode(!0);t.classList.add("measuring"),t.style.height="",e.current.insertAdjacentElement("beforebegin",t);const n=t.offsetHeight;return t.remove(),n}t.measureAutoHeight=o;class s extends r.Component{constructor(){super(...arguments),this._toggle=()=>{let e;e=0===this.props.contentHeight?o(this.props.contentRef):0,this.props.onSetContentHeight(e)}}render(){const e=this.props.contentHeight>0;return r.createElement("div",{className:a("filter_fn98x9",this.props.className)},r.createElement("div",{className:"header",onClick:this._toggle},r.createElement("div",{className:"title"},r.createElement("div",{className:"text"},this.props.title),r.createElement(i.default,{name:e?"chevron-up":"chevron-down"})),r.createElement("div",{className:a("subtitle",{hidden:this.props.hideSubtitleWhenOpen?e:!e&&!this.props.subtitle})},this.props.hideSubtitleWhenOpen||!e||this.props.subtitle?this.props.subtitle:r.createElement(r.Fragment,null," "))),r.createElement("div",{className:"content",ref:this.props.contentRef,style:{height:this.props.contentHeight>0?this.props.contentHeight+"px":null}},this.props.children))}}t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createScreenFactory=void 0;const r=n(1),a=n(2),i=n(7),o=n(1),s=n(601),l=n(137),c=n(12),u=n(8),p=n(11),h=n(152),d=n(17),f=[e=>({title:"Getting Started",questions:[{question:"How much does Readup cost?",answer:r.createElement("p",null,"Readup is free and supported by the donations of our generous readers"," ",r.createElement(u.default,{href:"https://opencollective.com/readup-collective",onClick:e.onNavTo},"on our Open Collective"),". Enjoy ad-free reading to your heart's content!")},{question:"How do I get started on my iPhone (or iPad)?",answer:r.createElement("p",null,"Download"," ",r.createElement(u.default,{href:"https://apps.apple.com/us/app/readup-social-reading/id1441825432",onClick:e.onNavTo},"the app")," ","from the app store.")},{question:"How do I get started on my Android?",answer:e=>r.createElement(r.Fragment,null,r.createElement("p",null,"Shucks! Readup isn't currently available for Android. Tap the button below to get notified when we launch the Android app."),r.createElement("div",{className:"faq-android-notify"},r.createElement(c.default,{text:"Get Notified",size:"x-large",intent:"loud",onClick:e})))},{question:"How do I get started on my computer?",answer:r.createElement("p",null,"Get the"," ",r.createElement(u.default,{onClick:e.onOpenExtensionStore},"browser extesion")," ","for your browser.")},{question:"What's a reader name?",answer:r.createElement("p",null,'The word "user" dehumanizes people. In lieu of "usernames," Readup has reader names.')}]}),e=>({title:"Using Readup",questions:[{question:"What can I read on Readup?",answer:r.createElement("p",null,'Anything! Readup curates top-quality articles from across the web. Plus you can easily save (or "import") articles to Readup from pretty much anywhere.')},{question:"I noticed a problem within an article. What do I do?",answer:r.createElement(r.Fragment,null,r.createElement("p",null,'Uh oh! All articles on Readup should display perfectly, but sometimes Readup\'s ad-destroyer (or "parser") makes a mistake. If you notice a problem within an article, please report it by clicking the flag icon in the top right corner. With our team of volunteers we try to take out these issues!'),r.createElement("img",{alt:"Screenshot of how to report issues on Readup",style:{maxWidth:"min(70vw,450px)",margin:"0.7em",boxShadow:"0px 2px 10px #0003",paddingLeft:"0"},src:e.onCreateStaticContentUrl("/app/images/faq-page/how-to-report-issues-mobile.jpeg")}))},{question:"When is the Article of the Day selected?",answer:r.createElement("p",null,"The #1 Contender becomes AOTD at midnight Pacific Standard Time."," ")},{question:"Can I use Readup to bypass paywalls?",answer:r.createElement("p",null,'Yes. Readup is essentially a browser that cleans pages up by stripping away everything except the actual article. Many articles that are "hidden" behind soft paywalls are still "visible" in the code. Readup displays those articles.')},{question:"Can I change my reader name?",answer:r.createElement("p",null,"No. If you want a new reader name, you need to create a new account.")}]}),e=>({title:"Saving articles",questions:[{question:"Do I need to save articles?",answer:r.createElement("p",null,"Nope. You can always just browse the articles that other people save. But it’s a good thing to know how to do in case you ever want to save a specific article to Readup.")},{question:"How do I save articles to Readup on my iPhone?",answer:r.createElement(r.Fragment,null,r.createElement("p",null,"The Readup share extension in iOS makes it easy to save articles to Readup with just a few clicks. When you are viewing an article you want to save (for example in the Safari app) just click the share extension (a square with an up arrow) and then click the Readup icon. (Note: If you can’t find the Readup icon, you might need to click “More.”)"," "),r.createElement("p",null,"You'll receive a notification that you can tap to open the article in Readup directly, and the article will appear at the top of your Starred list in My Reads."," "))},{question:"How do I save articles to Readup on my laptop or computer?",answer:r.createElement("p",null,"First, get the"," ",r.createElement(u.default,{onClick:e.onOpenExtensionStore},"browser extesion")," ","for your browser. Then just click the browser extension button. When you view an article in Reader Mode, it will automatically be saved to the History section of My Reads.")},{question:"Can I disable the automatic starring of saved articles?",answer:r.createElement(r.Fragment,null,r.createElement("p",null,"Yes, you can on the desktop apps! You'll find this setting in the extension options page. To find the options:"),r.createElement("ul",null,r.createElement("li",null,r.createElement("strong",null,"In Chrome"),', right-click the Readup extension icon and click "Options."'),r.createElement("li",null,r.createElement("strong",null,"In Firefox"),', right-click the Readup extension icon, click "Manage Extension", then click the triple-dot menu next to the Readup extension, then click "Options."'),r.createElement("li",null,r.createElement("strong",null,"In Safari"),', right-click the Readup extension icon, click "Manage Extension...", then click "Preferences" in the pane that pops up.'),r.createElement("li",null,r.createElement("strong",null,"In Edge"),', right-click the Readup extension icon and click "Extension options."')),r.createElement("p",null,"Disabling starring is not yet possible in our mobile apps. Let us know in"," ",r.createElement(u.DiscordInviteLink,{onClick:e.onNavTo},"our Discord")," ","if this is something you want!"))}]}),e=>({title:"Privacy",questions:[{question:"Can people see everything I've been reading?",answer:r.createElement("p",null,"No. Your reading history is 100% private by default. On an article-by-article basis, you choose what you want to post publicly.")},{question:"Can I trust Readup?",answer:r.createElement("p",null,"Yes! Our"," ",r.createElement(u.default,{onClick:e.onNavTo,screen:p.default.PrivacyPolicy},"Privacy Policy")," ","is short and sweet. Read it.")}]}),e=>({title:"Writers",questions:[{question:"Why should I get verified?",answer:r.createElement("p",null,"As a writer on Readup you get special powers. Articles you've written will appear on your profile. You can comment on your own articles without reading them, and your comments will be highlighted.")},{question:"How do I get verified?",answer:r.createElement("p",null,"Go to ",v(e),'. Click "Get Verified."')}]}),e=>({title:"Misc",questions:[{question:"Who owns Readup?",answer:r.createElement(r.Fragment,null,r.createElement("p",null,"Readup's is owned by co-founder"," ",r.createElement(u.default,{onClick:e.onNavTo,href:"https://jefcamera.com"},"Jeff Camera"),", who hosts the readup.org infrastructure."),r.createElement("p",null,"Readup is fully open-source under the"," ",r.createElement(u.default,{href:"https://github.com/reallyreadit/web/blob/master/LICENSE",onClick:e.onNavTo},"AGPL 3 license"),", which means anyone can modify or reuse Readup as long as they respect the license."),r.createElement("p",null,"Volunteers led by"," ",r.createElement(u.default,{onClick:e.onNavTo,href:"https://thorgalle.me"},"Thor Galle")," ","maintain and develop the platform further. They organize their work and budget transparently on"," ",r.createElement(u.default,{href:"https://opencollective.com/readup-collective",onClick:e.onNavTo},"Open Collective"),"."))},{question:"I'm a developer. Can I help?",answer:r.createElement("p",null,"Yes! Readup is fully open-source, we manage the code, issues and projects"," ",r.createElement(u.default,{href:"https://github.com/reallyreadit/dev-env",onClick:e.onNavTo},"on our GitHub"),". If you need support,"," ",r.createElement(u.default,{onClick:e.onNavTo,href:"https://discord.gg/XQZa8pHdVs"},"join our Discord")," ","& drop us a message in"," ",r.createElement(u.default,{href:"https://discord.com/channels/917433643796946964/930514149077835838",onClick:e.onNavTo},"the #development channel"),".")},{question:"I'm not a developer. Can I help?",answer:r.createElement(r.Fragment,null,r.createElement("p",null,"Possibly! Let us know how you'd like to contribute in"," ",r.createElement(u.default,{onClick:e.onNavTo,href:"https://discord.gg/XQZa8pHdVs"},"our Discord"),". If you can work with relative independence, your skills in design/marketing/social media/community management/... would be much appreciated. You can also contact volunteer lead Thor directly at thorgalle+readup ",r.createElement("code",null,"at")," gmail"," ",r.createElement("code",null,"dot")," com."),r.createElement("p",null,"You can also donate. Supporting us financially"," ",r.createElement(u.default,{href:"https://opencollective.com/readup-collective/contribute",onClick:e.onNavTo},"on Open Collective")," ","helps us pay our server bills, and devote more time to improving Readup."))}]})],m=e=>e.toLowerCase().replace(/\s/g,"-").replace(/[?"'@*]/g,""),g=(e,{question:t,answer:n})=>{const[s,l]=o.useState(!1);return r.createElement("li",{key:t},r.createElement("h3",{className:"question",id:m(t),onClick:()=>l(!s)},r.createElement(i.default,{className:a({open:s}),name:"chevron-right"}),t),r.createElement("div",{className:a("answer",{open:s})},"function"==typeof n?n(e):n))},y=(e,t)=>{const n=t(e);return r.createElement("div",{key:n.title,className:"question-section"},r.createElement("h2",{className:"heading-regular",id:m(n.title)},n.title),r.createElement("ul",null,n.questions.map(g.bind(null,e.onOpenNewPlatformNotificationRequestDialog))))},v=e=>e.user?r.createElement(u.default,{onClick:e.onNavTo,screen:p.default.Settings},"the Settings screen"):"the Settings screen in the app";function b(e){const t=document.getElementById(e.split("#")[1]);null==t||t.scrollIntoView({behavior:"smooth",block:"start"})}const w=e=>(o.useEffect(()=>{e.location.fragment&&b(e.location.fragment)},[]),r.createElement("div",{className:"faq-page_35vamf"},r.createElement(s.default,{title:"Frequently Asked Questions",description:r.createElement("span",null,"If your question isn't answered below, you can try posting it"," ",r.createElement(u.DiscordInviteLink,{onClick:e.onNavTo},"on our Discord"),".")}),r.createElement(l.default,{className:"faq-content"},r.createElement("div",{className:"sidebar"},r.createElement("nav",null,r.createElement("h3",null,"Jump to"),r.createElement("ol",null,f.map(t=>{const n=t(e);return r.createElement("li",{key:n.title},r.createElement(u.default,{href:"#"+m(n.title),onClick:b},n.title))})))),r.createElement("div",{className:"questions"},f.map(y.bind(null,e))))));t.createScreenFactory=function(e,t){return{create:(t,n)=>({id:t,key:e,location:n,title:{default:"Help",seo:"Frequently Asked Questions"}}),render:(e,n)=>r.createElement(w,{location:e.location,onCreateStaticContentUrl:t.onCreateStaticContentUrl,onNavTo:t.onNavTo,onOpenExtensionStore:()=>{const e=h.getStoreUrl();e?window.open(e):t.onShowToast("Sorry, this browser is not supported.",d.Intent.Neutral)},onOpenNewPlatformNotificationRequestDialog:t.onOpenNewPlatformNotificationRequestDialog,user:n.user})}},t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(14),i=n(6),o=n(23),s=n(26),l=n(35),c=n(22);class u extends r.Component{constructor(e){super(e),this._asyncTracker=new i.default,this._changePageNumber=e=>{this.setState({articles:{isLoading:!0}}),this.fetchArticles(e,this.state.minLength,this.state.maxLength)};const t=this.fetchArticles(1,null,null,()=>{this.setState({isScreenLoading:!1})});this.state={articles:t,isScreenLoading:t.isLoading,maxLength:null,minLength:null},this._asyncTracker.addCancellationDelegate(e.onRegisterArticleChangeHandler(e=>{this.state.articles.value&&this.state.articles.value.items.some(t=>t.id===e.article.id)&&this.setState(o.default(t=>{t.articles.value.items.forEach((t,n,r)=>{t.id===e.article.id&&r.splice(r.indexOf(t),1,Object.assign(Object.assign(Object.assign({},t),e.article),{dateStarred:e.article.dateStarred}))})}))}))}fetchArticles(e,t,n,r){return this.props.onGetPublisherArticles({slug:"blogreadupcom",pageSize:40,pageNumber:e,minLength:t,maxLength:n},this._asyncTracker.addCallback(e=>{this.setState({articles:e}),r&&r()}))}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){return this.state.isScreenLoading?r.createElement(a.default,null):r.createElement("div",{className:"blog-screen_61pk1b"},this.state.articles.isLoading?r.createElement(a.default,null):r.createElement(r.Fragment,null,r.createElement(s.default,null,this.state.articles.value.items.map(e=>r.createElement("li",{key:e.id},r.createElement(c.default,{article:e,deviceType:this.props.deviceType,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onPost:this.props.onPostArticle,onRateArticle:this.props.onRateArticle,onRead:this.props.onReadArticle,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleStar:this.props.onToggleArticleStar,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,user:this.props.user})))),r.createElement(l.default,{pageNumber:this.state.articles.value.pageNumber,pageCount:this.state.articles.value.pageCount,onChange:this._changePageNumber})))}}t.default=function(e,t){return{create:(t,n)=>({id:t,key:e,location:n,title:{default:"From the Readup Blog"}}),render:(e,n)=>r.createElement(u,Object.assign({},Object.assign(Object.assign({},t),{user:n.user})))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openTweetComposerBrowserWindow=t.createTweetWebIntentUrl=void 0;const r=n(21);function a(e){let t={};e.text&&(t.text=e.text),e.url&&(t.url=e.url),e.hashtags&&(t.hashtags=e.hashtags.join(",")),e.via&&(t.via=e.via);return"https://twitter.com/intent/tweet"+r.createQueryString(t)}t.createTweetWebIntentUrl=a,t.openTweetComposerBrowserWindow=function(e){window.open(a(e),"_blank","height=300,location=0,menubar=0,toolbar=0,width=500")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(38),i=n(14),o=n(26),s=n(153),l=n(35),c=n(41),u=n(71),p=n(10),h=n(23),d=n(94),f=n(150),m=n(256),g=n(8),y=n(33),v=c.default.Post|c.default.Loopback;class b extends m.default{constructor(e){super(e),this._changePageNumber=e=>{this.setState({posts:{isLoading:!0},isLoadingNewItems:!1,newItemCount:0}),this.fetchPosts(e)},this._hasClearedAlert=!1,this._loadNewItems=()=>{this.setState({isLoadingNewItems:!0}),this.fetchPosts(1)},this._openSignInPrompt=()=>{this.props.onOpenSignInPrompt("MyFeed")};const t=e.userAccount?this.fetchPosts(1):{isLoading:!1,value:{items:[],totalCount:0,pageNumber:0,pageSize:0,pageCount:0}};this.state={isLoadingNewItems:!1,isScreenLoading:t.isLoading,newItemCount:0,posts:t},this._asyncTracker.addCancellationDelegate(e.onRegisterArticleChangeHandler(e=>{this.state.posts.value&&this.state.posts.value.items.some(t=>t.article.id===e.article.id)&&this.setState(h.default(t=>{t.posts.value.items.forEach((t,n,r)=>{t.article.id===e.article.id&&(t.article=Object.assign(Object.assign({},t.article),e.article))})}))}))}clearAlertIfNeeded(){!this._hasClearedAlert&&a.hasAnyAlerts(this.props.userAccount,v)&&(this.props.onClearAlerts(v),this._hasClearedAlert=!0)}fetchPosts(e){return this.props.onGetNotificationPosts({pageNumber:e},this._asyncTracker.addCallback(e=>{this.setState({isLoadingNewItems:!1,isScreenLoading:!1,posts:e,newItemCount:0}),this.clearAlertIfNeeded()}))}componentDidMount(){this.clearAlertIfNeeded()}componentDidUpdate(e){if(super.componentDidUpdate(e),this.props.userAccount&&e.userAccount){const t=Math.max(0,this.props.userAccount.postAlertCount-e.userAccount.postAlertCount+(this.props.userAccount.loopbackAlertCount-e.userAccount.loopbackAlertCount));t&&(this.setState({newItemCount:t}),this._hasClearedAlert=!1)}else this.props.userAccount&&this.setState({isLoadingNewItems:!1,isScreenLoading:!0,newItemCount:0,posts:this.fetchPosts(1)})}componentWillUnmount(){this._asyncTracker.cancelAll()}render(){return this.props.userAccount?this.state.isScreenLoading?r.createElement(i.default,null):r.createElement("div",{className:"my-feed-screen_921ddo"},this.state.newItemCount?r.createElement(u.default,{isBusy:this.state.isLoadingNewItems,onClick:this._loadNewItems,text:`Show ${this.state.newItemCount} new ${p.formatCountable(this.state.newItemCount,"post")}`}):null,this.props.profile.isLoading?r.createElement(i.default,null):r.createElement("div",{className:"followings"},this.props.profile.value.followeeCount?r.createElement(g.default,{className:"following-count",onClick:this._showFollowees,text:this._getFolloweesText()}):r.createElement("div",{className:"following-count"},this._getFolloweesText())," ","|"," ",this.props.profile.value.followerCount?r.createElement(g.default,{badge:this.isOwnProfile()&&this.props.userAccount.followerAlertCount,className:"following-count",onClick:this._showFollowers,text:this._getFollowersText()}):r.createElement("div",{className:"following-count"},this._getFollowersText())),this.state.posts.isLoading?r.createElement(i.default,null):this.state.posts.value.items.length?r.createElement(r.Fragment,null,r.createElement(o.default,null,this.state.posts.value.items.map(e=>r.createElement("li",{key:e.date},r.createElement(s.default,{deviceType:this.props.deviceType,onCloseDialog:this.props.onCloseDialog,onCreateAbsoluteUrl:this.props.onCreateAbsoluteUrl,onNavTo:this.props.onNavTo,onOpenDialog:this.props.onOpenDialog,onRateArticle:this.props.onRateArticle,onRead:this.props.onReadArticle,onPost:this.props.onPostArticle,onShare:this.props.onShare,onShareViaChannel:this.props.onShareViaChannel,onToggleStar:this.props.onToggleArticleStar,onViewComments:this.props.onViewComments,onViewProfile:this.props.onViewProfile,onViewThread:this.props.onViewThread,post:e,user:this.props.userAccount})))),r.createElement(l.default,{pageNumber:this.state.posts.value.pageNumber,pageCount:this.state.posts.value.pageCount,onChange:this._changePageNumber})):r.createElement(f.default,null,r.createElement(d.default,null,r.createElement("strong",null,"Follow readers who interest you."),r.createElement("span",null,"Their posts will appear here, as well as posts from people who commented on articles that you read.")))):r.createElement(y.default,{style:"normal"},r.createElement("p",null,r.createElement(g.default,{onClick:this._openSignInPrompt},"Log in")," to follow other readers."))}}const w=(e,t)=>h.default(t=>{t.componentState=e});t.default=function(e,t){const n=Object.assign(Object.assign({},t),{createNewScreenState:w});return{create:(n,r,a)=>{const i=a.user?t.onGetProfile({userName:a.user.name},e=>{t.onSetScreenState(n,w(e,a.user))}):{isLoading:!0,value:null};return{id:n,componentState:i,key:e,location:r,title:{default:"My Feed"}}},render:(e,a)=>{var i;return r.createElement(b,Object.assign({},Object.assign(Object.assign({},t),{location:e.location,onBeginOnboarding:m.noop,onCopyAppReferrerTextToClipboard:m.noop,onOpenNewPlatformNotificationRequestDialog:m.noop,onReloadProfile:m.reloadProfile.bind(null,n),onUpdateProfile:m.updateProfile.bind(null,n),profile:e.componentState,screenId:e.id,userAccount:a.user,userName:null===(i=a.user)||void 0===i?void 0:i.name})))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this._callbackId=1,this._onMessageListeners=[],this._responseCallbacks=[]}isResponseEnvelope(e){return null!=e.id}processMessage(e){if(this.isResponseEnvelope(e))this._responseCallbacks.splice(this._responseCallbacks.findIndex(t=>t.id===e.id),1)[0].function(e.data);else{let t;t=null!=e.callbackId?t=>{this.postMessage({id:e.callbackId,data:t})}:()=>{},this._onMessageListeners.forEach(n=>{n(e.data,t)})}}addListener(e){this._onMessageListeners.push(e)}sendMessage(e,t){let n=null;t&&this._responseCallbacks.push({id:n=this._callbackId++,function:t}),this.postMessage({data:e,callbackId:n})}}},function(e,t,n){"use strict";n.r(t),n.d(t,"Surface",(function(){return pe})),n.d(t,"Layer",(function(){return ge})),n.d(t,"Legend",(function(){return kt})),n.d(t,"Tooltip",(function(){return dr})),n.d(t,"ResponsiveContainer",(function(){return Ar})),n.d(t,"Cell",(function(){return Or})),n.d(t,"Text",(function(){return Qr})),n.d(t,"Label",(function(){return yu})),n.d(t,"LabelList",(function(){return Tu})),n.d(t,"Customized",(function(){return ju})),n.d(t,"Sector",(function(){return Gu})),n.d(t,"Curve",(function(){return Tp})),n.d(t,"Rectangle",(function(){return Bp})),n.d(t,"Polygon",(function(){return eh})),n.d(t,"Dot",(function(){return ch})),n.d(t,"Cross",(function(){return wh})),n.d(t,"Symbols",(function(){return nt})),n.d(t,"PolarGrid",(function(){return Dh})),n.d(t,"PolarRadiusAxis",(function(){return Zh})),n.d(t,"PolarAngleAxis",(function(){return ld})),n.d(t,"Pie",(function(){return Ed})),n.d(t,"Radar",(function(){return Rd})),n.d(t,"RadialBar",(function(){return Gd})),n.d(t,"Brush",(function(){return lf})),n.d(t,"ReferenceLine",(function(){return Ff})),n.d(t,"ReferenceDot",(function(){return Yf})),n.d(t,"ReferenceArea",(function(){return lm})),n.d(t,"CartesianAxis",(function(){return _m})),n.d(t,"CartesianGrid",(function(){return Rm})),n.d(t,"Line",(function(){return Km})),n.d(t,"Area",(function(){return ig})),n.d(t,"Bar",(function(){return vg})),n.d(t,"Scatter",(function(){return Fg})),n.d(t,"XAxis",(function(){return Gg})),n.d(t,"YAxis",(function(){return ey})),n.d(t,"ZAxis",(function(){return Cg})),n.d(t,"ErrorBar",(function(){return yc})),n.d(t,"LineChart",(function(){return Sy})),n.d(t,"BarChart",(function(){return Ay})),n.d(t,"PieChart",(function(){return xy})),n.d(t,"Treemap",(function(){return Hy})),n.d(t,"Sankey",(function(){return yv})),n.d(t,"RadarChart",(function(){return vv})),n.d(t,"ScatterChart",(function(){return bv})),n.d(t,"AreaChart",(function(){return wv})),n.d(t,"RadialBarChart",(function(){return _v})),n.d(t,"ComposedChart",(function(){return Ev})),n.d(t,"Funnel",(function(){return Gv})),n.d(t,"FunnelChart",(function(){return Kv})),n.d(t,"Trapezoid",(function(){return Rv}));var r={};n.r(r),n.d(r,"scaleBand",(function(){return ja})),n.d(r,"scalePoint",(function(){return Ma})),n.d(r,"scaleIdentity",(function(){return no})),n.d(r,"scaleLinear",(function(){return to})),n.d(r,"scaleLog",(function(){return po})),n.d(r,"scaleSymlog",(function(){return go})),n.d(r,"scaleOrdinal",(function(){return Da})),n.d(r,"scaleImplicit",(function(){return Na})),n.d(r,"scalePow",(function(){return _o})),n.d(r,"scaleSqrt",(function(){return Eo})),n.d(r,"scaleQuantile",(function(){return So})),n.d(r,"scaleQuantize",(function(){return Ao})),n.d(r,"scaleThreshold",(function(){return xo})),n.d(r,"scaleTime",(function(){return Ml})),n.d(r,"scaleUtc",(function(){return Bl})),n.d(r,"scaleSequential",(function(){return Hl})),n.d(r,"scaleSequentialLog",(function(){return Gl})),n.d(r,"scaleSequentialPow",(function(){return $l})),n.d(r,"scaleSequentialSqrt",(function(){return Zl})),n.d(r,"scaleSequentialSymlog",(function(){return Kl})),n.d(r,"scaleSequentialQuantile",(function(){return Yl})),n.d(r,"scaleDiverging",(function(){return Xl})),n.d(r,"scaleDivergingLog",(function(){return Jl})),n.d(r,"scaleDivergingPow",(function(){return tc})),n.d(r,"scaleDivergingSqrt",(function(){return nc})),n.d(r,"scaleDivergingSymlog",(function(){return ec})),n.d(r,"tickFormat",(function(){return Ji}));n(299),n(321);if(!Object.setPrototypeOf&&!{}.__proto__){var a=Object.getPrototypeOf;Object.getPrototypeOf=function(e){return e.__proto__?e.__proto__:a.call(Object,e)}}var i=n(1),o=n.n(i),s=n(0),l=n.n(s),c=n(2),u=n.n(c),p=n(4),h=n.n(p),d=n(31),f=n.n(d),m=n(18),g=n.n(m),y=n(3),v=n.n(y),b=n(5),w=n.n(b),_=n(19),E=n.n(_),S=n(36),A=n.n(S),x=n(46),C=n.n(x),k=function(e){return 0===e?0:e>0?1:-1},O=function(e){return f()(e)&&e.indexOf("%")===e.length-1},P=function(e){return C()(e)&&!A()(e)},T=function(e){return P(e)||f()(e)},N=0,D=function(e){var t=++N;return"".concat(e||"").concat(t)},j=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!P(e)&&!f()(e))return r;if(O(e)){var i=e.indexOf("%");n=t*parseFloat(e.slice(0,i))/100}else n=+e;return A()(n)&&(n=r),a&&n>t&&(n=t),n},R=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},M=function(e,t){return P(e)&&P(t)?function(n){return e+n*(t-e)}:function(){return t}},I=function(e,t,n){return e&&e.length?e.find((function(e){return e&&("function"==typeof t?t(e):E()(e,t))===n})):null};function L(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function F(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var z={"aria-current":l.a.string,"aria-details":l.a.any,"aria-disabled":l.a.any,"aria-hidden":l.a.any,"aria-invalid":l.a.any,"aria-keyshortcuts":l.a.any,"aria-label":l.a.any,"aria-roledescription":l.a.any,"aria-autocomplete":l.a.any,"aria-checked":l.a.any,"aria-expanded":l.a.any,"aria-haspopup":l.a.any,"aria-level":l.a.any,"aria-modal":l.a.any,"aria-multiline":l.a.any,"aria-multiselectable":l.a.any,"aria-orientation":l.a.any,"aria-placeholder":l.a.any,"aria-pressed":l.a.any,"aria-readonly":l.a.any,"aria-required":l.a.any,"aria-selected":l.a.any,"aria-sort":l.a.any,"aria-valuemax":l.a.any,"aria-valuemin":l.a.any,"aria-valuenow":l.a.any,"aria-valuetext":l.a.any,"aria-atomic":l.a.any,"aria-busy":l.a.any,"aria-live":l.a.any,"aria-relevant":l.a.any,"aria-dropeffect":l.a.any,"aria-grabbed":l.a.any,"aria-activedescendant":l.a.any,"aria-colcount":l.a.any,"aria-colindex":l.a.any,"aria-colspan":l.a.any,"aria-controls":l.a.any,"aria-describedby":l.a.any,"aria-errormessage":l.a.any,"aria-flowto":l.a.any,"aria-labelledby":l.a.any,"aria-owns":l.a.any,"aria-posinset":l.a.any,"aria-rowcount":l.a.any,"aria-rowindex":l.a.any,"aria-rowspan":l.a.any,"aria-setsize":l.a.any,alignmentBaseline:l.a.string,angle:l.a.number,baselineShift:l.a.string,clip:l.a.string,clipPath:l.a.string,clipRule:l.a.string,color:l.a.string,colorInterpolation:l.a.string,colorInterpolationFilters:l.a.string,colorProfile:l.a.string,colorRendering:l.a.string,cursor:l.a.string,direction:l.a.oneOf(["ltr","rtl","inherit"]),display:l.a.string,dominantBaseline:l.a.string,enableBackground:l.a.string,fill:l.a.string,fillOpacity:l.a.oneOfType([l.a.string,l.a.number]),fillRule:l.a.oneOf(["nonzero","evenodd","inherit"]),filter:l.a.string,floodColor:l.a.string,floodOpacity:l.a.oneOfType([l.a.string,l.a.number]),font:l.a.string,fontFamily:l.a.string,fontSize:l.a.oneOfType([l.a.number,l.a.string]),fontSizeAdjust:l.a.oneOfType([l.a.number,l.a.string]),fontStretch:l.a.oneOf(["normal","wider","narrower","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded","inherit"]),fontStyle:l.a.oneOf(["normal","italic","oblique","inherit"]),fontVariant:l.a.oneOf(["normal","small-caps","inherit"]),fontWeight:l.a.oneOf(["normal","bold","bolder","lighter",100,200,300,400,500,600,700,800,900,"inherit"]),glyphOrientationHorizontal:l.a.string,glyphOrientationVertical:l.a.string,imageRendering:l.a.oneOf(["auto","optimizeSpeed","optimizeQuality","inherit"]),kerning:l.a.oneOfType([l.a.number,l.a.string]),letterSpacing:l.a.oneOfType([l.a.number,l.a.string]),lightingColor:l.a.string,lineHeight:l.a.oneOfType([l.a.number,l.a.string]),markerEnd:l.a.string,markerMid:l.a.string,markerStart:l.a.string,mask:l.a.string,opacity:l.a.oneOfType([l.a.number,l.a.string]),overflow:l.a.oneOf(["visible","hidden","scroll","auto","inherit"]),pointerEvents:l.a.oneOf(["visiblePainted","visibleFill","visibleStroke","visible","painted","fill","stroke","all","none","inherit"]),shapeRendering:l.a.oneOf(["auto","optimizeSpeed","crispEdges","geometricPrecision","inherit"]),stopColor:l.a.string,stopOpacity:l.a.oneOfType([l.a.number,l.a.string]),stroke:l.a.oneOfType([l.a.number,l.a.string]),strokeDasharray:l.a.string,strokeDashoffset:l.a.oneOfType([l.a.number,l.a.string]),strokeLinecap:l.a.oneOf(["butt","round","square","inherit"]),strokeLinejoin:l.a.oneOf(["miter","round","bevel","inherit"]),strokeMiterlimit:l.a.oneOfType([l.a.number,l.a.string]),strokeOpacity:l.a.oneOfType([l.a.number,l.a.string]),strokeWidth:l.a.oneOfType([l.a.number,l.a.string]),textAnchor:l.a.oneOf(["start","middle","end","inherit"]),textDecoration:l.a.oneOf(["none","underline","overline","line-through","blink","inherit"]),textRendering:l.a.oneOf(["auto","optimizeSpeed","optimizeLegibility","geometricPrecision","inherit"]),unicodeBidi:l.a.oneOf(["normal","embed","bidi-override","inherit"]),visibility:l.a.oneOf(["visible","hidden","collapse","inherit"]),wordSpacing:l.a.oneOfType([l.a.number,l.a.string]),writingMode:l.a.oneOf(["lr-tb","rl-tb","tb-rl","lr","rl","tb","inherit"]),transform:l.a.string,role:l.a.string,focusable:l.a.string,tabIndex:l.a.string,style:l.a.object,width:l.a.number,height:l.a.number,dx:l.a.number,dy:l.a.number,x:l.a.number,y:l.a.number,r:l.a.number,radius:l.a.oneOfType([l.a.number,l.a.array])},q={onClick:l.a.func,onMouseDown:l.a.func,onMouseUp:l.a.func,onMouseOver:l.a.func,onMouseMove:l.a.func,onMouseOut:l.a.func,onMouseEnter:l.a.func,onMouseLeave:l.a.func,onTouchEnd:l.a.func,onTouchMove:l.a.func,onTouchStart:l.a.func,onTouchCancel:l.a.func},B={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},V=["auto","linear","pow","sqrt","log","identity","time","band","point","ordinal","quantile","quantize","utc","sequential","threshold"],W=["plainline","line","square","rect","circle","cross","diamond","star","triangle","wye","none"],H=["none"],G=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},K=function(e,t){var n=[],r=[];return r=w()(t)?t.map((function(e){return G(e)})):[G(t)],o.a.Children.forEach(e,(function(e){var t=e&&e.type&&(e.type.displayName||e.type.name);-1!==r.indexOf(t)&&n.push(e)})),n},$=function(e,t){var n=K(e,t);return n&&n[0]},Z=function(e){if(!e||v()(e))return null;var t=o.a.isValidElement(e)?e.props:e;if(!g()(t))return null;var n=null;for(var r in t)({}).hasOwnProperty.call(t,r)&&z[r]&&(n||(n={}),n[r]=t[r]);return n},Y=function(e,t){return function(n){return e(t,n),null}},Q=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||v()(e))return null;var r=o.a.isValidElement(e)?e.props:e;if(!g()(r))return null;var a=null;for(var i in r)({}).hasOwnProperty.call(r,i)&&q[i]&&(a||(a={}),a[i]=t||(n?Y(r[i],r):r[i]));return a},X=function(e,t,n){return function(r){return e(t,n,r),null}},J=function(e,t,n){if(!g()(e))return null;var r=null;for(var a in e)({}).hasOwnProperty.call(e,a)&&q[a]&&v()(e[a])&&(r||(r={}),r[a]=X(e[a],t,n));return r},ee=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!P(n)||n<=0||!P(r)||r<=0)},te=function(){return!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout)},ne=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],re=function(e){var t=[];return o.a.Children.forEach(e,(function(e){e&&e.type&&f()(e.type)&&ne.indexOf(e.type)>=0&&t.push(e)})),t},ae=function(e,t){if(h()(e)&&h()(t))return!0;if(!h()(e)&&!h()(t)){var n=e.props||{},r=n.children,a=U(n,["children"]),i=t.props||{},o=i.children,s=U(i,["children"]);return r&&o?L(a,s)&&ie(r,o):!r&&!o&&L(a,s)}return!1},ie=function e(t,n){if(t===n)return!0;if(i.Children.count(t)!==i.Children.count(n))return!1;var r=i.Children.count(t);if(0===r)return!0;if(1===r)return ae(w()(t)?t[0]:t,w()(n)?n[0]:n);for(var a=0;a=0}(e))n.push(e);else if(e&&t[G(e.type)]){var i=G(e.type),o=t[i],s=o.handler,l=o.once;if(l&&!r[i]||!l){var c=s(e,i,a);w()(c)?n=[n].concat(F(c)):n.push(c),r[i]=!0}}})),n};function se(){return(se=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ce={width:l.a.number.isRequired,height:l.a.number.isRequired,viewBox:l.a.shape({x:l.a.number,y:l.a.number,width:l.a.number,height:l.a.number}),className:l.a.string,style:l.a.object,children:l.a.oneOfType([l.a.arrayOf(l.a.node),l.a.node])};function ue(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,s=e.style,l=le(e,["children","width","height","viewBox","className","style"]),c=a||{width:n,height:r,x:0,y:0},p=u()("recharts-surface",i),h=Z(l);return o.a.createElement("svg",se({},h,{className:p,width:n,height:r,style:s,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height),version:"1.1"}),t)}ue.propTypes=ce;var pe=ue;function he(){return(he=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var fe={className:l.a.string,children:l.a.oneOfType([l.a.arrayOf(l.a.node),l.a.node])};function me(e){var t=e.children,n=e.className,r=de(e,["children","className"]),a=u()("recharts-layer",n);return o.a.createElement("g",he({className:a},r),t)}me.propTypes=fe;var ge=me,ye=n(62),ve=n.n(ye),be=(Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,Math.PI),we=2*be;var _e={draw:function(e,t){var n=Math.sqrt(t/be);e.moveTo(n,0),e.arc(0,0,n,0,we)}},Ee={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Se=Math.sqrt(1/3),Ae=2*Se,xe={draw:function(e,t){var n=Math.sqrt(t/Ae),r=n*Se;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Ce={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}},ke=Math.sin(be/10)/Math.sin(7*be/10),Oe=Math.sin(we/10)*ke,Pe=-Math.cos(we/10)*ke,Te={draw:function(e,t){var n=Math.sqrt(.8908130915292852*t),r=Oe*n,a=Pe*n;e.moveTo(0,-n),e.lineTo(r,a);for(var i=1;i<5;++i){var o=we*i/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*a,l*r+s*a)}e.closePath()}},Ne=Math.sqrt(3),De={draw:function(e,t){var n=-Math.sqrt(t/(3*Ne));e.moveTo(0,2*n),e.lineTo(-Ne*n,-n),e.lineTo(Ne*n,-n),e.closePath()}},je=Math.sqrt(3)/2,Re=1/Math.sqrt(12),Me=3*(Re/2+1),Ie={draw:function(e,t){var n=Math.sqrt(t/Me),r=n/2,a=n*Re,i=r,o=n*Re+n,s=-i,l=o;e.moveTo(r,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(-.5*r-je*a,je*r+-.5*a),e.lineTo(-.5*i-je*o,je*i+-.5*o),e.lineTo(-.5*s-je*l,je*s+-.5*l),e.lineTo(-.5*r+je*a,-.5*a-je*r),e.lineTo(-.5*i+je*o,-.5*o-je*i),e.lineTo(-.5*s+je*l,-.5*l-je*s),e.closePath()}},Le=Math.PI,Fe=2*Le,Ue=Fe-1e-6;function ze(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function qe(){return new ze}ze.prototype=qe.prototype={constructor:ze,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,a,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(e,t,n,r,a){e=+e,t=+t,n=+n,r=+r,a=+a;var i=this._x1,o=this._y1,s=n-e,l=r-t,c=i-e,u=o-t,p=c*c+u*u;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(p>1e-6)if(Math.abs(u*s-l*c)>1e-6&&a){var h=n-i,d=r-o,f=s*s+l*l,m=h*h+d*d,g=Math.sqrt(f),y=Math.sqrt(p),v=a*Math.tan((Le-Math.acos((f+p-m)/(2*g*y)))/2),b=v/y,w=v/g;Math.abs(b-1)>1e-6&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+a+","+a+",0,0,"+ +(u*h>c*d)+","+(this._x1=e+w*s)+","+(this._y1=t+w*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,a,i){e=+e,t=+t,i=!!i;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+o,c=t+s,u=1^i,p=i?r-a:a-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+l+","+c),n&&(p<0&&(p=p%Fe+Fe),p>Ue?this._+="A"+n+","+n+",0,1,"+u+","+(e-o)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):p>1e-6&&(this._+="A"+n+","+n+",0,"+ +(p>=Le)+","+u+","+(this._x1=e+n*Math.cos(a))+","+(this._y1=t+n*Math.sin(a))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Be=qe,Ve=function(e){return function(){return e}};function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(e){return(Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ke(){return(Ke=Object.assign||function(e){for(var t=1;t=0&&n>=0?{width:t,height:n}:null}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,a=r.layout,i=r.align,o=r.verticalAlign,s=r.margin,l=r.chartWidth,c=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===i&&"vertical"===a?{left:((l||0)-(this.getBBox()||{width:0}).width)/2}:"right"===i?{right:s&&s.right||0}:{left:s&&s.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===o?{top:((c||0)-(this.getBBox()||{height:0}).height)/2}:"bottom"===o?{bottom:s&&s.bottom||0}:{top:s&&s.top||0}),gt({},t,{},n)}},{key:"updateBBox",value:function(){var e=this.state,t=e.boxWidth,n=e.boxHeight,r=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var a=this.wrapperNode.getBoundingClientRect();(Math.abs(a.width-t)>1||Math.abs(a.height-n)>1)&&this.setState({boxWidth:a.width,boxHeight:a.height},(function(){r&&r(a)}))}else-1===t&&-1===n||this.setState({boxWidth:-1,boxHeight:-1},(function(){r&&r(null)}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,a=t.height,i=t.wrapperStyle,s=t.paylodUniqBy,l=t.payload,c=gt({position:"absolute",width:r||"auto",height:a||"auto"},this.getDefaultPosition(i),{},i);return o.a.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(t){e.wrapperNode=t}},function(e,t){return o.a.isValidElement(e)?o.a.cloneElement(e,t):v()(e)?e(t):o.a.createElement(dt,t)}(n,gt({},this.props,{payload:At(s,l)})))}}])&&bt(n.prototype,r),a&&bt(n,a),t}(i.PureComponent);Ct.displayName="Legend",Ct.propTypes={content:l.a.oneOfType([l.a.element,l.a.func]),wrapperStyle:l.a.object,chartWidth:l.a.number,chartHeight:l.a.number,width:l.a.number,height:l.a.number,iconSize:l.a.number,iconType:l.a.oneOf(xt),layout:l.a.oneOf(["horizontal","vertical"]),align:l.a.oneOf(["center","left","right"]),verticalAlign:l.a.oneOf(["top","bottom","middle"]),margin:l.a.shape({top:l.a.number,left:l.a.number,bottom:l.a.number,right:l.a.number}),payload:l.a.arrayOf(l.a.shape({value:l.a.any,id:l.a.any,type:l.a.oneOf(W)})),paylodUniqBy:l.a.oneOfType([l.a.func,l.a.bool]),formatter:l.a.func,onMouseEnter:l.a.func,onMouseLeave:l.a.func,onClick:l.a.func,onBBoxUpdate:l.a.func},Ct.defaultProps={iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"};var kt=Ct,Ot=n(16),Pt=n.n(Ot),Tt=n(47),Nt=n.n(Tt);function Dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=function r(a){n<0&&(n=a),a-n>t?(e(a),n=-1):Nt()(r)};Nt()(r)}function jt(e){return(jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rt(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Mt(){var e=function(){return null},t=!1;return{stop:function(){t=!0},start:function(n){t=!1,function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var a=Rt(r),i=a[0],o=a.slice(1);return"number"==typeof i?void Dt(n.bind(null,o),i):(n(i),void Dt(n.bind(null,o)))}"object"===jt(r)&&e(r),"function"==typeof r&&r()}}(n)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}}var It=n(269),Lt=n.n(It);function Ft(e){for(var t=1;t=0&&e<=1}));var u=Qt(r,i),p=Qt(a,o),h=Xt(r,i),d=function(e){return e>1?1:e<0?0:e},f=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var a=u(n)-t,i=h(n);if(Math.abs(a-t)<1e-4||i<1e-4)return p(n);n=d(n-a/i)}return p(n)};return f.isStepper=!1,f},en=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,a=void 0===r?8:r,i=e.dt,o=void 0===i?17:i,s=function(e,t,r){var i=r+(-(e-t)*n-r*a)*o/1e3,s=r*o/1e3+e;return Math.abs(s-t)<1e-4&&Math.abs(i)<1e-4?[t,0]:[s,i]};return s.isStepper=!0,s.dt=o,s},tn=n(270),nn=n.n(tn);function rn(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function dn(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0?n[a-1]:r,h=c||Object.keys(l);if("function"==typeof s||"spring"===s)return dn(e).concat([t.runJSAnimation.bind(t,{from:p.style,to:l,duration:i,easing:s}),i]);var d=Gt(h,i,s),f=fn({},p.style,l,{transition:d});return dn(e).concat([f,i,u]).filter(Vt)}),[o,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=Mt());var t=e.begin,n=e.duration,r=e.attributeName,a=e.to,i=e.easing,o=e.onAnimationStart,s=e.onAnimationEnd,l=e.steps,c=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),"function"!=typeof i&&"function"!=typeof c&&"spring"!==i)if(l.length>1)this.runStepAnimation(e);else{var p=r?mn({},r,a):a,h=Gt(Object.keys(p),n,i);u.start([o,t,fn({},p,{transition:h}),n,s])}else this.runJSAnimation(e)}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.begin,e.duration,e.attributeName,e.easing,e.isActive),r=(e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart,hn(e,["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"])),a=i.Children.count(t),s=Ht(this.state.style);if("function"==typeof t)return t(s);if(!n||0===a)return t;var l=function(e){var t=e.props,n=t.style,a=void 0===n?{}:n,o=t.className;return Object(i.cloneElement)(e,fn({},r,{style:fn({},a,s),className:o}))};return 1===a?l(i.Children.only(t)):o.a.createElement("div",null,i.Children.map(t,(function(e){return l(e)})))}}])&&gn(n.prototype,r),a&&gn(n,a),t}(i.PureComponent);_n.displayName="Animate",_n.propTypes={from:l.a.oneOfType([l.a.object,l.a.string]),to:l.a.oneOfType([l.a.object,l.a.string]),attributeName:l.a.string,duration:l.a.number,begin:l.a.number,easing:l.a.oneOfType([l.a.string,l.a.func]),steps:l.a.arrayOf(l.a.shape({duration:l.a.number.isRequired,style:l.a.object.isRequired,easing:l.a.oneOfType([l.a.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),l.a.func]),properties:l.a.arrayOf("string"),onAnimationEnd:l.a.func})),children:l.a.oneOfType([l.a.node,l.a.func]),isActive:l.a.bool,canBegin:l.a.bool,onAnimationEnd:l.a.func,shouldReAnimate:l.a.bool,onAnimationStart:l.a.func,onAnimationReStart:l.a.func},_n.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};var En=_n,Sn=n(96);function An(e){return(An="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xn(){return(xn=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function On(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pn(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.steps,n=e.duration;return t&&t.length?t.reduce((function(e,t){return e+(C()(t.duration)&&t.duration>0?t.duration:0)}),0):C()(n)?n:0},Rn=function(e){function t(){var e,n;On(this,t);for(var r=arguments.length,a=new Array(r),i=0;iu[t]+a?Math.max(p,u[t]):Math.max(h,u[t])},n}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sr(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"updateBBox",value:function(){var e=this.state,t=e.boxWidth,n=e.boxHeight;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-t)>1||Math.abs(r.height-n)>1)&&this.setState({boxWidth:r.width,boxHeight:r.height})}else-1===t&&-1===n||this.setState({boxWidth:-1,boxHeight:-1})}},{key:"render",value:function(){var e,t,n,r=this,a=this.props,i=a.payload,s=a.isAnimationActive,l=a.animationDuration,c=a.animationEasing,p=a.filterNull,d=function(e,t){return!0===e?ve()(t,cr):v()(e)?ve()(t,e):t}(a.paylodUniqBy,p&&i&&i.length?i.filter((function(e){return!h()(e.value)})):i),f=d&&d.length,m=this.props,g=m.content,y=m.viewBox,b=m.coordinate,w=m.position,_=m.active,E=tr({pointerEvents:"none",visibility:_&&f?"visible":"hidden",position:"absolute",top:0},m.wrapperStyle);if(w&&P(w.x)&&P(w.y))t=w.x,n=w.y;else{var S=this.state,A=S.boxWidth,x=S.boxHeight;A>0&&x>0&&b?(t=this.getTranslate({key:"x",tooltipDimension:A,viewBoxDimension:y.width}),n=this.getTranslate({key:"y",tooltipDimension:x,viewBoxDimension:y.height})):E.visibility="hidden"}E=tr({},Ht({transform:this.props.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}),{},E),s&&_&&(E=tr({},Ht({transition:"transform ".concat(l,"ms ").concat(c)}),{},E));var C=u()(lr,(nr(e={},"".concat(lr,"-right"),P(t)&&b&&P(b.x)&&t>=b.x),nr(e,"".concat(lr,"-left"),P(t)&&b&&P(b.x)&&t=b.y),nr(e,"".concat(lr,"-top"),P(n)&&b&&P(b.y)&&n0?mr()(n.updateDimensionsImmediate,e.debounce):n.updateDimensionsImmediate,n}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Er(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.getContainerSize();e&&this.setState(e)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"getContainerSize",value:function(){return this.container?{containerWidth:this.container.clientWidth,containerHeight:this.container.clientHeight}:null}},{key:"renderChart",value:function(){var e=this.state,t=e.containerWidth,n=e.containerHeight;if(t<0||n<0)return null;var r=this.props,a=r.aspect,i=r.width,s=r.height,l=(r.minWidth,r.minHeight,r.maxHeight),c=r.children;O(i)||O(s);var u=O(i)?t:i,p=O(s)?n:s;return a&&a>0&&(u?p=u/a:p&&(u=p*a),l&&p>l&&(p=l)),o.a.cloneElement(c,{width:u,height:p})}},{key:"render",value:function(){var e=this,t=this.props,n=t.minWidth,r=t.minHeight,a=t.width,i=t.height,s=t.maxHeight,l=t.id,c=t.className,p={width:a,height:i,minWidth:n,minHeight:r,maxHeight:s};return o.a.createElement("div",{id:l,className:u()("recharts-responsive-container",c),style:p,ref:function(t){e.container=t}},this.renderChart(),o.a.createElement(yr.a,{handleWidth:!0,handleHeight:!0,onResize:this.handleResize}))}}])&&br(n.prototype,r),a&&br(n,a),t}(i.Component);Sr.displayName="ResponsiveContainer",Sr.propTypes={aspect:l.a.number,width:l.a.oneOfType([l.a.string,l.a.number]),height:l.a.oneOfType([l.a.string,l.a.number]),minHeight:l.a.oneOfType([l.a.string,l.a.number]),minWidth:l.a.oneOfType([l.a.string,l.a.number]),maxHeight:l.a.oneOfType([l.a.string,l.a.number]),children:l.a.node.isRequired,debounce:l.a.number,id:l.a.oneOfType([l.a.string,l.a.number]),className:l.a.oneOfType([l.a.string,l.a.number])},Sr.defaultProps={width:"100%",height:"100%",debounce:0};var Ar=Sr;function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kr(){return null}kr.propTypes=function(e){for(var t=1;t=0&&a===+a?"".concat(a,"px"):a),";");var r,a,i}),"")},Ur=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||te())return{width:0,height:0};var n="".concat(e),r=Fr(t),a="".concat(n,"-").concat(r);if(Mr.widthCache[a])return Mr.widthCache[a];try{var i=document.getElementById("recharts_measurement_span");i||((i=document.createElement("span")).setAttribute("id","recharts_measurement_span"),document.body.appendChild(i));var o=Dr({},Ir,{},t);Object.keys(o).map((function(e){return i.style[e]=o[e],e})),i.textContent=n;var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return Mr.widthCache[a]=l,++Mr.cacheCount>2e3&&(Mr.cacheCount=0,Mr.widthCache={}),l}catch(e){return{width:0,height:0}}};function zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Br(e){return(Br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vr(){return(Vr=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Hr(e,t){for(var n=0;nt?1:e>=t?0:NaN},oa=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return ia(t(e),n)}),{left:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r>>1;e(t[i],n)<0?r=i+1:a=i}return r},right:function(t,n,r,a){for(null==r&&(r=0),null==a&&(a=t.length);r>>1;e(t[i],n)>0?a=i:r=i+1}return r}}};var sa=oa(ia),la=sa.right,ca=(sa.left,la);var ua=function(e){return null===e?NaN:+e},pa=Array.prototype,ha=(pa.slice,pa.map,function(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(a);++r0)return[e];if((r=t0)for(e=Math.ceil(e/o),t=Math.floor(t/o),i=new Array(a=Math.ceil(t-e+1));++s=0?(i>=da?10:i>=fa?5:i>=ma?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=da?10:i>=fa?5:i>=ma?2:1)}function va(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=da?a*=10:i>=fa?a*=5:i>=ma&&(a*=2),t=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),o=+n(e[i],i,e);return o+(+n(e[i+1],i+1,e)-o)*(a-i)}};function wa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function _a(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e)}return this}function Ea(){}function Sa(e,t){var n=new Ea;if(e instanceof Ea)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,a=-1,i=e.length;if(null==t)for(;++a>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ei(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ei(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Va.exec(e))?new ri(t[1],t[2],t[3],1):(t=Wa.exec(e))?new ri(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ha.exec(e))?ei(t[1],t[2],t[3],t[4]):(t=Ga.exec(e))?ei(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ka.exec(e))?si(t[1],t[2]/100,t[3]/100,1):(t=$a.exec(e))?si(t[1],t[2]/100,t[3]/100,t[4]):Za.hasOwnProperty(e)?Ja(Za[e]):"transparent"===e?new ri(NaN,NaN,NaN,0):null}function Ja(e){return new ri(e>>16&255,e>>8&255,255&e,1)}function ei(e,t,n,r){return r<=0&&(e=t=n=NaN),new ri(e,t,n,r)}function ti(e){return e instanceof Fa||(e=Xa(e)),e?new ri((e=e.rgb()).r,e.g,e.b,e.opacity):new ri}function ni(e,t,n,r){return 1===arguments.length?ti(e):new ri(e,t,n,null==r?1:r)}function ri(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ai(){return"#"+oi(this.r)+oi(this.g)+oi(this.b)}function ii(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function oi(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function si(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ci(e,t,n,r)}function li(e){if(e instanceof ci)return new ci(e.h,e.s,e.l,e.opacity);if(e instanceof Fa||(e=Xa(e)),!e)return new ci;if(e instanceof ci)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,s=i-a,l=(i+a)/2;return s?(o=t===i?(n-r)/s+6*(n0&&l<1?0:o,new ci(o,s,l,e.opacity)}function ci(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ui(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function pi(e,t,n,r,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*n+(1+3*e+3*i-3*o)*r+o*a)/6}Ia(Fa,Xa,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ya,formatHex:Ya,formatHsl:function(){return li(this).formatHsl()},formatRgb:Qa,toString:Qa}),Ia(ri,ni,La(Fa,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new ri(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ri(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ai,formatHex:ai,formatRgb:ii,toString:ii})),Ia(ci,(function(e,t,n,r){return 1===arguments.length?li(e):new ci(e,t,n,null==r?1:r)}),La(Fa,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new ci(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ci(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new ri(ui(e>=240?e-240:e+120,a,r),ui(e,a,r),ui(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var hi=function(e){return function(){return e}};function di(e,t){return function(n){return e+n*t}}function fi(e){return 1==(e=+e)?mi:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):hi(isNaN(t)?n:t)}}function mi(e,t){var n=t-e;return n?di(e,n):hi(isNaN(e)?t:e)}var gi=function e(t){var n=fi(t);function r(e,t){var r=n((e=ni(e)).r,(t=ni(t)).r),a=n(e.g,t.g),i=n(e.b,t.b),o=mi(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=i(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function yi(e){return function(t){var n,r,a=t.length,i=new Array(a),o=new Array(a),s=new Array(a);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),a=e[r],i=e[r+1],o=r>0?e[r-1]:2*a-i,s=ri&&(a=t.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:Ei(n,r)})),i=xi.lastIndex;return ir&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Ri(e,t,n){var r=e[0],a=e[1],i=t[0],o=t[1];return a2?Mi:Ri,a=i=null,p}function p(t){return isNaN(t=+t)?n:(a||(a=r(o.map(e),s,l)))(e(c(t)))}return p.invert=function(n){return c(t((i||(i=r(s,o.map(e),Ei)))(n)))},p.domain=function(e){return arguments.length?(o=Pa.call(e,Pi),c===Ni||(c=ji(o)),u()):o.slice()},p.range=function(e){return arguments.length?(s=Ta.call(e),u()):s.slice()},p.rangeRound=function(e){return s=Ta.call(e),l=Oi,u()},p.clamp=function(e){return arguments.length?(c=e?ji(o):Ni,p):c!==Ni},p.interpolate=function(e){return arguments.length?(l=e,u()):l},p.unknown=function(e){return arguments.length?(n=e,p):n},function(n,r){return e=n,t=r,u()}}function Fi(e,t){return Li()(e,t)}var Ui=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function zi(e){if(!(t=Ui.exec(e)))throw new Error("invalid format: "+e);var t;return new qi({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function qi(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}zi.prototype=qi.prototype,qi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};function Bi(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}var Vi,Wi,Hi,Gi,Ki=function(e){return(e=Bi(Math.abs(e)))?e[1]:NaN},$i=function(e,t){var n=Bi(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")},Zi={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return $i(100*e,t)},r:$i,s:function(e,t){var n=Bi(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(Vi=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Bi(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},Yi=function(e){return e},Qi=Array.prototype.map,Xi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Wi=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Yi:(t=Qi.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,i=[],o=0,s=t[0],l=0;a>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(a-=s,a+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return i.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Yi:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Qi.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"-":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function p(e){var t=(e=zi(e)).fill,n=e.align,p=e.sign,h=e.symbol,d=e.zero,f=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):Zi[v]||(void 0===g&&(g=12),y=!0,v="g"),(d||"0"===t&&"="===n)&&(d=!0,t="0",n="=");var b="$"===h?a:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",w="$"===h?i:/[%p]/.test(v)?l:"",_=Zi[v],E=/[defgprs%]/.test(v);function S(e){var a,i,l,h=b,S=w;if("c"===v)S=_(e)+S,e="";else{var A=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:_(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),A&&0==+e&&"+"!==p&&(A=!1),h=(A?"("===p?p:c:"-"===p||"("===p?"":p)+h,S=("s"===v?Xi[8+Vi/3]:"")+S+(A&&"("===p?")":""),E)for(a=-1,i=e.length;++a(l=e.charCodeAt(a))||l>57){S=(46===l?o+e.slice(a+1):e.slice(a))+S,e=e.slice(0,a);break}}m&&!d&&(e=r(e,1/0));var x=h.length+e.length+S.length,C=x>1)+h+e+S+C.slice(x);break;default:e=C+h+e+S}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=function(){return e+""},S}return{format:p,formatPrefix:function(e,t){var n=p(((e=zi(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Ki(t)/3))),a=Math.pow(10,-r),i=Xi[8+r/3];return function(e){return n(a*e)+i}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Hi=Wi.format,Gi=Wi.formatPrefix;var Ji=function(e,t,n,r){var a,i=va(e,t,n);switch((r=zi(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ki(t)/3)))-Ki(Math.abs(e)))}(i,o))||(r.precision=a),Gi(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ki(t)-Ki(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(e){return Math.max(0,-Ki(Math.abs(e)))}(i))||(r.precision=a-2*("%"===r.type))}return Hi(r)};function eo(e){var t=e.domain;return e.ticks=function(e){var n=t();return ga(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Ji(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,a=t(),i=0,o=a.length-1,s=a[i],l=a[o];return l0?r=ya(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=ya(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(a[i]=Math.floor(s/r)*r,a[o]=Math.ceil(l/r)*r,t(a)):r<0&&(a[i]=Math.ceil(s*r)/r,a[o]=Math.floor(l*r)/r,t(a)),e},e}function to(){var e=Fi(Ni,Ni);return e.copy=function(){return Ii(e,to())},wa.apply(e,arguments),eo(e)}function no(e){var t;function n(e){return isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Pa.call(t,Pi),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return no(e).unknown(t)},e=arguments.length?Pa.call(e,Pi):[0,1],eo(n)}var ro=function(e,t){var n,r=0,a=(e=e.slice()).length-1,i=e[r],o=e[a];return o0){for(;hl)break;m.push(p)}}else for(;h=1;--u)if(!((p=c*u)l)break;m.push(p)}}else m=ga(h,d,Math.min(d-h,f)).map(n);return r?m.reverse():m},r.tickFormat=function(e,a){if(null==a&&(a=10===i?".0e":","),"function"!=typeof a&&(a=Hi(a)),e===1/0)return a;null==e&&(e=10);var o=Math.max(1,i*e/r.ticks().length);return function(e){var r=e/n(Math.round(t(e)));return r*i0?r[a-1]:t[0],a=r?[a[r-1],n]:[a[o-1],a[o]]},o.unknown=function(t){return arguments.length?(e=t,o):o},o.thresholds=function(){return a.slice()},o.copy=function(){return Ao().domain([t,n]).range(i).unknown(e)},wa.apply(eo(o),arguments)}function xo(){var e,t=[.5],n=[0,1],r=1;function a(a){return a<=a?n[ca(t,a,0,r)]:e}return a.domain=function(e){return arguments.length?(t=Ta.call(e),r=Math.min(t.length,n.length-1),a):t.slice()},a.range=function(e){return arguments.length?(n=Ta.call(e),r=Math.min(t.length,n.length-1),a):n.slice()},a.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},a.unknown=function(t){return arguments.length?(e=t,a):e},a.copy=function(){return xo().domain(t).range(n).unknown(e)},wa.apply(a,arguments)}var Co=new Date,ko=new Date;function Oo(e,t,n,r){function a(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return a.floor=function(t){return e(t=new Date(+t)),t},a.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},a.round=function(e){var t=a(e),n=a.ceil(e);return e-t0))return s;do{s.push(o=new Date(+n)),t(n,i),e(n)}while(o=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(a.count=function(t,r){return Co.setTime(+t),ko.setTime(+r),e(Co),e(ko),Math.floor(n(Co,ko))},a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?a.filter(r?function(t){return r(t)%e==0}:function(t){return a.count(0,t)%e==0}):a:null}),a}var Po=Oo((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Po.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Oo((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var To=Po,No=(Po.range,Oo((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}))),Do=No;No.range;function jo(e){return Oo((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var Ro=jo(0),Mo=jo(1),Io=jo(2),Lo=jo(3),Fo=jo(4),Uo=jo(5),zo=jo(6),qo=(Ro.range,Mo.range,Io.range,Lo.range,Fo.range,Uo.range,zo.range,Oo((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}))),Bo=qo,Vo=(qo.range,Oo((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}))),Wo=Vo,Ho=(Vo.range,Oo((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()}))),Go=Ho,Ko=(Ho.range,Oo((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}))),$o=Ko,Zo=(Ko.range,Oo((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e})));Zo.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Oo((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Zo:null};var Yo=Zo;Zo.range;function Qo(e){return Oo((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var Xo=Qo(0),Jo=Qo(1),es=Qo(2),ts=Qo(3),ns=Qo(4),rs=Qo(5),as=Qo(6),is=(Xo.range,Jo.range,es.range,ts.range,ns.range,rs.range,as.range,Oo((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}))),os=is,ss=(is.range,Oo((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()})));ss.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Oo((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var ls=ss;ss.range;function cs(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function us(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ps(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var hs,ds,fs,ms={"-":"",_:" ",0:"0"},gs=/^\s*\d+/,ys=/^%/,vs=/[\\^$*+?|[\]().{}]/g;function bs(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i68?1900:2e3),n+r[0].length):-1}function Ts(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ns(e,t,n){var r=gs.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Ds(e,t,n){var r=gs.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function js(e,t,n){var r=gs.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Rs(e,t,n){var r=gs.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ms(e,t,n){var r=gs.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Is(e,t,n){var r=gs.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Ls(e,t,n){var r=gs.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Fs(e,t,n){var r=gs.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Us(e,t,n){var r=gs.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zs(e,t,n){var r=ys.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function qs(e,t,n){var r=gs.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Bs(e,t,n){var r=gs.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Vs(e,t){return bs(e.getDate(),t,2)}function Ws(e,t){return bs(e.getHours(),t,2)}function Hs(e,t){return bs(e.getHours()%12||12,t,2)}function Gs(e,t){return bs(1+Bo.count(To(e),e),t,3)}function Ks(e,t){return bs(e.getMilliseconds(),t,3)}function $s(e,t){return Ks(e,t)+"000"}function Zs(e,t){return bs(e.getMonth()+1,t,2)}function Ys(e,t){return bs(e.getMinutes(),t,2)}function Qs(e,t){return bs(e.getSeconds(),t,2)}function Xs(e){var t=e.getDay();return 0===t?7:t}function Js(e,t){return bs(Ro.count(To(e)-1,e),t,2)}function el(e){var t=e.getDay();return t>=4||0===t?Fo(e):Fo.ceil(e)}function tl(e,t){return e=el(e),bs(Fo.count(To(e),e)+(4===To(e).getDay()),t,2)}function nl(e){return e.getDay()}function rl(e,t){return bs(Mo.count(To(e)-1,e),t,2)}function al(e,t){return bs(e.getFullYear()%100,t,2)}function il(e,t){return bs((e=el(e)).getFullYear()%100,t,2)}function ol(e,t){return bs(e.getFullYear()%1e4,t,4)}function sl(e,t){var n=e.getDay();return bs((e=n>=4||0===n?Fo(e):Fo.ceil(e)).getFullYear()%1e4,t,4)}function ll(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+bs(t/60|0,"0",2)+bs(t%60,"0",2)}function cl(e,t){return bs(e.getUTCDate(),t,2)}function ul(e,t){return bs(e.getUTCHours(),t,2)}function pl(e,t){return bs(e.getUTCHours()%12||12,t,2)}function hl(e,t){return bs(1+os.count(ls(e),e),t,3)}function dl(e,t){return bs(e.getUTCMilliseconds(),t,3)}function fl(e,t){return dl(e,t)+"000"}function ml(e,t){return bs(e.getUTCMonth()+1,t,2)}function gl(e,t){return bs(e.getUTCMinutes(),t,2)}function yl(e,t){return bs(e.getUTCSeconds(),t,2)}function vl(e){var t=e.getUTCDay();return 0===t?7:t}function bl(e,t){return bs(Xo.count(ls(e)-1,e),t,2)}function wl(e){var t=e.getUTCDay();return t>=4||0===t?ns(e):ns.ceil(e)}function _l(e,t){return e=wl(e),bs(ns.count(ls(e),e)+(4===ls(e).getUTCDay()),t,2)}function El(e){return e.getUTCDay()}function Sl(e,t){return bs(Jo.count(ls(e)-1,e),t,2)}function Al(e,t){return bs(e.getUTCFullYear()%100,t,2)}function xl(e,t){return bs((e=wl(e)).getUTCFullYear()%100,t,2)}function Cl(e,t){return bs(e.getUTCFullYear()%1e4,t,4)}function kl(e,t){var n=e.getUTCDay();return bs((e=n>=4||0===n?ns(e):ns.ceil(e)).getUTCFullYear()%1e4,t,4)}function Ol(){return"+0000"}function Pl(){return"%"}function Tl(e){return+e}function Nl(e){return Math.floor(+e/1e3)}!function(e){hs=function(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=_s(a),u=Es(a),p=_s(i),h=Es(i),d=_s(o),f=Es(o),m=_s(s),g=Es(s),y=_s(l),v=Es(l),b={a:function(e){return o[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Vs,e:Vs,f:$s,g:il,G:sl,H:Ws,I:Hs,j:Gs,L:Ks,m:Zs,M:Ys,p:function(e){return a[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Tl,s:Nl,S:Qs,u:Xs,U:Js,V:tl,w:nl,W:rl,x:null,X:null,y:al,Y:ol,Z:ll,"%":Pl},w={a:function(e){return o[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:cl,e:cl,f:fl,g:xl,G:kl,H:ul,I:pl,j:hl,L:dl,m:ml,M:gl,p:function(e){return a[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Tl,s:Nl,S:yl,u:vl,U:bl,V:_l,w:El,W:Sl,x:null,X:null,y:Al,Y:Cl,Z:Ol,"%":Pl},_={a:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return A(e,t,n,r)},d:js,e:js,f:Us,g:Ps,G:Os,H:Ms,I:Ms,j:Rs,L:Fs,m:Ds,M:Is,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:Ns,Q:qs,s:Bs,S:Ls,u:As,U:xs,V:Cs,w:Ss,W:ks,x:function(e,t,r){return A(e,n,t,r)},X:function(e,t,n){return A(e,r,t,n)},y:Ps,Y:Os,Z:Ts,"%":zs};function E(e,t){return function(n){var r,a,i,o=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in i||(i.w=1),"Z"in i?(a=(r=us(ps(i.y,0,1))).getUTCDay(),r=a>4||0===a?Jo.ceil(r):Jo(r),r=os.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(a=(r=cs(ps(i.y,0,1))).getDay(),r=a>4||0===a?Mo.ceil(r):Mo(r),r=Bo.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),a="Z"in i?us(ps(i.y,0,1)).getUTCDay():cs(ps(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(a+5)%7:i.w+7*i.U-(a+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,us(i)):cs(i)}}function A(e,t,n,r){for(var a,i,o=0,s=t.length,l=n.length;o=l)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=_[a in ms?t.charAt(o++):a])||(r=i(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),w.x=E(n,w),w.X=E(r,w),w.c=E(t,w),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}(e),ds=hs.format,hs.parse,fs=hs.utcFormat,hs.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Dl(e){return new Date(e)}function jl(e){return e instanceof Date?+e:+new Date(+e)}function Rl(e,t,n,r,a,i,o,s,l){var c=Fi(Ni,Ni),u=c.invert,p=c.domain,h=l(".%L"),d=l(":%S"),f=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),b=l("%Y"),w=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function _(s){return(o(s)1)for(var n,r,a,i=1,o=e[t[0]],s=o.length;i=0;)n[t]=t;return n};function oc(e,t){return e[t]}function sc(e){return(sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lc(){return(lc=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function pc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hc(e,t){for(var n=0;n=0}));if(i&&i.length){var o=i.map((function(e){return e.props.dataKey}));return e.reduce((function(e,t){var r=Ec(t,n,0),a=w()(r)?[ta()(r),Jr()(r)]:[r,r],i=o.reduce((function(e,n){var r=Ec(t,n,0),i=a[0]-Math.abs(w()(r)?r[0]:r),o=a[1]+Math.abs(w()(r)?r[1]:r);return[Math.min(i,e[0]),Math.max(o,e[1])]}),[1/0,-1/0]);return[Math.min(i[0],e[0]),Math.max(i[1],e[1])]}),[1/0,-1/0])}return null},kc=function(e,t,n,r){var a=t.map((function(t){var a=t.props.dataKey;return"number"===n&&a&&Cc(e,t,a)||Sc(e,a,n,r)}));if("number"===n)return a.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]);var i={};return a.reduce((function(e,t){for(var n=0,r=t.length;n=0||t.indexOf("AreaChart")>=0)?{scale:Ma(),realScaleType:"point"}:"category"===a?{scale:ja(),realScaleType:"band"}:{scale:to(),realScaleType:"linear"};if(f()(n)){var s="scale".concat(n.slice(0,1).toUpperCase()).concat(n.slice(1));return{scale:(r[s]||Ma)(),realScaleType:r[s]?s:"point"}}return v()(n)?{scale:n}:{scale:Ma(),realScaleType:"point"}},jc=function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),a=Math.min(r[0],r[1])-1e-4,i=Math.max(r[0],r[1])+1e-4,o=e(t[0]),s=e(t[n-1]);(oi||si)&&e.domain([t[0],t[n-1]])}},Rc=function(e,t){if(!e)return null;for(var n=0,r=e.length;nr)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]=0?(e[o][n][0]=a,e[o][n][1]=a+s,a=e[o][n][1]):(e[o][n][0]=i,e[o][n][1]=i+s,i=e[o][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,a,i=0,o=e[0].length;i0){for(var n,r=0,a=e[t[0]],i=a.length;r0&&(r=(n=e[t[0]]).length)>0){for(var n,r,a,i=0,o=1;o=0?0:a<0?a:r}return n[0]},Bc=function(e,t,n){return Object.keys(e).reduce((function(r,a){var i=e[a].stackedData.reduce((function(e,r){var a=r.slice(t,n+1).reduce((function(e,t){return[ta()(t.concat([e[0]]).filter(P)),Jr()(t.concat([e[1]]).filter(P))]}),[1/0,-1/0]);return[Math.min(e[0],a[0]),Math.max(e[1],a[1])]}),[1/0,-1/0]);return[Math.min(i[0],r[0]),Math.max(i[1],r[1])]}),[1/0,-1/0]).map((function(e){return e===1/0||e===-1/0?0:e}))},Vc=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Wc=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Hc=function(e,t,n){if(!w()(e))return t;var r=[];if(P(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(Vc.test(e[0])){var a=+Vc.exec(e[0])[1];r[0]=t[0]-a}else v()(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(P(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(Wc.test(e[1])){var i=+Wc.exec(e[1])[1];r[1]=t[1]+i}else v()(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},Gc=function(e,t){if(e&&e.scale&&e.scale.bandwidth)return e.scale.bandwidth();if(e&&t&&t.length>=2){for(var n=Un()(t,(function(e){return e.coordinate})),r=1/0,a=1,i=n.length;a2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},nu=function(e,t,n,r,a){var i=e.width,o=e.height,s=e.startAngle,l=e.endAngle,c=j(e.cx,i,i/2),u=j(e.cy,o,o/2),p=tu(i,o,n),d=j(e.innerRadius,p,0),f=j(e.outerRadius,p,.8*p);return Object.keys(t).reduce((function(e,n){var i,o=t[n],p=o.domain,m=o.reversed;if(h()(o.range))"angleAxis"===r?i=[s,l]:"radiusAxis"===r&&(i=[d,f]),m&&(i=[i[1],i[0]]);else{var g=Qc(i=o.range,2);s=g[0],l=g[1]}var y=Dc(o,a),v=y.realScaleType,b=y.scale;b.domain(p).range(i),jc(b);var w=Fc(b,Zc({},o,{realScaleType:v})),_=Zc({},o,{},w,{range:i,radius:f,realScaleType:v,scale:b,cx:c,cy:u,innerRadius:d,outerRadius:f,startAngle:s,endAngle:l});return Zc({},e,Yc({},n,_))}),{})},ru=function(e,t){var n,r,a,i,o,s,l=e.x,c=e.y,u=t.cx,p=t.cy,h=(r={x:u,y:p},a=(n={x:l,y:c}).x,i=n.y,o=r.x,s=r.y,Math.sqrt(Math.pow(a-o,2)+Math.pow(i-s,2)));if(h<=0)return{radius:h};var d=(l-u)/h,f=Math.acos(d);return c>p&&(f=2*Math.PI-f),{radius:h,angle:Jc(f),angleInRadian:f}},au=function(e,t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(a,i)},iu=function(e,t){var n=e.x,r=e.y,a=ru({x:n,y:r},t),i=a.radius,o=a.angle,s=t.innerRadius,l=t.outerRadius;if(il)return!1;if(0===i)return!0;var c,u=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),a=Math.floor(n/360),i=Math.min(r,a);return{startAngle:t-360*i,endAngle:n-360*i}}(t),p=u.startAngle,h=u.endAngle,d=o;if(p<=h){for(;d>h;)d-=360;for(;d=p&&d<=h}else{for(;d>p;)d-=360;for(;d=h&&d<=p}return c?Zc({},t,{radius:i,angle:au(d,t)}):null};function ou(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=0?1:-1;"insideStart"===i?(r=g+_*l,a=v):"insideEnd"===i?(r=y-_*l,a=!v):"end"===i&&(r=y+_*l,a=v),a=w<=0?a:!a;var E=eu(p,d,b,r),S=eu(p,d,b,r+359*(a?1:-1)),A="M".concat(E.x,",").concat(E.y,"\n A").concat(b,",").concat(b,",0,1,").concat(a?0:1,",\n ").concat(S.x,",").concat(S.y),x=h()(e.id)?D("recharts-radial-line-"):e.id;return o.a.createElement("text",su({},n,{dominantBaseline:"central",className:u()("recharts-radial-bar-label",c)}),o.a.createElement("defs",null,o.a.createElement("path",{id:x,d:A})),o.a.createElement("textPath",{xlinkHref:"#".concat(x)},t))};function fu(e){var t,n=e.viewBox,r=e.position,a=e.value,s=e.children,l=e.content,c=e.className,p=void 0===c?"":c;if(!n||h()(a)&&h()(s)&&!Object(i.isValidElement)(l)&&!v()(l))return null;if(Object(i.isValidElement)(l))return Object(i.cloneElement)(l,e);if(v()(l)){if(t=l(e),Object(i.isValidElement)(t))return t}else t=function(e){var t=e.value,n=e.formatter,r=h()(e.children)?t:e.children;return v()(n)?n(r):r}(e);var d=function(e){return P(e.cx)}(n),f=Z(e),m=Q(e);if(d&&("insideStart"===r||"insideEnd"===r||"end"===r))return du(e,t,f);var y=d?function(e){var t=e.viewBox,n=e.offset,r=e.position,a=t.cx,i=t.cy,o=t.innerRadius,s=t.outerRadius,l=(t.startAngle+t.endAngle)/2;if("outside"===r){var c=eu(a,i,s+n,l),u=c.x;return{x:u,y:c.y,textAnchor:u>=a?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:a,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:a,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:a,y:i,textAnchor:"middle",verticalAnchor:"end"};var p=eu(a,i,(o+s)/2,l);return{x:p.x,y:p.y,textAnchor:"middle",verticalAnchor:"middle"}}(e):function(e){var t=e.viewBox,n=e.offset,r=e.position,a=t.x,i=t.y,o=t.width,s=t.height,l=s>=0?1:-1;return"top"===r?{x:a+o/2,y:i-l*n,textAnchor:"middle",verticalAnchor:l>0?"end":"start"}:"bottom"===r?{x:a+o/2,y:i+s+l*n,textAnchor:"middle",verticalAnchor:"start"}:"left"===r?{x:a-n,y:i+s/2,textAnchor:"end",verticalAnchor:"middle"}:"right"===r?{x:a+o+n,y:i+s/2,textAnchor:"start",verticalAnchor:"middle"}:"insideLeft"===r?{x:a+n,y:i+s/2,textAnchor:"start",verticalAnchor:"middle"}:"insideRight"===r?{x:a+o-n,y:i+s/2,textAnchor:"end",verticalAnchor:"middle"}:"insideTop"===r?{x:a+o/2,y:i+l*n,textAnchor:"middle",verticalAnchor:"start"}:"insideBottom"===r?{x:a+o/2,y:i+s-l*n,textAnchor:"middle",verticalAnchor:"end"}:"insideTopLeft"===r?{x:a+n,y:i+l*n,textAnchor:"start",verticalAnchor:"start"}:"insideTopRight"===r?{x:a+o-n,y:i+l*n,textAnchor:"end",verticalAnchor:"start"}:"insideBottomLeft"===r?{x:a+n,y:i+s-l*n,textAnchor:"start",verticalAnchor:"end"}:"insideBottomRight"===r?{x:a+o-n,y:i+s-l*n,textAnchor:"end",verticalAnchor:"end"}:g()(r)&&(P(r.x)||O(r.x))&&(P(r.y)||O(r.y))?{x:a+j(r.x,o),y:i+j(r.y,s),textAnchor:"end",verticalAnchor:"end"}:{x:a+o/2,y:i+s/2,textAnchor:"middle",verticalAnchor:"middle"}}(e);return o.a.createElement(Qr,su({className:u()("recharts-label",p)},f,y,m),t)}fu.displayName="Label",fu.defaultProps={offset:5},fu.propTypes=hu;var mu=function(e){var t=e.cx,n=e.cy,r=e.angle,a=e.startAngle,i=e.endAngle,o=e.r,s=e.radius,l=e.innerRadius,c=e.outerRadius,u=e.x,p=e.y,h=e.top,d=e.left,f=e.width,m=e.height,g=e.clockWise;if(P(f)&&P(m)){if(P(u)&&P(p))return{x:u,y:p,width:f,height:m};if(P(h)&&P(d))return{x:h,y:d,width:f,height:m}}return P(u)&&P(p)?{x:u,y:p,width:0,height:0}:P(t)&&P(n)?{cx:t,cy:n,startAngle:a||r||0,endAngle:i||r||0,innerRadius:l||0,outerRadius:c||s||o||0,clockWise:g}:e.viewBox?e.viewBox:{}},gu=function(e,t){return e?!0===e?o.a.createElement(fu,{key:"label-implicit",viewBox:t}):T(e)?o.a.createElement(fu,{key:"label-implicit",viewBox:t,value:e}):Object(i.isValidElement)(e)?e.type===fu?Object(i.cloneElement)(e,{key:"label-implicit",viewBox:t}):o.a.createElement(fu,{key:"label-implicit",content:e,viewBox:t}):v()(e)?o.a.createElement(fu,{key:"label-implicit",content:e,viewBox:t}):g()(e)?o.a.createElement(fu,su({viewBox:t},e,{key:"label-implicit"})):null:null};fu.parseViewBox=mu,fu.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=mu(e),o=K(r,fu).map((function(e,n){return Object(i.cloneElement)(e,{viewBox:t||a,key:"label-".concat(n)})}));if(!n)return o;var s=gu(e.label,t||a);return[s].concat(ou(o))};var yu=fu,vu=n(156),bu=n.n(vu);function wu(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var Cu={id:l.a.string,data:l.a.arrayOf(l.a.object),valueAccessor:l.a.func,clockWise:l.a.bool,dataKey:l.a.oneOfType([l.a.string,l.a.number,l.a.func])},ku={valueAccessor:function(e){return w()(e.value)?bu()(e.value):e.value}};function Ou(e){var t=e.data,n=e.valueAccessor,r=e.dataKey,a=e.clockWise,i=e.id,s=xu(e,["data","valueAccessor","dataKey","clockWise","id"]);return t&&t.length?o.a.createElement(ge,{className:"recharts-label-list"},t.map((function(e,t){var l=h()(r)?n(e,t):Ec(e&&e.payload,r),c=h()(i)?{}:{id:"".concat(i,"-").concat(t)};return o.a.createElement(yu,_u({},Z(e),s,c,{index:t,value:l,viewBox:yu.parseViewBox(h()(a)?e:Su({},e,{clockWise:a})),key:"label-".concat(t)}))}))):null}Ou.propTypes=Cu,Ou.displayName="LabelList";var Pu=function(e,t){return e?!0===e?o.a.createElement(Ou,{key:"labelList-implicit",data:t}):o.a.isValidElement(e)||v()(e)?o.a.createElement(Ou,{key:"labelList-implicit",data:t,content:e}):g()(e)?o.a.createElement(Ou,_u({data:t},e,{key:"labelList-implicit"})):null:null};Ou.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=K(r,Ou).map((function(e,n){return Object(i.cloneElement)(e,{data:t,key:"labelList-".concat(n)})}));if(!n)return a;var o=Pu(e.label,t);return[o].concat(wu(a))},Ou.defaultProps=ku;var Tu=Ou;function Nu(e){return(Nu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Du(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ju(e){var t,n=e.component,r=Du(e,["component"]);return Object(i.isValidElement)(n)?t=Object(i.cloneElement)(n,r):v()(n)?t=n(r):Nu(n),o.a.createElement(ge,{className:"recharts-customized-wrapper"},t)}function Ru(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Iu(e){return(Iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lu(){return(Lu=Object.assign||function(e){for(var t=1;t180),",").concat(+(i>s),",\n ").concat(c.x,",").concat(c.y,"\n ");if(r>0){var p=eu(t,n,r,i),h=eu(t,n,r,s);u+="L ".concat(h.x,",").concat(h.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(o)>180),",").concat(+(i<=s),",\n ").concat(p.x,",").concat(p.y," Z")}else u+="L ".concat(t,",").concat(n," Z");return u},Hu=function(e){function t(){return Fu(this,t),zu(this,qu(t).apply(this,arguments))}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bu(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,i=e.cornerRadius,s=e.forceCornerRadius,l=e.cornerIsExternal,c=e.startAngle,p=e.endAngle,h=e.className;if(a0&&Math.abs(c-p)<360?function(e){var t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,i=e.cornerRadius,o=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,c=e.endAngle,u=k(c-l),p=Vu({cx:t,cy:n,radius:a,angle:l,sign:u,cornerRadius:i,cornerIsExternal:s}),h=p.circleTangency,d=p.lineTangency,f=p.theta,m=Vu({cx:t,cy:n,radius:a,angle:c,sign:-u,cornerRadius:i,cornerIsExternal:s}),g=m.circleTangency,y=m.lineTangency,v=m.theta,b=Math.abs(l-c)-f-v;if(b<0)return o?"M ".concat(d.x,",").concat(d.y,"\n a").concat(i,",").concat(i,",0,0,1,").concat(2*i,",0\n a").concat(i,",").concat(i,",0,0,1,").concat(2*-i,",0\n "):Wu({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:l,endAngle:c});var w="M ".concat(d.x,",").concat(d.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(h.x,",").concat(h.y,"\n A").concat(a,",").concat(a,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(g.x,",").concat(g.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(y.x,",").concat(y.y,"\n ");if(r>0){var _=Vu({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),E=_.circleTangency,S=_.lineTangency,A=_.theta,x=Vu({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),C=x.circleTangency,O=x.lineTangency,P=x.theta,T=Math.abs(l-c)-A-P;if(T<0)return"".concat(w,"L").concat(t,",").concat(n,"Z");w+="L".concat(O.x,",").concat(O.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(C.x,",").concat(C.y,"\n A").concat(r,",").concat(r,",0,").concat(+(T>180),",").concat(+(u>0),",").concat(E.x,",").concat(E.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(S.x,",").concat(S.y,"Z")}else w+="L".concat(t,",").concat(n,"Z");return w}({cx:t,cy:n,innerRadius:r,outerRadius:a,cornerRadius:Math.min(g,m/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:p}):Wu({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:c,endAngle:p}),o.a.createElement("path",Lu({},Z(this.props),Q(this.props),{className:f,d:d}))}}])&&Uu(n.prototype,r),a&&Uu(n,a),t}(i.PureComponent);Hu.displayName="Sector",Hu.propTypes=function(e){for(var t=1;t=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function pp(e){return e[0]}function hp(e){return e[1]}var dp=function(){var e=pp,t=hp,n=Ve(!0),r=null,a=ep,i=null;function o(o){var s,l,c,u=o.length,p=!1;for(null==r&&(i=a(c=Be())),s=0;s<=u;++s)!(s=u;--p)s.point(g[p],y[p]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(h,c,l),y[c]=+n(h,c,l),s.point(t?+t(h,c,l):g[c],r?+r(h,c,l):y[c]))}if(d)return s=null,d+""||null}function c(){return dp().defined(a).curve(o).context(i)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:Ve(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:Ve(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:Ve(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:Ve(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:Ve(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Ve(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(a="function"==typeof e?e:Ve(!!e),l):a},l.curve=function(e){return arguments.length?(o=e,null!=i&&(s=o(i)),l):o},l.context=function(e){return arguments.length?(null==e?i=s=null:s=o(i=e),l):i},l};function mp(e){return(mp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gp(){return(gp=Object.assign||function(e){for(var t=1;t=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(o>0&&a instanceof Array){for(var u=[],p=0;p<4;p++)u[p]=a[p]>o?o:a[p];i="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(i+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),i+="L ".concat(e+n-l*u[1],",").concat(t),u[1]>0&&(i+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n ").concat(e+n,",").concat(t+s*u[1])),i+="L ".concat(e+n,",").concat(t+r-s*u[2]),u[2]>0&&(i+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n ").concat(e+n-l*u[2],",").concat(t+r)),i+="L ".concat(e+l*u[3],",").concat(t+r),u[3]>0&&(i+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n ").concat(e,",").concat(t+r-s*u[3])),i+="Z"}else if(o>0&&a===+a&&a>0){var h=Math.min(o,a);i="M ".concat(e,",").concat(t+s*h,"\n A ").concat(h,",").concat(h,",0,0,").concat(c,",").concat(e+l*h,",").concat(t,"\n L ").concat(e+n-l*h,",").concat(t,"\n A ").concat(h,",").concat(h,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*h,"\n L ").concat(e+n,",").concat(t+r-s*h,"\n A ").concat(h,",").concat(h,",0,0,").concat(c,",").concat(e+n-l*h,",").concat(t+r,"\n L ").concat(e+l*h,",").concat(t+r,"\n A ").concat(h,",").concat(h,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*h," Z")}else i="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return i},qp=function(e){function t(){var e,n;Mp(this,t);for(var r=arguments.length,a=new Array(r),i=0;i0,from:{width:a,height:i,x:n,y:r},to:{width:a,height:i,x:n,y:r},duration:d,animationEasing:h,isActive:g},(function(t){var n=t.width,r=t.height,a=t.x,i=t.y;return o.a.createElement(Ln,{canBegin:c>0,from:"0px ".concat(-1===c?1:c,"px"),to:"".concat(c,"px 0px"),attributeName:"strokeDasharray",begin:f,duration:d,isActive:m,easing:h},o.a.createElement("path",Rp({},Z(e.props),Q(e.props),{className:y,d:zp(a,i,n,r,s),ref:function(t){e.node=t}})))})):o.a.createElement("path",Rp({},Z(this.props),Q(this.props),{className:y,d:zp(n,r,a,i,s)}))}}])&&Ip(n.prototype,r),a&&Ip(n,a),t}(i.PureComponent);qp.displayName="Rectangle",qp.propTypes=function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Vh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wh(e,t){for(var n=0;n1e-5?"outer"===t?"start":"end":n<-1e-5?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,a=e.axisLine,i=e.axisLineType,s=Jh({},Z(this.props),{fill:"none"},Z(a));if("circle"===i)return o.a.createElement(ch,Qh({className:"recharts-polar-angle-axis-line"},s,{cx:t,cy:n,r:r}));var l=this.props.ticks.map((function(e){return eu(t,n,r,e.coordinate)}));return o.a.createElement(eh,Qh({className:"recharts-polar-angle-axis-line"},s,{points:l}))}},{key:"renderTicks",value:function(){var e=this,t=this.props,n=t.ticks,r=t.tick,a=t.tickLine,i=t.tickFormatter,s=t.stroke,l=Z(this.props),c=Z(r),u=Jh({},l,{fill:"none"},Z(a)),p=n.map((function(t,n){var p=e.getTickLineCoord(t),h=Jh({textAnchor:e.getTickTextAnchor(t)},l,{stroke:"none",fill:s},c,{index:n,payload:t,x:p.x2,y:p.y2});return o.a.createElement(ge,Qh({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(n)},J(e.props,t,n)),a&&o.a.createElement("line",Qh({className:"recharts-polar-angle-axis-tick-line"},u,p)),r&&e.constructor.renderTickItem(r,h,i?i(t.value):t.value))}));return o.a.createElement(ge,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return n<=0||!t||!t.length?null:o.a.createElement(ge,{className:"recharts-polar-angle-axis"},r&&this.renderAxisLine(),this.renderTicks())}}])&&nd(n.prototype,r),a&&nd(n,a),t}(i.PureComponent);sd.displayName="PolarAngleAxis",sd.axisType="angleAxis",sd.propTypes=Jh({},z,{},q,{type:l.a.oneOf(["number","category"]),angleAxisId:l.a.oneOfType([l.a.string,l.a.number]),dataKey:l.a.oneOfType([l.a.number,l.a.string,l.a.func]),cx:l.a.number,cy:l.a.number,radius:l.a.oneOfType([l.a.number,l.a.string]),hide:l.a.bool,scale:l.a.oneOfType([l.a.oneOf(V),l.a.func]),axisLine:l.a.oneOfType([l.a.bool,l.a.object]),axisLineType:l.a.oneOf(["polygon","circle"]),tickLine:l.a.oneOfType([l.a.bool,l.a.object]),tick:l.a.oneOfType([l.a.bool,l.a.func,l.a.object,l.a.element]),ticks:l.a.arrayOf(l.a.shape({value:l.a.any,coordinate:l.a.number})),stroke:l.a.string,orientation:l.a.oneOf(["inner","outer"]),tickFormatter:l.a.func,allowDuplicatedCategory:l.a.bool}),sd.defaultProps={type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,domain:[0,"auto"],orientation:"outer",axisLine:!0,tickLine:!0,tick:!0,hide:!1,allowDuplicatedCategory:!0};var ld=sd,cd=n(72),ud=n.n(cd);function pd(e){return(pd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hd(){return(hd=Object.assign||function(e){for(var t=1;tt?"start":e0?E()(e,"paddingAngle",0):0;if(n){var s=M(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=fd({},e,{startAngle:i+o,endAngle:i+s(r)+o});a.push(l),i=l.endAngle}else{var u=e.endAngle,p=e.startAngle,h=M(0,u-p)(r),d=fd({},e,{startAngle:i+o,endAngle:i+h+o});a.push(d),i=d.endAngle}})),o.a.createElement(ge,null,e.renderSectorsStatically(a))}))}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&Pt()(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.sectors,r=e.className,a=e.label,i=e.cx,s=e.cy,l=e.innerRadius,c=e.outerRadius,p=e.isAnimationActive,h=e.prevSectors;if(t||!n||!n.length||!P(i)||!P(s)||!P(l)||!P(c))return null;var d=u()("recharts-pie",r);return o.a.createElement(ge,{className:d},this.renderSectors(),a&&this.renderLabels(n),yu.renderCallByParent(this.props,null,!1),(!p||h&&Pt()(h,n))&&Tu.renderCallByParent(this.props,n,!1))}}])&&yd(n.prototype,r),a&&yd(n,a),t}(i.PureComponent);_d.displayName="Pie",_d.propTypes=fd({},z,{},q,{className:l.a.string,animationId:l.a.number,cx:l.a.oneOfType([l.a.number,l.a.string]),cy:l.a.oneOfType([l.a.number,l.a.string]),startAngle:l.a.number,endAngle:l.a.number,paddingAngle:l.a.number,innerRadius:l.a.oneOfType([l.a.number,l.a.string]),outerRadius:l.a.oneOfType([l.a.number,l.a.string]),cornerRadius:l.a.oneOfType([l.a.number,l.a.string]),dataKey:l.a.oneOfType([l.a.string,l.a.number,l.a.func]).isRequired,nameKey:l.a.oneOfType([l.a.string,l.a.number,l.a.func]),valueKey:l.a.oneOfType([l.a.string,l.a.number,l.a.func]),data:l.a.arrayOf(l.a.object),blendStroke:l.a.bool,minAngle:l.a.number,legendType:l.a.oneOf(W),tooltipType:l.a.oneOf(H),maxRadius:l.a.number,sectors:l.a.arrayOf(l.a.object),hide:l.a.bool,labelLine:l.a.oneOfType([l.a.object,l.a.func,l.a.element,l.a.bool]),label:l.a.oneOfType([l.a.shape({offsetRadius:l.a.number}),l.a.func,l.a.element,l.a.bool]),activeShape:l.a.oneOfType([l.a.object,l.a.func,l.a.element]),activeIndex:l.a.oneOfType([l.a.number,l.a.arrayOf(l.a.number)]),onAnimationStart:l.a.func,onAnimationEnd:l.a.func,isAnimationActive:l.a.bool,animationBegin:l.a.number,animationDuration:l.a.number,animationEasing:l.a.oneOf(["ease","ease-in","ease-out","ease-in-out","spring","linear"]),id:l.a.string}),_d.defaultProps={stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!te(),animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1},_d.parseDeltaAngle=function(e){var t=e.startAngle,n=e.endAngle;return k(n-t)*Math.min(Math.abs(n-t),360)},_d.getRealPieData=function(e){var t=e.props,n=t.data,r=t.children,a=Z(e.props),i=K(r,Or);return n&&n.length?n.map((function(e,t){return fd({payload:e},a,{},e,{},i&&i[t]&&i[t].props)})):i&&i.length?i.map((function(e){return fd({},a,{},e.props)})):[]},_d.parseCoordinateOfPie=function(e,t){var n=t.top,r=t.left,a=t.width,i=t.height,o=tu(a,i);return{cx:r+j(e.props.cx,a,a/2),cy:n+j(e.props.cy,i,i/2),innerRadius:j(e.props.innerRadius,o,0),outerRadius:j(e.props.outerRadius,o,.8*o),maxRadius:e.props.maxRadius||Math.sqrt(a*a+i*i)/2}},_d.getComposedData=function(e){var t=e.item,n=e.offset,r=e.onItemMouseLeave,a=e.onItemMouseEnter,i=_d.getRealPieData(t);if(!i||!i.length)return[];var o=t.props,s=o.cornerRadius,l=o.startAngle,c=o.endAngle,u=o.paddingAngle,p=o.dataKey,d=o.nameKey,f=o.valueKey,m=o.tooltipType,g=Math.abs(t.props.minAngle),y=_d.parseCoordinateOfPie(t,n),v=i.length,b=_d.parseDeltaAngle({startAngle:l,endAngle:c}),w=Math.abs(b),_=w-v*g-(w>=360?v:v-1)*u,E=p;h()(p)&&h()(f)?E="value":h()(p)&&(E=f);var S,A,x=i.reduce((function(e,t){var n=Ec(t,E,0);return e+(P(n)?n:0)}),0);x>0&&(S=i.map((function(e,t){var n,r=Ec(e,E,0),a=Ec(e,d,t),i=(P(r)?r:0)/x,o=(n=t?A.endAngle+k(b)*u:l)+k(b)*(g+i*_),c=(n+o)/2,p=(y.innerRadius+y.outerRadius)/2,h=[{name:a,value:r,payload:e,dataKey:E,type:m}],f=eu(y.cx,y.cy,p,c);return A=fd({percent:i,cornerRadius:s,name:a,tooltipPayload:h,midAngle:c,middleRadius:p,tooltipPosition:f},e,{},y,{value:Ec(e,E),startAngle:n,endAngle:o,payload:e,paddingAngle:k(b)*u})})));return fd({},y,{sectors:S,data:i,onMouseLeave:r,onMouseEnter:a})};var Ed=_d;function Sd(e){return(Sd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ad(){return(Ad=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function zd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qd(e,t){for(var n=0;n0&&Math.abs(C)0&&Math.abs(O)0&&n.handleDrag(e.changedTouches[0])},n.handleDragEnd=function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1})},n.handleLeaveWrapper=function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=setTimeout(n.handleDragEnd,n.props.leaveTimeOut))},n.handleEnterSlideOrTraveller=function(){n.setState({isTextActive:!0})},n.handleLeaveSlideOrTraveller=function(){n.setState({isTextActive:!1})},n.handleSlideDragStart=function(e){var t=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX})},n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(af(n),"startX"),endX:n.handleTravellerDragStart.bind(af(n),"endX")},n.state=e.data&&e.data.length?n.updateScale(e):{},n}var n,r,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&of(e,t)}(t,e),n=t,a=[{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var a=Math.floor((n+r)/2);e[a]>t?r=a:n=a}return t>=e[r]?r:n}}],(r=[{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.props,r=n.data,a=n.width,i=n.x,o=n.travellerWidth,s=n.updateId;(e.data!==r||e.updateId!==s)&&e.data&&e.data.length?this.setState(this.updateScale(e)):e.width===a&&e.x===i&&e.travellerWidth===o||(this.scale.range([e.x,e.x+e.width-e.travellerWidth]),this.scaleValues=this.scale.domain().map((function(e){return t.scale(e)})),this.setState({startX:this.scale(e.startIndex),endX:this.scale(e.endIndex)}))}},{key:"componentWillUnmount",value:function(){this.scale=null,this.scaleValues=null,this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null)}},{key:"getIndex",value:function(e){var t=e.startX,n=e.endX,r=this.props,a=r.gap,i=r.data.length-1,o=Math.min(t,n),s=Math.max(t,n),l=this.constructor.getIndexInRange(this.scaleValues,o),c=this.constructor.getIndexInRange(this.scaleValues,s);return{startIndex:l-l%a,endIndex:c===i?i:c-c%a}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,a=t.dataKey,i=Ec(n[e],a,e);return v()(r)?r(i):i}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,a=t.endX,i=this.props,o=i.x,s=i.width,l=i.travellerWidth,c=i.startIndex,u=i.endIndex,p=i.onChange,h=e.pageX-n;h>0?h=Math.min(h,o+s-l-a,o+s-l-r):h<0&&(h=Math.max(h,o-r,o-a));var d=this.getIndex({startX:r+h,endX:a+h});d.startIndex===c&&d.endIndex===u||!p||p(d),this.setState({startX:r+h,endX:a+h,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX})}},{key:"handleTravellerMove",value:function(e){var t,n=this.state,r=n.brushMoveStartX,a=n.movingTravellerId,i=n.endX,o=n.startX,s=this.state[a],l=this.props,c=l.x,u=l.width,p=l.travellerWidth,h=l.onChange,d=l.gap,f=l.data,m={startX:this.state.startX,endX:this.state.endX},g=e.pageX-r;g>0?g=Math.min(g,c+u-p-s):g<0&&(g=Math.max(g,c-s)),m[a]=s+g;var y=this.getIndex(m),v=y.startIndex,b=y.endIndex;this.setState((tf(t={},a,s+g),tf(t,"brushMoveStartX",e.pageX),t),(function(){var e;h&&(e=f.length-1,("startX"===a&&(i>o?v%d==0:b%d==0)||io?b%d==0:v%d==0)||i>o&&b===e)&&h(y))}))}},{key:"updateScale",value:function(e){var t=this,n=e.data,r=e.startIndex,a=e.endIndex,i=e.x,o=e.width,s=e.travellerWidth,l=n.length;return this.scale=Ma().domain($d()(0,l)).range([i,i+o-s]),this.scaleValues=this.scale.domain().map((function(e){return t.scale(e)})),{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,startX:this.scale(r),endX:this.scale(a)}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,a=e.height,i=e.fill,s=e.stroke;return o.a.createElement("rect",{stroke:s,fill:i,x:t,y:n,width:r,height:a})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,a=e.height,s=e.data,l=e.children,c=e.padding,u=i.Children.only(l);return u?o.a.cloneElement(u,{x:t,y:n,width:r,height:a,margin:c,compact:!0,data:s}):null}},{key:"renderTraveller",value:function(e,t){var n=this.props,r=n.y,a=n.travellerWidth,i=n.height,s=n.stroke,l=Math.floor(r+i/2)-1,c=Math.max(e,this.props.x);return o.a.createElement(ge,{className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[t],onTouchStart:this.travellerDragStartHandlers[t],style:{cursor:"col-resize"}},o.a.createElement("rect",{x:c,y:r,width:a,height:i,fill:s,stroke:"none"}),o.a.createElement("line",{x1:c+1,y1:l,x2:c+a-1,y2:l,fill:"none",stroke:"#fff"}),o.a.createElement("line",{x1:c+1,y1:l+2,x2:c+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderSlide",value:function(e,t){var n=this.props,r=n.y,a=n.height,i=n.stroke;return o.a.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:i,fillOpacity:.2,x:Math.min(e,t),y:r,width:Math.abs(t-e),height:a})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,a=e.height,i=e.travellerWidth,s=e.stroke,l=this.state,c=l.startX,u=l.endX,p={pointerEvents:"none",fill:s};return o.a.createElement(ge,{className:"recharts-brush-texts"},o.a.createElement(Qr,ef({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,u)-5,y:r+a/2},p),this.getTextOfTick(t)),o.a.createElement(Qr,ef({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,u)+i+5,y:r+a/2},p),this.getTextOfTick(n)))}},{key:"render",value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,a=e.x,i=e.y,s=e.width,l=e.height,c=e.alwaysShowText,p=this.state,h=p.startX,d=p.endX,f=p.isTextActive,m=p.isSlideMoving,g=p.isTravellerMoving;if(!t||!t.length||!P(a)||!P(i)||!P(s)||!P(l)||s<=0||l<=0)return null;var y=u()("recharts-brush",n),v=1===o.a.Children.count(r),b=Xd("userSelect","none");return o.a.createElement(ge,{className:y,onMouseMove:this.handleDrag,onMouseLeave:this.handleLeaveWrapper,onMouseUp:this.handleDragEnd,onTouchEnd:this.handleDragEnd,onTouchMove:this.handleTouchMove,style:b},this.renderBackground(),v&&this.renderPanorama(),this.renderSlide(h,d),this.renderTraveller(h,"startX"),this.renderTraveller(d,"endX"),(f||m||g||c)&&this.renderText())}}])&&nf(n.prototype,r),a&&nf(n,a),t}(i.PureComponent);sf.displayName="Brush",sf.propTypes={className:l.a.string,fill:l.a.string,stroke:l.a.string,x:l.a.number,y:l.a.number,width:l.a.number,height:l.a.number.isRequired,travellerWidth:l.a.number,gap:l.a.number,padding:l.a.shape({top:l.a.number,right:l.a.number,bottom:l.a.number,left:l.a.number}),dataKey:l.a.oneOfType([l.a.string,l.a.number,l.a.func]),data:l.a.array,startIndex:l.a.number,endIndex:l.a.number,tickFormatter:l.a.func,children:l.a.node,onChange:l.a.func,updateId:l.a.oneOfType([l.a.string,l.a.number]),leaveTimeOut:l.a.number,alwaysShowText:l.a.bool},sf.defaultProps={height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1};var lf=sf,cf=n(274),uf=n.n(cf),pf=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},hf=n(98),df=n.n(hf),ff=n(158),mf=n.n(ff);function gf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yf(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":return this.scale(e);case"middle":var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a;case"end":var i=this.bandwidth?this.bandwidth():0;return this.scale(e)+i;default:return this.scale(e)}if(n){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}},{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}}]),e}();Af.EPS=1e-4;var xf=function(){function e(t){gf(this,e),this.scales=mf()(t,Af.create),Object.assign(this,this.scales)}return vf(e,null,[{key:"create",value:function(e){return new this(e)}}]),vf(e,[{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=this.scales;return mf()(e,(function(e,t){return r[t].apply(e,{bandAware:n})}))}},{key:"isInRange",value:function(e){var t=this.scales;return df()(e,(function(e,n){return t[n].isInRange(e)}))}}]),e}();function Cf(e){return(Cf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Of(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function mm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gm(e,t){for(var n=0;n=2?k(m[1].coordinate-m[0].coordinate):1;if(1===b?(n="width"===f?u:p,r="width"===f?u+h:p+d):(n="width"===f?u+h:p+d,r="width"===f?u:p),t){var w=a[y-1],_=v()(i)?i(w.value):w.value,E=Ur(_)[f]+g,S=b*(w.coordinate+b*E/2-r);m[y-1]=w=hm({},w,{tickCoord:S>0?w.coordinate-S*b:w.coordinate}),b*(w.tickCoord-b*E/2-n)>=0&&b*(w.tickCoord+b*E/2-r)<=0&&(r=w.tickCoord-b*(E/2+l),m[y-1]=hm({},w,{isShow:!0}))}for(var A=t?y-1:y,x=0;x=0&&b*(C.tickCoord+b*P/2-r)<=0&&(n=C.tickCoord+b*(P/2+l),m[x]=hm({},C,{isShow:!0}))}return m.filter((function(e){return e.isShow}))}},{key:"getTicksEnd",value:function(e){var t,n,r=e.ticks,a=e.tickFormatter,i=e.viewBox,o=e.orientation,s=e.minTickGap,l=e.unit,c=i.x,u=i.y,p=i.width,h=i.height,d="top"===o||"bottom"===o?"width":"height",f=l&&"width"===d?Ur(l)[d]:0,m=(r||[]).slice(),g=m.length,y=g>=2?k(m[1].coordinate-m[0].coordinate):1;1===y?(t="width"===d?c:u,n="width"===d?c+p:u+h):(t="width"===d?c+p:u+h,n="width"===d?c:u);for(var b=g-1;b>=0;b--){var w=m[b],_=v()(a)?a(w.value):w.value,E=Ur(_)[d]+f;if(b===g-1){var S=y*(w.coordinate+y*E/2-n);m[b]=w=hm({},w,{tickCoord:S>0?w.coordinate-S*y:w.coordinate})}else m[b]=w=hm({},w,{tickCoord:w.coordinate});y*(w.tickCoord-y*E/2-t)>=0&&y*(w.tickCoord+y*E/2-n)<=0&&(n=w.tickCoord-y*(E/2+s),m[b]=hm({},w,{isShow:!0}))}return m.filter((function(e){return e.isShow}))}},{key:"renderTickItem",value:function(e,t,n){return o.a.isValidElement(e)?o.a.cloneElement(e,t):v()(e)?e(t):o.a.createElement(Qr,um({},t,{className:"recharts-cartesian-axis-tick-value"}),n)}}],(r=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=fm(e,["viewBox"]),a=this.props,i=a.viewBox,o=fm(a,["viewBox"]);return!L(n,i)||!L(r,o)||!L(t,this.state)}},{key:"getTickLineCoord",value:function(e){var t,n,r,a,i,o,s=this.props,l=s.x,c=s.y,u=s.width,p=s.height,h=s.orientation,d=s.tickSize,f=s.mirror,m=s.tickMargin,g=f?-1:1,y=e.tickSize||d,v=P(e.tickCoord)?e.tickCoord:e.coordinate;switch(h){case"top":t=n=e.coordinate,o=(r=(a=c+!f*p)-g*y)-g*m,i=v;break;case"left":r=a=e.coordinate,i=(t=(n=l+!f*u)-g*y)-g*m,o=v;break;case"right":r=a=e.coordinate,i=(t=(n=l+f*u)+g*y)+g*m,o=v;break;default:t=n=e.coordinate,o=(r=(a=c+f*p)+g*y)+g*m,i=v}return{line:{x1:t,y1:r,x2:n,y2:a},tick:{x:i,y:o}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,a=e.height,i=e.orientation,s=e.axisLine,l=e.mirror,c=hm({},Z(this.props),{fill:"none"},Z(s));if("top"===i||"bottom"===i){var u="top"===i&&!l||"bottom"===i&&l;c=hm({},c,{x1:t,y1:n+u*a,x2:t+r,y2:n+u*a})}else{var p="left"===i&&!l||"right"===i&&l;c=hm({},c,{x1:t+p*r,y1:n,x2:t+p*r,y2:n+a})}return o.a.createElement("line",um({className:"recharts-cartesian-axis-line"},c))}},{key:"renderTicks",value:function(e){var n=this,r=this.props,a=r.tickLine,i=r.stroke,s=r.tick,l=r.tickFormatter,c=r.unit,u=t.getTicks(hm({},this.props,{ticks:e})),p=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),d=Z(this.props),f=Z(s),m=hm({},d,{fill:"none"},Z(a)),g=u.map((function(e,t){var r=n.getTickLineCoord(e),g=r.line,y=r.tick,b=hm({textAnchor:p,verticalAnchor:h},d,{stroke:"none",fill:i},f,{},y,{index:t,payload:e,visibleTicksCount:u.length});return o.a.createElement(ge,um({className:"recharts-cartesian-axis-tick",key:"tick-".concat(t)},J(n.props,e,t)),a&&o.a.createElement("line",um({className:"recharts-cartesian-axis-tick-line"},m,g)),s&&n.constructor.renderTickItem(s,b,"".concat(v()(l)?l(e.value):e.value).concat(c||"")))}));return o.a.createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var e=this.props,t=e.axisLine,n=e.width,r=e.height,a=e.ticksGenerator,i=e.className;if(e.hide)return null;var s=this.props,l=s.ticks,c=fm(s,["ticks"]),p=l;return v()(a)&&(p=l&&l.length>0?a(this.props):a(c)),n<=0||r<=0||!p||!p.length?null:o.a.createElement(ge,{className:u()("recharts-cartesian-axis",i)},t&&this.renderAxisLine(),this.renderTicks(p),yu.renderCallByParent(this.props))}}])&&gm(n.prototype,r),a&&gm(n,a),t}(i.Component);wm.displayName="CartesianAxis",wm.propTypes=hm({},z,{},q,{className:l.a.string,x:l.a.number,y:l.a.number,width:l.a.number,height:l.a.number,orientation:l.a.oneOf(["top","bottom","left","right"]),viewBox:l.a.shape({x:l.a.number,y:l.a.number,width:l.a.number,height:l.a.number}),tick:l.a.oneOfType([l.a.bool,l.a.func,l.a.object,l.a.element]),axisLine:l.a.oneOfType([l.a.bool,l.a.object]),tickLine:l.a.oneOfType([l.a.bool,l.a.object]),mirror:l.a.bool,tickMargin:l.a.number.isRequired,minTickGap:l.a.number,ticks:l.a.array,tickSize:l.a.number,stroke:l.a.string,tickFormatter:l.a.func,ticksGenerator:l.a.func,interval:l.a.oneOfType([l.a.number,l.a.oneOf(["preserveStart","preserveEnd","preserveStartEnd"])])}),wm.defaultProps={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"};var _m=wm;function Em(e){return(Em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sm(){return(Sm=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function xm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cm(e){for(var t=1;ti){s=[].concat(zm(n.slice(0,l)),[i-c]);break}var u=s.length%2==0?[0,o]:[o];return[].concat(zm(this.constructor.repeat(n,a)),zm(s),u).map((function(e){return"".concat(e,"px")})).join(", ")}},{key:"renderErrorBar",value:function(){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var e=this.props,t=e.points,n=e.xAxis,r=e.yAxis,a=e.layout,i=e.children,s=K(i,yc);if(!s)return null;function l(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:Ec(e.payload,t)}}return s.map((function(e,i){return o.a.cloneElement(e,{key:i,data:t,xAxis:n,yAxis:r,layout:a,dataPointFormatter:l})}))}},{key:"renderDots",value:function(e,t){var n=this;if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,a=r.dot,i=r.points,s=r.dataKey,l=Z(this.props),c=Z(a),u=Q(a),p=i.map((function(e,t){var r=Fm({key:"dot-".concat(t),r:3},l,{},c,{},u,{value:e.value,dataKey:s,cx:e.x,cy:e.y,index:t,payload:e.payload});return n.constructor.renderDotItem(a,r)})),h={clipPath:e?"url(#clipPath-".concat(t,")"):null};return o.a.createElement(ge,Im({className:"recharts-line-dots",key:"dots"},h),p)}},{key:"renderCurveStatically",value:function(e,t,n,r){var a=this.props,i=a.type,s=a.layout,l=a.connectNulls,c=Fm({},Z(this.props),{},Q(this.props),{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(n,")"):null,points:e},r,{type:i,layout:s,connectNulls:l});return o.a.createElement(Tp,Im({},c,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var n=this,r=this.props,a=r.points,i=r.strokeDasharray,s=r.isAnimationActive,l=r.animationBegin,c=r.animationDuration,u=r.animationEasing,p=r.animationId,h=r.width,d=r.height,f=this.state,m=f.prevPoints,g=f.totalLength;return o.a.createElement(Ln,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(r){var o=r.t;if(m){var s=m.length/a.length,l=a.map((function(e,t){var r=Math.floor(t*s);if(m[r]){var a=m[r],i=M(a.x,e.x),l=M(a.y,e.y);return Fm({},e,{x:i(o),y:l(o)})}if(n.animateNewValues){var c=M(2*h,e.x),u=M(d/2,e.y);return Fm({},e,{x:c(o),y:u(o)})}return Fm({},e,{x:e.x,y:e.y})}));return n.renderCurveStatically(l,e,t)}var c,u=M(0,g)(o);if(i){var p=i.split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));c=n.getStrokeDasharray(u,g,p)}else c="".concat(u,"px ").concat(g-u,"px");return n.renderCurveStatically(a,e,t,{strokeDasharray:c})}))}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,a=n.isAnimationActive,i=this.state,o=i.prevPoints,s=i.totalLength;return a&&r&&r.length&&(!o&&s>0||!Pt()(o,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.dot,r=e.points,a=e.className,i=e.xAxis,s=e.yAxis,l=e.top,c=e.left,p=e.width,d=e.height,f=e.isAnimationActive,m=e.id;if(t||!r||!r.length)return null;var g=this.state.isAnimationFinished,y=1===r.length,v=u()("recharts-line",a),b=i&&i.allowDataOverflow||s&&s.allowDataOverflow,w=h()(m)?this.id:m;return o.a.createElement(ge,{className:v},b?o.a.createElement("defs",null,o.a.createElement("clipPath",{id:"clipPath-".concat(w)},o.a.createElement("rect",{x:c,y:l,width:p,height:d}))):null,!y&&this.renderCurve(b,w),this.renderErrorBar(),(y||n)&&this.renderDots(b,w),(!f||g)&&Tu.renderCallByParent(this.props,r))}}])&&Bm(n.prototype,r),a&&Bm(n,a),t}(i.PureComponent);Gm.displayName="Line",Gm.propTypes=Fm({},z,{},q,{className:l.a.string,type:l.a.oneOfType([l.a.oneOf(["basis","basisClosed","basisOpen","linear","linearClosed","natural","monotoneX","monotoneY","monotone","step","stepBefore","stepAfter"]),l.a.func]),unit:l.a.oneOfType([l.a.string,l.a.number]),name:l.a.oneOfType([l.a.string,l.a.number]),yAxisId:l.a.oneOfType([l.a.string,l.a.number]),xAxisId:l.a.oneOfType([l.a.string,l.a.number]),yAxis:l.a.object,xAxis:l.a.object,legendType:l.a.oneOf(W),tooltipType:l.a.oneOf(H),layout:l.a.oneOf(["horizontal","vertical"]),connectNulls:l.a.bool,hide:l.a.bool,activeDot:l.a.oneOfType([l.a.object,l.a.element,l.a.func,l.a.bool]),dot:l.a.oneOfType([l.a.object,l.a.element,l.a.func,l.a.bool]),top:l.a.number,left:l.a.number,width:l.a.number,height:l.a.number,points:l.a.arrayOf(l.a.shape({x:l.a.number,y:l.a.number,value:l.a.value})),onAnimationStart:l.a.func,onAnimationEnd:l.a.func,isAnimationActive:l.a.bool,animateNewValues:l.a.bool,animationBegin:l.a.number,animationDuration:l.a.number,animationEasing:l.a.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),animationId:l.a.number,id:l.a.string}),Gm.defaultProps={xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!te(),animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,onAnimationStart:function(){},onAnimationEnd:function(){}},Gm.getComposedData=function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout;return Fm({points:l.map((function(e,t){var l=Ec(e,o);return"horizontal"===u?{x:Uc({axis:n,ticks:a,bandSize:s,entry:e,index:t}),y:h()(l)?null:r.scale(l),value:l,payload:e}:{x:h()(l)?null:n.scale(l),y:Uc({axis:r,ticks:i,bandSize:s,entry:e,index:t}),value:l,payload:e}})),layout:u},c)};var Km=Gm;function $m(e){return($m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zm(){return(Zm=Object.assign||function(e){for(var t=1;t0||!Pt()(s,r)||!Pt()(l,a))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,a,e,t)}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.dot,r=e.points,a=e.className,i=e.top,s=e.left,l=e.xAxis,c=e.yAxis,p=e.width,d=e.height,f=e.isAnimationActive,m=e.id;if(t||!r||!r.length)return null;var g=this.state.isAnimationFinished,y=1===r.length,v=u()("recharts-area",a),b=l&&l.allowDataOverflow||c&&c.allowDataOverflow,w=h()(m)?this.id:m;return o.a.createElement(ge,{className:v},b?o.a.createElement("defs",null,o.a.createElement("clipPath",{id:"clipPath-".concat(w)},o.a.createElement("rect",{x:s,y:i,width:p,height:parseInt(d,10)}))):null,y?null:this.renderArea(b,w),(n||y)&&this.renderDots(b,w),(!f||g)&&Tu.renderCallByParent(this.props,r))}}])&&eg(n.prototype,r),a&&eg(n,a),t}(i.PureComponent);ag.displayName="Area",ag.propTypes=Qm({},z,{},q,{className:l.a.string,dataKey:l.a.oneOfType([l.a.string,l.a.number,l.a.func]).isRequired,type:l.a.oneOfType([l.a.oneOf(["basis","basisClosed","basisOpen","linear","linearClosed","natural","monotoneX","monotoneY","monotone","step","stepBefore","stepAfter"]),l.a.func]),unit:l.a.oneOfType([l.a.string,l.a.number]),name:l.a.oneOfType([l.a.string,l.a.number]),yAxisId:l.a.oneOfType([l.a.string,l.a.number]),xAxisId:l.a.oneOfType([l.a.string,l.a.number]),yAxis:l.a.object,xAxis:l.a.object,stackId:l.a.oneOfType([l.a.number,l.a.string]),legendType:l.a.oneOf(W),tooltipType:l.a.oneOf(H),connectNulls:l.a.bool,activeDot:l.a.oneOfType([l.a.object,l.a.element,l.a.func,l.a.bool]),dot:l.a.oneOfType([l.a.func,l.a.element,l.a.object,l.a.bool]),label:l.a.oneOfType([l.a.func,l.a.element,l.a.object,l.a.bool]),hide:l.a.bool,layout:l.a.oneOf(["horizontal","vertical"]),baseLine:l.a.oneOfType([l.a.number,l.a.array]),isRange:l.a.bool,points:l.a.arrayOf(l.a.shape({x:l.a.number,y:l.a.number,value:l.a.oneOfType([l.a.number,l.a.array])})),onAnimationStart:l.a.func,onAnimationEnd:l.a.func,animationId:l.a.number,isAnimationActive:l.a.bool,animationBegin:l.a.number,animationDuration:l.a.number,animationEasing:l.a.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),id:l.a.string}),ag.defaultProps={stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!te(),animationBegin:0,animationDuration:1500,animationEasing:"ease"},ag.getBaseValue=function(e,t,n){var r=e.layout,a=e.baseValue;if(P(a))return a;var i="horizontal"===r?n:t,o=i.scale.domain();if("number"===i.type){var s=Math.max(o[0],o[1]),l=Math.min(o[0],o[1]);return"dataMin"===a?l:"dataMax"===a||s<0?s:Math.max(Math.min(o[0],o[1]),0)}return"dataMin"===a?o[0]:"dataMax"===a?o[1]:o[0]},ag.getComposedData=function(e){var t,n=e.props,r=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,u=e.dataStartIndex,p=e.displayedData,d=e.offset,f=n.layout,m=c&&c.length,g=ag.getBaseValue(n,r,a),y=!1,v=p.map((function(e,t){var n;return m?n=c[u+t]:(n=Ec(e,l),w()(n)?y=!0:n=[g,n]),"horizontal"===f?{x:Uc({axis:r,ticks:i,bandSize:s,entry:e,index:t}),y:h()(n[1])?null:a.scale(n[1]),value:n,payload:e}:{x:h()(n[1])?null:r.scale(n[1]),y:Uc({axis:a,ticks:o,bandSize:s,entry:e,index:t}),value:n,payload:e}}));return t=m||y?v.map((function(e){return"horizontal"===f?{x:e.x,y:h()(E()(e,"value[0]"))?null:a.scale(E()(e,"value[0]"))}:{x:h()(E()(e,"value[0]"))?null:r.scale(E()(e,"value[0]")),y:e.y}})):"horizontal"===f?a.scale(g):r.scale(g),Qm({points:v,baseLine:t,layout:f,isRange:y},d)},ag.renderDotItem=function(e,t){return o.a.isValidElement(e)?o.a.cloneElement(e,t):v()(e)?e(t):o.a.createElement(ch,Zm({},t,{className:"recharts-area-dot"}))};var ig=ag;function og(e){return(og="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sg(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function lg(){return(lg=Object.assign||function(e){for(var t=1;t0&&Math.abs(m)0&&Math.abs(h)=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function py(){return(py=Object.assign||function(e){for(var t=1;t0&&n.handleMouseMove(e.changedTouches[0])},n.handleTouchStart=function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleMouseDown(e.changedTouches[0])},n.handleTouchEnd=function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleMouseUp(e.changedTouches[0])},n.verticalCoordinatesGenerator=function(e){var t=e.xAxis,n=e.width,r=e.height,a=e.offset;return Pc(_m.getTicks(fy({},_m.defaultProps,{},t,{ticks:Tc(t,!0),viewBox:{x:0,y:0,width:n,height:r}})),a.left,a.left+a.width)},n.horizontalCoordinatesGenerator=function(e){var t=e.yAxis,n=e.width,r=e.height,a=e.offset;return Pc(_m.getTicks(fy({},_m.defaultProps,{},t,{ticks:Tc(t,!0),viewBox:{x:0,y:0,width:n,height:r}})),a.top,a.top+a.height)},n.axesTicksGenerator=function(e){return Tc(e,!0)},n.tooltipTicksGenerator=function(e){var t=R(e),n=Tc(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Un()(n,(function(e){return e.coordinate})),tooltipAxis:t,tooltipAxisBandSize:Gc(t)}},n.renderCursor=function(e){var r=n.state,a=r.isTooltipActive,o=r.activeCoordinate,s=r.activePayload,l=r.offset;if(!(e&&e.props.cursor&&a&&o))return null;var c,u=n.props.layout,p=Tp;if("ScatterChart"===t)c=o,p=wh;else if("BarChart"===t)c=n.getCursorRectangle(),p=Bp;else if("radial"===u){var h=n.getCursorPoints(),d=h.cx,f=h.cy,m=h.radius;c={cx:d,cy:f,startAngle:h.startAngle,endAngle:h.endAngle,innerRadius:m,outerRadius:m},p=Gu}else c={points:n.getCursorPoints()},p=Tp;var g=e.key||"_recharts-cursor",y=fy({stroke:"#ccc",pointerEvents:"none"},l,{},c,{},Z(e.props.cursor),{payload:s,key:g,className:"recharts-tooltip-cursor"});return Object(i.isValidElement)(e.props.cursor)?Object(i.cloneElement)(e.props.cursor,y):Object(i.createElement)(p,y)},n.renderPolarAxis=function(e,t,r){var a=e.type.axisType,o=n.state["".concat(a,"Map")][e.props["".concat(a,"Id")]];return Object(i.cloneElement)(e,fy({},o,{className:a,key:e.key||"".concat(t,"-").concat(r),ticks:Tc(o,!0)}))},n.renderXAxis=function(e,t,r){var a=n.state.xAxisMap[e.props.xAxisId];return n.renderAxis(a,e,t,r)},n.renderYAxis=function(e,t,r){var a=n.state.yAxisMap[e.props.yAxisId];return n.renderAxis(a,e,t,r)},n.renderGrid=function(e){var t=n.state,r=t.xAxisMap,a=t.yAxisMap,o=t.offset,s=n.props,l=s.width,c=s.height,u=R(r),p=ny()(a,(function(e){return df()(e.domain,Number.isFinite)}))||R(a),h=e.props||{};return Object(i.cloneElement)(e,{key:e.key||"grid",x:P(h.x)?h.x:o.left,y:P(h.y)?h.y:o.top,width:P(h.width)?h.width:o.width,height:P(h.height)?h.height:o.height,xAxis:u,yAxis:p,offset:o,chartWidth:l,chartHeight:c,verticalCoordinatesGenerator:h.verticalCoordinatesGenerator||n.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:h.horizontalCoordinatesGenerator||n.horizontalCoordinatesGenerator})},n.renderPolarGrid=function(e){var t=n.state,r=t.radiusAxisMap,a=t.angleAxisMap,o=R(r),s=R(a),l=s.cx,c=s.cy,u=s.innerRadius,p=s.outerRadius;return Object(i.cloneElement)(e,{polarAngles:Tc(s,!0).map((function(e){return e.coordinate})),polarRadius:Tc(o,!0).map((function(e){return e.coordinate})),cx:l,cy:c,innerRadius:u,outerRadius:p,key:e.key||"polar-grid"})},n.renderBrush=function(e){var t=n.props,r=t.margin,a=t.data,o=n.state,s=o.offset,l=o.dataStartIndex,c=o.dataEndIndex,u=o.updateId;return Object(i.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:Nc(n.handleBrushChange,null,e.props.onChange),data:a,x:P(e.props.x)?e.props.x:s.left,y:P(e.props.y)?e.props.y:s.top+s.height+s.brushBottom-(r.bottom||0),width:P(e.props.width)?e.props.width:s.width,startIndex:l,endIndex:c,updateId:"brush-".concat(u)})},n.renderReferenceElement=function(e,t,r){if(!e)return null;var a=vy(n).clipPathId,o=n.state,s=o.xAxisMap,l=o.yAxisMap,c=o.offset,u=e.props,p=u.xAxisId,h=u.yAxisId;return Object(i.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(r),xAxis:s[p],yAxis:l[h],viewBox:{x:c.left,y:c.top,width:c.width,height:c.height},clipPathId:a})},n.renderGraphicChild=function(e,t,r){var a=n.filterFormatItem(e,t,r);if(!a)return null;var o=Object(i.cloneElement)(e,a.props),s=n.state,l=s.isTooltipActive,c=s.tooltipAxis,u=s.activeTooltipIndex,p=s.activeLabel,d=n.props.children,f=$(d,dr),m=a.props,g=m.points,y=m.isRange,v=m.baseLine,b=a.item.props,w=b.activeDot;if(!b.hide&&l&&f&&w&&u>=0){var _,E;if(c.dataKey&&!c.allowDuplicatedCategory){var S="function"==typeof c.dataKey?function(e){return c.dataKey(e.payload)}:"payload.".concat(c.dataKey);_=I(g,S,p),E=y&&v&&I(v,S,p)}else _=g[u],E=y&&v&&v[u];if(!h()(_))return[o].concat(hy(n.renderActivePoints({item:a,activePoint:_,basePoint:E,childIndex:u,isRange:y})))}return y?[o,null,null]:[o,null]},n.renderCustomized=function(e){return Object(i.cloneElement)(e,fy({},n.props,{},n.state))};var a=n.constructor.createDefaultState(e);return n.state=fy({},a,{updateId:0},n.updateStateOfAxisMapsOffsetAndStackGroups(fy({props:e},a,{updateId:0}))),n.uniqueChartId=h()(e.id)?D("recharts"):e.id,n.clipPathId="".concat(n.uniqueChartId,"-clip"),e.throttleDelay&&(n.triggeredAfterMouseMove=ay()(n.triggeredAfterMouseMove,e.throttleDelay)),n}var l,d,f;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&by(e,t)}(r,e),l=r,f=[{key:"getAxisNameByLayout",value:function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}}},{key:"renderActiveDot",value:function(e,t){var n;return n=Object(i.isValidElement)(e)?Object(i.cloneElement)(e,t):v()(e)?e(t):o.a.createElement(ch,t),o.a.createElement(ge,{className:"recharts-active-dot",key:t.key},n)}}],(d=[{key:"componentDidMount",value:function(){h()(this.props.syncId)||this.addListener()}},{key:"componentWillReceiveProps",value:function(e){var t=this,n=this.props,r=n.data,a=n.children,i=n.width,o=n.height,s=n.layout,l=n.stackOffset,c=n.margin,u=this.state.updateId;if(e.data===r&&e.width===i&&e.height===o&&e.layout===s&&e.stackOffset===l&&L(e.margin,c)){if(!ie(e.children,a)){var p=h()(e.data)?u+1:u;this.setState((function(n){return fy({updateId:p},t.updateStateOfAxisMapsOffsetAndStackGroups(fy({props:e},n,{updateId:p})))}))}}else{var d=this.constructor.createDefaultState(e);this.setState(fy({},d,{updateId:u+1},this.updateStateOfAxisMapsOffsetAndStackGroups(fy({props:e},d,{updateId:u+1}))))}h()(this.props.syncId)&&!h()(e.syncId)&&this.addListener(),!h()(this.props.syncId)&&h()(e.syncId)&&this.removeListener()}},{key:"componentWillUnmount",value:function(){h()(this.props.syncId)||this.removeListener(),"function"==typeof this.triggeredAfterMouseMove.cancel&&this.triggeredAfterMouseMove.cancel()}},{key:"getAxisMap",value:function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,a=t.AxisComp,i=t.graphicalItems,o=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,u="".concat(r,"Id"),p=K(c,a),h={};return p&&p.length?h=this.getAxisMapByAxes(e,{axes:p,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:l}):i&&i.length&&(h=this.getAxisMapByItems(e,{Axis:a,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:l})),h}},{key:"getAxisMapByAxes",value:function(e,t){var n=this,r=t.axes,a=t.graphicalItems,i=t.axisType,o=t.axisIdKey,s=t.stackGroups,l=t.dataStartIndex,c=t.dataEndIndex,u=e.layout,p=e.children,d=e.stackOffset,f=Oc(u,i);return r.reduce((function(t,r){var m=r.props,g=m.type,y=m.dataKey,v=m.allowDataOverflow,b=m.allowDuplicatedCategory,_=m.scale,E=m.ticks,S=r.props[o],A=n.constructor.getDisplayedData(e,{graphicalItems:a.filter((function(e){return e.props[o]===S})),dataStartIndex:l,dataEndIndex:c}),x=A.length;if(!t[S]){var C,k,O;if(y){if(C=Sc(A,y,g),"category"===g&&f){var P=function(e){if(!w()(e))return!1;for(var t=e.length,n={},r=0;r=0?e:[].concat(hy(e),[t])}),[]))}else if("category"===g)C=b?C.filter((function(e){return""!==e&&!h()(e)})):Kc(r.props.domain,C,r).reduce((function(e,t){return e.indexOf(t)>=0||""===t||h()(t)?e:[].concat(hy(e),[t])}),[]);else if("number"===g){var T=function(e,t,n,r){var a=t.map((function(t){return Cc(e,t,n,r)})).filter((function(e){return!h()(e)}));return a&&a.length?a.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]):null}(A,a.filter((function(e){return e.props[o]===S&&!e.props.hide})),y,i);T&&(C=T)}!f||"number"!==g&&"auto"===_||(O=Sc(A,y,"category"))}else C=f?$d()(0,x):s&&s[S]&&s[S].hasStack&&"number"===g?"expand"===d?[0,1]:Bc(s[S].stackGroups,l,c):kc(A,a.filter((function(e){return e.props[o]===S&&!e.props.hide})),g,!0);return"number"===g&&(C=iy(p,C,S,i,E),r.props.domain&&(C=Hc(r.props.domain,C,v))),fy({},t,my({},S,fy({},r.props,{axisType:i,domain:C,categoricalDomain:O,duplicateDomain:k,originalDomain:r.props.domain,isCategorial:f,layout:u})))}return t}),{})}},{key:"getAxisMapByItems",value:function(e,t){var n=t.graphicalItems,r=t.Axis,a=t.axisType,i=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,p=this.constructor.getDisplayedData(e,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),h=p.length,d=Oc(c,a),f=-1;return n.reduce((function(e,t){var m,g=t.props[i];return e[g]?e:(f++,d?m=$d()(0,h):o&&o[g]&&o[g].hasStack?(m=Bc(o[g].stackGroups,s,l),m=iy(u,m,g,a)):(m=Hc(r.defaultProps.domain,kc(p,n.filter((function(e){return e.props[i]===g&&!e.props.hide})),"number"),r.defaultProps.allowDataOverflow),m=iy(u,m,g,a)),fy({},e,my({},g,fy({axisType:a},r.defaultProps,{hide:!0,orientation:wy[a]&&wy[a][f%2],domain:m,originalDomain:r.defaultProps.domain,isCategorial:d,layout:c}))))}),{})}},{key:"getActiveCoordinate",value:function(e,t,n){var r=this.props.layout,a=e.find((function(e){return e&&e.index===t}));if(a){if("horizontal"===r)return{x:a.coordinate,y:n.y};if("vertical"===r)return{x:n.x,y:a.coordinate};if("centric"===r){var i=a.coordinate,o=n.radius;return fy({},n,{},eu(n.cx,n.cy,o,i),{angle:i,radius:o})}var s=a.coordinate,l=n.angle;return fy({},n,{},eu(n.cx,n.cy,s,l),{angle:l,radius:s})}return _y}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,n,r,i=function(e,t){return{chartX:Math.round(e.pageX-t.left),chartY:Math.round(e.pageY-t.top)}}(e,(t=this.container,n=t.ownerDocument.documentElement,r={top:0,left:0},void 0!==t.getBoundingClientRect&&(r=t.getBoundingClientRect()),{top:r.top+window.pageYOffset-n.clientTop,left:r.left+window.pageXOffset-n.clientLeft})),o=this.inRange(i.chartX,i.chartY);if(!o)return null;var s=this.state,l=s.xAxisMap,c=s.yAxisMap;if("axis"!==a&&l&&c){var u=R(l).scale,p=R(c).scale;return fy({},i,{xValue:u&&u.invert?u.invert(i.chartX):null,yValue:p&&p.invert?p.invert(i.chartY):null})}var h=this.state,d=h.orderedTooltipTicks,f=h.tooltipAxis,m=h.tooltipTicks,g=function(e,t,n,r){var a=-1,i=t.length;if(i>1){if(r&&"angleAxis"===r.axisType&&Math.abs(Math.abs(r.range[1]-r.range[0])-360)<=1e-6)for(var o=r.range,s=0;s0?n[s-1].coordinate:n[i-1].coordinate,c=n[s].coordinate,u=s>=i-1?n[0].coordinate:n[s+1].coordinate,p=void 0;if(k(c-l)!==k(u-c)){var h=[];if(k(u-c)===k(o[1]-o[0])){p=u;var d=c+o[1]-o[0];h[0]=Math.min(d,(d+l)/2),h[1]=Math.max(d,(d+l)/2)}else{p=l;var f=u+o[1]-o[0];h[0]=Math.min(c,(f+c)/2),h[1]=Math.max(c,(f+c)/2)}var m=[Math.min(c,(p+c)/2),Math.max(c,(p+c)/2)];if(e>m[0]&&e<=m[1]||e>=h[0]&&e<=h[1]){a=n[s].index;break}}else{var g=Math.min(l,u),y=Math.max(l,u);if(e>(g+c)/2&&e<=(y+c)/2){a=n[s].index;break}}}else for(var v=0;v0&&v(t[v].coordinate+t[v-1].coordinate)/2&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v===i-1&&e>(t[v].coordinate+t[v-1].coordinate)/2){a=t[v].index;break}}else a=0;return a}(this.calculateTooltipPos(o),d,m,f);if(g>=0&&m){var y=m[g]&&m[g].value;return fy({},i,{activeTooltipIndex:g,activeLabel:y,activePayload:this.getTooltipContent(g,y),activeCoordinate:this.getActiveCoordinate(d,g,o)})}return null}},{key:"getTooltipContent",value:function(e,t){var n=this.state,r=n.graphicalItems,a=n.tooltipAxis,i=this.constructor.getDisplayedData(this.props,this.state);return e<0||!r||!r.length||e>=i.length?null:r.reduce((function(n,r){if(r.props.hide)return n;var o,s=r.props,l=s.dataKey,c=s.name,u=s.unit,p=s.formatter,h=s.data,d=s.tooltipType;return(o=a.dataKey&&!a.allowDuplicatedCategory?I(h||i,a.dataKey,t):h&&h[e]||i[e])?[].concat(hy(n),[fy({},Z(r),{dataKey:l,unit:u,formatter:p,name:c||l,color:Ac(r),value:Ec(o,l),type:d,payload:o})]):n}),[])}},{key:"getFormatItems",value:function(e,t){var n=this,r=t.graphicalItems,a=t.stackGroups,o=t.offset,l=t.updateId,c=t.dataStartIndex,u=t.dataEndIndex,p=e.barSize,d=e.layout,f=e.barGap,m=e.barCategoryGap,g=e.maxBarSize,y=this.constructor.getAxisNameByLayout(d),v=y.numericAxisName,b=y.cateAxisName,w=this.constructor.hasBar(r),_=w&&function(e){var t=e.barSize,n=e.stackGroups,r=void 0===n?{}:n;if(!r)return{};for(var a={},i=Object.keys(r),o=0,s=i.length;o=0}));if(g&&g.length){var y=g[0].props.barSize,v=g[0].props[m];a[v]||(a[v]=[]),a[v].push({item:g[0],stackList:g.slice(1),barSize:h()(y)?t:y})}}return a}({barSize:p,stackGroups:a}),E=[];return r.forEach((function(r,p){var y,S,A,x,C=n.constructor.getDisplayedData(e,{dataStartIndex:c,dataEndIndex:u},r),k=r.props,O=k.dataKey,P=k.maxBarSize,N=r.props["".concat(v,"Id")],D=r.props["".concat(b,"Id")],R=s.reduce((function(e,n){var a,i=t["".concat(n.axisType,"Map")],o=r.props["".concat(n.axisType,"Id")],s=i&&i[o];return fy({},e,(my(a={},n.axisType,s),my(a,"".concat(n.axisType,"Ticks"),Tc(s)),a))}),{}),M=R[b],I=R["".concat(b,"Ticks")],L=a&&a[N]&&a[N].hasStack&&function(e,t){var n=e.props.stackId;if(T(n)){var r=t[n];if(r&&r.items.length){for(var a=-1,i=0,o=r.items.length;i=0?r.stackedData[a]:null}}return null}(r,a[N].stackGroups),F=Gc(M,I),U=h()(P)?g:P,z=w&&function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,a=e.sizeList,i=void 0===a?[]:a,o=e.maxBarSize,s=i.length;if(s<1)return null;var l,c=j(t,r,0,!0);if(i[0].barSize===+i[0].barSize){var u=!1,p=r/s,h=i.reduce((function(e,t){return e+t.barSize||0}),0);(h+=(s-1)*c)>=r&&(h-=(s-1)*c,c=0),h>=r&&p>0&&(u=!0,h=s*(p*=.9));var d={offset:((r-h)/2>>0)-c,size:0};l=i.reduce((function(e,t){var n=[].concat(vc(e),[{item:t.item,position:{offset:d.offset+d.size+c,size:u?p:t.barSize}}]);return d=n[n.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:d})})),n}),[])}else{var f=j(n,r,0,!0);r-2*f-(s-1)*c<=0&&(c=0);var m=(r-2*f-(s-1)*c)/s;m>1&&(m>>=0);var g=o===+o?Math.min(m,o):m;l=i.reduce((function(e,t,n){var r=[].concat(vc(e),[{item:t.item,position:{offset:f+(m+c)*n+(m-g)/2,size:g}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){r.push({item:e,position:r[r.length-1].position})})),r}),[])}return l}({barGap:f,barCategoryGap:m,bandSize:F,sizeList:_[D],maxBarSize:U}),q=r&&r.type&&r.type.getComposedData;q&&E.push({props:fy({},q(fy({},R,{displayedData:C,props:e,dataKey:O,item:r,bandSize:F,barPosition:z,offset:o,stackedData:L,layout:d,dataStartIndex:c,dataEndIndex:u,onItemMouseLeave:Nc(n.handleItemMouseLeave,null,r.props.onMouseLeave),onItemMouseEnter:Nc(n.handleItemMouseEnter,null,r.props.onMouseEnter)})),(y={key:r.key||"item-".concat(p)},my(y,v,R[v]),my(y,b,R[b]),my(y,"animationId",l),y)),childIndex:(S=r,A=e.children,x=-1,i.Children.forEach(A,(function(e,t){e===S&&(x=t)})),x),item:r})})),E}},{key:"getCursorRectangle",value:function(){var e=this.props.layout,t=this.state,n=t.activeCoordinate,r=t.offset,a=t.tooltipAxisBandSize,i=a/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?n.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:n.y-i,width:"horizontal"===e?a:r.width-1,height:"horizontal"===e?r.height-1:a}}},{key:"getCursorPoints",value:function(){var e,t,n,r,a=this.props.layout,i=this.state,o=i.activeCoordinate,s=i.offset;if("horizontal"===a)n=e=o.x,t=s.top,r=s.top+s.height;else if("vertical"===a)r=t=o.y,e=s.left,n=s.left+s.width;else if(!h()(o.cx)||!h()(o.cy)){if("centric"!==a){var l=o.cx,c=o.cy,u=o.radius,p=o.startAngle,d=o.endAngle;return{points:[eu(l,c,u,p),eu(l,c,u,d)],cx:l,cy:c,radius:u,startAngle:p,endAngle:d}}var f=o.cx,m=o.cy,g=o.innerRadius,y=o.outerRadius,v=o.angle,b=eu(f,m,g,v),w=eu(f,m,y,v);e=b.x,t=b.y,n=w.x,r=w.y}return[{x:e,y:t},{x:n,y:r}]}},{key:"calculateTooltipPos",value:function(e){var t=this.props.layout;return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}},{key:"inRange",value:function(e,t){var n=this.props.layout;if("horizontal"===n||"vertical"===n){var r=this.state.offset;return e>=r.left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height?{x:e,y:t}:null}var a=this.state,i=a.angleAxisMap,o=a.radiusAxisMap;if(i&&o){var s=R(i);return iu({x:e,y:t},s)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=$(e,dr)&&"axis"===a?{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}:{};return fy({},Q(this.props,this.handleOuterEvent),{},t)}},{key:"updateStateOfAxisMapsOffsetAndStackGroups",value:function(e){var r=this,a=e.props,i=e.dataStartIndex,o=e.dataEndIndex,l=e.updateId;if(!ee({props:a}))return null;var c=a.children,u=a.layout,h=a.stackOffset,d=a.data,f=a.reverseStackOrder,m=this.constructor.getAxisNameByLayout(u),g=m.numericAxisName,y=m.cateAxisName,v=K(c,n),b=function(e,t,n,r,a,i){if(!e)return null;var o=(i?t.reverse():t).reduce((function(e,t){var a=t.props,i=a.stackId;if(a.hide)return e;var o=t.props[n],s=e[o]||{hasStack:!1,stackGroups:{}};if(T(i)){var l=s.stackGroups[i]||{numericAxisId:n,cateAxisId:r,items:[]};l.items.push(t),s.hasStack=!0,s.stackGroups[i]=l}else s.stackGroups[D("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return wc({},e,_c({},o,s))}),{});return Object.keys(o).reduce((function(t,i){var s=o[i];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce((function(t,i){var o=s.stackGroups[i];return wc({},t,_c({},i,{numericAxisId:n,cateAxisId:r,items:o.items,stackedData:Lc(e,o.items,a)}))}),{})),wc({},t,_c({},i,s))}),{})}(d,v,"".concat(g,"Id"),"".concat(y,"Id"),h,f),w=s.reduce((function(e,t){return fy({},e,my({},"".concat(t.axisType,"Map"),r.getAxisMap(a,fy({},t,{graphicalItems:v,stackGroups:t.axisType===g&&b,dataStartIndex:i,dataEndIndex:o}))))}),{}),_=this.calculateOffset(fy({},w,{props:a,graphicalItems:v}));Object.keys(w).forEach((function(e){w[e]=p(a,w[e],_,e.replace("Map",""),t)}));var E=w["".concat(y,"Map")],S=this.tooltipTicksGenerator(E),A=this.getFormatItems(a,fy({},w,{dataStartIndex:i,dataEndIndex:o,updateId:l,graphicalItems:v,stackGroups:b,offset:_}));return fy({formatedGraphicalItems:A,graphicalItems:v,offset:_,stackGroups:b},S,{},w)}},{key:"addListener",value:function(){sy.on(ly,this.handleReceiveSyncEvent),sy.setMaxListeners&&sy._maxListeners&&sy.setMaxListeners(sy._maxListeners+1)}},{key:"removeListener",value:function(){sy.removeListener(ly,this.handleReceiveSyncEvent),sy.setMaxListeners&&sy._maxListeners&&sy.setMaxListeners(sy._maxListeners-1)}},{key:"calculateOffset",value:function(e){var t=e.props,n=e.graphicalItems,r=e.xAxisMap,a=void 0===r?{}:r,i=e.yAxisMap,o=void 0===i?{}:i,s=t.width,l=t.height,c=t.children,u=t.margin||{},p=$(c,lf),h=$(c,kt),d=Object.keys(o).reduce((function(e,t){var n=o[t],r=n.orientation;return n.mirror||n.hide?e:fy({},e,my({},r,e[r]+n.width))}),{left:u.left||0,right:u.right||0}),f=Object.keys(a).reduce((function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:fy({},e,my({},r,e[r]+n.height))}),{top:u.top||0,bottom:u.bottom||0}),m=fy({},f,{},d),g=m.bottom;return p&&(m.bottom+=p.props.height||lf.defaultProps.height),h&&this.legendInstance&&(m=function(e,t,n,r){var a=n.children,i=n.width,o=n.height,s=n.margin,l=i-(s.left||0)-(s.right||0),c=o-(s.top||0)-(s.bottom||0),u=xc({children:a,items:t,legendWidth:l,legendHeight:c}),p=e;if(u){var h=r||{},d=u.align,f=u.verticalAlign,m=u.layout;("vertical"===m||"horizontal"===m&&"center"===f)&&P(e[d])&&(p=wc({},e,_c({},d,p[d]+(h.width||0)))),("horizontal"===m||"vertical"===m&&"center"===d)&&P(e[f])&&(p=wc({},e,_c({},f,p[f]+(h.height||0))))}return p}(m,n,t,this.legendInstance.getBBox())),fy({brushBottom:g},m,{width:s-m.left-m.right,height:l-m.top-m.bottom})}},{key:"triggerSyncEvent",value:function(e){var t=this.props.syncId;h()(t)||sy.emit(ly,t,this.uniqueChartId,e)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formatedGraphicalItems,a=0,i=r.length;a=0}))},m.getDisplayedData=function(e,t,n){var r=t.graphicalItems,a=t.dataStartIndex,i=t.dataEndIndex,o=(r||[]).reduce((function(e,t){var n=t.props.data;return n&&n.length?[].concat(hy(e),hy(n)):e}),[]);if(o&&o.length>0)return o;if(n&&n.props&&n.props.data&&n.props.data.length>0)return n.props.data;var s=e.data;return s&&s.length&&P(a)&&P(i)?s.slice(a,i+1):[]},m},Sy=Ey({chartName:"LineChart",GraphicalChild:Km,axisComponents:[{axisType:"xAxis",AxisComp:Gg},{axisType:"yAxis",AxisComp:ey}],formatAxisMap:Ef}),Ay=Ey({chartName:"BarChart",GraphicalChild:vg,axisComponents:[{axisType:"xAxis",AxisComp:Gg},{axisType:"yAxis",AxisComp:ey}],formatAxisMap:Ef}),xy=Ey({chartName:"PieChart",GraphicalChild:Ed,eventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:ld},{axisType:"radiusAxis",AxisComp:Zh}],formatAxisMap:nu,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},propTypes:{layout:l.a.oneOf(["centric"]),startAngle:l.a.number,endAngle:l.a.number,cx:l.a.oneOfType([l.a.number,l.a.string]),cy:l.a.oneOfType([l.a.number,l.a.string]),innerRadius:l.a.oneOfType([l.a.number,l.a.string]),outerRadius:l.a.oneOfType([l.a.number,l.a.string])}}),Cy=n(99),ky=n.n(Cy),Oy=["#1890FF","#66B5FF","#41D9C7","#2FC25B","#6EDB8F","#9AE65C","#FACC14","#E6965C","#57AD71","#223273","#738AE6","#7564CC","#8543E0","#A877ED","#5C8EE6","#13C2C2","#70E0E0","#5CA3E6","#3436C7","#8082FF","#DD81E6","#F04864","#FA7D92","#D598D9"];function Py(e){return(Py="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ty(){return(Ty=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Dy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jy(e,t){for(var n=0;nn.height)&&(a=n.height);for(var i,o=n.x,s=0,l=e.length;sn.width)&&(a=n.width);for(var i,o=n.y,s=0,l=e.length;s0;)s.push(a=p[0]),s.area+=a.area,(i=qy(s,c,n))<=l?(p.shift(),l=i):(s.area-=s.pop().area,o=By(s,c,o,!1),c=Math.min(o.width,o.height),s.length=s.area=0,l=1/0);return s.length&&(o=By(s,c,o,!0),s.length=s.area=0),Fy({},t,{children:u.map((function(t){return e(t,n)}))})}return t},Wy=function(e){function t(){var e,n;Dy(this,t);for(var r=arguments.length,a=new Array(r),i=0;i10&&l>10&&t.children&&"nest"===n&&(u=o.a.createElement(eh,{points:[{x:a+2,y:i+l/2},{x:a+6,y:i+l/2+3},{x:a+2,y:i+l/2+6}]}));var p=null,h=Ur(t.name);s>20&&l>20&&h.width2&&!f?null:r.constructor.renderContentItem(e,Fy({},t,{isAnimationActive:i,isUpdateAnimationActive:!u,width:m,height:g,x:a,y:h}),p,d)))})):o.a.createElement(ge,_,this.constructor.renderContentItem(e,Fy({},t,{isAnimationActive:!1,isUpdateAnimationActive:!1,width:m,height:g,x:y,y:v}),p,d))}},{key:"renderNode",value:function(e,t,n){var r=this,a=this.props,i=a.content,s=a.type,l=Fy({},Z(this.props),{},t,{root:e}),c=!t.children||!t.children.length;return!(this.state.currentRoot.children||[]).filter((function(e){return e.depth===t.depth&&e.name===t.name})).length&&e.depth&&"nest"===s?null:o.a.createElement(ge,{key:"recharts-treemap-node-".concat(n),className:"recharts-treemap-depth-".concat(t.depth)},this.renderItem(i,l,c),t.children&&t.children.length?t.children.map((function(e,n){return r.renderNode(t,e,n)})):null)}},{key:"renderAllNodes",value:function(){var e=this.state.formatRoot;return e?this.renderNode(e,e,0):null}},{key:"renderTooltip",value:function(){var e=this.props,t=e.children,n=e.nameKey,r=$(t,dr);if(!r)return null;var a=this.props,i=a.width,s=a.height,l=a.dataKey,c=this.state,u=c.isTooltipActive,p=c.activeNode,h={x:0,y:0,width:i,height:s},d=p?{x:p.x+p.width/2,y:p.y+p.height/2}:null,f=u&&p?[{payload:p,name:Ec(p,n,""),value:Ec(p,l)}]:[];return o.a.cloneElement(r,{viewBox:h,active:u,coordinate:d,label:"",payload:f})}},{key:"renderNestIndex",value:function(){var e=this,t=this.props,n=t.nameKey,r=t.nestIndexContent,a=this.state.nestIndex;return o.a.createElement("div",{className:"recharts-treemap-nest-index-wrapper",style:{marginTop:"8px",textAlign:"center"}},a.map((function(t,a){var i=E()(t,n,"root"),s=null;return o.a.isValidElement(r)&&(s=o.a.cloneElement(r,t,a)),s=v()(r)?r(t,a):i,o.a.createElement("div",{onClick:e.handleNestIndex.bind(e,t,a),key:"nest-index-".concat(D()),className:"recharts-treemap-nest-index-box",style:{cursor:"pointer",display:"inline-block",padding:"0 7px",background:"#000",color:"#fff",marginRight:"3px"}},s)})))}},{key:"render",value:function(){if(!ee(this))return null;var e=this.props,t=e.width,n=e.height,r=e.className,a=e.style,i=e.children,s=e.type,l=Ny(e,["width","height","className","style","children","type"]),c=Z(l);return o.a.createElement("div",{className:u()("recharts-wrapper",r),style:Fy({},a,{position:"relative",cursor:"default",width:t,height:n})},o.a.createElement(pe,Ty({},c,{width:t,height:"nest"===s?n-30:n}),this.renderAllNodes(),re(i)),this.renderTooltip(),"nest"===s&&this.renderNestIndex())}}])&&jy(n.prototype,r),a&&jy(n,a),t}(i.PureComponent);Wy.displayName="Treemap",Wy.propTypes={width:l.a.number,height:l.a.number,data:l.a.array,animationId:l.a.number,style:l.a.object,aspectRatio:l.a.number,content:l.a.oneOfType([l.a.element,l.a.func]),fill:l.a.string,stroke:l.a.string,className:l.a.string,nameKey:l.a.oneOfType([l.a.string,l.a.number,l.a.func]),dataKey:l.a.oneOfType([l.a.string,l.a.number,l.a.func]),children:l.a.oneOfType([l.a.arrayOf(l.a.node),l.a.node]),type:l.a.oneOf(["flat","nest"]),colorPanel:l.a.array,nestIndexContent:l.a.oneOfType([l.a.element,l.a.func]),onAnimationStart:l.a.func,onAnimationEnd:l.a.func,onMouseEnter:l.a.func,onMouseLeave:l.a.func,onClick:l.a.func,isAnimationActive:l.a.bool,isUpdateAnimationActive:l.a.bool,animationBegin:l.a.number,animationDuration:l.a.number,animationEasing:l.a.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"])},Wy.defaultProps={dataKey:"value",aspectRatio:.5*(1+Math.sqrt(5)),isAnimationActive:!te(),isUpdateAnimationActive:!te(),animationBegin:0,animationDuration:1500,animationEasing:"linear",type:"flat"};var Hy=Wy,Gy=n(278),Ky=n.n(Gy);function $y(e){return($y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zy(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Yy(){return(Yy=Object.assign||function(e){for(var t=1;t0&&(c.y+=u),s=c.y+c.dy+n}s=t+n;for(var p=o-1;p>=0;p--){var h=i[p],d=h.y+h.dy+n-s;if(!(d>0))break;h.y-=d,s=h.y}}},dv=function(e,t,n,r){for(var a=0,i=t.length;a=0;a--)for(var i=t[a],o=0,s=i.length;o=1)for(var u=(t-n)/c,p=0,h=i.length;p0,from:{upperWidth:0,lowerWidth:0,height:s,x:n,y:r},to:{upperWidth:a,lowerWidth:i,height:s,x:n,y:r},duration:d,animationEasing:h,isActive:m},(function(t){var n=t.upperWidth,r=t.lowerWidth,a=t.height,i=t.x,s=t.y;return o.a.createElement(Ln,{canBegin:c>0,from:"0px ".concat(-1===c?1:c,"px"),to:"".concat(c,"px 0px"),attributeName:"strokeDasharray",begin:f,duration:d,easing:h},o.a.createElement("path",Cv({},Z(e.props),Q(e.props),{className:g,d:Dv(i,s,n,r,a),ref:function(t){e.node=t}})))})):o.a.createElement("g",null,o.a.createElement("path",Cv({},Z(this.props),Q(this.props),{className:g,d:Dv(n,r,a,i,s)})))}}])&&Ov(n.prototype,r),a&&Ov(n,a),t}(i.PureComponent);jv.displayName="Trapezoid",jv.propTypes=function(e){for(var t=1;t0&&o.length>a&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=h.bind(r);return a.listener=n,r.wrapFn=a,a}function f(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var c=l.length,u=g(l,c);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){o=n[i].listener,a=i;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(24),a=n(493);e.exports=function(e,t){return e&&e.length?a(e,r(t,2)):0}},function(e,t,n){"use strict";var r={};function a(e,t,n){var i,o,s,l,c,u="";for("string"!=typeof t&&(n=t,t=a.defaultChars),void 0===n&&(n=!0),c=function(e){var t,n,a=r[e];if(a)return a;for(a=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?a.push(n):a.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t=55296&&s<=57343){if(s>=55296&&s<=56319&&i+1=56320&&l<=57343){u+=encodeURIComponent(e[i]+e[i+1]),i++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[i]);return u}a.defaultChars=";/?:@&=+$,-_.!~*'()#",a.componentChars="-_.!~*'()",e.exports=a},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1),a=n(102),i=n(288),o=n(605),s=n(609),l=n(251),c=n(611),u=n(624),p=n(627),h=n(629),d=n(632),f=n(633),m=n(45),g=n(25),y=window.reallyreadit.app.initData;let v=!0;y.deviceType!==g.DeviceType.Ios&&"MacIntel"===navigator.platform&&!navigator.userAgent.includes("Android")&&navigator.maxTouchPoints>0&&(y.deviceType=g.DeviceType.Ios,v=!1);const b=new o.default(y.apiServerEndpoint,y.clientType,y.version.toString(),y.deviceType,y.exchanges),w={captcha:new s.default(null,e=>{window.onReCaptchaLoaded=()=>{e(window.grecaptcha)}}),initialLocation:Object.assign(Object.assign({},y.initialLocation),{fragment:location.hash}),initialShowTrackingAnimationPrompt:y.initialShowTrackingAnimationPrompt,initialUserProfile:y.userProfile,serverApi:b,staticServerEndpoint:y.staticServerEndpoint,version:new m.default(y.version),webServerEndpoint:y.webServerEndpoint};let _;switch(y.clientType){case l.default.App:const e=new d.default;window.reallyreadit.app=Object.assign(Object.assign({},window.reallyreadit.app),e.createIncomingMessageHandlers()),_=r.createElement(i.default,Object.assign(Object.assign({},w),{appApi:new p.default({messagingContext:e,platform:y.appPlatform}),appReferral:y.appReferral}));break;case l.default.Browser:_=r.createElement(c.default,Object.assign(Object.assign({},w),{browserApi:new u.default,deviceType:y.deviceType,extensionApi:new h.default({installedVersion:y.extensionVersion?new m.default(y.extensionVersion):null,webServerEndpoint:y.webServerEndpoint})}));break;default:throw new Error("Invalid clientType")}const E=document.getElementById("root");if(v)a.hydrate(_,E);else{const e=document.createElement("div");e.id="root",E.replaceWith(e),a.render(_,e)}b.initialize(),f.polyfill()},function(e,t,n){"use strict"; /** @license React v17.0.2 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(162),a=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,s=60110,l=60112;t.Suspense=60113;var c=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var p=Symbol.for;a=p("react.element"),i=p("react.portal"),t.Fragment=p("react.fragment"),t.StrictMode=p("react.strict_mode"),t.Profiler=p("react.profiler"),o=p("react.provider"),s=p("react.context"),l=p("react.forward_ref"),t.Suspense=p("react.suspense"),c=p("react.memo"),u=p("react.lazy")}var h="function"==typeof Symbol&&Symbol.iterator;function d(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n