/*! For license information please see viewer.nolibs.build.min.js.LICENSE.txt */ (function(){var __webpack_modules__={74949:function(e,t,n){"use strict";n.d(t,{T:function(){return g}});var i=n(58932),r=n(45221),o=n(13302),a=n(57230),s=n(1339),u=n(46869),c=n(82788),l=n(17950);function d(e){return{id:e.id,name:e.name,brand:e.brand,category:e.category,variant:e.variant,subTotal:e.subTotal,discount:e.discount,total:e.total,quantity:e.quantity,coupon:e.coupon}}var h=n(84215),f=n(49422),p=n(47020),m=n(65795),g=new(function(){function e(){this.dataElement=function(){return document.getElementById("ecommerce")}}return e.prototype.getStep=function(){var e=this.dataElement();if(e){var t=(0,o.findKey)(h._,(function(t){return t===e.getAttribute("data-step")}));return h._[t]}return null},e.prototype.getPromo=function(){var e=new r.A(window.location.href),t=e.getQueryParamValue("PromoCode"),n=e.getQueryParamValue("PromoProduct");if(t&&n)return{code:t,product:n};var i=document.getElementById("PromoCode"),o=document.getElementById("PromoProduct"),a=document.getElementById("PromoSubTotal"),s=document.getElementById("PromoDiscount"),u=document.getElementById("PromoTotal");return i&&o&&a&&s&&u?{code:i.value,product:o.value,subtotal:parseFloat(a.value),discount:parseFloat(s.value),total:parseFloat(u.value)}:null},e.prototype.handle=function(e,t,n){return(0,i.sH)(this,void 0,void 0,(function(){var o,g,v,y,_,b,w;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return(o=t||new r.A(window.location.href).getQueryParamValue("SuccessOrderId"))?[4,(0,a.yS)(o)]:[2];case 1:switch(g=i.sent(),v={affiliation:(C=g).affiliation,cardType:C.cardType,currency:C.currency,items:C.items.map(d),tax:C.tax,transactionId:C.transactionId,value:C.value},n=n||this.getPromo(),v.items&&v.items.length>0&&n&&v.items.forEach((function(e){e.id===n.product&&(e.coupon=e.coupon||n.code,e.subTotal=e.subTotal||n.subtotal,e.discount=e.discount||n.discount,e.total=e.total||n.total)})),y=function(){"true"===l.get("isNewUser")&&c.X.send(new u.wS({system:s.h.Application}))},e=e||this.getStep()){case h._.SubscriptionPlans:y();break;case h._.Bundles:y(),c.X.send(new m.Aq(v));break;case h._.PaymentInformation:if(v&&v.items&&v.items.length>0&&!new r.A(window.location.href).getQueryParamValue("RequestedContent.issueId")&&c.X.send(new m.nt(v)),_=document.getElementsByClassName("validation-summary-errors"))for(b=0;b<_.length;b++)(w=_[b].textContent.trim())&&c.X.send(new f.a(new p.y({description:w,fatal:!1})));break;case h._.Confirmation:v&&v.items&&v.items.length>0&&c.X.send(new m.UA(v));break;case h._.Finish:v&&v.items&&v.items.length>0&&c.X.send(new m.eP(v));break;default:throw new Error("Not Implemented")}return[2]}var C}))}))},e.prototype.init=function(){var e=this;document.addEventListener("DOMContentLoaded",(function(){e.dataElement()&&e.handle(null,null,null)}),{once:!0})},e}())},70973:function(e,t,n){"use strict";n.d(t,{z:function(){return h}});var i=n(58932),r=n(27189),o=n(90006),a=n(16213),s=n(3182),u=n(3166),c=n(44539),l=n(19548),d=n(53952),h=new(function(){function e(){var e=this;this._enabled=!1;var t=o.A.getUrlParameters();this._debug=!1,this._loaded=(0,i.sH)(e,void 0,void 0,(function(){return(0,i.YH)(this,(function(n){switch(n.label){case 0:return this.trackers=[],this.trackers.push(d.E),this.trackers.push(u.U),this.trackers.push(l.O),this.trackers.push(c.n),[4,Promise.all(this.trackers.map((function(e){return e.loaded()})))];case 1:return n.sent(),e.trackers=e.trackers.filter((function(e){return e.enabled()})),e._enabled=e.trackers.length>0,e._debug&&a.A.log("se2sky.analytics - Trackers Found: ".concat(e.trackers.map((function(e){return e.toString()})).join(", ")||"None")),r.A.get("Analytics.CustomSourceTrackingEvent",!1)&&(t.source||t.medium)&&(this._debug&&a.A.log("se2sky.analytics - CustomSourceTracking - source=".concat(t.source,", medium=").concat(t.medium)),this.customSourceTracking(t.source,t.medium)),[2,!0]}}))}))}return e.prototype.toString=function(){return"Analytics"},e.prototype.loaded=function(){return this._loaded},e.prototype.enabled=function(){return this._enabled},e.prototype.pageView=function(e){var t=this;void 0===e&&(e={}),e.context=s.B.merge(e.context),e.title=e.title||(e.context&&e.context.contentName?e.context.contentName:"")||document.title,e.page=e.page||"".concat(window.location.pathname).concat(window.location.search).concat(window.location.hash),this._loaded.then((function(){t.trackers.forEach((function(t){return t.pageView(e)}))}))},e.prototype.event=function(e){var t=this;e.context=s.B.merge(e.context),this._loaded.then((function(){t.trackers.forEach((function(t){return t.event(e)}))}))},e.prototype.transaction=function(e){var t=this;e.context=s.B.merge(e.context),this._loaded.then((function(){t.trackers.forEach((function(t){return t.transaction(e)}))}))},e.prototype.timing=function(e,t,n,i){var r=this;this._loaded.then((function(){r.trackers.forEach((function(r){return r.timing(e,t,n,i)}))}))},e.prototype.exception=function(e,t){var n=this;this._loaded.then((function(){n.trackers.forEach((function(n){return n.exception(e,t)}))}))},e.prototype.customSourceTracking=function(e,t){var n=this;this._loaded.then((function(){n.trackers.forEach((function(n){return n.customSourceTracking(e,t)}))}))},e}())},3182:function(e,t,n){"use strict";n.d(t,{B:function(){return m}});var i=n(58932),r=n(13302),o=n(43125),a=n(65678),s=n(2215),u=n(70989),c=n(20680),l=n(92701),d=n(45235),h=n(86699),f=n(67303),p=n(68092),m=new(function(){function e(){}return e.prototype.merge=function(e){return e=e||{},this.refresh(),(0,r.merge)({},this,e)},e.prototype.refresh=function(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return this.cid=void 0,this.contentName=void 0,this.issueDate=void 0,this.pageNumber=void 0,this.articleSource=void 0,(0,u.d)()!==a.lP.PagesView&&(0,u.d)()!==a.lP.TextView||(this.cid=f.A.cid(),this.contentName=f.A.contentName(),e=f.A.issue(),(0,o.TW)(e)&&(this.issueDate=(0,o.M6)(e)),this.pageNumber=f.A.page()),[4,(0,l.Y)()];case 1:return t=n.sent(),this.userCountry=t.country,this.currentLanguage=t.language,g(),[2]}}))}))},e}());function g(){var e=s.A.current.language();m.translatedLanguage=e?e.code():void 0}h.A.onUserStateChanged((function(){(0,p.z)().then((function(e){var t,n,i,r;m.subscriptionPlan=e?(n=(t=e).subscriptionId,i=t.subscriptionName.replace(/\s/g,""),r=function(e){var t=(0,d.s5)(e);return String("0000".concat(t)).slice(-4)}(n),"".concat(i,"-").concat(r)):void 0})).catch(c.logError)})),s.A.bind("currentLanguageChanged",(function(){return g()})),m.refresh()},84215:function(e,t,n){"use strict";var i,r;n.d(t,{_:function(){return i},a:function(){return r}}),function(e){e.SubscriptionPlans="subscriptionPlans",e.Bundles="bundles",e.PaymentInformation="paymentInformation",e.Confirmation="confirmation",e.Finish="finish"}(i||(i={})),function(e){e.AddPaymentInfo="AddPaymentInfo",e.AddToCart="AddToCart",e.BeginCheckout="BeginCheckout",e.CheckoutProgress="CheckoutProgress",e.Purchase="Purchase",e.RemoveFromCart="RemoveFromCart",e.SelectContent="SelectContent",e.SetCheckoutOption="SetCheckoutOption"}(r||(r={}))},3166:function(e,t,n){"use strict";n.d(t,{U:function(){return d}});var i=n(58932),r=n(27189),o=n(18158),a=n(84215),s=n(20088),u=n(65087),c=!1;function l(){for(var e=[],t=0;t=0||(null===(o=a.AllowPolicy)||void 0===o?void 0:o.indexOf("*"))>=0;return s||(console.error('This Google Tag Manager implementation is requesting permissions, but the XML backend configuration is missing, make sure you have the AllowPolicy, like:\n\n\n \n \n \n\n\nhttps://developers.google.com/tag-manager/templates/permissions?hl=en\n '),console.warn('Checking policy for "'.concat(t," = ").concat(s,'", data=').concat(JSON.stringify(n)))),s}))),l("set",{cookie_flags:e.CookieSameSite||"SameSite=None;Secure"}),e.ContainerID.split(",").forEach((function(e){l("config",e,{send_page_view:!1})})),e.Ecommerce&&e.Ecommerce.Enabled&&(this._ecommerceEnabled=!0),this._triggers=e.Triggers,this._variables=e.Variables,e.UseUserId&&(0,u.C)((function(e){d({UserId:e})})),[2,!0]):[2,!1]):[2,!1]}var n,i,a,s,h,f}))}))}return e.prototype.toString=function(){return"Google TagManager (".concat(this._ContainerID,")")},e.prototype.loaded=function(){return this._loaded},e.prototype.enabled=function(){return this._enabled},e.prototype.pageView=function(e){if(void 0===e&&(e={}),this._enabled){var t={event:this._triggers.Pageview};t[this._variables.PageTitle]=e.title,t[this._variables.PageURL]=e.page,e.context&&(t[this._variables.Context]=e.context),d(t)}else this._debug&&console.log("NOT ENABLED pageView",e)},e.prototype.event=function(e){if(this._enabled&&this._eventsEnabled){var t={event:this._triggers.Event};e.category&&(t[this._variables.Category]=e.category),e.action&&(t[this._variables.Action]=e.action),e.label&&(t[this._variables.Label]=e.label),e.value&&(t[this._variables.Value]=e.value),e.context&&(t[this._variables.Context]=e.context),d(t)}else this._debug&&console.log("NOT ENABLED event",e)},e.prototype.transaction=function(e){if(this._enabled&&this._ecommerceEnabled&&e){var t,n={event:"".concat(this._triggers.Transaction," => ").concat((0,s.c)(e.type)),ecommerce:{}};switch(e.data.items&&(t=e.data.items.map((function(e){return{id:e.id,name:e.name,brand:e.brand,category:e.category,variant:e.variant,subtotal:e.subTotal,discount:e.discount,price:e.total,quantity:e.quantity,coupon:e.coupon}}))),e.type){case a.a.BeginCheckout:n.ecommerce.currencyCode=e.data.currency,n.ecommerce.checkout={actionField:{step:1},products:t};break;case a.a.SelectContent:if(!e.data.promotions)throw new Error("select_content type not supported");n.ecommerce.promoClick={promotions:e.data.promotions.map((function(e){return{id:e.id,name:e.name}}))};break;case a.a.CheckoutProgress:n.ecommerce.currencyCode=e.data.currency,n.ecommerce.checkout={actionField:{step:e.data.checkout_step,option:e.data.checkout_option,value:e.data.value},products:t};break;case a.a.AddToCart:n.ecommerce.currencyCode=e.data.currency,n.ecommerce.add={products:t};break;case a.a.RemoveFromCart:n.ecommerce.currencyCode=e.data.currency,n.ecommerce.remove={products:t};break;case a.a.AddPaymentInfo:n.ecommerce.currencyCode=e.data.currency,n.ecommerce.checkout={actionField:{step:3,option:e.data.payment_type},products:t};break;case a.a.SetCheckoutOption:n.ecommerce.checkout={actionField:{step:e.data.checkout_step,option:e.data.checkout_option},products:t};break;case a.a.Purchase:n.ecommerce.currencyCode=e.data.currency,n.ecommerce.purchase={actionField:{id:e.data.transactionId,affiliation:e.data.affiliation,revenue:e.data.value,tax:e.data.tax,shipping:e.data.shipping},products:t};break;default:throw new Error("Not Implemented: ".concat(e.type))}d(n)}else this._debug&&console.log("NOT ENABLED transaction",e)},e.prototype.timing=function(e,t,n,i){if(this._enabled){var r={event:this._triggers.Timing};r[this._variables.Var]=t,r[this._variables.Category]=e,r[this._variables.Value]=n,r[this._variables.Label]=i,d(r)}else this._debug&&console.log("NOT ENABLED timing",{category:e,variable:t,timeSpent:n,label:i})},e.prototype.exception=function(e,t){l("event","exception",{description:e,fatal:t})},e.prototype.customSourceTracking=function(e,t){l("config",this._ContainerID,{campaign_source:e,campaign_medium:t})},e}())},90259:function(e,t,n){"use strict";n.d(t,{T:function(){return C}}),n(90332),n(31711);var i=n(13981),r="authentication",o=n(58932),a=n(44834),s=n(70113),u=n(88544),c=n(75054),l=n(43566),d=n(27602),h=n(89247),f=n(94518),p=n(69216),m=n(16213),g=n(83883),v=n(67638);function y(e){var t,n,i,r;return(0,o.YH)(this,(function(e){switch(e.label){case 0:t="email",e.label=1;case 1:return e.trys.push([1,9,,12]),[4,(0,a.Lt)(l.mB)];case 2:return(n=e.sent()).isAuthenticated?[4,(0,a.yJ)((0,l.XX)({authenticationResult:n.isAuthenticated}))]:[3,4];case 3:e.sent(),e.label=4;case 4:return[4,(0,f.hU)()];case 5:return e.sent()?[4,(0,a.T1)(v.Mo)]:[2];case 6:return i=e.sent(),[4,(0,a.T1)((function(){return i.signIn()}))];case 7:return e.sent(),(0,c.ng)({system:t}),[4,(0,a.yJ)((0,l.XX)({authenticationResult:!0}))];case 8:return e.sent(),(0,c.Ok)({system:t}),[3,12];case 9:return r=e.sent(),m.A.error(r),[4,(0,a.yJ)((0,l.Le)({error:r}))];case 10:return e.sent(),[4,(0,a.yJ)((0,l.XX)({authenticationResult:!1}))];case 11:return e.sent(),(0,c.Py)({error:r,system:t}),[3,12];case 12:return[2]}}))}function _(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,a.jP)((0,s.g)(c.uF),(function(){var e,t,n,r,a,s,c;return(0,o.YH)(this,(function(l){switch(l.label){case 0:return[4,(0,p.D)()];case 1:return e=l.sent(),t="function"==typeof(null==e?void 0:e.signOut)?e.signOut():"",[5,(0,o.Ju)((0,u.N)(g.lx))];case 2:return n=l.sent(),[5,(0,o.Ju)((0,u.N)(g.xW))];case 3:return r=l.sent().externalLogoutPageDelay,a=void 0===r?500:r,[5,(0,o.Ju)((0,u.N)(d.SG))];case 4:return s=l.sent(),c=(null==s?void 0:s.viewName)?"":(0,h.DT)(),t||n||c?(setTimeout((function(){window.location.assign(t||n||c)}),a),[2]):((0,i.JD)((0,d.PX)()),[2])}}))}))];case 1:return e.sent(),[2]}}))}function b(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[5,(0,o.Ju)(_())];case 1:return e.sent(),[4,(0,a.IJ)(l.IZ,y)];case 2:return e.sent(),[2]}}))}var w=!1;function C(){w||(w=!0,i.bX.addFeature(r,void 0,b))}},83883:function(e,t,n){"use strict";n.d(t,{sk:function(){return h},KQ:function(){return p},dO:function(){return l},xW:function(){return c},YA:function(){return d},lx:function(){return f},jX:function(){return m}});var i=n(29978),r=n(95916),o=n(28809),a=n(43755),s=n(3915),u=n(86699),c=(0,i.Mz)(o._t,(function(e){var t=e("Authentication");return(0,s.C)(t)})),l=(0,i.Mz)(o._t,(function(e){return e("ui.Sidebar.ShowEmailAlerts",!0)})),d=(0,i.Mz)(o._t,(function(e){return e("ui.TopToolbar.SearchEnabled",!0)})),h=(0,i.Mz)(o._t,(function(e){return e("features.app.header.enabled",!1)})),f=(0,i.Mz)(c,(function(e){return e.enablePublisherAuthenticationWebService&&e.externalLogoutPage?e.externalLogoutPage:u.A.getRedirectionUrl("AfterSignOut")})),p=(0,i.Mz)(o._t,(function(e){return{clickableLogo:e("UI.TopToolbar.ClickableLogo",!0),logoUrl:e("UI.TopToolbar.LogoUrl",""),openLogoUrlInNewTab:e("UI.TopToolbar.OpenLogoUrlInNewTab",!0)}})),m=(0,i.Mz)(o._t,c,a.N,r.su,(function(e,t,n,i){var r=i();return{myAccount:{enabled:e("pagesView.enableMyAccountMenu",!0),location:t.externalMyAccountPage},myTopics:{enabled:e("ui.Sidebar.MonitorsEnabled",!1)&&e("ui.MyTopics.enable",!0)},catalog:{enabled:e("ui.Sidebar.CatalogEnabled",!0)},bookmarks:{enabled:e("ui.Bookmarks.enable",!0)},radio:{radioEnabled:n,radioActive:r},print:{enabled:e("ui.Print.enable",!0)},translate:{enabled:e("ui.Translate.enable",!0)},blog:{enabled:e("ui.Sidebar.BlogEnabled",!1),location:e("ui.Sidebar.BlogLocation","")},customItem:{enabled:e("pagesView.ShowCustomItem",!1),location:e("pagesView.CustomItemURL","")}}}))},67638:function(e,t,n){"use strict";n.d(t,{Mo:function(){return r},bp:function(){return o}});var i=n(58932);function r(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,72167))];case 1:return[2,e.sent().default]}}))}))}function o(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,72672))];case 1:return[2,e.sent().default]}}))}))}n(44834)},60102:function(e,t,n){"use strict";n.d(t,{b:function(){return y}});var i,r=n(13981),o=n(43125),a=n(65678),s=n(76855),u=n(99793),c=n(52733),l=new(n(20447).V)(/^\d+$/,"Page doesnt match pattern"),d=n(59530),h=n(3556),f=n(12830),p=n(29978),m=n(28809),g=(0,p.Mz)(m._t,(function(e){return e("catalog.MasterCid","")})),v=((i={})[a.lP.TextView]="textview",i[a.lP.PagesView]="pageview",i[a.lP.ReadingMap]="readingmap",i[a.lP.IssueDetails]="details",i);function y(e,t){var n=t.viewName,i=t.viewName===a.lP.PagesView?"{viewName}":v[t.viewName],p=t.viewName,m=(0,r.Lt)(g),y=new s.D(t.viewName);e.addRoute({name:"issue_newspaper_date_page_".concat(n),template:"{newspaper}/{issueDate}/page/{page}/".concat(i),defaults:{viewName:p},constraints:{viewName:y,issueDate:u.p,newspaper:c.z,page:l},executeWith:t.executeWith}),t.viewName===a.lP.TextView&&e.addRoute({name:"issue_newspaper_date_article_textview",template:"{newspaper}/{issueDate}/{articleId}/{viewName}?{query}",defaults:{query:""},constraints:{viewName:y,articleId:d.N1,issueDate:u.p,newspaper:c.z},executeWith:t.executeWith}),t.viewName===a.lP.IssueDetails&&e.addRoute({name:"issuedeatails_newspaper",template:"{newspaper}/details",defaults:{viewName:p},constraints:{viewName:y,newspaper:c.z},executeWith:t.executeWith}),e.addRoute({name:"issue_newspaper_date_".concat(n),template:"{newspaper}/{issueDate}/".concat(i,"?{zoom}"),defaults:{zoom:null,viewName:p},constraints:{viewName:y,issueDate:u.p,newspaper:c.z},executeWith:t.executeWith}),e.addRoute({name:"issue_newspaper_".concat(n),template:"{newspaper}/".concat(i,"?{zoom}"),defaults:{zoom:null,viewName:p},constraints:{viewName:y,newspaper:c.z},executeWith:t.executeWith}),e.addRoute({name:"issue_".concat(n),template:"{issue}/".concat(i),defaults:{viewName:p},constraints:{viewName:y,issue:function(e,t){return(0,o.TW)(t[e])}},executeWith:t.executeWith}),e.addRoute({name:"cid_issue_date_".concat(n),template:"{cid}/{issueDate}/".concat(i),defaults:{viewName:p},constraints:{viewName:y,issueDate:u.p,cid:h.A},executeWith:t.executeWith}),e.addRoute({name:"cid_".concat(n),template:"{cid}/".concat(i),defaults:{viewName:p},constraints:{viewName:y,cid:h.A},executeWith:t.executeWith}),e.addRoute({name:"issue_articleId",template:"article/{articleId}/{viewName}",constraints:{articleId:d.N1,viewName:y},executeWith:t.executeWith}),e.addRoute({name:"bookmark_".concat(n),template:"bookmark/{bookmark}/".concat(i),defaults:{viewName:p},constraints:{viewName:y,bookmark:f.k},executeWith:t.executeWith}),t.viewName===a.lP.PagesView&&(e.addRoute({name:"home",template:"",defaults:{viewName:p,cid:m},constraints:{viewName:y},executeWith:t.executeWith}),e.addRoute({name:"latest",template:"latest",defaults:{viewName:p},constraints:{viewName:y},executeWith:t.executeWith}))}},41680:function(e,t,n){"use strict";n.d(t,{Z5:function(){return W},uO:function(){return j},o_:function(){return h},iZ:function(){return $}});var i=n(26811),r=n(31555),o=n(5059),a=n(85387),s=n(13384),u=n(61577),c=n(59565),l=n(10610),d=n(83883),h=function(e){var t=e.optionsMenuItems,n=e.search,i=void 0===n||n,o=(0,a.d4)(d.YA);return(0,r.jsxs)(r.Fragment,{children:[i&&o&&(0,r.jsx)(l.u,{}),(0,r.jsx)($,{}),t.length>0?(0,r.jsx)(c.t,{className:"btn-options",button:(0,r.jsxs)(u.n,{className:"btn-icon",children:[(0,r.jsx)("span",{className:"pri pri-action","aria-hidden":"true"}),(0,r.jsx)("span",{className:"btn-title",children:(0,s.p3)("Buttons.Options")})]}),children:t}):(0,r.jsx)("div",{className:"btn-options"})]})},f=n(58932),p=n(78698),m=n(27602),g=n(65678),v=n(53236),y=n(83999),_=n(42597),b=n(86699),w=n(13981),C=n(44834),A=n(94518),I=n(67638),S=(0,n(89103).lQ)("".concat("app.common.catalog","/open_legacy_catalog"));function P(e){return e.payload,(0,f.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,A.hU)()];case 1:return e.sent()?[4,(0,C.T1)(I.bp)]:[2];case 2:return e.sent().show(),[2]}}))}w.bX.addFeature("app.common.catalog",void 0,(function(){return(0,f.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,C.jP)(S,P)];case 1:return e.sent(),[2]}}))}));var x=n(29978),T=n(72112),k=(0,x.Mz)((function(e){return e[T.p]}),(function(e){return null==e?void 0:e.publicationsCount})),E=n(67760),M=function(e){return(0,r.jsx)("nav",{role:"navigation",className:"ui-nav","aria-label":(0,s.p3)("Navigation.Site"),children:(0,r.jsxs)("div",{className:"ui-nav-content is-compact is-permanent-compact",children:[(0,r.jsx)("div",{className:"ui-nav-controls-compact",children:(0,r.jsx)(E.t,{type:"menu",label:(0,s.p3)("Buttons.Menu"),children:e.items})}),(0,r.jsx)("div",{className:"ui-nav-controls",children:(0,r.jsx)("ul",{className:"ui-nav-nav",children:e.items.reduce((function(e,t,n){return e.push((0,r.jsx)(y.p.Provider,{value:{asMenuItem:!1,tabIndex:-1,hidden:!0},children:t},n)),e}),[])})})]})})},D=function(e){var t=e.mode,n=(0,a.wA)(),i=(0,a.d4)(d.jX),u=(0,a.d4)(k),c=(0,a.d4)(p.uF),l=[],h=o.useCallback((function(){n(S())}),[n]),w=o.useCallback((function(){n((0,m.Ng)({viewName:g.lP.Monitors,params:{type:"monitor",monitorId:0}}))}),[n]),C=o.useCallback((function(){n((0,m.Ng)({viewName:g.lP.Profile,params:{profileId:v.default.getProfileId()}}))}),[n]),A=o.useCallback((function(){n((0,m.bv)({link:i.customItem.location,openNewWindow:!0}))}),[n,i]),I=o.useCallback((function(){n((0,m.bv)({link:i.blog.location,openNewWindow:!0}))}),[n,i]),P=o.useCallback((function(){n((0,m.Ng)({viewName:g.lP.Help}))}),[n]);i.catalog.enabled&&u>1&&l.push((0,r.jsx)(y.g,{icon:"pri pri-sources",title:(0,s.p3)("Navigation.Catalog"),selected:!1,onClick:h},"web_catalog")),i.myTopics.enabled&&b.A.isLogin()&&l.push((0,r.jsx)(y.g,{title:(0,s.p3)("Menu.Monitors"),selected:!1,onClick:w,hrefSEO:"/topics"},"web_topics")),i.bookmarks.enabled&&v.default.getProfileId()&&l.push((0,r.jsx)(y.g,{title:(0,s.p3)("Menu.Bookmarks"),selected:!1,onClick:C},"web_bookmarks")),i.customItem.enabled&&l.push((0,r.jsx)(y.g,{title:(0,s.p3)("Sidebar.About"),selected:!1,onClick:A,hrefSEO:i.customItem.location},"web_about")),i.blog.enabled&&l.push((0,r.jsx)(y.g,{title:(0,s.p3)("Sidebar.Blog"),selected:!1,onClick:I,hrefSEO:i.blog.location},"web_blog")),l.push((0,r.jsx)(y.g,{title:(0,s.p3)("Sidebar.HelpCenter"),selected:!1,onClick:P,hrefSEO:"/help"},"web_help"));var x=l.length>2?l.splice(1):[];return c?(0,r.jsx)(M,{items:(0,f.fX)((0,f.fX)([],(0,f.zs)(l),!1),(0,f.zs)(x),!1)}):(0,r.jsx)(_.q,{mode:t,items:l,menuItems:x})},N=n(62713),L=n(10320),V=n(80784),R=n(89247),H=n(97556),F=n(6666),B=(0,R.DT)(),z=function(){var e=(0,a.wA)(),t=(0,a.d4)(m.Lr).homeViewName,n=t&&t!==g.lP.Landing?"".concat(B).concat(t):"".concat(B),i=(0,a.d4)(d.KQ),u=i.clickableLogo,c=i.logoUrl,l=i.openLogoUrlInNewTab,h=(0,o.useCallback)((function(t){return u&&e(c?(0,m.bv)({link:c,openNewWindow:l}):(0,m.TU)({})),(0,F.T)(t.nativeEvent)}),[e,u,c,l]);return(0,r.jsx)("div",{className:"topbar-logo",children:(0,r.jsx)(H.o,{className:"logo","aria-label":(0,s.p3)("Navigation.Logo.Aria"),onClick:h,href:n,children:(0,r.jsx)("span",{children:(0,s.p3)("BrandPublisher")})})})},O=function(e){var t=o.useContext(L.D).showSearchInput,n=[],i=null,a="none"!==e.navigation;a&&(i="compact"===e.navigation?"inline-compact":"inline");var s=(0,r.jsxs)(r.Fragment,{children:[e.left,a&&(0,r.jsx)(D,{mode:i})]}),u=e.center;u||(u=function(){return(0,r.jsx)(z,{})});var c=e.align||("inline"===i?"sides-flex":u?"center-flex":"none"),l=e.right||(0,r.jsx)(h,{optionsMenuItems:e.optionsMenuItems}),d=e.accessory,f=e.outerAccessory;return"navbar"===i?d=(0,r.jsxs)(r.Fragment,{children:[d,(0,r.jsx)(D,{mode:"navbar"})]}):"tabbar"===i&&(f=(0,r.jsxs)(r.Fragment,{children:[f,(0,r.jsx)(D,{mode:"tabbar"})]})),t&&(n.push("site-header-search-shown"),f=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"dialog-tint site-header-search-tint"}),f]})),(0,r.jsx)(N.D,{className:n.join(" "),left:s,center:u,right:l,align:c,replaceWith:t?(0,r.jsx)(V.O,{}):null,accessory:d,outerAccessory:f,config:e.config,onHeaderContextChanged:e.onHeaderContextChanged})},j=function(e){return(0,r.jsx)(L.j,{children:(0,r.jsx)(O,(0,f.Cl)({},e))})},U=n(74637),W=function(){var e=(0,a.wA)(),t=o.useCallback((function(){e((0,m.Ng)({viewName:g.lP.EmailAlerts}))}),[e]);return(0,r.jsx)(U.k,{text:(0,s.p3)("Menu.Account.EmailAlerts"),icon:"pri pri-alerts",onClick:t})},Y=n(10358),X=n(43566),q=n(64404),G=n(18752),K=n(89486),J=n(70474),Q=n(50527),Z=function(){var e=(0,a.wA)(),t=(0,a.d4)(d.jX),n=(0,a.d4)(Q.oe),i=(0,a.d4)(J.rU),u=o.useCallback((function(){e((0,X.Op)())}),[e]),c=o.useCallback((function(){t.myAccount.location?e((0,m.bv)({link:t.myAccount.location})):e((0,m.Ng)({viewName:g.lP.Account}))}),[e,t.myAccount.location]);if(!i)return null;var l=t.myAccount.enabled&&n.enabled&&!i.maxSessionRequired;return(0,r.jsxs)(r.Fragment,{children:[l&&(0,r.jsx)(U.k,{icon:"pri pri-account",text:(0,s.p3)("Menu.Account.MyAccount"),onClick:c}),(0,r.jsx)(U.k,{icon:"pri pri-logout",text:(0,s.p3)("Sidebar.LogOut"),onClick:u})]})},$=function(){var e=(0,a.wA)(),t=o.useContext(N.a),n=(0,a.d4)(G.O4),i=(0,a.d4)(X.mB);(0,q.C)((function(){t.realign()}),[t.realign,i.isAuthenticated]);var l=o.useCallback((function(){e((0,X.IZ)({}))}),[e]);return i.isAuthenticated?(0,r.jsx)(c.t,{className:"btn-account",button:(0,r.jsxs)(u.n,{className:"btn btn-dropdown","aria-label":(0,s.p3)("Header.Menu.User"),children:[(0,r.jsx)(K.a,{user:i,size:Y.eV.normal}),(0,r.jsx)("span",{className:"btn-title",children:(0,s.p3)("Header.Menu.User")})]}),children:(0,r.jsx)(Z,{})}):n?(0,r.jsx)(u.n,{className:"btn btn-login",onClick:l,children:(0,r.jsx)("span",{className:"btn-title",children:(0,s.p3)("Buttons.Login.Text")})}):void 0};(0,i.T)()},72112:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});var i="app.views.common"},50527:function(e,t,n){"use strict";n.d(t,{CO:function(){return s},EF:function(){return a},H_:function(){return u},oe:function(){return c}});var i=n(29978),r=n(28809),o=n(66443),a=(0,i.Mz)(r._t,(function(e){return e("profileview.sections",{})})),s=(0,i.Mz)(r._t,(function(e){return e("Authentication.ExternalUpgradeSubscriptionPage","")})),u=(0,i.Mz)(r._t,(function(e){return e("subscriptionview",{})})),c=(0,i.Mz)([o.vc],(function(e){return{enabled:e.general||e.subscription||e.notifications}}))},44080:function(e,t,n){"use strict";n.d(t,{U:function(){return s}});var i=n(58932),r=n(65678),o=n(60102),a=!1;function s(e,t){a||(a=!0,(0,o.b)(e,(0,i.Cl)((0,i.Cl)({},t),{viewName:r.lP.PagesView})))}},64100:function(e,t,n){"use strict";n.d(t,{T:function(){return me},P:function(){return ge}});var i=n(31555),r=n(5059),o=n(39757),a=n(85387),s=n(13981),u=n(18158),c=n(78698),l=n(90954),d=n(64492),h=n(54777);function f(e){var t=e.popup,n=e.onClose,o=e.onCancel,a=(0,r.useCallback)((function(e,i){void 0===i&&(i=!1),n(t,e,i)}),[t,n]),s=(0,r.useCallback)((function(e){void 0===e&&(e=!1),o(t,e)}),[t,o]),u=(0,r.useCallback)((function(e){e.stopPropagation(),t.canDismiss&&o(t)}),[t,o]);if(!t)return null;var c=(0,h.KB)(t.name);return(0,i.jsxs)("div",{className:"alert-container-panel panel-fixed",children:[(0,i.jsx)(d._,{className:"dialog-tint",onClick:u}),(0,i.jsx)(c,{popup:t,onClose:a,onCancel:s})]})}function p(e){var t=e.popup,n=e.onClose,o=e.onCancel,a=(0,r.useCallback)((function(e,i){void 0===i&&(i=!1),n(t,e,i)}),[t,n]),s=(0,r.useCallback)((function(e){void 0===e&&(e=!1),o(t,e)}),[t,o]);if((0,r.useEffect)((function(){(null==t?void 0:t.supportNativeScroll)&&window.scrollTo(0,0)})),!t)return null;var u,c=(u=Array.from(document.getElementsByClassName("dialog-tint")).filter((function(e){return"none"!==getComputedStyle(e).display})),Math.max.apply(Math,u.map((function(e){return parseInt(getComputedStyle(e).zIndex,10)||0})))),l={};c>0&&(l.zIndex=c+2);var d=(0,h.KB)(t.name),f="dialog-container-panel".concat(t.supportNativeScroll?"":" panel-fixed");return(0,i.jsxs)("div",{className:f,style:l,children:[(0,i.jsx)("div",{className:"dialog-tint"}),(0,i.jsx)(d,{popup:t,onClose:a,onCancel:s},t.id)]})}function m(e){var t,n,r,o=e.popups,a=e.disabled,s=e.onClose,u=e.onCancel;if(!o.length)return null;for(var c=o.length-1;c>=0;--c){var d=o[c];if(!t&&(0,l.nL)(d))t=d;else if(!r&&(0,l.MD)(d))r=d;else if(!n&&(0,l.rp)(d)){n=d;break}}var h=o.filter(l.rp).filter((function(e){return e!==n&&e.persistent}));return n&&h.push(n),a?(n&&h.forEach((function(e){return u(e)})),t&&u(t),null):(0,i.jsxs)(i.Fragment,{children:[h.map((function(e){return(0,i.jsx)(p,{popup:e,onClose:s,onCancel:u},e.id)})),t&&(0,i.jsx)(f,{popup:t,onClose:s,onCancel:u})]})}var g=n(33730),v=-1!==window.navigator.userAgent.indexOf("seo4ajax");function y(){var e=(0,a.d4)(g.Io),t=(0,a.wA)(),n=(0,r.useCallback)((function(e,n,i){void 0===i&&(i=!1),t((0,g.HF)({id:e.id,result:n,isBack:i}))}),[t]),o=(0,r.useCallback)((function(e,n){void 0===n&&(n=!1),t((0,g.HF)({id:e.id,isCancelled:!0,isBack:n}))}),[t]);return(0,i.jsx)(m,{disabled:v,popups:e,onClose:n,onCancel:o})}var _=n(58932),b=n(15520),w=n(80606),C=n(1052),A=function(e){var t=e.popup,n=e.onClose,o=(0,a.wA)(),s=(0,r.useCallback)((function(e){e.stopPropagation(),n()}),[n]),u=(0,r.useCallback)((function(e,n){o((0,w.qn)({id:t.id,context:e,cancelled:n}))}),[o,null==t?void 0:t.id]);if(!t)return null;var c=["dialog-container-panel",!t.supportNativeScroll&&"panel-fixed"].filter((function(e){return e})).join(" "),l=C._.dialogs[t.name];if(!l)throw new Error('Dialog "'.concat(t.name,"\" wasn't registered."));var d,h=(d=Array.from(document.getElementsByClassName("dialog-tint")).filter((function(e){return"none"!==getComputedStyle(e).display})),Math.max.apply(Math,d.map((function(e){return parseInt(getComputedStyle(e).zIndex,10)||0})))),f={};return h>0&&(f.zIndex=h+2),(0,i.jsxs)("div",{className:c,style:f,children:[(0,i.jsx)("div",{className:"dialog-tint",onClick:s}),(0,i.jsx)(l,{dialogId:t.id,context:t.context,supportNativeScroll:t.supportNativeScroll,onClose:u},t.id)]})},I=n(25672),S=function(e){var t=e.popup,n=e.onClose,o=(0,a.wA)(),s=I.A.menus[t.name],u=(0,r.useCallback)((function(e){o((0,w._E)({id:t.id,back:e.back}))}),[o,t.id]),c=(0,r.useCallback)((function(e){e.stopPropagation(),n()}),[n]),l=(0,r.useCallback)((function(){n()}),[n]),h=(0,r.useCallback)((function(e){e.preventDefault()}),[]);if(!s)throw new Error('ContextMenu "'.concat(t.name,"\" isn't registered"));return(0,i.jsxs)("div",{className:"contextmenu-container-panel",onContextMenu:h,children:[(0,i.jsx)(d._,{className:"dialog-tint",onTouchMove:l,onClick:c}),(0,i.jsx)(s,{menuId:t.id,parentMenuId:t.parentId,context:t.context,onClose:u,position:t.position,positionCalculationStrategy:t.positionCalculationStrategy})]})},P=function(){var e=(0,a.wA)(),t=(0,a.d4)(g.Io),n=(0,a.d4)(w.Io),o=n[n.length-1],s=(0,r.useCallback)((function(){o.type===b.n.ContextMenu?e((0,w._E)({id:o.id})):o.type===b.n.Dialog&&e((0,w.qn)({id:o.id,context:o.context}))}),[e,o]);if((0,r.useLayoutEffect)((function(){(null==o?void 0:o.type)===b.n.Dialog&&o.supportNativeScroll&&window.scrollTo(0,0)})),!n.length||t.length)return null;if(o.type===b.n.ContextMenu){var u=(0,_.fX)([],n,!0).reverse().find((function(e){return e.type===b.n.Dialog}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(A,{popup:u,onClose:s}),(0,i.jsx)(S,{popup:o,onClose:s})]})}return o.type===b.n.Dialog?(0,i.jsx)(A,{popup:o,onClose:s}):null},x=n(62454),T=n(51425),k=n(31728),E=n(66374),M=n(54688),D=n(27602),N=n(75451),L=n(93230),V=n(45164),R=n(18752),H=n(12730),F=n(57324),B=n(73663),z=function(e){var t,n,o=e.children,s=(0,_.zs)((0,r.useState)({isScrollEnabled:!0,scrollY:null}),2),u=s[0],c=s[1],l=(t=u,n=(0,r.useRef)(void 0),(0,r.useEffect)((function(){n.current=t}),[t]),n.current),d=(0,a.d4)(B.oz);return u.isScrollEnabled!==d&&c(!1===d?{isScrollEnabled:!1,scrollY:window.scrollY}:(0,_.Cl)((0,_.Cl)({},u),{isScrollEnabled:!0})),(0,r.useEffect)((function(){l&&l.isScrollEnabled!==d&&(l.isScrollEnabled||null===l.scrollY||(window.scrollTo(0,l.scrollY),c((function(e){return(0,_.Cl)((0,_.Cl)({},e),{scrollY:null})}))))}),[d,l]),(0,i.jsx)(F.z.Provider,{value:u,children:o})},O=n(22496),j=n(30431),U=n(30212);function W(e){var t=e.refocusTargetActive,n=e.refocusTargetType,i=e.focusOnTarget,o=(0,a.wA)(),s=(0,r.useCallback)((function(e){e?o((0,D.cl)(e)):(0,U.z)("Refocus target is not defined")}),[o]),u=(0,r.useCallback)((function(e){o((0,D.P4)(e))}),[o]),c=(0,r.useCallback)((function(e){i(e)?s(e):(0,U.z)("Failed to switch focus to the target element",e)}),[i,s]),l=(0,r.useCallback)((function(e){u(e),function(e){for(var t=[],n=1;n0})),this.signInExternal=(0,o.debounce)((function(e){(0,h.tM)({system:e,enableAutologin:!0}).then((function(){return n.close()})).catch((function(e){return e&&e.code!==s.YF.CANCELLED?(n.errorMessage(e.message||"Unknown error"),setTimeout((function(){return n.resize()}),0),Promise.reject(e)):Promise.reject()}))}),300,{leading:!1,trailing:!0}),this.currentState.subscribe((function(e){n.errorMessage(""),n.header(d.Ay.val(n.resMapping[e])||""),setTimeout((function(){return n.resize()}),0)}))}return e.prototype.back=function(){this.currentState()===i.Signin?this.cancel():this.currentState(i.Signin)},e.prototype.resize=function(){this.dialog.resize()},e.prototype.cancel=function(){this.errorMessage(""),this.dialog.hide(c.d.Cancel)},e.prototype.close=function(){this.errorMessage(""),this.dialog.hide(c.d.Close)},e.prototype.setState=function(e){void 0===e&&(e=i.Signin),this.currentState(e)},e}(),p=function(){function e(){this.dialog=u.default.createInstance(),this.dialogModel=new f(this.dialog),this.dialogShowed=new a.B,this.dialogClosed=new a.B}return Object.defineProperty(e.prototype,"onShow",{get:function(){return this.dialogShowed.asObservable()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onClose",{get:function(){return this.dialogClosed.asObservable()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorMessage",{set:function(e){this.dialogModel.errorMessage(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{set:function(e){this.dialogModel.setState(e)},enumerable:!1,configurable:!0}),e.prototype.close=function(){this.dialog.hide(c.d.Close)},e.prototype.show=function(){var e=this;this.dialog.show({templateName:"v7.Client.Dialogs.Signin.LoginRadius",model:this.dialogModel}).onShow((function(){return e.dialogShowed.next()})).onHide((function(t,n){return e.dialogClosed.next(n)}))},e.prototype.resize=function(){this.dialog.resize()},e}()},47935:function(e,t,n){"use strict";n.d(t,{q:function(){return P}});var i,r,o,a=n(58932),s=n(69463),u=n(96536),c=n(53308),l=n(27189),d=n(46977),h=n(94340),f=n(35765),p=n(16213),m=n(44260),g=n(88813),v=n(90922),y=n(9930),_=n(87995),b=n(66197),w=n(9605),C="login-container",A="registration-container",I=((i={})[y.j.signIn]=_.U.Signin,i[y.j.register]=_.U.Signup,i[y.j.resetPasswordRequestCode]=_.U.ResetPassword,i),S=((r={})[w.Zz.LOGIN]=_.U.Signin,r[w.Zz.REGISTRATION]=_.U.Signup,r[w.Zz.RESET_PASSWORD]=_.U.ResetPassword,r);!function(e){e[e.LINK_ALREADY_USED=974]="LINK_ALREADY_USED",e[e.LINK_EXPIRED=975]="LINK_EXPIRED",e[e.LINK_TOKEN_INVALID=1063]="LINK_TOKEN_INVALID",e[e.NEW_PASSWORD_INVALID=1015]="NEW_PASSWORD_INVALID",e[e.INVAlID_USER_PASSWORD=966]="INVAlID_USER_PASSWORD",e[e.USER_DOES_NOT_EXIST=938]="USER_DOES_NOT_EXIST",e[e.EMAIL_ADDRESS_TAKEN=936]="EMAIL_ADDRESS_TAKEN"}(o||(o={}));var P=function(){function e(){this.enabled=!1,this.loginSuccess=new s.B,this.modalClosed=new s.B,this.logoutSuccess=new s.B,this.onLoginSuccess=this.loginSuccess.asObservable(),this.onModalClosed=this.modalClosed.asObservable(),this.onLogoutSuccess=this.logoutSuccess.asObservable(),this.showScreenSet=this.showScreenSet.bind(this)}return e.prototype.load=function(){return(0,a.sH)(this,void 0,void 0,(function(){var e,t,n,i,r,o,s,u,c=this;return(0,a.YH)(this,(function(d){switch(d.label){case 0:return[4,Promise.all([l.A.loaded(),g.A.loaded(),m.Ay.loaded()])];case 1:if(d.sent(),!(e=l.A.get("Authentication.LoginRadius"))||!e.enabled)return[2,Promise.reject()];if(this.enabled=!0,window.LoginRadiusV2)return[3,5];this.dialog=new _.I,d.label=2;case 2:return d.trys.push([2,4,,5]),t=e.Options,n=e.Url,i=e.sso,r=e.endPoints,[4,Promise.all([(0,f.R)(n),(0,v.jZ)()])];case 3:return o=a.zs.apply(void 0,[d.sent(),2]),s=o[1],this.lrOptions=(0,a.Cl)((0,a.Cl)({},t),{verificationUrl:t.verificationUrl||window.location,resetPasswordUrl:t.resetPasswordUrl||window.location,sott:s}),this.endPoints=r||{},this.ssoConfig=i||{},this.initialize(),this.ssoConfig.enabled&&setTimeout((function(){c.initializeSSO()}),1e3),[3,5];case 4:return u=d.sent(),p.A.error(u),[2,Promise.reject()];case 5:return[2,Promise.resolve()]}}))}))},e.prototype.signIn=function(){this.showModal()},e.prototype.signOut=function(){this.lrObject.init("logout"),this.ssoConfig.enabled&&(0,c.lx)({url:this.ssoConfig.logoutUrl,requestConfig:{accept:"application/json",cache:"no-store"}}),this.logoutSuccess.next()},e.prototype.closeModal=function(){this.dialog.close()},e.prototype.showScreenSet=function(e){var t=I[e];if(void 0===t)throw new Error("screen ".concat(e," is not defined."));this.showModal(t)},e.prototype.showInlineScreenSet=function(e,t){this.showScreenSet(e)},e.prototype.initialize=function(){var e=this;this.lrObject=new window.LoginRadiusV2(this.lrOptions),this.lrObject.$hooks.register("afterFormRender",(function(t){return(0,a.sH)(e,void 0,void 0,(function(){var e;return(0,a.YH)(this,(function(n){switch(n.label){case 0:return e=Object.keys(S).find((function(e){return e.toLowerCase()===t.toLowerCase()})),S[e]===this.initialState&&(this.dialog.state=this.initialState,h.A.hide()),t!==w.Zz.LOGIN?[3,2]:[4,b.X.initDOM("#".concat(C))];case 1:return n.sent(),[3,4];case 2:return t!==w.Zz.REGISTRATION?[3,4]:[4,b.X.initDOM("#".concat(A))];case 3:n.sent(),n.label=4;case 4:return[2]}}))}))})),this.lrObject.$hooks.call("setButtonsName",{forgotpassword:m.Ay.val("Dialogs.Signin.SendEmail"),login:m.Ay.val("Buttons.Login.Text"),registration:m.Ay.val("Buttons.SignUp")}),this.lrObject.$hooks.call("customizeFormLabel",{emailid:m.Ay.val("Accounting.EmailAddress"),password:m.Ay.val("Accounting.Password")}),this.lrObject.$hooks.call("mapErrorMessages",[{code:o.NEW_PASSWORD_INVALID,description:m.Ay.val("Errors.PasswordUnique","Your new password is too similar to your old passwords. Please provide a new password."),message:m.Ay.val("Errors.PasswordUnique","Your new password is too similar to your old passwords. Please provide a new password.")},{code:o.INVAlID_USER_PASSWORD,description:m.Ay.val("Dialogs.Signin.InvalidLoginOrPass","Invalid user name or password."),message:m.Ay.val("Dialogs.Signin.InvalidLoginOrPass","Invalid user name or password.")},{code:o.USER_DOES_NOT_EXIST,description:m.Ay.val("Dialogs.Signin.InvalidLoginOrPass","Invalid user name or password."),message:m.Ay.val("Dialogs.Signin.InvalidLoginOrPass","Invalid user name or password.")},{code:o.EMAIL_ADDRESS_TAKEN,description:m.Ay.val("Errors.LogonEmailUnique","Account with this email already exists"),message:m.Ay.val("Errors.LogonEmailUnique","Account with this email already exists")}]),this.loginWidget=new w.S9(C,this.lrObject),this.loginWidget.onSuccess.subscribe((function(t){e.loginSuccess.next(t),e.closeModal()})),this.loginWidget.onError.subscribe(this.onError.bind(this)),this.socialLoginWidget=new w.XY("sociallogin-container",this.lrObject,"sociallogintemplate",".social-login-interface"),this.socialLoginWidget.onSuccess.subscribe((function(t){e.loginSuccess.next(t),e.closeModal()})),this.socialLoginWidget.onError.subscribe(this.onError.bind(this)),this.forgotPasswordWidget=new w.JX("forgotpassword-container",this.lrObject),this.forgotPasswordWidget.onSuccess.subscribe((function(t){var n=m.Ay.val("Accounting.PasswordRecovery.EmailConfirmationIsSent");(0,d.A)().show(n),e.loginSuccess.next(t),e.closeModal()})),this.forgotPasswordWidget.onError.subscribe(this.onError.bind(this)),this.registrationWidget=new w.KS(A,this.lrObject),this.registrationWidget.onSuccess.subscribe((function(t){e.loginSuccess.next(t),e.closeModal()})),this.registrationWidget.onError.subscribe(this.onError.bind(this)),this.resetPasswordWidget=new w.ty("resetpassword-container",this.lrObject),this.resetPasswordWidget.onSuccess.subscribe((function(t){e.closeModal();var n=m.Ay.val("Accounting.PasswordRecovery.PasswordChanged");(0,d.A)().show(n),(0,d.A)().onClosed((function(){return e.signIn()}))})),this.resetPasswordWidget.onError.subscribe(this.onError.bind(this));var t=this.lrObject.util.getQueryParameterByName("vtype");t&&"reset"===t&&this.showModal(_.U.ResetPassword)},e.prototype.showModal=function(e){var t=this;void 0===e&&(e=_.U.Signin),this.initialState=e,this.dialog.onShow.pipe((0,u.$)()).subscribe((function(){return t.initForms()})),this.dialog.onClose.pipe((0,u.$)()).subscribe((function(e){return t.modalClosed.next(e)})),this.dialog.show()},e.prototype.initForms=function(){return(0,a.sH)(this,void 0,void 0,(function(){return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[4,h.A.show()];case 1:return e.sent(),this.loginWidget.initForm(),this.socialLoginWidget.initForm(),this.forgotPasswordWidget.initForm(),this.registrationWidget.initForm(),this.resetPasswordWidget.initForm(),[2]}}))}))},e.prototype.initializeSSO=function(){return(0,a.sH)(this,void 0,void 0,(function(){var e,t,n,i,r,o,s;return(0,a.YH)(this,(function(u){switch(u.label){case 0:return[4,(0,c.lx)({url:this.ssoConfig.loginUrl,requestConfig:{withCredentials:!0,accept:"application/json",cache:"no-store"}})];case 1:return(e=u.sent()).isauthenticated?(t=e.token,n=(0,c.lx)({url:"".concat(this.endPoints.token,"?apiKey=").concat(this.lrOptions.apiKey,"&jwtapp=").concat(this.lrOptions.integrationName,"&access_token=").concat(t),requestConfig:{accept:"application/json",cache:"no-store"}}),i=(0,c.lx)({url:"".concat(this.endPoints.account,"?apiKey=").concat(this.lrOptions.apiKey,"&access_token=").concat(t),requestConfig:{accept:"application/json",cache:"no-store"}}),[4,Promise.all([n,i])]):[3,3];case 2:r=a.zs.apply(void 0,[u.sent(),2]),o=r[0],s=r[1],o.signature&&this.loginSuccess.next({jwttoken:o.signature,access_token:t,Profile:s}),u.label=3;case 3:return[2]}}))}))},e.prototype.onError=function(e){this.dialog.errorMessage=e[0].Message,this.dialog.resize()},e}()},66197:function(e,t,n){"use strict";n.d(t,{X:function(){return i.X}});var i=n(88749)},88749:function(e,t,n){"use strict";n.d(t,{X:function(){return a}});var i=n(58932),r=n(16213),o=n(44260),a=function(){function e(){}return e.initDOM=function(t){return(0,i.sH)(this,void 0,void 0,(function(){var n,a,s,u,c;return(0,i.YH)(this,(function(i){if(n=document.querySelector("".concat(t)),a=n.querySelectorAll("[type=password]"))try{s=document.createElement("span"),u=e.DOM.class,s.setAttribute("aria-hidden","true"),(c=s.classList).add.apply(c,[u.pri,u.priHidden]),a.forEach((function(t){var n,i=document.createElement("a");(n=i.classList).add.apply(n,[u.btnHelp,u.btnIcon]),i.title=o.Ay.val(e.DOM.resources.showPassword),i.appendChild(s),t.after(i),e.addListeners(t,i,s)}))}catch(e){r.A.error("Unable to load show password button UI")}return[2]}))}))},e.addListeners=function(t,n,i){if(n&&i){var r=e.DOM.class;n.addEventListener("click",(function(){"password"===t.type?(t.type="text",n.title=o.Ay.val(e.DOM.resources.showPassword),i.classList.replace(r.priHidden,r.priVisible)):(t.type="password",n.title=o.Ay.val(e.DOM.resources.hidePassword),i.classList.replace(r.priVisible,r.priHidden)),t.focus()}))}},e.DOM={class:{pri:"pri",priHidden:"pri-hidden",priVisible:"pri-visible",btnIcon:"btn-icon",btnHelp:"btn-help"},resources:{showPassword:"Dialogs.SignIn.ShowPassword",hidePassword:"Dialogs.SignIn.HidePassword"}},e}()},68084:function(e,t,n){"use strict";n.d(t,{Yd:function(){return s},Zz:function(){return i}});var i,r,o=n(69463),a=n(16213);!function(e){e.FORGOT_PASSWORD="forgotPassword",e.LOGIN="login",e.SOCIAL_LOGIN="socialLogin",e.REGISTRATION="registration",e.VERIFY_EMAIL="verifyEmail",e.RESET_PASSWORD="resetPassword"}(i||(i={})),function(e){e.SUCCESS="identity-screen-success--active",e.ERROR="identity-screen-error--active",e.FORM="identity-screen-form--active"}(r||(r={}));var s=function(){function e(e){this.successSubject=new o.B,this.errorSubject=new o.B,this.onSuccessInternal=this.onSuccessInternal.bind(this),this.onErrorInternal=this.onErrorInternal.bind(this),this.widgetOptions={container:e,onError:this.onErrorInternal,onSuccess:this.onSuccessInternal}}return e.prototype.initForm=function(){document.querySelector("#".concat(this.widgetOptions.container))&&this.lrObject.init(this.widgetType,this.widgetOptions)},e.prototype.onSuccessInternal=function(e){this.successSubject.next(e)},e.prototype.onErrorInternal=function(e){a.A.error(e),this.errorSubject.next(e)},Object.defineProperty(e.prototype,"onSuccess",{get:function(){return this.successSubject.asObservable()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this.errorSubject.asObservable()},enumerable:!1,configurable:!0}),e}()},43667:function(e,t,n){"use strict";n.d(t,{J:function(){return o}});var i=n(58932),r=n(68084),o=function(e){function t(t,n){var i=e.call(this,t)||this;return i.widgetType=r.Zz.FORGOT_PASSWORD,i.lrObject=n,i}return(0,i.C6)(t,e),t}(r.Yd)},9605:function(e,t,n){"use strict";n.d(t,{JX:function(){return a.J},KS:function(){return s.K},S9:function(){return r.S},XY:function(){return o.X},Zz:function(){return i.Zz},ty:function(){return u.t}});var i=n(68084),r=n(36764),o=n(4345),a=n(43667),s=n(39024),u=n(45223)},36764:function(e,t,n){"use strict";n.d(t,{S:function(){return a}});var i=n(58932),r=n(16213),o=n(68084),a=function(e){function t(t,n){var i=e.call(this,t)||this;return i.widgetType=o.Zz.LOGIN,i.lrObject=n,r.A.log("login widget created"),i}return(0,i.C6)(t,e),t}(o.Yd)},39024:function(e,t,n){"use strict";n.d(t,{K:function(){return o}});var i=n(58932),r=n(68084),o=function(e){function t(t,n){var i=e.call(this,t)||this;return i.widgetType=r.Zz.REGISTRATION,i.lrObject=n,i}return(0,i.C6)(t,e),t}(r.Yd)},45223:function(e,t,n){"use strict";n.d(t,{t:function(){return o}});var i=n(58932),r=n(68084),o=function(e){function t(t,n){var i=e.call(this,t)||this;return i.widgetType=r.Zz.RESET_PASSWORD,i.lrObject=n,i}return(0,i.C6)(t,e),t}(r.Yd)},4345:function(e,t,n){"use strict";n.d(t,{X:function(){return o}});var i=n(58932),r=n(68084),o=function(e){function t(t,n,i,o){var a=e.call(this,t)||this;return a.widgetType=r.Zz.SOCIAL_LOGIN,a.lrObject=n,a.widgetOptions.templateName=i,a.customInterface=o,a}return(0,i.C6)(t,e),t.prototype.initForm=function(){this.lrObject.customInterface(this.customInterface,this.widgetOptions),e.prototype.initForm.call(this),window.social_lrobj=this.lrObject},t}(r.Yd)},43582:function(e,t,n){"use strict";n.d(t,{y:function(){return m}});var i,r=n(58932),o=n(69463),a=n(96536),s=n(27189),u=n(35765),c=n(67303),l=n(8697),d=n(9930),h="offer_params",f="jwt_token",p=((i={})[d.j.signIn]="login",i),m=function(){function e(){var e=this;this._enabled=!1,this._experience=null,this.loginSuccess=new o.B,this.modalClosed=new o.B,this.identityAdapter=null,this.pianoEventHandlers={loggedIn:this.loggedIn.bind(this),closedCallback:this.closedCallback.bind(this)},this.pianoEndpoints={Janrain:{verify:function(t){return e.pianoCallApi("/anon/janrain/verifyAccountInfo",{janrain_capture_token:t.accessToken,url:window.location.href})}},Gigya:{verify:function(t){return e.pianoCallApi("/anon/gigya/verifyAccountInfo",{uid:t.UID,signature:t.UIDSignature,signature_timestamp:t.signatureTimestamp,url:window.location.href})}},LoginRadius:{verify:function(t){return(0,r.sH)(e,void 0,void 0,(function(){var e,n,i,o;return(0,r.YH)(this,(function(r){switch(r.label){case 0:localStorage.setItem(f,t.jwttoken),this.setExternalJWT(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.pianoCallApi("/anon/user/get",{uid:t.UID,user_token:t.jwttoken})];case 2:case 3:return r.sent(),[3,4];case 4:return[2,Promise.resolve({access:{user_token:t.jwttoken,user:{uid:null===(e=null==t?void 0:t.Profile)||void 0===e?void 0:e.Uid,email:null===(n=null==t?void 0:t.Profile)||void 0===n?void 0:n.Email[0].Value,firstName:null===(i=null==t?void 0:t.Profile)||void 0===i?void 0:i.FirstName,lastName:null===(o=null==t?void 0:t.Profile)||void 0===o?void 0:o.LastName}}})]}}))}))}}},this.showPurchaseDialog=this.showPurchaseDialog.bind(this),this.signIn=this.signIn.bind(this)}return e.prototype.load=function(){return(0,r.sH)(this,void 0,void 0,(function(){var e,t,n;return(0,r.YH)(this,(function(i){switch(i.label){case 0:return[4,s.A.loaded()];case 1:if(i.sent(),!(e=s.A.get("Authentication.Piano"))||!e.enabled)return[2,Promise.reject()];if(this._enabled=!0,null===(n=window.tp)||void 0===n?void 0:n.pianoId)return[3,11];i.label=2;case 2:return i.trys.push([2,10,,11]),(t=e.experience)&&t.enabled?(this._experience=t,[4,(0,u.R)("".concat(t.url,"?aid=").concat(t.aid))]):[3,4];case 3:return i.sent(),[3,6];case 4:return[4,(0,u.R)(e.url)];case 5:i.sent(),i.label=6;case 6:return[4,this.initialize(e)];case 7:return i.sent(),this.setExternalJWT(),e.identityProvider?[4,this.initializeIdentityProvider(e.identityProvider)]:[3,9];case 8:i.sent(),i.label=9;case 9:return[3,11];case 10:return i.sent(),[2,Promise.reject()];case 11:return[2,Promise.resolve()]}}))}))},Object.defineProperty(e.prototype,"onLoginSuccess",{get:function(){return this.loginSuccess.asObservable()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onModalClosed",{get:function(){return this.modalClosed.asObservable()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"purchaseDialogEnabled",{get:function(){return null!==this._experience&&null!==this._experience.purchase},enumerable:!1,configurable:!0}),e.prototype.signOut=function(){window.tp.pianoId.logout()},e.prototype.signIn=function(){this.showScreenSet(d.j.signIn)},e.prototype.closeModal=function(){},e.prototype.showScreenSet=function(e){var t=p[e];if(!t)throw new Error("screen ".concat(e," is not defined."));window.tp.pianoId.show({screen:t})},e.prototype.showInlineScreenSet=function(e,t){var n=p[e];if(!n)throw new Error("screen ".concat(e," is not defined."));window.tp.pianoId.show({displayMode:"inline",containerSelector:t,screen:n})},e.prototype.showPurchaseDialog=function(){var e=this;return new Promise((function(t,n){e._experience&&e._experience.purchase||n();var i=e._experience.purchase;for(var r in i||{})window.tp.push([r,i[r]]);window.tp.push(["setCustomVariable","cid",c.A.cid()]),window.tp.push(["addHandler","checkoutClose",function(e){switch(e.state){case"checkoutCompleted":case"alreadyHasAccess":case"voucherRedemptionCompleted":t();break;case"close":n({userCancelled:!0})}}]),window.tp.push(["addHandler","loginRequired",function(t){localStorage.setItem(h,JSON.stringify(t)),e.loginSuccess.pipe((0,a.$)()).subscribe((function(e){var t=localStorage.getItem(h);t&&(localStorage.removeItem(h),t=JSON.parse(t),window.tp.offer.startCheckout(t))})),window.tp.offer.close(),e.signIn()}]),window.tp.experience.execute()}))},e.prototype.initialize=function(e){var t=this,n=e.Global;return new Promise((function(e){for(var i in n||{})"object"!=typeof n[i]&&window.tp.push([i,n[i]]);for(var i in n.Id||{})t.pianoEventHandlers[i]=n.Id[i];window.tp.push(["addHandler","checkoutComplete",function(e){t.loginSuccess.next({token:window.tp.user.getProvider().getToken(),user:{uid:e.uid,email:e.email}})}]),window.tp.push(["init",function(){window.tp.pianoId.init(t.pianoEventHandlers),e()}])}))},e.prototype.initializeIdentityProvider=function(e){return(0,r.sH)(this,void 0,void 0,(function(){var t,n=this;return(0,r.YH)(this,(function(i){switch(i.label){case 0:return this.identityAdapter=l.A.create(e),[4,this.identityAdapter.load()];case 1:return i.sent(),this.signIn=this.identityAdapter.signIn.bind(this.identityAdapter),this.signOut=this.identityAdapter.signOut.bind(this.identityAdapter),this.closeModal=this.identityAdapter.closeModal.bind(this.identityAdapter),this.showScreenSet=this.identityAdapter.showScreenSet.bind(this.identityAdapter),this.showInlineScreenSet=this.identityAdapter.showInlineScreenSet.bind(this.identityAdapter),this.identityAdapter.onModalClosed.subscribe((function(e){return n.closedCallback.bind(n,e)()})),this.identityAdapter.onLoginSuccess.subscribe((function(t){return n.verifyAccountInfo(e,t)})),null===(t=this.identityAdapter.onLogoutSuccess)||void 0===t||t.subscribe(this.removeExternalJWT),[2]}}))}))},e.prototype.closedCallback=function(e){this.modalClosed.next(e)},e.prototype.loggedIn=function(e){this.loginSuccess.next(e)},e.prototype.verifyAccountInfo=function(e,t){return(0,r.sH)(this,void 0,void 0,(function(){var n;return(0,r.YH)(this,(function(i){switch(i.label){case 0:return[4,(0,this.pianoEndpoints[e].verify)(t)];case 1:return(n=i.sent()).access&&this.loginSuccess.next({token:n.access.user_token,user:{uid:n.access.user.uid,email:n.access.user.email,firstName:n.access.user.first_name,lastName:n.access.user.last_name}}),[2]}}))}))},e.prototype.pianoCallApi=function(e,t){return(0,r.sH)(this,void 0,Promise,(function(){return(0,r.YH)(this,(function(n){return[2,new Promise((function(n,i){try{window.tp.api.callApi(e,t,(function(e){e.code>0?i(new Error("Piano API failure: ".concat(JSON.stringify(e)))):n(e)}))}catch(e){i(e)}}))]}))}))},e.prototype.setExternalJWT=function(){var e=localStorage.getItem(f);e&&window.tp.push(["init",function(){window.tp.push(["setExternalJWT",e])}])},e.prototype.removeExternalJWT=function(){localStorage.getItem(f)&&localStorage.removeItem(f),window.tp.push(["setExternalJWT",null])},e}()},9930:function(e,t,n){"use strict";var i;n.d(t,{j:function(){return i}}),function(e){e[e.signIn=0]="signIn",e[e.forgotPassword=1]="forgotPassword",e[e.resetPasswordRequestCode=2]="resetPasswordRequestCode",e[e.register=3]="register"}(i||(i={}))},83414:function(e,t,n){"use strict";var i=n(58932),r=n(12010),o=n(13302),a=n(43125),s=n(7368),u=n(47027),c=n(96397),l={viewModel:function(){function e(e){var t=this;this.validateParameters(e),this.dateRangeDropDownOptions=e.dateRangeDropDownOptions,this.maxIssuesPerRow=e.maxIssuesPerRow,this.maxPreviousIssues=e.maxPreviousIssues,this.publications=e.publications.map((function(e){return e.cid=e.cid.toLowerCase(),e})),this.thumbnailWidth=e.thumbnailWidth,this.weekdaysClasses=e.weekdaysClasses,this.dateRangeInDays=r.observable(),this.loadMoreCounter=r.observable(1),this.previousIssues=r.observableArray([]),this.previousIssuesGroupedByDate=r.observableArray([]),this.oldestIssueDate=r.computed((function(){if(isNaN(Number(t.dateRangeInDays())))return new Date(0);var e=new Date;return e.setDate(e.getDate()-t.dateRangeInDays()*t.loadMoreCounter()),e})),this.numberOfPreviousIssuesLoaded=r.computed((function(){var e=(0,o.filter)(t.previousIssuesGroupedByDate(),(function(e){return e.date>=t.oldestIssueDate()})),n=0;return(0,o.forEach)(e,(function(e){(0,o.forEach)(e.rows,(function(e){n+=e.previousIssues.length}))})),n})),this.showingResultsText=r.computed((function(){return"Showing 1 - ".concat(t.numberOfPreviousIssuesLoaded()," of ").concat(t.previousIssues().length," results")})),this.isLoadLessButtonVisible=r.computed((function(){return t.loadMoreCounter()>1})),this.isLoadMoreButtonVisible=r.computed((function(){return t.numberOfPreviousIssuesLoaded()4)throw new Error("'maxIssuesPerRow' must be between 1 and 4.");if(!e.maxPreviousIssues)throw new Error("'maxPreviousIssues' was not specified.");if(e.maxPreviousIssues<=0)throw new Error("'maxPreviousIssues' must be greater than 0.");if(!e.publications)throw new Error("'publications' was not specified.");if(0===e.publications.length)throw new Error("'publications' is empty.");if((0,o.forEach)(e.publications,(function(e){if(!e.cid||!e.editionName)throw new Error("'publication.cid' or 'publication.editionName' is not defined.")})),e.thumbnailWidth<=0)throw new Error("'thumbnailWidth' must be greater than 0.");if(!e.weekdaysClasses)throw new Error("'weekdaysClasses' was not specified.");if(0===e.weekdaysClasses.length)throw new Error("'weekdaysClasses' is empty.");(0,o.forEach)(e.weekdaysClasses,(function(e){if(0!==e.weekday&&!e.weekday||!e.class)throw new Error("'weekdaysClasses.weekday' or 'weekdaysClasses.class' is not defined.")}))},e}(),template:'\n \n \n \n\n

\n \x3c!-- ko if: $data.date >= $component.oldestIssueDate() --\x3e\n
\n
\n
\n

\n
\n
\n \x3c!-- ko foreach: $data.rows --\x3e\n
\n \x3c!-- ko foreach: $data.previousIssues --\x3e\n \n \x3c!-- /ko --\x3e\n
\n \x3c!-- /ko --\x3e\n
\n
\n
\n \x3c!-- /ko --\x3e\n
\n \n \n \x3c!-- ko if: isLoadLessButtonVisible --\x3e\n \n \x3c!-- /ko --\x3e\n \x3c!-- ko if: isLoadMoreButtonVisible --\x3e\n \n \x3c!-- /ko --\x3e\n '},d="previous-issues-thumbnails-grouped";r.components.isRegistered(d)||r.components.register(d,l)},78413:function(e,t,n){"use strict";var i=n(58932),r=n(12010),o=n(13302),a=n(7368),s=n(47027),u=(n(48326),n(60798)),c={viewModel:function(){function e(e){if(!e.cid)throw new Error("'cid' was not specified.");if(e.maxPreviousIssues<=0)throw new Error("'maxPreviousIssues' must be greater than 0.");if(e.thumbnailWidth<=0)throw new Error("'thumbnailWidth' must be greater than 0.");this.cid=e.cid,this.maxPreviousIssues=e.maxPreviousIssues,this.thumbnailWidth=e.thumbnailWidth,this.previousIssues=r.observableArray([]),this.slug=r.observable(),this.init()}return e.prototype.init=function(){var e=this;Promise.all([(0,s.jW)(this.cid),u.A.load(this.cid)]).then((function(t){var n=(0,i.zs)(t,1)[0];e.slug(n.slug);var r=u.A.getIssuesDates().slice(0,e.maxPreviousIssues);(0,o.forEach)(r,(function(t){var n=(0,a.TK)(e.cid,t,e.thumbnailWidth),i=parseInt(t.substr(0,4),10),r=parseInt(t.substr(4,2),10)-1,o=parseInt(t.substr(6,2),10),s={issueDateString:t,issueDateStringFormatted:new Date(i,r,o).toDateString(),issueUrl:"/".concat(e.slug(),"/").concat(t),thumbnailUrl:n};e.previousIssues.push(s)}))}))},e}(),template:'\n
\n \n \n \n

\n
\n'},l="previous-issues-thumbnails";r.components.isRegistered(l)||r.components.register(l,c)},65458:function(e,t,n){"use strict";var i=n(12010),r=n(16213),o=n(70973),a={init:function(e,t){var n=t(),i=n.domEvents?n.domEvents.split(","):[];i.length?isNaN((null==n?void 0:n.value)||0)?r.A.log("[analyticsEvent] Invalid value parameter for element ".concat(e)):i.forEach((function(t){r.A.log("[analyticsEvent] Registering analyticsEvent for DOM event '".concat(t,"' on element ").concat(e)),e.addEventListener(t,(function(i){r.A.log("[analyticsEvent] Executing DOM event '".concat(t,"' on element ").concat(e," with data ").concat(i)),o.z.event({category:(null==n?void 0:n.category)||"DOM",action:(null==n?void 0:n.action)||t,label:(null==n?void 0:n.label)||"",value:+(null==n?void 0:n.value)||0})}))})):r.A.log("[analyticsEvent] Not DOM events defined for element ".concat(e))}};i.bindingHandlers.analyticsEvent=a},65665:function(e,t,n){"use strict";n(12010).bindingHandlers.attrAsync={init:function(e,t){var n=t();Object.keys(n).forEach((function(t){if(!n[t]||"function"!=typeof n[t].then)throw new Error("The function bound to '".concat(t,"' does not return a Promise. Use 'attr' binding instead."));n[t].then((function(n){e[t]=n}))}))}}},69216:function(e,t,n){"use strict";n.d(t,{D:function(){return s}});var i,r=n(58932),o=n(15397),a=n(8697);function s(){return i||(i=(0,r.sH)(this,void 0,void 0,(function(){var e,t;return(0,r.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,o.sK)()];case 1:return n.sent(),(e=(0,o.Ct)("Authentication.ExternalAuthenticationProvider",""))?[4,(t=a.A.create(e)).load()]:[3,3];case 2:return n.sent(),[2,t];case 3:return[2,null]}}))}))),i}},25118:function(e,t,n){"use strict";n.r(t);var i=n(58932),r=n(27189),o=n(46977),a=n(95952),s=n(44260),u=function(e){return void 0===e&&(e=""),(0,o.A)().show(s.Ay.val("Errors.PrintingNotSupportedByBrowser","This browser doesn't support printing, use another browser if you want to use this feature.")+e)},c=function(e,t){for(var n=[],r=2;rt}))})),b={_getThumbUrl:function(){return(v.A.get("imageServers.thumbs")||[])[0]},getThumbUrlByRegionKey:function(e,t,n,i){var r=this._getThumbUrl();return r?r+"?regionKey="+e+"&file="+t+"&scale="+n+(i?"&ver="+i:""):null},getThumbUrlByCidForWidth:function(e,t,n,i){var r=this._getThumbUrl(),o="";return r?(i&&y.support.retina&&(t*=2,o="&retina=2"),t=parseInt(t,10)||160,r+"?cid="+e+"&page="+(n||1)+"&width="+(t=this._adjustPageImageWidth(t))+o):null},getThumbUrlByCidForHeight:function(e,t,n){var i=this._getThumbUrl();return i?i+"?cid="+e+"&page="+(n||1)+"&height="+t:null},getThumbUrlByCidAndDateForHeight:function(e,t,n,i,r){var o=this._getThumbUrl();if(!o)return null;if("string"!=typeof t){var a=t.getMonth()+1,s=t.getDate();t=t.getFullYear()+(a<10?"0":"")+a+(s<10?"0":"")+s}return r&&y.support.retina&&(n*=2,n+="&retina=2"),o+"?cid="+e+"&date="+t+"&page="+(i||1)+"&height="+n},getThumbUrlByIssueForWidth:function(e,t,n,i){var r=this._getThumbUrl();if(!r)return null;var o="";return t=parseInt(t,10)||160,i&&y.support.retina&&(t*=2,o="&retina=2"),r+"?file="+e+"&page="+(n||1)+"&width="+(t=this._adjustPageImageWidth(t))+o},getFirstPageThumbUrlByIssueForWidth:function(e,t,n,i){var r=this._getThumbUrl();if(!r)return null;var o="";return t=parseInt(t,10)||160,i&&y.support.retina&&(t*=2,o="&retina=2"),r+"?file="+e+"&page="+(n||1)+"&width="+(t=this._adjustFirstPageImageWidth(t))+o},getThumbUrlByIssueForHeight:function(e,t,n,i){var r=this._getThumbUrl();if(!r)return null;var o="";return t=parseInt(t,10),i&&y.support.retina&&(t*=2,o="&retina=2"),r+"?file="+e+"&page="+(n||1)+"&height="+(t=this._adjustPageImageHeight(t))+o},getThumbUrlForScale:function(e,t,n,i){var r=this._getThumbUrl();return r?r+"?file="+e+"&page="+(n||1)+"&scale="+t+(i?"&ver="+i:""):null},getPictureUrlByIssueForScale:function(e,t,n,i,r){var o=this._getThumbUrl();return o?o+"?regionguid="+t+"&scale="+i+"&file="+e+"&regionKey="+n+(r?"&ver="+r:""):null},getPageImageUrl:function(e,t,n,i,r){var o=this._calculateZoom(t,n,i.width,i.height);if(!o)return null;var a=(v.A.get("imageServers.pages")||[])[0];return a?a+"?file="+e+"&page="+t+"&scale="+o+(r?"&layer="+r:""):null},getPageImageScale:function(e,t,n){return this._calculateZoom(e,t,n.width,n.height)},_calculateZoom:function(e,t,n,i){var r=t.width/100,o=t.height/100;if(n&&n>0)var a=Math.floor(n/r);if(i&&i>0)var s=Math.floor(i/o);var u=v.A.get("pageSizes.pageSizes")||[],c=v.A.get("pageSizes.firstPageSizes")||[],l=[u];1==e&&l.push(c);var d=0;if(a)for(var h=0;h=0;f--)!(_=m[f].w)||_>n||(y=Math.floor(_/r))>a||(g=m[f].h)&&(y=Math.min(y,Math.floor(g/o)))>a||(d=Math.max(d,y));var p=0;if(s)for(h=0;h=0;f--){var g,y,_;!(g=m[f].h)||g>i||(y=Math.floor(g/o))>s||(_=m[f].w)&&(y=Math.min(y,Math.floor(_/r)))>s||(p=Math.max(p,y))}}return Math.min(d||p,p||d)},_adjustPageImageWidth:function(e){var t=e,n=(v.A.get("pageSizes.pageSizes")||[]).filter((function(e){return e.w>0}));if(!(0,o.isEmpty)(n)){var i=(0,o.find)(n,(function(t){return t.w>e}));t=i?i.w:(0,o.last)(n).w}return t},_adjustFirstPageImageWidth:function(e){var t=e,n=v.A.get("pageSizes.pageSizes")||[],i=v.A.get("pageSizes.firstPageSizes")||[],r=_(n,i);(0,o.isEmpty)(r)||(t=(0,o.find)(r,(function(t){return t>e}))||(0,o.last)(r));return t},_adjustPageImageHeight:function(e){var t=e,n=(v.A.get("pageSizes.pageSizes")||[]).filter((function(e){return e.h>0}));if(!(0,o.isEmpty)(n)){var i=(0,o.find)(n,(function(t){return t.h>e}));t=i?i.h:(0,o.last)(n).h}return t}},w=(n(96723),n(29583)),C=function(){function e(e,t,n){if(t>0&&e.Width>0){var i=100*t/e.Width;return Math.min(i,n)}return 0}function t(e,t,n){if(t>0&&e.Height>0){var i=100*t/e.Height;return Math.min(i,n)}return 0}return w.nd.imageSource={getPictureUrlByIssueForWidth:function(e,t,n,i,r){var o=Math.floor(100*r/i);return this.getPictureUrlByIssueForScale(e,t,n,o)},getPictureUrlByIssueForHeight:function(e,t,n,i,r){var o=Math.floor(100*r/i);return this.getPictureUrlByIssueForScale(e,t,n,o)},getPictureUrlByIssueForSize:function(e,t,n,i,r){var o=i.width||i.Width,a=r.width||r.Width,s=i.height||i.Height,u=r.height||r.Height,c=Math.floor(100*a/o),l=Math.floor(100*u/s);return this.getPictureUrlByIssueForScale(e,t,n,Math.min(c,l))},getPictureUrlByIssueForScale:function(e,t,n,i,r){return e.issue&&(e=e.issue),b.getPictureUrlByIssueForScale(e,t,n,i,r)},getThumbUrlByIssueForWidth:function(e,t,n,i){return e.issue&&(e=e.issue),b.getThumbUrlByIssueForWidth(e,t,n,i)},getFirstPageThumbUrlByIssueForWidth:function(e,t,n,i){return e.issue&&(e=e.issue),b.getFirstPageThumbUrlByIssueForWidth(e,t,n,i)},getThumbUrlByIssueForHeight:function(e,t,n,i){return e&&e.issue&&(e=e.issue),b.getThumbUrlByIssueForHeight(e,t,n,i)},getThumbUrlByCidForWidth:function(e,t,n,i){if(e){if(e.cid){var r=e;if(r.issueInfo)return this.getThumbUrlByIssueForWidth(r.issueInfo,t,n,i);e=r.cid}return b.getThumbUrlByCidForWidth(e,t,n,i)}return null},getThumbUrlByCidForHeight:function(e,t){if(e){if(e.cid){var n=e;if(n.issueInfo)return this.getThumbUrlByIssueForHeight(n.issueInfo,t);e=n.cid}return b.getThumbUrlByCidForHeight(e,t)}return null},getThumbUrlByCidAndDateForHeight:function(e,t,n,i){return b.getThumbUrlByCidAndDateForHeight(e,t,n,1,i)},getThumbUrlForScale:function(e,t,n,i){return b.getThumbUrlForScale(e,t,n,i)},getPageImageUrlByPageInfo:function(e,t,n){return this.getPageImageUrl(e,t.pageNumber,t,n)},getPageImageUrl:function(e,t,n,i,r){return b.getPageImageUrl(e,t,n,i,r)},getPageImageScale:function(e,t,n){return b.getPageImageScale(e,t,n)},getThumbUrlByRegionKey:function(e,t,n,i){return b.getThumbUrlByRegionKey(e,t,n,i)},getFirstImage:function(n){var i=null;if(n)for(var r=0;r10||o.Width/o.Height>10)){var a=o.Width/o.Height;if(a>.7&&a<2){var s=e(o,600,400),u=t(o,120,400);if(s<=0||u<=0)continue;if(null==i){i=o;continue}if(o.Width>i.Width||o.Height>i.Height){i=o;continue}}}}return i}}}(),A=n(22537),I=n(47470),S=n(16343),P=n(65678),x=n(44260),T=(n(2293),n(25118)),k=n(95952),E=n(50911),M=n(73814),D=n(70989),N=n(55383),L=(0,a.Ct)("features.print.ios.scale",.9),V={};function R(e){return e?(0,o.unescape)(e.replace(/(\r\n|\n|\r)/gm," ")):e}function H(e,t,n){T.default.print(n,(function(n,i){x.Ay.templates.renderTo(e,t,n),i()}))}function F(e,t,n){if(t>0&&e.Width>0){var i=100*t/e.Width;return Math.min(i,n)}return 0}function B(e,t,n){if(t>0&&e.Height>0){var i=100*t/e.Height;return Math.min(i,n)}return 0}function z(e,t){var n;t||(t=event),t.target?n=r(t.target):t.srcElement&&(n=t.srcElement);var i=n.parent();i.width(n.width()),i.height(n.height())}function O(e){return new Promise((function(t,n){var i=new Image(e.W,e.H);i.onload=function(){return t(i)},i.onerror=n,i.src=e.Src}))}function j(e,t){(0,k.jF)();var n=document.createElement("div");n.classList.add(k.rg);var i=document.title;return Promise.all(e.map(O)).then((function(e){e.forEach((function(t,i){var r;n.appendChild(t),i0)for(var i=0;i10||a.Width/a.Height>10)){var s=a.Width/a.Height;if(s>.7&&s<2){var u=F(a,600,400),c=B(a,120,400);if(u<=0||c<=0)continue;if(null==n){n=a;continue}if(a.Width>n.Width||a.Height>n.Height){n=a;continue}}}}t.firstImage=n,n?((a=new Image).src=n.Url,r(a).load((function(){H("Print.ArticleText",t,e.Title)}))):H("Print.ArticleText",t,e.Title)}},V.printPage=function(e,t,n,r){return(0,i.sH)(this,void 0,void 0,(function(){var o,a,s=this;return(0,i.YH)(this,(function(u){switch(u.label){case 0:return n=n&&n.issue&&n.issue()||n||e.Issue.Id,o=t.map((function(t){return t||e.Page&&e.Page.number||e.Page})).sort((function(e,t){return e-t})),[4,f(n,o)];case 1:return u.sent(),E.A.onPrint((function(t,a){return(0,i.sH)(s,void 0,void 0,(function(){var t,s;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return t=o.map((function(e){return d(n,e,a.paperSize,a.scale,a.scaleToLandscape)})),[4,Promise.all(t)];case 1:return s=i.sent(),(S.j.iPad||S.j.iPhone)&&s.forEach((function(e){e.H*=L,e.W*=L})),[4,j(s,r||e.Title)];case 2:return i.sent(),[2]}}))}))})),a=o.map((function(e){return{url:(0,m.Fv)(n,180,e),imgLoaded:z}})),E.A.show({thumbs:a}),[2]}}))}))};var U=V,W=(0,a.Ct)("features.print.ios.scale",.9),Y=[2];function X(e){return e?(0,o.unescape)(e.replace(/(\r\n|\n|\r)/gm," ")):e}function q(e,t,n){if(t>0&&e.Width>0){var i=100*t/e.Width;return Math.min(i,n)}return 0}function G(e,t,n){if(t>0&&e.Height>0){var i=100*t/e.Height;return Math.min(i,n)}return 0}function K(e,t){var n;t||(t=event),t.target?n=r(t.target):t.srcElement&&(n=t.srcElement);var i=n.parent();i.width(n.width()),i.height(n.height())}function J(e){return new Promise((function(t,n){var i=new Image(e.W,e.H);i.onload=function(){return t(i)},i.onerror=function(){return n(new Error("Image Load Error: "+e.Src))},i.src=e.Src}))}function Q(e,t){return(0,i.sH)(this,void 0,void 0,(function(){var n=this;return(0,i.YH)(this,(function(r){return[2,T.default.print(t,(function(t){return(0,i.sH)(n,void 0,void 0,(function(){var n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,,2,3]),[4,Promise.all(e.map(J))];case 1:return(n=i.sent()).forEach((function(e,i){var r;t.appendChild(e),i0)for(o=0;o10||a.Width/a.Height>10)&&(s=a.Width/a.Height)>.7&&s<2){if(u=q(a,600,400),c=G(a,120,400),u<=0||c<=0)continue;if(null==n){n=a;continue}if(a.Width>n.Width||a.Height>n.Height){n=a;continue}}return t.firstImage=n,[4,n?new Promise((function(e,t){var i=new Image;i.onload=e,i.onerror=t,i.src=n.Url})):Promise.resolve()];case 1:return i.sent(),function(e,t,n){T.default.print(n,(function(e){return x.Ay.templates.renderTo("Print.ArticleText",t,r(e))}))}(0,t,e.Title),[2]}}))}))},printCustomArea:function(e,t,n){return(0,i.sH)(this,void 0,void 0,(function(){var r,o,a=this;return(0,i.YH)(this,(function(s){switch(s.label){case 0:return t=t||e.Page,[4,f(n=n&&n.issue&&n.issue()||n||e.Issue.Id,[t])];case 1:return(r=s.sent())?[4,(0,g.A)().show(r,"",x.Ay.val("Buttons.Ok.Text"),!0)]:[3,3];case 2:s.sent(),s.label=3;case 3:return o=new Promise((function(r,o){M.A.onPrint((function(s,u){return(0,i.sH)(a,void 0,void 0,(function(){var a,s,c=this;return(0,i.YH)(this,(function(d){switch(d.label){case 0:E.A.onPrint((function(o,a){return(0,i.sH)(c,void 0,void 0,(function(){return(0,i.YH)(this,(function(i){switch(i.label){case 0:N.Ay.show(),i.label=1;case 1:return i.trys.push([1,,4,5]),[4,l(n,t,a.paperSize,u.top,u.left,u.width,u.height,a.scale,a.scaleToLandscape)];case 2:return[4,Q([i.sent()],e?e.Title:"")];case 3:return i.sent(),[3,5];case 4:return N.Ay.hide(),[7];case 5:return r(),[2]}}))}))})),E.A.onCancel((function(){o()})),a=[],N.Ay.show(),d.label=1;case 1:return d.trys.push([1,,3,4]),[4,l(n,t,"Thumbnail",u.top,u.left,u.width,u.height,!1,!1)];case 2:return s=d.sent(),a.push({url:s.Src,imgLoaded:K}),E.A.show({thumbs:a}),[3,4];case 3:return N.Ay.hide(),[7];case 4:return[2]}}))}))})),M.A.onCancel((function(){o()}))})),A.Ay.root().topPanel().show(),M.A.show(t),[2,o]}}))}))},printCustomAreaV1:U.printCustomAreaV1,printEntireIssue:function(e,t,n){return(0,i.sH)(this,void 0,void 0,(function(){var r,o,a=this;return(0,i.YH)(this,(function(s){switch(s.label){case 0:return t=t&&t.issue&&t.issue()||t||e.Issue.Id,n=n||e&&e.Title||"",[4,f(t,Y)];case 1:return(r=s.sent())?[4,(0,g.A)().show(r,"",x.Ay.val("Buttons.Ok.Text"),!0)]:[3,3];case 2:s.sent(),s.label=3;case 3:return o=new Promise((function(e,r){E.A.onPrint((function(r,o){return(0,i.sH)(a,void 0,void 0,(function(){return(0,i.YH)(this,(function(i){switch(i.label){case 0:E.A.hide(),N.Ay.show(),i.label=1;case 1:return i.trys.push([1,,4,5]),[4,h(t,o.paperSize,o.scale,o.scaleToLandscape)];case 2:return[4,Q(i.sent(),n)];case 3:return i.sent(),[3,5];case 4:return N.Ay.hide(),[7];case 5:return e(),[2]}}))}))})),E.A.onCancel((function(){r()}))})),E.A.showWarning(),[2,o]}}))}))},printPage:function(e,t,n,r){return(0,i.sH)(this,void 0,void 0,(function(){var o,a,s,u,c=this;return(0,i.YH)(this,(function(l){switch(l.label){case 0:return n=n&&n.issue&&n.issue()||n||e.Issue.Id,o=t.map((function(t){return t||e.Page&&e.Page.number||e.Page})).sort((function(e,t){return e-t})),[4,f(n,o)];case 1:return(a=l.sent())?[4,(0,g.A)().show(a,"",x.Ay.val("Buttons.Ok.Text"),!0)]:[3,3];case 2:l.sent(),l.label=3;case 3:return s=new Promise((function(t,a){E.A.onPrint((function(a,s){return(0,i.sH)(c,void 0,void 0,(function(){var a,u;return(0,i.YH)(this,(function(i){switch(i.label){case 0:N.Ay.show(),i.label=1;case 1:return i.trys.push([1,,4,5]),a=o.map((function(e){return d(n,e,s.paperSize,s.scale,s.scaleToLandscape)})),[4,Promise.all(a)];case 2:return u=i.sent(),(S.j.iPad||S.j.iPhone)&&u.forEach((function(e){e.H*=W,e.W*=W})),[4,Q(u,r||e.Title)];case 3:return i.sent(),[3,5];case 4:return N.Ay.hide(),[7];case 5:return t(),[2]}}))}))})),E.A.onCancel((function(){a()}))})),u=o.map((function(e){return{url:(0,m.Fv)(n,180,e),imgLoaded:K}})),E.A.show({thumbs:u}),[2,s]}}))}))}}},29684:function(e,t,n){"use strict";n.d(t,{H:function(){return s}});var i=n(58932),r=n(13302),o=n(27189),a=n(35765);function s(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return[4,o.A.loaded()];case 1:return n.sent(),e=o.A.get("CDNResources")||[],t=(0,r.map)((0,r.filter)(e,(function(e){return e.enabled})),(function(e){return(0,a.R)(e.src,(0,i.Cl)({async:e.async},e))})),[4,Promise.all(t)];case 2:return n.sent(),[2]}}))}))}},28067:function(e,t,n){"use strict";n.d(t,{bJ:function(){return A}});var i=n(58932),r=n(13302),o=n(12030),a=n(26906),s=n(43125),u=n(65678),c=n(73035),l=n(27189),d=n(84901),h=n(39022),f=n(16213),p=n(67303),m=n(60102),g=n(44080),v=n(51352),y=n(64609);function _(e){return e.latest?function(){return(0,i.sH)(this,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,o.Px)({orderBy:{name:a.Xy.LatestIssueDate,order:a.xB.Descending},limit:1})];case 1:return[2,(null==(e=t.sent())?void 0:e.items)&&e.items.length>0?{newspaper:e.items[0].slug,cid:e.items[0].cid}:{}]}}))}))}():e.cid?Promise.resolve({cid:e.cid}):e.issue?Promise.resolve({cid:(0,s.qT)(e.issue)}):e.newspaper?(0,c.vG)(e.newspaper):e.articleId?(0,c.jd)(e.articleId):l.A.getAsync("catalog.MasterCid").then((function(e){return e?Promise.resolve({cid:e}):Promise.reject()}))}function b(e){h.A.update(e);var t=new URLSearchParams(window.location.search);if(t.has("token")){t.delete("token");var n=d.A.getState(),i=window.location.href.replace(window.location.search,"?".concat(t));d.A.replaceState(i,(0,r.extend)({},n.state,e))}return _(e).then((function(t){return e.cid=t.cid,p.A.show(e),e.commentKey&&e.articleId&&p.A.layoutLoaded((function(){y.A.show({articleId:e.articleId,markerCommentId:e.commentKey})})),Promise.resolve()}))}function w(e,t){return t.newspaper?b(t):function(e,t){return new Promise((function(n,i){var o=t.issue?(0,s.qT)(t.issue):t.cid;_(t).then((function(e){return e.publication?Promise.resolve(e):(0,c.WD)(e.cid)})).then((function(i){if(i.cid!==o){t.cid=i.cid;var a=d.A.getState(),u=window.location.href.replace(o,i.cid);d.A.replaceState(u,(0,r.extend)({},a.state,t))}t.newspaper=i.publication,i.cid&&(t.cid=i.cid),i.issueDate?t.issueDate=i.issueDate:t.issue&&(t.issueDate=(0,s.ph)(t.issue)),i.articleId&&(t.articleId=i.articleId),e.generateUrl(t).then((function(e){if(e){var i=d.A.getState();d.A.replaceState(e.url,(0,r.extend)({},i.state,t))}n(t)})).catch((function(e){f.A.error(e),n(t)}))})).catch(i)}))}(e,t).then((function(e){return b(e)}))}var C=!1;function A(e){C||(C=!0,(0,g.U)(e,{executeWith:function(t){return w(e,t)}}),(0,v.U)(e,{executeWith:function(t){return w(e,t)}}),(0,m.b)(e,{viewName:u.lP.ReadingMap,executeWith:function(t){return w(e,t)}}))}},14265:function(e,t,n){"use strict";var i=n(13981),r=n(27602),o=n(65678),a=n(27189);t.A={goHome:function(){(0,i.JD)((0,r.sh)({viewName:o.lP.TextView,params:{cid:a.A.get("catalog.MasterCid")}}))}}},41613:function(e,t,n){"use strict";var i,r=n(43125),o=n(82788),a=n(6176),s=n(67303),u=n(70973),c="NewspaperView",l=((i={})[a.wf.ActivePageChanged]="activepagechanged",i[a.wf.PageDoubleClicked]="pagedoubleclick",i[a.wf.PageViewZoomChanging]="zoomChanging",i[a.wf.PageViewPinch]="pinch",i[a.wf.PageViewPan]="pan",i[a.wf.PageViewZoomChanged]="zoom",i[a.wf.PageViewExternalLink]="externallink",i[a.wf.PageView]="pageview",i);o.X.ofType(a.wf.PageView).subscribe((function(e){var t={cid:s.A.cid(),issueDate:(0,r.M6)(s.A.issue()),pageNumber:e.payload.pageNumber};u.z.pageView({page:"".concat(window.location.pathname.replace(/(\/\d{8}).*|(\/pageview).*/,""),"/").concat(t.issueDate.replace(/-/g,""),"/page/").concat(t.pageNumber),context:t})})),o.X.ofType(a.wf.ActivePageChanged,a.wf.PageDoubleClicked,a.wf.PageViewZoomChanging,a.wf.PageViewPinch,a.wf.PageViewPan).subscribe((function(e){var t={cid:s.A.cid(),issueDate:(0,r.M6)(s.A.issue()),pageNumber:e.payload.pageNumber},n=l[e.type];u.z.event({category:c,action:n,label:"".concat(t.issueDate,"/").concat(e.payload.pageNumber),context:t})})),o.X.ofType(a.wf.PageViewZoomChanged).subscribe((function(e){var t=Number(e.payload.scale);if(t>1){var n={cid:s.A.cid(),issueDate:(0,r.M6)(s.A.issue()),pageNumber:e.payload.pageNumber,zoomFactor:t},i=l[e.type];u.z.event({category:c,action:i,context:n})}})),o.X.ofType(a.wf.PageViewExternalLink).subscribe((function(e){return u.z.event({category:c,action:l[e.type],label:e.payload.target})}))},69733:function(e,t,n){"use strict";var i,r=n(82788),o=n(70973),a=n(84215),s=n(65795),u=((i={})[s.wf.AddPaymentInfo]=a.a.AddPaymentInfo,i[s.wf.AddToCart]=a.a.AddToCart,i[s.wf.BeginCheckout]=a.a.BeginCheckout,i[s.wf.CheckoutProgress]=a.a.CheckoutProgress,i[s.wf.PromoClick]=a.a.SelectContent,i[s.wf.Purchase]=a.a.Purchase,i[s.wf.RemoveFromCart]=a.a.RemoveFromCart,i[s.wf.SetCheckoutOption]=a.a.SetCheckoutOption,i);r.X.ofType(s.wf.AddPaymentInfo,s.wf.AddToCart,s.wf.BeginCheckout,s.wf.CheckoutProgress,s.wf.PromoClick,s.wf.Purchase,s.wf.RemoveFromCart,s.wf.SetCheckoutOption).subscribe((function(e){o.z.transaction({data:e.payload,type:u[e.type]})}))},65795:function(e,t,n){"use strict";n.d(t,{Aq:function(){return c},Gy:function(){return l},UA:function(){return s},eP:function(){return d},nt:function(){return u},wf:function(){return i},xS:function(){return h}});var i,r=n(58932);!function(e){e.AddPaymentInfo="[Ecommerce] Add Payment Info",e.AddToCart="[Ecommerce] Add to Cart",e.BeginCheckout="[Ecommerce] Begin Checkout",e.CheckoutProgress="[Ecommerce] Checkout Progress",e.PromoClick="[Ecommerce] Select Content / Promotion Click",e.Purchase="[Ecommerce] Purchase",e.RemoveFromCart="[Ecommerce] Remove from Cart",e.SetCheckoutOption="[Ecommerce] Set Checkout Option",e.PurchaseCompleted="[Purchase] PurchaseCompleted"}(i||(i={}));var o,a=function(e){this.payload=e},s=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.AddPaymentInfo,t}return(0,r.C6)(t,e),t}(a),u=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.AddToCart,t}return(0,r.C6)(t,e),t}(a),c=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.BeginCheckout,t}return(0,r.C6)(t,e),t}(a),l=(o=a,(0,r.C6)((function(){var e=o.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return e.type=i.CheckoutProgress,e}),o),function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.PromoClick,t}return(0,r.C6)(t,e),t}(a)),d=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.Purchase,t}return(0,r.C6)(t,e),t}(a),h=(function(e){(0,r.C6)((function(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.RemoveFromCart,t}),e)}(a),function(e){(0,r.C6)((function(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.SetCheckoutOption,t}),e)}(a),function(e){this.payload=e,this.type=i.PurchaseCompleted})},82402:function(e,t,n){"use strict";var i=n(22410);n(1255),n(6054),n(70783),n(74513),n(36028),n(82911),n(5838),n(91637),n(48325),n(82267),n(55194),n(70581),n(73900),i.yU.prototype.dispose=function(){return console.trace&&console.trace("RXJS.Subscription.dispose() is obsolete. Please use .unsubscribe() instead."),i.yU.prototype.unsubscribe.apply(this,arguments)}},45221:function(e,t,n){"use strict";var i=n(84832);t.A=i},445:function(e,t,n){"use strict";var i=n(85461);t.A=i},56096:function(e,t,n){"use strict";var i=n(15451);t.A=i},42022:function(e,t,n){"use strict";var i;n.d(t,{e:function(){return r},w:function(){return i}}),function(e){e.SidebarMenu="[ContextMenu] SidebarMenu"}(i||(i={}));var r=function(e){this.payload=e,this.type=i.SidebarMenu}},68092:function(e,t,n){"use strict";n.d(t,{z:function(){return i.z}});var i=n(13834);n(9702)},9702:function(e,t,n){"use strict";var i=n(58932),r=n(53308),o=n(82788),a=n(65795);function s(e,t){var n=new URL("".concat(window.location.origin).concat(window.basePath,"Subscription/").concat(e)),i=new URLSearchParams(n.search);return i.append("promoCode",t),(0,r.lx)({url:"".concat(n,"?").concat(i),requestConfig:{cache:"no-store"}})}t.A={validatePromoCode:function(e){return(0,i.sH)(void 0,void 0,void 0,(function(){var t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return e.trim()?[4,s("ValidatePromoCode",e)]:[2,Promise.resolve({isValid:!1})];case 1:return(t=n.sent())&&t.isValid&&function(e){var t=[{id:"PromoCode",name:e}];o.X.send(new a.Gy({promotions:t}))}(e),[2,t]}}))}))},getPromoSubscriptions:function(e){return s("GetPromoSubscriptions",e)}}},13834:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var i=n(83534),r=(0,n(1435).J)({expire:5e3});function o(){var e="CurrentSubscription",t=r.get(e);return t||(t=(0,i.zN)(),r.set(e,t)),t}},93134:function(e,t,n){"use strict";var i;n.d(t,{$4:function(){return c},FV:function(){return m},GM:function(){return o},Ij:function(){return h},J$:function(){return s},ME:function(){return u},Nw:function(){return r},Ok:function(){return d},U1:function(){return a},XO:function(){return l},Y5:function(){return g},cm:function(){return p},hm:function(){return f},wf:function(){return i}}),function(e){e.ArticleExpandRequested="[TextView] ArticleExpandRequested",e.ArticleOpened="[TextView] ArticleOpened",e.ArticleViewed="[TextView] ArticleViewed",e.ArticleExpanded="[TextView] ArticleExpanded",e.PageChanged="[TextView] PageChanged",e.CommonPageChanged="[TextView] CommonPageChanged",e.IssuePageChanged="[TextView] IssuePageChanged",e.SmartFlowAction="[TextView] SmartFlowAction",e.IssueTextViewAction="[TextView] IssueTextViewAction",e.SmartFlowClick="[TextView] Click",e.SmartFlowDoubleClick="[TextView] SmartFlowDoubleClick",e.SmartFlowReadMore="[TextView] SmartFlowReadMore",e.SmartFlowContextMenuRequested="[TextView] SmartFlowContextMenuRequested",e.SmartFlowPinch="[TextView] SmartFlowPinch",e.SmartFlowGesturesEnd="[TextView] SmartFlowGesturesEnd",e.SmartFlowGesturesStart="[TextView] SmartFlowGesturesStart",e.AdvertisementLoading="[TextView] AdvertisementLoading",e.AdvertisementLoaded="[TextView] AdvertisementLoaded",e.AdvertisementLoadFailed="[TextView] AdvertisementLoadFailed",e.AdvertisementGeneral="[TextView] AdvertisementGeneral",e.AdvertisementImpression="[TextView] AdvertisementImpression",e.ShowRelatedWithAd="[TextView] ShowRelatedWithAd",e.RelatedAdAvailable="[TextView] RelatedAdAvailable",e.TranslateArticle="[TextView] TranslateArticle",e.TranslateIssue="[TextView] TranslateIssue"}(i||(i={}));var r=function(e){this.payload=e,this.type=i.ArticleExpandRequested},o=function(e){this.payload=e,this.type=i.ArticleExpanded},a=function(e){this.payload=e,this.type=i.ArticleOpened},s=function(e){this.payload=e,this.type=i.ArticleViewed},u=function(e){this.payload=e,this.type=i.PageChanged},c=function(e){this.payload=e,this.type=i.CommonPageChanged},l=function(e){this.payload=e,this.type=i.IssuePageChanged},d=function(e){this.payload=e,this.type=i.SmartFlowAction},h=function(e){this.payload=e,this.type=i.IssueTextViewAction},f=function(){this.type=i.SmartFlowReadMore},p=function(){this.type=i.SmartFlowContextMenuRequested},m=function(e){this.payload=e,this.type=i.TranslateArticle},g=function(e){this.payload=e,this.type=i.TranslateIssue}},72638:function(e,t,n){"use strict";var i=n(12010),r=n(10358),o=n(44260),a=n(46977),s=n(16213),u=n(86699),c=n(56856),l=r.eV.ginormous,d=new c.A("user-pictures"),h=function(){function e(e){var t=this;if(this.isLoading=(0,i.observable)(!1),this.avatarHtml=(0,i.observable)(""),this.size=e.size||l,this.size.width<16)throw new Error("Specified width (".concat(e.size.width,") less than allowed ").concat(16));if(this.size.height<16)throw new Error("Specified height (".concat(e.size.height,") less than allowed ").concat(16));this.isAlterable=(0,i.isObservable)(e.alterable)?e.alterable:(0,i.observable)(!!e.alterable),this.nickname=(0,i.isObservable)(e.profile.nickname)?e.profile.nickname:(0,i.observable)(e.profile.nickname),this.photoUrl=(0,i.isObservable)(e.profile.photoUrl)?e.profile.photoUrl:(0,i.observable)(e.profile.photoUrl),this.avatarImageId=(0,i.isObservable)(e.profile.avatarImageId)?e.profile.avatarImageId:(0,i.observable)(e.profile.avatarImageId||""),this.isLoading=(0,i.observable)(!1);var n=function(){t.avatarHtml((0,r.tr)({nickname:t.nickname(),imageId:t.avatarImageId(),size:t.size,fallbackAvatarUrl:t.photoUrl()}))};this.nickname.subscribe(n),this.avatarImageId.subscribe(n),this.photoUrl.subscribe(n),this.deleteAvatarAvailable=ko.pureComputed((function(){return t.isAlterable()&&!t.isLoading()&&(""!==t.avatarImageId()||""!==t.photoUrl())})),n()}return e.prototype.changeAvatar=function(){var e=this;if(!this.isAlterable())throw new Error("User photo is not alterable.");return this.isLoading()?Promise.reject(new Error("Alter is not available at the moment.")):this.upload({onUploadStart:function(){e.isLoading(!0)}}).then((function(e){return(0,r.xG)(e.fileId)})).then((function(t){return e.avatarImageId(t.imageId),u.A.userStateChanged(),t.imageId})).catch((function(e){var t=e&&e.message?e.message:o.Ay.val("Errors.ErrorOccurred","An error occurred.");throw(0,a.A)().alert(t,o.Ay.val("Buttons.Ok.Text","OK"),!0),s.A.error(t),e})).finally((function(){e.isLoading(!1)}))},e.prototype.deleteAvatar=function(){var e=this;return this.isLoading(!0),(0,r.pJ)().then((function(){e.avatarImageId(""),e.photoUrl(""),u.A.userStateChanged()})).catch((function(e){throw(0,a.A)().alert(e.message||o.Ay.val("Errors.ErrorOccurred","An error occurred."),o.Ay.val("Buttons.Ok.Text","OK"),!0),e})).finally((function(){e.isLoading(!1)}))},e.prototype.dispose=function(){this.nickname=null,this.avatarImageId=null,this.isAlterable=null},e.prototype.upload=function(e){return void 0===e&&(e={}),d.upload(e)},e}(),f="userphoto",p={viewModel:{createViewModel:function(e){return new h(e)}},template:{ndTemplate:"v7.Client.UserPhoto.ko.Component"}};i.components.isRegistered(f)||i.components.register(f,p)},57351:function(e,t){"use strict";var n=function(){function e(){}return e.prototype.available=function(){return!0},e.prototype.enabled=function(){return!0},e}();t.A=n},98534:function(e,t,n){"use strict";n.d(t,{d:function(){return c}});var i=n(11786),r=n(37618),o=n(98874),a=n(23304),s=n(45840),u=(new i.UAParser).getResult(),c={deviceInfo:(0,r.l)(u),osInfo:(0,o.J)(u),browserInfo:(0,a.r)(u),sessionInfo:{id:(0,s.c)(),referrer:document.referrer}}},62454:function(e,t,n){"use strict";n.d(t,{lZ:function(){return l},LI:function(){return f},vY:function(){return i}});var i={};n.r(i),n.d(i,{addBannerComponent:function(){return a},getBannerComponent:function(){return o},removeBannerComponent:function(){return s}}),n(26858);var r={};function o(e){return r[e]}function a(e,t){r[e]=t}function s(e){delete r[e]}var u=n(31555),c=n(5059),l=c.memo((function(e){var t,n=null!==(t=e.position)&&void 0!==t?t:"bottom";return(0,u.jsx)("div",{className:"banner banner-".concat(n," ").concat(e.className||""),children:e.children})})),d=n(85387),h=n(25577),f=c.memo((function(){var e=(0,d.d4)(h.Nk),t=(0,d.d4)(h.Xp);if(!e)return null;if(0===t.length)return null;var n=t[0],i=o(n.bannerType);if(!i)throw new Error("BannerComponent for ".concat(n.bannerType," wasn't registered"));return(0,u.jsx)("div",{id:"snackbar-container",className:"banners-container",children:(0,u.jsx)(i,{data:n.data})})}))},84288:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});var i="app.banners"},26858:function(e,t,n){"use strict";var i,r=n(13981),o=n(74525),a=n(89404),s=(n(25577),n(84288)),u=n(58932),c=n(89103),l=n(97093),d=n(13302),h=n(43566),f={ready:!1,banners:[],history:{}};function p(e,t,n){var i=e.banners.findIndex((function(e){return e.bannerType===t})),r=n(-1===i?{bannerType:t,opened:!1,priority:Number.MAX_VALUE,lastClosedAt:null,data:null}:e.banners[i]),o=(0,u.fX)([],(0,u.zs)(e.banners),!1);return-1===i?o.push(r):o.splice(i,1,r),(0,u.Cl)((0,u.Cl)({},e),{banners:o})}var m=(0,c.vy)(f,((i={})[a.X2.BannersReady]=function(e){return(0,u.Cl)((0,u.Cl)({},e),{ready:!0})},i["".concat(h.YC)]=function(e){return(0,u.Cl)((0,u.Cl)({},e),{banners:[],history:{}})},i[a.X2.BannerOpened]=function(e,t){var n=t.payload,i=n.bannerType,r=n.priority,o=n.data;return(e=p(e,i,(function(e){return(0,u.Cl)((0,u.Cl)({},e),{opened:!0,priority:null!=r?r:Number.MAX_VALUE,data:o})}))).ready||(e.banners=(0,d.orderBy)(e.banners,(function(e){return e.priority}),!0)),e},i[a.X2.BannerClosed]=function(e,t){var n,i=t.payload,r=i.bannerType,o=i.closedAt,a=(e=p(e,r,(function(e){return(0,u.Cl)((0,u.Cl)({},e),{opened:!1,lastClosedAt:o})}))).history;return t.payload.trackInHistory&&(a=(0,u.Cl)((0,u.Cl)({},e.history),((n={})[r]=o.getTime(),n))),(0,u.Cl)((0,u.Cl)({},e),{history:a})},i)),g=(0,l.z)((function(e){return{history:e.history}}),(function(e){e&&(f.history=e.history)})),v=n(44834);function y(e,t,n){var i,r,o,a,s;return(0,u.YH)(this,(function(u){switch(u.label){case 0:return[4,(0,v.s)(t)];case 1:i=u.sent(),u.label=2;case 2:return[4,(0,v.O4)([(0,v.cb)(e),(0,v.s)(t),(0,v.s)(n)])];case 3:return r=u.sent(),o=r[0],a=r[1],s=r[2],o?[2,i]:[3,4];case 4:return s?[4,(0,v.s)(t)]:[3,6];case 5:return i=u.sent(),[3,7];case 6:i=a,u.label=7;case 7:return[3,2];case 8:return[2]}}))}function _(){return(0,u.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,v.O4)({debounced:y(2e3,a.X2.BannerOpened,a.X2.BannersReady),timeout:(0,v.cb)(5e3)})];case 1:return e.sent(),[4,(0,v.yJ)((0,a.P$)({}))];case 2:return e.sent(),[2]}}))}function b(e){var t,n,i;return(0,u.YH)(this,(function(r){switch(r.label){case 0:return t=e.payload,n=t.bannerType,i=t.doNotTrack,[4,(0,v.yJ)((0,a.$D)({bannerType:n,closedAt:new Date,trackInHistory:!0!==i}))];case 1:return r.sent(),[2]}}))}r.bX.addFeature(s.R,m,(function(){return(0,u.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,v.Zy)(_)];case 1:return e.sent(),[4,(0,v.jP)(a.X2.CloseBanner,b)];case 2:return e.sent(),[2]}}))})),r.bX.addStoreStorage(o.N.Local,s.R,g)},89404:function(e,t,n){"use strict";n.d(t,{$D:function(){return s},P$:function(){return u},X2:function(){return i},Z$:function(){return a},q$:function(){return o}});var i,r=n(89103);!function(e){e.BannerOpened="banners/banner_opened",e.CloseBanner="banners/close_banner",e.BannerClosed="banners/banner_closed",e.BannersReady="banners/banners_ready"}(i||(i={}));var o=(0,r.lQ)(i.BannerOpened),a=(0,r.lQ)(i.CloseBanner),s=(0,r.lQ)(i.BannerClosed),u=(0,r.lQ)(i.BannersReady)},25577:function(e,t,n){"use strict";n.d(t,{Cr:function(){return l},Nk:function(){return a},Xp:function(){return u}});var i=n(29978),r=n(84288),o=function(e){return e[r.R]},a=(0,i.Mz)(o,(function(e){return e.ready})),s=(0,i.Mz)(o,(function(e){return e.banners})),u=(0,i.Mz)(s,(function(e){return e.filter((function(e){return e.opened}))})),c=(0,i.Mz)(o,(function(e){return e.history})),l=(0,i.Mz)(c,(function(e){return function(t){var n;return null!==(n=e[t])&&void 0!==n?n:null}}))},36215:function(e,t,n){"use strict";n.d(t,{J:function(){return O},U:function(){return z.UN}});var i=n(13981),r=n(58932),o=n(44834),a=n(78698),s=n(43566),u=n(20056),c=n(89416),l=n(30212),d=n(27602),h=n(60019),f=n(12730),p=n(65678),m=n(54302),g=n(13384),v=n(89247),y=n(80835),_=n(88960),b=n(94518),w=n(31555),C=n(5059),A=(n(39757),n(85387)),I=(n(27189),n(84901),n(62454),n(22537)),S=n(18752),P=n(72944),x=n(34788),T=n(68819),k=n(86353),E=n(10610),M=n(86718),D=C.lazy((function(){return(0,r.sH)(void 0,void 0,void 0,(function(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,71939))];case 1:return[2,{default:e.sent().LegacySiteHeaderIssueTitle}]}}))}))})),N=C.lazy((function(){return(0,r.sH)(void 0,void 0,void 0,(function(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,42049))];case 1:return[2,{default:e.sent().LegacySiteHeaderGenericTitle}]}}))}))})),L=C.lazy((function(){return(0,r.sH)(void 0,void 0,void 0,(function(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,38787))];case 1:return[2,{default:e.sent().LegacySiteHeaderPostBtn}]}}))}))})),V=C.lazy((function(){return(0,r.sH)(void 0,void 0,void 0,(function(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,78630))];case 1:return[2,{default:e.sent().LegacySiteHeaderRadioTitle}]}}))}))})),R=C.lazy((function(){return(0,r.sH)(void 0,void 0,void 0,(function(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,88209))];case 1:return[2,{default:e.sent().LegacySiteHeaderRadioTocBtn}]}}))}))})),H=C.lazy((function(){return(0,r.sH)(void 0,void 0,void 0,(function(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,87711))];case 1:return[2,{default:e.sent().LegacySiteHeaderRadioCloseBtn}]}}))}))})),F=function(e){var t=(0,A.d4)(d.SG),n=(0,A.d4)(S.LU);if(e.empty)return(0,w.jsx)(x.u,{left:(0,w.jsx)(w.Fragment,{}),center:function(){return(0,w.jsx)(P.c,{})},right:(0,w.jsx)(w.Fragment,{}),navigation:"none"});if(t){if(t.viewName===p.lP.TextView||t.viewName===p.lP.PagesView)return(0,w.jsx)(x.u,{center:function(e){return(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(D,{width:e})})}});if(t.viewName===p.lP.Account)return(0,w.jsx)(x.u,{center:function(e){return(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(N,{width:e})})},right:(0,w.jsx)(T.i,{})});if(t.viewName===p.lP.HotSpotsHub)return"phone"===n?(0,w.jsx)(x.u,{left:(0,w.jsx)(k.A,{}),center:function(e){return(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(N,{width:e})})},right:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(E.u,{}),(0,w.jsx)(T.i,{})]}),navigation:"none"}):(0,w.jsx)(x.u,{center:function(e){return(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(N,{width:e})})}});if(t.viewName===p.lP.Purchase)return(0,w.jsx)(x.u,{left:(0,w.jsx)(k.A,{}),center:function(e){return(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(N,{width:e})})},right:(0,w.jsx)(T.i,{}),navigation:"none"});if(t.viewName===p.lP.Post)return(0,w.jsx)(x.u,{left:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(k.A,{}),(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(L,{})})]}),center:function(e){return(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(N,{width:e})})},right:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(T.i,{}),(0,w.jsx)(M.u,{})]}),navigation:"none"});if(t.viewName===p.lP.Radio)return(0,w.jsx)(x.u,{left:(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(H,{})}),center:function(e){return(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(V,{width:e})})},right:(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(R,{})}),navigation:"none"})}return(0,w.jsx)(x.u,{center:function(e){return(0,w.jsx)(C.Suspense,{fallback:null,children:(0,w.jsx)(N,{width:e})})}})},B=(C.memo((function(e){return C.useEffect((function(){var t,n;e.visible?(window.scrollTo(0,0),null===(t=I.Ay.root())||void 0===t||t.show(),setTimeout((function(){var e;null===(e=I.Ay.root())||void 0===e||e.resize()}),50)):null===(n=I.Ay.root())||void 0===n||n.hide()}),[e.visible]),C.useEffect((function(){return function(){var e;null===(e=I.Ay.root())||void 0===e||e.hide()}}),[]),(0,w.jsxs)("div",{className:"legacy-container ".concat(e.visible?"legacy-shown":""),children:[(0,w.jsx)(F,{empty:!e.visible}),(0,w.jsx)("div",{className:"legacy-root-container",style:{position:"relative"},children:(0,w.jsx)("div",{id:"Panel_root"})})]})})),n(75451),n(66443)),z=n(53269),O=function(e){try{return new URL(e).host===new URL(window.location.href).host}catch(e){return!0}};function j(){var e,t,n,i,s;return(0,r.YH)(this,(function(r){switch(r.label){case 0:return[4,(0,o.Lt)(a.nw)];case 1:if(r.sent()===y.Z.Voyager)return[2,!1];e={viewName:null},r.label=2;case 2:return r.trys.push([2,5,,6]),[4,(0,o.Lt)(d.Ae)];case 3:return t=r.sent(),n="string"==typeof t.state.referrer?t.state.referrer:document.referrer,i=(0,v.Ti)(),[4,(0,o.T1)(z.UN.resolvePath,i,t,n)];case 4:return e=r.sent(),[3,6];case 5:return r.sent(),[3,6];case 6:return(0,v.U2)()?[4,(0,o.Lt)(d.Lr)]:[2,!1];case 7:return(s=r.sent().landingUrl)?[3,9]:[4,(0,o.yJ)((0,d.TU)({}))];case 8:return r.sent(),[2,!0];case 9:if(e.currentPath===s)return[2,!1];r.label=10;case 10:return r.trys.push([10,12,,13]),(0,h._n)(!1),[4,(0,o.yJ)((0,d.bv)({link:s}))];case 11:return r.sent(),[2,!0];case 12:return r.sent(),[2,!1];case 13:return[2]}}))}function U(){var e,t,n,i,a;return(0,r.YH)(this,(function(s){switch(s.label){case 0:return[4,(0,o.s)(d.RC)];case 1:return e=s.sent().payload,[4,(0,o.Lt)(d.Ae)];case 2:return t=s.sent(),n=e.action,i=e.location,a=(0,r.Cl)((0,r.Cl)({},t.state),i.state),"REPLACE"===n?[3,4]:[4,(0,o.yJ)((0,d.D0)({navState:(0,r.Cl)((0,r.Cl)({},t),{state:a})}))];case 3:s.sent(),s.label=4;case 4:return[3,0];case 5:return[2]}}))}function W(){var e;return(0,r.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,o.Lt)(d.Vp)];case 1:return t.sent()?[4,(0,o.Zy)(U)]:[2];case 2:return t.sent(),[4,j()];case 3:return t.sent()?[3,6]:[4,(0,o.Lt)(d.Ae)];case 4:return e=t.sent(),[4,(0,o.yJ)((0,d.D0)({navState:(0,r.Cl)({},e)}))];case 5:t.sent(),t.label=6;case 6:return[2]}}))}function Y(e){var t,n,i,a,s,c,l,h,p,m;return(0,r.YH)(this,(function(g){switch(g.label){case 0:t=e.payload.navState,n=t.state,i=t.stateLess,a=(0,v.Ti)(),g.label=1;case 1:return g.trys.push([1,11,,13]),s=null!==(m=null==n?void 0:n.referrer)&&void 0!==m?m:document.referrer,[4,(0,o.T1)(z.UN.resolvePath,a,{state:n,stateLess:i},s)];case 2:return c=g.sent(),(l=(0,r.Tt)(c,[])).id=(0,_.A)(),l.cacheKey||(l.cacheKey=(0,_.A)()),[4,(0,o.yJ)((0,d.By)({params:(0,r.Cl)({},l)}))];case 3:return g.sent(),l.currentPath=a,(h=f.KZ(l.viewName))?[4,(0,o.T1)(h.load)]:[3,7];case 4:return g.sent(),[4,(0,o.yJ)((0,d.so)({newConfig:l,isLegacyRoute:!1}))];case 5:return g.sent(),[4,(0,o.yJ)((0,d.SP)({to:a,state:(0,r.Cl)({},l)}))];case 6:return g.sent(),[3,10];case 7:return[4,(0,b.hU)()];case 8:return g.sent()?[4,(0,o.T1)(b.m3)]:[3,10];case 9:g.sent(),g.label=10;case 10:return[3,13];case 11:return p=g.sent(),(0,u.R)(p),[4,(0,b.hU)()];case 12:return g.sent(),[3,13];case 13:return[2]}}))}function X(e){var t,n,i,a;return(0,r.YH)(this,(function(r){switch(r.label){case 0:return[4,(0,o.Lt)(d.SG)];case 1:return t=r.sent(),n=e.payload,i=n.newConfig,a=n.isLegacyRoute,i.cacheKey||(i.cacheKey=(0,_.A)(),(0,c.R)("routeChanged: navigation config doesn't have cacheKey defined")),window.history&&(window.history.scrollRestoration="auto"),[4,(0,o.yJ)((0,d.DI)({isLegacyRoute:a,prevConfig:t,config:i}))];case 2:return r.sent(),a?[4,(0,o.yJ)((0,d.qF)({isLegacyRoute:a,prevConfig:t,config:i}))]:[3,4];case 3:r.sent(),r.label=4;case 4:return[2]}}))}function q(e){var t,n,i,a,s,u;return(0,r.YH)(this,(function(c){switch(c.label){case 0:return c.trys.push([0,7,,8]),t=e.payload,n=t.newNavConfig,(i=t.urlNavConfig)?(!0===i&&(i=n),[4,(0,o.T1)(z.UN.generateUrl,i)]):[3,3];case 1:return s=c.sent(),n=(0,r.Cl)((0,r.Cl)({},n),{currentPath:(0,v.wO)(s.url)}),[4,(0,o.yJ)((0,d.SP)({to:s.url,state:(0,r.Cl)({},n)}))];case 2:return c.sent(),[3,5];case 3:return a=n.currentPath.split("/"),s=(0,v.x7)(a).join("/"),[4,(0,o.yJ)((0,d.SP)({to:s,state:(0,r.Cl)({},n)}))];case 4:c.sent(),c.label=5;case 5:return[4,(0,o.yJ)((0,d.r)({newNavConfig:n}))];case 6:return c.sent(),[3,8];case 7:return u=c.sent(),(0,l.z)(u),[3,8];case 8:return[2]}}))}function G(e){var t,n,i,a,s;return(0,r.YH)(this,(function(u){switch(u.label){case 0:return e.payload.params||(e.payload.params={}),t=e.payload,n=t.viewName,i=t.params,a=t.replace,e.payload.params.replaced=e.payload.replace,e.payload.params.referrer=window.location.href,e.payload.params.cacheKey||(e.payload.params.cacheKey=(0,_.A)()),[4,(0,o.Lt)(d.SG)];case 1:return s=u.sent(),[4,(0,o.yJ)((0,d.cQ)({currentConfig:s}))];case 2:u.sent(),u.label=3;case 3:return u.trys.push([3,8,,13]),[4,(0,o.T1)(z.UN.generateUrl,(0,r.Cl)((0,r.Cl)({},i||{}),{viewName:n}))];case 4:return u.sent(),e.payload.resetState?[4,(0,o.yJ)((0,d.PX)())]:[3,6];case 5:u.sent(),u.label=6;case 6:return[4,(0,o.yJ)((0,d.sh)({viewName:n,params:i,replace:a,ignoreIssueInfo:!0,isForceReplace:a}))];case 7:return u.sent(),[3,13];case 8:return u.sent(),[4,(0,b.hU)()];case 9:return u.sent()?e.payload.resetState?[4,(0,o.yJ)((0,d.PX)())]:[3,11]:[2];case 10:u.sent(),u.label=11;case 11:return[4,(0,o.yJ)((0,d.sh)({viewName:n,params:i,replace:a,ignoreIssueInfo:!0,isForceReplace:a}))];case 12:return u.sent(),[3,13];case 13:return[2]}}))}function K(e){var t,n,i,a;return(0,r.YH)(this,(function(r){switch(r.label){case 0:return t=e.payload,n=t.link,i=t.openNewWindow,[4,(0,o.Lt)(B.EC)];case 1:if(r.sent()&&!O(n))return[2];r.label=2;case 2:return r.trys.push([2,12,,13]),/^http|^mailto|^callto|^tel/i.test(n)?i?window.open(n,"_blank")?[3,4]:[4,(0,m.$)({message:(0,g.p3)("v7.Client.Dialogs.Blocked.Popup")})]:[3,5]:[3,7];case 3:r.sent()&&(window.location.href=n),r.label=4;case 4:return[3,6];case 5:window.location.href=n,r.label=6;case 6:return[2];case 7:return[4,(0,o.T1)(z.UN.resolvePath,n)];case 8:return(null==(a=r.sent())?void 0:a.viewName)?[4,(0,o.yJ)((0,d.Ng)({viewName:a.viewName,params:a}))]:[3,10];case 9:return r.sent(),[3,11];case 10:window.location.href=(0,v.jM)(n),r.label=11;case 11:return[3,13];case 12:return r.sent(),window.location.href=(0,v.jM)(n),[3,13];case 13:return[2]}}))}function J(e){var t;return(0,r.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,o.Lt)(d.Lr)];case 1:return(t=n.sent().homeViewName)?[3,3]:[4,(0,o.yJ)((0,d.bv)({link:"/"}))];case 2:return n.sent(),[3,5];case 3:return[4,(0,o.yJ)((0,d.Ng)({viewName:t,params:t===p.lP.StoreHub?{catalogView:p.$r.Catalog}:{},replace:e.payload.replace}))];case 4:n.sent(),n.label=5;case 5:return[2]}}))}function Q(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,o.yJ)((0,d.gN)())];case 1:return e.sent(),[2]}}))}function Z(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,o.yJ)((0,s.zp)())];case 1:return e.sent(),[2]}}))}i.bX.addFeature("app.common.navigation",void 0,(function(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,o.jP)(s.hl,W)];case 1:return e.sent(),[4,(0,o.jP)(d.D0,Y)];case 2:return e.sent(),[4,(0,o.jP)(d.so,X)];case 3:return e.sent(),[4,(0,o.jP)(d.r7,q)];case 4:return e.sent(),[4,(0,o.jP)(d.Ng,G)];case 5:return e.sent(),[4,(0,o.jP)(d.bv,K)];case 6:return e.sent(),[4,(0,o.jP)(d.TU,J)];case 7:return e.sent(),[4,(0,o.jP)(d.Lm,Q)];case 8:return e.sent(),[4,(0,o.jP)(d.DI,Z)];case 9:return e.sent(),[2]}}))}))},7294:function(e,t,n){"use strict";n.d(t,{hU:function(){return m},m3:function(){return g},mz:function(){return h},to:function(){return p},y5:function(){return f}});var i=n(58932),r=n(44834),o=n(30212),a=n(87542),s=n(13384),u=n(73663),c=n(74010),l=null;function d(){return(0,i.sH)(this,arguments,void 0,(function(e){var t,r;return void 0===e&&(e=!0),(0,i.YH)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,23563))];case 1:return[4,(t=i.sent()).runInit()];case 2:return i.sent(),[2,t];case 3:if(r=i.sent(),(0,o.z)(r),e)return[2,d(!1)];throw r;case 4:return[2]}}))}))}function h(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,17469))];case 1:return[2,e.sent().default]}}))}))}function f(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,91152))];case 1:return[2,e.sent().default]}}))}))}function p(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,25118))];case 1:return[2,e.sent().default]}}))}))}function m(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return l?[2,!0]:[4,(0,r.Lt)(u.ND)];case 1:return e.sent()===c.U.Pending?[2,!1]:[4,(0,r.yJ)((0,u.Mu)())];case 2:e.sent(),e.label=3;case 3:return e.trys.push([3,6,,9]),[4,(0,r.T1)(d)];case 4:return l=e.sent(),[4,(0,r.yJ)((0,u.nt)())];case 5:return e.sent(),[2,!0];case 6:return e.sent(),[4,(0,r.yJ)((0,u.C6)())];case 7:return e.sent(),[4,(0,a.Z)({message:(0,s.p3)("App.LegacyApp.Load.Error")})];case 8:return e.sent(),[3,9];case 9:return[2,!1]}}))}function g(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,21147))];case 1:return[4,(e=i.sent()).resolveCurrentUrl()];case 2:return i.sent(),[2,e];case 3:return t=i.sent(),(0,o.z)(t),[3,4];case 4:return[2]}}))}))}},94518:function(e,t,n){"use strict";n.d(t,{hU:function(){return i.hU},m3:function(){return i.m3},mz:function(){return i.mz},to:function(){return i.to},y5:function(){return i.y5}});var i=n(7294)},9429:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});var i=n(58932);function r(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(9963),n.e(7820),n.e(383),n.e(4950),n.e(4270),n.e(8340),n.e(4559),n.e(3918),n.e(6324)]).then(n.bind(n,86536))];case 1:return e.sent(),[2]}}))}))}n(36215)},75451:function(e,t,n){"use strict";n.d(t,{L:function(){return o},d:function(){return r}});var i=n(22537);function r(){i.Ay.nativeScroll||(i.Ay.nativeScroll=!0,document.body.classList.add("pr-nativescroll"),i.Ay.reflow(),i.Ay.freeze(!0),i.Ay.viewPort.setPropertyValue("height","auto"),i.Ay.viewPort.applyViewport(),i.Ay.viewPort.freeze(!0))}function o(){i.Ay.nativeScroll&&(document.body.classList.remove("pr-nativescroll"),i.Ay.viewPort.freeze(!1),i.Ay.freeze(!1),i.Ay.nativeScroll=!1)}},26811:function(e,t,n){"use strict";n.d(t,{T:function(){return U}});var i=n(13981),r=n(20056),o=n(25672),a=n(8351),s=n(58932),u=n(31555),c=n(5059),l=n(85387),d=n(3491),h=n.n(d),f=n(13384),p=n(34624),m=n(6201),g=n(41035),v=n(74637),y=n(18844),_=n(79836),b=n(73663),w=function(e){function t(t){var n=e.call(this,t)||this;return n.increaseFontScale=n.increaseFontScale.bind(n),n.decreaseFontScale=n.decreaseFontScale.bind(n),n.changeFont=n.changeFont.bind(n),n}return(0,s.C6)(t,e),t.prototype.render=function(){return(0,u.jsx)(m.E,{menuId:this.props.menuId,parentMenuId:this.props.parentMenuId,context:this.props.context,position:this.props.position,onClose:h(),header:this.renderHeader(),body:this.renderBody()})},t.prototype.renderHeader=function(){return(0,u.jsx)(g.S,{title:(0,f.p3)("Menu.Fonts"),canGoBack:!!this.props.parentMenuId,onClose:this.props.onClose})},t.prototype.renderBody=function(){return(0,u.jsxs)(p.f,{className:"list-fonts",grouped:!0,children:[this.renderFontSize(),this.renderFonts()]})},t.prototype.renderFontSize=function(){return(0,u.jsxs)(p.f,{className:"pop-button l-2x",submenuGroup:!0,children:[(0,u.jsx)(v.k,{containerClassName:"fontsize-less",tabIndex:0,onClick:this.decreaseFontScale,text:"A"}),(0,u.jsx)(v.k,{containerClassName:"fontsize-more",tabIndex:0,onClick:this.increaseFontScale,text:"A"})]})},t.prototype.renderFonts=function(){var e=this;if(!1===this.props.context.showFonts)return null;var t=this.props.fonts;return 0===t.length?null:(0,u.jsx)(y.S,{children:t.map((function(t){var n=t.name||(0,f.p3)("TextView.Fonts.".concat(t.id.substr(0,1).toUpperCase()).concat(t.id.substr(1))),i=t.id===e.props.currentFontId,r="";return"fontset-dyslexic"===t.id&&(r=(0,f.AF)("Menu.Fonts.DyslexicMeta","Supports select languages")),(0,u.jsx)(_.z,{text:n,meta:r,checked:i,className:t.id,onClick:function(n){return e.changeFont(n,t)}},t.id)}))})},t.prototype.decreaseFontScale=function(e){e.preventDefault(),e.stopPropagation(),this.props.decrease()},t.prototype.increaseFontScale=function(e){e.preventDefault(),e.stopPropagation(),this.props.increase()},t.prototype.changeFont=function(e,t){this.props.changeFont({fontId:t.id})},t}(c.PureComponent),C=(0,l.Ng)((function(e){return{fonts:(0,b.g0)(e),currentFontId:(0,b.oA)(e)}}),(function(e){return{increase:function(t){return e((0,b.e_)(t))},decrease:function(t){return e((0,b.iI)(t))},changeFont:function(t){return e((0,b.qX)(t))}}}))(w),A=n(13302),I=n(78698),S=n(80835),P=n(61577),x=n(13984),T=n(88960),k=c.memo((function(e){var t=(0,l.wA)(),n=(0,l.d4)(I.LE),i=(0,l.d4)(I.zw),r=(0,s.zs)(c.useState(i),2),o=r[0],a=r[1],d=function(t){void 0===t&&(t={back:!1}),e.onClose({back:t.back})},h=function(e){d(),t((0,b.cn)({languageCode:e}))},v=(0,A.sortBy)(n,(function(e){return e.title})),_=c.useMemo((function(){return(0,T.A)()}),[]),w=(0,l.d4)(I.nw)===S.Z.Pervasive,C=null;w&&(C=(0,u.jsx)(P.n,{className:"btn toolbar-btn",onClick:function(){return h(o)},children:(0,u.jsx)("span",{className:"title",children:(0,f.p3)("InterfaceLang.ChangeLang")})}));var k=(0,u.jsx)(g.S,{title:(0,f.p3)("Menu.InterfaceLanguage"),canGoBack:!!e.parentMenuId,onClose:d,rightControls:C});return(0,u.jsx)(m.E,{menuId:e.menuId,parentMenuId:e.parentMenuId,context:e.context,position:e.position,onClose:e.onClose,header:k,body:(0,u.jsx)(p.f,{grouped:!0,children:(0,u.jsx)(y.S,{children:v.map((function(e){var t=e.title+(e.originalTitle?" (".concat(e.originalTitle,")"):""),n=e.code===o;return(0,u.jsx)("li",{role:"menuitemradio","aria-checked":n,children:(0,u.jsx)(x.a,{groupName:_,checked:n,title:t,onChange:function(t){t&&(w?a(e.code):h(e.code))}})},e.code)}))})})})})),E=n(44834),M=n(95916),D=n(87838),N=n(27602),L=n(12730),V=n(94518),R=n(9429);function H(){var e,t,i=this;return(0,s.YH)(this,(function(r){switch(r.label){case 0:return[4,(0,E.Lt)(N.SG)];case 1:return e=r.sent(),L.KZ(e.viewName)?[3,3]:[4,(0,E.T1)((function(){return(0,s.sH)(i,void 0,void 0,(function(){return(0,s.YH)(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(4870),n.e(2188),n.e(5767),n.e(1948),n.e(4270),n.e(6702),n.e(7085),n.e(3828),n.e(4364)]).then(n.bind(n,92078))];case 1:return[2,e.sent()]}}))}))}))];case 2:(t=r.sent().default)&&t.model&&t.model.showActionMenu(),r.label=3;case 3:return[2]}}))}function F(){return(0,s.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,E.T1)(R.V)];case 1:return e.sent(),[4,(0,E.yJ)((0,M.M7)())];case 2:return e.sent(),[2]}}))}function B(e){var t,n,i,r=e.payload;return(0,s.YH)(this,(function(e){switch(e.label){case 0:t=r.dialogId,n=r.dialogContext,e.label=1;case 1:return e.trys.push([1,,5,7]),[5,(0,s.Ju)((0,V.hU)())];case 2:return e.sent()?[4,(0,E.T1)(V.mz)]:[2];case 3:return i=e.sent(),[4,(0,E.T1)((function(){return i.show({bookmarkContext:n})}))];case 4:return e.sent(),[3,7];case 5:return[4,(0,E.yJ)((0,D.AK)({dialogId:t,dialogContext:n}))];case 6:return e.sent(),[7];case 7:return[2]}}))}function z(){return(0,s.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,E.jP)(b.de,H)];case 1:return e.sent(),[4,(0,E.jP)(M.wO,F)];case 2:return e.sent(),[4,(0,E.IJ)(D.mw,B)];case 3:return e.sent(),[2]}}))}var O="app.views.common",j=!1;function U(){if(!j){try{i.bX.addFeature(O,void 0,z),o.A.menus[a.L9]||o.A.register(a.L9,k),o.A.menus[a.oL]||o.A.register(a.oL,C)}catch(e){(0,r.R)(e)}j=!0}}},66443:function(e,t,n){"use strict";n.d(t,{EC:function(){return s},vc:function(){return u}});var i=n(29978),r=n(28809),o=n(23131),a=n(61445),s=((0,i.Mz)(r._t,(function(e){return e(o.oo,!1)})),(0,i.Mz)(r._t,a.FE,(function(e,t){return t||e("features.app.externalLinks.disabled",!1)}))),u=(0,i.Mz)(r._t,(function(e){return e("myaccount.subviews",{})}))},70410:function(e,t,n){"use strict";n.d(t,{j:function(){return i}});var i="app.views.search"},76981:function(e,t,n){"use strict";n.d(t,{U:function(){return m},_:function(){return p}});var i=n(58932),r=n(13302),o=n(78698),a=n(13981),s=n(65678),u=n(76855),c=new(n(20447).V)(/^(all|articles|publications|books)$/,"Search tab doesnt match pattern"),l=n(80835),d=n(30657),h=n(18197),f=!1,p=(0,h.Sg)();function m(e,t){if(!f){var n=(0,a.Lt)(o.nw),m=(0,a.Lt)(o.uF),g=new u.D(s.lP.FTSArticles),v=(0,h.RR)(),y=v.map((function(e){return"{".concat(e,"}")})).join("&"),_=y.length?"?".concat(y):"",b=(0,r.assign)((0,r.zipObject)(v),{viewName:s.lP.FTSArticles}),w=(0,h.ET)(),C=w.map((function(e){return"{".concat(e,"}")})).join("&"),A=(0,r.assign)((0,r.zipObject)(w),{viewName:s.lP.FTSArticles}),I=(0,h.cP)(),S=I.map((function(e){return"{".concat(e,"}")})).join("&"),P=(0,r.assign)((0,r.zipObject)(I),{viewName:s.lP.FTSArticles}),x=(0,r.map)(p,(function(e){return"{".concat(e,"}")})).join("&"),T=(0,r.assign)((0,r.zipObject)(p),{viewName:s.lP.FTSArticles});n!==l.Z.Voyager&&n!==l.Z.Pervasive||(e.addRoute({name:"search",template:"search/catalog".concat(S.length?"?".concat(S):""),defaults:(0,i.Cl)((0,i.Cl)({},P),{subview:d.Sy.Catalog}),constraints:{viewName:g,subview:new u.D(d.Sy.Catalog)},executeWith:t}),e.addRoute({name:"search",template:"search/".concat(x.length?"?".concat(x):""),defaults:(0,i.Cl)((0,i.Cl)({},T),{subview:d.Sy.Fts}),constraints:{viewName:g,subview:new u.D(d.Sy.Fts)},executeWith:t})),n===l.Z.Pervasive&&e.addRoute({name:"search",template:"search/hub".concat(C.length?"?".concat(C):""),defaults:(0,i.Cl)((0,i.Cl)({},A),{subview:d.Sy.Hub}),constraints:{viewName:g,subview:new u.D(d.Sy.Hub)},executeWith:t}),n===l.Z.Web&&(m&&e.addRoute({name:"search",template:"search/{tab}".concat(_),defaults:(0,i.Cl)((0,i.Cl)({},b),{subview:d.Sy.Facelift}),constraints:{viewName:g,subview:new u.D(d.Sy.Facelift),tab:c},executeWith:t}),e.addRoute({name:"search",template:"search".concat(x.length?"?".concat(x):""),defaults:(0,i.Cl)((0,i.Cl)({},T),{subview:d.Sy.Fts}),constraints:{viewName:g,subview:new u.D(d.Sy.Fts)},executeWith:t})),f=!0}}},80366:function(e,t,n){"use strict";n.d(t,{Y3:function(){return c},kt:function(){return s},rG:function(){return u},xE:function(){return a}});var i=n(89103),r=n(70410),o="".concat(r.j,"/search/"),a=(0,i.lQ)("".concat(o,"change_query")),s=(0,i.lQ)("".concat(o,"change_active_tab")),u=(0,i.lQ)("".concat(o,"change_sort")),c=(0,i.lQ)("".concat(o,"change_hide_similar"))},18197:function(e,t,n){"use strict";n.d(t,{ET:function(){return o},F9:function(){return c},H2:function(){return u},Hv:function(){return h},R$:function(){return l},RR:function(){return g},Sg:function(){return m},Uo:function(){return s},XS:function(){return d},cP:function(){return p},cc:function(){return a}});var i=n(45235),r=n(30657);function o(){return["query"]}function a(e){return{query:e.query,author:e.author,countries:e.countries,categories:e.categories,languages:e.languages,newspapers:e.newspapers,start:e.start,stop:e.stop,date:e.date,in:e.in,orderBy:e.orderBy,groupBy:e.groupBy,hideSimilar:e.hideSimilar,type:e.type,state:e.state,isNew:e.isNew,searchFor:e.searchFor}}function s(e){var t=f(e.type),n=f(e.country),i=f(e.lang),r=f(e.category);return{page:e.page,query:e.query,country:n,region:e.region,lang:i,category:r,type:t,sort:e.sort}}function u(e){return e.reduce((function(e,t){return t.type===r.Bf.ContentType?e.type.push(t.id):t.type===r.Bf.Country?e.country.push(t.id):t.type===r.Bf.Language?e.lang.push(t.id):t.type===r.Bf.Category&&e.category.push(t.id),e}),{country:[],lang:[],category:[],type:[]})}function c(e){var t=e.reduce((function(e,t){var n=t.type;return n===r.Bf.Country?e.countries.push(t.value):n===r.Bf.Language?e.languages.push(t.value):n===r.Bf.Date?e.date=t.value:n===r.Bf.Author&&(e.author=t.value),e}),{countries:[],languages:[],author:null,date:null});return{countries:t.countries.join(","),languages:t.languages.join(","),date:t.date,author:t.author}}function l(e){var t=[],n=f(e.type);t=t.concat(n.map((function(e){return{type:r.Bf.ContentType,id:e,displayText:null,value:null}})));var i=f(e.country);t=t.concat(i.map((function(e){return{type:r.Bf.Country,id:e,displayText:null,value:null}})));var o=f(e.lang);t=t.concat(o.map((function(e){return{type:r.Bf.Language,id:e,displayText:null,value:null}})));var a=f(e.category);return t.concat(a.map((function(e){return{type:r.Bf.Category,id:e,displayText:null,value:null}})))}function d(e,t){return t.reduce((function(t,n){if(n.type===r.Bf.Author&&e.author){var i={type:r.Bf.Author,displayText:e.author,value:e.author};t.push(i)}else if(n.type===r.Bf.Date&&e.date){var o=n.options.find((function(t){return t.value===e.date}));o&&(i={type:r.Bf.Date,displayText:o.name,id:o.id,value:o.value},t.push(i))}else n.type===r.Bf.Country&&e.countries?e.countries.split(",").forEach((function(e){var i=n.options.find((function(t){return t.value===e}));if(i){var o={type:r.Bf.Country,id:i.id,displayText:i.name,value:i.value};t.push(o)}})):n.type===r.Bf.Language&&e.languages&&e.languages.split(",").forEach((function(e){var i=n.options.find((function(t){return t.value===e}));if(i){var o={type:r.Bf.Language,id:i.id,displayText:i.name,value:i.value};t.push(o)}}));return t}),[])}function h(e){var t=[],n=f(e.type);n.length>0&&t.push(n);var i=f(e.country);i.length>0&&t.push(i);var r=f(e.lang);r.length>0&&t.push(r);var o=f(e.category);return o.length>0&&t.push(o),{text:e.query,sortMode:parseInt(e.sort,10),inCategories:t}}function f(e){return(0,i.lD)(e,",").map(Number).filter((function(e){return!isNaN(e)}))}function p(){return["page","query","country","region","lang","category","type","sort"]}function m(){return["query","newspapers","author","languages","countries","categories","in","date","start","stop","orderBy","groupBy","hideSimilar","type","state","searchFor"]}function g(){return["query","author","countries","categories","languages","cids","types","genres","start","stop","date","publicationDate","orderBy","searchId","in","hideSimilar"]}},1339:function(e,t,n){"use strict";var i;n.d(t,{h:function(){return i}}),function(e){e[e.Application=0]="Application",e[e.Social=1]="Social",e[e.Library=2]="Library"}(i||(i={}))},46869:function(e,t,n){"use strict";var i,r;n.d(t,{wS:function(){return a},zL:function(){return o}}),function(e){e.SignInRequested="[Authentication] SignIn",e.SignInSucceeded="[Authentication] SignInSucceeded",e.SignInFailed="[Authentication] SignInFailed",e.SignUpRequested="[Authentication] SignUp",e.SignUpSucceeded="[Authentication] SignUpSucceeded",e.SignUpFailed="[Authentication] SignUpFailed",e.AccountChanged="[Authentication] Account Changed",e.SignUpEmailAlertSet="[Authentication] SignUpEmailAlertSet"}(i||(i={})),function(e){e.EmailAlertPromotional="EmailAlerts.Promotional",e.EmailAlertTechnical="EmailAlerts.Technical"}(r||(r={}));var o=function(e){this.payload=e,this.type=i.SignUpRequested},a=function(e){this.payload=e,this.type=i.SignUpSucceeded}},74435:function(e,t,n){"use strict";n.d(t,{IZ:function(){return c}});var i,r=n(71183),o=n(51056),a=n(86699),s=(n(82788),n(41434)),u=n(3710);function c(e){var t=e.system,n=e.provider,c=e.profile;if(!t&&!n)throw new Error("Neither system nor provider specified");var l=a.A.isLogin();return(n?(0,s.G)({provider:n,authtype:o.Ac.SIGNUP,context:{linkToCurrentAccount:l}}):(0,u.J)({system:t,context:{profile:c,linkToCurrentAccount:l}})).then((function(e){if(!e)return Promise.resolve();var o=e.authResult,a=e.signInResult;return(0,r.Z5)({signInResult:a,enableAutologin:!0,authContext:{system:t||n,method:o&&o.isNewUser?i.SignUp:i.SignIn}})})).catch((function(e){return Promise.reject(e)}))}n(46869),n(1339),function(e){e.SignIn="signin",e.SignUp="signup"}(i||(i={}))},61105:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var i=n(58932),r=n(13302),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t}(n(2410).e),a=function(){function e(e){var t=this;this.rejectIfRequested=function(e){return t._source.rejectIfRequested(e)},this._source=e}return Object.defineProperty(e.prototype,"isRequested",{get:function(){return this._source.isRequested},enumerable:!1,configurable:!0}),e.prototype.throwIfRequested=function(){this._source.throwIfRequested()},e.prototype.disposeIfRequested=function(){for(var e,t=[],n=0;n=0||(u.push(e),(0,i.oM)(r.zg).subscribe((function(){return e()})))},getConfig:function(){return(0,i.Lt)(r.zg)}};t.A=c},82788:function(e,t,n){"use strict";n.d(t,{X:function(){return c}});var i=n(58932),r=n(69463),o=n(39894),a=n(25778);function s(){for(var e=[],t=0;t=0},e}(),l=function(){function e(){var e=this;this._stream=new r.m(1),this._isEmpty=!0,this._stream.next(new c((0,a.Lt)(o.Gs))),(0,a.B1)(o.Gs,(function(t){return e._stream.next(new c(t))}))}return Object.defineProperty(e.prototype,"stream",{get:function(){return this._isEmpty&&this.load(),this._stream.asObservable()},enumerable:!1,configurable:!0}),e.prototype.load=function(){return(0,i.sH)(this,arguments,void 0,(function(e){var t,n,r,u;return void 0===e&&(e=!1),(0,i.YH)(this,(function(i){switch(i.label){case 0:return this._isEmpty=!1,t=(0,a.Lt)(o.Cp),n=t.entities,r=t.status,e&&r!==s.U.Pending||!e&&r!==s.U.Done?[4,(0,a.Cs)((0,o.Yh)(),o.Sr,o.Vf)]:[3,2];case 1:return u=i.sent(),[2,new c(u.favorites.map((function(e){return e.cid})))];case 2:return[2,new c(n.map((function(e){return e.cid})))]}}))}))},e.prototype.removePublication=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,this.load()];case 1:return(t=i.sent()).contains(e)?[4,(0,a.Cs)((0,o.N9)({cid:e}),o._3,o.Fh,o.hC)]:[2,t];case 2:return n=i.sent().favorites,[2,new c(n.map((function(e){return e.cid})))]}}))}))},e.prototype.addPublication=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,this.load()];case 1:return(t=i.sent()).contains(e)?[2,t]:[4,(0,a.Cs)((0,o.OD)({cids:[e]}),o._3,o.Fh,o.hC)];case 2:return n=i.sent().favorites,[2,new c(n.map((function(e){return e.cid})))]}}))}))},e.prototype.togglePublication=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,a.Cs)((0,o.N9)({cid:e}),o._3,o.Fh,o.hC)];case 1:return t=n.sent().favorites,[2,new c(t.map((function(e){return e.cid})))]}}))}))},e.prototype.enableAlert=function(e){return u.A.enableAlert(e)},e.prototype.disableAlert=function(e){return u.A.disableAlert(e)},e}(),d=new l;t.A=d},3286:function(e,t,n){"use strict";n.d(t,{T:function(){return l}});var i=n(58932),r=n(76082),o=n(53269),a=n(12830),s=n(84901),u={AppsFlyer:"appsflyer"},c=!1;function l(){var e=this;c||(c=!0,o.UN.addRoute({name:u.AppsFlyer,template:"/redirect/".concat(u.AppsFlyer,"/?{deep_link_value}"),defaults:{},constraints:{deep_link_value:a.k},executeWith:function(t){return(0,i.sH)(e,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return[4,o.UN.resolvePath(t.deep_link_value,s.A.getState())];case 1:return e=n.sent(),[2,(0,r.g5)(t.deep_link_value,(0,i.Cl)({},e))]}}))}))}}))}},96594:function(e,t,n){"use strict";n.d(t,{T:function(){return u}});var i=n(58932),r=n(13981),o=n(95916),a=n(15397),s=!1;function u(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return s?[2]:(s=!0,[4,(0,a.sK)()]);case 1:return e.sent(),(0,r.Lt)(o.Xh)?document.documentElement.classList.add("feat-hyphens--manual"):document.documentElement.classList.add("feat-hyphens--none"),[2]}}))}))}},78733:function(e,t,n){"use strict";n.d(t,{n:function(){return s}});var i=n(58932),r=n(29583),o=n(13302),a=n(16213),s=function(){function e(){}return e.prototype.bind=function(){return this._bindProxy.apply(this,(0,i.fX)([],(0,i.zs)(arguments),!1))},e.prototype.on=function(){return this._bindProxy.apply(this,(0,i.fX)([],(0,i.zs)(arguments),!1))},e.prototype.unbind=function(e){for(var t,n=[],r=1;r=i.Next?t=this._next:e<=i.Prev&&(t=this._prev),delete this._next,delete this._prev,t},e.prototype.append=function(e){return e.detach(),this._next&&(this._next._prev=e.tailItem),e.tailItem._next=this._next,e.headItem._prev=this,this._next=e.headItem,this},e.prototype.prepend=function(e){return e.detach(),this._prev&&(this._prev._next=e.headItem),e.headItem._prev=this._prev,e.tailItem._next=this,this._prev=e.tailItem,this},e.prototype.onREOF=function(){},e.prototype.onLEOF=function(){},e.prototype.toJSON=function(){},e.prototype.hasNext=function(){return!!this._next},e.prototype.hasPrev=function(){return!!this._prev},e}(),u=function(){function e(e,t,n){if(this._count=0,this._finished=!1,e&&t)this._head=e,this._tail=t;else if(e&&void 0!==n)for(this._head=e,this._tail=e,n||(n=Number.MAX_VALUE);--n>0&&this._tail.nextItem;)this._tail=this._tail.nextItem;else if(t&&void 0!==n)for(this._tail=t,this._head=t,n||(n=Number.MAX_VALUE);--n>0&&this._head.prevItem;)this._head=this._head.prevItem}return e.fromJSON=function(t,n){for(var i=n.fromJSON,r=[],a=2;a0){for(var n=this._head,i=this._head,r=1;r0)for(var o=n,a=0;o;){var s=o.nextItem;if(!1===e.call(o,a)||o===i)break;o=s,++a}else for(o=i,a=this.count()-1;o;){var u=o.prevItem;if(!1===e.call(o,a)||o===n)break;o=u,--a}return this},e.prototype.forEach=function(){if(this.isEmpty())return this;var e,t;1===arguments.length?(t=1,e=arguments[0]):(t=arguments[0],e=arguments[1]);var n=this._head,i=this._tail;if(t>0)for(var r=n,o=0;r;){var a=r.nextItem;if(!1===e(r,o)||r===i)break;r=a,++o}else for(r=i,o=this.count()-1;r;){var s=r.prevItem;if(!1===e(r,o)||r===n)break;r=s,--o}return this},e.prototype.forEachRight=function(e){return this.forEach(-1,e)},e.prototype.empty=function(){return this._head=void 0,this._tail=void 0,this._count=void 0,this},e.prototype.replace=function(){var e=arguments[0],t=arguments[1];if(c(e)&&c(t)){var n=e,i=t;s.linkItems(n.prevItem,i,n.nextItem),n===this._head&&(this._head=i),n===this._tail&&(this._tail=i),s.linkItems(void 0,n,void 0)}else{if(!l(e)||!l(t))throw new Error("Invalid arguments");var r=e,o=t,a=r._head.prevItem,u=r._tail.nextItem;if(r.detach(),a)a.append(o),u||(this._tail=o._tail);else{if(!u)return this.copy(o);u.prepend(o),this._head=o._head}this._count&&r._count&&o._count?this._count+=o._count-r._count:this._count=0}return this},e.prototype.toArray=function(){for(var e=[],t=this._head;t&&(e.push(t),t!==this._tail);t=t.nextItem);return e},e.prototype.toJSON=function(){for(var e=[],t=this._head;t&&(e.push(t.toJSON()),t!==this._tail);t=t.nextItem);return e},e.prototype.swap=function(e,t){var n=e.nextItem,i=e.prevItem,r=t.nextItem,o=t.prevItem;return s.linkItems(i===t?e:i,t,n===t?e:n),s.linkItems(o===e?t:o,e,r===e?t:r),e===this._head?this._head=t:t===this._head&&(this._head=e),e===this._tail?this._tail=t:t===this._tail&&(this._tail=e),this},e.prototype.item=function(e){for(var t=this._head,n=0;t;t=t.nextItem,++n){if(n===e)return t;if(t===this._tail)break}return null},e.prototype.find=function(e){if(!this.isEmpty())for(var t=this._tail,n=this._head,i=0;n;n=n.nextItem,++i){if(e(n,i,this))return n;if(n===t)break}},e.prototype._appendItem=function(){var e,t;switch(arguments.length){case 1:e=arguments[0],t=this._tail;break;case 2:e=arguments[1],t=arguments[0];break;default:throw new Error("Invalid arguments")}return e.detach(),this.isEmpty()&&!t?(this._count=1,this._head=this._tail=e):!this.isEmpty()&&t&&(t.next(e),this._tail===t&&(this._tail=e),this._count&&++this._count),this},e.prototype._appendItems=function(){var e,t;switch(arguments.length){case 1:e=arguments[0],t=this._tail;break;case 2:e=arguments[1],t=arguments[0];break;default:throw new Error("Invalid arguments")}return e.detach(),this.isEmpty()&&!t?(this._head=e._head,this._tail=e._tail,this._count=e._count):!e.isEmpty()&&t&&(s.linkItems(e._tail,t.nextItem),s.linkItems(t,e._head),this._tail===t&&(this._tail=e._tail),this._count&&e._count?this._count+=e._count:this._count=0),this},e.prototype._prependItem=function(e,t){return void 0===t&&(t=this._head),e.detach(),this.isEmpty()?(this._count=1,this._head=this._tail=e):(t.prev(e),t===this._head&&(this._head=e),this._count&&++this._count),this},e.prototype._prependItems=function(e,t){return void 0===t&&(t=this._head),e.detach(),this.isEmpty()?(this._head=e._head,this._tail=e._tail,this._count=e._count):e.isEmpty()||(s.linkItems(t.prevItem,e._head),s.linkItems(e._tail,t),this._head===t&&(this._head=e._head),this._count&&e._count?this._count+=e._count:this._count=0),this},e}();function c(e){return e instanceof s||(0,a.isFunction)(e.next)&&(0,a.isFunction)(e.prev)}function l(e){return e instanceof u||(0,a.isFunction)(e.head)&&(0,a.isFunction)(e.tail)}},50794:function(e,t,n){"use strict";n.d(t,{F:function(){return l}});var i=n(13302),r=n(65678),o=n(3915),a=n(84901),s=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=e,this.y=t}return e.fromDto=function(t){return new e(t&&t.x,t&&t.y)},e}(),u=function(){function e(e,t){void 0===e&&(e=100),this.scale=e,this.translate=t||new s}return e.fromDto=function(t){return new e(t&&t.scale,t&&t.translate&&s.fromDto(t.translate))},e}(),c=function(){function e(e,t,n){void 0===n&&(n=new u(100,new s)),this.imageId=e,this.transformedImageId=t,this.transformations=n}return e.fromDto=function(t){return new e(t&&t.imageId,t&&t.transformedImageId,t&&t.transformations&&u.fromDto(t.transformations)||new u(100,new s))},e}(),l=function(){function e(e,t){if(!e)return null;if(e=(0,o.C)(e),this.profileId=e.profileId||e.profileName,this.enAccountNumber=e.enAccountNumber,this.accountNumber=e.accountNumber,this.email=e.email,this.displayName=e.displayName,this.nickname=e.nickname,this.photoUrl=e.photoUrl,this.location=e.location,this.isCurrentUser=e.isCurrentUser,this.isProfilePrivate=e.isProfilePrivate,this.isDeviceAccount=e.isDeviceAccount,this.isFollowedByCurrentUser=e.followedByCurrentUser,this.backgroundImageSettings=c.fromDto(e.backgroundImageSettings),this.avatarImageId=e.avatarImageId,this.ownedPublications=t,this.enableServiceEmails=e.enableServiceEmails,this.enablePromotionalEmails=e.enablePromotionalEmails,e.publicInfo&&(this.publicInfo=e.publicInfo),this.location){var n=e.locationLatLng;n&&0!==n.lat&&0!==n.lng&&(this.locationLatLng={lat:n.lat,lng:n.lng})}}return e.prototype.equals=function(e){var t=e,n=this.profileId;return t&&n&&(t||"").toUpperCase()===(n||"").toUpperCase()},e.prototype.goToChannelFeed=function(t){return this.ensureProfileName().then((function(n){return e.goToChannelFeed(n,t)}))},e.prototype.goToProfile=function(){return this.ensureProfileName().then((function(t){e.goToProfile(t)}))},e.goToProfile=function(e){return a.A.goView(r.lP.Profile,{profileId:e})},e.goToChannelFeed=function(e,t){var n=(0,i.extend)({channelfeed:"channelfeed",profileId:e},t);return a.A.goView(r.lP.Profile,n)},e.ensureProfileName=function(e,t){return new Promise((function(i,r){e||t?e?i(e):Promise.resolve().then(n.bind(n,79450)).then((function(e){e.default.getProfileName(t).then(i,r)})):r()}))},e.prototype.ensureProfileName=function(){return e.ensureProfileName(this.profileId,this.enAccountNumber)},e}()},39407:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});var i=n(58932);function r(e){var t=(0,i.zs)(e.split("-"),2),n=t[0],r=t[1],o=e.indexOf("-")>=0;return{localeString:e,languageCode:n,countryCode:r,isValid:o}}},10730:function(e,t,n){"use strict";n.d(t,{u:function(){return r}});var i=n(12993),r=new(function(){function e(){}return e.prototype.getStats=function(){return i.V.getStats()},e.prototype.get=function(){return i.V.get()},e.prototype.getById=function(e){return i.V.getById(e)},e.prototype.getByIds=function(e){return i.V.getByIds(e)},e.prototype.deleteMonitor=function(e){return i.V.delete(e)},e.prototype.updateMonitor=function(e,t,n){return i.V.saveFrequency(e,t,n)},e}())},95952:function(e,t,n){"use strict";n.d(t,{GE:function(){return s},GZ:function(){return l},Ts:function(){return h},jF:function(){return a},jc:function(){return d},rg:function(){return r}});var i=n(13384),r="print-content",o=["mousemove","touchstart"];function a(){for(var e=document.getElementsByClassName(r),t=0;t'.concat(e,""),document.body.appendChild(t)}function l(){window.addEventListener("beforeprint",c)}function d(){window.removeEventListener("beforeprint",c)}function h(){l()}},87944:function(e,t,n){"use strict";n.d(t,{c:function(){return p}});var i=n(29583),r=n(13302),o=n(42678),a=n(69463),s=n(65678),u=n(89247),c=n(30657),l=n(84901),d=n(87266),h=n(82230),f=n(90006),p=new(function(){function e(){var e=this;this.searchParamsInternal=new o.t(new d.l),this.searchParams=this.searchParamsInternal.asObservable(),this.searchCountersInternal=new o.t(new d.C),this.searchCounters=this.searchCountersInternal.asObservable(),this.resetCounters(),this.currentSearchCounterInternal=new a.B,this.currentSearchCounter=this.currentSearchCounterInternal.asObservable(),this.loadArticles=new a.B,this.loadArticles.subscribe((function(t){(0,r.assign)(e.removedArticleIdsContainer,t),e.announceCounters()})),this.searchCountersInternal.subscribe((function(t){var n;switch(e.getSearchParams().state){case c.IY.Custom:n=t.customCount;break;case c.IY.CurrentTitle:n=t.titleCount;break;case c.IY.CurrentIssue:n=t.issueCount;break;default:n=t.totalCount}e.currentSearchCounterInternal.next(n)}))}return e.prototype.newSearch=function(e){e=e||new d.l,this.goToSearchView((0,r.assign)(e,{isNew:!0}))},e.prototype.subSearch=function(e){this.goToSearchView((0,r.assign)(this.getSearchParams(),e))},e.prototype.reset=function(){this.setSearchParams(new d.l),this.removedArticleIdsContainer={}},e.prototype.setSearchParams=function(e,t){void 0===t&&(t=!0),e=e||new d.l,this.removedArticleIdsContainer={};var n=e.isNew;e.isNew=!1,this.searchParamsInternal.next(e),n&&this.loadCounters(e.type),t&&i(this).trigger("onsearch",this.getSearchParamsByState(e.state))},e.prototype.getSearchParams=function(){var e=this.searchParamsInternal.getValue();return f.A.isNil(e)?new d.l:e},e.prototype.onArticlesLoaded=function(e){this.loadArticles.next(e)},e.prototype.onSearch=function(e){i(this).on("onsearch",e)},e.prototype.offSearch=function(e){i(this).off("onsearch",e)},e.prototype.toSearchParams=function(e){var t=new d.l({isNew:!!f.A.isNil(e.isNew)||e.isNew,query:(0,u.O8)(e.query),author:(0,u.O8)(e.author),categories:(0,u.O8)(e.categories),countries:(0,u.O8)(e.countries),languages:(0,u.O8)(e.languages),newspapers:(0,u.O8)(e.newspapers),start:(0,u.O8)(e.start),stop:(0,u.O8)(e.stop),date:c.yx[e.date],in:c.aZ[e.in],orderBy:c.mF[e.orderBy],groupBy:c.Ri[e.groupBy],hideSimilar:"1"===e.hideSimilar?1:0,type:parseInt(e.type,10),state:parseInt(e.state,10),searchFor:c.m8[e.searchFor]});return this.ensureSearchType(t),this.ensureSearchState(t),t},e.prototype.toRouteConfig=function(e){e=e||new d.l;var t={};return t.isNew=e.isNew,t.query=e.query,t.author=e.author,t.countries=e.countries,t.categories=e.categories,t.languages=e.languages,t.newspapers=e.newspapers,t.start=e.start,t.stop=e.stop,t.date=e.date,t.in=e.in,t.orderBy=e.orderBy,t.groupBy=e.groupBy,t.hideSimilar=e.hideSimilar?"1":"0",t.type=e.type.toString(10),t.state=e.state.toString(10),t.subview=c.Sy.Fts,t.searchFor=e.searchFor,t},e.prototype.goToSearchView=function(e){this.ensureSearchType(e),this.ensureSearchState(e),l.A.goView(s.lP.FTSArticles,this.toRouteConfig(e),!0)},e.prototype.loadCounters=function(e){var t=this;this.resetCounters(),this.getCount(this.getSearchParamsByState(c.IY.AllTitles)).then((function(e){t.initialSearchCounters.totalCount=e,t.announceCounters()})),e===c.nX.Advanced&&this.getCount(this.getSearchParamsByState(c.IY.Custom)).then((function(e){t.initialSearchCounters.customCount=e,t.announceCounters()})),e===c.nX.Issue&&(this.getCount(this.getSearchParamsByState(c.IY.CurrentTitle)).then((function(e){t.initialSearchCounters.titleCount=e,t.announceCounters()})),this.getCount(this.getSearchParamsByState(c.IY.CurrentIssue)).then((function(e){t.initialSearchCounters.issueCount=e,t.announceCounters()})))},e.prototype.announceCounters=function(){var e=this.initialSearchCounters.clone();this.searchCountersInternal.next(e)},e.prototype.resetCounters=function(){this.removedArticleIdsContainer={},this.initialSearchCounters=new d.C({totalCount:null,customCount:null,titleCount:null,issueCount:null}),this.searchCountersInternal.next(this.initialSearchCounters)},e.prototype.getSearchParamsByState=function(e){void 0===e&&(e=null);var t=this.getSearchParams();null===e&&(e=t.state);var n=new d.l({type:t.type,state:e,query:t.query,author:t.author,orderBy:t.orderBy,hideSimilar:t.hideSimilar,date:t.date,start:t.start,stop:t.stop,in:t.in});return e===c.IY.AllTitles?(t.type===c.nX.Quick?(n.languages=t.languages,n.groupBy=c.Ri.Language):t.type===c.nX.Issue&&(n.date=c.yx.Anytime,n.groupBy=c.Ri.DateRange),n):(n.newspapers=t.newspapers,e===c.IY.CurrentTitle?(n.date=c.yx.Anytime,n.groupBy=c.Ri.DateRange,n):e===c.IY.Custom?(n.countries=t.countries,n.categories=t.categories,n.languages=t.languages,n):n)},e.prototype.ensureSearchType=function(e){e.type||(e.type=this.getStateTypeBySearchParams(e))},e.prototype.ensureSearchState=function(e){(f.A.isNil(e.state)||isNaN(e.state))&&(e.state=this.getDefaultSearchStateByType(e))},e.prototype.getStateTypeBySearchParams=function(e){return e.newspapers&&4===e.newspapers.length&&e.start&&e.stop?c.nX.Issue:e.languages&&e.groupBy===c.Ri.Language?c.nX.Quick:c.nX.Advanced},e.prototype.getDefaultSearchStateByType=function(e){switch(e.type){case c.nX.Advanced:return"function"==typeof e.hasCustomParameters&&e.hasCustomParameters()?c.IY.Custom:c.IY.AllTitles;case c.nX.Issue:return c.IY.CurrentIssue;default:return c.IY.AllTitles}},e.prototype.getCount=function(e){return h.A.get("fts","GetCount",e.toFtsParams({pageNumber:0,pageSize:1}),{timeout:15e3})},e}())},87266:function(e,t,n){"use strict";n.d(t,{C:function(){return u},l:function(){return s}});var i=n(58932),r=n(30657),o=n(27189),a=n(90006),s=function(){function e(e){void 0===e&&(e={}),this.isNew=e.isNew,this.query=e.query,this.author=e.author,this.countries=e.countries,this.categories=e.categories,this.languages=e.languages,this.newspapers=e.newspapers,this.start=e.start,this.stop=e.stop,this.date=e.date,this.in=e.in,this.orderBy=e.orderBy,this.groupBy=e.groupBy,this.hideSimilar=e.hideSimilar,this.type=e.type,this.state=e.state,this.searchFor=e.searchFor}return e.prototype.hasCustomParameters=function(){return!!(this.countries||this.categories||this.languages||this.newspapers)},e.prototype.toFtsParams=function(t){var n={};return n.searchText=this.query,n.searchAuthor=this.author,n.languages=this.languages,n.newspapers=this.newspapers,n.countries=this.countries,n.categories=this.categories,(!this.start&&!this.stop||this.date)&&(n.range=this.date||e.getDefaultDate()),n.searchIn=this.in||e.DefaultLocation,n.startDate=this.start,n.stopDate=this.stop,n.orderBy=this.orderBy||e.DefaultOrder,n.groupBy=this.groupBy,n.hideSame=this.hideSimilar,n.searchFor=this.searchFor||r.m8.All,(0,i.Cl)((0,i.Cl)({},n),t)},e.getDefaultDate=function(){return o.A.get("features.default.search.period",r.lh)},e.DefaultLocation=r.pi,e.DefaultOrder=r.mF.Relevance,e}(),u=function(){function e(e){void 0===e&&(e={}),this.totalCount=e.totalCount,this.customCount=e.customCount,this.titleCount=e.titleCount,this.issueCount=e.issueCount}return e.prototype.adjust=function(e){a.A.isNil(this.totalCount)||(this.totalCount=this.totalCount+e),a.A.isNil(this.customCount)||(this.customCount=this.customCount+e),a.A.isNil(this.titleCount)||(this.titleCount=this.titleCount+e),a.A.isNil(this.issueCount)||(this.issueCount=this.issueCount+e)},e.prototype.clone=function(){return new e(this)},e}()},88025:function(e,t,n){"use strict";n.d(t,{A:function(){return y}});var i,r=n(13302),o=n(10358),a=n(27189),s=n(50794),u=n(82230),c=function(e){return u.A.get("issues",e+"/social/sections")},l=n(67303),d=n(97779),h=n(74877),f=function(){function e(e,t){void 0===t&&(t={width:28,height:28}),this.enAccountNumber=e.EncryptedAccountNumber,this.nickname=e.Nickname,this.user=new s.F(e),this.joined=new Date(e.JoinedOn).toLocaleString(),this.userLocation=e.UserLocation||"",this.isFollowedByCurrentUser=!!e.FollowedByCurrentUser,this.avatarImageId=e.avatarImageId,this.photoUrl=e.PhotoUrl,this.avatarSize=t}return e.prototype.avatar=function(){return(0,o.tr)({nickname:this.nickname,imageId:this.avatarImageId,size:this.avatarSize,fallbackAvatarUrl:this.photoUrl})},e.prototype.goToProfile=function(){return this.user.goToProfile()},e}(),p=function(e){e&&e.Text&&(this.articleId=e.ArticleId,this.article=e.Subject,this.threadId=e.ThreadId,this.postId=e.PostId,this.publicId=e.CommentKey,this.comment=e.Text,this.postsInArticle=e.PostsInArticle,this.authorId=e.UserAccountNumber,e.attachments?this.attachments=e.attachments:e.Artifacts&&(this.attachments=(0,r.map)(e.Artifacts,(function(e){return e.VideoMeta?new h.A({url:e.VideoMeta.VideoUrl,thumbnailImageId:e.ObjectId,thumbnailWidth:e.PreviewUrl.Width,thumbnailHeight:e.PreviewUrl.Height}):new d.A({imageId:e.ObjectId,width:e.PreviewMeta.Width,height:e.PreviewMeta.Height})}))),this.hasAttachments=!(0,r.isEmpty)(this.attachments),this.userProfile=new f(e.UserProfile,o.eV.huge),this.eventTime=Date.parse(e.PostDate))},m=function(e,t){this.section=t||e.Section||"",this.comments=(0,r.chain)(e.SocialSection&&e.SocialSection.Comments||[]).filter((function(e){return e.Text})).map((function(e){return new p(e)})).value()};function g(e,t){var n=a.A.get("ui.textView.enableSocialSection",!1);return!e&&i||!n?Promise.resolve():c(t||l.A.issue()).then(v)}function v(e){i=(0,r.map)(e,(function(e){return new m(e)}))}var y={getSectionsForIssue:function(e){return g(!0,e).then((function(){return i}))},getDataBySection:function(e){return g(!1).then((function(){for(var t=null,n=e.title||e,r=i&&i.length||0;r--;)if(i[r].section&&!n.localeCompare(i[r].section)){t=i[r];break}return t?Promise.resolve(t):Promise.reject()}))},SectionModel:m}},2175:function(e,t,n){"use strict";n.r(t),n.d(t,{busy:function(){return a},busyState:function(){return s},busyStateLock:function(){return u},modal:function(){return c},modalState:function(){return l}});var i=n(58932),r=n(37022),o=function(e){function t(){var t=e.call(this)||this;return t.lock=new r.c_,t._lockHandles=[],t.lock.onLocked.subscribe((function(){return t._fire("set")})),t.lock.onUnlocked.subscribe((function(){return t._fire("reset")})),t}return(0,i.C6)(t,e),t.prototype.set=function(){this._lockHandles.push(this.lock.lock())},t.prototype.reset=function(){this._lockHandles.length&&this._lockHandles.pop().release()},Object.defineProperty(t.prototype,"isSet",{get:function(){return this.lock.isLocked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resetPromise",{get:function(){var e=this;return this.lock.isLocked?new Promise((function(t){e.lock.onUnlockedOnce(t)})):Promise.resolve()},enumerable:!1,configurable:!0}),t}(n(78733).n),a=new o,s=a,u=a.lock,c=new o,l=c},34109:function(e,t,n){"use strict";n.d(t,{V:function(){return l},o:function(){return c}});var i=n(58932),r=n(13302),o=n(90006),a=n(26906),s=n(47027),u=n(44260);function c(e){if(e.isEmpty())return u.Ay.val("Dialogs.AdvancedSearch.AllTitles");var t=e.getCollections();if(1===t.titles.length&&(0,r.isEmpty)(t.countries)&&(0,r.isEmpty)(t.categories))return t.titles[0].name;if((0,r.isEmpty)(t.titles)&&1===t.countries.length&&(0,r.isEmpty)(t.categories))return t.countries[0].displayName;if((0,r.isEmpty)(t.titles)&&(0,r.isEmpty)(t.countries)&&1===t.categories.length)return t.categories[0].displayName;var n=[];return 1===t.countries.length?n.push(t.countries[0].displayName):t.countries.length>1&&n.push(u.Ay.format("Dialogs.AdvancedSearch.Selection.Countries",t.countries.length)),1===t.categories.length?n.push(t.categories[0].displayName):t.categories.length>1&&n.push(u.Ay.format("Dialogs.AdvancedSearch.Selection.Categories",t.categories.length)),1===t.titles.length?n.push(t.titles[0].displayName):t.titles.length>1&&n.push(u.Ay.format("Dialogs.AdvancedSearch.Selection.Titles",t.titles.length)),n.join(", ")}var l=function(){function e(){this.container={}}return e.prototype.setCategory=function(e,t,n){if(void 0===n&&(n={}),e&&t){var i=this.ensureCategoryExists(e.id);i.category=e,i.groupName=t,i.titles=n}},e.prototype.resetCategory=function(e){this.container[e]&&delete this.container[e]},e.prototype.setTitles=function(e,t){var n=this;void 0===t&&(t=null),(0,r.isEmpty)(e)||e.forEach((function(e){return e.categories.forEach((function(i){var r=n.ensureCategoryExists(i);r.category&&r.category.id===t.id&&(r.category=null),r.titles[e.cid]=e}))}))},e.prototype.getCategorySelection=function(e){return this.container[e]},e.prototype.clear=function(){this.container={}},e.prototype.isEmpty=function(){var e=(0,r.filter)(this.container,(function(e,t){return null!==e.titles}));return(0,r.isEmpty)(e)},e.prototype.toSearchParams=function(){var e=this.getCollections();return{newspapers:e.titles.map((function(e){return e.cid})).join(","),countries:e.countries.map((function(e){return e.id})).join(","),categories:e.categories.map((function(e){return e.id})).join(",")}},e.prototype.fromSearchParams=function(e){return this.clear(),Promise.all([this.restoreTitles(e.newspapers),this.restoreCategories(e.countries,a.$I.Countries,s.X6),this.restoreCategories(e.categories,a.$I.Categories,s.bW)])},e.prototype.fromCollections=function(e){var t=this;this.clear();var n=(0,s.yC)(e.titles),r=(0,s.X6)(),o=e.countries.reduce((function(e,t){return e[t]=!0,e}),{});return Promise.all([n,r]).then((function(e){var n=(0,i.zs)(e,2),r=n[0],s=n[1];return t.setTitles(r),s.forEach((function(e){o[e.id]&&t.setCategory(e,a.$I.Countries)})),Promise.all([r,s])}))},e.prototype.toFilters=function(){var e=this.getCollections();return{inCategories:e.countries.map((function(e){return e.id})).concat(e.categories.map((function(e){return e.id})))}},e.prototype.getCollections=function(){var e={},t={},n={};return(0,r.forOwn)(this.container,(function(i,o){i.category?i.groupName===a.$I.Countries&&null!==i.titles?t[o]=i.category:i.groupName===a.$I.Categories&&null!==i.titles&&(n[o]=i.category):(0,r.isEmpty)(i.titles)||(0,r.forOwn)(i.titles,(function(t,n){e[n]=t}))})),{titles:(0,r.values)(e),countries:(0,r.values)(t),categories:(0,r.values)(n)}},e.prototype.ensureCategoryExists=function(e){return e?(this.container[e]||(this.container[e]={category:null,groupName:null,titles:{}}),this.container[e]):null},e.prototype.restoreTitles=function(e){var t=this;if(!e)return Promise.resolve([]);var n=e.split(",");return((0,r.isEmpty)(n)?Promise.resolve([]):(0,s.yC)(n)).then((function(e){return t.setTitles(e),e}))},e.prototype.restoreCategories=function(e,t,n){var i=this;if(!e)return Promise.resolve([]);var a=o.A.arrayToHashSet(e.split(","));return((0,r.isEmpty)(a)?Promise.resolve([]):n()).then((function(e){return e.forEach((function(e){a[e.id]&&i.setCategory(e,t)})),e}))},e}()},12993:function(e,t,n){"use strict";n.d(t,{A:function(){return i},V:function(){return f}});var i,r=n(13302),o=n(69463),a=n(58735),s=n(40657),u=n(73690),c=n(82230),l=n(89993);function d(e){return e?e.toLowerCase():""}function h(e){return Array.isArray(e)?e.sort():[]}!function(e){e.Save="save",e.Delete="delete"}(i||(i={}));var f=new(function(){function e(){var e=this;this.cache=null,this.basePath="topics",this.updatesSubject=new o.B,a.bind("tokenUpdated",(function(){e.cache=null})),this.updates=this.updatesSubject.asObservable()}return e.prototype.get=function(){var e=this;return this.cache?Promise.resolve(this.cache):c.A.get(this.basePath).then((function(t){return e.cache=t,e.cache})).catch((function(){return Promise.reject(new Error("Error on topics loading"))}))},e.prototype.getById=function(e){return this.get().then((function(t){return(0,r.find)(t,(function(t){return t.id===e}))}))},e.prototype.getByIds=function(e){return this.get().then((function(t){return t.filter((function(t){return e.some((function(e){return e===t.id}))}))}))},e.prototype.save=function(e){var t=this;return this.get().then((function(n){if(function(e,t){var n=t.id,i=t.topicTypeId,o=d(t.searchQuery),a=d(t.searchAuthor),s=d(t.searchIn),u=h(t.newspapers),c=h(t.countries),l=h(t.languages);return e.some((function(e){return n!==e.id&&i===e.topicTypeId&&o===d(e.searchQuery)&&a===d(e.searchAuthor)&&s===d(e.searchIn)&&(0,r.isEqual)(u,h(e.newspapers))&&(0,r.isEqual)(c,h(e.countries))&&(0,r.isEqual)(l,h(e.languages))}))}(n,e))throw new l.A("The topic with the same filter already exists","Dialogs.AddMonitor.Error.DuplicateMonitor");var i={contentType:"application/json",disableRetry:!0};return e.id?c.A.put(t.basePath,e.id.toString(),JSON.stringify(e),i):c.A.post(t.basePath,"",JSON.stringify(e),i)})).then((function(n){s.cL();var i=e.id||n;return t.cache=null,Object.assign({},e,{id:i})})).then((function(e){return t.updatesSubject.next({id:e.id,opType:i.Save}),e}))},e.prototype.saveFrequency=function(e,t,n){var i=this;return(0,u._s)("monitors","updateMonitor",{monitorId:e,frequency:t,notificationTime:n},{}).then((function(e){return i.cache=null,e}))},e.prototype.delete=function(e){var t=this;return c.A.delete(this.basePath,e.toString(),null,{disableRetry:!0}).then((function(){t.cache=null,t.updatesSubject.next({id:e,opType:i.Delete})}))},e.prototype.getStats=function(){return this.get().then((function(e){return{allCount:e.length}}))},e}())},55683:function(e,t,n){"use strict";var i;n.d(t,{d:function(){return i}}),function(e){e[e.Ok=1]="Ok",e[e.Cancel=2]="Cancel",e[e.Close=3]="Close",e[e.Destroy=4]="Destroy",e[e.EmailVerified=5]="EmailVerified",e[e.Unknown=10]="Unknown"}(i||(i={}))},8782:function(e,t,n){"use strict";n.d(t,{Fl:function(){return v},ZF:function(){return _},dV:function(){return g},kt:function(){return b},o9:function(){return y}});var i,r,o=n(58932),a=n(12010),s=n(13302),u=n(44260),c=n(96543),l=n(99915),d=n(47027),h=n(87266),f=n(87944),p=n(30657),m={searchIn:(i={},i[p.aZ.All]="SearchMonitorPanel.ResultLocationAnywhere",i[p.aZ.Headline]="Dialogs.AdvancedSearch.InHeadline",i[p.aZ.Body]="Dialogs.AdvancedSearch.InBody",i),date:(r={},r[p.yx.Today]="Dialogs.AdvancedSearch.Today",r[p.yx.Last3Days]="Dialogs.AdvancedSearch.Last3Days",r[p.yx.ThisWeek]="Dialogs.AdvancedSearch.ThisWeek",r[p.yx.ThisMonth]="Dialogs.AdvancedSearch.ThisMonth",r[p.yx.Anytime]="Dialogs.AdvancedSearch.Anytime",r)};function g(e){return e.length>1?e.length:e[0]}function v(e){var t=m.searchIn[e];return t?(u.Ay.val(t)||t).toLowerCase():""}function y(e){var t=m.date[e];return t?u.Ay.val(t).toLowerCase():""}function _(e){return(0,o.sH)(this,arguments,Promise,(function(e,t){var n,i,r,a,c,l,f,m,_;return void 0===t&&(t=!0),(0,o.YH)(this,(function(b){switch(b.label){case 0:return n=[u.Ay.loaded()],t&&Object.keys(e).forEach((function(t){e[t]&&"string"==typeof e[t]&&(e[t]=(0,s.escape)(e[t]))})),(0,s.isEmpty)(e.newspapers)||(1===(i=e.newspapers.split(",")).length?n.push((0,d.jW)(i[0]).then((function(e){return e.displayName}))):n.push(Promise.resolve(i.length.toString(10)))),[4,Promise.all(n)];case 1:return r=o.zs.apply(void 0,[b.sent(),2]),a=r[1],c=[],e.query&&c.push(e.query),e.author&&c.push(u.Ay.format("SearchToolbar.Author","".concat(e.author,""))),e.type===p.nX.Quick?c.push(u.Ay.val("SearchToolbar.InAllLanguages")):(0,s.isEmpty)(e.languages)||(l=e.languages.split(","),c.push(u.Ay.format("SearchToolbar.Languages","".concat(g(l),"")))),a&&[p.IY.CurrentIssue,p.IY.CurrentTitle].indexOf(e.state)>-1&&c.push(u.Ay.format("SearchToolbar.Newspapers","".concat(a,""))),(0,s.isEmpty)(e.countries)?[3,3]:[4,(0,d.X6)()];case 2:f=b.sent(),m=e.countries.split(",").map((function(e){return parseInt(e,10)})),_=f.filter((function(e){return m.includes(e.id)})).map((function(e){return e.displayName})),c.push(u.Ay.format("SearchToolbar.Countries","".concat(g(_),""))),b.label=3;case 3:return e.type===p.nX.Issue?e.state!==p.IY.CurrentIssue&&c.push(u.Ay.format("SearchToolbar.Range","".concat(p.yx.Anytime,""))):e.date===p.yx.Range?c.push(u.Ay.format("SearchToolbar.Range","".concat(e.start," - ").concat(e.stop,""))):c.push(u.Ay.format("SearchToolbar.Range","".concat(y(e.date||h.l.getDefaultDate()),""))),c.push(u.Ay.format("SearchToolbar.SearchIn","".concat(v(e.in||h.l.DefaultLocation),""))),[2,c.join(" ")]}}))}))}var b=function(){function e(e){var t,n=this;this.element=e,this.model=new w,this.isVisible=!1,f.c.searchParams.subscribe((function(e){n.model.searchResult(u.Ay.val("SearchToolbar.Searching")),t=_(e,!1)})),f.c.currentSearchCounter.subscribe((function(e){null!=e&&t.then((function(t){n.model.searchResult(u.Ay.format("ToolbarSearchMonitor",e.toLocaleString(),t))}))}))}return e.prototype.show=function(){var e=this;return this.isVisible||(this.isVisible=!0,l.k.loaded().then((function(){l.k.prependTo("v7.Client.ToolbarSearch",e.model,e.element)}))),this},e.prototype.linkView=function(e){var t=this;this.model.viewportLeft(e.viewport().left),c.A.bind(e,"viewportChanged",null,(function(e,n){t.model.viewportLeft(n.left)}))},e}(),w=function(){this.searchResult=(0,a.observable)(""),this.viewportLeft=(0,a.observable)()}},92066:function(e,t,n){"use strict";var i;n.d(t,{o:function(){return r}});var r=function(){function e(){}return Object.defineProperty(e,"current",{get:function(){return i},set:function(e){i=e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"profileId",{get:function(){return i&&i.profileId},enumerable:!1,configurable:!0}),e}()},95429:function(e,t,n){"use strict";n.d(t,{T:function(){return s}});var i,r=["click","touchend"],o="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////JcxjHjf+7/v/H2PzCCFAiDtGeyBCIx7bJJ1mmEEMy6g8mm2c8nrGABB4h2Mkmn//4z/73u773R5qHHu/j/w7Kxkzh5lWRWdsifCkNAnY9Zc1HvDAhjhSHdFkHFzLmabt/AQxSg2wwzLhHIJOBnAWwVY4zrhIYhhc2kvhYDfQ4hDi2Gmh5KyFn8EcGIrHAngNgIwVIEMf5bzbAiTRoAD///8z/KVhkkWEle6IX+d/z4fvH3BShK1e5kmjkCMoxVmXhd4ROlTKo3iipasvTilY21q19ta30/v/0/idPX1v8PNxJL6ramnOVsdvMv2akO0iSYIzdJFirtzWXCZicS9vHqvSKyqm5XJBdqBwPxyfJdykhWTZ0G0ZyTZGpLKxsNwwoRhsx3tZfhwmeOBVISm3impAC/IT/8hP/EKEM1KMdVdVKM2rHV4x7HVXZvbVVKN/qq8CiV9VL9jjH/6l6qf7MBCjZmOqsAibjcP+qqqv0oxqpa/NVW286hPo1nz2L/h8+jXt//uSxCmDU2IK/ECN98KKtE5IYzNoCfbw+u9i5r8PoadUMFPKqWL4LK3T/LCraMSHGkW4bpLXR/E6LlHOVQxmslKVJ8IULktMN06N0FKCpHCoYsjC4F+Z0NVqdNFoGSTjSiyjzLdnZ2fNqTi2eHKONONKLMPMKLONKLMPQRJGlFxZRoKcJFAYEeIFiRQkUWUeYfef//Ko04soswso40UJAgMw8wosososy0EalnZyjQUGBRQGIFggOWUacWUeYmuadrZziQKKEgQsQLAhQkUJAgMQDghltLO1onp0cpkNInSFMqlYeSEJ5AHsqFdOwy1DA2sRmRJKxdKRfLhfLw5BzUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=";function a(){r.forEach((function(e){return window.removeEventListener(e,a)})),document.location.href.match(/radio/)||(i.src=o,i.play().catch((function(e){})))}function s(){!(i=document.getElementById("audio"))&&((i=new Audio).id="audio",document.body.appendChild(i),1)&&r.forEach((function(e){return window.addEventListener(e,a,{once:!0})}))}},47287:function(e,t,n){"use strict";n.d(t,{x:function(){return a}});var i=n(65678),r=n(80543),o=n(3551),a=new(function(){function e(){}return e.prototype.highlightTextInView=function(e,t){e===i.lP.PagesView?this.highlightSearchOnPages(t):e!==i.lP.Home&&e!==i.lP.HotSpotsHub&&e!==i.lP.Radio&&this.highlightSearchInText(t)},e.prototype.highlightSearchInText=function(e){r.A.highlight(e),r.A.confirm()},e.prototype.highlightSearchOnPages=function(e){o.A.confirm(e)},e.prototype.highlightTopicInText=function(e){e?(r.A.highlightTopic(e),r.A.confirmTopic()):r.A.resetHighlightTopic()},e.prototype.highlightTopicInSection=function(e){r.A.highlightSection(e,e),r.A.confirmSection(e)},e}())},87837:function(e,t,n){"use strict";n.d(t,{r:function(){return r}});var i=n(21773),r={appendTo:function(e){return e.createChild("div").addClass("art-div").css("height","".concat((0,i._h)(),"px")).checkpoint((0,i._h)()),r},get html(){return'
')},get height(){return(0,i._h)()}}},85464:function(e,t,n){"use strict";n.d(t,{uW:function(){return g},y5:function(){return d}});var i,r=n(58932),o=n(29583),a=n(13302),s=n(69463),u=n(25778),c=n(26476),l=n(92066),d=(n(96723),function(){function e(e,t,n,i,r){void 0===i&&(i="section-news"),this._innerHeaders=[],this._id=t,this._title=n,this._elm=o('
')),e.append(this._elm),r&&this._elm.css(r),n&&(this._outerHeader=o('')),this._outerHeader.append('

'.concat(n,"

")),e.parent().append(this._outerHeader),this.addInnerHeader(),this._headerWidth=this._outerHeader.outerWidth(!0),this._outerHeader.optimizeForTransform()),this._context=g()}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.innerHeader=function(e){return void 0===e&&(e=0),this._innerHeaders[e]},e.prototype.innerHeaders=function(){return this._innerHeaders},e.prototype.addInnerHeader=function(){var e=this._createInnerHeaderElm();return this._innerHeaders.push(e),e},e.prototype.outerHeader=function(){return this._outerHeader},e.prototype.headerWidth=function(){return this._headerWidth},e.prototype.article=function(){var e=o("
");this._elm.append(e);var t=new h(this,e);return this._children?this._children.push(t):this._children=[t],t},e.prototype.div=function(){var e=o("
");this._elm.append(e);var t=new h(this,e);return this._children?this._children.push(t):this._children=[t],t},e.prototype.column=function(){return this.div()},e.prototype.removeChild=function(e){e&&((0,a.isEmpty)(this._children)||((0,a.remove)(this._children,(function(t){return t===e})),this._children.length||this.remove()))},e.prototype.remove=function(){var e,t,n,i;if(this._elm&&(this._elm.remove(),delete this._elm),this._children){var o=this._children;delete this._children;try{for(var a=(0,r.Ju)(o),s=a.next();!s.done;s=a.next())s.value.remove()}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}}try{for(var u=(0,r.Ju)(this._innerHeaders),c=u.next();!c.done;c=u.next())c.value.fastRemove()}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}this._innerHeaders.length=0,this._outerHeader&&(this._outerHeader.fastRemove(),delete this._outerHeader),delete this._headerWidth,this._context.removeSection(this)},e.prototype.show=function(){return this._elm.show(),this},e.prototype.hide=function(){return this._elm.hide(),this},Object.defineProperty(e.prototype,"hasHeaders",{get:function(){return!!this._title},enumerable:!1,configurable:!0}),e.prototype._createInnerHeaderElm=function(){var e=o('")).optimizeForTransform();return this._elm.append(e),e},e}()),h=function(){function e(e,t){this._parent=e,this._elm=t}return e.prototype.elm=function(){return this._elm},e.prototype.detach=function(){if(!this._elm||this._parentNode)return this;var e=this._elm[0];return e?(this._parentNode=e.parentNode,this._parentNode.removeChild(e),this):this},e.prototype.reattach=function(){if(!this._elm||!this._parentNode)return this;var e=this._elm[0];if(!e)return this;this._parentNode.appendChild(e),delete this._parentNode},e.prototype.createChild=function(e){return e?((0,a.isString)(e)?t=new p(this,this._elm.createChild(e)):(t=new p(this,o(e)),e.parentNode&&this._elm[0]===e.parentNode||this._elm[0].appendChild(e)),this._children?this._children.push(t):this._children=[t],t):new p(this,this._elm);var t},e.prototype.remove=function(){this._children&&delete this._children,this._parentNode&&delete this._parentNode,this._elm&&(this._elm.remove(),delete this._elm),this._parent&&(this._parent.removeChild(this),delete this._parent)},e.prototype.removeChildren=function(){var e,t;if(!(0,a.isEmpty)(this._children))try{for(var n=(0,r.Ju)(this._children),i=n.next();!i.done;i=n.next())i.value.removeElm()}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return delete this._children,this},e.prototype.removeChild=function(e){return e?((0,a.isEmpty)(this._children)||(0,a.remove)(this._children,(function(t){return t===e})),this):this},e.prototype.css=function(){return 1===arguments.length&&(0,a.isString)(arguments[0])?this._elm.css.apply(this._elm,arguments):(this._elm.css.apply(this._elm,arguments),this)},e.prototype.addClass=function(e){return this._elm.addClass(e),this},e.prototype.removeClass=function(e){return this._elm.removeClass(e),this},e.prototype.height=function(){return(0,a.isEmpty)(this._children)?0:(0,a.sumBy)(this._children,(function(e){return e.height()}))},e.prototype.find=function(e){return this._elm.find(e)},e.prototype.bind=function(){return this._elm.bind.apply(this._elm,arguments),this},e.prototype.attr=function(){return this._elm.attr.apply(this._elm,arguments),this},e.prototype.children=function(e){return this._elm.children(e)},e.prototype.animate=function(e,t){return this._elm.animate.apply(this._elm,arguments),this},e.prototype.show=function(){return this._elm.show(),this},e.prototype.hide=function(){return this._elm.hide(),this},e}();!function(e){e[e.Rendered=0]="Rendered",e[e.AboutToBeRemoved=1]="AboutToBeRemoved"}(i||(i={}));var f=o('

a

'),p=function(){function e(e,t){this._html=[],this._idx=0,this._height=0,this._changed=!1,this._nodesIdx=0,this._newNodesIdx=0,this._top=0,this._maxHeight=0,this._events=new s.B,this._parent=e,this._elm=t}return e.prototype.checkpoint=function(e){return arguments.length?(this._idx=this._html.length,this._height+=e,this._newNodes&&(this._newNodesIdx\n
\n
\n
\n
\n

').concat(t,"

\n
\n
\n
\n
\n ")}function _(e){return'
\n
\n
\n

'.concat(e,"

\n
\n
\n
")}function b(e){return e.is(":visible")}var w=null;function C(e){b(e)&&e.fadeOut("fast")}function A(e){e.el.css({opacity:"0.01",display:"block"})}function I(e){e.el.css({opacity:"1",display:"block"})}var S=function(){function e(e,t){this.continuousScrollAnimationStarted=!1,this.viewInstance=e,this.el=t}return e.prototype.stopContinuousScroll=function(){this.viewInstance.stopContinuousScroll(),this.continuousScrollAnimationStarted=!1},e}(),P=function(e){function t(t){return e.call(this,t,r(y("left","Prev")))||this}return(0,i.C6)(t,e),t.prototype.scroll=function(){return this.viewInstance.scrollScreenLeftAlign(d.cf.scrollZone)},t.prototype.startContinuousScroll=function(){this.continuousScrollAnimationStarted||(this.viewInstance.startContinuousScroll(l.OP.Backward,d.cf.scrollZone),this.continuousScrollAnimationStarted=!0)},t.prototype.canScroll=function(){if(this.viewInstance.isAnimating())return!1;var e=(this.viewInstance.visibleColumns()||[])[0];return!!e&&!e.isFirst()},t}(S),x=function(e){function t(t){return e.call(this,t,r(y("right","Next")))||this}return(0,i.C6)(t,e),t.prototype.scroll=function(){return this.viewInstance.scrollScreenRightAlign(d.cf.scrollZone)},t.prototype.startContinuousScroll=function(){this.continuousScrollAnimationStarted||(this.viewInstance.startContinuousScroll(l.OP.Forward,d.cf.scrollZone),this.continuousScrollAnimationStarted=!0)},t.prototype.canScroll=function(){if(this.viewInstance.isAnimating())return!1;var e=this.viewInstance.visibleColumns()||[],t=e[e.length-1];return!!t&&!t.isLast()},t}(S),T=function(){function e(e,t,n){var i=this;this.viewInstance=null,this.left=null,this.right=null,this.newsButton=null,this.moreButton=null,this.tip=!1,this.newsButtonIsVisible=!1,n&&(this.viewInstance=t,Promise.all([u.A.loaded(),c.Dv.loaded()]).then((function(){u.A.get(n,!0)&&(i.left=new P(i.viewInstance),i.right=new x(i.viewInstance),i.newsButton=r(_(c.Dv.val("TextViewer.TipIntro.Title"))),i.moreButton=r(_(c.Dv.val("TextViewer.MoreButton"))),h.A.bind(t,"currentColumnChanged",null,i.onCurrentColumnChanged.bind(i)),i.render(e))})))}return e.prototype.init=function(){var e=this.viewInstance.visibleColumns()[0];this.showInitBlock(e)},e.prototype.updateLayout=function(){this.canScrollLeft()?I(this.left):this.left.el.css("display","none"),this.right&&(this.canScrollRight()&&!this.tip?I(this.right):A(this.right))},e.prototype.render=function(e){var t=this;if(this.viewInstance){var n=function(e){e(),t.updateLayout()};h.A.bind(this.viewInstance,"positionchanged",this.updateLayout.bind(this));var i=function(e,i){e.canScroll()||t.updateLayout();var a=function(e,t){if(r(e.target()).is(".rn-content figure"))return!1;var n=Object.assign(v.Event("singleTapConfirmed"),{pageX:e.position().x,pageY:e.position().y,changedTouches:e.event().changedTouches});return function(e,t){if((0,o.isFunction)(document.elementFromPoint)){!function(e){e.el.translateLeft("-10000px",!0)}(e);var n=r(document.elementFromPoint(t.pageX,t.pageY));!function(e){e.el.translateLeft("0",!0)}(e),function(e,t){t.target=e[0],e.trigger(t)}(n,t)}}(t,n),n.isPropagationStopped()||n.isImmediatePropagationStopped()||p.A.event.clickAndTouch.isHandled(n)}(i,e);return a||n((function(){return e.scroll()})),!1},a=function(e,n){return e.canScroll()?e.startContinuousScroll():t.updateLayout(),!1},s=function(e){e.stopContinuousScroll()};f.Yd.bind(this.right.el,{singleTapConfirmed:function(e){return i(t.right,e)},longPress:function(e){return a(t.right)},contextMenu:function(){return!1},gesturesEnd:function(){return s(t.right)}}),f.Yd.bind(this.left.el,{singleTapConfirmed:function(e){return i(t.left,e)},longPress:function(e){return a(t.left)},contextMenu:function(){return!1},gesturesEnd:function(){return s(t.left)}}),f.Yd.bind(this.newsButton,{singleTapConfirmed:function(){return t.tip?t.viewInstance.scroll(3*-t.viewInstance.columns().width,512):t.viewInstance.controller.scrollToTip(),!1}}),f.Yd.bind(this.moreButton,{singleTapConfirmed:function(){t.canScrollRight()?n((function(){return t.viewInstance.scrollScreenRightAlign(d.cf.scrollZone)})):t.updateLayout()}})}e.append(this.left.el),e.append(this.right.el),[this.newsButton,this.moreButton].forEach((function(t){t.css({display:"none",top:"50%","margin-top":-(t.outerHeight()/2+22)}),e.append(t)})),this.rendered=!0},e.prototype.showInitBlock=function(e){if(e&&this.rendered)if(function(e){for(var t=e;t.nextItem&&t.nextItem.isVisible();)t=t.nextItem;return t.state().expanded}(e))C(this.newsButton);else if((0,m.d)()===s.lP.TopNews)if(void 0===this.viewInstance.direction()&&function(e){var t=e.type(),n=e.columnIdx();return t===g.zX.InitBlock&&0===n}(e))this.showNewsButton(!0);else if(this.viewInstance.direction()===l.OP.Forward){if(this.viewInstance.articlesToTip()>11)return void this.showNewsButton(!1);if(this.viewInstance.articlesToTip()<=1)return void this.hideNewsButton()}else this.hideNewsButton()},e.prototype.hideNewsButton=function(){this.newsButtonIsVisible&&(C(this.newsButton),I(this.right),this.tip=!1,this.newsButtonIsVisible=!1)},e.prototype.showNewsButton=function(e){var t;this.tip=e,this.newsButtonIsVisible||(A(this.right),b(t=this.newsButton)||(w&&clearTimeout(w),w=setTimeout((function(){t.css({right:-t.outerWidth()}).show().animate({right:0},300),w=null}),300)),this.newsButtonIsVisible=!0)},e.prototype.onCurrentColumnChanged=function(e,t){this.newsButton&&this.showInitBlock(t)},e.prototype.canScrollLeft=function(){var e=(this.viewInstance.visibleColumns()||[])[0];return!!e&&!e.isFirst()},e.prototype.canScrollRight=function(){var e=this.viewInstance.visibleColumns()||[],t=e[e.length-1];return!!t&&!t.isLast()},e}()},6176:function(e,t,n){"use strict";n.d(t,{HU:function(){return l},Hv:function(){return g},_E:function(){return s},_G:function(){return u},cq:function(){return p},ee:function(){return m},gO:function(){return d},sV:function(){return f},tC:function(){return c},wf:function(){return i},wp:function(){return h}});var i,r=n(58932),o=n(65678);!function(e){e.ActivePageChanged="[PagesView] ActivePageChanged",e.PageDoubleClicked="[PagesView] PageDoubleClicked",e.PageViewZoomChanging="[PagesView] PageViewZoomChanging",e.PageViewPinch="[PagesView] Pinch",e.PageViewPan="[PagesView] Pan",e.PageViewZoomChanged="[PagesView] PageViewZoomChanged",e.PageViewPagesLoaded="[PagesView] PageViewPagesLoaded",e.PageViewSizeChanged="[PagesView] PageViewSizeChanged",e.PageViewExternalLink="[PagesView] External Link",e.PageView="[PagesView] PageView"}(i||(i={}));var a=function(e){this.payload=e,this.viewName=o.lP.PagesView},s=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.ActivePageChanged,t}return(0,r.C6)(t,e),t}(a),u=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.PageDoubleClicked,t}return(0,r.C6)(t,e),t}(a),c=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.PageViewZoomChanging,t}return(0,r.C6)(t,e),t}(a),l=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.PageViewPinch,t}return(0,r.C6)(t,e),t}(a),d=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.PageViewPan,t}return(0,r.C6)(t,e),t}(a),h=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.PageViewPagesLoaded,t}return(0,r.C6)(t,e),t}(a),f=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.PageViewZoomChanged,t}return(0,r.C6)(t,e),t}(a),p=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.PageViewSizeChanged,t}return(0,r.C6)(t,e),t}(a),m=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.PageViewExternalLink,t}return(0,r.C6)(t,e),t}(a),g=function(e){function t(){var t=e.apply(this,(0,r.fX)([],(0,r.zs)(arguments),!1))||this;return t.type=i.PageView,t}return(0,r.C6)(t,e),t}(a)},64936:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var i=function(){function e(){var e=this;this._state="pending",this._promise=new Promise((function(t,n){e._resolve=function(n){return t(n),e._promise},e._reject=function(t){return n(t),e._promise}})),this._promise.then((function(){e._state="resolved"}),(function(){e._state="rejected"})),this._promise.state=function(){return e._state}}return e.resolve=function(e){return Promise.resolve(e)},e.reject=function(e){return Promise.reject(e)},Object.defineProperty(e.prototype,"resolve",{get:function(){return this._resolve},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"reject",{get:function(){return this._reject},enumerable:!1,configurable:!0}),e.prototype.then=function(e,t){return this._promise.then(e,t)},e.prototype.catch=function(e){return this._promise.catch(e)},e.prototype.finally=function(e){return this._promise.finally(e)},e.prototype.promise=function(){return this._promise},e.prototype.state=function(){return this._state},e}()},65674:function(e,t,n){"use strict";n.d(t,{A:function(){return _}});var i,r,o,a,s=n(58932),u=n(46977),c=n(59823),l=n(62812),d=n(25778),h=n(84531),f=n(58506),p=n(57230);!function(e){e[e.Subscription=0]="Subscription",e[e.Issue=1]="Issue",e[e.Bundle=2]="Bundle"}(i||(i={})),function(e){e[e.Personal=0]="Personal",e[e.Business=1]="Business"}(r||(r={})),function(e){e[e.Month=0]="Month",e[e.Day=1]="Day"}(o||(o={})),function(e){e[e.Subscription=1]="Subscription",e[e.Newspaper=2]="Newspaper",e[e.IRexDeliveryCharge=3]="IRexDeliveryCharge",e[e.BundleProduct=4]="BundleProduct"}(a||(a={}));var m,g=n(13384);function v(e){return(0,s.sH)(this,void 0,Promise,(function(){var t,n;return(0,s.YH)(this,(function(i){switch(i.label){case 0:return"Pending"!==e.Status?[2,e]:(t=window.open(e.ChallengeUrl))?[3,2]:[4,(0,u.A)().confirm((0,g.p3)("v7.Client.Dialogs.ConfirmCreditCard"),(0,g.p3)("Buttons.Cancel.Text"),(0,g.p3)("Buttons.Confirm"))];case 1:i.sent(),t=window.open(e.ChallengeUrl),i.label=2;case 2:return[4,(r=e.OrderId,new Promise((function(e){(0,c.Y)(1e3).pipe((0,l.n)((function(){return(0,p.mD)(r)})),(0,d.p)((function(e){return"Pending"!==e.Status})),(0,h.s)(1)).subscribe(e)})))];case 3:return n=i.sent(),null==t||t.close(),[2,n]}var r}))}))}function y(e){return f.X.get("subscriptions","trial/eligibility",e).then((function(e){return e}),(function(){return{isEligible:!1,notEligibleReason:m.None,promoCode:""}}))}!function(e){e[e.None=0]="None",e[e.TrialWasUsed=1]="TrialWasUsed",e[e.CreditCardWasUsed=2]="CreditCardWasUsed"}(m||(m={}));var _={checkoutWithConfirmation:function(e){return(0,s.sH)(this,void 0,Promise,(function(){var t;return(0,s.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,p.Pt)(e)];case 1:return[4,v(t=n.sent())];case 2:if("Declined"===(t=n.sent()).Status)throw new Error((0,g.p3)("Checkout.DeclinedMessage"));if("Approved"!==t.Status)throw new Error(t.Status);return[2,t]}}))}))},getUserPromoEligibility:y,getPurchaseProducts:function(e){return(0,s.sH)(this,arguments,Promise,(function(e){var t,n,r,o,a,u,c,l,d,h,f=e.issueId;return(0,s.YH)(this,(function(e){switch(e.label){case 0:return t={issueId:f},[4,y()];case 1:return(n=e.sent()).isEligible&&(t.promoCode=n.promoCode),[4,(0,p.q6)(t)];case 2:return r=e.sent(),o=null===(l=r.Products)||void 0===l?void 0:l.find((function(e){return e.Type===i.Issue})),a=null===(d=r.Products)||void 0===d?void 0:d.find((function(e){return e.Type===i.Subscription})),u=null===(h=r.AllProducts)||void 0===h?void 0:h.find((function(e){return e.Type===i.Subscription&&!e.IsUnlimitedIssues&&e.NumberOfIssues>0})),c=r.Bundles&&r.Bundles[0],[2,{singleIssueProduct:o,premiumProduct:a,selectProduct:u,singleTitleProduct:c}]}}))}))}}},5135:function(e,t,n){"use strict";n.d(t,{C:function(){return w},j:function(){return y}});var i,r=n(29583),o=n(13302),a=n(69463),s=n(25778),u=n(75054),c=n(2175),l=n(58932),d=n(96543),h=n(16213),f=n(82230),p=n(16832);!function(e){e[e.Uploading=1]="Uploading",e[e.Uploaded=2]="Uploaded"}(i||(i={}));var m,g=function(e){function t(t){var n=e.call(this,100)||this;if(n._history=[],!t)throw new Error("Cannot create HistoryUploader instance: invalid dataProvider.");return n._dataProvider=t,n}return(0,l.C6)(t,e),t.prototype.upload=function(e,t){var n;void 0===t&&(t=!1),(0,o.isEmpty)(e)||((n=this._history).push.apply(n,(0,l.fX)([],(0,l.zs)(e),!1)),t?this._uploadBufferData():this._uploadBufferDataDebounced(),d.A.global.trigger("uploadingArticlesHistory",[e]))},t.prototype._uploadBufferData=function(){var e=this;if(this._history.length){var t=this._history;if(this._history=[],t.length){var n=t.map((function(e){return e.historyStatus=i.Uploading,{Id:e.Id,Type:e.Type,Data:e.Data,Reason:e.historyReason}}));f.A.post("TopNewsFeed","AddHistory",JSON.stringify(n),{contentType:"application/json"}).then((function(n){var r=n;if(r){var o=t.filter((function(t){if(t.tokenized())return!1;var n=t.provider();return!(!n||n!==e._dataProvider||(t.historyStatus=i.Uploaded,t.tokenized(!0),0))}));o.length&&e._dataProvider.appendBundle(o,r,r),e._uploadBufferData()}}),(function(e){h.A.error(new Error("Can't upload history: ".concat(e,".")))}))}}},t}(p.C),v=n(4610),y=50;!function(e){e[e.Enable=0]="Enable",e[e.Disable=1]="Disable",e[e.Purge=2]="Purge"}(m||(m={}));var _=!0,b=new a.B,w=function(){function e(e,t,n){void 0===n&&(n=!1),this.viewName=e,this._reading=[],this._historyItemIds={},this._history=[],c.modal.on("set",this._onModalStateSet.bind(this)),c.modal.on("reset",this._onModalStateReset.bind(this)),this._onPurge.subscribe(this._purge.bind(this)),this._readingStatsUploader=new v.U(e),this._enableHistory=n,n&&(this._historyUploader=new g(t))}return e.enable=function(){_||(_=!0,b.next(m.Enable))},e.disable=function(){_&&(_=!1,b.next(m.Disable))},Object.defineProperty(e.prototype,"_onEnabled",{get:function(){return b.pipe((0,s.p)((function(e){return e===m.Enable})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_onDisabled",{get:function(){return b.pipe((0,s.p)((function(e){return e===m.Disable})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_onPurge",{get:function(){return b.pipe((0,s.p)((function(e){return e===m.Purge})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_enabled",{get:function(){return _},enumerable:!1,configurable:!0}),e.prototype._upload=function(e){if(void 0===e&&(e=!1),this._enableHistory&&this._history.length&&(this._historyUploader.upload(this._history,e),this._history=[]),this._reading.length){var t=this._reading.some((function(e){return!!e.actions.length}))?this._reading:this._reading.filter((function(e){return e.totalTime>=y}));t.length&&this._readingStatsUploader.upload(t,e),this._reading=[]}},e.prototype._purge=function(){this._enableHistory&&this._historyUploader.purge(),this._readingStatsUploader.purge()},e.prototype._onModalStateSet=function(){this._reading.length&&(0,o.last)(this._reading).pause()},e.prototype._onModalStateReset=function(){this._reading.length&&(0,o.last)(this._reading).resume()},e}();u.eF.subscribe((function(){b.next(m.Purge),w.disable()})),u.LY.subscribe((function(){w.enable()})),r(window).on("unload",(function(){b.next(m.Purge)}))},66795:function(e,t,n){"use strict";var i=n(58932),r=n(13302),o=n(29583),a=n(7443),s=n(5135),u=n(89885),c=n(96543),l=n(1991),d=n(4610),h=n(23880),f=[u.cf.fling,u.cf.bounce,u.cf.mouseWheel,u.cf.keyPress,u.cf.alignmentCorrection],p=new d.U,m=function(e){function t(t,n,i,o){void 0===o&&(o=!1);var a=e.call(this,n,i,o)||this;return a._lastScrollReason=-1,a._currentFrame=null,a._pushHistory=[],a._uploadPushHistoryDebounced=(0,r.debounce)(a._uploadPushHistory.bind(a),10),a._view=t,c.A.bind(t,"invalidated",null,a._onReadingStarted.bind(a)),c.A.bind(t,"beforeScroll",null,a._onBeforeScroll.bind(a)),c.A.bind(t,"hide",null,a._onReadingStopped.bind(a)),a._onEnabled.subscribe(a._onReadingStarted.bind(a)),a._onDisabled.subscribe(a._onReadingStopped.bind(a)),a}return(0,i.C6)(t,e),t.startSingleArticleReading=function(e){var t=new l.h9(l.Tq.Passive);if(t){var n=t.item(e);n.isExpanded=!0,n.visibilityRate=1}return t},t.stopSingleArticleReading=function(e){e&&(e.freeze(),e.totalTime>=s.j&&p.upload([e]))},t.prototype.pushToHistory=function(e,t){!this._enableHistory||e.tokenized()||e.Id in this._historyItemIds||(this._pushHistory.push(e),e.historyReason=t,this._historyItemIds[e.Id]=1,this._uploadPushHistoryDebounced())},t.prototype._purge=function(){e.prototype._purge.call(this),this._uploadPushHistory()},t.prototype._onReadingStarted=function(){this._enabled&&this._view.isUpdateable()&&(this._lastScrollReason||!this._currentFrame?this._setCurrentFrame(this._checkColumns(this._view.viewport(),new l.h9(l.Tq.Passive,this.viewName))):this._updateCurrentFrame(this._view.viewport()),this._lastScrollReason=0)},t.prototype._onReadingStopped=function(){this._reading.length&&(0,r.last)(this._reading).freeze(),this._upload()},t.prototype._onBeforeScroll=function(e,t){var n=t.delta,i=t.reason;if(this._enabled){var o=this._view.viewport(),a=o.left,s=o.right;n<0?s-=n:a-=n,i===u.cf.drag?this._processDrag({left:a,right:s},i):(0,r.includes)(f,i)&&this._processScrollAnimation({left:a,right:s}),this._lastScrollReason=i}},t.prototype._setCurrentFrame=function(e){this._currentFrame&&(this._currentFrame.freeze(),this._upload()),this._currentFrame=e,e&&this._reading.push(e)},t.prototype._updateCurrentFrame=function(e){this._currentFrame&&this._checkColumns(e,this._currentFrame.resetDataItems())},t.prototype._processDrag=function(e,t){this._lastScrollReason===t?this._updateCurrentFrame(e):this._setCurrentFrame(this._checkColumns(e,new l.h9(l.Tq.Active,this.viewName)))},t.prototype._processScrollAnimation=function(e){(0,r.includes)(f,this._lastScrollReason)?this._updateCurrentFrame(e):this._setCurrentFrame(this._checkColumns(e,new l.h9(l.Tq.Animation,this.viewName)))},t.prototype._checkColumns=function(e,t){var n=this;void 0===t&&(t=null);var i=this._view.columns();if(i.isEmpty())return null;var o=!1,s=0;return i.forEach((function(i){var u=i.intersectsWith(e),c=i.intersectsWith(e,!0),l={};if((0,r.chain)(i.layouts()).filter((function(e){return!!e})).map((function(e){return e.dataItem()})).forEach((function(e){if(t&&c)if(e.Type===a.p.article)l[e.Id]=t.item(e).addColumnStats(i);else if((0,r.isFunction)(e.takeReadingStats)){var o=e.takeReadingStats();o.dataItems.forEach((function(e){l[e.Id]=t.item(e)})),o.actions.forEach((function(e){return t.action(e)}))}!n._enableHistory||e.tokenized()||e.Id in n._historyItemIds||(n._history.push(e),n._historyItemIds[e.Id]=1)})).commit(),t&&u&&(0,r.chain)(i.cells()).map((function(t){return{size:t.visibleSize(e),contentId:t.smartFlowItemId}})).filter((function(e){var t=e.size,n=e.contentId;return t&&n})).forEach((function(e){var t=e.size,n=t.width,i=t.height,r=e.contentId,o=n*i;r in l&&(l[r].size+=o),s+=o})).commit(),!u&&o)return!1;switch(u&&(o=!0),i.type()){case h.zX.ImagesHeadline:case h.zX.SectionHeader:return n._checkHeadlinesColumns(i),!0;case h.zX.AdBlock:return n._checkAdBlockColumns(i),!0}return!0})),t&&t.count?(t.size=s,t):null},t.prototype._checkHeadlinesColumns=function(e){var t,n=this;if(this._enableHistory){var a=(0,r.find)(e.cells().map((function(e){var t=null;return e.elm.find("article").each((function(e,n){return!(t=o(n).attr("aid"))})),t})),(function(e){return!!e})),s=this._view.controller.dataFeedManager().getArticleById(a);if(s&&!s.tokenized()&&!(s.Id in this._historyItemIds)){var u=s.group();if(u&&u.raw()&&4!==u.raw().GroupType){var c=u.articles();(t=this._history).push.apply(t,(0,i.fX)([],(0,i.zs)(c),!1)),(0,r.forEach)(c,(function(e){n._historyItemIds[e.ArticleId]=1}))}}}},t.prototype._checkAdBlockColumns=function(e){if(this._enableHistory){var t=e.data();!t||t.tokenized()||t.getId()in this._historyItemIds||(this._history.push(t),this._historyItemIds[t.getId()]=1)}},t.prototype._uploadPushHistory=function(){this._enableHistory&&!(0,r.isEmpty)(this._pushHistory)&&(this._historyUploader.upload(this._pushHistory),this._pushHistory=[])},t}(s.C);t.A=m},1991:function(e,t,n){"use strict";n.d(t,{h9:function(){return d},Tq:function(){return r},K8:function(){return o}});var i,r,o,a=n(65678),s=n(13302),u=n(58932),c=function(){function e(e){this.size=0,this.visibilityRate=0,this.isExpanded=!1,this._reading=null,this._stats=null,this._article=e}return Object.defineProperty(e.prototype,"article",{get:function(){return this._article},enumerable:!1,configurable:!0}),e.prototype.addColumnStats=function(e){var t=this,n=e.state();return n?(this.isExpanded=this.isExpanded||n.expanded,(n=n.rendering)&&(n=n[this._article.Id])&&(n=n.text)?(this._reading||(this._reading={}),(0,s.forIn)(n,(function(e,n){n in t._reading?t._reading[n].lines+=e.lines:t._reading[n]=(0,u.Cl)({},e)})),this._stats=null,this):this):this},Object.defineProperty(e.prototype,"startPosition",{get:function(){var e=this.stats;return e?e.start:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endPosition",{get:function(){var e=this.stats;return e?e.end:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stats",{get:function(){var e=this;if(!this._stats)if(this._reading){var t=!1,n=this._article.textLength(),i=0,r=0,o=0;(0,s.forEach)(this._article.Blocks,(function(a,s){var u="string"==typeof a?a:a.Text;if(s in e._reading){var c=e._reading[s];if(t||(r=(u.length*c.start/c.outof+i)/n,t=!0),c.lines+c.start0?this._uploadBufferData():this._uploadBufferDataDebounced())},t.prototype._uploadBufferData=function(){if(this._readingMap&&d.online()){var e=new Date;this._readingMap.userCurrentTime=e.toISOString(),this._readingMap.userTimeOffset=e.getTimezoneOffset(),f.A.post("ReadArticles","Add",JSON.stringify(this._readingMap),{contentType:"application/json"}),this._readingMap=null}},t}(m.C)},4610:function(e,t,n){"use strict";n.d(t,{U:function(){return C}});var i=n(58932),r=n(13302),o=n(82230),a=n(58735),s=function(e){},u=n(1991),c=n(16832),l=n(98534),d=n(37618),h=n(98874),f=n(23304),p=n(47944),m=n(88967),g=n(89247),v=l.d.deviceInfo,y=l.d.osInfo,_=l.d.browserInfo,b=l.d.sessionInfo,w={device:(0,d.L)(v),os:(0,h.f)(y),application:(0,f.f)(_),session:(0,p.F)(b)},C=function(e){function t(t){void 0===t&&(t=u.K8.Articles);var n=e.call(this)||this;return n._viewName=t,n}return(0,i.C6)(t,e),t.prototype.upload=function(e,t){var n;if(void 0===t&&(t=!1),!(0,r.isEmpty)(e)){var o=this._processReadingStats(e);this._model?(n=this._model.frames).push.apply(n,(0,i.fX)([],(0,i.zs)(o),!1)):this._model=(0,i.Cl)((0,i.Cl)({},w),{pageView:{id:null,url:(0,m.t)((0,g.Ti)()),referer:null},userCurrentTime:null,userTimeOffset:null,view:this._viewName,frames:o}),this._model.frames.length>=0||t?this._uploadBufferData():this._uploadBufferDataDebounced()}},t.prototype._uploadBufferData=function(){if(this._model){if(a.online()){var e=new Date;this._model.userCurrentTime=e.toISOString(),this._model.userTimeOffset=e.getTimezoneOffset(),o.A.post("ReadArticles","Add",JSON.stringify(this._model),{contentType:"application/json"})}else this._storeBufferData();this._model=null}},t.prototype._processReadingStats=function(e){var t=this;if((0,r.isEmpty)(e))return null;var n=(0,r.chain)(e).filter((function(e){return"text"===e.type})).map((function(e){return t._processTextFrame(e)})).value();return n.length?n:null},t.prototype._processTextFrame=function(e){var t={StartTime:e.startTime,Duration:e.totalTime,ReadingDuration:e.totalTime-e.inactiveTime,Actions:e.actions.slice(),Items:[],FrameType:e.frameType};return(0,r.forIn)(e.articles,(function(e){var n={Id:e.article.Id,Type:e.article.Type,VisibleAreaOffset:e.startPosition,VisibleAreaSize:e.endPosition-e.startPosition,VisibilityRate:e.visibilityRate,Expanded:e.isExpanded,ArticleLanguage:e.article.Language,SourceLanguage:e.article.OriginalLanguage,Enriches:e.article.Enriches};e.article.ArticleId&&(n.Id=e.article.ArticleId),t.Items.push(n)})),t},t.prototype._storeBufferData=function(){s(this._model)},t}(c.C)},58506:function(e,t,n){"use strict";n.d(t,{X:function(){return f}});var i=n(58932),r=n(13302),o=n(15397),a=n(30212),s=n(58735),u=n(32512),c=n(98177);function l(e){return!0===e||"true"===e}function d(e,t){return(0,i.sH)(this,arguments,void 0,(function(e,t){var n,r,d,h,f,p,m,g,v,y,_,b,w,C,A=t.url,I=t.service,S=t.command,P=t.data,x=t.requestConfig;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return x||(x={}),x.serviceName||(x.serviceName="".concat(I).concat(S?"/".concat(S):"")),[4,Promise.all([s.authorized(),(0,o.kq)("services",{})])];case 1:return n=i.zs.apply(void 0,[t.sent(),2]),r=n[0],d=n[1],h=d[I]||{},f=(0,u.H_)()||l(h.httpsrequired)||l(h.httpsRequired),p=!1,m={},g=(0,u.pc)(),h.cdnProfile&&(v=(0,o.Ct)("cdnProfiles",{})[h.cdnProfile])&&(!v.httpsBaseUrl&&f||(y=function(e){return e.indexOf("://")>0&&(e=e.substr(e.indexOf("/",8))),e}(g),f=f||l(v.httpsRequired),g=function(e,t){return"/"===e[e.length-1]&&"/"===t[0]&&(t=t.substr(1)),e+t}(g=f?v.httpsBaseUrl:v.baseUrl,y),p=!0)),_="".concat(g).concat(I,"/"),p||(m.Authorization="Bearer ".concat(r)),f&&(_=_.replace(/^http:\/\//i,"https://")),S&&(_+=S),b={maxRetries:x.disableRetry?0:3},w=(0,i.Cl)((0,i.Cl)({},b),h.retryPolicy),C=(0,i.Cl)((0,i.Cl)({method:e,url:A||_,data:"GET"===e?null:P,query:"GET"===e?P:null},x),{headers:(0,i.Cl)((0,i.Cl)({},m),x.headers)}),[4,new Promise((function(e,t){(0,u.Ez)(C,w).then((function(t){try{e(t)}catch(e){(0,a.z)("Unable call resolve on deferred in service call: ".concat(_),e)}})).catch((function(e){try{t(new c.A(e))}catch(e){(0,a.z)("Unable call reject on deferred in service call: ".concat(_),e)}}))}))];case 2:return[2,t.sent()]}}))}))}function h(e){for(var t=[],n=1;n0&&"string"==typeof t[0]&&(a=t[0],t=t.slice(1));var s=void 0;t.length>0&&(s="object"==typeof t[0]?(0,r.cloneDeep)(t[0]):void 0===t[0]?{}:t[0],t=t.slice(1));var u=void 0;return t.length>0&&(u=t[0],t=t.slice(1)),d(e,{service:o,command:a,data:s,requestConfig:u})}var c=(0,i.Cl)({},t[0]);return"object"==typeof c.data?c.data=(0,r.cloneDeep)(c.data):void 0===c.data&&(c.data={}),c.requestConfig&&(c.requestConfig=(0,r.cloneDeep)(c.requestConfig)),d(e,c)}var f={baseUrl:u.pc,get:function(){for(var e=[],t=0;t2?e[2]:null;try{var a=o(n);setTimeout((function(){try{i.apply(null,a)}catch(e){r&&r()}}),0)}catch(e){if(!r)throw new Error(e);r()}}},56856:function(e,t,n){"use strict";n.d(t,{A:function(){return p}});var i=n(27189),r=n(58932),o=n(13302),a=n(92188),s=n(58735),u=n(53308),c=n(45235),l=n(44260),d={testChunks:!1,minFileSize:1,permanentErrors:[0,400,403,404,413,415,500,501],headers:{}},h=function(){function e(e,t,n){if(this.createFileUrl="",this.finalizeUrl="",this.storage="",this.serverUrl="",(0,c.gP)(e))throw new Error("serverUrl is empty");if((0,c.gP)(t))throw new Error("storage is empty");this.storage=t,this.serverUrl=(0,o.trimEnd)(e,"/"),this.options=(0,r.Cl)((0,r.Cl)({},d),n)}return e.prototype.upload=function(e){var t=this;return Promise.all([s.authorized(),l.Ay.loaded()]).then((function(e){var n=(0,r.zs)(e,1)[0];t.createFileUrl="".concat(t.serverUrl,"/create/").concat(t.storage),t.options.headers.Authorization="Bearer ".concat(n)})).then((function(){return t.createResumable({uploadInfo:{},onFileAdded:null==e?void 0:e.onFileAdded,onUploadStart:null==e?void 0:e.onUploadStart,onProgress:null==e?void 0:e.onProgress})})).then((function(e){return t.openDialog(e)})).then((function(e){return t.createFile(e)})).then((function(e){return t.startUploading(e)})).then((function(e){return t.finalizeUploading(e)}))},e.prototype.openDialog=function(e){var t=this;return new Promise((function(n){var i=t.createFileInput(t.options.allowedExtensions);i.addEventListener("input",(function(t){e.file=t.target.files[0],n(e)})),i.focus(),i.dispatchEvent(new MouseEvent("click"))}))},e.prototype.createFile=function(e){var t=this;return(0,u.zA)({url:this.createFileUrl,data:{contentType:e.file.type},requestConfig:{contentType:"application/json"}}).then((function(n){return e.id=n.id,e.fileId="".concat(t.storage,"/").concat(n.id),e.resumable.opts.target="".concat(t.serverUrl,"/append/").concat(t.storage,"/").concat(n.id),t.finalizeUrl="".concat(t.serverUrl,"/finalize/").concat(t.storage,"/").concat(n.id),e}))},e.prototype.createResumable=function(e){var t=this;return new Promise((function(n,i){var r=new a(t.options);r.support||i(new Error("Resumable.js not supported")),(0,o.isFunction)(e.onFileAdded)&&r.on("fileAdded",(function(){e.onFileAdded(e.uploadInfo)})),(0,o.isFunction)(e.onUploadStart)&&r.on("uploadStart",(function(){return e.onUploadStart(e.uploadInfo.fileId)})),(0,o.isFunction)(e.onProgress)&&r.on("progress",(function(){e.onProgress(Math.floor(100*r.progress()))})),e.uploadInfo.resumable=r,n(e.uploadInfo)}))},e.prototype.startUploading=function(e){return new Promise((function(t,n){var i=e.resumable;i.on("complete",(function(){t(e)})),i.on("fileError",(function(e,t){n(new Error(t))})),i.on("fileError",(function(e,t){n(new Error(t))})),i.on("fileAdded",(function(){i.upload()})),i.addFile(e.file)}))},e.prototype.finalizeUploading=function(e){return(0,u.yd)({url:this.finalizeUrl})},e.prototype.createFileInput=function(e){var t=document.createElement("input");return t.setAttribute("type","file"),t.style.opacity="0",t.style.display="none",(0,c.gP)(e)&&t.setAttribute("accept",e),t},e}(),f={maxFiles:1,maxFileSize:1e7,chunkSize:1e6,allowedExtensions:".jpeg,.jpg,.gif,.png",method:"octet",uploadMethod:"PUT"},p=function(){function e(e,t){void 0===t&&(t=f),this.storage=e,this.options=t,this.fileUpload=null}return e.prototype.upload=function(e){return this.getFileUpload().then((function(t){return t.upload(e)}))},e.prototype.getFileUpload=function(){var e=this;return null===this.fileUpload?i.A.getAsync("imageServer.upload.url").then((function(t){return e.fileUpload=new h(t,e.storage,e.options),e.fileUpload})):Promise.resolve(this.fileUpload)},e}()},66687:function(e,t,n){"use strict";n.d(t,{f:function(){return i}});var i=function(){function e(e){this._cache={},this._textBlockOffsetMap={},e&&(this._article=e)}return e.textBlockCacheKey=function(e,t,n){if(t<0||!e&&t>=3){var i="".concat(t,"_").concat(e);return!e&&t>=3&&n&&n.disableArtLeadFormatting&&(i+="_noArtLead"),i}return e.toString()},e.fromJSON=function(t){var n=new e;return t&&(n._cache=t),n},e.prototype.get=function(t,n,i){void 0===n&&(n=0);var r=e.textBlockCacheKey(t,n,i);return this._cache[r]},e.prototype.getAll=function(e,t){void 0===e&&(e=0);var n="all_".concat(e);return this._cache[n]},e.prototype.getInitialOffset=function(t,n,i){return this._textBlockOffsetMap[e.textBlockCacheKey(t,n,i)]||0},e.prototype.toJSON=function(){return this._cache},e.prototype.reset=function(){this._cache={},this._textBlockOffsetMap={}},e}()},69895:function(e,t,n){"use strict";var i;n.d(t,{_:function(){return i}}),function(e){e.Base="base",e.Ad="ad",e.Annotation="annotation",e.Comments="comments",e.ContinuedFromLink="continuedFromLink",e.Image="image",e.RelatedAd="related.ad",e.Related="related",e.FullTitle="fullTitle",e.Title="title",e.Subtitle="subtitle",e.Tools="tools",e.Video="video",e.Text="text",e.TranslationBar="translationBar"}(i||(i={}))},77990:function(e,t,n){"use strict";n.d(t,{i:function(){return h}});var i=n(58932),r=n(29583),o=n(13302),a=n(92066),s=n(48389),u=n(85464),c=n(16213),l=n(77409),d=[],h=function(){function e(){var e=this;this._tasks=[],this._articleElms={},this._panel=d.length?d.pop():r("
").css({position:"absolute",left:"-100000px",width:"1px",height:"1px",overflow:"hidden",visibility:"hidden"}).addClass("optimizeForTempCalculations"),this._elms=(0,u.uW)(this._panel),this.getArticleElm=this._getArticleElm.bind(this),this.getSectionElm=function(){return e._elms.section()}}return e.prototype.mutate=function(e){return this._mutate(0,e)},e.prototype.measure=function(e){return this._measure(0,e)},e.prototype.execute=function(){var e,t,n,r,o,s,u=a.o.current.textViewContainer.elm();try{for(var l=(0,i.Ju)(this._tasks),d=l.next();!d.done;d=l.next()){var h=d.value,f=h.mutateTasks,p=h.measureTasks;if(f.length)try{for(var m=(n=void 0,(0,i.Ju)(f)),g=m.next();!g.done;g=m.next()){var v=g.value;try{v()}catch(e){c.A.error(e)}}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}if(p.length){u.append(this._panel);try{for(var y=(o=void 0,(0,i.Ju)(p)),_=y.next();!_.done;_=y.next()){v=_.value;try{v()}catch(e){c.A.error(e)}}}catch(e){o={error:e}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}this._panel.detach()}}}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}this.dispose()},e.prototype.executeAsync=function(){var e=this;return this._tasks.length?new Promise((function(t){var n,r,o,s=a.o.current.textViewContainer.elm(),u=l.S;try{for(var c=(0,i.Ju)(e._tasks),d=c.next();!d.done;d=c.next()){var h=d.value,f=h.mutateTasks,p=h.measureTasks;f.length&&(u=u.mutate.apply(u,(0,i.fX)([],(0,i.zs)(f),!1))),p.length&&(u=(o=u.mutate((function(){return s.append(e._panel)}))).measure.apply(o,(0,i.fX)([],(0,i.zs)(p),!1)).mutate((function(){return e._panel.detach()})))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}u.mutate((function(){e.dispose(),t()}))})):Promise.resolve()},e.prototype.dispose=function(){(0,o.forIn)(this._articleElms,(function(e){e.remove()})),this._articleElms=null,this._elms=null,d.push(this._panel),this._tasks=null,this._panel=null},e.prototype._getArticleElm=function(e){if(void 0===e&&(e=0),e in this._articleElms)return this._articleElms[e];var t=this._articleElms[e]=this._elms.section().article().addClass("optimizeForTempCalculations").addClass("art");return e in s.BX?t.addClass(s.BX[e]):e<0&&t.addClass("art-stack"),t},e.prototype._getTasks=function(e){return this._tasks[e]||(this._tasks[e]={mutateTasks:[],measureTasks:[]}),this._tasks[e]},e.prototype._measure=function(e,t){var n=this;return this._getTasks(e).measureTasks.push(t),{mutate:function(t){return n._mutate(e+1,t)}}},e.prototype._mutate=function(e,t){var n=this;return this._getTasks(e).mutateTasks.push(t),{measure:function(t){return n._measure(e,t)}}},e}()},67010:function(e,t,n){"use strict";n.d(t,{G:function(){return d},n:function(){return i}});var i,r,o=n(13302),a=n(69463),s=n(25778),u=n(26476),c=n(48389),l=n(92066);!function(e){e[e.Unknown=-1]="Unknown",e[e.Column=0]="Column",e[e.Figure=1]="Figure",e[e.Header=2]="Header",e[e.MyTitles=3]="MyTitles",e[e.ImagesHeader=4]="ImagesHeader"}(i||(i={})),function(e){e[e.CellRemoved=0]="CellRemoved"}(r||(r={}));var d=function(){function e(){this._blocks=[],this._context=l.o.current,this._eventsSubject=new a.B;var e=4===arguments.length?{elm:arguments[0],colspan:arguments[1],top:arguments[2],height:arguments[3]}:arguments[0],t=e.elm,n=e.colspan,r=e.top,o=e.height,s=e.nopadding,u=void 0!==s&&s,c=e.smartFlowItemId,d=void 0===c?null:c,h=e.type,f=void 0===h?i.Unknown:h,p=e.layout,m=void 0===p?null:p;this._elm=t.css({top:"".concat(r,"px"),left:"0px"}),this.colspan=n,this.top=r,this.height=o,this.nopadding=u,this.smartFlowItemId=d,this.type=f,this.layout=m}return e.prototype.remove=function(){this._elm&&(this._elm.remove(),this._elm=null,this._blocks=null,this._eventsSubject.next(r.CellRemoved),this._eventsSubject.complete())},e.prototype.onRemoved=function(){for(var e=this,t=[],n=0;n=n||r<=t?null:(in&&(r=n),{width:r-i,height:this.height||0})},Object.defineProperty(e.prototype,"left",{get:function(){return this._left},set:function(e){this._left!==e&&(this._left=e,this._elm&&this._elm.css("left",e))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elm",{get:function(){return this._elm},enumerable:!1,configurable:!0}),e.prototype.addBlock=function(e){return this._blocks.indexOf(e)<0&&this._blocks.push(e),this},Object.defineProperty(e.prototype,"blocks",{get:function(){return this._blocks},enumerable:!1,configurable:!0}),e.prototype.show=function(){return this._elm&&this._elm.show(),this},e.prototype.hide=function(){return this._elm&&this._elm.hide(),this},e}()},23880:function(e,t,n){"use strict";n.d(t,{fd:function(){return w},zX:function(){return g},Sl:function(){return C}});var i,r=n(58932),o=n(13302),a=n(69463),s=n(25778),u=n(26476),c=n(32787),l=n(92066),d=n(48389),h=n(67010),f=n(21773),p=n(29583);function m(e){return p('
'))}!function(e){e[e.Default=0]="Default",e[e.Horizontal=1]="Horizontal"}(i||(i={}));var g,v,y,_=function(){function e(e){this._dividers=[],this._panel=e}return e.prototype.getDivider=function(e,t){if(void 0===e&&(e=i.Default),e===i.Horizontal){var n=m("art-div");return this._panel.append(n),t&&n.width((0,d.y6)(t)),n}if(this._dividers.length)return this._dividers.pop();var r=m("col-div");return this._panel.append(r),r},e.prototype.recycle=function(e){e.hasClass("col-div")&&this._dividers.push(e.css("left",-1e4))},e}();function b(e,t){return e.top-t.top}!function(e){e[e.Content=0]="Content",e[e.Misc=1]="Misc",e[e.SectionHeader=2]="SectionHeader",e[e.Header=3]="Header",e[e.CategoryTail=3]="CategoryTail",e[e.ImagesHeadline=4]="ImagesHeadline",e[e.Replies=6]="Replies",e[e.InitBlock=7]="InitBlock",e[e.Monitors=11]="Monitors",e[e.CoverBlock=12]="CoverBlock",e[e.Opinion=13]="Opinion",e[e.HomeBlock=14]="HomeBlock",e[e.SocialInfo=15]="SocialInfo",e[e.AdBlock=16]="AdBlock",e[e.Profile=17]="Profile",e[e.BookmarkPages=18]="BookmarkPages",e[e.RecommendedOpinions=19]="RecommendedOpinions",e[e.PromoSection=20]="PromoSection",e[e.Gift=22]="Gift",e[e.GiftVideoAd=25]="GiftVideoAd",e[e.Social=26]="Social",e[e.Onboarding=27]="Onboarding"}(g||(g={})),function(e){e[e.Disposed=1]="Disposed",e[e.Disposing=2]="Disposing"}(v||(v={}));var w=function(e){function t(t){var n=e.call(this)||this;return n._context=l.o.current,n._cells=[],n._events=new a.B,n._left=-1e4,n._colspan=1,n._isVisible=!0,n._layouts=[],n._bundle=null,n._articleIdx=-1,n._columnIdx=-1,n._articleColumnsCount=1,n._articlesCount=1,n._section=null,n._type=g.Content,n._idx=-1,n._isFirst=!1,n._isLast=!1,n._state=null,n._noDividers=!1,n._noHeaderAbove=!1,n._anchors=null,t&&c.ck.linkItems(t,n),n._events=new a.B,n}return(0,r.C6)(t,e),t.resize=function(e,t,n){y=n},t.prototype.left=function(e){return arguments.length?(this._left!==e&&(this._left=e,this._cells.filter((function(e){return!!e})).forEach((function(t){t.left=e+(t.nopadding?0:d.Dh)})),this._divider&&this._divider.css("left",e)),this):this._left},t.prototype.move=function(e){return this.left(this._left+e)},t.prototype.isVisible=function(){var e=!1,t=this._left;(0,o.isNumber)(arguments[0])?t=arguments[0]:(0,o.isBoolean)(arguments[0])&&(e=arguments[0]),2===arguments.length&&(0,o.isBoolean)(arguments[1])&&(e=arguments[1]);var n=t+this._context.textViewScroller.left,i=n+(e?this.width():this.colspanWidth());return n>=y.left&&ny.left&&i<=y.right||ny.right},t.prototype.width=function(e){return arguments.length?(this._width=e,this):this._width||d.zt},t.prototype.colspanWidth=function(){for(var e=this.width(),t=this._next,n=1;n=e.left&&ne.left&&i<=e.right||ne.right},t.prototype.addCell=function(e){this._cells.push(e),e.column=this,e.left=this._left,this._colspan=Math.max(this._colspan,e.colspan)},t.prototype.removeCell=function(e){for(var t=0;te}))},t.prototype.cells=function(){return this._cells},t.prototype.visibleCells=function(e){if(void 0===e&&(e=this._left),!this.isVisible(e)||!this._isVisible)return null;var t=e+this._context.textViewScroller.left;return this._cells.filter((function(e){var n=t+d.zt*e.colspan;return t<=y.right&&n>y.left}))},t.prototype.split=function(e){var t=[[],[]],n=null,i=null;this._cells.forEach((function(r){var o=r.top;o<=e?(t[0].push(r),o+r.height>e&&(i=r.smartFlowItemId,n=r.layout)):t[1].push(r)}));var r=null,o=null,a={cells:[],layout:n},s={};return t[0].forEach((function(e){var t=e.smartFlowItemId;t===i?a.cells.push(e):(r||(r={cells:[],layouts:[]}),r.cells.push(e),t in s||(s[t]=0,r.layouts.push(e.layout)))})),t[1].forEach((function(e){var t=e.smartFlowItemId;t===i?a.cells.push(e):(o||(o={cells:[],layouts:[]}),o.cells.push(e),t in s||(s[t]=0,o.layouts.push(e.layout)))})),r?(this._cells=r.cells,this._layouts=r.layouts):(this._cells=a.cells,this._layouts=[a.layout]),{above:r,below:o,clicked:a}},t.prototype.dispose=function(e){this._events.next(v.Disposing),this._cells&&this._cells.filter((function(e){return!!e})).forEach((function(e){e.remove()})),delete this._cells,delete this._layouts,delete this._bundle,this._divider&&(this._dividers().recycle(this._divider),delete this._divider);var t=this.detach(e);return this._events.next(v.Disposed),this._events.complete(),t},t.prototype.disposed=function(){var e=this;return new Promise((function(t){var n=e.onDisposed().subscribe((function(){t(e),n.unsubscribe()}))}))},t.prototype.onDisposed=function(e){var t=this,n=this._events.pipe((0,s.p)((function(e){return e===v.Disposed})),(0,u.T)((function(){return t})));if(!arguments.length)return n;var i=n.subscribe((function(){e(t),i.unsubscribe()}));return this},t.prototype.onDisposing=function(e){var t=this,n=this._events.pipe((0,s.p)((function(e){return e===v.Disposing})),(0,u.T)((function(){return t}))).subscribe((function(){e(t),n.unsubscribe()}));return this},t.prototype.addDivider=function(e,t){if(e===h.n.Figure){var n=this._getCellsPositions(),r=0;if(!(0,o.isEmpty)(n)){var a=n[n.length-1];r=a.top+a.height}this.addCell(new h.G(this._dividers().getDivider(i.Horizontal,t),t,r,(0,f._h)()))}else this._divider||(this._divider=this._dividers().getDivider());return this},t.prototype.hasDivider=function(){return!!this._divider},t.prototype.divider=function(){return this._divider},t.prototype.removeDivider=function(){return this._divider&&(this._dividers().recycle(this._divider),delete this._divider),this},t.prototype.height=function(){var e=this._getCellsPositions();if((0,o.isEmpty)(e))return 0;var t=e[e.length-1];return t.top+t.height},t.prototype.position=function(){var e=this._getCellsPositions();if((0,o.isEmpty)(e))return null;var t=e[e.length-1],n=e[0].top,i=t.top+t.height;return{top:n,bottom:i,height:i-n}},t.prototype.findAvailablePosition=function(e,t,n,i){var o,a,s=0,u=0;try{for(var c=(0,r.Ju)(this._getCellsPositions(i)),l=c.next();!l.done;l=c.next()){var h=l.value,f=h.top-s;if(f>=e)return{top:s,height:f,margin:u};if(u=t,s=h.top+h.height,n){var p=(s+u)%d.K_;p&&(u+=d.K_-p)}s+=u}}catch(e){o={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}var m=d.E3-s;return mt;)n=n._next,e=Math.max(e,t+++n._colspan);return e},t.prototype.addLayout=function(e){if(this._layouts){if(this._layouts.indexOf(e)>=0)return this;this._layouts.push(e)}else this._layouts=[e];return this},t.prototype.layouts=function(){return this._layouts},t.prototype.bundle=function(e){return arguments.length?(this._bundle=e,this):this._bundle},t.prototype.section=function(e){return arguments.length?(this._section=e,this):this._section},t.prototype.type=function(e){return arguments.length?(this._type=e,this):this._type},t.prototype.idx=function(e){return arguments.length?(this._idx=e,this):this._idx},t.prototype.isFirst=function(e){return arguments.length?(this._isFirst=e,this):this._isFirst},t.prototype.isLast=function(e){return arguments.length?(this._isLast=e,this):this._isLast},t.prototype.hasItem=function(e){return!(0,o.isEmpty)(this._layouts)&&(0,o.findIndex)(this._layouts,(function(t){return t&&t.dataItem()===e}))>=0},t.prototype.data=function(){if((0,o.isEmpty)(this._layouts))return null;var e=this._layouts.filter((function(e){return e&&(0,o.isFunction)(e.dataItem)})).map((function(e){return e.dataItem()}));return e.length?1===e.length?e[0]:e:null},t.prototype.state=function(){return this._state||(this._state={}),this._state},t.prototype.show=function(){return this._isVisible||(this._cells.filter((function(e){return!!e})).forEach((function(e){return e.show()})),this._isVisible=!0),this},t.prototype.hide=function(){return this._isVisible?(this._cells.filter((function(e){return!!e})).forEach((function(e){return e.hide()})),this._isVisible=!1,this):this},t.prototype.noDividers=function(e){return arguments.length?(this._noDividers=e,this):this._noDividers},t.prototype.noHeaderAbove=function(e){return arguments.length?(this._noHeaderAbove=e,this):this._noHeaderAbove},t.prototype.anchors=function(e){return arguments.length?(this._anchors=e,this):this._anchors},t.prototype.nearestAnchorDelta=function(e,t){var n,i,o=this.width();if(e<0||e>o)return 0;if(!this._anchors)return t?t>0?e:e-o:e<=o-e?e:e-o;var a=0;try{for(var s=(0,r.Ju)(this._anchors),u=s.next();!u.done;u=s.next()){var c=u.value,l=a;if(e<=(a=c))return t?t>0?e-l:e-a:e-l<=a-e?e-l:e-a}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return t?t<0?e-a:e-o:e-a<=o-e?e-a:e-o},t.prototype._dividers=function(){var e=this._context.textViewColumnsDividers;return e||(this._context.textViewColumnsDividers=e=new _(this._context.textViewScroller.elm)),e},t.prototype._getCellsPositions=function(e){var t=[];if(!(0,o.isEmpty)(e)){var n=e.map((function(e){return{top:e.top,height:e.height}}));t.push.apply(t,(0,r.fX)([],(0,r.zs)(n),!1))}for(var i=function(e,n){if(e._colspan=n})).map((function(e){return{top:e.top,height:e.height}}));t.push.apply(t,(0,r.fX)([],(0,r.zs)(i),!1))},a=this,s=1;a;a=a._prev,++s)i(a,s);return t.sort(b)},t}(c.ck),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.C6)(t,e),t.concat=function(e,n){return e===t.empty&&n===t.empty||!e&&!n?t.empty:e?n?e.copy().append(n):e.copy():n.copy()},t.prototype.copy=function(){return new t(this._head,this._tail)},t.prototype.dispose=function(e,t){if(arguments.length){if(2===arguments.length){var n=this.detach(e,t);return e.dispose(),n}}else{this.detach();for(var i=this._head;i;i=i.dispose(1));this.empty()}},t.prototype.disposed=function(){var e=[];return this.forEach((function(t){e.push(t.disposed())})),Promise.all(e)},t.prototype.isVisible=function(){var e=!1;return this.forEach((function(t){if(t.isVisible())return e=!0,!1})),e},t.prototype.appendColumns=function(){if(1===arguments.length)return!(n=arguments[0])||n.isEmpty()?this:(this._checkDividers(this.tail(),n.head()),this.append(n));if(2===arguments.length&&arguments[0]instanceof w&&arguments[1]instanceof t){var e=arguments[0],n=arguments[1];return this._checkDividers(e,n.head()),this.append(e,n)}return this},t.prototype.prependColumns=function(){if(1===arguments.length)return!(n=arguments[0])||n.isEmpty()?this:(this._checkDividers(n.tail(),this.head()),this.prepend(n));if(2===arguments.length&&arguments[0]instanceof w&&arguments[1]instanceof t){var e=arguments[0],n=arguments[1];return this._checkDividers(n.tail(),e),this.prepend(e,n)}return this},t.prototype.getWidth=function(){var e=0;return this.forEach((function(t){e+=t.width()})),e},t.prototype._checkDividers=function(e,t){e&&t&&(e.noDividers()?t.removeDivider():t.noDividers()||t.addDivider())},t.empty=Object.freeze(new t),t}(c.To)},91934:function(e,t,n){"use strict";var i,r,o;n.d(t,{Lg:function(){return i},dp:function(){return o},nn:function(){return r}}),function(e){e[e.Unknown=-1]="Unknown",e[e.RegularArticle=0]="RegularArticle",e[e.ArticlePreview=1]="ArticlePreview",e[e.RegularPage=2]="RegularPage",e[e.LastVisit=3]="LastVisit",e[e.SearchBar=4]="SearchBar",e[e.MyLastTitles=5]="MyLastTitles",e[e.Replies=6]="Replies",e[e.InitBlock=7]="InitBlock",e[e.Breakingnews=8]="Breakingnews",e[e.Monitors=11]="Monitors",e[e.Profile=12]="Profile",e[e.Opinion=13]="Opinion",e[e.HomeBlock=14]="HomeBlock",e[e.AdBlock=16]="AdBlock",e[e.Social=17]="Social",e[e.BookmarkPages=18]="BookmarkPages",e[e.RecommendedOpinions=19]="RecommendedOpinions",e[e.SocialArticle=20]="SocialArticle",e[e.Post=21]="Post",e[e.Gift=22]="Gift",e[e.PromoSection=23]="PromoSection",e[e.CtaSignUpSection=24]="CtaSignUpSection",e[e.GiftVideoAd=25]="GiftVideoAd",e[e.CtaOnboarding=26]="CtaOnboarding",e[e.Info=27]="Info"}(i||(i={})),function(e){e[e.Unknown=-1]="Unknown",e[e.Headlines=0]="Headlines",e[e.Interesting=1]="Interesting",e[e.Users=2]="Users",e[e.MoreNewsCluster=3]="MoreNewsCluster",e[e.ReadersChoice=4]="ReadersChoice",e[e.SinceYourLastVisit=5]="SinceYourLastVisit",e[e.Category=6]="Category",e[e.Topic=7]="Topic",e[e.UserSection=8]="UserSection",e[e.FollowedChannel=9]="FollowedChannel",e[e.DirectArticleLink=10]="DirectArticleLink",e[e.FollowedOpinion=11]="FollowedOpinion"}(r||(r={})),function(e){e[e.Regular=0]="Regular",e[e.Basic=1]="Basic",e[e.RegularHeadlines=2]="RegularHeadlines",e[e.ImagesHeadlines=3]="ImagesHeadlines",e[e.Category=4]="Category",e[e.SocialCategory=5]="SocialCategory"}(o||(o={}))},77409:function(e,t,n){"use strict";n.d(t,{S:function(){return u}});var i,r=n(58932),o=n(16213),a=function(){function e(){this._mutateTasks=[],this._measureTasks=[]}return e.create=function(){var t=new e;return t._scheduleExecution(),t},e.prototype.mutate=function(){for(var e,t=[],n=0;n=0?"&":"?","scale=").concat(o)))}),100);function h(e,t,n){d(),n*c<1&&(c=1/n);var i=n*c*s.scale/o;u.css({translateLeft:e-s.x,translateTop:t-s.y,scaleX:i,scaleY:i})}var f={show:function(e){l=Date.now(),u&&u.remove(),c=1,s=e,function(){var e,t=r.o.current.textViewContainer,n=Math.round((s.x-s.left)*o/s.scale),c=Math.round((s.y-s.top)*o/s.scale),h=s.x-n,f=s.y-c-t.elm().offset().top,p=Math.round(s.width*o/s.scale),m=Math.round(s.height*o/s.scale);u=t.elm().createChild("div").css((e={position:"absolute",left:"".concat(h,"px"),top:"".concat(f,"px"),width:"".concat(p,"px"),height:"".concat(m,"px"),transformOrigin:"".concat(n,"px ").concat(c,"px")},e["z-index"]=100,e)).optimizeForTransform().html('')),s.elm.css("visibility","hidden");var g=l,v=new Image;v.onload=function(){a&&l===g&&d()},(0,i.defer)((function(){v.src=s.maxScaleUrl||"".concat(s.url).concat(s.url.indexOf("?")>=0?"&":"?","scale=").concat(o)}))}(),h(e.x,e.y,1),a=!0},update:function(e){if(a){var t=e.center();h(t.x,t.y,e.scale())}},hide:function(){s&&s.elm.css("visibility","visible"),u&&u.hide(),s=null,a=!1,d.cancel()},get isActive(){return a}}},48389:function(e,t,n){"use strict";n.d(t,{A7:function(){return a},BX:function(){return _},DH:function(){return R},Dh:function(){return p},E3:function(){return C},FG:function(){return T},Gr:function(){return s},J4:function(){return u},K_:function(){return S},MJ:function(){return h},Nw:function(){return P},PP:function(){return o},Ps:function(){return w},S3:function(){return N},TJ:function(){return l},UO:function(){return d},VB:function(){return v},VN:function(){return f},YI:function(){return V},_b:function(){return x},aC:function(){return k},ek:function(){return E},fJ:function(){return y},kz:function(){return c},mn:function(){return D},oG:function(){return m},pJ:function(){return g},pO:function(){return b},se:function(){return L},tg:function(){return I},y6:function(){return M},zT:function(){return H},zt:function(){return A}});var i=n(16580),r='
',o="a.readmore",a="dis",s='Continue'+r,u='Continue'+r,c=' Continued ',l="no-hghlt",d=300,h=Number.MAX_VALUE,f=3,p=16,m=p+p,g=!1,v=!1,y=!1,_=Object.freeze({0:"",1:"art-t2",2:"art-t3",3:"art-t4",4:"art-t5"});function b(e){_=e}var w=0,C=0,A=0,I=0,S=24,P=0,x=!0,T=!0,k=!0;function E(e){void 0===e&&(e={});var t=e.showIssueInfo,n=void 0!==t&&t,r=e.showContinuedFromLink,o=void 0!==r&&r,a=e.showPageThumbnail;g=n,v=o,y=void 0!==a&&a,x=i.A.get("features.comments",!0),T=i.A.get("ui.Bookmarks.enable",!0),k=i.A.get("ui.Similar.enable",!0),i.A.get("features.web.textview.tags.enabled",!1)}function M(e){return void 0===e&&(e=1),A*e-m}function D(e){I=e.articlePreviewColumnsCount,C=e.columnHeight,A=e.columnWidth,S=e.lineHeight,w=e.visibleColumnsCount,P=Math.floor(C/S)}function N(){return{articlePreviewColumnsCount:I,columnHeight:C,columnWidth:A,lineHeight:S,visibleColumnsCount:w}}function L(e){C=e}function V(e){return Math.ceil(e/S)*S}function R(){return{showIssueInfo:g,showContinuedFromLink:v,showPageThumbnail:y,articleStyles:_,visibleColumnsCount:w,columnHeight:C,columnWidth:A,articlePreviewColumnsCount:I,lineHeight:S,showComments:x,showBookmarks:T,enableSimilarArticles:k}}function H(e){g=e.showIssueInfo,v=e.showContinuedFromLink,y=e.showPageThumbnail,_=e.articleStyles,w=e.visibleColumnsCount,C=e.columnHeight,A=e.columnWidth,I=e.articlePreviewColumnsCount,S=e.lineHeight,P=Math.floor(C/S),x=e.showComments,T=e.showBookmarks,k=e.enableSimilarArticles}},21773:function(e,t,n){"use strict";n.d(t,{J:function(){return g},K9:function(){return A},Pf:function(){return v},Tc:function(){return I},W4:function(){return w},_h:function(){return _},fK:function(){return y},kd:function(){return b},ks:function(){return m},qZ:function(){return C}});var i=n(29583),r=n(69463),o=n(73663),a=n(74057),s=n(8351),u=n(13981),c=[],l=[],d=new r.B,h="1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqurstuvwxyz",f=(0,u.Lt)(o.LA);function p(e){e=arguments.length?(0,a.V)(e):f;var t=c[e-1];if(!t){var n=i('
').concat(h,"
"));i(document.body).append(n);var r=n.find("div#etalonLine");c[e-1]=t={lineHeight:parseFloat(window.getComputedStyle(r[0]).height),fontSize:parseInt(r.css("font-size"),10)},n.remove()}return t}function m(e){return(arguments.length?p(e):p()).lineHeight}function g(e){if(!arguments.length)return p().fontSize;if(e>s.IK||e
'));i(document.body).append(t),e=t.find("#etalonArtDiv").height(),e-=e%m(),l[f-1]=e,t.remove()}return e}function b(e){e=Math.round(e);for(var t=s.o5,n=s.o5+1;n<=s.IK;++n){var i=p(n).fontSize;if(i===e)return n;if(i>e)return t;t=n}return t}function w(e){if(!arguments.length)return f;var t=f!==(0,a.V)(e);return(0,u.JD)((0,o.sr)({fontScale:e})),t}function C(){return f>4?{min:360,max:480}:{min:240,max:320}}function A(e){return d.subscribe((function(t){var n=t.oldScale,i=t.scale;e(n,i)}))}function I(){c=[],l=[]}(0,u.oM)(o.LA).subscribe((function(e){var t=f;f=e,d.next({oldScale:t,scale:e})}))},76900:function(e,t,n){"use strict";n.d(t,{Ef:function(){return l},I_:function(){return c},qF:function(){return i},r:function(){return u}});var i,r=n(13302),o=n(37022),a=n(7281);function s(e,t){return void 0===t&&(t=i.NoReason),e.lastAccessTime=Date.now(),e.locks||(e.locks={}),t in e.locks||(e.locks[t]=new o.c_),e.locks[t]}function u(e){if(e.locks)return!1;var t=!1;return(0,r.forIn)(e.locks,(function(e){if(e.isLocked)return t=!0,!1})),t}function c(e){for(var t=[],n=1;n1){var i=1*(0,o.Pf)()/(0,o.J)()/.5-1;u=i/e,t.elmScale=1}else if(t.elmScale'),t.push("
    ");for(var n=1;n<=7;++n)t.push('
  • Aa
  • '));return t.push("
"),t.push('
".concat(e,"

")):t.push("

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

"),t.push(""),t.push(""),t.join("")}(e)).optimizeForTransform().css("opacity",0);var n=s.outerWidth(),o=s.outerHeight(),l=(t.elm().width()-n)/2,h=(t.elm().height()-o)/2+t.elm().offset().top;s.css({left:"".concat(l,"px"),top:"".concat(h,"px")}),s.css({transitionProperty:"opacity",transitionTimingFunction:"ease-out",transitionDuration:"300ms",opacity:1}),d(1)}},apply:function(){return!!(0,o.W4)(l)},hide:function(){s&&s.remove(),s=null,c=!1},get isActive(){return c}}},18158:function(e,t,n){"use strict";n.d(t,{Fx:function(){return u},bC:function(){return l},sf:function(){return c},xv:function(){return d}});var i=n(78698),r=n(13981),o=n(75069),a=n(11677);function s(e){(0,o.gc)().screenType<=a.a.Small?e.classList.add("pr-mobile"):e.classList.add("pr-desktop")}function u(){var e=document.getElementsByTagName("html").item(0);s(e),e.classList.add("pr-v2")}function c(){var e=document.getElementsByTagName("html").item(0);s(e),e.classList.contains("pr-v2")||e.classList.add("pr-legacy")}function l(){return document.getElementsByTagName("html").item(0).classList.contains("pr-legacy")}function d(){var e=(0,r.Lt)(i.uF),t=document.documentElement;t.classList.contains("pr-v2")||t.classList.add("se2sky-legacy"),e||t.classList.add("feat-pageview--dark")}},84191:function(e,t,n){"use strict";var i=n(65678),r=n(82788),o=n(86659),a=n(67303);r.X.ofType(o.wf.ActiveViewChanged).subscribe((function(e){var t=e.payload.viewName;t!==i.lP.TextView?r.X.send(new o.le({viewName:t})):r.X.send(new o.rr({viewName:t,cid:a.A.cid(),issueDate:a.A.issueDate()}))}))},86659:function(e,t,n){"use strict";var i;n.d(t,{CB:function(){return r},le:function(){return a},rr:function(){return o},wf:function(){return i}}),function(e){e.ActiveViewChanged="[Viewer] ActiveViewChanged",e.IssueViewChanged="[Viewer] IssueViewChanged",e.CommonViewChanged="[Viewer] CommonViewChanged"}(i||(i={}));var r=function(e){this.payload=e,this.type=i.ActiveViewChanged},o=function(e){this.payload=e,this.type=i.IssueViewChanged},a=function(e){this.payload=e,this.type=i.CommonViewChanged}},22907:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var i,r=n(58932),o=n(65678),a=((i={})[o.lP.TopNews]="topnews",i[o.lP.PagesView]="pages",i[o.lP.TextView]="text",i[o.lP.FTSArticles]="search",i[o.lP.Bookmarks]="bookmarks",i[o.lP.Bookmark]="bookmark",i[o.lP.ManageBookmarks]="managebookmarks",i[o.lP.EmailAlerts]="emailalerts",i[o.lP.Votes]="votes",i[o.lP.Home]="home",i[o.lP.Radio]="radio",i[o.lP.Monitors]="monitors",i[o.lP.Profile]="profile",i[o.lP.Similar]="similar",i[o.lP.EmptyView]="empty",i[o.lP.Categories]="categories",i[o.lP.External]="external",i[o.lP.Opinion]="opinion",i[o.lP.Post]="post",i[o.lP.StoreHub]="catalog",i[o.lP.Error]="error",i[o.lP.Account]="accounting/account",i[o.lP.Purchase]="purchaseview",i[o.lP.Receipt]="receipt",i[o.lP.Article]="article",i[o.lP.Onboarding]="onboarding",i[o.lP.IssueDetails]="issuedetails",i[o.lP.LatestIssues]="latestissues",i),s=(0,r.Cl)((0,r.Cl)({},a),{toUrlViewName:function(e){return a[e]||a[o.lP.Error]},fromUrlViewName:function(e){for(var t in e=(e||"").toLowerCase(),a)if(a.hasOwnProperty(t)&&a[t]===e)return t;return o.lP.Error}})},87169:function(e,t,n){"use strict";n.d(t,{Ed:function(){return p},Wq:function(){return m},dc:function(){return d}});var i=n(82230),r=n(86699),o=n(17950),a=n(69463),s="api/v1/accounting/gdpr",u="gdpr_consent_",c=365,l=new a.B,d=l.asObservable(),h={none:"none",granted:"granted"},f={1:"cookies",2:"promoEmail",3:"termsOfUse",cookies:1,promoEmail:2,termsOfUse:3};function p(){if(r.A.isLogin())return i.A.get(s,"consents");var e=o.get("".concat(u).concat(f.termsOfUse),h.none),t=o.get("".concat(u).concat(f.cookies),h.none),n=[{consentType:f.termsOfUse,isGranted:e===h.granted},{consentType:f.cookies,isGranted:t===h.granted}];return Promise.resolve(n)}function m(e,t){return r.A.isLogin()?i.A.post(s,"consent",{consentType:e,granted:t}).then((function(){l.next()})):(o.set("".concat(u).concat(e),t?h.granted:h.none,{expiresInDays:c}),Promise.resolve())}},60146:function(e,t,n){"use strict";var i=n(58932),r=n(82230),o=n(82534);t.A={signin:function(e,t){return r.A.post("auth","Signin",{userName:e,password:t})},signinByKey:function(e){return r.A.post("auth","SigninByKey",{key:e})},siteSignin:function(e,t){return(0,o.y$)(e,t)},signOut:function(){return r.A.get("auth","SignOut")},siteSignOut:function(){return(0,i.sH)(this,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,o.bE)()];case 1:return(null==(e=t.sent())?void 0:e.RedirectLocation)?(window.location.assign(e.RedirectLocation),[2]):[2,e]}}))}))},getExternalRequestKey:function(){return r.A.get("ExternalAuth","GetRequestKey")},getSott:function(){return r.A.get("ExternalAuth","GetSott")},recoverPassword:function(e){return r.A.post("auth","RecoverPassword",{logonName:e},{disableRetry:!0})},register:function(e){return r.A.post("auth","Register",e,{disableRetry:!0})},authorizeExternal:function(e){return r.A.post("externalauth","AuthorizeExtAuth",JSON.stringify(e),{contentType:"application/json"})}}},62449:function(e,t,n){"use strict";var i,r=n(29583),o=n(13302),a=n(12010),s=n(59805),u=n(1435),c=n(17950),l=n(44260),d=n(27189),h=n(96587),f=n(67303),p=n(55683),m=n(3993),g=n(82788),v=n(99600),y=n(1339),_=n(97433),b=h.default.signin={parentDialog:null,show:null,hide:null,onShow:null,onHide:null,resize:null,states:null},w={},C=[],A="onNavigationRequested",I=(0,u.J)({expire:9e5});function S(e,t){this.header=l.Ay.val("Dialogs.Signin.PasswordRecovery"),this.state="passwordRecovery",this.requestSent=a.observable(!1),this.emailAddress=a.observable("").extend({required:l.Ay.val("Dialogs.Signin.EmailRequired","Valid email address is required"),email:l.Ay.val("Dialogs.Signin.EmailRequired","Valid email address is required"),trackDirtyState:!0}),this.emailAddressId="PasswordRecoveryEmailAddress",this.recoverPassword=function(){s.A.validate(this)?this.requestSent()||(this.requestSent(!0),t.recoverPassword({logonName:this.emailAddress()})):i.resize()},this.onActivated=function(e){this.requestSent(!1),s.A.resetValidationState(this);var t=e&&e.forgotPasswordEmailAddress;if(t){var n="function"==typeof t?t():t;n&&this.emailAddress(n)}i.focus(this.emailAddressId)}}function P(e,t){var n=e&&e.emailAddress||I.get("emailAddress")||"",r=I.get("password")||"",o=e&&e.firstName||I.get("firstName")||"",u=I.get("lastName")||"",c=function(e){return function(t){I.set(e,t)}};this.header=l.Ay.val("Dialogs.Signin.Registration"),this.state="signUp",this.emailAddress=a.observable(n).extend({required:l.Ay.val("Dialogs.Validators.Required"),email:!0}),this.emailAddressId="SignUpEmailAddress",this.enablePromotional=a.observable(!1),this.enableService=a.observable(!1);var d=parseInt(l.Ay.val("v7.Client.Signin.Validators.Password.Minlength"),10),h=l.Ay.val("Dialogs.Validators.Required");this.password=a.observable(r).extend({required:h,minLength:{val:d,message:l.Ay.format("v7.Client.Signin.Validators.Password.Minlength.Message",d)}}),this.firstName=a.observable(o).extend({required:h}),this.lastName=a.observable(u).extend({required:h}),this.signUp=function(){s.A.validate(this)&&(g.X.send(new v.PU({alertKey:v.U7.EmailAlertPromotional,value:this.enablePromotional(),isDefault:!0})),g.X.send(new v.PU({alertKey:v.U7.EmailAlertTechnical,value:this.enableService(),isDefault:!0})),t.signUp({emailAddress:this.emailAddress(),password:this.password(),firstName:this.firstName(),lastName:this.lastName(),enablePromotional:this.enablePromotional(),enableService:this.enableService()}),I.clear())},this.onActivated=function(){this.password(""),s.A.resetValidationState(this),i.focus(this.emailAddressId),g.X.send(new v.zL({system:y.h.Application})),this.emailAddress.subscribe(i.resize.bind(i)),this.password.subscribe(i.resize.bind(i)),this.firstName.subscribe(i.resize.bind(i)),this.lastName.subscribe(i.resize.bind(i))},this.emailAddress.subscribe(c("emailAddress")),this.password.subscribe(c("password")),this.firstName.subscribe(c("firstName")),this.lastName.subscribe(c("lastName"))}function x(e,t){var n=d.A.get("ui.SocialSignIn.SocialNetworks");function u(e){this.provider=e.provider,this.css=e.css,this.name=e.name,this.networkName=l.Ay.val(e.resourceName)}this.socialNetworks=o.map(n,(function(e){return new u(e)}));var h=d.A.get("Registration.RegistrationEnabled",!1),f=d.A.get("Registration.TrialRegistrationEnabled",!1),p=d.A.get("Registration.TrialRegistrationForAllEnabled",!1);this.header=r.nd.res.val("Dialogs.Signin.Header"),this.state="signIn",this.templateName=(0,m._N)(),this.externalSystems=(0,m.eB)(),this.emailAddress=a.observable(),this.emailAddressId="SignInEmailAddress",this.password=a.observable(),this.enableAutologin=a.observable(!0),this.signInErrorMessage=a.observable(""),this.showPassword=a.observable(!1),this.forgotPasswordEmailAddress=a.computed((function(){return this.emailAddress()}),this),this.signInExternal=o.debounce((function(e){t.signInExternal({system:e,enableAutologin:this.enableAutologin()})}),300,{leading:!1,trailing:!0}),this.showRegistration=a.computed((function(){return h})),this.socialNetworkSignInAllowed=a.computed((function(){return(0,m.m1)()})),this.signUpText=a.computed((function(){var e="";return p?e=r.nd.res.val("Dialogs.Signin.NewUserTrialRegistration"):f?e=c.get("isTrialUsed",!1)?r.nd.res.val("Dialogs.Signin.NewUser"):r.nd.res.val("Dialogs.Signin.NewUserTrialRegistration"):h&&(e=r.nd.res.val("Dialogs.Signin.NewUser")),e}),this),this.signIn=function(){r(".pop-body-signin:visible :input").change(),r(".pop-body-signin").height("100%"),this.emailAddress()&&this.password()&&(this.signInErrorMessage(""),t.signIn({userName:this.emailAddress(),password:this.password(),enableAutologin:this.enableAutologin()}))},this.onActivated=function(){i.focus(this.emailAddressId),this.password(""),s.A.resetValidationState(this),g.X.send(new v.pn({system:y.h.Application}))},this.showSocialNetwork=a.computed((function(){return this.socialNetworkSignInAllowed()&&this.externalSystems.length>0}),this),this.toggleShowPassword=function(){this.showPassword(!this.showPassword())}}function T(){this.header=r.nd.res.val("Dialogs.Signin.OpenId"),this.state="signInOpenId",this.openId=a.observable(""),this.signIn=function(){r(b).trigger("signInOpenId",{openId:this.openId()})}}function k(e){this.provider=e,this.className=this.provider,this.text=r.nd.res.val("ExternalAuthentication."+this.provider),this.view="openid"===this.provider?"signInOpenId":"",this.action=function(){this.view?r(this).trigger(A,{viewKey:this.view}):r(b).trigger("signInExternal",{provider:this.provider})}}function E(){this.header=r.nd.res.val("Dialogs.Signin.SocialNetwors"),this.state="signInSocialNetworks";var e=d.A.get("ui.SignIn.SocialNetworks"),t=[],n=this;if(e){for(var i=0;i0})),this.scrollToAttachment=d.observable(),this.isPostingComment=d.observable(!1),this.isPostDisabled=d.computed((function(){return!u.textDraft()||u.isPostingComment()||(0,r.some)(u.attachments(),(function(e){return e.isLoading()}))})),this._dialogViewModel=e,this._dialog=e._dialog,this._cancelNextBlurEvent=!1,this._onCommentCreate=o}return e.prototype.createComment=function(){var e=this;return this.isPostDisabled()?Promise.reject():(this.isPostingComment(!0),this._onCommentCreate(this).finally((function(){e.isPostingComment(!1)})))},e.prototype.onMouseDown=function(e,t){var n="nd-no-blur-event",i=l(t.target);return(i.attr("".concat(n))||i.parents("[".concat(n,"]")).length)&&(this._cancelNextBlurEvent=!0),!0},e.prototype.cancelCommentEditing=function(e){e.clean(),e.isVisible(!1),e._dialogViewModel.resize()},e.prototype.onFocus=function(e){return(u.A.isLogin()?Promise.resolve():b.default.signIn()).then((function(){e.isCompactView()&&e.isCompactView(!1),e._dialogViewModel.resize()}))},e.prototype.onBlur=function(e){e._cancelNextBlurEvent?e._cancelNextBlurEvent=!1:setTimeout((function(){e._updateIsCompactView(),e._dialogViewModel.resize()}),200)},e.prototype.isEmpty=function(){if(this.hasAttachments()||this.opinion())return!1;var e=this.textDraft();return(0,r.startsWith)(e,this.defaultReply)&&(e=e.slice(this.defaultReply.length)),(0,r.isEmpty)(e)},e.prototype.focus=function(){this.hasFocus(!0)},e.prototype.clean=function(){this.textDraft(this.defaultReply),this.opinion(null),this.attachments([]),this.isPostingComment(!1),this.isCompactView(!0),this.hasFocus(!1)},e.prototype.getCommentDto=function(){var e=this.opinion(),t=e&&e.id;return{contentType:p.A.contentTypes.ARTICLE,articleId:this.articleId,parentId:this.parentCommentId,opinionId:t,attachments:this.attachments()}},e.prototype._updateIsCompactView=function(){var e=0===this._dialogViewModel.totalCount();this.isCompactView(!e&&this.isEmpty()&&!this.hasFocus())},e.prototype._backToEditor=function(){this._dialogViewModel.resize({force:!0}),this.hasFocus(!0)},e}(),C=n(1943),A=n(18970),I=n(90185),S=n(46977),P=n(44260),x=n(70989),T=n(62625),k=n(67606),E=n(39172),M=function(){function e(e,t){this._dialog=e,this.isOwner=t.isOwner}return e.prototype.onEdit=function(){this._dialog.hide(h.d.Ok,{action:"edit"})},e.prototype.onDelete=function(){this._dialog.hide(h.d.Ok,{action:"delete"})},e.prototype.onReportComment=function(){this._dialog.hide(h.d.Ok,{action:"report"})},e.prototype.onHideComment=function(){this._dialog.hide(h.d.Ok,{action:"hideComment"})},e.prototype.onBanUser=function(){this._dialog.hide(h.d.Ok,{action:"banUser"})},e.prototype.close=function(e){this._dialog.hide(h.d.Ok,{action:e})},e}(),D=function(){function e(){}return e.prototype.show=function(e){if(!e||!e.position)throw new Error("Config or dialog position is not specified.");return new Promise((function(t){var n=o.default.createInstance();n.show({templateName:"v7.Client.Dialogs.Comments.MoreOptions",model:new M(n,e),name:"comments-more-options",getLeft:function(t){return e.position.left-t/2},getTop:function(t){return e.position.top-t/2}}),n.onHide((function(e,n){return t(n)}))}))},e}(),N=Object.freeze({POPULAR:p.A.contentOrderBy.byRatingDesc,DATE:p.A.contentOrderBy.byDateDesc,DATEASC:p.A.contentOrderBy.byDateAsc}),L=Object.freeze({LIST:0,NEW_COMMENT:1,ADD_VIDEO:2});function V(e,t,n,i,o,a,s,u,c){var l={contentType:p.A.contentTypes.ARTICLE,articleId:e};return t&&(l.parentId=t),n&&(l.opinionId=n),i>-1&&(l.offset=i,l.limit=o,l.orderBy=a),l.attachments=(0,r.map)(s,(function(e){return e.toDto()})),u&&(l.markerCommentId=u),(0,r.isNumber)(c)&&(l.direction=c),l}var R,H=["Spam","Unlawful","Harassment","Indecent","Irrelevant"],F=function(e){var t=(void 0===e?{}:e).parent;return new Promise((function(e,n){var i=t||o.default.getParent(),r=o.default.createInstance(i);r.onHide((function(t,i){i.status===h.d.Ok?e(i.action):n()}));var a=function(){var e={actions:H,currentAction:d.observable(H[0]),select:function(t){return function(){return e.currentAction(t)}}};return e}();a.cancel=function(){r.hide(h.d.Cancel),n()},a.report=function(){r.hide(h.d.Ok,{action:a.currentAction()})},r.show({templateName:"v7.Client.Dialogs.ReportUser",model:a,name:"report-user"}),r.resize()}))},B=n(20680),z=n(97779),O=n(74877),j={FACEBOOK:"facebook",TWITTER:"twitter",COPY_URL:"copyurl"},U=((R={})[j.FACEBOOK]="shareFacebook",R[j.TWITTER]="shareTwitter",R);function W(e,t){e.likesCount(t.likesCount),e.dislikesCount(t.dislikesCount),e.isVotedByUser(0!==t.currentVote),e.currentVote(t.currentVote)}var Y=function(){function e(e,t){(0,r.assign)(this,e),this._dialogViewModel=t,this.author=e.authorNickname,this.parentAuthor=e.parentCommentUserProfile,this.isReply=d.observable(!!e.parentId),this.isExpanded=d.observable(!0),this.fullText=this.viewText(),this.toggleLongComment(),this.replyEditor=d.observable(null),this.editEditor=d.observable(null),this.sharingProviders=j,this.repliesParentId=d.observable(this.id),this.repliesOffset=d.observable(0),this.repliesLimit=20,this.canLoadMoreReplies=d.observable(this.repliesOffset()2),this.repliesShowBottomLoadMore=d.observable(!1),this.isLoadingReplies=d.observable(!1),this.lastReplyId=d.observable(null),this.isBusy=d.observable(!1),this.showFastShareButtons=d.observable(!1),this.actionTool=null}return e.prototype.openParentUserProfile=function(){v.A.goView(y.lP.Profile,{profileId:this.parentAuthor.profileName})},e.prototype.openUserProfile=function(){v.A.goView(y.lP.Profile,{profileId:this.authorProfileName})},e.prototype.toggleLongComment=function(){if(!this.isDeleted())if(this.isExpanded()){var e=0;this.hasAttachments&&this.fullText.length>256&&(e=256),this.fullText.length>512&&(e=512),e>0&&(this.viewText((0,r.truncate)(this.fullText,{length:e,separator:" "})),this.isExpanded(!1))}else this.viewText(this.fullText),this.isExpanded(!0),this._dialogViewModel.resize()},e.prototype.showMoreOptions=function(e,t){var n=this,i={isOwner:this.isOwner,position:{left:t.clientX,top:t.clientY}};(new D).show(i).then((function(e){e&&e.status===h.d.Ok&&("edit"===e.action?n.showCommentEditor():"delete"===e.action?n.onCommentDelete():"hideComment"===e.action?n.hideComment().catch(B.logAndAlertError):"banUser"===e.action?n.banUser().catch(B.logAndAlertError):"report"===e.action&&F().then((function(e){return p.A.abuseReportComment({contentType:p.A.contentTypes.ARTICLE,articleId:n.articleId},n.id,e)})).catch(B.logAndAlertError))}))},e.prototype.hideComment=function(){var e=this;if(this.isBusy())return Promise.resolve();this.isBusy(!0);var t=V(this.articleId);return this._dialogViewModel.hideComment(this.id,t).finally((function(){e.isBusy(!1)}))},e.prototype.banUser=function(){var e=this;if(this.isBusy())return Promise.resolve();this.isBusy(!0);var t=V(this.articleId);return this._dialogViewModel.banUser(this.authorProfileName,t).finally((function(){e.isBusy(!1)}))},e.prototype.onCommentDelete=function(){var e=this;if(!this.isBusy()){this.isBusy(!0);var t=new S.A,n=P.Ay.val("Dialogs.Comments.DeleteConfirmation"),i=P.Ay.val("Buttons.Delete.Text"),r=P.Ay.val("Buttons.Cancel.Text");t.confirm(n,r,i,!0).then((function(){var t=V(e.articleId);p.A.deleteComment(t,e.id).then((function(){e.isDeleted(!0),e._dialogViewModel.totalCount(e._dialogViewModel.totalCount()-1)})).then((function(){return e._dialogViewModel.resize({force:!0}),Promise.resolve()})).finally((function(){e.isBusy(!1)}))})).catch((function(){e.isBusy(!1)}))}},e.prototype.showCommentEditor=function(){if(this.isOwner){this.editEditor()||this.editEditor(this._createEditEditor(this.editText)),this.replyEditor()&&this.replyEditor().isVisible(!1);var e=this.editEditor();if(e.textDraft(this.editText),this.hasAttachments){var t=this.attachments.map((function(e){return function(e){if(!e)return null;switch(e.type){case"video":return new O.A(e);case"image":return new z.A(e);default:return null}}(e)}));e.attachments(t),Promise.all(t.map((function(e){return(0,I.V)(e.imageId||e.thumbnailImageId).then((function(t){e.previewUrl(t),e.isLoading(!1)}))})))}e.isVisible(!0),e.focus()}},e.prototype.likeComment=function(){var e=this;this.isBusy()||(this.isBusy(!0),A.A.voteLike(this.id,A.A.contentTypes.COMMENT).then((function(t){W(e,t),e.currentVote(1)})).finally((function(){e.isBusy(!1)})))},e.prototype.dislikeComment=function(){var e=this;this.isBusy()||(this.isBusy(!0),A.A.voteDislike(this.id,A.A.contentTypes.COMMENT).then((function(t){W(e,t),e.currentVote(-1)})).finally((function(){e.isBusy(!1)})))},e.prototype.showReplyEditor=function(){var e=this;return(u.A.isLogin()?Promise.resolve():b.default.signIn()).then((function(){e.replyEditor()||e.replyEditor(e._createReplyEditor()),e.replyEditor().isVisible(!0),e.replyEditor().focus(),e._dialogViewModel.scrollToComment(e)}))},e.prototype.followUser=function(){this.isOwner||(this.isAuthorFollowed()?this._dialogViewModel.unFollowUser(this.authorProfileName):this._dialogViewModel.followUser(this.authorProfileName))},e.prototype.shareComment=function(e){return this._getSharingInfo([e]).then((function(t){C.A[U[e]].activate(e,t)}))},e.prototype.showSharingMenu=function(e,t){var n=this;this.actionTool?this.actionTool.click(t):this._getSharingInfo().then((function(e){var i=(0,E.Jt)("share");n.actionTool=new k.A;var r=[null,e];n.actionTool.itemsControllerCTOR(i).additionalItemsControllerParams(r),n.actionTool.click(t)}))},e.prototype.loadReplies=function(){var e=this;this.isLoadingReplies()||(this.isLoadingReplies(!0),this._loadReplies().then((function(t){var n=t&&t.items&&t.items.length||0;if(n){var i;i=0===e.repliesOffset()?e._dialogViewModel._appendPageAfterComment(t,e.id,e.id):e._dialogViewModel._appendPageAfterComment(t,e.lastReplyId());var o=(0,r.last)(i);e.repliesShowTopLoadMore(!1),e.repliesShowBottomLoadMore(!1),e.lastReplyId(o.id),e.repliesOffset(e.repliesOffset()+n),e.canLoadMoreReplies(e.repliesOffset()0})),this.editor=new w(this,this.id,null,null,this.createComment.bind(this)),this.hasFocus=d.pureComputed((function(){return!s.editor.hasFocus()&&!s.isVideoSelected()})),this.scrollToComment=d.observable(!1),this.showBottomLoading=d.pureComputed((function(){return s.isLoadingNext()||!s.isFirstLoadCompleted()})),this.back=function(){return s.closeDialog()}}return e.prototype.openUserProfile=function(e){v.A.goView(y.lP.Profile,{profileId:e.profileId()})},e.prototype.closeDialog=function(){var e=this,t=(0,r.some)(this.comments(),(function(e){return e.replyEditor()&&!e.replyEditor().isEmpty()||e.editEditor()&&!e.editEditor().isEmpty()}));if(!this.editor.isEmpty()||t){var n=P.Ay.val("Dialogs.Comments.DiscardConfirmation"),i=P.Ay.val("Buttons.Confirm.Text"),o=P.Ay.val("Buttons.Cancel.Text");(0,S.A)().confirmSafe(n,o,i,!0).then((function(t){t&&e._dialog.hide(h.d.Close)})).catch(B.logError)}else this.currentState()===L.ADD_VIDEO?this.cancelAddVideoDialog():this._dialog.hide(h.d.Close)},e.prototype.createComment=function(){var e=this,t=this.editor;if(t.textDraft()){var n=t.getCommentDto();return p.A.createComment(n,t.textDraft()).then((function(n){if(t.clean(),(0,r.forEach)(e.comments(),(function(e){return e.showFastShareButtons(!1)})),e.totalCount()>e.comments().length)return e.markerCommentId=n.publicId,e.commentsOffset=0,e.commentsOffsetPrev=0,e.loadPrevPage().then((function(t){e.canLoadNext(!1);var i=e._toViewModel(n);return e.comments([i]),e._appendPrevPage(t)})).then((function(){var t=e.comments();return t[(0,r.findIndex)(t,(function(e){return e.id===n.id}))]}));var i=e._toViewModel(n);return e.comments.push(i),e.totalCount(e.totalCount()+1),i})).then((function(t){t&&(e.scrollToComment(t),e.resize())})).catch((function(){return(0,B.logAndAlertError)({resourceKey:"Dialogs.Comments.PostCommentFailed"})}))}return Promise.reject()},e.prototype.createReply=function(e){var t=this,n=e.parentCommentId,i=this.comments(),o=(0,r.findIndex)(i,(function(e){return e.id===n})),a=(0,r.findLastIndex)(i,(function(e){return e.parentId===n}));if(o>=0&&e.textDraft()){var s=e.getCommentDto();return p.A.createComment(s,e.textDraft()).then((function(n){e.clean(),e.isVisible(!1),(0,r.forEach)(t.comments(),(function(e){return e.showFastShareButtons(!1)}));var i=t._toViewModel(n),s=(a>0?a:o)+1;t.comments.splice(s,0,i),t.scrollToComment(i),t.totalCount(t.totalCount()+1),t.resize()})).catch((function(){return(0,B.logAndAlertError)({resourceKey:"Dialogs.Comments.PostCommentFailed"})}))}return Promise.reject()},e.prototype.updateComment=function(e){var t=this;if(e.textDraft()){var n=e.getCommentDto(),i=e.commentId,o=(0,r.find)(this.comments(),(function(e){return e.id===i}));return p.A.updateComment(n,i,e.textDraft()).then((function(n){e.clean(),e.isVisible(!1),(0,r.forEach)(t.comments(),(function(e){return e.showFastShareButtons(!1)}));var i=t._toViewModel(n);t.comments.replace(o,i)})).then((function(){return Promise.resolve(t.resize())})).catch((function(){return(0,B.logAndAlertError)({resourceKey:"Dialogs.Comments.PostCommentFailed"})}))}return Promise.reject()},e.prototype.loadPreviousPage=function(){var e=this;this.canLoadPrev()&&!this.isLoadingPrev()&&(this.isLoadingPrev(!0),this.loadPrevPage().then((function(t){e._appendPrevPage(t),e.resize()})).catch(B.logError).finally((function(){e.isLoadingPrev(!1)})))},e.prototype.isUserActionEnabled=function(e){return this.enabledUserActions().indexOf(e)>-1},e.prototype.hideComment=function(e,t){var n=this,i=new S.A,r=P.Ay.val("Dialogs.Comments.HideCommentConfirmation"),o=P.Ay.val("Buttons.HideComment.Text"),a=P.Ay.val("Buttons.Cancel.Text");return i.confirm(r,a,o,!0).then((function(){return p.A.hideComment(e,t)})).then((function(){n.markCommentAsDeleted(e),n.totalCount(n.totalCount()-1),n._dialog.resize()}))},e.prototype.markCommentAsDeleted=function(e){if((0,r.some)(this.comments(),(function(t){return t.parentId===e||!t.isDeleted()}))){var t=(0,r.find)(this.comments(),(function(t){return t.id===e}));t&&t.isDeleted(!0)}else this.comments(this.comments().filter((function(t){return t.id!==e})))},e.prototype.banUser=function(e,t){var n=this,i=new S.A,o=P.Ay.val("Dialogs.Comments.BanUserConfirmation"),a=P.Ay.val("Buttons.BanUser.Text"),s=P.Ay.val("Buttons.Cancel.Text");return i.confirm(o,s,a,!0).then((function(){return p.A.banUser(e,t)})).then((function(){var t=n.comments().filter((function(t){return t.authorProfileName===e}));(0,r.forEach)(t,(function(e){return n.markCommentAsDeleted(e.id)})),n.totalCount(n.totalCount()-t.length),n._dialog.resize()}))},e.prototype.resize=function(){this._dialog.resize()},e.prototype.followUser=function(e){var t=this;_.F.ensureProfileName(e).then(m.default.followUser).then((function(n){return t._updateUserFollowStatus(e,n.followedByMe)})).catch(B.logError)},e.prototype.unFollowUser=function(e){var t=this;_.F.ensureProfileName(e).then(m.default.unFollowUser).then((function(n){return t._updateUserFollowStatus(e,n.followedByMe)})).catch(B.logError)},e.prototype._updateUserFollowStatus=function(e,t){(0,r.forEach)(this.comments(),(function(n){n.authorProfileName===e&&n.isAuthorFollowed(t)}))},e.prototype._changeState=function(e){e!==this.currentState()&&(this.currentState(e),this._dialog.resize())},e.prototype._toViewModel=function(e){return new Y(e,this)},e.prototype._appendPrevPage=function(e){var t=this,n=(0,r.map)(e.items,(function(e){return t._toViewModel(e)})),i=(0,r.filter)(e.items,(function(e){return!e.parentId})).length;(0,r.forEachRight)(n,(function(e){return t.comments.splice(0,0,t._toViewModel(e))})),this.totalCount(e.meta.totalCount),this.commentsOffsetPrev+=i,this.canLoadPrev(i>=this.commentsLimit)},e.prototype._appendPageAfterComment=function(e,t,n){var i=this,o=(0,r.map)(e.items,(function(e){return i._toViewModel(e)}));if(n){var a=(0,r.filter)(this.comments(),(function(e){return e.parentId===n}));(0,r.forEach)(a,(function(e){return i.comments.remove(e)}))}var s=(0,r.findIndex)(this.comments(),(function(e){return e.id===t}));return s>-1&&(0,r.forEach)(o,(function(e){return i.comments.splice(1+s++,0,e)})),o},e.prototype._appendNextPage=function(e){var t=this,n=(0,r.map)(e.items,(function(e){return t._toViewModel(e)})),i=(0,r.some)(e.items)?(0,r.filter)(e.items,(function(e){return!e.parentId})).length:0;(0,r.forEach)(n,(function(e){return t.comments.push(e)})),this.totalCount(e.meta.totalCount),this.commentsOffset+=i,this.canLoadNext(i>=this.commentsLimit),this.canLoadPrev()&&this.canLoadPrev(this.comments().lengtht.title()?1:e.title()t._title?1:e._titlet.title?1:e.title0)}}Xe.show=function(e){if(e){var t=(0,Be.Ux)(e.Images),n={articleTitle:Ke(e.Title),articleSubtitle:Ke(e.Subtitle),byline:e.Byline?Ke(e.Byline):"",articleBlocks:Je(e),hasImage:!!t,imageByline:t?Ke(t.Byline):"",imageUrl:t?t.Url:"",imageTitle:t?Ke(t.Title):"",imageText:t?Ke((t.Text||{}).Text):"",issueTitle:Ke(e.Issue?e.Issue.Title:e.Source.CreatorName),shortDateString:e.Issue?e.Issue.ShortDateString:(0,Ye.yJ)(new Date(e.Source.Created),"d MMM yyyy"),sectionName:e.SectionName?Ke(e.SectionName):"",startPage:e.PageName,endPage:e.PageName,close:function(){Xe.hide()},selectVisible:ko.observable(!0),selectText:function(e){var t,n,i=document,o=r(e)[0];r.browser.iOS&&(r(e).attr("contenteditable","true"),setTimeout((function(){r(e).attr("contenteditable","false")}),1)),window.getSelection?(n=window.getSelection(),(t=document.createRange()).selectNodeContents(o),n.removeAllRanges(),n.addRange(t)):i.body.createTextRange&&((t=document.body.createTextRange()).moveToElementText(o),t.select())}};(0,He.JD)(je({type:"article",title:n.articleTitle,authors:n.byline,pages:n.startPage,url:new URL("article/".concat(e.ArticleId),new URL(window.basePath,window.location.origin)),publication:e.Issue.Title,date:n.shortDateString?new Date(n.shortDateString):void 0,language:e.Language,abstract:e.Text})),(qe=r.nd.ui.dialog.getInstance())&&!qe.visible&&(qe.show({templateName:"v7.Client.Dialogs.Copy",model:n,defaultEventFlow:!0}),qe.onHide((function(){Ge&&clearTimeout(Ge)})),r.browser.android&&(n.selectVisible(!1),Ge=setInterval(Qe.bind(void 0,n),300)))}},Xe.hide=function(){qe.hide(),(0,He.JD)(Ue())};var Ze=Xe,$e=n(64609),et=n(68520),tt=n(84901),nt=n(65678),it=n(26906),rt=n(22316),ot=n(55383),at=n(28057),st=n(47027),ut=n(94529),ct=n(54580),lt=n(75979),dt=n(20680),ht=function(){function e(e,t,n,i,r,a){var s=this;this._dialog=e,this._statesStack=[],this.states=Object.freeze({publications:0,supplements:1}),this.state=o.observable(this.states.publications),this.categoryGroups=[{name:"countries",displayName:(0,Ye.p3)("Catalog.ByCountry"),categories:r},{name:"languages",displayName:(0,Ye.p3)("Catalog.ByLanguage"),categories:a}],this._allCategory={name:"all",displayName:(0,Ye.p3)("v7.Client.Catalog.all"),publicationsCount:-1},this._syntheticCategories=[{name:"favorites",displayName:(0,Ye.p3)("v7.Client.Catalog.mypublications"),publications:n,publicationsCount:n.length},{name:"recentlyRead",displayName:(0,Ye.p3)("v7.Client.Catalog.recentlyread"),publications:i,publicationsCount:i.length},this._allCategory],this.categories=o.observableArray([]),this.selectedCategoryGroup=o.observable(null),this.categorySwitchEnabled=o.observable(t.get("ui.Catalog.showCountryLanguagesToolbar",!0)),this.publicationsSortByRankEnabled=o.observable(t.get("ui.Catalog.SortToolbar.popularSortEnable",!0)),this.selectedCategory=o.observable(null),this.publications=o.observableArray([]),this.publicationsHeader=o.observable(""),this.sortBy=o.observable(),this.sortOrder=o.observable(),this.publicationsSortEnabled=o.computed((function(){return s.state()===s.states.publications&&s.selectedCategory()&&"recentlyRead"!==s.selectedCategory().name})),this.searchText=o.observable("").extend({rateLimit:{timeout:300,method:"notifyWhenChangesStop"}}),this.searchText.subscribe((function(e){return s._publicationsModel&&s._publicationsModel.search(e)})),this.hasMorePublications=o.computed((function(){return s._publicationsModel&&s._publicationsModel.hasMore()})),this.onPublicationsScroll=(0,oe.throttle)((function(){return s._publicationsModel&&s._publicationsModel.hasMore()&&s._publicationsModel.getMore()}),500)}return e.prototype._pushState=function(){var e={state:this.state(),publications:this.publications(),publicationsAdapter:this._publicationsModel,publicationsHeader:this.publicationsHeader()};this._statesStack.push(e)},e.prototype._popState=function(){var e=this._statesStack.pop();if(!e)throw new Error("Unexpected use: states stack is empty");this.state(e.state),this.publicationsHeader(e.publicationsHeader),this.publications(e.publications),this._publicationsModel=e.publicationsAdapter},e.prototype.close=function(){this._dialog.hide()},e.prototype.enterSupplementsState=function(e){this._pushState(),this.state(this.states.supplements),this.publicationsHeader(e.title),this._publicationsModel=null;var t=[e].concat(e.supplements);this.publications(t)},e.prototype.exitSupplementsState=function(){this._popState()},e.prototype.selectCategory=function(e){this.state()===this.states.supplements&&this.exitSupplementsState(),this.selectedCategory(e);var t=this.sortBy()?{name:this.sortBy(),order:this.sortOrder()}:void 0;e.publications?this._publicationsModel=new ct.A({target:this.publications,source:e.publications,pageSize:20,orderBy:t}):this._publicationsModel=new lt.A({provider:st.Px,ViewModel:ut.A,target:this.publications,pageSize:20,filters:{hasCategories:e.id?[e.id]:void 0},orderBy:t}),this._publicationsModel.search(this.searchText())},e.prototype.selectCategoryGroup=function(e){this.state()===this.states.supplements&&this.exitSupplementsState(),this.selectedCategoryGroup(e),this.categories(this._syntheticCategories.concat(e.categories));var t=this.selectedCategory();t&&(0,oe.some)(this.categories(),t)||this.selectCategory(this.categories()[0])},e.prototype.sortPublications=function(e){e===this.sortBy()?this.sortOrder((0,rt.L)(this.sortOrder())):(this.sortBy(e),this.sortOrder(it.sv[e])),this._publicationsModel.sort(this.sortBy(),this.sortOrder())},e.prototype.selectPublication=function(e){this.state()===this.states.publications&&e.hasSupplements?this.enterSupplementsState(e):(u.A.showNewspaper(e.cid),this.close())},e.prototype.init=function(e){var t=(void 0===e?{}:e).searchText;this.selectCategoryGroup(this.categoryGroups[0]),t&&(this.selectCategory(this._allCategory),this.searchText(t))},e}(),ft=function(e){var t=q.default.createInstance();return ot.Ay.show(),s.A.loaded().then((function(){var n=s.A.get("ui.Catalog.Menu.myNewspapersEnable",!0),r=[];return r.push(n?at.A.load().then((function(e){return(0,st.yC)(e.cids)})):Promise.resolve([])),r.push(y.A.getLatestReadIssues().then((function(e){return(0,st.yC)((0,oe.map)(e,"cid"))}))),r.push((0,st.X6)()),r.push((0,st.kG)()),Promise.all(r).then((function(n){var r=(0,i.zs)(n,4),o=r[0],a=r[1],u=r[2],c=r[3],l=new ht(t,s.A,(0,oe.map)(o,(function(e){return new ut.A(e)})),(0,oe.map)(a,(function(e){return new ut.A(e)})),u,c);return l.init(e),t.show({templateName:"v7.Client.Dialogs.NewCatalog",model:l,height:"100%"}),t}))})).catch(dt.logError).finally((function(){return ot.Ay.hide()}))},pt=n(70079),mt=n(92066);Ve.A.bookmark=function(){var e={available:function(e,t){return!0},enabled:function(e,t){return!1},activate:function(e,t){return(0,i.sH)(void 0,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:if(!t)throw new Error("Bookmark context undefined");return[4,(0,pt.O)()];case 1:return e.sent(),[2,Re.A.show({bookmarkContext:t})]}}))}))}};return O.OH("bookmark",e),e}(),Ve.A.copy=function(){var e={available:function(e,t){var n;return!!(null===(n=null==t?void 0:t.article)||void 0===n?void 0:n.ArticleId)},enabled:function(e,t){return!1},activate:function(e,t){return Ze.show(t.article)}};return O.OH("copy",e),e}(),Ve.A.comment=function(){var e={available:function(e,t){return(0,re.Jr)("comments",null,t.article&&t.article.Issue&&t.article.Issue.Id||t.issue).then((function(e){return!!s.A.get("ui.Comments.enable",!0)&&e&&!!t&&!!t.article}))},enabled:function(e,t){return!!s.A.get("ui.Comments.enable",!0)&&t&&t.article},activate:function(e,t,n){var i=t.article,r={articleId:i.ArticleId,userId:t.Uid,articleTitle:i.Title,articleSubtitle:i.Subtitle,contextProfileName:mt.o.profileId};n?$e.A.showPost(r):$e.A.show(r)}};return O.OH("comment",e),e}(),Ve.A.translate=function(){var e={available:function(e,t){return!0},enabled:function(e,t){return!1},activate:function(e,t){}};return O.OH("translate",e),e}(),Ve.A.selectTitle={available:function(e,t){return!0},enabled:function(e,t){return!0},activate:function(){return et.A.showDialog().then((function(e){e?ft():tt.A.goView(nt.lP.StoreHub,{catalogView:nt.$r.Catalog})}))}},Ve.A.vote=function(){var e={available:function(e,t){return!0},enabled:function(e,t){return E.online()}};return O.OH("vote",e),e}();var gt=n(17065),vt=n(73690),yt=n(70989),_t=n(26190),bt=n(53236),wt=n(73035);Ve.A.pageView=function(){var e={available:function(e,t){return e!=A.Ay.views.pageView},enabled:function(e,t){return t},activate:function(e,t){if(yt.A.getActiveViewName()!==nt.lP.TextView)return tt.A.goView(nt.lP.PagesView,{issue:t.article.Issue.Id,page:t.article.Page,articleId:t.article.ArticleId,bookmark:t.article.AccessBookmarkId});if(!t.article)return _t.A.switchToImageView();var n={issue:t.article.Issue.Id,page:t.article.Page.number,articleId:t.article.ArticleId};_t.A.switchToImageView(n)}};return O.OH("pageView",e),e}(),Ve.A.textView=function(){var e=function(e,t){var n=null;return t&&(t.article&&t.article.Issue&&t.article.Issue.Id?n=t.article.Issue.Id:t.issue&&t.issue.Id&&(n=t.issue.Id)),n||(n=b.A.issue()),n},t=function(t,n){var i=e(0,n);return i?(n&&n.issueInfo?n.issueInfo.CouldPotentiallyBeRead:b.A.coudlIssueBeRead())?Promise.resolve(!1):(0,re.Jr)("smartFlowIfIssueCouldNotBeRead",null,i).then((function(e){return!e})):Promise.resolve(!1)},n={available:function(e,t){return e===A.Ay.views.pageView&&!b.A.isIssueRestrictedBy("SmartFlow")},enabled:function(n,i){var r=e(0,i);return r?function(n,i){var r=e(0,i);return r?(i&&i.issueInfo?i.issueInfo.CouldPotentiallyBeRead:b.A.coudlIssueBeRead())?Promise.resolve(!0):Promise.all([(0,re.Jr)("smartFlow",null,r),t(0,i)]).then((function(e){var t=e[0],n=e[1];return!(!t&&!n)})):Promise.resolve(!1)}(0,i).then((function(e){return!!e&&(!!(i&&i.article&&r)||function(e,t){return e!==b.A.issue()?(t&&t.issueInfo?Promise.resolve(t.issueInfo):(0,gt.Ii)(e)).then((function(e){return t&&(t.issueInfo=e),e.Layout.ValidForSmartFlow&&e.Newspaper.EnableSmart})):Promise.resolve(b.A.layoutValidForSmartFlow()&&b.A.enableSmart())}(r,i))})).then((function(e){return!!e&&function(e,t){return Promise.all([s.A.loaded(),v.Ay.loaded()]).then((function(){return function(e,t){return e!==b.A.issue()?(t&&t.issueInfo?Promise.resolve(t.issueInfo):(0,gt.Ii)(e)).then((function(e){return t&&(t.issueInfo=e),e.languageCode})):k.A.currentLanguage()||b.A.contentLanguage()}(e,t)})).then((function(e){var t=k.A.language(e);return!(t&&t.isRtl())}))}(r,i)})):Promise.resolve(!1)},activate:function(n,i,r){return r=void 0===r||r,t(0,i).then((function(t){if(t){var n=e(0,i);return(0,vt.G4)("IssueInfo","GetPageKeys",{issue:n,pageNumber:2})}})).then((function(){if(r){if(!i.article)return _t.A.switchToTextView();var e={issue:i.article.Issue.Id,page:oe.isNumber(i.article.Page.number)?i.article.Page.number:i.article.Page,articleId:i.article.ArticleId};return _t.A.switchToTextView(e)}}))}};return O.OH("textView",n),n}(),Ve.A.bookmarksView={available:function(e,t){return!0},enabled:function(e,t){return!0},activate:function(e,t){var n=function(e){var n=yt.A.findView(nt.lP.Bookmarks).createParams(t);tt.A.goView(nt.lP.Bookmarks,n,!0)};t&&t.profileId?n(t.profileId):bt.default.getProfileIdAsync().then(n)}},Ve.A.categoryView={available:function(){return!0},enabled:function(){return!0},activate:function(e){tt.A.goView(nt.lP.Categories,e,!0)}},Ve.A.topicsView={available:function(){return!0},enabled:function(){return!0},activate:function(e){void 0===e.$replaceView&&(e.$replaceView=!0),tt.A.goView(nt.lP.Monitors,e,e.$replaceView)}},Ve.A.myAccount={available:function(){return!0},enabled:function(){return!0},activate:function(){window.location=window.basePath+"accounting/account"}},Ve.A.radio=function(){var e={available:function(e,t){var n,i=e===A.Ay.views.pageView&&b.A.issue()&&!b.A.articles().length;return t.issue&&"function"==typeof t.issue.contentLanguage&&(n=t.issue.contentLanguage()),!n&&t.article&&(n=t.article.Language),n||(n=b.A.contentLanguage()),s.A.get("ui.Listen.enable",!0)&&e!=A.Ay.views.radioView&&!i&&function(e){var t=s.A.get("radio");if(t&&t.enable&&t.languages)for(var n=t.languages.length-1;n>=0;--n)if(t.languages[n]==e)return!0;return!1}(n)},enabled:function(e,t){if(!s.A.get("ui.Listen.enable",!0))return Promise.resolve(!1);if(!E.online())return Promise.resolve(!1);var n=b.A.issue();return!n&&t.article&&t.article.Issue&&(n=t.article.Issue.Id),!n&&t.issue&&(n=oe.isObject(t.issue)?t.issue.Id:t.issue),t.activeViewName===nt.lP.PagesView&&n&&!b.A.articles().length?Promise.resolve(!1):n?(0,re.Jr)("Sound",null,n):(console.warn("cannot determine tts status: issueId is unavailable in the context"),Promise.resolve(!1))},activate:function(e,t){var n,i;if(t.article)n=t.article,i=t.article.Issue;else if(t.issue&&t.issue.articles)n=t.issue.articles()[0],i={Id:t.issue.issue(),Date:t.issue.issueDate()};else if(t.page){var r=oe.filter(b.A.articles(),{PageNumber:t.page});r.length&&(n=r[0],i={Id:t.issue})}if(n&&i){var o=n.Id,a=i.CID;(0,wt.WD)(a).then((function(e){tt.A.goView(nt.lP.Radio,{articleId:o+"",country:e.country,newspaper:e.publication,issueDate:i.Date||""})}))}}};return O.OH("listen",e),e}();var Ct=n(91152),At=n(62297);Ve.A.printArticleText=function(){var e={available:function(e,t){return t&&t.article&&t.article.Blocks},enabled:function(e,t){return t&&t.article&&t.article.Blocks},activate:function(e,t){return Ct.default.printArticleText(t.article)}};return O.OH("printArticleText",e),e}(),Ve.A.printArticleImage=function(){var e={available:function(e,t){return t&&t.article},enabled:function(e,t){return t&&t.article},activate:function(e,t){return Ct.default.printArticleImage(t.article)}};return O.OH("printArticleImage",e),e}(),Ve.A.printCustomArea=function(){var e={available:function(e,t){return e!=A.Ay.views.radioView},enabled:function(e,t){return t&&(t.article||t.issue)},activate:function(e,t){return yt.A.getActiveViewName()===nt.lP.PagesView||"ArticleDialog"===e?Ct.default.printCustomArea(t.article,t.page,t.issue):new Promise((function(e,n){var o=function(){return(0,i.sH)(void 0,void 0,void 0,(function(){return(0,i.YH)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,3,4]),[4,Ct.default.printCustomArea(t.article,t.article&&t.article.Page&&t.article.Page.number||t.article&&t.article.Page||t.page,t.issue&&t.issue.issue()||t.article&&t.article.Issue&&(t.article.Issue.id||t.article.Issue.Id))];case 1:return i.sent(),e(),[3,4];case 2:return i.sent(),n(),[3,4];case 3:return At.A.layoutUpdated(o,"unsubscribe"),[7];case 4:return[2]}}))}))};r.nd.viewer.pagesView.layoutUpdated(o),yt.A.getActiveViewName()!==nt.lP.TextView?tt.A.goView(nt.lP.PagesView,{issue:t.article.Issue.Id,page:t.article.Page}):_t.A.switchToImageView({page:t.page||t.article&&t.article.Page&&t.article.Page.number})}))}};return O.OH("printCustomArea",e),e}(),Ve.A.printPage=function(){var e={available:function(e,t){return!0},enabled:function(e,t){return t&&(t.article||t.issue)},activate:function(e,t){return t.pageNumbers||(t.pageNumbers=[t.page]),Ct.default.printPage(t.article,t.pageNumbers,t.issue,t.newspaperName)}};return O.OH("printPage",e),e}(),Ve.A.print=function(){var e={available:function(e,t){return t&&(t.article||t.issue)},enabled:function(e,t){return t&&(t.article||t.issue)},activate:function(e,t){}};return O.OH("print",e),e}(),Ve.A.printEntireIssue=function(){var e={available:function(e,t){return!0},enabled:function(e,t){return t&&(t.article||t.issue)},activate:function(e,t){return Ct.default.printEntireIssue(t.article,t.issue,t.newspaperName)}};return O.OH("printEntireIssue",e),e}();var It,St,Pt=n(22358),xt={downloadIssue:Pt.m,downloadPage:Pt.V},Tt={main:0,preview:1};function kt(){St&&St.hide&&St.hide()}function Et(){r(It).off("download"),St=null}var Mt,Dt=It={show:function(e){(St=q.default.getInstance()).onHide(Et);var t={templateName:"v7.Client.Dialogs.Pdf.Download",model:{thumbs:e.thumbs,buttonText:e.text,currentState:ko.observable(e.state||Tt.main),headerText:v.Ay.val("Menu.PdfDownload"),buttonsCancelText:v.Ay.val("Buttons.Cancel.Text"),buttonsDownloadText:v.Ay.val("Buttons.Download.Text"),publisherName:v.Ay.val("BrandName"),state:Tt,cancel:function(){kt()},download:function(){r(It).trigger("download"),kt()}}};St.show(t)},hide:kt,onDownload:function(e){r(It).on("download",e)}};function Nt(e,t){var n;t||(t=event),t.target?n=r(t.target):t.srcElement&&(n=t.srcElement);var i=n.parent();i.width(n.width()),i.height(n.height())}function Lt(e){Mt?Mt.attr("src",e):Mt=r("").appendTo(e);l.ready((function(){var e=r("

").attr("id",n+"obj"),i=r("
").css("text-align","center");l.contents().find("body").css("margin","0").append(i),i.append(e),swfobject.embedSWF(t.jwPlayerUrl||"scripts/player.swf",e[0],u,c,"9.0.115",!1,o,a,s),t.fallbackImage&&function(e,t,n){var i=n||"Unsupported video";r("").appendTo(e).attr({src:t,title:i})}(e,t.fallbackImage,t.fallbackImageTooltip)}))},tr=n(31572),nr="controls";function ir(e,t){return r("<"+t+"/>").appendTo(e)}function rr(e,t){return!(!e||!t)&&oe.endsWith(e.toLowerCase(),t.toLowerCase())}function or(e,t){var n=this;n._$this=r(this),n._settings=r.extend({},n._defaultSettings,t),n._$container=e,n._oldContent=e.html(),n._$video=null,n._hideVideoControlsTimeout=null}Ki={isSupported:function(e){var t=this.attributes;return Fe.b.video[t.featureKey]&&(e[t.format]||rr(e.fallback,t.fileExt))},render:function(e,t){var n=this.attributes;ir(e,"source").attr({src:t[n.format],type:n.type})}},Ji=r.extend({},Ki,{attributes:{featureKey:"h264",format:"mp4",fileExt:".mp4",type:"video/mp4"}}),Qi=r.extend({},Ki,{attributes:{featureKey:"webm",format:"webm",fileExt:".webm",type:"video/webm"}}),Zi=r.extend({},Ki,{attributes:{featureKey:"ogg",format:"ogg",fileExt:".ogv",type:"video/ogg"}}),$i={videoSources:[Ji,Qi,Zi],renderSources:function(e,t){var n=0;return oe.each(this.videoSources,(function(i){i.isSupported(t)&&(i.render(e,t),n+=1)})),n}},or.prototype={playEventName:"play",pauseEventName:"pause",endedEventName:"ended",_defaultSettings:{styleClass:null,autoStart:!0,width:"auto",height:"auto",caption:null,mp4:null,ogg:null,webm:null,fallback:null,fallbackImage:null,fallbackImageTooltip:null},_getFallbackFlashVideoFile:function(){var e=this;return rr(e._settings.fallback,".flv")?e._settings.fallback:e._settings.mp4?e._settings.mp4:e._settings.fallback},_renderVideoSources:function(){var e=this;0===$i.renderSources(e._$video,e._settings)&&e._settings.fallback&&ir(e._$video,"source").attr("src",e._settings.fallback)},_hideVideoControls:function(){var e=this._$video[0];e.hasAttribute(nr)&&e.removeAttribute(nr)},_cancelAutoHideControls:function(){this._hideVideoControlsTimeout&&window.clearTimeout(this._hideVideoControlsTimeout)},_hideVideoControlsAfterTimeout:function(){var e=this,t=e._$video[0];e._cancelAutoHideControls(t),e._hideVideoControlsTimeout=window.setTimeout((function(){e._hideVideoControlsTimeout=null,e._hideVideoControls(t)}),5e3)},_showVideoControls:function(){var e=this._$video[0];e.setAttribute(nr,nr),this._hideVideoControlsAfterTimeout(e)},_onVideoTouchedOrClicked:function(e){var t=this._$video[0];r.browser.iOS||(function(e){return!e.paused&&!e.ended&&!e.seeking&&e.readyState>=e.HAVE_FUTURE_DATA&&e.currentTime>0}(t)?t.pause():t.play(),e.stopPropagation(),e.preventDefault()),this._showVideoControls()},_onPlay:function(){var e=this;e._hideVideoControlsAfterTimeout(),e._$this.triggerHandler(e.playEventName,e)},_onPause:function(){var e=this;e._$this.triggerHandler(e.pauseEventName,e)},_onEnded:function(){var e=this;e._$this.triggerHandler(e.endedEventName,e)},_onSeeking:function(){this._cancelAutoHideControls()},_renderVideoPlayer:function(){var e,t,n,i=this;Fe.b.video?(i._$video=ir(i._$container,"video"),tr.X1(i._$video),(e=i._$video[0]).onplay=i._onPlay.bind(i),e.onpause=i._onPause.bind(i),e.onended=i._onEnded.bind(i),e.onseeking=i._onSeeking.bind(i),i._$video.on("touchstart click",i._onVideoTouchedOrClicked.bind(i)),i._$video.height(i._settings.height).width(i._settings.width),i._settings.autoStart&&i._$video.attr({controls:"",autoplay:""}),i._renderVideoSources()):((t=ir(i._$container,"div")).height("100%").width("100%").attr("id",i._$container.attr("id")+"_flashPlayer"),n={isVideo:!0,fallbackFile:i._getFallbackFlashVideoFile(),autoStart:i._settings.autoStart,fallbackImage:i._settings.fallbackImage,fallbackImageTooltip:i._settings.fallbackImageTooltip,width:i._settings.width,height:i._settings.height},er(t,n))},render:function(){var e=this;e._$container.empty(),e._settings.styleClass&&e._$container.addClass(e._settings.styleClass),e._renderVideoPlayer(),e._settings.caption&&e._$container.append('
'.concat(e._settings.caption,"
"))},destroy:function(){var e=this;e._$video&&e._$video.off("click touchstart"),e._$container.html(e._oldContent)}};var ar=or;function sr(e,t){this._$playerContainer=e,this._settings=t}sr.prototype={render:function(){var e,t,n=this;Fe.b.audio&&Fe.b.audio.mp3?(e=r("").appendTo(n._$playerContainer),tr.X1(e),e.width(n._settings.width||"100%").height(n._settings.height||"100%"),r("").appendTo(e).attr("src",n._settings.file)):(t={isVideo:!1,fallbackFile:n._settings.file,autoStart:n._settings.autoStart,fallbackImage:n._settings.fallbackImage,fallbackImageTooltip:n._settings.fallbackImageTooltip,width:n._settings.width,height:n._settings.height},er(n._$playerContainer,t))}};var ur=sr,cr=n(18619),lr=function(e){var t=this;this.aId=e.ArtifactId,this.height=e.PreviewMeta.Height,this.width=e.PreviewMeta.Width,this.id=function(){return t.aId},this.imageSrc=function(){return Promise.resolve(e.PreviewUrl)},this.type=cr.uk.image,this.caption=e.Caption},dr=n(65264),hr=n(35765);function fr(e,t,n){return{type:e,videoId:t,videoUrl:n}}var pr={youTube:"youTube",vimeo:"vimeo",dailyMotion:"dailyMotion",kaltura:"kaltura",blipTv:"blipTv"},mr={parse:function(e){var t=e.match(/https?:\/\/(?:[0-9A-Z\-]+\.)?(?:youtu\.be\/|youtube(?:-nocookie)?\.com\S*[^\w\s\-])([\w-_]{10,15})(?=[^\w\-]|$)(?![?=&+%\w.\-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.\-]*/i);return t&&t[1]?fr(pr.youTube,t[1],e):null}},gr={parse:function(e){var t=e.match(/^.+vimeo\.com\/(.*\/)?([^#\?]*)/i);return t?fr(pr.vimeo,t[2]||t[1],e):null}},vr={parse:function(e){var t=e.match(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/i),n=t?t[4]||t[2]:null;return n?fr(pr.dailyMotion,n,e):null}},yr={parse:function(e){var t=e.match(/^.+kaltura\.com\/tiny\/(\w+)/i);return t&&t[1]?fr(pr.kaltura,t[1],e):null}},_r={parse:function(e){var t=e.match(/^.+blip.tv\/?(.+-)(\d+)/i);return t&&t[2]?fr(pr.blipTv,t[2],e):null}},br=[mr,gr,vr,yr,_r],wr={youTube:{getEmbedHtml:function(e,t,n,i){var r='';return i&&(r+='
'.concat(i,"
")),r}},vimeo:{getEmbedHtml:function(e,t,n,i){var r='';return i&&(r+='
'.concat(i,"
")),r}},dailyMotion:{getEmbedHtml:function(e,t,n,i){var r='';return i&&(r+='
'.concat(i,"
")),r}},kaltura:{getEmbedHtml:function(e,t,n,i){var r='';return i&&(r+='
'.concat(i,"
")),r}},blipTv:{getEmbedHtml:function(e,t,n,i){var o,a,s,u,c=new Pn.c;return function(e,t){var n=new Pn.c;return(0,hr.R)("https://www.google.com/jsapi").then((function(){window.google.load(e,"1",{callback:function(){n.resolve(window.google[e])}})})),n.promise()}("feeds").then((function(l){o="//blip.tv/rss/view/"+e.videoId,(a=new l.Feed(o)).setResultFormat(l.Feed.XML_FORMAT),a.load((function(e){(s=r(e.xmlDocument).find("blip\\:embedLookup").text()||r(e.xmlDocument).find("embedLookup").text())?(u='',u+='',i&&(u+='
'.concat(i,"
"))):u="

Unable to extract video key from the RSS feed.

",c.resolve(u)}))})),c.promise()}}},Cr=function(e){var t=null;return _.every(br,(function(n){return!(t=n.parse(e))})),t},Ar=function(e,t,n,i){return e?wr[e.type].getEmbedHtml(e,t,n,i):"

Video URL is not supported or video URL is invalid.

"},Ir="socialVideoEmbedder",Sr={videoUrl:null,width:0,height:0,throwErrorOnUnsupportedUrl:!1,caption:null};function Pr(e,t){var n=this;t=t||{},n.options=r.extend({},Sr,t),n._isActive=!0,n._$element=r(e),n._oldContent=e.innerHTML,n._$element.html("
"),n._$videoContainer=n._$element.children(":first"),n._$videoContainer.width("100%").height("100%"),n._embedPlayer()}r.fn[Ir]=function(e){var t=Array.prototype.slice.call(arguments,1),n=void 0;return this.each((function(){var i=r.data(this,"plugin_"+Ir);i?"string"==typeof e&&"_"!==e[0]&&"function"==typeof i[e]&&(n=i[e].apply(i,t)):(i=new Pr(this,e),r.data(this,"plugin_"+Ir,i))})),void 0===n?this:n},r.extend(Pr.prototype,{_embedPlayer:function(){var e=this;if(e._isActive){if(e._videoInfo=Cr(e.options.videoUrl),!e._videoInfo&&e.options.throwErrorOnUnsupportedUrl)throw new Error("Unsupported or invalid video URL");e._videoInfo&&Promise.resolve(Ar(e._videoInfo,e.options.width,e.options.height,e.options.caption)).then((function(t){e._videoEmbedHtml=t,e._$videoContainer.html(e._videoEmbedHtml)}))}},isVideoSupported:function(){return null!==this._videoInfo},isActive:function(){return this._isActive},activate:function(){var e=this;e.isVideoSupported()&&!e._isActive&&(e._isActive=!0,e._$videoContainer.html(e._videoEmbedHtml))},deactivate:function(){var e=this;e.isVideoSupported()&&e._isActive&&(e._isActive=!1,e._$videoContainer.empty())},destroy:function(){var e=this;e._videoEmbedHtml=null,e._videoInfo=null,e._$videoContainer=null,e._$element.html(e._oldContent),e._oldContent=null,e._$element=null}});var xr,Tr,kr,Er,Mr={};function Dr(e){return parseInt(r(e.getElm()).css("zIndex"),10)+1}function Nr(e){var t;return e.empty(),t=e.attr("id")+"_stage",r("
").attr("id",t).appendTo(e).height("100%").width("100%")}xr=function(){function e(e,t,n,i,o){var a,s,u=t.getAdget(),c=u.getContentData(),l={width:n||"100%",height:i||"100%",caption:o,autoStart:!0,fallbackImage:null};if(u.isExternalVideo()){if(e.socialVideoEmbedder({videoUrl:c.url,width:l.width,height:l.height,caption:l.caption}),e.socialVideoEmbedder("isVideoSupported"))return;e.socialVideoEmbedder("destroy"),l.fallback=c.url,l[c.url.split(".").pop().toLowerCase()]=c.url}else(0,oe.each)(["mp4","webm","ogg","flv"],(function(e){var t=c.videoKeys[e];l[e]=t&&Ni()+t})),l.fallback=l.flv;(a=new ar(e,l)).render(),(s=r(a)).on(a.playEventName,(function(){t.onVideoPlay()})),s.on(a.pauseEventName,(function(){t.onVideoStop()})),s.on(a.endedEventName,(function(){t.onVideoStop()}))}return{present:function(t){var n,i;t.getAdget().getViewType()===xi.viewType.integrated?e(n=Nr(t.get$Elm()),t):(i=function(t,n){var i=t.getAdget(),o=i.getContentData(),a=i.toRatioSize({width:o.width,height:o.height}),s=o.width?100*a.width+"%":"90%",u=o.height?100*a.height+"%":"90%";return{adgetHolder:t,onRender:function(n,i){n.id=t.getElm().id+"_stage",e(r(n),i.adgetHolder,s,u,o.caption)},close:function(){return n.remove(),t.onMediaClosed(),!1}}}(t,n=r(document.body).createChild("div").addClass("pigal-container")),r.nd.templates.renderTo("v7.Client.Gallery.VideoPlayer",i,n),n.find(".pigal").css({"z-index":Dr(t)}))}}}(),Tr={present:function(e){var t=e.getAdget().getContentData(),n=Nr(e.get$Elm()),i={file:Ni()+t.audioKey,autoStart:!0};new ur(n,i).render()}},kr={present:function(e){var t,n,i=e.getAdget().getContentData(),r=[];(0,oe.forEach)(i.imageKeys,(function(e){t={PreviewUrl:Ni()+e,ArtifactId:e,PreviewMeta:{Height:i.height+"px",Width:i.width+"px"},Caption:i.caption||(0,oe.find)(i.files,{Name:e.split("/")[1]}).Caption},n=new lr(t),r.push(n)})),(new dr.A).show(r,i.imageKeys[0]).finally((function(){e.onMediaClosed()}))}},Er={present:function(e){var t,n,i=e.getAdget(),r=i.getContentData();t=r.url.toLowerCase().indexOf("fullscreen=1")>-1,Vi(t,i.getIssueId(),r.url).then((function(e){n=t?"height="+(screen.height-100)+",width="+(screen.width-100)+",left=0,top=0":"width=600,height=600",window.open(e,"_blank",n)}))}},Mr[xi.mediaType.externalVideo]=xr,Mr[xi.mediaType.video]=xr,Mr[xi.mediaType.audio]=Tr,Mr[xi.mediaType.gallery]=kr,Mr[xi.mediaType.webView]=Er;var Lr,Vr={presentAdget:function(e){var t=e.getAdget(),n=Mr[t.getMediaType()];if(!n)throw new Error("Unsupported media type: "+t.getMediaType());n.present(e)}},Rr=!0,Hr={};function Fr(){return{issueid:b.A.issue(),layoutVersion:b.A.layoutVersion()}}function Br(){return Lr&&(0,oe.isEqual)(Lr.context,Fr())?Lr:null}function zr(e,t){return(0,oe.find)(e,{refType:t})}function Or(e){if(e.contentId)return Lr.contents[e.contentId];var t,n=Lr.views[e.id];return n?((t=zr(n.panels,xi.viewPanelTypeRaw.mediaContent))||(t=zr(n.panels,xi.viewPanelTypeRaw.videoUrl)),t?Lr.contents[t.refId]:null):null}function jr(e){var t,n=Lr.views[e.id];return n&&function(e){return((0,oe.isString)(e)?e:xi.getViewTypeFromNumber(e))===xi.viewType.integrated}(n.viewType)&&(t=zr(n.panels,xi.viewPanelTypeRaw.form))?Lr.forms[t.refId]:null}function Ur(e){for(var t,n,i=e.getLayersContainer()[0].firstChild;i;)t=i.nextSibling,(n=r(i).data("adgetHolder"))&&n.dispose(),i=t}function Wr(e,t){Vr.presentAdget(t),t.onMediaShowed()}function Yr(e){var t,n,i,r,o,a,s,u,c,l,d;if(Ur(e),t=e.getPage()){if(!t.isPotentiallyRestrictedMode()&&(n=function(e){var t=Br();return t&&t.placements?(0,oe.filter)(t.placements,{pageNumber:e.pageNumber()}):null}(t),n&&0!==n.length)){for(i=document.createDocumentFragment(),l=0,d=n.length;l

'+v.Ay.get(e,"")+"

")[0]}return r(to.cloneNode(!0))}()),t._tintInited=!0,t.optimizeShowHideForSingleElement(!1),b.A.coudlIssueBeReadChange&&b.A.coudlIssueBeReadChange(ro.bind(e)))}(e)})),n(13532);var ao=n(69463),so=n(61890),uo=n(68092),co=new ao.B,lo=(co.asObservable(),""),ho=b.A.pages,fo={};function po(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n,r;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,b.A.hasRestriction("Blackout")];case 1:return e=i.sent(),t=b.A.hasVisiblePages(),n=fo[yt.A.getActiveViewName()]&&!0===ho.loaded(),r=e&&"Active"!==lo||!t,_t.A.enable(n&&!r),_t.A.renderViewerPages(),co.next(),[2]}}))}))}fo[nt.lP.TextView]=!0,fo[nt.lP.PagesView]=!0,fo[nt.lP.External]=!0,yt.A.activeViewChanging(po),yt.A.activeViewChanged(po),b.A.layoutLoaded(po),ho.loadedChange(po),ho.activePagesChange(_t.A.onActivePagesChanged),y.A.onUserStateChanged((function(){return(0,i.sH)(void 0,void 0,void 0,(function(){var e,t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return(0,so.x)()?[4,(0,uo.z)()]:[3,2];case 1:return e=(null===(t=n.sent())||void 0===t?void 0:t.subscriptionStatusName)||"",[3,3];case 2:e="",n.label=3;case 3:return lo=e,[2]}}))}))})),n(41468),n(14359),b.A.textView=b.A.textView||{},b.A.textView.builders={},n(89730),n(7599);var mo=n(39108),go=n(93482),vo=(n(69481),n(23054),n(62449),n(90259)),yo=(n(60146),n(18429),n(74306),n(37399),n(95999),1),_o={},bo=function(){return(0,Ce.Ct)("UI.ExportToEReader.LayoutRequestURL","")};_o.getDeviceTypes=function(e){return(0,vt.G4)("deviceExport","GetDeviceTypesForExport",{issue:e})},_o.addExportRequest=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,fetch(bo(),{method:"POST",body:JSON.stringify({Ticket:e})})];case 1:return(t=i.sent()).ok?[4,t.json()]:[3,3];case 2:2===(n=i.sent()).Status?_o.onStarted(n.RequestId):_o.onError(n.Message),i.label=3;case 3:return[3,5];case 4:return r=i.sent(),_o.onError(r),[3,5];case 5:return[2]}}))}))},_o.getExportRequestStatus=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,fetch("".concat(bo(),"?requestId=").concat(e),{method:"GET"})];case 1:return(t=i.sent()).ok?[4,t.json()]:[3,3];case 2:switch((n=i.sent()).Status){case yo:case 2:_o.onProgress(n.Message,n.Percent);break;case 3:case 4:case 6:_o.onError("getExportRequestStatus ".concat(e," ").concat(null==n?void 0:n.Message));break;case 5:_o.onComplete();break;default:throw new Error("Unknown request status = ".concat(n.Status))}i.label=3;case 3:return[3,5];case 4:return r=i.sent(),_o.onError(r),[3,5];case 5:return[2]}}))}))},r.nd.deviceExport.setProvider(_o),n(60798),n(48326),n(86053),n(9941),n(71484),n(17782),n(8403),n(50911),n(73814),n(1209),n(47470);var wo=n(85377),Co=n(92336),Ao=n(29583);function Io(){var e,t=this;this._pageCont=null,this.showCommentsTimeoutId=null,this.articles=[],this.rendered=new Pn.c,this.isPersonalizationDisabled=a().observable(null===(e=Co.A.getSponsor())||void 0===e?void 0:e.isEmbeddedModeEnabled),Co.A.onSponsorshipStateChanged((function(){var e;t.isPersonalizationDisabled(null===(e=Co.A.getSponsor())||void 0===e?void 0:e.isEmbeddedModeEnabled)}))}var So={};function Po(e,t,n,i,r){return function(e){var t=So[e];return t||(So[e]=t=Ao.parseHTML("
0
")[0]),Ao(t.cloneNode(!0))}("lbl-comment"+(r?" neg":"")).attr({id:"block_"+Ao.nd.id(),"def-scale":i,"related-article-id":n,comments:"0",class:"block ovl-comment"}).css({position:"absolute",overflow:"visible",width:"auto",height:"auto","z-index":"3",top:100*t.Y+"%",left:100*(t.X+t.W)+"%",display:"none"})}function xo(e,t){e.bind({"touchstart touchend mousedown mousemove mouseup":function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},touchmove:function(e){return!1}}).click((function(e){return e.stopPropagation(),$e.A.show({articleId:this.article.RootArticleId,articleTitle:this.article.Title,articleSubtitle:this.article.Subtitle}),!1})),wo.A.onCommentsMetaUpdated((function(n,i,r){i.articleId==t.RootArticleId&&(e.find("em").text(r.commentsCount>0?r.commentsCount:""),e.css("display",r.commentsCount>0?"block":"none"))})),En.A.onVotesMetaUpdated(En.A.contentTypes.ARTICLE,(function(n,i,r){i==t.RootArticleId&&e.toggleClass("neg",r.dislikesCount>r.likesCount)}))}function To(e,t){e.rendered.then((function(){var n=e._pageCont;n?(n.cont.find(".ovl-comment[related-article-id='"+t.RootArticleId+"']").each((function(){this.article=t;var e=Ao(this);e.attr("comments")!=t.Comments&&(e.find("em").text(t.Comments),e.attr("comments",t.Comments)),t.Comments&&e.is(":hidden")&&e.show()})),Eo(e,t.RootArticleId,t.LikeIt-t.HateIt)):console.log("Can not update comment label. PageCont is not initialized.")})).catch((function(e){console.log("Failed to update comment label. Reason: "+e)}))}function Eo(e,t,n){e.rendered.then((function(){var i=e._pageCont;if(i&&t){var r=i.cont.find(".ovl-comment[related-article-id='"+t+"'] a");n<0&&!r.hasClass("neg")?r.addClass("neg"):n>0&&r.removeClass("neg")}else console.log("Either page or article is null.")})).catch((function(e){console.log("Failed to update vote. Reason: "+e)}))}Io.prototype={_lastUpdated:new Date(1985,7,31),render:function(e,t){this._pageCont=e;for(var n=t.Articles,i=[],r=0;r<(n||[]).length;r++){var o=n[r];this.articles.push(o);for(var a=o.Blocks||[],u=0;u1e4},cleanup:function(){this._pageCont&&this._pageCont.cont.find(".ovl-comment").remove()}},Ao.nd.viewer.pagesView.metadata=Io,n(88182);var Mo=n(29583);Mo.nd.lookup=function(e){var t,n,i,r,o,a=e||[],s={},u={},c="";this.Items=function(){return a},this.SortedItems=function(e,t){return function(e,t,n){var i=e.slice(0);n=!n||n>=0?1:-1;var r=Mo.getPathExp(t);return n>0?i.sort((function(e,t){var n=r(e),i=r(t);return n==i?0:n>i?1:-1})):i.sort((function(e,t){var n=r(e),i=r(t);return n==i?0:n>i?-1:1})),i}(a,e,t)},this.isVisible=function(e){return t=e,this},this.lookUpProperties=function(e){return r=e,this},this.onShowItem=function(e){return n=e,this},this.onHideItem=function(e){return i=e,this},this.onChange=function(e){return o=e,this},this.ignoreSymbols=function(e){e=new String(e||"");for(var t=0;t2)n.push(e[0]+"-"+e[e.length-1]);else for(var t=0;t13?a.slice(0,10)+"...":a,cancel:function(){e.hide(G.d.Cancel)},categoryClick:function(){var t=r(r.extend({},this)).removeProp("visible")[0];e.hide(G.d.Ok,{section:t})},byCountryClick:function(){Uo.show(e).onHide((function(t,n){n&&n.status==G.d.Ok&&e.hide(G.d.Ok,n)}))},byLanguageClick:function(){Yo.show(e).onHide((function(t,n){n&&n.status==G.d.Ok&&e.hide(G.d.Ok,n)}))},publications:o.observableArray([]),canLoadMorePublications:o.observable(!0)},u=new r.nd.ObservableCollectionNew([]);u.setPageSize(20);var c=new Xo.A({provider:st.Px,pageSize:s.pageSize}),l=[];switch(c.stream.subscribe((function(e){if(s.canLoadMorePublications(c.hasMore()),null!==e)oe.forEach(e,(function(e){s.publications.push(new ut.A(e))}));else{var n=t.mode!==A.Ay.addSectionModes.main||""!==s.searchText()||s.sortBy()?[]:i;s.publications(n)}})),s.onScrolled=oe.throttle((function(){c.getMore()}),300),s.searchKeyUp=oe.debounce((function(e,t){var n=r(t.target).val();s.searchText(n),c.filter({searchText:n,hasCategories:l}),u.setFilter(s.searchText(),"text").render()}),300),s.issueClick=function(t,n){if(!s.loading){s.loading=!0;var i=r(n.currentTarget).css("opacity","0.4");zo.show(this,e).onShow((function(){s.loading=!1,i.css("opacity","1")})).onHide((function(t,n){n&&n.status==G.d.Ok&&e.hide(G.d.Ok,n)}))}},s.sort=function(e){var t=s.sortBy();t&&t===e?s.sortOrder(rt.L(s.sortOrder())):(s.sortBy(e),s.sortOrder(it.sv[e])),c.sort(s.sortBy(),s.sortOrder())},t.mode){case A.Ay.addSectionModes.main:var d=oe.map(t.categories,(function(e){return oe.extend({},e,{visible:o.observable(!0)})}));u.reset().updateSource(d).render(),s.categories=u.items,c.filter({});break;case A.Ay.addSectionModes.byCountry:case A.Ay.addSectionModes.byLanguage:l=[t.categoryId],c.filter({hasCategories:l});break;default:throw new Error("Unexpected mode: "+t.mode)}return s}))}(n,t).then((function(e){n.show({templateName:"v7.Client.Dialogs.AddSection",model:e,focusElement:"input:text",name:"feedsettings-main",height:"100%"})})),n}}},Go=(Ro.main=qo,n(98884)),Ko=n(41107),Jo=n(96536),Qo=n(37526);function Zo(e,t,n){return(0,i.sH)(this,void 0,Promise,(function(){return(0,i.YH)(this,(function(i){return[2,new Promise((function(i,r){var o=!1,a=null==n?void 0:n.pipe((0,Jo.$)()).subscribe((function(e){o=e}));if(e())return null==a||a.unsubscribe(),i();var s=setInterval((function(){return o?(clearInterval(s),null==a||a.unsubscribe(),r()):e()?(clearInterval(s),null==a||a.unsubscribe(),i()):void 0}),t)}))]}))}))}function $o(e,t,n){return new Promise((function(i,r){var o=null==n?void 0:n.pipe((0,Jo.$)()).subscribe((function(e){null==s||s.disconnect(),r(e)})),a=e;if(e.matches(t))return null==o||o.unsubscribe(),i(a);if(a=e.querySelector(t))return null==o||o.unsubscribe(),i(a);var s=new MutationObserver((function(e){e.find((function(e){for(var n=0;n0||t()>0)&&r.stnPlayerDiv.offsetHeight>.9*n}),500)]):[3,2];case 1:return o.sent(),n(),[3,3];case 2:this.stnPlayerDiv.style.cssText="width: ".concat(this.cfg.embeddedWidth,"px;"),o.label=3;case 3:return[2]}}))}))},e.prototype.setupCloseButton=function(){return(0,i.sH)(this,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,$o(this.stnPlayerDiv,"stn-player")];case 1:return t.sent(),this.stnPlayerDiv.querySelector("#stnCloseButton")||((e=document.createElement("div")).id="stnCloseButton",e.onclick=this.closeButton.bind(this),this.stnPlayerDiv.prepend(e)),[2]}}))}))},e.prototype.setupMonitor=function(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n,r;return(0,i.YH)(this,(function(o){switch(o.label){case 0:e=(0,i.Cl)((0,i.Cl)({},Qo._),{partialVisibility:!0,intervalDelay:500,onChange:this.onVisibilityChangeHandler.bind(this)}),this._cancellationToken.next(!0),null===(r=this.visibilitySensor)||void 0===r||r.stopWatching(),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,$o(document.body,this.cfg.visibilitySelector,this._cancellationToken)];case 2:return t=o.sent(),this.visibilitySensor=new Qo.L(t,e),this.visibilitySensor.startWatching(),[3,4];case 3:return n=o.sent(),en.A.log("[SendToNews] Error: ".concat(n)),[3,4];case 4:return[2]}}))}))},e.prototype.onVisibilityChangeHandler=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return e?[4,$o(document.body,this.cfg.staticParentSelector)]:[3,2];case 1:return t=i.sent(),this.moveStnPlayerDiv(t),[3,3];case 2:if(this.wasDestroyed)return[2];this.moveStnPlayerDiv(document.body),i.label=3;case 3:return(n=this.stnPlayerDiv.querySelector("#stnCloseButton"))&&(n.style.visibility=this.isFloat?"":"hidden"),this.stnScript?[3,5]:(r=this,[4,(0,hr.R)(this.cfg.scriptURL)]);case 4:r.stnScript=i.sent(),i.label=5;case 5:return[4,this.onResize()];case 6:return i.sent(),[2]}}))}))},e.prototype.closeButton=function(){var e;this._cancellationToken.next(!0),null===(e=this.visibilitySensor)||void 0===e||e.stopWatching(),this.onVisibilityChangeHandler(!0),this.wasDestroyed=!0},e.prototype.moveStnPlayerDiv=function(e){e!==this.stnPlayerDiv.parentElement&&e.appendChild(this.stnPlayerDiv)},e}(),na=new ta,ia=na.init.bind(na),ra=n(95429),oa=n(51972),aa=n(78698),sa=n(29684),ua=n(18158),ca=n(44834),la=n(33005),da=n(26630);function ha(e){var t=e.payload.query;da.B.show({parentDialog:null,searchQuery:t})}var fa=!1,pa=n(3286),ma=n(95952),ga=n(89247),va=n(53269),ya=n(90310),_a=n(79450),ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype._getProfileOrRedirectIfChanged=function(e){var t=this;return e&&e.profileId?Promise.all([s.A.loaded(),v.Ay.loaded()]).then((function(){return _a.default.getProfile(e.profileId)})).catch((function(e){return e&&en.A.error(e),Promise.resolve(null)})).then((function(n){return n?(n.profileId===bt.default.getProfileId()&&tt.A.updateState({currentProfile:!0}),n):e.currentProfile?t._redirectIfProfileIdWasChanged(e):Promise.reject(new Error("Cannot load a profile for the specified profileId '".concat(e.profileId,"'")))})):Promise.reject(new Error("config.profileId is not specified"))},t.prototype._redirectIfProfileIdWasChanged=function(e){return bt.default.load(!0).then((function(){return e.profileId!==bt.default.getProfileId()})).then((function(t){return t?Promise.reject({redirect:function(){e.profileId=bt.default.getProfileId(),tt.A.goView(e.viewName,e,!0,!0,!0)}}):Promise.reject(new Error("Cannot load a profile for the specified profileId '".concat(e.profileId,"'")))}))},t}(ya.A),wa=ba,Ca=n(54267),Aa=n(28027),Ia=n(76855),Sa=n(48389),Pa=n(67660);function xa(e,t){var n=t[e];return n&&"all"!==n&&"bookmarks"!==n}var Ta=function(e){function t(){var t=e.call(this)||this;return t.viewName=nt.lP.Bookmarks,t._onlineListLoader=Ca.A,t._itemPreviewSizeFunctionConfig="ui.Views.Bookmarks.itemPreviewSizeFunction",t._topBarConfig={starEnable:!0,backEnable:!0,settingsEnable:!0,actionMenuOptions:[A.DA.lang],showBookmarkName:!0,headerClass:"toolbar-bookmarkstitle",newPostButtonVisible:!1},t}return(0,i.C6)(t,e),t.prototype.show=function(e){var t=this;mt.o.current=this._context,this._context.profileId=e.profileId,(0,Sa.ek)({showIssueInfo:!0});var n=(0,oe.assign)({showSections:!1,updatePreviewPanel:!1,historyTokenType:A.xq.left},e);e&&e.ignoreDataReset||this._contentProvider.reset();var i=new Promise((function(e,n){t._contentProvider.onLoadOnce(e).onErrorOnce(n)}));return this._builder.reset(),this._controller.enable().show(n),i},t.prototype.reset=function(){e.prototype.reset.call(this),Aa.A.setInitialPosition(this._view)},t.prototype.getResetParams=function(){return{}},t.prototype.getTopBarConfig=function(){return this._topBarConfig},t.prototype.showView=function(e){return this.show(e)},t.prototype.createParams=function(e){return{profileId:e.profileId,collection:e.collection&&encodeURIComponent(e.collection),collectionId:e.collectionId,refViewName:e.refViewName}},t.prototype.registerRoutes=function(t){var n=this,i=function(t){return e.prototype._getProfileOrRedirectIfChanged.call(n,t).then((function(){return function(e){return e.profileId&&e.collection&&!e.collectionId?(0,Pa.jT)(e.profileId).then((function(t){var n=(0,oe.find)(t,(function(t){return t.slug===e.collection}));n&&(e.collectionId=n.id)})):Promise.resolve()}(t)})).then((function(){Ca.A.setSearchParams(t),n.saveViewConfig(t),n._topBarConfig.newPostButtonVisible=s.A.get("post.enabled")&&t.profileId===bt.default.getProfileId()}))};t.addRoute({name:"bookmarks2_channel",template:"@{profileId}/collection/{collection}/",defaults:{viewName:nt.lP.Bookmarks},constraints:{collection:xa,viewName:new Ia.D(nt.lP.Bookmarks)},executeWith:function(e){return i(e).then((function(){e.collectionId||tt.A.goView(nt.lP.Profile,{profileId:e.profileId})}))}}).addRoute({name:"bookmarks4_channel",template:"@{profileId}/bookmarks/{collection}/",defaults:{viewName:nt.lP.Bookmarks},constraints:{collection:xa,viewName:new Ia.D(nt.lP.Bookmarks)},executeWith:i}).addRoute({name:"bookmarks1_channel",template:"@{profileId}/collections",defaults:{viewName:nt.lP.Bookmarks},constraints:{viewName:new Ia.D(nt.lP.Bookmarks)},executeWith:i})},t.prototype._createView=function(){var t=e.prototype._createView.call(this);return Aa.A.linkView(t),t},t.prototype._onViewStateChanged=function(e,t){if(t.id){var n={itemId:t.id,type:t.type,expanded:t.expanded,articleHistoryToken:t.articleHistoryToken||0,currentArticlePosition:t.articlePosition};tt.A.updateState(n)}},t}(wa),ka=new Ta,Ea=n(50794),Ma=n(53308),Da=n(30212),Na=n(67373);function La(e){return e.bookmarkType===Na.x.article&&"articleId"in e}function Va(e){return e.bookmarkType===Na.x.pages&&"pageSetId"in e}function Ra(e){return e.bookmarkType===Na.x.pageSet&&"pageSetId"in e}var Ha=n(90189);function Fa(e){var t=(0,Jt.R)(e.created);return t||((0,Da.z)(new Error("Bookmark created date is missing")),t=new Date),(0,i.Cl)((0,i.Cl)({},(0,Ha.b)(e)),{id:e.bookmarkId,created:t,ownerId:e.enAccountNumber,bookmarkType:e.bookmarkType})}function Ba(e){var t,n=e.bookmarkType;if(La(e)?t=function(e){var t=Fa(e),n=e.articleId;return(0,i.Cl)((0,i.Cl)({},t),{articleId:n})}(e):(Va(e)||Ra(e))&&(t=function(e){var t=Fa(e),n={id:e.pageSetId},r=e.pageSetId;return(0,i.Cl)((0,i.Cl)({},t),{pageSetId:r,pageSet:n,bookmarkType:e.bookmarkType})}(e)),t&&function(e,t){return e.bookmarkType===t}(t,n))return t;throw new Error("Invalid bookmark type. Expected type is ".concat(n))}var za,Oa,ja,Ua,Wa,Ya=new(function(e){function t(){var t=e.call(this)||this;return t.viewName=nt.lP.Bookmark,t._itemPreviewSizeFunctionConfig="ui.Views.Bookmark.itemPreviewSizeFunction",t}return(0,i.C6)(t,e),t.prototype.getTopBarConfig=function(){return{header:"TopToolbar.BookmarkTitle",isTitleDisabled:!0}},t.prototype.registerRoutes=function(e){e.addRoute({name:"bookmarkLink",template:"bookmark/{bookmark}",defaults:{viewName:nt.lP.Bookmark},constraints:{viewName:new Ia.D(nt.lP.Bookmark)},executeWith:function(e){return(t=e.bookmark,t?function(e){return(0,Ma.lx)("bookmarks",e)}(t).then(Ba):Promise.reject("bookmarkId not specified")).then((function(e){return Ea.F.ensureProfileName(null,e.ownerId)})).then((function(t){return Promise.reject({redirect:function(){tt.A.goView(nt.lP.Profile,{profileId:t,bookmarkId:e.bookmark})}})}));var t}})},t}(ya.A)),Xa=n(79341),qa=n(59530),Ga={articleId:"",load:function(){return Promise.resolve({items:[{Data:null,Id:this.articleId,Type:gn.p.article}],anchorId:this.articleId})}},Ka=function(e){function t(){var t=e.call(this)||this;return t._onlineListLoader=Ga,t._itemPreviewSizeFunctionConfig="ui.Views.Bookmark.itemPreviewSizeFunction",t}return(0,i.C6)(t,e),t.prototype.show=function(e){var t=this;mt.o.current=this._context;var n=(0,oe.assign)({showIssueInfo:!1,showSections:!1,updatePreviewPanel:!1,historyTokenType:A.xq.left},e);e&&e.ignoreDataReset||(this._contentProvider.reset(),this._contentProvider.setRestrictedSectionTypes([gn.p.leftBar]));var i=new Promise((function(e,n){t._contentProvider.onLoadOnce(e).onErrorOnce(n)}));return this._builder.reset(),e.commentKey&&$e.A.show({articleId:e.articleId,markerCommentId:e.commentKey}),this._controller.enable().show(n),i},t.prototype.reset=function(){e.prototype.reset.call(this),this.resetState({itemId:"0"}),Aa.A.setInitialPosition(this._view)},t.prototype.getTopBarConfig=function(){return{header:"TopToolbar.BookmarkTitle",isTitleDisabled:!0,settingsEnable:!1}},t.prototype.controller=function(){return this._controller},t.prototype.registerRoutes=function(e){var t=this;e.addRoute({name:"issue_newspaper_article3",template:"article/{articleId}/{viewName}",defaults:{viewName:nt.lP.Article},constraints:{articleId:qa.N1,viewName:new Ia.D(nt.lP.Article)},executeWith:function(e){t.saveViewConfig(e),Ga.articleId=e.articleId}}),e.addRoute({name:"article_comment",template:"article/{articleId}/{commentKey}",defaults:{viewName:nt.lP.Article},constraints:{articleId:qa.N1},executeWith:function(e){t.saveViewConfig(e),Ga.articleId=e.articleId}})},t.prototype._createView=function(){var t=e.prototype._createView.call(this);return Aa.A.linkView(t),t},t.prototype._onViewStateChanged=function(e,t){if(t.id){var n={itemId:t.id,type:t.type,expanded:t.expanded};tt.A.updateState(n)}},t.prototype._createBuilder=function(){var e=s.A.get(this._itemPreviewSizeFunctionConfig,this._defaultItemPreviewSizeFunction);return new Xa.A({itemPreviewSizeFunction:e,disableItemsBundling:!0})},t}(ya.A),Ja=new Ka,Qa=n(99915),Za=function(e){void 0===e&&(e={});var t=this,n=e&&e.SupportCount||0,i=e&&e.OppositCount||0;this.supportCount=o.observable(n),this.oppositCount=o.observable(i),this.totalCount=o.pureComputed((function(){return t.supportCount()+t.oppositCount()})),this.uoid="myVotes"},$a=function(e){var t=e.id;this.count=e.contentCount,this.id=t,this.title=e.name},es=function(e){this.allCount=o.observable(0),this.uoid="shared",this.allItems=o.observableArray([]);var t=(0,oe.map)(e,(function(e){return new $a(e)})),n=(0,oe.reduce)(t,(function(e,t){return e+t.count}),0);this.allCount(n),this.allItems(t)},ts=function(e){this.count=o.observable(e&&e.contentCount||0)},ns=0,is=function(){function e(e,t){var n=this,i=t||{};this.id=o.observable(i.id),this.name=o.observable(i.name).extend({required:!0,trackDirtyState:!0,undo:!0}),this.count=o.observable(i.contentCount),this.canDelete=o.pureComputed((function(){return!!n.id()})),this.isNew=o.pureComputed((function(){return!n.id()})),this.parent=e,this.uoid="lbl".concat(ns++)}return e.prototype.saveLabel=function(){var e=this;return o.nd.validate(this)?(0,Pa.IX)(this.id(),{name:this.name()}).then((function(){e.confirmEdit()})):Promise.reject("Validation error")},e.prototype.delete=function(){var e=this,t=Promise.resolve();return this.count>1&&(t=v.Ay.loaded().then((function(){var e=v.Ay.val("EditBookmarkDialog.DeletLabelWarning"),t=v.Ay.val("Buttons.Cancel.Text"),n=v.Ay.val("Buttons.Confirm");return(0,S.A)().confirm(e,t,n)}))),t.then((function(){(0,Pa.rV)(e.id())}))},e.prototype.cancelEdit=function(){this.name.undo(),this.parent.clearSelection()},e.prototype.confirmEdit=function(){this.name.commit(),this.parent.clearSelection()},e}(),rs=n(31181),os=n(79371),as=n(35374),ss=n(97600),us=function(){function e(e){var t=this;this.myVotes=new Za(e);var n=(0,oe.filter)(e,(function(e){return e.type===os.X.Sharing}));this.shared=new es(n);var i=(0,oe.find)(e,{type:os.X.System,id:as.LQ});this.readLater=new ts(i);var r=(0,oe.filter)(e,(function(e){return e.type===os.X.User})),a=this.createLabels(r);this.labels=o.observableArray(a),this.currentObjectId=o.observable(-1),this.onLabelChanged=this.onLabelChanged.bind(this),this.collectionChangeSubscription=ss.YT.subscribe((function(){return t.onLabelChanged()}))}return e.prototype.setCurrentObjectId=function(e){this.currentObjectId(e.uoid)},e.prototype.clearSelection=function(){this.currentObjectId(-1)},e.prototype.isVisible=function(e){return this.currentObjectId()===e},e.prototype.addLabel=function(){rs.A.show()},e.prototype.deleteLabel=function(e){var t=this;return e.delete().then((function(){t.labels.remove(e),t.clearSelection()}))},e.prototype.createLabels=function(e){var t=this;return(0,oe.map)(e,(function(e){return new is(t,e)}))},e.prototype.onLabelChanged=function(){var t=this;e.loadLabels({needsReload:!1,includeVotes:!0}).then((function(e){var n=(0,oe.filter)(e,(function(e){return e.type===os.X.User})),i=t.createLabels(n);t.labels([]),t.labels(i)}))},e.prototype.destroy=function(){this.collectionChangeSubscription&&this.collectionChangeSubscription.unsubscribe()},e.loadLabels=function(e){return e.needsReload,e.includeVotes,(0,Pa.Re)()},e.create=function(){return e.loadLabels({needsReload:!1,includeVotes:!0}).then((function(t){return new e(t)}))},e}(),cs=function(){function e(e){this.elm=e.elm(),this.elm.css("overflow","scroll")}return e.prototype.show=function(){var t=this;return Promise.resolve().then((function(){ot.Ay.show()})).then((function(){return us.create()})).then((function(e){t.viewModel=e})).then((function(){return e.render(t.elm,t.viewModel)})).finally((function(){ot.Ay.hide()}))},e.prototype.destroy=function(){this.viewModel&&this.viewModel.destroy(),o.cleanNode(this.elm[0]),this.elm.empty(),this.elm=null},e.render=function(e,t){return Qa.k.loaded().then((function(){Qa.k.appendTo("v7.Client.ManageBookmarks",t,e)}))},e}(),ls=cs,ds=function(){function e(){}return e.init=function(e){za=e},e.showView=function(e){var t=Promise.resolve();return Oa||(Oa=new ls(za),t=t.then((function(){return Oa.show()}))),t.finally((function(){e&&e.callback&&e.callback()}))},e.hide=function(){Oa&&(Oa.destroy(),Oa=null)},e.getTopBarConfig=function(){return{starEnable:!0,backEnable:!0,header:"TopToolbar.ManageBookmarksTitle",actionMenuEnable:!1,settingsEnable:!0,isTitleDisabled:!0,headerClass:"toolbar-managebookmarkstitle"}},e.registerRoutes=function(e){e.addRoute({name:"managebookmarks",template:"managebookmarks",defaults:{viewName:nt.lP.ManageBookmarks},constraints:{viewName:new Ia.D(nt.lP.ManageBookmarks)}})},e}(),hs=function(){function e(e,t){var n=void 0===t?{}:t,i=n.codeResource,r=n.nameResource,a=n.checked;this.code=o.observable(v.Ay.valAsync(i)).extend({async:!0}),this.name=o.observable(v.Ay.valAsync(r)).extend({async:!0}),this.checked=o.observable(!!a),this.parent=e,this.key=i}return e.prototype.save=function(){return this.parent.save(),!0},e}(),fs=hs,ps=new(n(99526).m)(1,null),ms=ps.asObservable(),gs=[{key:"enablePromotionalEmails",codeResource:"EmailAlerts.Promotional",nameResource:"EmailAlerts.Promotional.Description",valueProp:"promotionalEmailsEnabled"},{key:"enableTechnicalEmails",codeResource:"EmailAlerts.Technical",nameResource:"EmailAlerts.Technical.Description",valueProp:"technicalEmailsEnabled"}],vs=function(){function e(e){var t=this;this.alertInfos=(0,oe.map)(gs,(function(n){return{key:n.key,alert:new fs(t,{codeResource:n.codeResource,nameResource:n.nameResource,checked:e[n.valueProp]})}})),this.alerts=(0,oe.map)(this.alertInfos,"alert")}return e.prototype.save=function(){var e={};return(0,oe.forEach)(this.alertInfos,(function(t){e[t.key]=o.unwrap(t.alert.checked)})),function(e){var t=e.enablePromotionalEmails,n=e.enableTechnicalEmails,i={enablePromotional:t,enableTechnical:n};return Zt.A.post("user","emailsettings",i).then((function(){ps.next({technicalEmailsEnabled:n})}))}(e)},e}(),ys=vs,_s=n(10730),bs=(new Date).getTimezoneOffset()/60,ws=Math.round(bs),Cs=function(){function e(e,t,n,i,r){var a,s,u=r.id,c=r.searchTerm,l=r.frequencyHours,d=void 0===l?0:l,h=r.timeSent,f=void 0===h?1:h,p=this;this.id=u,this.enabled=o.observable(i),this.searchTerm=c,this.frequencyHours=o.observable(t[d]).extend({undo:!0}),this.timeSent=o.observable(n[(a=f,void 0===s&&(s=!0),(a-(s?ws:bs)+24)%24)]).extend({undo:!0}),this.uoid="monitor-".concat(this.id),this.parent=e,this.subscription=ms.subscribe((function(e){return p.onTechEmailStatusChanged(e)})),this.off=o.computed((function(){return 1024===p.frequencyHours().id}))}return e.prototype.save=function(){var e=this;if(!o.nd.validate(this))return Promise.reject(new Error("Validation error"));if(!this.canModify())return Promise.reject(new Error("Object modification is prohibited"));var t,n,i=o.unwrap(this.id),r=o.unwrap(this.frequencyHours),a=(t=r.needsTimeAdjustment?o.unwrap(this.timeSent).value:0,void 0===n&&(n=!0),(t+(n?ws:bs)+24)%24);return _s.u.updateMonitor(i,r.value,a).then((function(){e.confirmEdit()}))},e.prototype.delete=function(){if(!this.canModify())return Promise.reject(new Error("Object modification is prohibited"));var e=o.unwrap(this.id);return _s.u.deleteMonitor(e)},e.prototype.confirmEdit=function(){this.frequencyHours.commit(),this.timeSent.commit(),this.parent.clearSelection()},e.prototype.cancelEdit=function(){this.frequencyHours.undo(),this.timeSent.undo(),this.parent.clearSelection()},e.prototype.canModify=function(){return o.unwrap(this.enabled)},e.prototype.onTechEmailStatusChanged=function(e){var t=e.technicalEmailsEnabled;this.enabled(t)},e.prototype.destroy=function(){this.subscription.unsubscribe()},e}(),As=Cs,Is=function(){function e(e){var t=e.CID,n=e.Title,i=e.Alert,r=e.enabled,a=this;this.cid=t,this.title=n,this.alertsEnabled=o.observable(i),this.enabled=o.observable(r),this.uoid="issueAlert".concat(this.cid),this.subscription=ms.subscribe((function(e){return a.onTechEmailStatusChanged(e)}))}return e.prototype.toggle=function(){var e=o.unwrap(this.alertsEnabled)?"enableAlert":"disableAlert";return at.A[e](this.cid),!0},e.prototype.onTechEmailStatusChanged=function(e){var t=e.technicalEmailsEnabled;this.enabled(t),t||this.alertsEnabled(!1)},e.prototype.destroy=function(){this.subscription.unsubscribe()},e}(),Ss=Is,Ps=n(84389),xs=n(68594),Ts=n(70937),ks=new S.A,Es=function(e){v.Ay.valAsync(e).then((function(e){ks.show(e)}))},Ms=function(){function e(e,t,n,i,r){var a=this;this.availableFrequencyHours=new Ps.A(r),this.availableTimeItems=new xs.A(e),this.general=new ys(t),this.monitors=o.observableArray((0,oe.map)(n,(function(e){return new As(a,a.availableFrequencyHours,a.availableTimeItems,t.technicalEmailsEnabled,e)}))),this.currentObjectId=o.observable(-1),this.techEmailSubscription=ms.subscribe((function(e){return a.onTechEmailStatusChanged(e)})),this.maxMonitoringAlerts=r.MaxMonitoringAlerts||0,this.enabled=t.technicalEmailsEnabled,this.enabledMonitoringAlerts=o.computed((function(){return o.utils.arrayFilter(a.monitors(),(function(e){return!e.off()})).length})),this.showAllMonitors=o.observable(!0),this.displayOptions=o.observableArray([{value:!0,caption:v.Ay.val("EmailAlerts.DisplayOptions.All")},{value:!1,caption:v.Ay.val("EmailAlerts.DisplayOptions.ActiveOnly")}]),this.metaInfo=o.computed((function(){return v.Ay.format("EmailAlerts.UsageDetailsText",a.enabledMonitoringAlerts()>a.maxMonitoringAlerts?0:a.maxMonitoringAlerts-a.enabledMonitoringAlerts(),a.maxMonitoringAlerts)})),this.issueAlerts=o.observable(),this.newspaperAlertsData=o.observable(),this.newspaperAlertsData.subscribe((function(e){a.issueAlerts((0,oe.map)(e,(function(e){return new Ss((0,oe.extend)(e,{enabled:a.enabled}))})))})),this.newspaperAlertsData(i),this.configTopicAlertsEnabled=o.observable(s.A.get("UI.TopicAlerts.enable",!0))}return e.prototype.setCurrentObjectId=function(e){return this.enabled?(this.cancelMonitorsEdit(),this.currentObjectId(e.uoid)):Es("EmailAlerts.ServiceRequired"),this.enabled},e.prototype.cancelMonitorsEdit=function(){o.utils.arrayForEach(this.monitors(),(function(e){e.cancelEdit()}))},e.prototype.clearSelection=function(){this.currentObjectId(-1)},e.prototype.isVisible=function(e){return o.unwrap(this.currentObjectId)===e},e.prototype.deleteMonitor=function(e){e.delete(),this.parent.monitors.remove(e),this.parent.clearSelection()},e.prototype.onTechEmailStatusChanged=function(e){return(0,i.sH)(this,arguments,void 0,(function(e){var t,n=e.technicalEmailsEnabled;return(0,i.YH)(this,(function(e){switch(e.label){case 0:return this.enabled=n,this.enabled?[4,Ts.A.get()]:[3,2];case 1:return t=e.sent(),this.newspaperAlertsData(t),[3,3];case 2:this.clearSelection(),e.label=3;case 3:return[2]}}))}))},e.prototype.save=function(e){return this.enabledMonitoringAlerts()>this.maxMonitoringAlerts?(Es("EmailAlerts.Exceeded"),Promise.reject(new Error("Exceeded number of Topic Alerts"))):e.save()},e.prototype.destroy=function(){e.destroyItem([this.availableFrequencyHours,this.availableTimeItems,this.general,this.monitors,this.issueAlerts,this.techEmailSubscription]),this.techEmailSubscription.unsubscribe()},e.destroyItem=function(t){t&&(0,oe.isFunction)(t.destroy)&&t.destroy(),(0,oe.isArray)(t)&&(0,oe.forEach)(t,e.destroyItem)},e.create=function(){return Promise.all([_s.u.get(),Sn.getCurrent(),Ts.A.get(),Zt.A.get("user","emailsettings").then((function(e){var t={promotionalEmailsEnabled:e.EnablePromotional,technicalEmailsEnabled:e.EnableTechnical};return ps.next({technicalEmailsEnabled:t.technicalEmailsEnabled}),t})),v.Ay.valAsync("SearchMonitorPanel.ShowDeliveryTime","",!0)]).then((function(t){var n=(0,i.zs)(t,5),r=n[0],o=n[1],a=n[2],s=n[3];return new e(n[4],s,r,a,o)}))},e}(),Ds=Ms,Ns=function(e){return e.stopPropagation()},Ls=function(){function e(e){this.elm=e.elm(),this.elm.css("overflow","scroll")}return e.prototype.show=function(){var t=this;return Promise.resolve().then((function(){ot.Ay.show()})).then((function(){return Ds.create()})).then((function(e){t.viewModel=e})).then((function(){return e.render(t.elm,t.viewModel)})).finally((function(){ot.Ay.hide()}))},e.prototype.destroy=function(){this.viewModel&&this.viewModel.destroy(),this.elm.off("touchmove",Ns),o.cleanNode(this.elm[0]),this.elm.empty(),this.elm=null},e.render=function(e,t){return Qa.k.loaded().then((function(){Qa.k.appendTo("v7.Client.EmailAlerts",t,e),e.on("touchmove",Ns)}))},e}(),Vs=Ls,Rs=function(){function e(){}return e.init=function(e){ja=e},e.showView=function(e){var t=Promise.resolve();return Ua||(Ua=new Vs(ja),t=t.then((function(){return Ua.show()}))),t.finally((function(){e&&e.callback&&e.callback()}))},e.hide=function(){Ua&&(Ua.destroy(),Ua=null)},e.getTopBarConfig=function(){return{starEnable:!0,backEnable:!0,header:"TopToolbar.EmailAlertsTitle",actionMenuEnable:!1,settingsEnable:!0,isTitleDisabled:!0,headerClass:"toolbar-emailalertstitle"}},e.registerRoutes=function(e){e.addRoute({name:"emailalerts",template:"emailalerts",defaults:{viewName:nt.lP.EmailAlerts},constraints:{viewName:new Ia.D(nt.lP.EmailAlerts)}})},e}(),Hs=n(2072),Fs=((Wa={})[A.KF.attentionMap]="ReadingMap.Title.Attention",Wa[A.KF.readingTime]="ReadingMap.Title.ReadingTime",Wa[A.KF.adValue]="ReadingMap.Title.AdValue",Wa);function Bs(e){var t=e%60,n=Math.floor(e/60);return t&&n?v.Dv.format("ReadingMap.Time.MinSec",n,t):n?v.Dv.format("ReadingMap.Time.Min",n):v.Dv.format("ReadingMap.Time.Sec",t)}var zs,Os=new(function(e){function t(){var t=e.call(this)||this;return t._loadIssuePromise=new Promise((function(e){b.A.issueLoaded((function(){t._issue=b.A.issue(),t._updateModel().catch((function(){})),e()}))})),t}return(0,i.C6)(t,e),t.prototype.init=function(e){this._elm=e.elm(),e.resize(this._rearrangeColumns.bind(this))},t.prototype.show=function(e){var t=this;if(!this._isVisible){this._isVisible=!0;var n=window.readingMapReportType;(!(0,oe.isNumber)(n)||n<0)&&(n=A.KF.attentionMap),this._model?this._updateModel(n).then((function(){(0,oe.isFunction)(e.callback)&&e.callback(),t._rearrangeColumns()})):this._initModel(n).then((function(){Qa.k.renderTo("v7.Client.ReadingMap",t._model,t._elm),t._elm.attr("nd-scrollable","yes"),(0,oe.isFunction)(e.callback)&&e.callback(),t._rearrangeColumns()}))}},t.prototype.hide=function(){this._isVisible&&(this._isVisible=!1)},t.prototype.getTopBarConfig=function(){return{backEnable:!0,starEnable:!0,showNewpaperName:!0,headerClass:"toolbar-issuetitle",actionMenuEnable:!1,configMainMenuEnabled:!1}},t.prototype._initModel=function(e){if(!this._model){this._model={issue:"",reportType:o.observable(e||A.KF.attentionMap),medianReadTime:o.observable(),avgReadTime:o.observable(),usersCount:o.observable(),changeReportType:this._changeReportType.bind(this),maxTime:o.observable(),maxAdValue:o.observable(),colors:[],sections:o.observableArray(),spreads:o.observableArray(),showSpread:this._showSpread.bind(this),showSection:this._showSection.bind(this)},this._model.title=o.computed(this._getReportTitle.bind(this));for(var t=0;t<5;++t)this._model.colors[t]=o.computed(this._getColorTitle.bind(this,t))}return this._updateModel(e)},t.prototype._updateModel=function(e){var t=this;return this._isVisible&&this._model?(ot.Ay.show(),this._loadIssuePromise.then(this._loadData.bind(this)).then((function(){void 0!==e&&t._changeReportType(e),ot.Ay.hide()}))):Promise.reject()},t.prototype._loadData=function(){var e=this;if(!this._model||!this._issue)return Promise.reject();if(this._model.issue===this._issue)return Promise.resolve();this._model.issue=this._issue;var t=this._ts=Date.now();return Zt.A.get("ReadingMap","GetIssueReport",{issue:this._issue}).then((function(n){if(t!==e._ts)return Promise.reject();var i={},r=0,o=0;return(0,oe.forEach)(n.Pages,(function(e){i[e.PageNumber]=e,r=Math.max(r,e.AverageReadingTime),o=Math.max(o,e.AdValue)})),e._model.medianReadTime(Bs(n.MedianReadingTime)).avgReadTime(Bs(n.AverageReadingTime)).usersCount(n.UsersCount).maxTime(r).maxAdValue(o),b.B.load().then((function(){return t!==e._ts?Promise.reject():(e._model.sections.removeAll(),e._model.spreads.removeAll(),(0,oe.forEach)(n.Sections,(function(t){var n=e._getSectionModel(t,b.B.getPage(t.PageNumber));e._model.sections.push(n)})),(0,oe.forEach)(b.B.getPages(),(function(t,n){n&&n%2!=1||(r&&e._model.spreads.push(r),r=[]),r.push(e._getPageThumbnailModel(t,i[t.pageNumber()]))})),r&&e._model.spreads.push(r),e._rearrangeColumns(),e._model);var r}))}))},t.prototype._getSectionValue=function(e){switch(this._model.reportType()){case A.KF.attentionMap:return"".concat(Math.round(100*e.usersCount/this._model.usersCount()),"%");case A.KF.readingTime:return Bs(e.avgReadTime);default:return""}},t.prototype._getSectionModel=function(e,t){var n={avgReadTime:e.AverageReadingTime,usersCount:e.UsersCount,title:t.section(),startPageNumber:t.pageNumber(),startPageName:t.pageName()};return n.value=o.computed(this._getSectionValue.bind(this,n),n),n},t.prototype._changeReportType=function(e){e!==this._model.reportType()&&(this._model.reportType(e),window.readingMapReportType=e)},t.prototype._getPageThumbnailModel=function(e,t){void 0===t&&(t={});var n={number:e.pageNumber(),name:e.pageName(),src:e.buildThumbUrl(e.calculateThumbScale(90)),usersCount:t.UsersCount||0,avgReadTime:t.AverageReadingTime||0,adValue:t.AdValue||0};return n.normValue=o.computed(this._getPageNormValue.bind(this,n),n),n.color=o.computed(this._getPageColorIdx.bind(this,n),n),n.title=o.computed(this._getPageTitle.bind(this,n),n),n},t.prototype._getPageNormValue=function(e){switch(this._model.reportType()){case A.KF.attentionMap:var t=this._model.usersCount();return t?e.usersCount/t:0;case A.KF.readingTime:return e.avgReadTime/this._model.maxTime();case A.KF.adValue:return e.adValue/this._model.maxAdValue();default:return 0}},t.prototype._getPageColorIdx=function(e){var t=Math.ceil(5*e.normValue());return t?6-t:0},t.prototype._getPageTitle=function(e){switch(this._model.reportType()){case A.KF.attentionMap:return"".concat(Math.round(100*e.normValue()),"%");case A.KF.readingTime:return v.Dv.format("ReadingMap.Time.Sec",e.avgReadTime);case A.KF.adValue:return"".concat(e.adValue,"%");default:return""}},t.prototype._getColorTitle=function(e){var t;switch(this._model.reportType()){case A.KF.attentionMap:t=100;break;case A.KF.readingTime:t=this._model.maxTime();break;case A.KF.adValue:t=this._model.maxAdValue();break;default:t=0}return Math.round(t*(5-e)/5)},t.prototype._getReportTitle=function(){var e=Fs[this._model.reportType()]||"";return v.Dv.val(e)},t.prototype._rearrangeColumns=function(){var e=this;if(this._isVisible){var t=this._elm.find(".thumb-list ul"),n=t.width(),i=Math.floor(n/200),r=Math.floor(n/i);t.children("li").css("width",r);var o=this._elm.find(".thumb-list img"),a=o.length;o.load((function(){--a<=0&&e._elm.resize()}))}},t.prototype._showSpread=function(e){tt.A.goView(nt.lP.PagesView,{issue:this._model.issue,page:e[0].number})},t.prototype._showSection=function(e){tt.A.goView(nt.lP.PagesView,{issue:this._model.issue,page:e.startPageNumber})},t}(Hs.A)),js={init:function(e){zs=e.elm()},showView:function(e){return e=e||{},Promise.all([tt.A.getViewUrl(nt.lP.TopNews),tt.A.getViewUrl(nt.lP.Help),Qa.k.loaded(),v.Ay.loaded()]).then((function(t){var n=t[0],i=t[1];e&&e.callback&&e.callback();var r={newsFeedUrl:o.observable(n),helpUrl:o.observable(i),contactUsUrl:o.observable(v.Ay.val("Errors.ContactUsUrl")),openNewsFeed:function(){return tt.A.goView(nt.lP.TopNews),!1},selectPublication:function(){return et.A.showDialog().then((function(e){e?ft():tt.A.goView(nt.lP.StoreHub,{catalogView:nt.$r.Catalog})})),!1},openHelp:function(){return tt.A.goView(nt.lP.Help),!1}};Qa.k.renderTo("v7.Client.Error",r,zs)})).catch((function(){return Promise.reject()}))}};js.hide=r.noop,js.registerRoutes=function(e){e.addRoute({name:"error",template:"",constraints:{viewName:new Ia.D(nt.lP.Error)}})},js.reset=function(){this.__viewPanel.show()},js.getTopBarConfig=function(){return{backEnable:!0,header:"",isTitleDisabled:!0,actionMenuEnable:!1,headerClass:"toolbar-errortitle"}};var Us=js,Ws=n(92078),Ys=function(e){function t(){var t=e.call(this)||this;return t._onlineListLoader=mn.ME,t._itemPreviewSizeFunctionConfig="ui.Views.TopNews.itemPreviewSizeFunction",t._defaultItemPreviewSizeFunction="topStories",t._topBarConfig={starEnable:!0,backEnable:!0,newPostButtonVisible:!1,header:o.observable(""),settingsEnable:!0,actionMenuOptions:[A.DA.lang,A.DA.listen,A.DA.fonts],generalMenuOptions:[A.DA.interfaceLang,A.DA.autoTranslate],isTitleDisabled:!0,headerClass:"toolbar-profiletitle"},t}return(0,i.C6)(t,e),t.prototype.showView=function(e){var t=this;mt.o.current=this._context;var n=oe.assign({showIssueInfo:!0,showSections:!0,updatePreviewPanel:!1,updateInterval:6e4*s.A.get("ui.Views.TopNews.updateInterval",60),historyTokenType:A.xq.left},e);e&&e.ignoreDataReset||this._contentProvider.reset(),this._builder.reset(),e.resetState&&this.resetState({itemId:-1});var i=new Promise((function(e,n){t._contentProvider.onLoadOnce((function(n){t._controller.contentAccessToken(n&&n.accessToken||""),e(n)})).onErrorOnce(n)}));if(!e.channelfeed&&e.channelEnabled||this._contentProvider.setRestrictedSectionTypes([gn.p.profile]),e.claim&&this._contentProvider.on("articlesLoaded",oe.once((function(t){var n=oe.find(t,(function(t){return t.id()===e.claim}));n&&oe.isFunction(n.update)&&n.update({performClaim:!0})}))),e.bookmarkId){var r=n.callback;n.callback=function(){oe.isFunction(r)&&r();var e=t;function n(){var t=e._controller.firstAvailableArticle(),n=t&&t.ArticleId,i=t&&t.SocialInfo,r=i&&i.commentKey,o=t&&t.PostsCount;return n&&r&&o&&$e.A.show({articleId:n,markerCommentId:r}),Promise.resolve()}if(t._view.viewport().columns<2){for(var o=t._view.columnByX(0);o;o=o.next())if(!o.type()){Promise.all([t._view.scrollTo(o),i]).then(n);break}}else i.then(n)}}return this._controller.enable().show(n),i},t.prototype.reset=function(){e.prototype.reset.call(this),!this._viewConfig.channelfeed&&this._viewConfig.channelEnabled||this._contentProvider.setRestrictedSectionTypes([gn.p.profile]),this.resetState({itemId:"0"}),Aa.A.setInitialPosition(this._view)},t.prototype.getNavigationHistoryConfig=function(){return{profileId:{includeInUrl:!0}}},t.prototype.getTopBarConfig=function(){return this._topBarConfig},t.prototype.controller=function(){return this._controller},t.prototype.registerRoutes=function(e){var t=this,n=function(e){return t.saveViewConfig(e),mn.ME.setSearchParams(e),e&&e.profileId?(mn.tz.setParams({profileId:e.profileId,bookmark:e.bookmarkId||"",commentKey:e.commentKey||""}),t._topBarConfig.profileId=e.profileId,Promise.all([s.A.loaded(),v.Ay.loaded()]).then(_a.default.getProfile.bind(null,e.profileId)).then((function(e){if(!e)return Promise.reject();t._viewConfig.channelEnabled=s.A.get("pagesView.enableUserInfo",!1);var n=v.Ay.val("TopToolbar.ProfileTitle.Template")||"";t._topBarConfig.header(n.replace("{0}",e.nickname)),t._topBarConfig.newPostButtonVisible=s.A.get("post.enabled")&&t._topBarConfig.profileId===bt.default.getProfileId()}))):Promise.reject()},i=new Ia.D(nt.lP.Profile),r=new Ia.D("channelfeed");e.addRoute({name:"channel_claim_gift",template:"@{profileId}/{bookmarkId}?{claim}",defaults:{viewName:nt.lP.Profile,bookmarkId:""},constraints:{viewName:i},executeWith:n}).addRoute({name:"channel_bookmark_comment",template:"@{profileId}/{bookmarkId}/{commentKey}",defaults:{viewName:nt.lP.Profile,bookmarkId:"",commentKey:""},constraints:{viewName:i},executeWith:n}).addRoute({name:"channel_bookmark",template:"@{profileId}/{bookmarkId}",defaults:{viewName:nt.lP.Profile,bookmarkId:""},constraints:{viewName:i},executeWith:n}).addRoute({name:"channelfeed",template:"channelfeed/{profileId}",defaults:{viewName:nt.lP.Profile},constraints:{viewName:i,channelfeed:r},executeWith:n}).addRoute({name:"channel",template:"@{profileId}",defaults:{viewName:nt.lP.Profile},constraints:{viewName:i},executeWith:n})},t.prototype._createView=function(){var t=e.prototype._createView.call(this);return Aa.A.linkView(t),t},t.prototype._onViewStateChanged=function(e,t){if(t.id){var n={itemId:t.id,type:t.type,expanded:t.expanded};tt.A.updateState(n)}},t.prototype._createBuilder=function(){var e=s.A.get(this._itemPreviewSizeFunctionConfig,this._defaultItemPreviewSizeFunction);return new Xa.A({itemPreviewSizeFunction:e,disableItemsBundling:!0})},t}(ya.A),Xs=new Ys,qs=n(26637),Gs=new Pn.c;(0,Ma.lx)({url:(window.basePath||"/")+"PlatformResolver/Resolve",data:{screenHeight:window.screen&&window.screen.height||0,screenWidth:window.screen&&window.screen.width||0,hasTouchSupport:Fe.b.touch},requestConfig:{cache:"no-store"}}).then((function(e){e&&e.RedirectTo?(Gs.reject(),window.location.href=e.RedirectTo):Gs.resolve()}),Gs.resolve);var Ks={resolved:function(){return Gs.promise()}},Js=n(45393),Qs=n(76981),Zs=(0,Cn.get)("fts"),$s=function(e){function t(){var t=e.call(this)||this;return t.viewName=nt.lP.FTSArticles,t._onlineListLoader=Zs.ftsarticles,t._onlineItemsLoader=Zs.ftsarticlesitems,t._itemPreviewSizeFunctionConfig="ui.Views.FTSArticles.itemPreviewSizeFunction",t._defaultItemPreviewSizeFunction="fullTextSearch",t}return(0,i.C6)(t,e),t.prototype.show=function(e){this._config=e,mt.o.current=this._context,(0,Sa.ek)({showIssueInfo:!0});var t=oe.assign({showSections:!1,updatePreviewPanel:!1,historyTokenType:A.xq.left},e);e&&e.ignoreDataReset||this.reset(),this._builder.reset(),this._controller.enable().show(t),this._toolbar&&this._toolbar.show()},t.prototype.hide=function(){vn.c.reset(),e.prototype.hide.call(this)},t.prototype.reset=function(){this._contentProvider.reset()},t.prototype.getNavigationHistoryConfig=function(){return this._navHistoryCfg||(this._navHistoryCfg=oe.reduce(Qs._,(function(e,t){return e[t]={includeInUrl:!0},e}),{})),this._navHistoryCfg},t.prototype.getTopBarConfig=function(){return{backEnable:!0,header:"TopToolbar.SearchResult",starEnable:!0,actionMenuOptions:[A.DA.lang,A.DA.listen,A.DA.fonts],generalMenuOptions:[A.DA.interfaceLang,A.DA.autoTranslate,A.DA.togglePervasive,A.DA.toggleFacelift,A.DA.toggleHotspot],isTitleDisabled:!0,headerClass:"toolbar-searchtitle"}},t.prototype.getSearchText=function(){var e=vn.c.getSearchParams();return e?e.query:""},t.prototype.registerRoutes=function(e){var t=this;(0,Qs.U)(e,(function(e){vn.c.setSearchParams(vn.c.toSearchParams(e)),t.saveViewConfig(e)}),void 0)},Object.defineProperty(t.prototype,"_toolbar",{get:function(){return void 0===this.__toolbar&&(te.kt?(this.__toolbar=new te.kt(this._container.elm()),this.__toolbar.linkView(this._view)):this.__toolbar=null),this.__toolbar},enumerable:!1,configurable:!0}),t.prototype._onViewStateChanged=function(e,t){if(t.id){var n={itemId:t.id,type:t.type,expanded:t.expanded,articleHistoryToken:t.articleHistoryToken||0,currentArticlePosition:t.articlePosition};tt.A.updateState(n)}},t.prototype._createView=function(){var t=this,n=e.prototype._createView.call(this);return Aa.A.linkView(n),n.setupNoContentResolverCallback((function(){return t._getNoContentView()})),n},t.prototype._getNoContentView=function(){return Promise.resolve({model:{},view:"v7.Client.NoSearchContent"})},t.prototype._createContentProvider=function(){var t=e.prototype._createContentProvider.call(this);return t.itemsToPreload=20,t},t}(ya.A),eu=new $s,tu=n(25778),nu=n(96543),iu=v.Ay.templates,ru=function(){function e(e,t){var n=this;this.loader=t,this.element=e,this.model={searchResult:o.observable(),viewportLeft:o.observable()},this.isVisible=!1,t.onSearch((function(e,t){(function(e,t){var n=[v.Ay.loaded()];if(e.newspapers){var i=e.newspapers.split(",");1===i.length?n.push((0,st.jW)(i[0]).then((function(e){return e.name}))):n.push(Promise.resolve(i.length))}return Promise.all(n).then((function(n,i){var r=[];if(e.searchText&&r.push(e.searchText),e.searchAuthor&&r.push(v.Ay.format("SearchToolbar.Author",e.searchAuthor)),"language"===e.groupBy)r.push(v.Ay.val("SearchToolbar.InAllLanguages"));else if(!(0,oe.isEmpty)(e.languages)){var o=e.languages.split(",");r.push(v.Ay.format("SearchToolbar.Languages",(0,te.dV)(o)))}if(i&&r.push(v.Ay.format("SearchToolbar.Newspapers",i)),e.countries){var a=e.countries.split(",");r.push(v.Ay.format("SearchToolbar.Countries",(0,te.dV)(a)))}return r.push(v.Ay.format("SearchToolbar.Range",(0,te.o9)(e.date||K.l.getDefaultDate()))),r.push(v.Ay.format("SearchToolbar.SearchIn",(0,te.Fl)(e.in||K.l.DefaultLocation))),void 0===t?v.Ay.format("ToolbarSearchWithoutCount",r.join(" ")):v.Ay.format("ToolbarSearchMonitor",t,r.join(" "))}))})(t.params,t.totalCount).then((function(e){n.model.searchResult(e)}))}))}return e.prototype.show=function(){var e=this;return this.isVisible||(this.isVisible=!0,iu.loaded().then((function(){iu.prependTo("v7.Client.ToolbarSearch",e.model,e.element)}))),this},e.prototype.linkView=function(e){var t=this;this.model.viewportLeft(e.viewport().left),nu.A.bind(e,"viewportChanged",null,(function(e,n){t.model.viewportLeft(n.left)}))},e}(),ou=ru,au=n(80543),su=n(12993),uu=n(60738),cu=n(92701),lu=n(14265),du=Cn.get;function hu(e){return e.monitorId&&"0"!==e.monitorId?Promise.resolve():_s.u.get().then((function(t){oe.isEmpty(t)||(e.monitorId=t[0].id,mn.EY.setSearchParams(e))}))}var fu=function(e){function t(){var t=e.call(this)||this;return t.viewName=nt.lP.Monitors,t._onlineListLoader=mn.EY,t._itemPreviewSizeFunctionConfig="ui.Views.TopNews.itemPreviewSizeFunction",t._defaultItemPreviewSizeFunction="topStories",t}return(0,i.C6)(t,e),t.prototype.init=function(t){var n=this;e.prototype.init.call(this,t),mn.EY.onSearch((function(e,t){au.A.highlightTopic(t.params.searchTokens||t.params.searchText)})),su.V.updates.pipe((0,tu.p)((function(e){return e.opType===su.A.Save}))).subscribe((function(e){var t=e.id;n._onTopicChanged(t)})),su.V.updates.pipe((0,tu.p)((function(e){return e.opType===su.A.Delete}))).subscribe((function(e){var t=e.id;n._onTopicDeleted(t)}))},t.prototype.show=function(e){var t=this;this._currentTopicId=parseInt(e.monitorId,10),mt.o.current=this._context,(0,Sa.ek)({showIssueInfo:!0});var n=oe.assign({showSections:!0,updatePreviewPanel:!1,updateInterval:6e4*s.A.get("ui.Views.TopNews.updateInterval",60),historyTokenType:A.xq.left},e);e&&e.ignoreDataReset||this._contentProvider.reset();var i=new Promise((function(e,n){t._contentProvider.onLoadOnce(e).onErrorOnce(n)}));return this._builder.reset(),this._controller.enable().show(n),this._toolbar&&this._toolbar.show(),i},t.prototype.reset=function(e){var t=this;return hu(e).then((function(){t._contentProvider.reset(),Aa.A.setInitialPosition(t._view)}))},t.prototype.getResetParams=function(){return{monitorId:null}},t.prototype.getTopBarConfig=function(){return{starEnable:!0,backEnable:!0,header:"Menu.Monitors",headerClass:"toolbar-monitorstitle",settingsEnable:!0,showMonitorName:!0,actionMenuOptions:[A.DA.lang,A.DA.listen,A.DA.fonts],generalMenuOptions:[A.DA.interfaceLang,A.DA.autoTranslate,A.DA.togglePervasive,A.DA.toggleFacelift]}},t.prototype.showView=function(e){var t=this;return hu(e).then((function(){return t.show(e)}))},t.prototype.registerRoutes=function(e){var t=this;e.addRoute({name:"topics",template:"topics/{monitorId}",defaults:{viewName:nt.lP.Monitors,monitorId:"0"},constraints:{viewName:new Ia.D(nt.lP.Monitors)},executeWith:function(e){t._currentTopicId=parseInt(e.monitorId,10),mn.EY.setSearchParams(e),t.saveViewConfig(e)}})},Object.defineProperty(t.prototype,"_toolbar",{get:function(){return void 0===this.__toolbar&&(ou?(this.__toolbar=new ou(this._container.elm(),du("monitors").monitors),this.__toolbar.linkView(this._view)):this.__toolbar=null),this.__toolbar},enumerable:!1,configurable:!0}),t.prototype._createView=function(){var t=this,n=e.prototype._createView.call(this);return Aa.A.linkView(n),n.setupNoContentResolverCallback((function(){return su.V.get().then((function(e){return!oe.isEmpty(e)})).then((function(e){return e?t._getNoContentView():t._getNoTopicView()}))})),n},t.prototype._getNoContentView=function(){var e=this,t={editTopicClick:function(){e._currentTopicId?su.V.getById(e._currentTopicId).then((function(e){e?uu.editTopicDialog.show({topic:e}):en.A.error("Topic not found")})).catch((function(){en.A.error("The error of editing the topic")})):en.A.error("Invalid selected topics",e._currentTopicId)}};return Promise.resolve({model:t,view:"v7.Client.NoTopicContent"})},t.prototype._getNoTopicView=function(){var e={createNewTopicClick:function(){(0,cu.Y)().then((function(e){uu.editTopicDialog.show({topic:{languages:e.language?[e.language]:[]}}).then((function(e){e.status===G.d.Ok&&Ve.A.topicsView.activate({type:"monitor",monitorId:e.topic.id})}))}))}};return Promise.resolve({model:e,view:"v7.Client.NoTopics"})},t.prototype._onTopicChanged=function(e){this._isTopicOpened(e)&&Ve.A.topicsView.activate({type:"monitor",monitorId:e})},t.prototype._onTopicDeleted=function(e){this._isTopicOpened(e)&&lu.A.goHome()},t.prototype._isTopicOpened=function(e){return tt.A.getState().viewName===nt.lP.Monitors&&this._currentTopicId===e},t.prototype._onViewStateChanged=function(e,t){if(t.id){var n={itemId:t.id,type:t.type,expanded:t.expanded,articleHistoryToken:t.articleHistoryToken||""};tt.A.updateState(n)}},t}(ya.A),pu=new fu,mu=!1,gu=n(54387),vu=function(e){function t(){var t=e.call(this)||this;return t.viewName=nt.lP.Similar,t._onlineListLoader=mn.qR,t._itemPreviewSizeFunctionConfig="ui.Views.TopNews.itemPreviewSizeFunction",t._defaultItemPreviewSizeFunction="topStories",t}return(0,i.C6)(t,e),t.prototype.show=function(e){mt.o.current=this._context,(0,Sa.ek)({showIssueInfo:!0});var t=oe.assign({showSections:!0,updatePreviewPanel:!1,updateInterval:6e4*s.A.get("ui.Views.TopNews.updateInterval",60),historyTokenType:A.xq.left},e);e&&e.ignoreDataReset||this.reset(),this._builder.reset(),(0,He.JD)((0,gu.Rl)({viewName:t.viewName,currentPath:(0,ga.Ti)()})),this._controller.enable().show(t)},t.prototype.getTopBarConfig=function(){return{starEnable:!0,backEnable:!0,header:"TopToolbar.SimilarTitle",actionMenuOptions:[A.DA.lang],settingsEnable:!0,isTitleDisabled:!0,headerClass:"toolbar-relatedtitle"}},t.prototype.registerRoutes=function(e){var t=this;!function(e,n,i){if(!mu){if(mu=!0,n!==nt.lP.TopNews&&n!==nt.lP.Similar)throw new Error("viewName '".concat(n,"' should be either TopNews or Similar"));e.addRoute({name:"similar",template:"similar/{similarArticleId}",defaults:{viewName:n},constraints:{viewName:new Ia.D(n)},executeWith:function(e){mn.qR.setSearchParams(e),t.saveViewConfig(e)}})}}(e,nt.lP.Similar)},t.prototype._createView=function(){var t=e.prototype._createView.call(this);return Aa.A.linkView(t),t},t.prototype._onViewStateChanged=function(e,t){if(t.id){var n={itemId:t.id,type:t.type,expanded:t.expanded,articleHistoryToken:t.articleHistoryToken||0,currentArticlePosition:t.articlePosition};tt.A.updateState(n)}},t}(ya.A),yu=new vu,_u=new(function(e){function t(){var t=e.call(this)||this;return t.viewName=nt.lP.Votes,t._onlineListLoader=mn.a5,t._itemPreviewSizeFunctionConfig="ui.Views.Votes.itemPreviewSizeFunction",t}return(0,i.C6)(t,e),t.prototype.show=function(e){mt.o.current=this._context,(0,Sa.ek)({showIssueInfo:!0});var t=oe.assign({showSections:!1,updatePreviewPanel:!1},e);e&&e.ignoreDataReset||this._contentProvider.reset(),this._builder.reset(),this._controller.enable().show(t)},t.prototype.getNavigationHistoryConfig=function(){return{type:{includeInUrl:!0}}},t.prototype.getTopBarConfig=function(){return{starEnable:!0,backEnable:!0,header:"TopToolbar.VotesTitle",settingsEnable:!0}},t}(ya.A)),bu=n(6497),wu=new(function(){function e(){this._topBarConfig={showSearch:!1,actionMenuEnable:!1,backEnable:!0,isTitleDisabled:!0,header:"Accounting.UserProfile.PaymentHistory.Receipt",headerClass:"toolbar-receipttitle"}}return e.prototype.getTopBarConfig=function(){return this._topBarConfig},e.prototype.init=function(e){this.element=e.elm()},e.prototype.showView=function(e){return this.render().then((function(){e.callback&&e.callback()}))},e.prototype.render=function(){return Promise.resolve()},e.prototype.hide=function(){o.cleanNode(this.element[0]),this.element.empty()},e.prototype.canLeaveView=function(){return Promise.resolve(!0)},e.prototype.registerRoutes=function(){},e}()),Cu=n(94133),Au=n(87169),Iu=[3,1],Su="GDPR.TermsOfUse.OptionalConsentMessage.Title",Pu="GDPR.TermsOfUse.OptionalConsentMessage",xu="GDPR.TermsOfUse.IAccept",Tu="gdpr.cookie.consent",ku=function(){return(0,i.sH)(void 0,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,Promise.all([v.Ay.loaded(),s.A.loaded()])];case 1:return t.sent(),s.A.get("features")[Tu]?[4,(0,Au.Ed)()]:[2];case 2:return e=t.sent(),(0,oe.filter)((0,oe.map)(Iu,(function(t){var n=(0,oe.find)(e,(function(e){return e.consentType===t}));return n&&n.isGranted?null:t}))).length>0&&function(){var e=this,t="\n

".concat(v.Ay.val(Su),"

\n ").concat(v.Ay.val(Pu),"\n "),n=document.createElement("aside");n.classList.add("mdc-snackbar"),n.innerHTML='\n
\n
\n '.concat(t,'\n
\n
\n \n
\n
\n '),document.body.append(n);var r=new Cu._(document.querySelector(".mdc-snackbar"));r.timeoutMs=-1,r.actionButtonText=v.Ay.val(xu),r.listen("MDCSnackbar:closing",(function(t){return(0,i.sH)(e,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return"action"!==t.detail.reason?[3,2]:(e=(0,oe.filter)((0,oe.map)(Iu,(function(e){return(0,Au.Wq)(e,!0)}))),[4,Promise.all(e)]);case 1:n.sent(),n.label=2;case 2:return[2]}}))}))})),r.open()}(),[2]}}))}))},Eu=n(68565),Mu=n(88813),Du=function(){function e(){this.cookieKey="overlay",this.cookieExpirationInDays=1e3,this.accountHelpSection=ko.observable(""),this.articleViewHelpSection=ko.observable(""),this.calendarHelpSection=ko.observable(""),this.closeHelpSection=ko.observable(""),this.hamburgerMenuHelpSection=ko.observable(""),this.homepageHelpSection=ko.observable(""),this.mouseHelpSection=ko.observable(""),this.navigateHelpSection=ko.observable(""),this.pageViewHelpSection=ko.observable(""),this.searchHelpSection=ko.observable(""),this.startHelpSection=ko.observable(""),this.swipeHelpSection=ko.observable(""),this.viewHelpSection=ko.observable(""),this.init()}return e.prototype.startBrowsing=function(){this.setCookie(),this.closeOverlay()},e.prototype.alignAccountHelpSection=function(){var e=document.querySelector(".userphoto"),t=document.querySelector(".se2sky-overlay-account");if(e&&t){var n=e.getBoundingClientRect();t.style.display="inherit",t.style.left="".concat(n.left+(n.width-t.offsetWidth)/2,"px")}else t&&(t.style.display="none")},e.prototype.alignCalendarHelpSection=function(){var e=document.getElementsByClassName("toolbar-title")[document.getElementsByClassName("toolbar-title").length-1].parentElement,t=document.querySelector(".se2sky-overlay-calendar");if(e&&t){var n=e.getBoundingClientRect();t.style.display="inherit",t.style.left="".concat(n.left+n.width-t.offsetWidth/2,"px")}else t&&(t.style.display="none")},e.prototype.alignCloseHelpSection=function(){var e=document.querySelector("#overlayToolbar"),t=document.querySelector(".se2sky-overlay-close");if(e&&t){var n=e.getBoundingClientRect();t.style.display="inherit",t.style.left="".concat(n.left+n.width/2-t.offsetWidth,"px")}else t&&(t.style.display="none")},e.prototype.alignHamburgerMenuHelpSection=function(){var e=document.querySelector(".toolbar-button-appmenu"),t=document.querySelector(".se2sky-overlay-humburger");if(e&&t){var n=e.getBoundingClientRect();t.style.display="inherit",t.style.left="".concat(n.left+n.width/2,"px")}else t&&(t.style.display="none")},e.prototype.alignHomepageHelpSection=function(){var e=document.querySelector(".logo"),t=document.querySelector(".se2sky-overlay-homepage");if(e&&t){var n=e.getBoundingClientRect();t.style.display="inherit",t.style.left="".concat(n.left+(n.width-t.offsetWidth)/2,"px")}else t&&(t.style.display="none")},e.prototype.alignNavigateHelpSection=function(){var e=document.querySelector("#overlay-chkbx-container"),t=document.querySelector(".se2sky-overlay-navigate");if(e&&t){var n=e.getBoundingClientRect();t.style.display="inherit",t.style.left="".concat(n.left-t.offsetWidth,"px")}else t&&(t.style.display="none")},e.prototype.alignSearchHelpSection=function(){var e=document.querySelector("#toolbarSearchPanel"),t=document.querySelector(".se2sky-overlay-search");if(e&&t){var n=e.getBoundingClientRect();t.style.display="inherit",t.style.left="".concat(n.left+n.width/2-t.offsetWidth,"px")}else t&&(t.style.display="none")},e.prototype.alignViewHelpSection=function(){var e=document.querySelector(".toolbar-switch"),t=document.querySelector(".se2sky-overlay-view");if(e&&t){var n=e.getBoundingClientRect();t.style.display="inherit",t.style.left="".concat(n.left+n.width/2,"px")}else t&&(t.style.display="none")},e.prototype.arrangeToolbarBottomHelpSection=function(){this.alignViewHelpSection(),this.alignNavigateHelpSection()},e.prototype.arrangeToolbarTopHelpSection=function(){this.alignAccountHelpSection(),this.alignCalendarHelpSection(),this.alignCloseHelpSection(),this.alignHamburgerMenuHelpSection(),this.alignHomepageHelpSection(),this.alignSearchHelpSection()},e.prototype.closeOverlay=function(){var e=document.querySelector("#overlay");e.style.transition="0.5s",e.style.opacity="0",e.style.visibility="hidden"},e.prototype.init=function(){var e=this;this.loadHelpSections();var t=document.querySelector("#toolbarTop"),n=document.querySelector("#toolbarBottom"),i=setTimeout(this.arrangeToolbarTopHelpSection.bind(this),500),r=setTimeout(this.arrangeToolbarBottomHelpSection.bind(this),500);t.addEventListener("DOMSubtreeModified",(function(){clearTimeout(i),i=setTimeout(e.arrangeToolbarTopHelpSection.bind(e),500)})),n.addEventListener("DOMSubtreeModified",(function(){clearTimeout(r),r=setTimeout(e.arrangeToolbarBottomHelpSection.bind(e),500)}));for(var o=document.querySelector(".closeOverlay span");o.firstChild;)o.removeChild(o.firstChild)},e.prototype.loadHelpSections=function(){var e=this;v.Ay.loaded().then((function(){e.accountHelpSection(v.Ay.get("Overlay.Help.Account")),e.articleViewHelpSection(v.Ay.get("Overlay.Help.Articleview")),e.calendarHelpSection(v.Ay.get("Overlay.Help.Calendar")),e.closeHelpSection(v.Ay.get("Overlay.Help.Close")),e.hamburgerMenuHelpSection(v.Ay.get("Overlay.Help.Humburger")),e.homepageHelpSection(v.Ay.get("Overlay.Help.Homepage")),e.mouseHelpSection(v.Ay.get("Overlay.Help.Mouse")),e.navigateHelpSection(v.Ay.get("Overlay.Help.Navigate")),e.pageViewHelpSection(v.Ay.get("Overlay.Help.Pageview")),e.searchHelpSection(v.Ay.get("Overlay.Help.Search")),e.startHelpSection(v.Ay.get("Overlay.Help.Start")),e.swipeHelpSection(v.Ay.get("Overlay.Help.Swipe")),e.viewHelpSection(v.Ay.get("Overlay.Help.View"))}))},e.prototype.setCookie=function(){var e=document.querySelector("#overlay-checkbox").checked?{expiresInDays:this.cookieExpirationInDays}:{};d.set(this.cookieKey,(!0).toString(),e)},e}(),Nu="overlay",Lu=365;var Vu=n(87713);function Ru(e,t){this.id=e,this.title=t,this._contentLoadedDfd=new Pn.c}function Hu(e){var t=this;this.items=o.observableArray(e),this.selectedItem=o.observable(),this.selectedArticle=o.observable(),this.itemClick=function(e){t.selectedItem(e)},this.content=o.observable(),this.sectionHeader=o.observable(),this.selectedItem.subscribe((function(e){e&&e.getContent().then((function(n){t.content(n.Content),t.sectionHeader(e.title)}))})),this.selectedArticle.subscribe((function(e){var n=t.selectedItem();n&&n.loaded().then((function(){setTimeout((function(){var t;(t=r("[name="+e+"]")[0])&&(0,oe.isFunction)(t.scrollIntoView)&&t.scrollIntoView()}))}))})),this.trySelectItem=function(e){var n=function(e){return t.items().filter((function(t){return e===t.id}))[0]}(e);return!!n&&(t.selectedItem(n),!0)},this.selectDefaultItem=function(){t.selectedItem(t.items()[0])}}Ru.prototype={getContent:function(){if("resolved"!==this._contentLoadedDfd.state()){var e=this;(t=this.id,Zt.A.get("Help","GetContent",{nodeId:t})).then((function(t){e._contentLoadedDfd.resolve(t)})).catch(e._contentLoadedDfd.reject)}var t;return this._contentLoadedDfd.promise()},loaded:function(){return this._contentLoadedDfd.promise()}};var Fu,Bu,zu,Ou={},ju=new Pn.c;Ou.init=function(e){Bu=e.elm()},Ou.registerRoutes=function(e){e.addRoute({name:"help",template:"help/{id}/{article}",defaults:{viewName:nt.lP.Help,id:null,article:null},constraints:{viewName:new Ia.D(nt.lP.Help)},executeWith:function(e){ju.then((function(){var t=!0;e&&e.id&&zu.trySelectItem(e.id)&&(t=!1,e.article&&zu.selectedArticle(e.article)),t&&zu.selectDefaultItem()}))}})},Ou.showView=function(e){return Fu||Promise.all([Zt.A.get("Help","GetHelp"),v.kT.loaded()]).then((function(e){var t=e[0];Fu=!0;for(var n=[],i=0;i"),n=1;n<10;n++)t.append(r('
Aa
'.replace("{0}",n)));e.append(t)}(e.elm());var t=e.createChild({name:"sidebarContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0}),n=e.createChild({name:"topPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0});n.elm().css("zIndex",3);var o=e.createChild({name:"leftPanelContainer",height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto,absolute:!0});o.elm().addClass("panel-navmenu").css({zIndex:2});var a,u=e.createChild({name:"mainPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto}),c=u.createChild({name:"contentPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto});c.elm().css("overflow","hidden"),0===(a=r("#Panel_loadingPanel")).length&&(a=c.createChild({name:"loadingPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0}).elm()).addClass("panel panel-loading").css({zIndex:10}),(Ac=r.nd.viewer.pagesViewContainer=c.createChild({name:"pagesViewContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1})).elm().css({overflow:"hidden",backgroundColor:"Black"});var l=c.createChild({name:"textViewContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});l.elm().css({overflow:"hidden",backgroundColor:"white"});var h=c.createChild({name:"ftsArticlesContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});h.elm().css({overflow:"hidden",backgroundColor:"white"});var p=c.createChild({name:"bookmarksContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});p.elm().css({overflow:"hidden",backgroundColor:"white"});var m=c.createChild({name:"bookmarkContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});m.elm().css({overflow:"hidden",backgroundColor:"white"});var g=c.createChild({name:"articleContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});g.elm().css({overflow:"hidden",backgroundColor:"white"});var _=c.createChild({name:"manageBookmarksContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});_.elm().css({overflow:"hidden",backgroundColor:"white"});var w=c.createChild({name:"emailAlertsContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});w.elm().css({overflow:"hidden",backgroundColor:"white"});var A=c.createChild({name:"monitorsContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});A.elm().css({overflow:"hidden",backgroundColor:"white"});var P=c.createChild({name:"profileContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});P.elm().css({overflow:"hidden",backgroundColor:"white"});var x=c.createChild({name:"similarContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});x.elm().css({overflow:"hidden",backgroundColor:"white"});var T=c.createChild({name:"categoriesContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});T.elm().css({overflow:"hidden",backgroundColor:"white"});var k=c.createChild({name:"externalContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});k.elm().css({overflow:"hidden",backgroundColor:"white"});var E=c.createChild({name:"votesContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});E.elm().css({overflow:"hidden",backgroundColor:"white"});var M=e.createChild({name:"radioContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1,visible:!1});M.elm().css({overflow:"hidden"});var D=c.createChild({name:"homeContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});D.elm().css({overflow:"hidden",backgroundColor:"white"});var N=c.createChild({name:"helpContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});N.elm().css({overflow:"hidden",backgroundColor:"white"});var L,V=c.createChild({name:"errorContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});V.elm().css({overflow:"hidden",backgroundColor:"white"}),(L=c.createChild({name:"readingMapContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1})).elm().css({overflow:"hidden",backgroundColor:"white"}),(L=c.createChild({name:"readingMapContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1})).elm().css({overflow:"hidden",backgroundColor:"white"});var R=c.createChild({name:"storeHubContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});R.elm().css({overflow:"hidden",backgroundColor:"black"});var H=c.createChild({name:"emptyViewContainer",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0,absolute:!0,visible:!1});H.elm().addClass("l-emptyview"),l.createChild({name:"textViewMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0});var F=l.createChild({name:"textViewPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto}),B=(h.createChild({name:"ftsArticlesMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),h.createChild({name:"ftsArticlesPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),z=(p.createChild({name:"bookmarksMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),p.createChild({name:"bookmarksPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),O=(m.createChild({name:"bookmarkMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),m.createChild({name:"bookmarkPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),j=(_.createChild({name:"manageBookmarksMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),_.createChild({name:"manageBookmarksPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),U=(A.createChild({name:"monitorsMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),A.createChild({name:"monitorsPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),W=(P.createChild({name:"profileMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),P.createChild({name:"profilePanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),Y=(x.createChild({name:"similarMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),x.createChild({name:"similarPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),X=(T.createChild({name:"categoriesMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),k.createChild({name:"externalMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),k.createChild({name:"externalPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),q=(E.createChild({name:"votesMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),E.createChild({name:"votesPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),G=(g.createChild({name:"articleMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),g.createChild({name:"articlePanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),K=M.createChild({name:"radioPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto}),J=(D.createChild({name:"homePanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto}),u.createChild({name:"thumbsViewPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:I.Ay.pos.auto})),Q=(N.createChild({name:"helpMessagesPanel",width:I.Ay.size.fill,height:I.Ay.size.auto,left:0,top:0}),N.createChild({name:"helpPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto})),Z=V.createChild({name:"errorPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0}),$=L.createChild({name:"readingMapPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto}),ee=R.createChild({name:"storeHubPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:0}),te=H.createChild({name:"emptyViewPanel",width:I.Ay.size.fill,height:I.Ay.size.fill,left:0,top:I.Ay.pos.auto});ot.Ay.init(a[0]),I.Ay.reflow(),Ws.default.show(n),r.nd.viewer.thumbsView2.init(J),s.A.loaded().then((function(){r.nd.viewer.pagesView.init(Ac),r.nd.viewer.sidebar.init(t,e),Js.A.init(o),eu.init(B),ka.init(z),Ya.init(O),Ja.init(G),ds.init(j),Rs.init(w),_u.init(q),r.nd.viewer.radioView.init(K),bu.A.init(F),pu.init(U),yu.init(Y),Xs.init(W),r.nd.viewer.external.init(X),Uu.init(Q),Us.init(Z),Os.init($),qs.A.init(ee),wu.init(te),yt.A.registerView(nt.lP.Radio,r.nd.viewer.radioView,M),yt.A.registerView(nt.lP.PagesView,r.nd.viewer.pagesView,Ac),yt.A.registerView(nt.lP.TextView,bu.A,l),yt.A.registerView(nt.lP.FTSArticles,eu,h),yt.A.registerView(nt.lP.Bookmarks,ka,p),yt.A.registerView(nt.lP.Bookmark,Ya,m),yt.A.registerView(nt.lP.Article,Ja,g),yt.A.registerView(nt.lP.ManageBookmarks,ds,_),yt.A.registerView(nt.lP.EmailAlerts,Rs,w),yt.A.registerView(nt.lP.Votes,_u,E),yt.A.registerView(nt.lP.Monitors,pu,A),yt.A.registerView(nt.lP.Similar,yu,x),yt.A.registerView(nt.lP.Profile,Xs,P),yt.A.registerView(nt.lP.External,r.nd.viewer.external,k),yt.A.registerView(nt.lP.Help,Uu,N),yt.A.registerView(nt.lP.ReadingMap,Os,L),yt.A.registerView(nt.lP.StoreHub,qs.A,R),yt.A.registerView(nt.lP.Error,Us,V),yt.A.registerView(nt.lP.EmptyView,wu,H),function(){var e=!1;function t(t){var n=(0,ga.Ti)();return va.UN.resolvePath(n,t).then((function(e){return vc.KZ(e.viewName)?null:(tt.A.isLanding=t.viewName===nt.lP.Error,t.viewName!==e.viewName&&tt.A.updateState(e),e)})).then((function(e){return e?((0,He.JD)((0,yc.so)({newConfig:e,isLegacyRoute:!0})),yt.A.tryChangeActiveView(e)):yt.A.tryChangeActiveView({viewName:nt.lP.EmptyView})})).catch((function(t){if(!t||"function"!=typeof t.redirect){if(t&&en.A.error(t),-1!==window.location.href.indexOf("@")||e)return e=!0,yt.A.showError();e=!0;var n=nt.lP.PagesView;return tt.A.goView(n),yt.A.tryChangeActiveView({viewName:n})}e=!0,t.redirect()}))}y.A.isLogin()||tt.A.resetState(),t(tt.A.getState()).then((function(){var e;ku(),(0,sa.H)(),e=Ac,s.A.loaded().then((function(){var t=(0,yt.d)(),n=d.get(Nu,!1),i=f.j.mobile&&(0,Eu.l)();s.A.get("pagesView.enableOverlay",!1)&&(t===nt.lP.PagesView||t===nt.lP.PagesView)&&!n&&!i&&function(e){Promise.all([v.Ay.loaded(),Mu.A.loaded()]).then((function(){var t=e.elm().createChild("div").addClass("overlay").attr({id:"overlay"}),n=r("");n.on("click singleTapConfirmed singleTap",(function(){var e;e=r("#overlay-checkbox").is(":checked")?{expiresInDays:Lu}:{},d.set(Nu,"true",e),r("#overlay").animate({opacity:0},400,(function(){r("#overlay").fadeOut(300),r(this).css({display:"none"})}))}));var i=r("
");i.append(n);var o=r("
"),a=r("
");t.append(i).append(o).append(a);var s=new Du;Mu.A.renderTo("v7.Client.OverlayPage",s,o),ko.applyBindings(s,o[0]),e.elm().parent().append(t)}))}(e)})),function(){(0,i.sH)(this,void 0,void 0,(function(){var e,t,n,r,o,a,s;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return(e=d.remove(Cc))&&"Successfully"!==e?(t=(0,He.Lt)(bc.xW),n=t.supressTryAuthenticateByKeyErrorMessage,r=void 0!==n&&n,o=t.forceLogoutIfAuthenticateByKeyFail,a=void 0!==o&&o,(0,so.x)()&&a?(C.default.signOut(),[2]):r?[2]:"function"!=typeof(s=wc.Z2[e]||wc._i[e])?[3,2]:[4,(0,S.A)().alert(s())]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))}(),function(){(0,i.sH)(this,void 0,void 0,(function(){var e,t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return e=(0,yt.d)(),[4,(0,Ce.kq)("ui.views.".concat(e,".tour"))];case 1:return t=n.sent(),(0,Vu.W)(t),[2]}}))}))}()})),tt.A.onNavigate((function(e){t(e)})),b.A.pages.loadedChange((function(e){e.value&&b.A&&tt.A.updateState({currentIssueInfo:{cid:b.A.cid(),issue:b.A.issue(),name:b.A.contentName(),date:b.A.issueDate()}})})),C.default.onAfterAccountChanged.subscribe((function(){tt.A.resetState(),Sc()})),y.A.onUserLocalesChanged(Sc)}()})),r(document.documentElement||document.body).ndbind("touchmove",(function(e){I.Ay.nativeScroll||e.preventDefault()}))}function Sc(){var e=yt.A.getActiveViewName();e!=nt.lP.TopNews&&e!=nt.lP.Categories||yt.A.getActiveView().reset({resetFeed:!0})}var Pc,xc=!1;function Tc(){return xc?Promise.resolve():(xc=!0,Promise.all([_c.dc(),Ks.resolved()]).then((function(){return Ic(),Promise.resolve()})))}n(17628),function(e){e.TimingTrack="[Timing] Track"}(Pc||(Pc={}));var kc,Ec=function(e){this.payload=e,this.type=Pc.TimingTrack},Mc=n(29583);_c.zN()?kc=(new Date).getTime():_c.dc().then((function(){kc=(new Date).getTime()})),w.z.loaded().then((function(){function e(e,t,n){return this.category=e,this.variable=t,this.label=n||void 0,this.startTime,this.endTime,this}function t(e){V.X.send(new Ec({category:e.category,variable:e.variable,duration:e.duration,label:e.label}))}e.prototype.startTime=function(e){return this.startTime=e||(new Date).getTime(),this},e.prototype.endTime=function(){return this.endTime=(new Date).getTime(),this},e.prototype.endAndSend=function(){return this.endTime().send()},e.prototype.send=function(){return V.X.send(new Ec({category:this.category,variable:this.variable,duration:this.endTime-this.startTime,label:this.label})),this},window.NDLoader&&NDLoader._tacks&&(oe.each(NDLoader._tacks,t),NDLoader.addJsonTiming=t);var n=[],i=!0;Mc.nd.event.bind(yt.A,"activeViewChanging",(function(){var t=yt.A.getActiveViewName();if(i){i=!1;var r=window.performance&&performance.timing&&performance.timing.navigationStart||window.NDLoader&&NDLoader.navigationStart;r&&(new e("FirstViewLoading",t).startTime(r).endAndSend(),n.push(new e("FirstViewLoaded",t).startTime(r)));var o=window.NDLoader&&NDLoader.executionStart;o&&n.push(new e("FirstViewLoaded2",t).startTime(o));var a=kc;a&&n.push(new e("FirstViewLoaded3",t).startTime(a))}n.push(new e("RenderView",t).startTime())})),Mc.nd.event.bind(yt.A,"activeViewChanged",(function(){n&&(oe.invokeMap(n,"endAndSend"),n=[])}))})).catch(dt.logError),s.A.loaded().then((function(){var e=s.A.get("ui.AppInstaller",{});if(e&&e.enable&&(t=e.devices||"",f.j&&f.j.current&&_.some(t.toLowerCase().split(","),(function(e){return e.current.toLowerCase()===e})))){var t,n=d.get("AppInstalled"),i=n?parseInt(n,10):e.retries;if(0!==i){var r=function(){nu.A.unbind(yt.A,"activeViewChanged",r);var e=(0,S.A)(),t={message:v.Ay.format("Dialogs.AppInstaller.Note",f.j.current),nextRetries:i-1,dontShowAgain:ko.observable(!1),templateName:"v7.Client.Dialogs.AppInstaller",type:"custom",close:function(){e.hide()},confirm:function(){t.nextRetries=0,e.hide();var n=new c.A.menu.controllers.singleItem;n.itemsControllerCTOR(c.A.menu.items.controllers.get("issueDownload")).itemsControllerParams([n]),n.show({position:{x:event.pageX||event.touchX||0,y:event.pageY||event.touchY||0}})}};e.onClosed((function(){var e=t.dontShowAgain()?0:t.nextRetries;d.set("AppInstalled",e,{expires:1e4})})),e.show(t)};nu.A.bind(yt.A,"activeViewChanged",r)}}})),n(67606);var Dc=Date.now(),Nc=864e5,Lc=[""].concat(Fe.b._domPrefixes),Vc="keypress mousedown mouseup "+["touchstart","touchend","pointerdown","pointerup","visibilitychange"].map((function(e){return Lc.map((function(t){return t+e})).join(" ")})).join(" ");r(document).on(Vc,(function(){Dc=Date.now()})),function e(){var t=Date.now()-Dc,n=tt.A.getState().viewName===nt.lP.TopNews;if(t>Nc){if(n)return void v.Ay.valAsync("v7.Client.RefreshRequired").then((function(e){(0,S.A)().alert(e).then((function(){document.location.reload(!0)}))}));Dc=Date.now(),t=0}setTimeout(e,Nc-t)}(),n(72638),n(90332),n(31711);var Rc=n(74435),Hc=n(57351),Fc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype.activate=function(e){var t=e.provider;return(0,Rc.IZ)({provider:t})},t}(Hc.A);Ve.A.externalSignIn=new Fc;var Bc=n(77569),zc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype.activate=function(e){var t=e.provider;return(0,Bc.W9)(t).catch((function(e){if(!e||"Errors.LastAccountForSignIn"!==e.resourceKey)return Promise.reject(e);var t=(0,S.A)();return t.show({type:"custom",templateName:"v7.Client.Dialogs.ExternalProfileCannotBeUnlinked",manageAccount:function(){Ve.A.myAccount.activate(),t.hide()}})}))},t}(Hc.A);Ve.A.unlinkExternalProfile=new zc,n(34283);var Oc=n(85567),jc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype.activate=function(e){var t=this,n=e.url;if(void 0!==this._currentWindow){try{this._currentWindow.focus()}catch(e){(0,dt.logError)(e)}return Promise.reject("Action in progress...")}return this._currentWindow=window.open(n),(0,Oc.L)(this._currentWindow).catch(dt.logAndAlertError).finally((function(){t._currentWindow=void 0}))},t}(Hc.A);Ve.A.manageExternalSubscription=new jc;var Uc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype.activate=function(e){var t=e.provider;return(0,Bc.sH)(t).catch(dt.logError)},t}(Hc.A);Ve.A.unlinkExternalSubscription=new Uc,n(78413),n(83414);var Wc="Menus";V.X.ofType(R.wf.ContextMenu).subscribe((function(e){w.z.event({category:Wc,action:"ninedots",label:e.payload.action})})),V.X.ofType(R.wf.ContextMenuCompleted).subscribe((function(e){w.z.event({category:Wc,action:"ninedots-completed",label:e.payload.action})})),V.X.ofType(R.wf.ContextMenuFailed).subscribe((function(e){w.z.event({category:Wc,action:"ninedots-failed",label:e.payload.action})})),V.X.ofType(R.wf.IssueContextMenu).subscribe((function(e){w.z.event({category:Wc,action:"threedots",label:e.payload.action})})),n(89832),n(41613),n(69733);var Yc,Xc,qc,Gc=n(42022);V.X.ofType(Gc.w.SidebarMenu).subscribe((function(e){w.z.event({category:"Menus",action:"mainmenu",label:e.payload.action})})),function(e){e.Played="[Audio] Played",e.Paused="[Audio] Paused",e.Ended="[Audio] Ended"}(Yc||(Yc={})),function(e){e.Opened="[ImageGallery] Opened",e.Finished="[ImageGallery] Finished",e.Exited="[ImageGallery] Exited"}(Xc||(Xc={})),function(e){e.Played="[Video] Played",e.Paused="[Video] Paused",e.Ended="[Video] Ended"}(qc||(qc={}));var Kc,Jc,Qc,Zc,$c="Ad",el="Translation",tl="Richmedia",nl=((Kc={})[Dn.wf.AdvertisementLoading]="adLoading",Kc[Dn.wf.AdvertisementLoaded]="adLoaded",Kc[Dn.wf.AdvertisementLoadFailed]="adLoadFailed",Kc),il=((Jc={})[Dn.wf.ShowRelatedWithAd]="showRelatedWithAd",Jc[Dn.wf.RelatedAdAvailable]="adAvailable",Jc),rl=((Qc={})[Dn.wf.TranslateArticle]="translateArticle",Qc[Dn.wf.TranslateIssue]="translateIssue",Qc),ol=((Zc={})[Yc.Played]="audioPlayed",Zc[Yc.Paused]="audioPaused",Zc[Yc.Ended]="audioEnded",Zc[qc.Played]="videoPlayed",Zc[qc.Paused]="videoPaused",Zc[qc.Ended]="videoEnded",Zc[Xc.Opened]="imageGalleryOpened",Zc[Xc.Finished]="imageGalleryFinished",Zc[Xc.Exited]="imageGalleryExited",Zc);V.X.ofType(Dn.wf.ArticleExpandRequested,Dn.wf.ArticleExpanded).subscribe((function(e){w.z.event({category:"Article",action:"open",label:e.payload.title})})),V.X.ofType(Dn.wf.ArticleOpened).subscribe((function(e){w.z.event({category:"Article",action:"opened",label:e.payload.articleId})})),V.X.ofType(Dn.wf.ArticleViewed).subscribe((function(e){w.z.event({category:"Article",action:"view",label:e.payload.title,value:e.payload.articleId,context:{articleSource:e.payload.articleSource}})})),V.X.ofType(Dn.wf.IssuePageChanged).subscribe((function(e){var t={cid:e.payload.cid,issueDate:e.payload.issueDate};w.z.pageView({title:e.payload.title,context:t})})),V.X.ofType(Dn.wf.CommonPageChanged).subscribe((function(e){w.z.pageView({title:e.payload.title})})),V.X.ofType(Dn.wf.SmartFlowAction).subscribe((function(e){w.z.event({category:"SmartFlow",action:e.payload.eventAction,isInteractive:!0})})),V.X.ofType(Dn.wf.IssueTextViewAction).subscribe((function(e){var t={cid:e.payload.cid,issueDate:e.payload.issueDate};w.z.event({category:"TextView",action:e.payload.eventAction,isInteractive:!0,context:t})})),V.X.ofType(Dn.wf.AdvertisementLoading,Dn.wf.AdvertisementLoaded,Dn.wf.AdvertisementLoadFailed).subscribe((function(e){var t=nl[e.type];w.z.event({category:$c,action:t,isInteractive:!0})})),V.X.ofType(Dn.wf.AdvertisementGeneral).subscribe((function(e){w.z.event({category:$c,action:e.payload.eventAction,isInteractive:!0})})),V.X.ofType(Dn.wf.AdvertisementImpression).subscribe((function(e){w.z.event({category:$c,action:e.payload.eventAction,label:e.payload.label,value:+e.payload.value,isInteractive:!0})})),V.X.ofType(Dn.wf.ShowRelatedWithAd,Dn.wf.RelatedAdAvailable).subscribe((function(e){var t=il[e.type];w.z.event({category:"Related",action:t,isInteractive:!0})})),V.X.ofType(Dn.wf.TranslateArticle).subscribe((function(e){var t=rl[e.type];w.z.event({category:el,action:t,label:e.payload.articleId,value:+e.payload.translation})})),V.X.ofType(Dn.wf.TranslateIssue).subscribe((function(e){var t=rl[e.type];w.z.event({category:el,action:t,label:e.payload.cid,value:e.payload.translation})})),V.X.ofType(Yc.Played,Yc.Paused,Yc.Ended).subscribe((function(e){var t=ol[e.type],n={category:tl,action:t,label:e.payload.audioKey};w.z.event(n)})),V.X.ofType(qc.Played,qc.Paused,qc.Ended).subscribe((function(e){var t=ol[e.type],n={category:tl,action:t,label:e.payload.videoKey};w.z.event(n)})),V.X.ofType(Xc.Opened,Xc.Finished,Xc.Exited).subscribe((function(e){var t={category:tl,action:ol[e.type],label:e.payload.caption};w.z.event(t)})),V.X.ofType(Pc.TimingTrack).subscribe((function(e){w.z.timing(e.payload.category,e.payload.variable,e.payload.duration,e.payload.label)}));var al=n(96594),sl=n(64100),ul=n(43125),cl=function(){return(0,yt.d)()===nt.lP.PagesView||(0,yt.d)()===nt.lP.TextView};window.ndGlobal=window.ndGlobal||{cid:function(){return cl()?b.A.cid():void 0},issueDate:function(){return cl()?(0,ul.M6)(b.A.issue()):void 0}},(0,Ko.R)("nd.viewer.textview.articlelayout.builder.worker",(function(){return Go})),(0,ua.sf)(),(0,ua.xv)(),n.p=window.scriptBaseUrl,function(){(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return window.__PR_MOBILE?[3,3]:[4,(0,oa.Ts)()];case 1:return e.sent(),[4,Tc()];case 2:e.sent(),e.label=3;case 3:return(0,ra.T)(),(0,sa.H)(),ia(),(0,al.T)(),(0,vo.T)(),(0,C.init)(),(0,pa.T)(),(0,ma.Ts)(),(0,sl.P)(),(0,He.JD)((0,aa.Gm)({})),[2]}}))}))}(),fa||(fa=!0,(0,ua.bC)()&&He.bX.addFeature("app.shared.legacy",null,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,ca.jP)(la.jT,ha)];case 1:return e.sent(),[2]}}))}))),mo.A.view.preload(),(0,go.g)()},7781:function(e,t,n){"use strict";n(16987),n(65665),n(49071),n(99582),n(28505),n(86886),n(36663),n(1234),n(35679),n(39974),n(14604),n(32634),n(8564),n(92609),n(723),n(91013),n(90683),n(8150),n(80343),n(13007),n(80354),n(41761),n(94438),n(65147),n(37526),n(65458)},92609:function(e,t,n){"use strict";var i=n(12010),r={init:function(e,t){return{controlsDescendantBindings:!i.unwrap(t())}}};i.bindingHandlers.allowBindings=r},86886:function(e,t,n){"use strict";var i=n(29583),r=n(12010),o=n(13302),a=n(59805),s=n(51175),u=n(97433);r.bindingHandlers.clickAndTouch={init:function(e,t,n,c,l){var d=i(e),h=u.b.touch?"singleTapConfirmed singleTap":"click",f=function(e){var n=l.$data,i=o.isFunction(e.lastEvent)?e.lastEvent():e,r=t().call(c,n,i);return a.A.event.clickAndTouch.handle(e),!(i.isPropagationStopped()||i.isImmediatePropagationStopped()||!r)};u.b.touch&&s.Ay.bind(d,{singleTap:f}),d.on(h,f),r.utils.domNodeDisposal.addDisposeCallback(e,(function(){u.b.touch&&s.Ay.unbind(d),d.off(h)}))}}},94438:function(e,t,n){"use strict";var i=n(12010),r=n(29583),o=n(1943),a=n(97433),s={init:function(e){if(!o.A.openWindow)throw new Error('"externalLinks" binding not supported, because the "openWindow" action is not registered');var t=a.b.touch?"singleTapConfirmed singleTap":"click";r(e).find("a[target='_blank']").on(t,(function(e){var t=r(e.currentTarget).attr("href");return o.A.openWindow.activate({url:t}),e.preventDefault(),!1}))}};i.bindingHandlers.externalLinks=s},65147:function(e,t,n){"use strict";var i=n(12010),r=n(29583);i.bindingHandlers.fadeInVisible={init:function(e,t){var n=t();r(e).toggle(i.utils.unwrapObservable(n))},update:function(e,t){var n=t();i.utils.unwrapObservable(n)?r(e).fadeIn():r(e).hide()}}},37526:function(e,t,n){"use strict";n.d(t,{L:function(){return a},_:function(){return o}});var i=n(12010),r=n(13302),o={offset:{},partialVisibility:!1,minTopValue:0,intervalDelay:100,containmentSelector:null},a=function(){function e(e,t){this.el=e,this.containment=document.querySelector(t.containmentSelector),this.options=t,this.state={isVisible:null,visibilityRect:{}},this.interval=null}return e.prototype.startWatching=function(){if(!this.interval){var e=this.options.intervalDelay;this.interval=setInterval(this._check.bind(this),e),this._check()}},e.prototype.stopWatching=function(){this.interval&&(this.interval=clearInterval(this.interval))},e.prototype._check=function(){var e,t=this.options,n=t.offset,i=t.partialVisibility,o=t.onChange,a=this._normalizeRect(this._roundRectDown(this.el.getBoundingClientRect()));if(this.containment){var s=this.containment.getBoundingClientRect();e={top:s.top,left:s.left,bottom:s.bottom,right:s.right}}else e={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};"object"==typeof n&&(e.top+=n.top||0,e.left+=n.left||0,e.bottom-=n.bottom||0,e.right-=n.right||0);var u={top:a.top>=e.top,left:a.left>=e.left,bottom:a.bottom<=e.bottom,right:a.right<=e.right},c=a.height>0&&a.width>0,l=c&&u.top&&u.left&&u.bottom&&u.right;if(c&&i){var d=a.top<=e.bottom&&a.bottom>=e.top&&a.left<=e.right&&a.right>=e.left;"string"==typeof i&&(d=u[i]);var h=this.options.minTopValue;l=h?d&&a.top<=e.bottom-h:d}return this.state.isVisible!==l&&(this.state={isVisible:l,visibilityRect:u},(0,r.isFunction)(o)&&o(l)),this.state},e.prototype._roundRectDown=function(e){return{top:Math.floor(e.top),left:Math.floor(e.left),bottom:Math.floor(e.bottom),right:Math.floor(e.right)}},e.prototype._normalizeRect=function(e){return void 0===e.width&&(e.width=e.right-e.left),void 0===e.height&&(e.height=e.bottom-e.top),e},e}();i.bindingHandlers.visibilitySensor={init:function(e,t,n){var s=t(),u=i.unwrap(n.get("visibilitySensorOptions")),c=i.unwrap(i.utils.extend(o,u));if(!(0,r.isFunction)(s))throw new Error("Handler should be a function");c.onChange=s;var l=new a(e,c);i.utils.domNodeDisposal.addDisposeCallback(e,(function(){l.stopWatching()})),l.startWatching()}}},45393:function(e,t,n){"use strict";n.d(t,{A:function(){return Qe}});var i=n(58932),r=n(64936),o=n(29583),a=n(12010),s=n(13302),u=n(56096),c=n(88813),l=n(96543),d=n(70989),h=n(65678),f=n(89885),p=n(22537),m=n(90006),g=n(89844),v={disabled:!0,movingEnabled:!1,distFactor:.8,showHideTime:500,initialState:g.wk.closed,speed:1},y=function(){function e(){this._loaded=!1,this.disabled=!1,this.config=v}return e.prototype.init=function(e,t){var n=this;return this.$container=e,(0,s.isString)(e)&&(this.$container=o(e)),this._render(this.$container).then((function(){n._leftBorder=null,n.panelState=g.wk.unknown,n._syncHeightToContentPanel(),n._width=n.$container.width(),n._height=n.$container.height(),n.updateConfig(t),n.updatePositionByConfig(),l.A.bind(window,"resize",null,n._onResize.bind(n)),n._onResize(),n._loaded=!0}))},e.prototype._onResize=function(){var e=this;p.Ay.resize((function(){e._syncHeightToContentPanel(),e._width=e.$container.width(),e._height=e.$container.height(),e.updatePositionByConfig()}))},e.prototype.updateConfig=function(e){this.config=(0,s.assign)({},v,e),this.config.disabled&&(this.config.initialState=g.wk.closed),(null==e?void 0:e.width)&&(this._width=e.width,this.$container.width(e.width))},e.prototype.updatePositionByConfig=function(){return this.disabled||this.config&&this.config.initialState===g.wk.closed||m.A.isCompactScreen()&&this.config&&!this.config.showInCompactMode?this.hide():this.show()},e.prototype.toggleView=function(){o("#Panel_root").toggleClass("navmenu--open")},e.prototype.hideViewInCompactMode=function(){o("#Panel_root").removeClass("navmenu--open")},e.prototype.changePanelPositionByDelta=function(e){var t=e.delta,n=t,i=!1;switch(e.reason){case f.cf.fling:case f.cf.keyPress:n=Math.sign(t)*Number.MAX_VALUE;break;case f.cf.mouseWheel:Math.abs(t)<30?i=!0:n=Math.sign(t)*Number.MAX_VALUE;break;case f.cf.drag:i=!0;break;case f.cf.bounce:case f.cf.alignmentCorrection:case f.cf.scrollZone:default:n=0}var r=this._getExpectedGeometry(n,i);if(r.pos.x!==this._leftBorder){var o=i?0:Math.abs(r.pos.x-this._leftBorder)/this.config.speed;this._setPanelPosition(r.pos.x,o)}return r},e.prototype.hide=function(){return this.$container.hide(),this._setPanelPosition(-this._width),this._getGeometry(-this._width)},e.prototype.show=function(){return this.$container.show(),this._setPanelPosition(0),this._getGeometry(0)},e.prototype._getExpectedGeometry=function(e,t){if(void 0===t&&(t=!1),this.config&&this.config.disabled||0===e)return this._getGeometry();var n=t||Math.abs(e)<10?e:e*this.config.distFactor,i=this._transitionMode?this._expectedPosition:this._getLeftBorderPosition(),r=Math.round(i+n);return r<-this._width&&(r=-this._width),r>0&&(r=0),this._getGeometry(r)},e.prototype._getGeometry=function(e){return{pos:{x:(0,s.isUndefined)(e)?this._leftBorder:e,y:0},size:{width:this._width,height:this._height}}},e.prototype._setPanelPosition=function(e,t){if(void 0===t&&(t=0),this.$container&&(this._transitionMode&&this._onTransitionEnd(),e!==this._leftBorder)){this._expectedPosition=e;var n=this.panelState;this.panelState=e0){var a=(0,s.keyBy)(r,"id");(0,s.map)(n,(function(e){return o.push(R(a[e.id],e.count))}))}else(0,s.map)(r,(function(e){return o.push(R(e,0))}));return o}))},e.prototype.getFollowing=function(){var e=N.get(L.following);return e||(e=Promise.all([this._getSectionMetaData(g.S$.following),this._getUserSettings(g.ki.following)]).then((function(e){var t=(0,i.zs)(e,2),n=t[0],r=t[1],o=[];if(n){var a=(0,s.keyBy)(r,"EnAccountNumber");(0,s.map)(n,(function(e){return o.push(R(a[e.id],e.count))}))}else(0,s.map)(r,(function(e){return o.push(R(e,0))}));return o})),N.set(L.following,e),e)},e.prototype.getOpinions=function(){return Promise.all([this._getSectionMetaData(g.S$.opinions),this._getUserOpinions()]).then((function(e){var t=(0,i.zs)(e,2),n=t[0],r=t[1],o=void 0===r?{}:r,a=[];if(n&&n.length>0){var u=(0,s.keyBy)(o.MyOpinions,"OpinionId");(0,s.map)(n,(function(e){u[e.id]&&a.push(R(u[e.id],e.count))}))}else(0,s.map)(o.MyOpinions,(function(e){return a.push(R(e,0))}));return a}))},e.prototype.getNumSimilarArticles=function(e){var t=N.get(L.similar);return t||(t=k.A.get("articles/".concat(e),"similars",{offset:0,limit:0}).then((function(e){return e.Meta.TotalCount})),N.set(L.similar,t),t)},e.prototype._getSectionMetaData=function(e){return this.getContentMetaData().then((function(t){if(!t)return[];var n=(0,s.find)(t.sections,(function(t){return t.type===e}));return n?n.items:[]}),(function(){return Promise.resolve([])}))},e.prototype._getUserSettings=function(e){return k.A.get("user","settings").then((function(t){return t[e]||[]}))},e.prototype._getUserOpinions=function(){var e=N.get(L.opinions);return e||(e=k.A.get("Opinions","suggested",{text:"",skip:0,take:40}),N.set(L.opinions,e),e)},e}(),z=new B(E),O=n(40657),j=n(96587),U=n(72167),W={sections:[],following:[],monitors:[],locales:[],synchronized:!0},Y=function(){function e(){var e=this;this.loaded=!1,this.minNumberItemsInSection=0,this.model={ctx:this,items:a.observableArray([]),isDeleteEnabled:a.pureComputed((function(){return e.model.items().length>e.minNumberItemsInSection})),title:a.observable(),addItemTitle:a.observable(),templateItem:a.observable(),isDraggable:a.observable(),hasRightButton:a.observable(),rightButtonTitle:a.observable(),editMode:a.observable(!1),closeDialog:this.closeSettingsDialog,onItemClick:this.onItemClick,addItemClick:this.addItemClick,changeItemStatusClick:this.changeItemStatusClick,manageItemClick:this.manageItemClick,enableEditMode:function(){return e._editMode(!0)},disableEditMode:function(){return e._editMode(!1)},listClass:a.observable("list-sections"),listScrolled:function(){return e._listScrolled()},loadingMore:a.observable(),updateSettings:function(){var t=e.model.items();e.saveModel(t)},resizeDialog:function(){e._resizeDialog()}},this.config={templateName:"v7.Client.ManageSettings",model:this.model}}return e.prototype.init=function(e){var t=this;return(0,s.forEach)(e,(function(e,n){t.model[n]&&(a.isObservable(t.model[n])?t.model[n](e):t.model[n]=e)})),this.reloadFeedSettings()},e.prototype.saveFeedSettings=function(){return O.hZ("FeedSettings",F)},e.prototype.reloadFeedSettings=function(){var e=this;return O.Jt("FeedSettings").then((function(t){F=(0,s.extend)(W,t),e.loaded=!0}))},Object.defineProperty(e,"settings",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(e,"dialog",{get:function(){return H},enumerable:!1,configurable:!0}),e.prototype.show=function(e,t){var n=this;return(H=j.default.createInstance(t)).onHide((function(e,t){(0,s.isFunction)(n.callOnHide)&&n.callOnHide(t)})),this._updateModel(e),H.show(this.config),H},e.prototype.saveModel=function(e){this.model.items(e),this._updateSettings(e)},e.prototype.onHide=function(e){return this.callOnHide=e,this},e.prototype.closeSettingsDialog=function(){H&&H.hide(I.d.Ok)},e.prototype.onItemClick=function(){},e.prototype.addItemClick=function(){},e.prototype.changeItemStatusClick=function(){},e.prototype.manageItemClick=function(){},e.prototype.signIn=function(){return C.A.isLogin()?Promise.resolve():U.default.signIn({parentDialog:H}).then((function(){H.hide()}))},e.prototype._updateModel=function(e){return void 0===e&&(e=[]),this.model.items(e),Promise.resolve()},e.prototype._editMode=function(e){this.model.editMode(e),H.resize()},e.prototype._updateSettings=function(){return this.saveFeedSettings().then((function(){F.synchronized=!0}))},e.prototype._listScrolled=function(){},e.prototype._resizeDialog=function(){H.resize()},e}(),X=n(47027),q=n(44260),G=function(){function e(e){var t=a.observable();(0,s.assign)(this,{id:e.id,text:a.observable(),unreaded:a.computed({write:function(e){return t(e>0?"+".concat(e):"")},read:t}),author:"",subtext:a.observable(),isPublic:!1,count:e.count}),this.populate(e).catch(M.A.error)}return e.prototype.populate=function(e){var t=this;if(this.id!==e.id)throw new Error("Cannot update Monitor VM. IDs are not matching.");return this.author=e.searchAuthor,this.isPublic=1===e.topicTypeId,this.unreaded(e.count),q.Ay.loaded().then((function(){return t._updateText(e),Promise.all([t._getPublicationsText(e),t._getLanguagesText(e)])})).then((function(n){var r=(0,i.zs)(n,2),o=r[0],a=r[1],s=!e.searchQuery&&e.searchAuthor?null:e.searchAuthor;t._updateMeta(s,o,a,t.isPublic)}))},e.prototype._updateText=function(e){var t=e.searchAuthor;!e.searchQuery&&t?this.text("".concat(q.Ay.val("Dialogs.AddMonitor.Author.Label"),": ").concat(t)):this.text(e.searchTerm||"Unnamed")},e.prototype._getPublicationsText=function(e){return e.newspapers&&e.newspapers.length>0?e.newspapers.length>1?Promise.resolve("".concat(e.newspapers.length," ").concat(q.Ay.val("Navigation.Sources"))):(0,X.jW)(e.newspapers[0]).then((function(e){return e.name})):Promise.resolve(null)},e.prototype._getLanguagesText=function(e){return(0,s.isEmpty)(e.languages)?Promise.resolve(null):e.languages.length>1?Promise.resolve("".concat(e.languages.length," ").concat(q.Ay.val("Dialogs.AdvancedSearch.Languages"))):(0,X.kG)().then((function(t){var n=(0,s.find)(t,(function(t){return t.iso===e.languages[0]}));return n?n.displayName:null}))},e.prototype._updateMeta=function(e,t,n,i){var r=[];e&&r.push(e),t&&r.push(t),n&&r.push(n),i&&r.push(q.Ay.val("Topics.TopStories")),this.subtext(r.join(", "))},e}(),K=[],J=function(e){function t(){var t=e.call(this)||this;return t.config.name="ManageMyTopics",t}return(0,i.C6)(t,e),t.prototype.init=function(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,A.Kc)()];case 1:return t.sent(),e.prototype.init.call(this,{title:(0,A.p3)("Topics.MyTopics"),addItemTitle:(0,A.p3)("ManageSettings.MyTopics.Add"),templateItem:"Settings.MyTopicItem",isDraggable:!1,hasRightButton:!0,rightButtonTitle:(0,A.p3)("Buttons.Alert")}),[2]}}))}))},t.prototype._updateSettings=function(e){Y.settings.monitors=[],(0,s.forEach)(e,(function(e){Y.settings.monitors.push({Id:e.id})}))},t.prototype.changeItemStatusClick=function(e){var t,n=this,i=(0,s.find)(K,(function(t){return t.id===e.id}));t=!i.searchQuery&&i.searchAuthor?"".concat((0,A.p3)("Dialogs.AddMonitor.Author.Label"),": ").concat(i.searchAuthor):i.searchTerm;var r=(0,A.p3)("Topics.DeleteTopicConfirmationMessage").replace("%topic%",t);(0,T.A)().confirm(r).then((function(){x.A.show(),P.V.delete(i.id).then((function(){n._updateModel()})).catch((function(){(0,T.A)().alert((0,A.p3)("Topics.DeleteErrorMessage"))})).finally((function(){return x.A.hide()}))}))},t.prototype.onItemClick=function(e){this.model.editMode()||(Y.dialog.hide(),w.A.topicsView.activate({type:"monitor",monitorId:e.id}))},t.prototype.manageItemClick=function(e){var t=this,n=(0,s.find)(K,(function(t){return t.id===e.id}));return n&&this.manageTopic(n).then((function(e){e.status===I.d.Ok&&t._updateModel()})),!1},t.prototype.manageTopic=function(e){return S.editTopicDialog.show({parentDialog:Y.dialog,topic:e})},t.prototype.addItemClick=function(){return this.addNewTopic()},t.prototype.addNewTopic=function(){var e=this;return S.editTopicDialog.show({parentDialog:Y.dialog,topic:{}}).then((function(t){return t.status===I.d.Ok&&e._updateModel().then((function(){return Y.dialog&&Y.dialog.resize(),!0}))}))},t.prototype.getMyTopics=function(){return z.getMyTopics().then((function(e){return K=e||[]}))},t.prototype._updateModel=function(e){var t=this;return e?(this.model.items(e),Promise.resolve()):this.getMyTopics().then((function(n){e=(0,s.map)(n,(function(e){return new G(e)})),t.model.items(e)}))},t.prototype._editMode=function(t){e.prototype._editMode.call(this,t),this.model.title((0,A.p3)(t?"ManageSettings.MyTopics.Manage":"Topics.MyTopics"))},t}(Y),Q=new J;Q.init();var Z=Q,$=n(65962),ee=n.n($),te=n(14265),ne=null,ie=function(){function e(e){this.name="Unknown",this.minNumberItemsInSection=g.Sl.minNumberItemsInSection,this.addItemsPerMoreStep=g.Sl.addItemsPerMoreStep,this.model={hasMore:a.observable(!1),isAnonymous:a.observable(!0),selectedItem:a.observable(),items:a.observableArray([]),isSectionActive:a.observable()},this.template=e.template||"",this.disabled=!1,this.allItems=null}return e.prototype.init=function(){var e=this;this.model.isAnonymous(!C.A.isLogin()),this._onUserStateChanged=function(){e.model.isAnonymous(!C.A.isLogin()),ne=null,e.reloadSection(!0)},this._onActiveSectionChanged=function(){return e.model.isSectionActive(e.isSectionActive())},l.A.bind(C.A,"onuserstatechanged",this._onUserStateChanged),l.A.global.bind("leftPanelActiveSectionChanged",this._onActiveSectionChanged),l.A.global.bind("leftPanelOpening",(function(){e.reloadSection()})),this.model.moreClick=function(){return e.addMoreItems(e.model.items,e.allItems)},this.loaded=!0},e.prototype.dispose=function(){l.A.global.unbind("leftPanelOpening"),this._onUserStateChanged&&l.A.unbind(C.A,"onuserstatechanged",this._onUserStateChanged),this._onActiveSectionChanged&&l.A.global.unbind("leftPanelActiveSectionChanged",this._onActiveSectionChanged)},e.prototype.getName=function(){return this.name},e.prototype.reloadSection=function(e){return Promise.resolve()},e.prototype.updateActiveItem=function(){this.model.selectedItem(void 0)},e.prototype.hasSelectedItem=function(){return!!this.model.selectedItem()},e.prototype.applyViewConfig=function(){},e.prototype.contentChangedSendEvent=function(){var e=this;setTimeout((function(){l.A.trigger("leftPanelContentChanged",e,{})}),0)},e.prototype.markSectionActive=function(){ne=this.name,l.A.global.trigger("leftPanelActiveSectionChanged",this)},e.prototype.getActualViewName=function(e){return e.refViewName||e.viewName||e.__viewName},e.prototype.isSectionActive=function(){return ne===this.name},e.prototype.updateVisibleItems=function(e){var t=(0,s.keyBy)(this.model.items(),"id");(0,s.map)(e,(function(e){t[e.id]&&t[e.id].unreaded(e.count)}))},e.prototype.getInitialItemsForSection=function(t){void 0===t&&(t=!1);var n=this.minNumberItemsInSection,i=this.allItems||[];t&&(i=(0,s.filter)(i,(function(e){return(0,s.isFunction)(e.unreaded)?e.unreaded():e.count})));var r=i.length,o=this.model.selectedItem();if(o>0){var a=(0,s.findIndex)(i,(function(e){return e.id==o})),u=n;a>=u&&(e.moveObjectInArray(i,a,u),n++)}r<=n+1&&(n=r);var c=(0,s.slice)(i,0,n);return this.model.hasMore(c.length0&&((0,s.isFunction)(n)&&(o=n(o)),a.utils.arrayPushAll(e,o),this.model.hasMore(e().length0?e+t:t.substr(0,1).toLowerCase()+t.substr(1)}for(var n=0;n=0||(e.style[o.props.transform]="",e.style[o.props.transform]="rotateY(90deg)",""===e.style[o.props.transform]))),i=t(r,"Transition"),null!=e.style[i]&&(o.support.transition=!0,o.props.transition=i,o.props.transitionProperty=t(r,"TransitionProperty"),o.props.transitionDuration=t(r,"TransitionDuration"),o.props.transitionTimingFunction=t(r,"TransitionTimingFunction"),o.props.transitionEndEvents="ms"==r?"MSTransitionEnd":t(u,"TransitionEnd"))}o.props.transitionEndEvents.length>0&&o.props.transitionEndEvents!=t("","TransitionEnd")&&(o.props.transitionEndEvents+=" transitionend transitionEnd"),o.support.touchEvents="ontouchstart"in e,o.support.gestureEvents="ongesturestart"in e,o.support.msTouchEvents="onmspointermove "in e,o.support.TouchEvents="onpointermove "in e,o.support.touch=o.support.touchEvents||o.support.TouchEvents||o.support.msTouchEvents,o.support.retina=window.devicePixelRatio>1||!(!window.matchMedia||!window.matchMedia("(-webkit-min-device-pixel-ratio: 1.5),\t\t\t\t\t (min--moz-device-pixel-ratio: 1.5),\t\t\t\t\t (-o-min-device-pixel-ratio: 3/2),\t\t\t\t\t (min-resolution: 1.5dppx)").matches),o.support.transform3d&&(o.support.required3dTransform=!a.T.msie,o.support.keepEmptyTransform=!0),e=null}(),a.T.msie){if(a.T.msie_mode<8&&(o.props.clip_del=" "),a.T.msie_mode<9)for(var p="abbr,article,aside,audio,canvas,datalist,details,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(","),m=p.length;m--;)document.createElement(p[m]);f>="7.0"?(o.support.imageRendering=!0,o.props.imageRendering="msInterpolationMode",o.props.imageRenderingOptimizeSpeed="nearest-neighbor",o.props.imageRenderingOptimizeQuality="bicubic"):o.support.noGzip=!0}else a.T.mozilla&&(o.props.mousewheel="DOMMouseScroll",f>="1.9.2"&&(o.support.imageRendering=!0,o.props.imageRendering="imageRendering",o.props.imageRenderingOptimizeSpeed="optimizeSpeed",o.props.imageRenderingOptimizeQuality="optimizeQuality"));if(s.j&&s.j.current&&window.devicePixelRatio&&(a.T[s.j.current+"devicePixelRatio"+window.devicePixelRatio]=!0),window.screen&&(s.j.iPhone||s.j.iPad)){var g={iPhone3:[480,320],iPhone4:[960,640],iPhone5:[1136,640],iPhone6:[1334,750],iPhone6plus:[1920,1080],iPad:[1024,768],iPad2:[1024,768]};for(var v in g){var y=g[v],b=y[0]/2,w=y[1]/2,C=window.screen.height,A=window.screen.width;(b==C&&w==A||b==A&&w==C)&&(a.T[v]=!0)}}function I(e){return"number"==typeof e?e+"px":"string"==typeof e&&e.length>0?e:"auto"}o.fix=function(e){return e},function(){var e=[];for(var t in o.features){var n=o.features[t];n.enabled&&e.push(n.className)}if(e.length){var i=e.join(" "),r=document.documentElement;r||(r=document.body),r.className?r.className+=" "+i:r.className=i}}(),o.fn.extend({createChild:function(e,t){if(this.length){var n=document.createElement(e||"div"),i=o(n);return t&&("string"==typeof t?n.style.position=t:"object"==typeof t&&i.css(t)),this[0].appendChild(n),i}},visible:function(){return this[0]&&0!==this[0].offsetHeight&&0!==this[0].offsetWidth},relativeOffset:function(e){return o.relativeOffset(this[0],e)},relativeOffsetTop:function(e){return o.relativeOffsetTop(this[0],e)},relativeOffsetLeft:function(e){return o.relativeOffsetLeft(this[0],e)},beforeUpdateInnerHtml:function(){return this},release:function(){return this},optimizeForTransform:function(e){if(o.support.required3dTransform)for(var t=0;t0)return this.detach.apply(this,arguments);for(var e=0;e0?this.remove.apply(this,arguments):(this.fastDetach(),this.length=0,this)},fastHtml:function(e){for(var t=0;t0&&(e.errors||(e.errors=0),e.errors<5&&(++e.errors,e.original_src||(e.original_src=e.src),_.defer((function(e,t){e.src=t}),e,e.original_src+"&error="+e.errors)))}catch(e){}}}),o.nd.data={},o.fx.step.empty=o.noop,o.nd.matrix=function(e){if("string"==typeof e&&e.length>0&&"none"!==e)if(e.indexOf("matrix3d")>=0){var t=/\(([^\)]*)?/.exec(e)[1].split(","),n=0;this.m11=parseFloat(t[n+0]),this.m21=parseFloat(t[n+1]),n+=2,this.m12=parseFloat(t[n+2]),this.m22=parseFloat(t[n+3]),n+=2,n+=4,this.tx=parseInt(t[n+4],10),this.ty=parseInt(t[n+5],10),this._scaleX=T(Math.sqrt(this.m11*this.m11+this.m12*this.m12)),this._scaleY=T(Math.sqrt(this.m21*this.m21+this.m22*this.m22)),this._scaleZ=1,0!==this.m22&&(this._rotate=T(57.2957795*Math.atan(this.m21/this.m22)))}else t=/\(([^,]*),([^,]*),([^,]*),([^,]*),([^,p]*)(?:px)?,([^)p]*)(?:px)?/.exec(e),this.m11=parseFloat(t[1]),this.m21=parseFloat(t[2]),this.m12=parseFloat(t[3]),this.m22=parseFloat(t[4]),this.tx=parseInt(t[5],10),this.ty=parseInt(t[6],10),this._scaleX=T(Math.sqrt(this.m11*this.m11+this.m12*this.m12)),this._scaleY=T(Math.sqrt(this.m21*this.m21+this.m22*this.m22)),this._scaleZ=1,0!==this.m22&&(this._rotate=T(57.2957795*Math.atan(this.m21/this.m22)))},o.nd.matrix.create=function(e){},o.nd.matrix.toTranslateString=function(e,t,n){var i=null===n,r=3===arguments.length;return e=e||0,t=t||0,n=n||0,!i&&(o.support.required3dTransform||r&&o.support.transform3d)?"translate3d("+e+"px,"+t+"px,"+n+"px)":"translate("+e+"px,"+t+"px)"},o.nd.matrix.toScaleString=function(e,t,n){var i=null===n,r=3===arguments.length;return 1==arguments.length&&(t=e),e=e||1,t=t||1,n=n||1,!i&&(o.support.required3dTransform||r&&o.support.transform3d)?"scale3d("+e.toFixed(10)+","+t.toFixed(10)+","+n.toFixed(10)+")":"scale("+e.toFixed(10)+","+t.toFixed(10)+")"},o.nd.matrix.prototype={m11:1,m12:0,m21:0,m22:1,tx:0,ty:0,_scaleX:1,_scaleY:1,_scaleZ:1,_rotate:0,scale:function(e){return 0==arguments.length?{scaleX:this._scaleX,scaleY:this._scaleY,scaleZ:this._scaleZ}:(this._scaleX=e.scaleX||1,this._scaleY=e.scaleY||1,this._scaleZ=e.scaleZ||1,this)},scaleX:function(e){return 0==arguments.length?this._scaleX:(this._scaleX=parseFloat(e)||1,this)},scaleY:function(e){return 0==arguments.length?this._scaleY:(this._scaleY=parseFloat(e)||1,this)},translate:function(e){return 0==arguments.length?{left:this.tx,top:this.ty}:(this.tx=e.left||e.tx||0,this.ty=e.top||e.ty||0,this)},translateLeft:function(e){return 0==arguments.length?this.tx:(this.tx=parseInt(e,10)||0,this)},translateTop:function(e){return 0==arguments.length?this.ty:(this.ty=parseInt(e,10)||0,this)},toTranslateString:function(e){return this.toString()},toMatrixString:function(){return this.toString()},toString:function(){if(!o.support.keepEmptyTransform&&this.isEmpty())return"none";var e="";return 0===this.tx&&0===this.ty||(e+=" "+o.nd.matrix.toTranslateString(this.tx,this.ty)),1===this._scaleX&&1===this._scaleY||(e+=" "+o.nd.matrix.toScaleString(this._scaleX,this._scaleY)),0!==this._rotate&&(e+=" rotate("+this._rotate.toFixed(10)+"deg)"),e},isEmpty:function(){return 0===this.tx&&0===this.ty&&1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22}},function(){o.cssHooks.transform=o.cssHooks[o.props.transform]={set:function(e,t){if(e._matrix=null,o.support.required3dTransform&&("none"===t||""===t)){if(!o.support.keepEmptyTransform||!1===e._keepEmptyTransformForElm)return"none";t="rotateY(0)"}return t}};var e=["translate","translateLeft","translateTop","scale","scaleX","scaleY"];o.each(e,(function(e,t,n){"translateLeft"!==t&&"translateTop"!==t&&"scaleX"!==t&&"scaleY"!==t||(o.fx.step[t]=function(e){o.cssHooks[t].set(e.elem,e.now+e.unit)}),o.support.transform?o.cssHooks[t]={get:function(e){var n=new o.nd.matrix(o.css(e,"transform"));return e._matrix=n,n[t]()},set:function(e,n,i){if(!0===i)var r=e._matrix||new o.nd.matrix;else r=new o.nd.matrix(o.css(e,"transform"));r[t](n),o.style(e,o.props.transform,r.toString()),e._matrix=r}}:0==t.indexOf("translate")?o.cssHooks[t]={get:function(e){var n=new o.nd.matrix;return n.translate(o(e).position()),n[t]()},set:function(e,n){"translateLeft"===t?o(e).css("left",n):"translateTop"===t?o(e).css("top",n):o(e).css({left:n.left,top:n.top})}}:o.cssHooks[t]={get:function(){return(new o.nd.matrix)[t]()},set:function(){}}})),o.each(["translate","translateLeft","translateTop"],(function(e,t,n){o.fn[t+"Optimized"]=function(e){return this.each((function(n,i){o.cssHooks[t].set(i,e,!0)}))}})),o.fn.extend({translateLeft:function(e,t){return arguments.length>0?t?this.translateLeftOptimized(e):this.css("translateLeft",e):this.css("translateLeft")},translateTop:function(e,t){return arguments.length>0?t?this.translateTopOptimized(e):this.css("translateTop",e):this.css("translateTop")},translate:function(e,t,n){if(arguments.length>0){var i={left:e,top:t};return n?this.translateOptimized(i):this.css("translate",i)}return this.css("translate")},cssBatch:function(t){var n={},i={};return _.each(t,(function(t,r,o){_.indexOf(e,r)<0?i[r]=t:n[r]=t})),o.isEmptyObject(n)||this.each((function(e,t){try{var i=new o.nd.matrix(o.css(t,"transform"));_.each(n,(function(e,t,n){i[t](e)})),o.style(t,o.props.transform,i.toString())}catch(e){o.writeError.error(e)}})),o.isEmptyObject(i)||this.css(i),this},resetTransition:function(){return this.css("transition","none 0"),this.css("transition","none"),this}});var t,n,i,r,s,u,c,l,h,f=["scrollTop","scrollLeft"];o.support.transition?(t=o,n=o.fn.animate,i=o.fn.stop,r="nd_an",c={bounce:(s="cubic-bezier(")+"0.0, 0.35, .5, 1.3"+(u=")"),linear:"linear",swing:"ease-in-out",easeInQuad:s+"0.550, 0.085, 0.680, 0.530"+u,easeInCubic:s+"0.550, 0.055, 0.675, 0.190"+u,easeInQuart:s+"0.895, 0.030, 0.685, 0.220"+u,easeInQuint:s+"0.755, 0.050, 0.855, 0.060"+u,easeInSine:s+"0.470, 0.000, 0.745, 0.715"+u,easeInExpo:s+"0.950, 0.050, 0.795, 0.035"+u,easeInCirc:s+"0.600, 0.040, 0.980, 0.335"+u,easeOutQuad:s+"0.250, 0.460, 0.450, 0.940"+u,easeOutCubic:s+"0.215, 0.610, 0.355, 1.000"+u,easeOutQuart:s+"0.165, 0.840, 0.440, 1.000"+u,easeOutQuint:s+"0.230, 1.000, 0.320, 1.000"+u,easeOutSine:s+"0.390, 0.575, 0.565, 1.000"+u,easeOutExpo:s+"0.190, 1.000, 0.220, 1.000"+u,easeOutCirc:s+"0.075, 0.820, 0.165, 1.000"+u,easeInOutQuad:s+"0.455, 0.030, 0.515, 0.955"+u,easeInOutCubic:s+"0.645, 0.045, 0.355, 1.000"+u,easeInOutQuart:s+"0.770, 0.000, 0.175, 1.000"+u,easeInOutQuint:s+"0.860, 0.000, 0.070, 1.000"+u,easeInOutSine:s+"0.445, 0.050, 0.550, 0.950"+u,easeInOutExpo:s+"1.000, 0.000, 0.000, 1.000"+u,easeInOutCirc:s+"0.785, 0.135, 0.150, 0.860"+u},l=/^([+-]=)?([\d+-.]+)(.*)$/,h={},t.fn.animate=function(e,i,o,a){if(i&&"object"==typeof i&&"step"in i||function(e){for(var t=0;t0&&(s=!0,"step"in(r&&"object"==typeof r?r:{})&&(s=!1)),s){var u={},c=n.useTranslate3d;for(var l in null!=c&&delete n.useTranslate3d,(c=c&&e.support.transform3d||!1!==c&&e.support.required3dTransform)&&(u.useTranslate3d=c),n)if(void 0===u[l]&&void 0!==n[l]){var d=l;"translateLeft"===l?d="left":"translateTop"===l&&(d="top"),u[d]=n[l]}return arguments[0]=u,e.fn.animate_enhanced.apply(this,arguments)}return n&&"leaveTransforms"in n&&delete n.leaveTransforms,t.apply(this,arguments)},e.fn.animate.defaults=t.defaults||{}}(o,o.fn.animate,o.fn.stop)}(),function(){function e(e,t){if(e&&t){var n=o.data(e);if(n){var i=n[t._id];return i||(i=n[t._id]=[]),i}}return null}function t(t,n,i){if(i){var r=e(t,n);r&&r.push(i)}}function n(t,n,i){if(i){var r=e(t,n);if(r)for(var o=0;o0?120:-120),0!=t.wheelDeltaX&&(t.wheelDeltaX=t.wheelDeltaX>0?120:-120),0!=t.wheelDeltaY&&(t.wheelDeltaY=t.wheelDeltaY>0?120:-120),!t.wheelDeltaX&&t.wheelDeltaY?t.wheelDelta=t.wheelDeltaY:t.wheelDeltaX&&!t.wheelDeltaY&&(t.wheelDelta=t.wheelDeltaX),t.wheelDir=t.wheelDelta?t.wheelDelta>0?-1:1:0,t.wheelDirVerticale=t.wheelDeltaY?t.wheelDeltaY>0?-1:1:0,t.wheelDirHorizontal=t.wheelDeltaX?t.wheelDeltaX>0?-1:1:0,n.lastFireTime=t.timeStamp,n.fn.call(this,t)}}function i(e){o(this).on(o.props.mousewheel,e.data,n)}function r(){o(this).off(o.props.mousewheel,n)}function a(e,a,s){return s=o.extend({},t,s||{}),a&&a.handler?a.whenMouseOver?e.on("mouseenter",{fn:a.handler,config:s},i).on("mouseleave",r):e.on(o.props.mousewheel,{fn:a.handler,config:s},n):e}o.fn.mousewheel=function(e,t){return"function"==typeof e&&(t=e,e=null),a(this,{handler:t},e)},o.fn.mousewheelWhenMouseOver=function(e,t){return"function"==typeof e&&(t=e,e=null),a(this,{handler:t,whenMouseOver:!0},e)}}(),function(){var e={accumulate:!1,accumulateMinInterval:100,accumulateMaxTime:0,handler:null,target:null};function t(){this._timeout=0,n(this)}function n(e){if(e._data){var t=(new Date).getTime();if(e.accumulateMinTimeSinceProcessed&&t-e._lastProcessedTimer.accumulateMaxTime?(n(r),!1):(r._timeout=setTimeout(r._timeoutCallback,r.accumulateMinInterval),!1)):(n(r),!1)}(0,e,a);return"function"==typeof e.preventDefault&&e.preventDefault(),i}))})):r}(this,r)};var i=function(e,t){var n,i,r="";function o(t,o,a,s){t[n](r+o,"wheel"==i?a:function(t){!t&&(t=e.event);var n={originalEvent:t,target:t.target||t.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==t.type?0:1,deltaX:0,deltaY:0,delatZ:0,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,preventDefault:function(){t.preventDefault?t.preventDefault():t.returnValue=!1}};return"mousewheel"==i?(t.wheelDeltaX&&(n.deltaX=-1/40*t.wheelDeltaX),t.wheelDeltaY&&(n.deltaY=-1/40*t.wheelDeltaY),t.wheelDeltaX||t.wheelDeltaY||(n.deltaY=-1/40*t.wheelDelta)):n.deltaY=t.detail,a(n)},s||!1)}return e.addEventListener?n="addEventListener":(n="attachEvent",r="on"),i="onwheel"in t.createElement("div")?"wheel":void 0!==t.onmousewheel?"mousewheel":"DOMMouseScroll",function(e,t,n){o(e,i,t,n),"DOMMouseScroll"==i&&o(e,"MozMousePixelScroll",t,n)}}(window,document)}(),o.nd.fixTouchEvent=function(e){var t=e.touches;if(t&&0!==t.length||(t=e.changedTouches),t&&t.length>0){var n=t[0];e.screenX=n.screenX,e.screenY=n.screenY,k(e,"pageX")||(e.pageX=n.pageX,e.pageY=n.pageY),k(e,"touchX")||(e.touchX=n.pageX,e.touchY=n.pageY)}return e},o.nd.matchSelector=function(e,t,n){if(e){if(d.filter(t,[e]).length>0)return!0;n.length&&(n=n[0]),n=n||document.body||document.documentElement;for(var i=e;i!=n;i=i.parentNode||n)if(d.filter(t,[i]).length>0)return!0}return!1},o.fn.tap=function(e,t){return"function"==typeof e&&(t=e,e=void 0),this.doubletap({tap:t,selector:e})},o.fn.doubletap=function(){if(0==arguments.length)return this;var e=arguments[0];(arguments.length>1||"function"==typeof arguments[0])&&(e={doubleTap:arguments[0],tap:arguments[1]});var t=this;return this.on("singleTapConfirmed",(function(n){if(e.tap){if(e.selector&&!o.nd.matchSelector(n.target,e.selector,t))return;return n.data=e.data,n=o.nd.fixTouchEvent(n),e.tap.call(n.target,n)}})),o.nd.gestures.bind(this,{singleTapConfirmed:function(t){if(e.tap){if(e.selector&&!o.nd.matchSelector(t.target(),e.selector,t.element()))return;var n=t.event();return n.data=e.data,n=o.nd.fixTouchEvent(n),e.tap.call(t.target(),n)}},doubleTap:function(t){if(e.doubleTap){if(e.selector&&!o.nd.matchSelector(t.target(),e.selector,t.element()))return;var n=new o.Event("doubletap",o.nd.fixTouchEvent(t.event()));return n.data=e.data,n.originalEvent=null,e.doubleTap.call(t.target(),n)}}}),this},o.nd.easing=o.nd.easing||{},o.nd.easing.nd1="cubic-bezier(0.33,0.66,0.66,1)",o.easing[o.nd.easing.nd1]=function(e,t,n,i){return Math.sin(Math.PI/2*e)},o.nd.easing.nd1_reverse="cubic-bezier(0.33,0.0,0.33,1)",o.easing[o.nd.easing.nd1_reverse]=function(e,t,n,i){return Math.sin(Math.PI*(e-.5))/2+.5},o.showError=o.noop,o.writeLog=function(){arguments.length&&(o.writeLog.messages=o.writeLog.messages||[],o.writeLog.messages.push(arguments[0]))},o.writeError=function(){arguments.length&&(o.writeError.messages=o.writeError.messages||[],o.writeError.messages.push(arguments[0]))},o.nd.fixTouchScroll=function(){l.b.touch&&o(window).scrollTop()>0&&o(window).scrollTop(0)},o.nd.noop=function(){},o.nd.momentum=function(e,t,n,i){e>8?e=8:e<-8&&(e=-8);var r=Math.log(.15/Math.abs(e))/Math.log(.998);r=r<=0?0:Math.round(r);var o,a=e*((1-Math.pow(.998,r+1))/(1-.998));return a>0&&a>n?(r=(o=n)*r/a,a=o):a<0&&a<-i&&(r=(o=-i)*r/a,a=o),{dist:a,time:Math.abs(r),returnTime:0}},function(){var e=[],t=function(t){if(this.__ndBaseType){var n=this.__ndBaseType.prototype[t];if(n){var i=null;arguments.length>1&&(i=o.makeArray(arguments)).shift();var r=this.__ndBaseType;try{this.__ndBaseType=this.__ndBaseType.prototype.__ndBaseType,n.apply(this,i||e)}finally{this.__ndBaseType=r}}}},n=0;function i(){return this._ndUniqueId||(this._ndUniqueId=++n),this._ndUniqueId}Function.prototype.ndInheritFrom=function(e){for(var n in this.__ndBaseType=e,e.prototype)this.prototype[n]=e.prototype[n];return this.prototype&&(this.prototype.__ndBaseType=e,this.prototype.__ndCallBaseByName=t),this},Function.prototype.ndExtend=function(e){for(var t in this.prototype.ndUniqueId=i,e)this.prototype[t]=e[t];return this},Function.prototype.ndBaseCostructor=function(t){if(t&&this.__ndBaseType){var n=null;arguments.length>1&&(n=o.makeArray(arguments)).shift(),this.__ndBaseType.apply(t,n||e)}}}(),S={},o.getPathExp=function(e){return S[e]||(S[e]=new Function("obj","try{if(obj!=null&&obj!=undefined) return obj."+e+";}catch(E){}"))},o.required=function(e,t){var n=new u.c,i=0,r=o.getPathExp(e),a=function(){var o=!1,s=r(h);if(s&&(t&&t(s),n.resolve(s),o=!0),i>=10||o)return e=null,t=null,a=null,void(r=null);setTimeout(a,10*i++)};return a(),n.promise()},o.nd.longBitwiseAnd=function(e,t){var n=4294967296;return(e/n&t/n)*n+(e%n&t%n)},o.nd.isExternalArticleId=function(e){var t=0x800000000000;return o.nd.longBitwiseAnd(e,t)==t},o.nd.matrix},88089:function(e,t,n){"use strict";n.d(t,{A:function(){return he}});var i=n(58932),r=n(29583),o=n(13302),a=n(99526),s=n(25778),u=n(84531),c=n(26476),l=n(32787),d=n(7443),h=n(65678),f=n(22907),p=n(70989),m=n(19939),g=n(16213),v=n(2215),y=n(13384),_=n(39407),b=(n(47027),n(27189));function w(e){if(!e)return null;e=A(e);var t=b.A.get("ui.FeedSettings.Categories");return t&&(0,o.find)(t,(function(t){return t.id===e||t.path===e}))}function C(){for(var e,t,n=[],r=0;re?t.lastAccessTime:e}),0)},e}(),de=function(){function e(){var e=this;this._onLoadOnce=[],this._onErrorOnce=[],this.items=new l.To,this._leftToken=void 0,this._rightToken=void 0,this._on={itemsListChanged:ue(),articlesLoaded:ue(),articlesLoadError:ue(),reset:ue()},this._ts=0,this._bundles=[],this._toLoad={items:{},pages:{}},this._map={},this._removedArticlesCount=0,this._removedArticleIds={},this._loadPromises={},v.A.bind("currentLanguageChanged",this.reset.bind(this)),re.A.bind(oe.default,"stateChanged",null,this._onPurchaseStateChanged.bind(this)),D.bookmarkCreateSubscription.pipe((0,s.p)((function(e){return e.data&&e.data.articleId}))).subscribe((function(t){if(e.items){var n=t.data.articleId;e.items.forEach((function(e){e.ArticleId!==n||(e.BookmarkId="bookmarked")}))}})),D.bookmarkDeleteSubscription.pipe((0,s.p)((function(e){return e.data&&e.data.articleId}))).subscribe((function(t){if(e.items){var n=t.data.articleId;e.items.forEach((function(e){e.ArticleId!==n||(e.BookmarkId=void 0)}))}})),this._loadSubject=new a.m,this.itemsToPreload=10}return Object.defineProperty(e.prototype,"onlineListLoader",{set:function(e){this._onlineListLoader=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offlineListLoader",{set:function(e){this._offlineListLoader=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onlineItemsLoader",{set:function(e){this._onlineItemsLoader=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offlineItemsLoader",{set:function(e){this._offlineItemsLoader=e},enumerable:!1,configurable:!0}),e.prototype.onLoadOnce=function(e){return(0,o.isFunction)(e)&&this._onLoadOnce.push(e),this},e.prototype.onErrorOnce=function(e){return(0,o.isFunction)(e)&&this._onErrorOnce.push(e),this},e.prototype.load=function(e,t){var n=this;if(!this.items.isEmpty())return Promise.resolve();if(!this._loadPromise){var i=void 0;return(i=this._loadPromise=e?this._load(e,-1,t):this._load()).then((function(){n._loadSubject.next()})).finally((function(){n._loadPromise=null})),i}return this._loadPromise},Object.defineProperty(e.prototype,"loadPromise",{get:function(){var e=this;return this._loadSubject.pipe((0,u.s)(1),(0,c.T)((function(){return e}))).toPromise()},enumerable:!1,configurable:!0}),e.prototype.loadMore=function(){var e=this;return null===this._rightToken?Promise.resolve():this._load(this._rightToken,1).then((function(){(0,o.defer)(e._on.itemsListChanged.fire)}))},e.prototype.loadHistory=function(){var e=this;return null===this._leftToken&&Promise.resolve(),this._load(this._leftToken,-1).then((function(){(0,o.defer)(e._on.itemsListChanged.fire)}))},e.prototype.reset=function(){this._ts=(new Date).getTime(),this._loadSubject=new a.m;var e=this.items;return this.items=new l.To,this._bundles=[],(0,o.forIn)(this._toLoad.items,(function(e){e.abortLoading()})),e&&!e.isEmpty()&&e.forEach((function(e){(0,ae.I_)(e,(function(){return e.dispose()}))})),this._toLoad={items:{},pages:{}},this._loadPromise=null,this._resetTokens(),this._firstItem=null,this._map={},this._accessToken=null,(0,o.defer)(this._on.reset.fire),this._restrictedTypes=null,this._anchorId=null,this},e.prototype.resetREOF=function(){if(null!==this._rightToken)return this;this._resetRightToken();var e=this.items.tail();return e&&e.next(void 0),this},e.prototype.isEmpty=function(){return null===this._leftToken&&null===this._rightToken&&this.items.isEmpty()},e.prototype.loadItem=function(e){if(!this._isFoundToLoad(e)){var t={items:{},pages:{}};this._addToLoad(e,t);for(var n=e.next(),i=e.prev(),r=0;r=0})).value():null},e.prototype.appendBundle=function(e,t,n){var i=new le(e);i.leftToken=t,i.rightToken=n,this._bundles.push(i)},e.prototype.removeOldArticles=function(e){var t=this,n=(new Date).getTime()-e,r=[],a=[];(0,o.forEach)(this._bundles,(function(e,s){var u=!1;return(0,o.forEach)(e.articles,(function(e){return!((0,ae.r)(e)||e.lastAccessTime>n)||(u=!0,!1)})),u?(a=t._bundles.slice(s),!1):(r.push.apply(r,(0,i.fX)([],(0,i.zs)(e.articles),!1)),!0)}));var s=null;this.items.forEach(-1,(function(e){return s=e,!((0,ae.r)(e)||e.lastAccessTime>n||e.tokenized()||(r.push(e),0))})),s&&s.tokenized()&&!(0,ae.r)(s)&&s.lastAccessTime<=n&&(0,o.forEachRight)(this._bundles,(function(e,t){var s=!1;return(0,o.forEach)(e.articles,(function(e){return!((0,ae.r)(e)||e.lastAccessTime>n)||(s=!0,!1)})),s?(a=a.slice(0,t),!1):(r.push.apply(r,(0,i.fX)([],(0,i.zs)(e.articles),!1)),!0)})),(0,o.forEach)(r,(function(e){t.items.detach(e.loaded(!1).provider(null).group(null)),delete t._map[e.Id]})),this._bundles=a,this._bundles.length?(this._leftToken=this._bundles[0].leftToken,this._rightToken=this.items.tail().tokenized()?(0,o.last)(this._bundles).rightToken:void 0):this._leftToken=this._rightToken=void 0,this._firstItem=this.items.head()},e.prototype.setRestrictedSectionTypes=function(e){this._restrictedTypes=e},e.prototype.getAnchorItem=function(){return this._anchorId?this._map[this._anchorId]:null},e.prototype._basicProcessor=function(e,t,n){if(t.Id in this._map)return null;var i=new e(t);return i.getId()in this._map?null:(i.provider(this),n.append(i),this._map[i.getId()]=i,i)},e.prototype._basicProcessorWithGroup=function(e,t,n,i){var r=this._basicProcessor(e,t,n);if(r){var o=M(t.Data),a=x.dp.Basic,s=(new Date).getTime(),u=r.prev()||(i<0?this.items.head():this.items.tail());u&&u.group()&&u.Data&&u.Data.GroupType===t.Data.GroupType&&(s=u.group().id),r.group(s,o).group().raw(t.Data).renderingType=a}return r},e.prototype._load=function(e,t,n){var r,a=this;if(t<0&&null===this._leftToken||(!t||t>0)&&null===this._rightToken)return Promise.resolve();if(this._offlineListLoader?r=this._offlineListLoader:this._onlineListLoader&&(r=this._onlineListLoader),!r)return Promise.reject(new Error("Cannot load data. Data loader isn't initialized."));var s=0,u=this._ts,c=function(n){var i;if((0,o.defer)((function(){if(a._onLoadOnce.length){var e=a._onLoadOnce;a._onLoadOnce=[],(0,o.forEach)(e,(function(e){return(0,o.defer)(e,n)}))}})),!n)return Promise.reject({status:404});if(u!==a._ts)return Promise.reject(new Error("The response is outdated: the original context has changed."));if(a._accessToken=n.accessToken,(0,o.isEmpty)(n.items))return a._ensureDataLoading(e,t);var h=n.items,f=new l.To,p=((i={})[d.p.initBlock]=function(e){return a._basicProcessor(F,e,f)},i[d.p.homeBlock]=function(e){return a._basicProcessor(z,e,f)},i[d.p.replies]=function(e){return a._basicProcessorWithGroup(j,e,f,t)},i[d.p.myLastTitles]=function(e){return a._basicProcessorWithGroup(W,e,f,t)},i[d.p.article]=function(e){if(e.Id in a._map)return null;var t=new Y.A(e).provider(a);return t.loaded()&&!t.checkTextLength()?null:(f.append(t),a._map[t.getId()]=t,t)},i[d.p.page]=function(e){return a._basicProcessor(X.A,e,f)},i[d.p.divider]=function(e){return a._basicProcessor(q.A,e,f)},i[d.p.monitors]=function(e){return a._basicProcessorWithGroup(K,e,f,t)},i[d.p.profile]=function(e){return a._basicProcessor(Q,e,f)},i[d.p.adBlock]=function(e){if(e.Id in a._map)return null;var t=new $(e).provider(a);f.append(t);var n=t.prev();return n&&n.Data&&(t.Data||(t.Data={}),t.Data.GroupId||void 0===n.Data.GroupId||(t.Data.GroupId=n.Data.GroupId),t.Data.GroupType||void 0===n.Data.GroupType||(t.Data.GroupType=n.Data.GroupType),t.Data.GroupName||void 0===n.Data.GroupName||(t.Data.GroupName=n.Data.GroupName)),a._map[t.getId()]=t,t},i[d.p.social]=function(e){return a._basicProcessor(ne,e,f)},i[d.p.bookmarkPages]=function(e){return a._basicProcessor(ie,e,f)},i);(0,o.defer)(a._on.itemsListChanged.fire);var m=(0,o.chain)(h).map((function(e){var t,n=p[e.Type];return a._restrictedTypes&&(null===(t=a._restrictedTypes)||void 0===t?void 0:t.includes(e.Type))||!n?null:n(e)})).filter((function(e){return e&&e.loaded()})).value();if(m.length&&(0,o.defer)(a._on.articlesLoaded.fire,m),(t<0||a.items.isEmpty())&&null!==a._leftToken&&(a._leftToken=n.leftToken),(!t||t>0||a.items.isEmpty())&&null!==a._rightToken&&(a._rightToken=n.rightToken),a._anchorId||(a._anchorId=n.anchorId),f.isEmpty()&&!(0,o.isEmpty)(h))return!(s<3)||e||null===n.rightToken||t&&1!==t?a._ensureDataLoading(e,t):r.load(e,t,++s,void 0,a._getPendingHistory()).then(c,(function(e){throw a._onLoadFailed(u),e}));var g=f.head(),v=f.tail();a._firstItem||(a._firstItem=t<0?v:g);var y=t<0?a.items.head():a.items.tail(),_=y?y.group():null,b=(0,o.chain)(h).filter((function(e){return e.Type===d.p.social})).map((function(e){return e.Data.GroupName})).value();if(f.forEach(t||1,(function(e){if(e.Data&&e.Data.GroupId)if(y&&_&&y.Data&&y.Data.GroupId===e.Data.GroupId&&y.Data.GroupType===e.Data.GroupType)t<0?(_.prepend(e),e.Type===d.p.social&&(_.renderingType=x.dp.SocialCategory)):_.append(e),e.section=_;else{var n=M(e.Data),i=e.Data.GroupName,r=ce[e.Data.GroupType]||x.dp.RegularHeadlines;(0,o.some)(b,(function(e){return e===i}))&&(r=x.dp.SocialCategory);var a=T(e.Data.Locale),s=e.group(n).group().raw(e.Data).countryName(a);s.subtitle=({locale:e.Data.Locale},null),s.renderingType=r,s.locale=e.Data.Locale,e.Data.Slug&&(s.iconClassName=I(e.Data)&&e.Data.Slug),e.section=s}_=(y=e)?y.group():null})),t<0?a.items.prepend(f):a.items.append(f),null!==a._leftToken||g._prev||g.prev(null),null!==a._rightToken||v._next||v.next(null),n.leftToken||n.rightToken){f.forEach((function(e){(0,o.isFunction)(e.tokenized)&&e.tokenized(!0)}));var w=new le(f.toArray());n.leftToken&&(w.leftToken=n.leftToken),n.rightToken&&(w.rightToken=n.rightToken),t>0?a._bundles.push(w):t<0&&a._bundles.unshift(w)}return Promise.resolve()},h=[e||"",t||1,n||0,this._ts].join("_");if(h in this._loadPromises)return this._loadPromises[h];var f=this._loadPromises[h]=Promise.all([r.load(e,t,s,n,this._getPendingHistory()).catch((function(t){if(t&&400===t.status&&e&&a.items.isEmpty())return r.load(void 0,1,s);throw t}))]).then((function(e){var t=(0,i.zs)(e,1)[0];return c(t)}),(function(e){throw a._onLoadFailed(u),e}));return f.finally((function(){delete a._loadPromises[h]}))},e.prototype._resetTokens=function(){this._leftToken=void 0,this._resetRightToken()},e.prototype._resetRightToken=function(){this._rightToken=void 0},e.prototype._isFoundToLoad=function(e){switch(e.Type){case d.p.page:return e.getId()in this._toLoad.pages;case d.p.article:return e.getId()in this._toLoad.items;default:return!1}},e.prototype._addToLoad=function(e,t){var n=e.getId();switch(e.Type){case d.p.page:this._toLoad.pages[n]=t.pages[n]=e;break;case d.p.article:this._toLoad.items[n]=t.items[n]=e}},e.prototype._getArticlesKeys=function(e){var t=this,n=[];return(0,o.forIn)(e,(function(i,r){i.loaded()?(delete t._toLoad.items[r],delete e[r]):n.push(r)})),n},e.prototype._getPagesKeys=function(e){var t=this,n=[];return(0,o.forIn)(e,(function(i,r){i.loaded()?(delete t._toLoad.pages[r],delete e[r]):n.push({ProfileId:i.ProfileId,PageN1:i.PageN1,PageN2:i.PageN2})})),n},e.prototype._onItemsLoaded=function(e,t){var n=this;if(this._removedArticleIds={},e!==this._ts||this.items.isEmpty())se.c.onArticlesLoaded(this._removedArticleIds);else{var r=(0,o.chain)(t.Articles||t).map((function(e){delete n._toLoad.items[e.Id];var t=n._map[e.Id];if(!t||t.Type===d.p.page)return null;var i=(0,o.clone)(t);if(t.update(e),!t.checkTextLength()&&!(0,ae.r)(t)){if(!0===t.keepInSmartFlow){var r=n._createPageFromArticle(e);if(r){i.Type=d.p.page;var a=new X.A(i);return a.update(r),a.provider(n).loaded(!0),n._map[a.getId()]=a,n.items.replace(t,a),t.loaded(!1).provider(null).group(null),n._map[e.Id]=null,t.dispose(),a}}return n.removeArticle(t),null}return n._removedArticlesCount=0,t.loaded(!0)})).filter().value();if(this._removedArticlesCount>40)return this._onLoadItemsFailed(),void se.c.onArticlesLoaded(this._removedArticleIds);r.push.apply(r,(0,i.fX)([],(0,i.zs)((0,o.chain)(t.Pages||t).map((function(e){var t=e.PageN1 instanceof Object?e.PageN1.PageN:e.PageN1,i=e.PageN2 instanceof Object?e.PageN2.PageN:e.PageN2,r=n._map[X.A.getId(e.ProfileId,t,i)];return r&&delete n._toLoad.pages[r.getId()],e.PageN1 instanceof Object?!r||r.loaded()?null:r.update(e.PageN1,e.PageN2).loaded(!0):(n.removeArticle(r),null)})).filter().value()),!1)),se.c.onArticlesLoaded(this._removedArticleIds),(0,o.defer)(this._on.articlesLoaded.fire,r)}},e.prototype._createPageFromArticle=function(e){return e.Issue&&e.Issue.FirstPageSize?{BookmarkId:e.BookmarkId,Issue:e.Issue,Name:e.PageName,PageN:e.Page,H:e.Issue.FirstPageSize.Height,W:e.Issue.FirstPageSize.Width}:null},e.prototype._onLoadItemsFailed=function(){var e=this;this.items.isEmpty()||this.items.forEach((function(t){t.loaded()||e.removeArticle(t)})),this._setLEOF(),this._setREOF(),this._removedArticlesCount=0,(0,o.defer)(this._on.articlesLoadError.fire)},e.prototype._getBundle=function(e){return e&&e in this._map?(0,o.find)(this._bundles,(function(t){return(0,o.some)(t.articles,(function(t){return t.getId()===e}))})):null},e.prototype._ensureDataLoading=function(e,t){if(t<0){if(this._setLEOF(),this.items.isEmpty())return this.loadMore(this)}else{if(e&&(0,p.d)()===h.lP.TopNews)return this._resetRightToken(),this.loadMore(this);if(this._setREOF(),!e&&this.items.isEmpty())return this.loadHistory(this)}return Promise.resolve()},e.prototype._getPendingHistory=function(){var e=[];return this.items.forEach((function(t){t.tokenized()||e.push({Id:t.Id,Type:t.Type,Data:t.Data})})),e},e.prototype._onLoadFailed=function(e){var t=this;e===this._ts&&(this._setLEOF(),this._setREOF(),this._on.articlesLoadError.fire(),(0,o.defer)((function(){if(t._onErrorOnce.length){var e=t._onErrorOnce;t._onErrorOnce=[],(0,o.forEach)(e,(function(e){return(0,o.defer)(e)}))}})))},e.prototype._setLEOF=function(){this._leftToken=null,this.items&&this.items.head()&&this.items.head().prev(null)},e.prototype._setREOF=function(){this._rightToken=null,this.items&&this.items.tail()&&this.items.tail().next(null)},e.prototype._refreshAccessRights=function(e){var t=this;if((0,o.isEmpty)(e))return Promise.resolve();var n=(0,o.chain)(e).filter((function(e){return e.loaded()&&!e.PotentiallyAllowedToRead})).filter((function(e){return!t._isFoundToLoad(e)})).value(),i=(0,o.filter)(n,ae.r),r=(0,o.filter)(n,(function(e){return!(0,ae.r)(e)}));if((0,o.each)(r,(function(e){return e.loaded(!1)})),i.length>0){(0,o.each)(i,(function(e){return t._addToLoad(e,{items:{}})}));var a={Articles:(0,o.map)(i,(function(e){return e.getId()})),Pages:[]};return this._loadDetailed(a)}return Promise.resolve()},e.prototype._onPurchaseStateChanged=function(){var e=this,t=(0,o.clone)(this._toLoad.items),n=null,i=function(r){var a=(0,o.chain)(r).filter((function(e){return e&&e.Type===d.p.article})).filter((function(e){return t[e.getId()]})).value();(0,o.each)(a,(function(e){return delete t[e.getId()]})),(0,o.isEmpty)(e._toLoad.items)&&(e._on.articlesLoaded.remove(i),e._on.articlesLoadError.remove(n)),e._refreshAccessRights(a).catch(g.A.error)};n=function(){(0,o.isEmpty)(e._toLoad.items)&&(e._on.articlesLoaded.remove(i),e._on.articlesLoadError.remove(n))},(0,o.isEmpty)(t)||(this._on.articlesLoaded.add(i),this._on.articlesLoadError.add(n));var r=(0,o.chain)(this._map).valuesIn().filter((function(e){return e&&e.Type===d.p.article})).value();this._refreshAccessRights(r).catch(g.A.error)},e}(),he=de},68446:function(e,t,n){"use strict";n.d(t,{A:function(){return D}});var i=n(58932),r=n(13302),o=n(29583),a=n(25778),s=n(12815),u=n(7443),c=n(49656),l=n(32787),d=n(88083),h=n(2215),f=n(58735),p=n(22907),m=n(13981),g=n(95916),v=n(73690),y=n(27189),_=n(67303),b=function(){function e(e){this._ts=Date.now(),this._requests=[],this._isAwaiting=!1,this._urlViewName=e}return e.prototype.getArticles=function(e,t){var n=this,i=t||h.A.currentLanguage();return new Promise((function(t,r){n._requests.push({ids:e,language:i,resolve:t,reject:r}),n._sendRequest()}))},e.prototype.getArticle=function(e,t){var n={key:e,viewType:this._urlViewName},i=t||h.A.currentLanguage();i&&(n.lng=i);var r=_.A.bookmark();return r&&(n.bookmark=r.bookmarkId),n.IsHyphenated=(0,m.Lt)(g.Xh),(0,v.G4)("articles","GetArticle",n,{})},e.prototype.reset=function(){this._ts=Date.now();var e=this._requests;this._requests=[];var t=new Error("Request expired.");e.forEach((function(e){return e.reject(t)}))},e.prototype._sendRequest=function(){var e,t,n,o,a=this;if(this._requests.length&&!this._isAwaiting){var s=this._requests[0].language,u=(0,r.remove)(this._requests,(function(e){return e.language===s})),c=[],l={};try{for(var d=(0,i.Ju)(u),f=d.next();!f.done;f=d.next()){var p=f.value;try{for(var b=(n=void 0,(0,i.Ju)(p.ids)),w=b.next();!w.done;w=b.next()){var C=w.value;C in l||(l[C]=1,c.push(C))}}catch(e){n={error:e}}finally{try{w&&!w.done&&(o=b.return)&&o.call(b)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}var A={comment:"LatestByAll",viewType:this._urlViewName,articles:null};A.IsHyphenated=(0,m.Lt)(g.Xh),y.A.get("textview.enableMarkup",!1)&&(A.options=1);var I={};if(s){var S=h.A.auto.exceptions();(0,r.isEmpty)(S)||(A.lngExceptions=S.join(",")),A.language=s,I.timeout=3e4}var P=_.A.bookmark();P&&(A.bookmark=P.bookmarkId),this._isAwaiting=!0;var x=this._ts;(function(e,t,n){var r=[],o=0;t.articles=e.slice(o,o+50).join(",");var a=function(s){return r.push.apply(r,(0,i.fX)([],(0,i.zs)(s.Articles),!1)),(o+=50)>=e.length?r:(t.articles=e.slice(o,o+50).join(","),(0,v.G4)("articles","GetItems",t,n).then(a))};return(0,v.G4)("articles","GetItems",t,n).then(a)})(c,A,I).then((function(e){var t,n;if(a._isAwaiting=!1,x===a._ts){e.forEach((function(e){return l[e.id||e.Id]=e}));try{for(var o=(0,i.Ju)(u),s=o.next();!s.done;s=o.next()){var d=s.value,h=(0,r.map)(c,(function(e){return l[e]}));d.resolve(h)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}a._sendRequest()}else{var f=new Error("Request expired.");u.forEach((function(e){return e.reject(f)}))}}),(function(e){u.forEach((function(t){return t.reject(e)})),a._isAwaiting=!1,a._sendRequest()}))}},e}(),w=n(70989),C=n(96543),A=n(95853),I=n(3585),S=n(16213),P=n(76900),x=!1;_.A.issueLoaded((function(){x=!0}));var T=function(){function e(e){var t=this;this.number=e.PageNumber,this.name=e.PageName,e.Articles&&e.Articles.length&&(this.articles=(0,r.map)(e.Articles,(function(e){var n=new s.A(e);return n.Type=u.p.article,n.Page=t,n})))}return e.prototype.remove=function(e){return this.articles&&(0,r.pull)(this.articles,e),this},e}(),k=function(){function e(e,t,n){this.id=e,this.title=t||"",n&&this.add(n),this._articles=[],this.minrate=1/0,this.maxrate=0,this._map={},this._ready=!1,this._changed=!1}return e.prototype.add=function(e){return e.Section=this,this._articles.push(e),this.maxrate=Math.max(this.maxrate,e.Rate),this.minrate=Math.min(this.minrate,e.Rate),e.loaded()&&(this._map[e.ArticleId]=e),this._ready&&!e.loaded()&&(this._ready=!1),this._changed=!0,this._isReadyPromise=null,this},e.prototype.remove=function(e){return(0,r.pull)(this._articles,e),this._changed=!0,this._isReadyPromise=null,this},e.prototype.article=function(e){return this.ready()?(0,r.isNumber)(e)?e>=this._articles.length?null:this._articles[e].hyphenate():this._map[e.ArticleId]:null},e.prototype.articles=function(e){return e||this.ready()?this._articles.slice(0):null},e.prototype.ready=function(){var e=this;if(!this._changed&&this._ready)return!0;if(this._changed=!1,!this._articles.length)return!1;this._ready=!0;var t=this._articles;if(this.reset(),t.forEach((function(t){return e.add(t)})),this._changed=!1,!this._ready)return!1;var n=this.maxrate-this.minrate;return this._articles.forEach((function(t){n?t.SecNormRate=(t.Rate-e.minrate)/n:e.maxrate?t.SecNormRate=t.Rate/e.maxrate:t.SecNormRate=Math.random()})),!0},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return(0,r.isEmpty)(this._articles)},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this._articles=[],this.minrate=1/0,this.maxrate=0,this._map={},this._isReadyPromise=null},e.prototype.isReadyPromise=function(){var e=this;return this._isReadyPromise?this._isReadyPromise:this.ready()?Promise.resolve():(this._isReadyPromise=new Promise((function(t,n){var i=function(){if(e.ready())t();else{var r=[];e._articles.forEach((function(e){e.loaded()||r.push(e.load())})),r.length||n(new Error("Inconsistency.")),Promise.all(r).then(i)}};i()})),this._isReadyPromise)},e}(),E=null,M=function(){function e(){var e=this;this._onlineLoader=new b(p.k.toUrlViewName(w.A.getActiveViewName())),this._offlineLoader=null,this._articles=null,this._pages=null,this._sections=null,this._map=null,this._callbacks={},this._ts=0,this._loaded=!1,this._loadPromise=null,this._loadingSections=[],this._loadingArticlesIds={},this._issueLoad={promise:null,resolve:null,reject:null},this._onLoadOnce=[],_.A.issueLoading((function(){return e._reset()})),_.A.issueLoaded(this._onIssueLoaded.bind(this)),x&&this._onIssueLoaded(),h.A.bind("currentLanguageChanged",(function(){return e._onCurrentLanguageChanged()})),C.A.bind(A.default,"stateChanged",null,(function(){return e._onPurchaseStateChanged()})),this._bookmarkCreateSubscription||(this._bookmarkCreateSubscription=I.bookmarkCreateSubscription.pipe((0,a.p)((function(e){return e.data&&e.data.articleId}))).subscribe((function(t){if(e._articles){var n=t.data.articleId;e._articles.forEach((function(e){e.ArticleId!==n||(e.BookmarkId="bookmarked")}))}}))),this._bookmarkDeleteSubscription||(this._bookmarkDeleteSubscription=I.bookmarkDeleteSubscription.pipe((0,a.p)((function(e){return e.data&&e.data.articleId}))).subscribe((function(t){if(e._articles){var n=t.data.articleId;e._articles.forEach((function(e){e.ArticleId!==n||(e.BookmarkId=void 0)}))}})))}return e.prototype.reset=function(){},e.prototype._reset=function(e){void 0===e&&(e=!1),this._ts=Date.now();var t=this._articles;this._articles=null,t&&!t.isEmpty()&&t.forEach((function(e){(0,P.I_)(e,(function(){return e.dispose()}))})),this._pages=null,this._sections=null,this._map=null,this._loadingSections=[],this._loaded=!1,e||(this._issueLoad.reject&&this._issueLoad.reject(),this._issueLoad.promise=this._issueLoad.resolve=this._issueLoad.reject=null),this._loadPromise=null,(0,c.c)(),this._onlineLoader.reset(),"reset"in this._callbacks&&(0,r.defer)(this._callbacks.reset.fire)},e.prototype.load=function(){return this._loadPromise||(this._loadPromise=this._loadPages()),this._loadPromise},Object.defineProperty(e.prototype,"loadPromise",{get:function(){return this.load()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mandatoryArticleId",{get:function(){return this._mandatoryArticleId},set:function(e){this._mandatoryArticleId=e,this.filterContinuations()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mandatoryArticle",{get:function(){return this._map&&this.mandatoryArticleId?this._map[this._mandatoryArticleId]:null},enumerable:!1,configurable:!0}),e.prototype.filterContinuations=function(){var e=this;this._sections=[],this._articles=new l.To;var t,n,o=0;d.A.sections().filter((function(e){return!(0,r.isEmpty)(e.Pages)})).forEach((function(a){var s=a.SectionName||t||a.Pages[0].PageName||a.Pages[0].PageNumber.toString();t!==s&&((0,r.isEmpty)(n)||e._addSection(o++,t,n),t=s,n=[]),n=n.concat.apply(n,(0,i.fX)([],(0,i.zs)((0,r.chain)(a.Pages).map((function(t){return e._pages[t.PageNumber]})).compact().map((function(e){return e.articles})).value()),!1))})),(0,r.isEmpty)(n)||this._addSection(o++,t,n),this._articles.head().prev(null),this._articles.tail().next(null)},e.prototype.isEmpty=function(){return this._loaded||this.load(),!!this._articles&&this._articles.isEmpty()},e.prototype.translate=function(e,t,n){this._onlineLoader.getArticles([e.Id],t).then((function(e){n(e)}))},e.prototype.getArticleById=function(e){return this._loaded||this.load(),this._loaded&&this._map?this._map[e]:null},e.prototype.getFirstArticle=function(e){if(void 0===e&&(e=1),this._loaded||this.load(),!this._loaded)return null;for(var t=d.A.pages().length,n=e;n<=t;++n)if(n in this._pages&&!(0,r.isEmpty)(this._pages[n].articles))return this._pages[n].articles[0];for(n=e-1;n>0;--n)if(n in this._pages&&!(0,r.isEmpty)(this._pages[n].articles))return this._pages[n].articles[0];return S.A.log('Article for page "'.concat(e,'" was not found')),null},e.prototype.getCurrentLastArticle=function(){if(this._loaded||this.load(),!this._loaded||!this._pages)return null;for(var e=d.A.pages().length;e>0;--e)if(e in this._pages&&!(0,r.isEmpty)(this._pages[e].articles))return(0,r.last)(this._pages[e].articles);return null},e.prototype.section=function(e){if(this._loaded||this.load(),!this._loaded||!this._sections)return null;var t=this._sections[e];return t?(t.ready()||this._loadSection(t),t):null},e.prototype.removeArticle=function(e){e.loaded(!1).provider(null),e.Page.remove(e),e.Section.remove(e),e.group(null),delete this._map[e.Id],this._articles&&this._articles.detach(e),e.dispose()},Object.defineProperty(e,"offlineLoader",{set:function(e){E=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offlineLoader",{get:function(){return this._offlineLoader||E},set:function(e){this._offlineLoader=e},enumerable:!1,configurable:!0}),e.prototype.bind=function(){for(var e=this,t=[],n=0;n0&&(n.PageN2=p(e,n.ProfileId,n.PageN2));return t}(n.Pages,t.Pages),i.nd.viewer.views.getActiveViewName()==o.lP.Profile&&function(e,t,n){e=e||[];for(var i=0;i0&&n.push(t.ProfileId+"_"+t.PageN2);return n}function p(e,t,n){for(var i=e.length;i--;)if(e[i].ProfileId===t&&e[i].PageN===n)return e[i];return n}return t.setParams=function(t){e=t},t}(),i.nd.data.loaders.online.topNewsFeed=function(){var e={},t=!1,n=null;e.load=function(e,i,o,a,s){return void 0===e&&(void 0===i||i>0)?function(e,i){var o=40*(e||1);if(!e){var a=r.get(o);if(a)return Promise.resolve({items:a})}var s={maxItems:o,cleaned:w,reset:t};i&&i.length&&(s.pendingHistory=i);var u=y.A.currentLanguage();if(u){var c=y.A.auto.exceptions();c&&c.length&&(s.lngExceptions=c.join(",")),s.language=u}return n&&(s.injectedArticleId=n,n=null),(s.pendingHistory?m.A.post("TopNewsFeed","GetFeed",JSON.stringify(s),{contentType:"application/json"}):m.A.get("TopNewsFeed","GetFeed",s)).then((function(e){return t=!1,w=!0,{items:r.put(e),rightToken:e&&e.length?void 0:null}}),(function(e){throw r.put(null),e}))}(o,s):function(e,t,n){var i=40;return n>40&&(i=n),m.A.get("TopNewsFeed","GetHistory",{token:e||"",dir:t,maxItems:i,cleaned:w}).then((function(e){return{items:e.Items,leftToken:e.MinToken,rightToken:e.MaxToken}}))}(e,i,a)},e.setResetFlag=function(e){t=e};var r={_items:null,_expired:null,_enable:!1,enable:function(){return this._enable},clear:function(){this._items=null},isExpired:function(){return this._expired<(new Date).getTime()&&(this._items=null,!0)},get:function(e){return this._items&&!this.isExpired()&&this._items.length>e/2?this._items:null},put:function(e,t){if(e&&this._items&&this._items.length){for(var n={},i=0;i=0;--n)r[n].Id in t?o++:o>0&&(i=n+1,r.splice(i,o),o=0);o>0?r.splice(0,o):i&&r.splice(0,i)}}};return i.nd.event.global.bind("uploadingArticlesHistory",(function(e,t){r.onArticlesRead(t)})),i.nd.user.onUserStateChanged((function(){r.clear()})),i.nd.event.global.bind("textviewCleared",(function(){r.clear()})),e.inject=function(e){r.clear(),r.put(e,!0),y.A.bind("currentLanguageChanged",(function e(){y.A.unbind("currentLanguageChanged",e),r.clear()}))},e.injectArticle=function(e){n=e},e}(),i.nd.data.loaders.online.votes=function(){var e,t,n,i={load:function(i,r){var o=(i=i||0)+(i>-1?1:-1),a={vote:e.vote,startItem:o,pageSize:20};return m.A.get("social","GetVotedArticles",a).then((function(e){var r=[],o=e.Items;if(o)for(var a=0;a0,s=!i||i.length<20;return a?r(i,t||null,s?null:o):r(i,s?null:o,t)}))},n.setSearchParams=function(n){e=n,t=!0},n.getSearchParams=function(){return e},n.onSearch=function(e){i(n).on("onsearch",e)},n.offSearch=function(e){i(n).off("onsearch",e)},n}(),i.nd.data.loaders.online.similar=function(){var e,t,n,i={load:function(i,r){i=i||0;var o=r&&r<0?i-20:i;o<0&&(o=0);var a={offset:o,limit:20};return m.A.get("articles/"+e.similarArticleId,"similars",a).then((function(i){var r=i.Items||[];return 0===o&&(e.similarArticlesCount=i.Meta.TotalCount),n=(t=o)+r.length,{items:r,leftToken:t<=0?null:t,rightToken:r?n:null}}))},setSearchParams:function(t){e=t}};return i}(),i.nd.data.loaders.online.categories=function(){var e,t,n,i={load:function(i,r){var o=(i=i||0)+(i<0?-1:0);if(!e.category)return Promise.reject();var a={category:e.category,locale:e.locale,showSame:e.showSame,skip:o,maxItems:40};return m.A.get("TopNewsFeed","GetCategoryFeed",a).then((function(r){var a=r||[];return 0==o&&a.unshift({Id:"categoriesBar",Type:u.p.leftBar,params:e.categoriesBarParams}),n=i+40,{items:a,leftToken:(t=i-40)<0?null:t,rightToken:!a||a.length<40?null:n}}))},setSearchParams:function(t){e=t},getSearchParams:function(){return e}};return i}(),i.nd.data.loaders.online.externalItems=function(){var e,t={load:function(t,n,i){t=t||"";var r={issueId:e&&e.issueId||0,token:t};return m.A.get("ExternalArticles","GetArticles",r).then((function(e){var i=e.Articles,o=e.Token,a=void 0===n||n>0,s=!i||i.length<20;return a?{items:i,leftToken:t?void 0:null,rightToken:s?null:o}:{items:i,leftToken:s?null:o,rightToken:r.token}}))},setSearchParams:function(t){e=t}};return t}(),i.nd.data.loaders.online.profile=function(){var e,t={load:function(t,n){var i={direction:n||1,token:t=t||0,pageSize:20};return e.bookmarkId&&(i.bookmarkId=e.bookmarkId),m.A.get("social","profiles/"+e.profileId+"/feed",i).then((function(n){var r=n.FeedItems||[];0==t&&r.unshift({Id:"profileBlock",Type:u.p.profile,params:e,Data:e.profileId});for(var o=0;o0?r.length?n.Token:null:t,accessToken:n.AccessToken,anchorId:n.AnchorId}}))},setSearchParams:function(t){e=t}};return t}();var C=i.nd.data.loaders.online,A=C.getArticle,I=C.articleitems,S=(C.topNewsFeed,C.votes),P=C.monitors,x=C.similar,T=(C.categories,C.externalItems,C.profile),k=C},51175:function(e,t,n){"use strict";n.d(t,{Yd:function(){return g}});var i=n(29583),r=n(13302),o=n(31572),a=n(55383),s=(n(96723),n(97433)),u=function(e){var t,n,i=!1;function r(){t&&(e.apply(n,t),t=null,n=null)}function o(){i=!1,r()}function a(){n=this,t=arguments,i||(i=!0,window.requestAnimationFrame(o))}return a._flush=function(){r()},a},c={},l={},d={};!function(){var e=function(e){return function(t){if(!a.Ay.isVisible)for(var n in e)"function"==typeof e[n]&&e[n](t)}};i(document).keyup(e(c));var t=e(l),n=e(d);i.browser.msie?(i(document).keydown(t),i(document).keydown(n),i("body").click((function(){var e=i(document.activeElement);e.is(":input")||e.attr("contenteditable")||i(this).focus()}))):(i(document).keypress(t),i(document).keydown(n))}();var h,f=(h={},{add:function(e,t){for(var n=t.changedTouches,i=0;i4&&(this._longPressTimeoutID&&(clearTimeout(this._longPressTimeoutID),this._longPressTimeoutID=0),this._unhighlight(!0)),this._longPressTimeoutID||(this._tap&&(this._onSingleTapConfirmed(),this._tap=null,this._onGesturesEnd(),this._onGesturesStart()),this._onScroll(t))}return!((!i(e.target).data||!i(e.target).data("allow-move-default"))&&("touchend"!==e.type||!i(e.target).data||!i(e.target).data("allow-default"))&&!i.browser.android&&(e.preventDefault(),1))}},_touchEnd:function(e){return f.remove(e),i(e.target).data&&i(e.target).data("allow-default")},_manualTouchEnd:function(e){if(this._touchMove(e),T.init(e),this._touches){this._updateTouches(e);var t=this._touchesCount-e.changedTouches.length;if(this._unhighlight(),2==t){this._removeTouches(e.changedTouches);var n=this.touches();this._pinch=new C(n[0],n[1]),this._onPinch()}else this._pinch&&(this._pinch=null),t?this._removeTouches(e.changedTouches):(i(document).off(p(this,"touchmove","touchend","mousemove","mouseup","MSPointerMove","pointermove","MSPointerUp","pointerup","MSPointerCancel","pointercancel")),this._longPressTimeoutID?(clearTimeout(this._longPressTimeoutID),this._longPressTimeoutID=0,this._onSingleTap(),this._tap?(this._onDoubleTap(),this._unhighlight(!0),this._tap=null):(this._tap=this.touches()[0],this._setDoubleTapTimeout(e))):1==this._touchesCount&&this._onFling(this.touches()[0]),this._touches=null,this._touchesCount=0,this._tap||this._onGesturesEnd());return!(!i(e.target).data||!i(e.target).data("allow-default"))||(e.preventDefault(),!1)}},_keyUp:function(e){this._onKeyUp(e)},_keyPress:function(e){this._onKeyPress(e)},_keyDown:function(e){this._onKeyDown(e)},_mouseDown:function(e){i(document).on(p(this,"mousemove"),this._mouseMove.bind(this)).on(p(this,"mouseup"),this._mouseUp.bind(this)),e.touches=e.changedTouches=[{clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY,pageX:e.pageX,pageY:e.pageY,target:e.target,button:e.which-1,identifier:0}],this._start(e)},_mouseMove:function(e){1==e.which?(e.touches=e.changedTouches=[{clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY,pageX:e.pageX,pageY:e.pageY,target:e.target,button:e.which-1,identifier:0}],this._touchMove(e)):this._mouseUp(e)},_mouseUp:function(e){e.touches=e.changedTouches=[{clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY,pageX:e.pageX,pageY:e.pageY,target:e.target,button:e.which-1,identifier:0}],this._touchEnd(e)},_mouseDoubleClick:function(e){T.init(e),e.touches=e.changedTouches=[{clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY,pageX:e.pageX,pageY:e.pageY,target:e.target,button:0,identifier:0}],this._touches?this._updateTouches(e):(this._touches={},this._addTouches(e)),this._tap=this.touches()[0],this._onDoubleTap(),this._tap=null,this._longPressTimeoutID&&(clearTimeout(this._longPressTimeoutID),this._longPressTimeoutID=0),this._doubleTapTimeoutID&&(clearTimeout(this._doubleTapTimeoutID),this._doubleTapTimeoutID=0),this._touches=null,this._touchesCount=0},_msPointerDown:function(e){this._touches||i(document).on(p(this,"MSPointerMove","pointermove"),this._msPointerMove.bind(this)).on(p(this,"MSPointerUp","MSPointerCancel","pointerup","pointercancel"),this._msPointerUp.bind(this)),e.changedTouches=[e.originalEvent],e.originalEvent.identifier=e.originalEvent.pointerId,this._start(e)&&i(e.target).data&&i(e.target).data("ms-pointer-down-allow-default")||e.originalEvent.preventDefault()},_msPointerMove:function(e){e.changedTouches=[e.originalEvent],e.originalEvent.identifier=e.originalEvent.pointerId,this._touchMove(e)||e.originalEvent.preventDefault()},_msPointerUp:function(e){e.changedTouches=[e.originalEvent],e.originalEvent.identifier=e.originalEvent.pointerId,this._touchEnd(e)||e.originalEvent.preventDefault()},_validateTouches:function(e){if(this._touches&&e.touches){for(var t=e.touches,n={},i=0,r=0;r=500&&this._onLongPressTimeout(),this._doubleTapTimeoutID&&t-this._doubleTapTimeStamp>=200&&this._onDoubleTapTimeout()},_setLongPressTimeout:function(e){this._longPressTimeoutID&&window.clearTimeout(this._longPressTimeoutID),this._longPressTimeoutID=setTimeout(this._longPressTimeoutHandler,500),this._longPressTimeStamp=e.timeStamp||i.nd.now()},_longPressTimeoutHandler:null,_onLongPressTimeout:function(){this._longPressTimeoutID&&(clearTimeout(this._longPressTimeoutID),this._longPressTimeoutID=0,this._unhighlight(!0),this._tap&&(this._onSingleTapConfirmed(),this._tap=null,this._onGesturesEnd(),this._onGesturesStart()),this._onLongPress())},_setDoubleTapTimeout:function(e){this._doubleTapTimeoutID&&window.clearTimeout(this._doubleTapTimeoutID),this._doubleTapTimeoutID=setTimeout(this._doubleTapTimeoutHandler,200),this._doubleTapTimeStamp=e&&e.timeStamp||(new Date).getTime()},_doubleTapTimeoutHandler:null,_onDoubleTapTimeout:function(){this._doubleTapTimeoutID&&(clearTimeout(this._doubleTapTimeoutID),this._doubleTapTimeoutID=0,this._onSingleTapConfirmed(),this._tap=null,this._onGesturesEnd())},_onGesturesStart:function(){this._gesturesStartListener&&this._gesturesStartListener.fire()},_onKeyUp:function(e){this._keyUpListener&&this._keyUpListener.fire(e)},_onKeyPress:function(e){this._keyPressListener&&this._keyPressListener.fire(e)},_onKeyDown:function(e){this._keyDownListener&&this._keyDownListener.fire(e)},_onScroll:function(e){this._scrollListener&&(e.button()||this._scrollListener.fire(e._consume()))},_onSingleTap:function(){if(this._singleTapListener){var e=this.touches()[0];e.button()||this._singleTapListener.fire(e)}},_onSingleTapConfirmed:function(){var e=this._tap.button();if(e){if(2==e){if(!this._contextMenuListener)return;this._contextMenuListener.fire(this._tap)}}else{if(!this._singleTapConfirmedListener)return;this._singleTapConfirmedListener.fire(this._tap)}},_onDoubleTap:function(){this._doubleTapListener&&!this._tap.button()&&this._doubleTapListener.fire(this._tap)},_onFling:function(e){this._flingListener&&(e.button()||this._flingListener.fire(e._consume()))},_onPinch:function(){this._pinchListener&&this._pinch&&this._pinchListener.fire(this._pinch)},_onLongPress:function(){if(this._longPressListener||this._contextMenuListener){var e=this.touches()[0];e.button()||(this._longPressListener&&this._longPressListener.fire(e),this._contextMenuListener&&this._contextMenuListener.fire(e))}},_onGesturesEnd:function(){this._gesturesEndListener&&this._gesturesEndListener.fire()},_reset:function(){this._longPressTimeoutID&&(clearTimeout(this._longPressTimeoutID),this._longPressTimeoutID=0),this._doubleTapTimeoutID&&(clearTimeout(this._doubleTapTimeoutID),this._doubleTapTimeoutID=0),this._touches=null,this._touchesCount=0,this._pinch=null,this._tap=null},dispose:function(){this._elm.off("."+this._namespace),delete this._elm,i(document).off("."+this._namespace);for(var e=["_scrollListener","_keyUpListener","_keyPressListener","_keyDownListener","_singleTapListener","_singleTapConfirmedListener","_doubleTapListener","_flingListener","_pinchListener","_longPressListener","_gesturesStartListener","_gesturesEndListener"],t=0;t=n);)this._head=r=r.next},velocity:function(){if(!this._head)return{vx:0,vy:0};for(var e=this._head,t=0,n=0,i=0;e;)t+=e.dx,n+=e.dy,i+=e.dt,e=e.next;return{vx:i?t/i:0,vy:i?n/i:0}}};var b=function(e,t,n){this._elm=e,this._id=this.identifier=t.identifier,this._origin={x:t.pageX,y:t.pageY},this._prevPosition=this._position={x:t.pageX,y:t.pageY},this._event=n,this._events=[n],this._startTime=n&&n.timeStamp?n.timeStamp:i.nd.now(),this._vtracker=new _(this._startTime),this._target=t.target,t.button&&(this._button=t.button)};b.prototype={_id:0,_origin:null,_position:null,_prevPosition:null,_vtracker:null,_startTime:0,_dx:0,_dy:0,_target:null,_event:null,_elm:null,_button:0,identifier:null,clone:function(){return new w(this)},_consume:function(){var e=this.clone();return this._prevPosition&&this._prevPosition!==this._position&&(e._dx=this._position.x-this._prevPosition.x,e._dy=this._position.y-this._prevPosition.y),this._prevPosition=this._position,e},update:function(e,t){var n={x:t.pageX,y:t.pageY};this._dx=n.x-this._position.x,this._dy=n.y-this._position.y,this._events.push(e),this._lastEvent=e;var r=e&&e.timeStamp?e.timeStamp:i.nd.now();this._vtracker.update(this._dx,this._dy,r),this._position=n},distance:function(){var e=this._position.x-this._origin.x,t=this._position.y-this._origin.y;return Math.sqrt(e*e+t*t)},stop:function(){},dx:function(){return this._dx},dy:function(){return this._dy},totalDx:function(){return this._position.x-this._origin.x},totalDy:function(){return this._position.y-this._origin.y},position:function(){return{x:this._position.x,y:this._position.y}},origin:function(){return{x:this._origin.x,y:this._origin.y}},velocity:function(){return this._vtracker.velocity()},target:function(){return this._target},event:function(e){return arguments.length?(this._event=e,this):this._event},lastEvent:function(){return this._lastEvent},element:function(){return this._elm},button:function(){return this._button}};var w=function(e){r.assign(this,e)};w.prototype=r.create(b.prototype,{constructor:w});var C=function(e,t){this._touch1=e,this._touch2=t,this._origin=this.center(),this._distance=this.distance()};C.prototype={_touch1:null,_touch2:null,_origin:null,_distance:0,origin:function(){return{x:this._origin.x,y:this._origin.y}},center:function(){return{x:(this._touch1._position.x+this._touch2._position.x)/2,y:(this._touch1._position.y+this._touch2._position.y)/2}},scale:function(){return this.distance()/this._distance},distance:function(){var e=this._touch2._position.x-this._touch1._position.x,t=this._touch2._position.y-this._touch1._position.y;return Math.sqrt(e*e+t*t)}};var A=function(e){this._name=e};function I(e){this._elm=e,this._highlightTimeoutID=setTimeout(this._highlight.bind(this),I._highlightThreshold)}A.prototype={_name:null,_list:null,count:function(){return this._list?this._list.length:0},add:function(e){return this._list?this.contains(e)||this._list.push(e):this._list=[e],this},contains:function(e){if(!this._list)return!1;for(var t=this._list.length,n=0;n0&&e.Width>0){var i=100*t/e.Width;return Math.min(i,n)}return 0}function t(e,t,n){if(t>0&&e.Height>0){var i=100*t/e.Height;return Math.min(i,n)}return 0}return a.nd.imageSource={getPictureUrlByIssueForWidth:function(e,t,n,i,r){var o=Math.floor(100*r/i);return this.getPictureUrlByIssueForScale(e,t,n,o)},getPictureUrlByIssueForHeight:function(e,t,n,i,r){var o=Math.floor(100*r/i);return this.getPictureUrlByIssueForScale(e,t,n,o)},getPictureUrlByIssueForSize:function(e,t,n,i,r){var o=i.width||i.Width,a=r.width||r.Width,s=i.height||i.Height,u=r.height||r.Height,c=Math.floor(100*a/o),l=Math.floor(100*u/s);return this.getPictureUrlByIssueForScale(e,t,n,Math.min(c,l))},getPictureUrlByIssueForScale:function(e,t,n,i,o){return e.issue&&(e=e.issue),r.A.getPictureUrlByIssueForScale(e,t,n,i,o)},getThumbUrlByIssueForWidth:function(e,t,n,i){return e.issue&&(e=e.issue),r.A.getThumbUrlByIssueForWidth(e,t,n,i)},getFirstPageThumbUrlByIssueForWidth:function(e,t,n,i){return e.issue&&(e=e.issue),r.A.getFirstPageThumbUrlByIssueForWidth(e,t,n,i)},getThumbUrlByIssueForHeight:function(e,t,n,i){return e&&e.issue&&(e=e.issue),r.A.getThumbUrlByIssueForHeight(e,t,n,i)},getThumbUrlByCidForHeight:function(e,t){return(0,i.sH)(this,void 0,void 0,(function(){var n=this;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return e?[4,(0,o.jW)(e).then((function(e){return n.getThumbUrlByIssueForHeight(e.latestIssue.key,t)}))]:[3,2];case 1:return[2,i.sent()];case 2:return[2,null]}}))}))},getThumbUrlForLandingPage:function(e,t){return"".concat(this.getThumbUrlByCidForHeight(e,t),"&timestamp=").concat(+new Date)},getThumbUrlByCidAndDateForHeight:function(e,t,n,i){return r.A.getThumbUrlByCidAndDateForHeight(e,t,n,1,i)},getThumbUrlByCidAndDateForWidth:function(e,t,n,i){return r.A.getThumbUrlByCidAndDateForWidth(e,t,n,i)},getThumbUrlForScale:function(e,t,n,i){return r.A.getThumbUrlForScale(e,t,n,i)},getPageImageUrlByPageInfo:function(e,t,n){return this.getPageImageUrl(e,t.pageNumber,t,n)},getPageImageUrl:function(e,t,n,i,o){return r.A.getPageImageUrl(e,t,n,i,o)},getPageImageScale:function(e,t,n){return r.A.getPageImageScale(e,t,n)},getThumbUrlByRegionKey:function(e,t,n,i){return r.A.getThumbUrlByRegionKey(e,t,n,i)},getFirstImage:function(n){var i=null;if(n)for(var r=0;r10||o.Width/o.Height>10)){var a=o.Width/o.Height;if(a>.7&&a<2){var s=e(o,600,400),u=t(o,120,400);if(s<=0||u<=0)continue;if(null==i){i=o;continue}if(o.Width>i.Width||o.Height>i.Height){i=o;continue}}}}return i}}}()},38123:function(e,t,n){"use strict";var i=n(27189),r=n(13302),o=n(29583),a=(0,r.memoize)((function(e,t){var n=(0,r.uniq)((0,r.map)([].concat(e,t),(function(e){return e.w})));return(0,r.sortBy)(n,(function(e,t){return e>t}))}));t.A={_getThumbUrl:function(){return(i.A.get("imageServers.thumbs")||[])[0]},getThumbUrlByRegionKey:function(e,t,n,i){var r=this._getThumbUrl();return r?r+"?regionKey="+e+"&file="+t+"&scale="+n+(i?"&ver="+i:""):null},getThumbUrlByCidForHeight:function(e,t,n){var i=this._getThumbUrl();return i?i+"?cid="+e+"&page="+(n||1)+"&height="+t:null},getThumbUrlByCidAndDateForHeight:function(e,t,n,i,r){var a=this._getThumbUrl();if(!a)return null;if("string"!=typeof t){var s=t.getMonth()+1,u=t.getDate();t=t.getFullYear()+(s<10?"0":"")+s+(u<10?"0":"")+u}return r&&o.support.retina&&(n*=2,n+="&retina=2"),a+"?cid="+e+"&date="+t+"&page="+(i||1)+"&height="+n},getThumbUrlByCidAndDateForWidth:function(e,t,n,i){var r=this._getThumbUrl();if(!r)return null;if("string"!=typeof t){var o=t.getMonth()+1,a=t.getDate();t=t.getFullYear()+(o<10?"0":"")+o+(a<10?"0":"")+a}return r+"?cid="+e+"&date="+t+"&page="+(i||1)+"&width="+(n||160)},getThumbUrlByIssueForWidth:function(e,t,n,i){var r=this._getThumbUrl();if(!r)return null;var a="";return t=parseInt(t,10)||160,i&&o.support.retina&&(t*=2,a="&retina=2"),r+"?file="+e+"&page="+(n||1)+"&width="+(t=this._adjustPageImageWidth(t))+a},getFirstPageThumbUrlByIssueForWidth:function(e,t,n,i){var r=this._getThumbUrl();if(!r)return null;var a="";return t=parseInt(t,10)||160,i&&o.support.retina&&(t*=2,a="&retina=2"),r+"?file="+e+"&page="+(n||1)+"&width="+(t=this._adjustFirstPageImageWidth(t))+a},getThumbUrlByIssueForHeight:function(e,t,n,i){var r=this._getThumbUrl();if(!r)return null;var a="";return t=parseInt(t,10),i&&o.support.retina&&(t*=2,a="&retina=2"),r+"?file="+e+"&page="+(n||1)+"&height="+(t=this._adjustPageImageHeight(t))+a},getThumbUrlForScale:function(e,t,n,i){var r=this._getThumbUrl();return r?r+"?file="+e+"&page="+(n||1)+"&scale="+t+(i?"&ver="+i:""):null},getPictureUrlByIssueForScale:function(e,t,n,i,r){var o=this._getThumbUrl();return o?o+"?regionguid="+t+"&scale="+i+"&file="+e+"&regionKey="+n+(r?"&ver="+r:""):null},getPageImageUrl:function(e,t,n,r,o){var a=this._calculateZoom(t,n,r.width,r.height);if(!a)return null;var s=(i.A.get("imageServers.pages")||[])[0];return s?s+"?file="+e+"&page="+t+"&scale="+a+(o?"&layer="+o:""):null},getPageImageScale:function(e,t,n){return this._calculateZoom(e,t,n.width,n.height)},_calculateZoom:function(e,t,n,r){var o=t.width/100,a=t.height/100;if(n&&n>0)var s=Math.floor(n/o);if(r&&r>0)var u=Math.floor(r/a);var c=i.A.get("pageSizes.pageSizes")||[],l=i.A.get("pageSizes.firstPageSizes")||[],d=[c];1==e&&d.push(l);var h=0;if(s)for(var f=0;f=0;p--)!(_=g[p].w)||_>n||(y=Math.floor(_/o))>s||(v=g[p].h)&&(y=Math.min(y,Math.floor(v/a)))>s||(h=Math.max(h,y));var m=0;if(u)for(f=0;f=0;p--){var v,y,_;!(v=g[p].h)||v>r||(y=Math.floor(v/a))>u||(_=g[p].w)&&(y=Math.min(y,Math.floor(_/o)))>u||(m=Math.max(m,y))}}return Math.min(h||m,m||h)},_adjustPageImageWidth:function(e){var t=e,n=(i.A.get("pageSizes.pageSizes")||[]).filter((function(e){return e.w>0}));if(!(0,r.isEmpty)(n)){var o=(0,r.find)(n,(function(t){return t.w>e}));t=o?o.w:(0,r.last)(n).w}return t},_adjustFirstPageImageWidth:function(e){var t=e,n=i.A.get("pageSizes.pageSizes")||[],o=i.A.get("pageSizes.firstPageSizes")||[],s=a(n,o);(0,r.isEmpty)(s)||(t=(0,r.find)(s,(function(t){return t>e}))||(0,r.last)(s));return t},_adjustPageImageHeight:function(e){var t=e,n=(i.A.get("pageSizes.pageSizes")||[]).filter((function(e){return e.h>0}));if(!(0,r.isEmpty)(n)){var o=(0,r.find)(n,(function(t){return t.h>e}));t=o?o.h:(0,r.last)(n).h}return t}}},60798:function(e,t,n){"use strict";var i,r,o,a,s,u=n(29583),c=n(13302),l=n(72167),d=n(95853),h=n(96543),f=n(67303),p=n(64936),m="calendar-updated",g={};function v(e,t){return i&&(a==e&&!t||"pending"===i.state())||(i=new p.c,a=e,r.load(e).then((function(t){a===e&&(t&&(o=t,s=y(t.Years)),i&&i.resolve(t),h.A.trigger(m,g,t))})).catch(i.reject)),i.promise()}function y(e,t){var n=[];for(var i in e){if(isNaN(i))return[t];n=y(e[i],(t||"")+(0,c.padStart)(i,2,"0")).concat(n)}return n}l.default.onBeforeAccountChanged.subscribe((function(){i=void 0})),g=u.extend(g,{setProvider:function(e){return r=e,this},loaded:function(){return i||Promise.reject()},getData:function(){return o},getIssuesDates:function(){return s},load:v,calendarUpdatedEvent:m}),u.nd.viewer.pages.loadedChange((function(e){e&&e.value&&f.A&&g.load(f.A.cid())})),h.A.bind(d.default,"stateChanged",(function(){v(f.A.cid(),!0)})),u.nd.issuesCalendar=g,t.A=g},40965:function(e,t,n){"use strict";var i=n(55768);t.A=i.s},10079:function(e,t,n){"use strict";n(29583);var i,r=n(12010),o=n(44260),a=n(29583),s={};!function(e,t){t.required=function(e){if("boolean"!=typeof e&&"string"!=typeof e&&!r.isObservable(e))throw new TypeError("true/false or validation message are valid options for required.");return{validate:function(t){if(!("boolean"==typeof e?e:!r.isObservable(e)||e()))return!0;var n=t;return null!=t&&("string"==typeof t&&(n=t.replace(/^\s+|\s+$/g,"")),(n+"").length>0)},message:"string"==typeof e?e:o.Ay.val("Accounting.Validation.Client.RequiredField","This field is required.")}}}(0,s),function(e){e.minLength=function(e){var t,n;if("object"===a.type(e)?(t=e.val,n=e.message):n="A value greater than or equal to "+(t=parseInt(e,10))+" is required.",isNaN(t))throw new TypeError("An integer is required for minLength.");return{validate:function(e){if(null==e)return!1;if("string"!=typeof e)throw new TypeError("A string is required to the minLength validation.");return e.length>=t},message:n}}}(s),function(e){e.email=function(e){if("boolean"!=typeof e&&"string"!=typeof e)throw new TypeError("true/false or validation message are valid options for email validator.");var t=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,n="boolean"!=typeof e||e;return{validate:function(e){return!n||""===e||null==e||t.test(e)},message:"string"==typeof e?e:"A valid Email is required."}}}(s),function(e,t){e.emailList=function(e){if("object"!=typeof e)throw new TypeError("configuration object is only valid option for email list validator.");var n=e.delimiters;if(!n)throw new TypeError("Delimiters option is required for email list validator.");n="["+n.replace(" ","\\s")+"]+";var i=e.message||"Please specify a list of valid EMail addresses separated by space, comma or semicolon.",r=new RegExp(n);return{validate:function(e){if(!e)return!0;for(var n=e.split(r),i=0,o=n.length;i0&&alert(t)}},o.nd.logger.log=o.writeLog=o.log=function(e){var t=(0,i.Ct)("ui.logging.log",!1);if(!o.isDebug&&!t)return o.noop;for(var n=function(e){return t=e,void(console&&console.log(t));var t},r=0;r0&&(jquery__WEBPACK_IMPORTED_MODULE_0__.nd.event.one(t,"loaded",n,i),e&&jquery__WEBPACK_IMPORTED_MODULE_0__.nd.event.trigger("loaded",t,t)),r.promise()}_loader.bind((function(n,i){i&&i.res&&(e=jquery__WEBPACK_IMPORTED_MODULE_0__.extend({},nd_res_static__WEBPACK_IMPORTED_MODULE_1__.A.getResources(),i.res),jquery__WEBPACK_IMPORTED_MODULE_0__.nd.event.trigger("loaded",t,t),a(),r.resolve(t))})),jquery__WEBPACK_IMPORTED_MODULE_0__((function(){n=!0,a()}));var l="d MMM yyyy",d={};return t={val:s,valAsync:u,get:s,getVal:s,getSafeRTLString:function(e,n){if(i[e])return i[e];var r=t.getVal(e);return r?(i[e]=t.embedRTL(r),i[e]):n},loaded:c,isLoaded:function(){return!!e},getItems:function(){return e},format:function(){if(0===arguments.length)return"";var e=s(arguments[0]);return _pressreader_utils__WEBPACK_IMPORTED_MODULE_8__.GP.apply(null,[e].concat(Array.prototype.slice.call(arguments,1)))},formatAsync:function(e,t){if(!e)return Promise.reject(new Error("resname is empty"));var n=Array.prototype.slice.call(arguments,2);return u(e,t).then((function(e){return _pressreader_utils__WEBPACK_IMPORTED_MODULE_8__.GP.apply(null,[e].concat(n))}))},format2:function(){var e=arguments;if(e.length>0){var t=this.getVal(e[0]);if(!jquery__WEBPACK_IMPORTED_MODULE_0__.nd.isEmpty(t))for(var n=1;n0&&(jquery__WEBPACK_IMPORTED_MODULE_0__.nd.event.one(_api,"loaded",e,t),_items&&jquery__WEBPACK_IMPORTED_MODULE_0__.nd.event.trigger("loaded",_api,_api)),_loaded.promise()}function isLoaded(){return!!_items}function getTemplate(e){return _items?_items[e]:null}function getTemplateAsync(e){return loaded().then((function(){return getTemplate(e)}))}function process(e,t){var n=getTemplate(e);return n?n.process(t,window):""}function renderTo(e,t,n){var i=getTemplate(e);return i&&i.renderTo(t,n),this}function appendTo(e,t,n){var i=getTemplate(e);return i&&i.appendTo(t,n),this}function prependTo(e,t,n){var i=getTemplate(e);return i&&i.prependTo(t,n),this}_loader.bind((function(e,t){if(t&&t.templates){var n=[],i=t.templates;for(var r in i){var o=i[r];r&&o&&(n[r]=new JSTemplate(r,o))}_items=n,jquery__WEBPACK_IMPORTED_MODULE_0__.nd.event.trigger("loaded",_api,_api),_loaded.resolve(_api)}}));var _stack=[],_buffer,_win;function pushContext(e){_buffer||(_buffer=[]),_stack.push(e)}function popContext(){if(_stack.length){var e=_stack.pop();if(e)for(var t in e)e[t]=null}_stack.length||(_buffer=null,_win=null)}function write(e){_buffer||(_buffer=[]),_buffer.push(e)}function writeRes(e,t){return write(res.val(e,t))}function execTemplate(e,t){var n=getTemplate(e);n&&processImp(n,_win,t,_stack[_stack.length])}function makeFun(name,funBody){try{if(funBody="var write = __w;"+funBody,jquery__WEBPACK_IMPORTED_MODULE_0__.isDebug){var funName="nd_templates_"+name.replace(/\./gi,"_");return funBody=funName+" = function(window,context,__w,__t, __r){"+funBody+"}",eval(funBody)||window[funName]}return new Function("window","context","__w","__t","__r",funBody)}catch(e){jquery__WEBPACK_IMPORTED_MODULE_0__.showError("Unable to parse template '"+name+"'",e)}return null}function processImp(e,t,n,i){var r={result:""};if(!e)return r;if(!e._process&&e._funBody&&(e._process=makeFun(e._name,e._funBody)),!e._process)return r;var o={data:n,template:e,_parent:i,write:write,render:i?i.render:jquery__WEBPACK_IMPORTED_MODULE_0__.nd.delegate(!0)},a=!1;pushContext(o);try{e._process(_win,o,write,execTemplate,writeRes),a=!0}catch(t){if(!jquery__WEBPACK_IMPORTED_MODULE_0__.isDebug)throw t;jquery__WEBPACK_IMPORTED_MODULE_0__.showError("Unable to execute template '"+e._name+"'",t)}return o.onrender&&o.render(o.onrender),a&&!i&&_buffer&&(r.result=_buffer.join(""),r.render=o.render),popContext(),r}function renderToImp(e,t,n){var i=processImp(e,window,t);n.html(i.result||""),i.render&&("undefined"!=typeof ko&&n.length&&ko.safeCleanNode(n[0]),i.render(n))}function appendToImp(e,t,n){var i=processImp(e,window,t);n.append(i.result||""),i.render&&i.render(n)}function prependToImp(e,t,n){var i=processImp(e,window,t);n.prepend(i.result||""),i.render&&i.render(n)}function JSTemplate(e,t){this._name=e,this._funBody=t}return JSTemplate.prototype={name:function(){return this._name},process:function(e,t){return _win=t||window,processImp(this,t,e).result},renderTo:function(e,t){return renderToImp(this,e,t),this},appendTo:function(e,t){return appendToImp(this,e,t),this},prependTo:function(e,t){return prependToImp(this,e,t),this}},_api={loaded:loaded,isLoaded:isLoaded,process:process,renderTo:renderTo,appendTo:appendTo,prependTo:prependTo,getTemplate:getTemplate,getTemplateAsync:getTemplateAsync},_api}(res);_loader.load();var val=res.val.bind(res),get=res.get.bind(res),format=res.format.bind(res);__webpack_exports__.Ay=res},53159:function(e,t,n){"use strict";var i=n(29583),r=n(27189),o=n(82230),a=(n(44260),i.nd.resLoader.createBaseProvider());a.load=function(){return r.A.loaded().then((function(){var e=r.A.get("res",{}),t={};return t.id=e.id,t.locale=e.locale,t.ts=e.ts,t.version=2,o.A.get("res",t,{useCdn:!0}).then((function(e){a.onload(e)}))}))},i.nd.resLoader.setProvider(a)},66250:function(e,t){"use strict";var n={},i={"Important.Title.aa":"Important ({0})","Important.Title.ab":"Important ({0})","Important.Title.ae":"Important ({0})","Important.Title.af":"Important ({0})","Important.Title.ak":"Important ({0})","Important.Title.am":"Important ({0})","Important.Title.an":"Important ({0})","Important.Title.ar":"Important ({0})","Important.Title.as":"Important ({0})","Important.Title.av":"Important ({0})","Important.Title.ay":"Important ({0})","Important.Title.az":"Important ({0})","Important.Title.ba":"Important ({0})","Important.Title.be":"Important ({0})","Important.Title.bg":"Important ({0})","Important.Title.bh":"Important ({0})","Important.Title.bi":"Important ({0})","Important.Title.bm":"Important ({0})","Important.Title.bn":"Important ({0})","Important.Title.bo":"Important ({0})","Important.Title.br":"Important ({0})","Important.Title.bs":"Important ({0})","Important.Title.ca":"Important ({0})","Important.Title.ce":"Important ({0})","Important.Title.ch":"Important ({0})","Important.Title.co":"Important ({0})","Important.Title.cr":"Important ({0})","Important.Title.cs":"Important ({0})","Important.Title.cu":"Important ({0})","Important.Title.cv":"Important ({0})","Important.Title.cy":"Important ({0})","Important.Title.da":"Important ({0})","Important.Title.de":"Important ({0})","Important.Title.dv":"Important ({0})","Important.Title.dz":"Important ({0})","Important.Title.ee":"Important ({0})","Important.Title.el":"Important ({0})","Important.Title.en":"Important ({0})","Important.Title.eo":"Important ({0})","Important.Title.es":"Important ({0})","Important.Title.et":"Important ({0})","Important.Title.eu":"Important ({0})","Important.Title.fa":"Important ({0})","Important.Title.ff":"Important ({0})","Important.Title.fi":"Important ({0})","Important.Title.fj":"Important ({0})","Important.Title.fo":"Important ({0})","Important.Title.fr":"Important ({0})","Important.Title.fy":"Important ({0})","Important.Title.ga":"Important ({0})","Important.Title.gd":"Important ({0})","Important.Title.gl":"Important ({0})","Important.Title.gn":"Important ({0})","Important.Title.gu":"Important ({0})","Important.Title.gv":"Important ({0})","Important.Title.ha":"Important ({0})","Important.Title.he":"Important ({0})","Important.Title.hi":"Important ({0})","Important.Title.ho":"Important ({0})","Important.Title.hr":"Important ({0})","Important.Title.ht":"Important ({0})","Important.Title.hu":"Important ({0})","Important.Title.hy":"Important ({0})","Important.Title.hz":"Important ({0})","Important.Title.ia":"Important ({0})","Important.Title.id":"Important ({0})","Important.Title.ie":"Important ({0})","Important.Title.ig":"Important ({0})","Important.Title.ii":"Important ({0})","Important.Title.ik":"Important ({0})","Important.Title.io":"Important ({0})","Important.Title.is":"Important ({0})","Important.Title.it":"Important ({0})","Important.Title.iu":"Important ({0})","Important.Title.ja":"Important ({0})","Important.Title.jv":"Important ({0})","Important.Title.jw":"Important ({0})","Important.Title.ka":"Important ({0})","Important.Title.kg":"Important ({0})","Important.Title.ki":"Important ({0})","Important.Title.kj":"Important ({0})","Important.Title.kk":"Important ({0})","Important.Title.kl":"Important ({0})","Important.Title.km":"Important ({0})","Important.Title.kn":"Important ({0})","Important.Title.ko":"Important ({0})","Important.Title.kr":"Important ({0})","Important.Title.ks":"Important ({0})","Important.Title.ku":"Important ({0})","Important.Title.kv":"Important ({0})","Important.Title.kw":"Important ({0})","Important.Title.ky":"Important ({0})","Important.Title.la":"Important ({0})","Important.Title.lb":"Important ({0})","Important.Title.lg":"Important ({0})","Important.Title.li":"Important ({0})","Important.Title.ln":"Important ({0})","Important.Title.lo":"Important ({0})","Important.Title.lt":"Important ({0})","Important.Title.lu":"Important ({0})","Important.Title.lv":"Important ({0})","Important.Title.mg":"Important ({0})","Important.Title.mh":"Important ({0})","Important.Title.mi":"Important ({0})","Important.Title.mk":"Important ({0})","Important.Title.ml":"Important ({0})","Important.Title.mn":"Important ({0})","Important.Title.mo":"Important ({0})","Important.Title.mr":"Important ({0})","Important.Title.ms":"Important ({0})","Important.Title.mt":"Important ({0})","Important.Title.my":"Important ({0})","Important.Title.na":"Important ({0})","Important.Title.nb":"Important ({0})","Important.Title.nd":"Important ({0})","Important.Title.ne":"Important ({0})","Important.Title.ng":"Important ({0})","Important.Title.nl":"Important ({0})","Important.Title.nn":"Important ({0})","Important.Title.no":"Important ({0})","Important.Title.nr":"Important ({0})","Important.Title.nv":"Important ({0})","Important.Title.ny":"Important ({0})","Important.Title.oc":"Important ({0})","Important.Title.oj":"Important ({0})","Important.Title.om":"Important ({0})","Important.Title.or":"Important ({0})","Important.Title.os":"Important ({0})","Important.Title.pa":"Important ({0})","Important.Title.pi":"Important ({0})","Important.Title.pl":"Important ({0})","Important.Title.ps":"Important ({0})","Important.Title.pt":"Important ({0})","Important.Title.qu":"Important ({0})","Important.Title.rm":"Important ({0})","Important.Title.rn":"Important ({0})","Important.Title.ro":"Important ({0})","Important.Title.ru":"Important ({0})","Important.Title.rw":"Important ({0})","Important.Title.ry":"Important ({0})","Important.Title.sa":"Important ({0})","Important.Title.sc":"Important ({0})","Important.Title.sd":"Important ({0})","Important.Title.se":"Important ({0})","Important.Title.sg":"Important ({0})","Important.Title.sh":"Important ({0})","Important.Title.si":"Important ({0})","Important.Title.sk":"Important ({0})","Important.Title.sl":"Important ({0})","Important.Title.sm":"Important ({0})","Important.Title.sn":"Important ({0})","Important.Title.so":"Important ({0})","Important.Title.sq":"Important ({0})","Important.Title.sr":"Important ({0})","Important.Title.ss":"Important ({0})","Important.Title.st":"Important ({0})","Important.Title.su":"Important ({0})","Important.Title.sv":"Important ({0})","Important.Title.sw":"Important ({0})","Important.Title.ta":"Important ({0})","Important.Title.te":"Important ({0})","Important.Title.tg":"Important ({0})","Important.Title.th":"Important ({0})","Important.Title.ti":"Important ({0})","Important.Title.tk":"Important ({0})","Important.Title.tl":"Important ({0})","Important.Title.tn":"Important ({0})","Important.Title.to":"Important ({0})","Important.Title.tr":"Important ({0})","Important.Title.ts":"Important ({0})","Important.Title.tt":"Important ({0})","Important.Title.tw":"Important ({0})","Important.Title.ty":"Important ({0})","Important.Title.ua":"Important ({0})","Important.Title.ug":"Important ({0})","Important.Title.uk":"Important ({0})","Important.Title.ur":"Important ({0})","Important.Title.uz":"Important ({0})","Important.Title.ve":"Important ({0})","Important.Title.vi":"Important ({0})","Important.Title.vo":"Important ({0})","Important.Title.wa":"Important ({0})","Important.Title.wo":"Important ({0})","Important.Title.xh":"Important ({0})","Important.Title.yi":"Important ({0})","Important.Title.yo":"Important ({0})","Important.Title.za":"Important ({0})","Important.Title.zh":"Important ({0})","Important.Title.zu":"Important ({0})","Countries.af-na":"Namibia","Countries.af-za":"South Africa","Countries.ar-_i":"International","Countries.ar-ae":"UAE","Countries.ar-au":"Australia","Countries.ar-bh":"Bahrain","Countries.ar-eg":"Egypt","Countries.ar-gb":"International","Countries.ar-in":"India","Countries.ar-jo":"Jordan","Countries.ar-kw":"Kuwait","Countries.ar-lb":"Lebanon","Countries.ar-om":"Oman","Countries.ar-ps":"Palestine","Countries.ar-qa":"Qatar","Countries.ar-ru":"Russia","Countries.ar-sa":"Saudi Arabia","Countries.ar-sd":"Sudan","Countries.be-by":"Belarus","Countries.bg-bg":"Bulgaria","Countries.bg-ru":"Bulgaria","Countries.bs-ba":"Bosnia and Herzegovina","Countries.ca-es":"Spain","Countries.cs-cz":"Czech Republic","Countries.da-dk":"Denmark","Countries.de-at":"Austria","Countries.de-ch":"Switzerland","Countries.de-de":"Deutschland","Countries.de-es":"Spain","Countries.de-li":"Liechtenstein","Countries.de-lu":"Luxembourg","Countries.de-ru":"Germany","Countries.de-th":"Thailand","Countries.de-us":"USA","Countries.el-cy":"Cyprus","Countries.el-gr":"Ελλάδα","Countries.el-ru":"Greece","Countries.en-_i":"Austria","Countries.en-ae":"UAE","Countries.en-at":"Austria","Countries.en-au":"Australia","Countries.en-az":"Azerbaijan","Countries.en-bb":"Barbados","Countries.en-be":"Belgium","Countries.en-bg":"Austria","Countries.en-bh":"Bahrain","Countries.en-br":"Brazil","Countries.en-by":"Belarus","Countries.en-ca":"Canada","Countries.en-ch":"Russia","Countries.en-cn":"China","Countries.en-cy":"Cyprus","Countries.en-cz":"Austria","Countries.en-de":"Australia","Countries.en-dk":"Austria","Countries.en-eg":"Egypt","Countries.en-es":"Spain","Countries.en-fi":"Austria","Countries.en-fr":"Australia","Countries.en-gb":"UK","Countries.en-gr":"Austria","Countries.en-gy":"Guyana","Countries.en-hk":"Australia","Countries.en-hr":"Croatia","Countries.en-hu":"Austria","Countries.en-id":"Austria","Countries.en-ie":"Ireland","Countries.en-il":"Israel","Countries.en-in":"India","Countries.en-iq":"Iraq","Countries.en-is":"Austria","Countries.en-it":"Australia","Countries.en-jm":"Jamaica","Countries.en-jp":"Austria","Countries.en-ke":"Kenya","Countries.en-kh":"Cambodia","Countries.en-kr":"Australia","Countries.en-kw":"Kuwait","Countries.en-ky":"Cayman Islands","Countries.en-kz":"Kazakhstan","Countries.en-lb":"Lebanon","Countries.en-li":"Austria","Countries.en-lk":"Sri Lanka","Countries.en-lu":"Austria","Countries.en-me":"Austria","Countries.en-mk":"Macedonia","Countries.en-mt":"Australia","Countries.en-mu":"Mauritius","Countries.en-my":"Malaysia","Countries.en-ng":"Nigeria","Countries.en-nl":"Netherlands","Countries.en-no":"Austria","Countries.en-np":"Nepal","Countries.en-nz":"New Zealand","Countries.en-om":"Oman","Countries.en-ph":"Philippines","Countries.en-pk":"Pakistan","Countries.en-pl":"Austria","Countries.en-pt":"Austria","Countries.en-qa":"Austria","Countries.en-ro":"Austria","Countries.en-rs":"Austria","Countries.en-ru":"Russia","Countries.en-sa":"Saudi Arabia","Countries.en-se":"Austria","Countries.en-sg":"Austria","Countries.en-sk":"Austria","Countries.en-th":"Thailand","Countries.en-tr":"Turkey","Countries.en-tw":"Taiwan","Countries.en-ua":"Austria","Countries.en-ug":"Uganda","Countries.en-us":"USA","Countries.en-vi":"USA","Countries.en-vn":"Viet Nam","Countries.en-za":"South Africa","Countries.en-zm":"Zambia","Countries.en-zw":"UK","Countries.es-ar":"Argentina","Countries.es-cl":"Chile","Countries.es-co":"Colombia","Countries.es-cr":"Costa Rica","Countries.es-do":"Dominican Republic","Countries.es-ec":"Ecuador","Countries.es-es":"España","Countries.es-gt":"Guatemala","Countries.es-mx":"Mexico","Countries.es-pa":"Panama","Countries.es-pr":"Puerto Rico","Countries.es-py":"Paraguay","Countries.es-ru":"Russia","Countries.es-sv":"El Salvador","Countries.es-us":"USA","Countries.es-ve":"Venezuela","Countries.et-ee":"Estonia","Countries.fa-ir":"Iran","Countries.fi-ee":"Estonia","Countries.fi-fi":"Finland","Countries.fr-be":"Belgium","Countries.fr-ca":"Canada","Countries.fr-ch":"Switzerland","Countries.fr-dz":"Algeria","Countries.fr-eg":"Egypt","Countries.fr-fr":" France","Countries.fr-ht":"Haiti","Countries.fr-il":"Israel","Countries.fr-kh":"Cambodia","Countries.fr-lb":"Lebanon","Countries.fr-lu":"Luxembourg","Countries.fr-mu":"Mauritius","Countries.fr-nc":"New Caledonia","Countries.fr-ru":"Russia","Countries.fr-sn":"Senegal","Countries.fr-us":"Haiti","Countries.fr-vn":"Viet Nam","Countries.ga-ie":"Ireland","Countries.gu-in":"India","Countries.he-il":"Israel","Countries.hi-in":"India","Countries.hi-ru":"India","Countries.hr-ae":"Croatia","Countries.hr-hr":"Croatia","Countries.hu-hu":"Hungary","Countries.hu-ro":"Romania","Countries.hu-sk":"Slovakia","Countries.hy-am":"Armenia","Countries.id-id":"Indonesia","Countries.is-is":"Iceland","Countries.it-ca":"Canada","Countries.it-ch":"Switzerland","Countries.it-it":"Italia","Countries.it-ru":"Italy","Countries.ja-jp":"Japan","Countries.ja-ru":"Japan","Countries.kn-in":"India","Countries.ko-kr":"Korea (South)","Countries.ko-ru":"Korea (South)","Countries.ko-us":"USA","Countries.lt-lt":"Lithuania","Countries.lv-lv":"Latvia","Countries.mk-mk":"Macedonia","Countries.ml-in":"India","Countries.mr-in":"India","Countries.ms-my":"Malaysia","Countries.ne-np":"Nepal","Countries.nl-be":"Belgium","Countries.nl-nl":"Nederland","Countries.nl-sr":"Suriname","Countries.no-no":"Norway","Countries.pa-gb":"UK","Countries.pl-_i":"International","Countries.pl-pl":"Polska","Countries.pt-ao":"Angola","Countries.pt-br":"Brazil","Countries.pt-pt":"Portugal","Countries.pt-ru":"Brazil","Countries.ro-ro":"Romania","Countries.ru-_i":"Germany","Countries.ru-am":"Armenia","Countries.ru-by":"Belarus","Countries.ru-de":"Germany","Countries.ru-ee":"Estonia","Countries.ru-fi":"Finland","Countries.ru-fr":"France","Countries.ru-gb":"Germany","Countries.ru-ru":"Россия","Countries.ru-tj":"Tajikistan","Countries.ru-ua":"Russia","Countries.ru-us":"USA","Countries.ru-uz":"Uzbekistan","Countries.si-lk":"Sri Lanka","Countries.sk-sk":"Slovakia","Countries.sl-si":"Slovenia","Countries.sq-al":"Albania","Countries.sq-ks":"Kosovo","Countries.sr-me":"Montenegro","Countries.sr-rs":"Serbia","Countries.sr-ru":"Russia","Countries.sv-ee":"Estonia","Countries.sv-fi":"Finland","Countries.sv-se":"Sweden","Countries.ta-in":"India","Countries.te-in":"India","Countries.th-th":"Thailand","Countries.tl-ph":"Philippines","Countries.tr-cy":"Northern Cyprus","Countries.tr-tr":"Turkey","Countries.uk-ua":"Ukraine","Countries.vi-vn":"Viet Nam","Countries.yi-us":"USA","Countries.zh-ca":"Canada","Countries.zh-cn":"China","Countries.zh-hk":"China","Countries.zh-my":"Malaysia","Countries.zh-ru":"China","Countries.zh-sg":"Singapore","Countries.zh-tw":"Taiwan","Countries.zh-us":"USA","Countries.zu-za":"South Africa"};n.getResources=function(){return i},t.A=n},82230:function(e,t,n){"use strict";var i=n(45796),r=n(58506);i.A.api=r.X,t.A=r.X},65263:function(e,t,n){"use strict";n.d(t,{A:function(){return W}});var i=n(29583),r=n(13302),o=n(27189),a=n(45221),s=n(60658),u=n(1943),c=n(44260),l=n(46977),d=n(17782),h=n(8403),f=n(58932),p=n(97433),m=n(12010),g=n(89885),v=n(96587),y=n(55683),_={title:["Buttons.ShareComment","Share Gift"],linkText:["Dialogs.Share.LinkToGift","Link To Gift"]},b={title:["Buttons.ShareComment","Share Comment"],linkText:["Dialogs.Share.LinkToComment","Link To Comment"]},w={title:["Buttons.Share","Share"],linkText:["Dialogs.Share.LinkTo","Link To"],articleButtonText:["Dialogs.Share.Article","Article"],pageButtonText:["Dialogs.Share.Page","Page"],issueButtonText:["Dialogs.Share.Issue","Issue"]},C=function(){function e(){}return e.prototype.show=function(e,t){var n=this;return this._dialog&&this._dialog.visible||(this._dialog=v.default.createInstance(t)),this._model=this._initModel(this._dialog,e),this._dialog.onHide((function(){n._model=void 0})).show({templateName:"v7.Client.Dialogs.CopyUrl",model:this._model})},e.prototype.hide=function(){this._dialog&&this._dialog.visible&&this._dialog.hide(y.d.Ok,{listView:1})},e.prototype._initModel=function(e,t){var n,i=t.contentType===g._l.gift,r=t.contentType===g._l.comment;n=i?_:r?b:w;var o={title:m.pureComputed((function(){return c.Ay.valAsync.apply(c.Ay,(0,f.fX)([],(0,f.zs)(n.title),!1))})).extend({async:!0}),linkToText:m.pureComputed((function(){return c.Ay.valAsync.apply(c.Ay,(0,f.fX)([],(0,f.zs)(n.title),!1))})).extend({async:!0}),selectedUrl:m.observable(t.link),isTouchDevice:m.observable(!!p.b.touch),copyContent:function(){var t=o.selectedUrl();return e.hide(y.d.Close),t},resize:function(){e.resize()},close:function(){e.hide(y.d.Close)}};return o},e}();v.default.copyUrl=new C;var A=v.default.copyUrl,I=n(80539),S=n(67660),P=n(70079),x=n(74638),T=n(20680),k=n(64936),E=n(79371),M=function(e,t,n){return o.A.get("Analytics.CustomSourceTrackingEvent",!1)?new a.A(e).addQueryParam("source",encodeURIComponent(t)).addQueryParam("medium",encodeURIComponent(n)).toString():e},D=i.nd.sharing={},N=g.Ay.shareContentTypes;function L(e){if(!e)return null;if(e.contentType)return e;var t={previewInfo:e.previewInfo,parentDialog:e.parentDialog},n=e.preview||{};if(e.article)t.articleId=e.article.Id,t.contentType=N.article,t.subject=e.article.Title,e.controller&&"function"==typeof e.controller.contentAccessToken&&(t.contentAccessToken=e.controller.contentAccessToken()),e.comment&&e.comment.commentKey&&(t.contentType=N.comment,t.commentKey=e.comment.commentKey);else if(e.issue)t.issue=e.issue.issue&&e.issue.issue()||e.issue,t.subject=n.issueName,e.page?(t.page=e.page,t.contentType=N.page):t.contentType=N.issue,t.pageNumbers=e.pageNumbers||[e.page];else if(e.gift)t.contentType=N.gift,t.giftCampaignId=e.gift.campaignId;else if(e.pageSet)t.contentType=N.pageSet,t.pageSetId=e.pageSet.id,t.subject=n.issueName;else{if(!e.comment)return null;t.articleId=e.comment.articleId,t.contentType=N.comment,t.subject=e.comment.text,t.commentKey=e.comment.commentKey}return t}function V(e,t,n){return I.uM(e,t,n||"").then((function(e){return e||Promise.reject(new Error("shareData is empty"))})).catch((function(e){return(0,l.A)().show(c.Ay.val("Errors.SharingFailed")),Promise.reject(new Error(e))}))}D.getSharingInfo=L,D.share=function(e,t){var n=new k.c;return I.oz(e,t).then((function(r){i(d.A).unbind("submit"),i(d.A).bind("submit",(function(r,o){e.contentType=o.contentType,"issue"===o.contentType&&(e.page=1),I.uM(e,t,o.userComments).then((function(t){H(o.contentType).then((function(){d.A.hide(),i.extend(t,e),n.resolve(t)}))})).catch(n.reject)})),I.rh(e).then((function(t){var n=i.extend({},t,e.previewInfo||{});d.A.show(n,e.parentDialog)}))})).catch(n.reject),n},D.shareWithoutConfirmation=V,D.shareWithoutDialog=function(e,t){var n=L(e);return n?V(n,t).then((function(){return B(e,t).then((function(){return H(n.contentType),n}))})):Promise.reject(new Error("Sharing context is invalid"))};var R={};function H(e){var t=new k.c,n=c.Ay.val(R[e]);if(n){var i=(0,l.A)();i.show(n),i.onClosed((function(){t.resolve()}))}else t.resolve();return t.promise()}function F(e){var t=e.preview||{};return t.snippet&&t.snippet.getUrl?t.snippet.getUrl():Promise.resolve(void 0)}function B(e,t){return(0,s.$Z)(e).then((function(n){var i=r.map(n&&n.collections||[],(function(e){return e.id}));return(null==i?void 0:i.includes(t))?Promise.resolve():(i.push(t),(0,s.S8)({context:e,collections:i}))}))}function z(e,t){var n=L(e);return n?(0,P.V)().then((function(){return B(e,t)})).then((function(){return(0,x.qJ)(n).then((function(t){var n;return Promise.resolve(M(t,document.location.host,null===(n=e.article)||void 0===n?void 0:n.Title))}))})).catch((function(e){return Promise.reject(new Error("couldn't add item to collection: "+e))})):Promise.reject(new Error("Sharing context is invalid"))}function O(e){u.A.clientShareFacebook.available()&&u.A.clientShareFacebook.activate(null,e)}function j(e){u.A.clientShareTwitter.available()&&u.A.clientShareTwitter.activate(null,e)}function U(e){u.A.clientShareGoogle.available()&&u.A.clientShareGoogle.activate(null,e)}R[N.article]="Messages.ArticleHasBeenShared",R[N.page]="Messages.PageHasBeenShared",R[N.issue]="Messages.IssueHasBeenShared",R[N.opinion]="Messages.OpinionHasBeenShared",D.showDoneDialog=H,D.activateEmailSharing=function(e){var t=L(e);return t?h.A.show({parent:t.parentDialog,context:e}).then((function(n){return n.status!==y.d.Ok?Promise.reject(void 0):Promise.all([F(e),z(e,g.Ay.shareTypes.email)]).then((function(e){var i=e[0],r={contentUrl:e[1],snippetUrl:i,userMessage:n.userComments,to:n.to,subject:n.subject};return(0,x.Nn)(t,r)}))})).then((function(){return H(t.contentType)})).catch((function(e){return e?(0,T.logAndAlertError)({resourceKey:"Errors.EmailSharingFailed"}):Promise.reject()})):Promise.reject(new Error("Sharing context is invalid"))},D.activateShareUsingPersonalEmail=function(e){return z(e,g.Ay.shareTypes.email).then((function(t){var n=encodeURIComponent(t+"\r\n\r\n"+e.userComments),i="mailto:"+e.to+"?body="+n+"&subject="+encodeURIComponent(e.subject);window.location.href=i})).catch((function(){return(0,T.logAndAlertError)({resourceKey:"Errors.EmailSharingFailed"})}))},D.shareEmail=function(e){var t=new k.c,n=h.A,r=L(e);return r?(I.O2(r).then((function(o){i(n).unbind("submit"),i(n).bind("submit",(function(e,o){var a=i.extend({},r);a.contentType=o.contentType,"issue"===o.contentType?a.page=0:o.page&&(a.page=o.page),o.issue&&(a.issue=o.issue,delete a.articleId),n.hide();var s={id:g.Ay.shareTypes.email,name:g.Ay.shareTypes.email,type:E.X.Sharing};(0,S.CQ)(s).then((function(){return I._6(a,o.userComments,o.from,o.to,o.subject).then((function(e){t.resolve(e),H(o.contentType)}))})).catch((function(){t.reject(),(0,l.A)().show(c.Ay.val("Errors.EmailSharingFailed"))}))})),i(n).unbind("submitViaUserMail"),i(n).bind("submitViaUserMail",(function(t,r){z(e,g.Ay.shareTypes.email).then((function(t){var o,a=encodeURIComponent(t+"\r\n\r\n"+r.userComments);o={to:r.to,subject:r.subject,body:a,link:t,comment:r.userComments},i.extend(e,o),u.A.mailTo.activate(null,e),n.hide()})).catch((function(){(0,l.A)().show(c.Ay.val("Errors.EmailSharingFailed"))}))})),I.rh(r).then((function(e){n.show(e)}))})).catch((function(e){t.reject(),e&&e.userCancelled||(0,l.A)().show(c.Ay.val("Errors.EmailSharingFailed"))})),t.promise()):Promise.reject(new Error("Sharing context is invalid"))},D.checkAccessForSharing=function(e,t){return I.oz(e,t)},D.copyUrl=function(e){var t=L(e);return t?(0,x.qJ)(t).then((function(n){var i,o={link:M(n,document.location.host,null===(i=e.article)||void 0===i?void 0:i.Title),contentType:t.contentType};return r.assign(o,t.previewInfo),A.show(o,t.parentDialog)})):Promise.reject(new Error("Sharing context is invalid"))},D.shareResourceUrl=function(e,t){var n=L(e);return n?(0,P.V)().then((function(){return(0,x.qJ)(n).then((function(i){var r,o={resourceUrl:M(i,document.location.host,null===(r=e.article)||void 0===r?void 0:r.Title),subject:n.subject};return I.N2(t,o)})).then((function(){return B(e,t)})).then((function(){return H(n.contentType)})).catch((function(){return(0,T.logAndAlertError)({resourceKey:"Errors.SharingFailed"})}))})).catch((function(e){return logError(e)})):Promise.reject(new Error("Sharing context is invalid"))},D.createSharingLink=z,D.clientShareFacebook=O,D.clientShareTwitter=j,D.clientShareGoogle=U,D.clientShareBy=function(e,t){switch(String.prototype.toLowerCase.call(e)){case g.Ay.shareTypes.google:U(t);break;case g.Ay.shareTypes.twitter:j(t);break;case g.Ay.shareTypes.facebook:O(t)}};var W=D},80539:function(e,t,n){"use strict";n.d(t,{Kg:function(){return h},N2:function(){return l},O2:function(){return u},Tv:function(){return d},_6:function(){return a},oz:function(){return s},rh:function(){return c},uM:function(){return o}});var i=n(73690),r="v1";function o(e,t,n){var r={};return r.articleId=e.articleId,e.issue&&(r.issue=e.issue.issue?e.issue.issue():e.issue),r.page=e.page,r.contentType=e.contentType,r.sharingType=t,r.commentKey=e.commentKey||"",r.commentAuthorId=e.commentAuthorId||"",r.thumbnailUrl=e.thumbnailUrl||"",r.userMessage=n,r.resourceUrl=e.resourceUrl,applyOpinionParams.call(r,e),(0,i.G4)("sharing","Share",r,!1)}function a(e,t,n,r,o){var a={};a.articleId=e.articleId,a.issue=e.issue,a.page=e.page,a.contentType=e.contentType,a.commentKey=e.commentKey||"",a.commentAuthorId=e.commentAuthorId||"",a.userMessage=t,a.from=n,a.to=r,a.subject=o;var s=r instanceof Array?"ShareMultipleEmails":"ShareEmail";return(0,i._s)("sharing",s,a,!0)}function s(e,t,n){var r={};return e&&(r.articleId=e.articleId,r.issue=e.issue,r.page=e.page,r.contentType=e.contentType,r.commentKey=e.commentKey||"",r.commentAuthorId=e.commentAuthorId||"",r.contentAccessToken=e.contentAccessToken||""),r.sharingType=t,(0,i.G4)("sharing","CheckAccessForSharing",r)}function u(e){var t={};return t.articleId=e.articleId,t.issue=e.issue,t.page=e.page,t.contentType=e.contentType,t.commentKey=e.commentKey||"",t.commentAuthorId=e.commentAuthorId||"",(0,i.G4)("sharing","CheckAccessForEmailSharing",t)}function c(e){var t={};return t.articleId=e.articleId,t.issue=e.issue,t.page=e.page,t.contentType=e.contentType,t.commentKey=e.commentKey||"",t.commentAuthorId=e.commentAuthorId||"",(0,i.G4)("sharing","GetPreviewInfo",t)}function l(e,t){return(0,i._s)("".concat(r,"/sharing"),e,t,{disableRetry:!0})}function d(e,t){return(0,i._s)("".concat(r,"/articles"),"".concat(e,"/email"),t,{disableRetry:!0})}function h(e,t){return(0,i._s)("".concat(r,"/pagesets"),"".concat(e,"/email"),t,{disableRetry:!0})}},17628:function(e,t,n){"use strict";var i=n(82230),r=n(27897),o={},a=0,s=0,u=3e5;function c(e){e&&e.Ts&&(e.Ts<=a||(a=e.Ts,s=l()))}function l(){return(new Date).getTime()}o.reset=function(){a=0,s=0},r.yb((function(){s+u","","","{2}","",""].join(""),this._rootClass||"",this._cssClass,this._text)},enabled:function(e){return 0==arguments.length?this._enabledAsync:(this._enabledAsync=Promise.resolve(e).then((function(e){return!!e})),this)},isAvailable:function(){if(!this._itemsControllerCTOR)throw new Error("Private field _itemsControllerCTOR is not initialized.");var e=this._itemsControllerCTOR.prototype;return e.available.apply(e,this._additionalItemsControllerParams)},isAvailableAsync:function(){if(!this._itemsControllerCTOR)return Promise.reject();var e=this._itemsControllerCTOR.prototype,t=e.available.apply(e,this._additionalItemsControllerParams);return Promise.resolve(t)},renderTo:function(e,t){return(0,r.sH)(this,void 0,void 0,(function(){var n,i,a,s;return(0,r.YH)(this,(function(u){switch(u.label){case 0:return e?((n=this)._rootClass="".concat(n._rootClass," ").concat(n._disabledCssClass," ").concat(n._notAvailableCssClass),n._elm=o(n.template()),n._elm.appendTo(e),[4,Promise.all([this.isAvailableAsync(),this._enabledAsync])]):[2,null];case 1:return i=r.zs.apply(void 0,[u.sent(),2]),a=i[0],s=i[1],n.__disposed?[2]:(a&&n._elm.removeClass(n._notAvailableCssClass),s&&n._elm.removeClass(n._disabledCssClass),t&&n.bindEvents(),[2,n._elm])}}))}))},bindEvents:function(){var e=this;Promise.all([this._enabledAsync,a.A.loaded()]).then((function(t){if(t[0]&&(e.bindedClick=e.click.bind(e),e._elm)){var n=a.A.get("ui.ActionTool.eventName",void 0);void 0!==n&&"function"==typeof e._elm[n]?(e._customEvent=n,e._elm[n](e.bindedClick)):e._elm.tap(e.bindedClick)}}))},rootClass:function(e){return e&&(this._rootClass=e),this},cssClass:function(e){return e&&(this._cssClass=e),this},text:function(e){return e&&(this._text=e),this},controller:function(e){return 0==arguments.length?this._controller:(this._controller=e,this)},controllerCTOR:function(e){return e?("function"==typeof e&&(this._controllerCTOR=e),this):this._controllerCTOR},controllerParams:function(e){return e&&e.length&&(this._controllerParams=e),this},itemsControllerCTOR:function(e){return 0==arguments.length?this._itemsControllerCTOR:("function"==typeof e&&(this._itemsControllerCTOR=e),this)},additionalItemsControllerParams:function(e){return e&&e.length&&(this._additionalItemsControllerParams=e),this},click:function(e){var t=this;this.enabled().then((function(n){n&&(t._config.position={x:e.pageX||e.touchX||0,y:e.pageY||e.touchY||0,align:{y:s.W.Bottom}},t._controller||t._initController(),t._controller.show(t._config))}))},dispose:function(){this._controller&&"function"==typeof this._controller.dispose&&this._controller.dispose(),this._elm&&this.click&&void 0!==this._customEvent&&"function"==typeof this._elm[this._customEvent]&&this._elm.off(this._customEvent,this.click),this._enabledAsync=null,this.__disposed=!0,delete this._controller,delete this._elm,delete this._config,delete this._controllerCTOR,delete this._controllerParams}}),i)},11756:function(e,t,n){"use strict";n.d(t,{y:function(){return I}});var i=n(12010),r=n(29583),o=n(13302),a=n(51175),s=n(50794),u=n(71740),c=n(51002),l=n(62625),d=n(44260),h=n(88813),f=n(84901),p=n(65678),m=n(65263),g=n(10358),v=n(78521),y=n(85377),_=n(64609),b=n(53236),w=n(79450),C=n(92066),A=(n(91909),n(96723),n(97433),n(3915));function I(){var e;function t(e){var t=e[0],n=e[1],i=e[2];t.avatar((0,g.tr)({nickname:t.authorNickname,imageId:i,size:g.eV.large,fallbackAvatarUrl:n}))}function n(e){for(var n=0;n0):r&&(s.isOwnerPost=s.opinion&&s.opinion()&&s.opinion().id===r,s.isOwnerReply=!1,s.isOwnerFeatured(!1),s.isSupportedByOwner=!1)}return n(e),e}(u=u.concat(d),S,h);var T={canComment:a,articleId:e.ArticleId,profileId:e.currentProfileId,posts:i.observableArray(u),videos:[],hasOwnerPosts:!!o.find(u,(function(e){return e.isOwnerPost||e.isOwnerReply})),bookmark:P,bookmarkId:P&&P.id||null,bookmarkLines:i.observable(0),totalPosts:u.length,userPost:w,showSharingButtons:x,userProfile:A,avatar:i.observable((0,g.tr)({nickname:b.default.nickname,imageId:b.default.avatarImageId,size:g.eV.large,fallbackAvatarUrl:b.default.photoUrl})),openBookmarkProfile:function(e,t){var n=P&&P.userProfile;return n&&n.ensureProfileName().then((function(e){f.A.goView(p.lP.Profile,{type:"profile",profileId:e})})),t.preventDefault(),!1},openProfile:function(e,t){return s.F.ensureProfileName(e.authorProfileName,e.enAuthorId).then((function(e){f.A.goView(p.lP.Profile,{type:"profile",profileId:e})})),t.preventDefault(),!1},newComment:function(){return T.articleId&&_.A.showPost({articleId:T.articleId,contextProfileName:C.o.profileId}),!1},openThread:function(e){return T.articleId&&_.A.show({articleId:T.articleId,markerCommentId:e.publicId,contextProfileName:C.o.profileId}),!1},renderAttachments:function(e,t,n){if(t.hasAttachments){var i=n<3?n:3;new l.A(t.attachments,{renderVideoPlayer:!1,showGalleryOnClick:!1,itemsInLayout:i}).render(r(e))}},shareFacebook:function(){this._share("Facebook")},shareTwitter:function(){this._share("Twitter")},_share:function(e){var t=window.basePath+"bookmark/"+T.bookmarkId,n="clientShare"+e;if(!m.A[n])throw new Error("Unknown sharing provider: "+e);m.A[n]({link:t})},_getElement:function(e,t){return r(e).find("[post-id="+t+"]:visible")},_fitItems:function(){var e=r(t),i=[];if(P){var a=[3,5,6,7,8,9,10,11,13,15,20],s=a.length-1,l=a.length;i.push(new c.A.Block({id:"bookmark",priority:0,getHeight:function(){return e.find(".sharing-comment").outerHeight()+e.find(".bookmark-share").outerHeight()},getContentSize:function(){return l},contentBounds:[0,l],canHide:!1,decrease:function(){s>-1&&(T.bookmarkLines(a[s]),s--),l--}}))}for(var d=function(e){e=e.slice(0);for(var t,n,i,r,a,s,u,c={1:1e3,2:1500,3:2e3,4:3e3,5:4e3,6:5e3,7:6e3,8:7e3,0:5e4},l=[],d=0;d-1)t.clamp(i[s]),s--;else if(o){var n=T._getElement(e,t.id).find(".atchd-content").empty();r[a]>0?T.renderAttachments(n,t,r[a]):t.attachmentsVisible(!1),a--}l--}})}(u[h]);i.push(f)}var p=r("#scroller").height()-(e.find(".art-comments").outerHeight(!0)-e.find(".art-comments").height())-(e.find(".comments-extra").outerHeight(!0)-e.find(".comments-extra").height())-(e.find(".art-comments-call").height()||0),m={getHeight:function(){return p}};new c.A.Manager(m,i).build(c.A.LayoutStrategy.GUINNESS)}};return T}(d,t,w),h.A.appendTo("v7.Client.ArticleSocialInfo",e,t),e._fitItems(),a.Ay.bind(t,"singleTapConfirmed",r.returnFalse),e._onCommentUpdatedUnsubscribe||(e._onCommentUpdatedUnsubscribe=y.A.onCommentUpdated((function(n,i,r,o){i.articleId.toString()===e.articleId.toString()&&e.posts(e.posts().map((function(n){if(n.id.toString()===r.toString()){n.update(o);var i=e._getElement(t,r).find(".atchd-content").empty();e.renderAttachments(i,n)}return n})))}))),e._onCommentDeletedUnsubscribe||(e._onCommentDeletedUnsubscribe=y.A.onCommentDeleted((function(t,n,i){n.articleId.toString()===e.articleId.toString()&&e.posts(e.posts().map((function(e){return e.id.toString()===i.toString()&&e.delete(),e})))})))}))}},this.getTitle=function(e){var t=x(e),n="";return t.hasOwnPosts?n=d.Ay.get("v7.Client.Profile.Header.Commented"):t.hasBookmarks?n=t.hasLabels?o.map(t.labels,(function(e){return e.Name})).join(", "):d.Ay.get("v7.Client.Profile.Header.Bookmarked"):(t.hasVotes||t.hasCommentsVotes)&&(n=d.Ay.get("v7.Client.Profile.Header.Voted")),n},this.getTitleClass=function(e){var t=x(e);return"textview-section"+((t.hasOwnPosts?" section-comments":t.hasBookmarks&&" section-bookmarks")||t.hasVotes&&" section-bumps"||t.hasCommentsVotes&&" section-bumps"||"")},this.positionChanged=function(e){},this.dispose=function(){!function(){if(e)for(var t=e.videos,n=0;n0&&o.items.forEach((function(e){var t=S.findIndex((function(t){return t.cid===e.cid}));t<0&&(t=S.length,S.push(e)),n.push(t)})),[2,{cc:t,cn:n,id:e.name,iso:e.iso,name:e.displayName,webName:e.slug}]}}))}))}function T(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r,o=this;return(0,i.YH)(this,(function(a){switch(a.label){case 0:return[4,Promise.all([(0,s.Px)({limit:(null==P?void 0:P.publicationsCount)||0,orderBy:{order:_.xB.Default}}),(0,y.M1)(e)])];case 1:return t=i.zs.apply(void 0,[a.sent(),2]),n=t[0],r=t[1],S=n.items,[4,Promise.all(r.map((function(e){return(0,i.sH)(o,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,x(e)];case 1:return[2,t.sent()]}}))}))})))];case 2:return[2,{autoAlphabet:!0,categories:a.sent(),newspapers:S,concatenateSectionsNames:!0}]}}))}))}function k(e){var t=this;a.assign(t,e),a.forEach(A,(function(e){try{e.call(t,t)}catch(e){}}))}function E(e){for(var t in e)this[t]=e[t];this.webName||(this.webName=this.name),this.id||(this.id=this.name);for(var n=0;nt.name?1:-1}))}return this.allNewspapers},getAllChildNewspapersCount:function(){return this.getAllChildNewspapers().length}};var M,D,N=[],L=[],V={},R=[],H=[],F=[],B=[],z=[],O={1:H,2:F,3:B,4:z},j={},U={},W=[],Y=[],X=[],q=[],G=[],K=[],J={countries:["region"]},Q={};function Z(e){return e&&(M=null),M||(M=l.A.loaded().then((function(){var e=l.A.get("catalog.root").split(",");return Promise.all([T(e),h.A.load()]).then((function(e){return e[0]})).then($).then((function(){return pe}))}))),M}function $(e){function t(t){var n=e.newspapers[t];return n&&n.issueInfo&&n}function n(e){e.sections_cids||(e.sections=[],e.sectionsCids=e.sections_cids=[],e.hasSections=!0),e.sections.push(this),e.sections_cids.push(this.cid)}N=[],L=[],V={},R=[],H.length=0,F.length=0,B.length=0,z.length=0,j={},D={},K=[],W=[],Y=[],X=[],G=[],q=[],Q={};var i=N,o=V;a.forEach(e.newspapers,(function(e,t){var n=h.A.getIssue(e.cid),r=new k(a.extend(e,n));r.index=t,n&&(r.issueInfo=n),o[r.cid]=r,i.push(r),r.free&&X.push(r),1==r.type?(Y.push(r),G.push(r.index)):(W.push(r),q.push(r.index)),r.pss&&a.forEach(r.pss,(function(e){Q[e]||(Q[e]=[]),Q[e].push(r.cid)}))})),a.forEach(Q,(function(e,t){o[i[t].cid].supplements=e})),L=[];for(var s=0,u=i.length;s4)try{var t=e.charAt(0);return("t"==t||"T"==t)&&"h"==e.charAt(1)&&"e"==e.charAt(2)&&" "==e.charAt(3)}catch(e){}return!1}function oe(e,t){var n=e.slice(0);return t&&n.sort(t),n}var ae,se,ue={byActivationDate:function(e,t){return e=e.issueInfo,t=t.issueInfo,e&&t?e.activated_msi?1:nn?-1:i0:(Z().then(e),this)},load:function(e){return P=e,Z()},reload:function(){return Z(!0)},getNewspaper:function(e){return e?(e.cid&&(e=e.cid),e=e.toLocaleLowerCase(),V[e]):null},getCategory:ie,getNewspaperName:function(e){return te(e).name||""},isNewspaperSmart:function(e){return!!te(e).smart},sortByIssueActivationDate:function(e){return oe(e,ue.byActivationDate)},sortByRank:function(e){return oe(e,ue.byRank)},sortByName:function(e){return oe(e,ue.byName)},getNewspapersFromCids:function(e){for(var t=[],n=0;n0){var o=function(e){if(e&&e.length>4)try{return"c"==e.charAt(0)&&"i"==e.charAt(1)&&"d"==e.charAt(2)&&":"==e.charAt(3)}catch(e){}return!1}(e=e.toLowerCase());o&&(e=e.substring(4,e.length));var s=i.newspapers_for_search;s||(s=i.newspapers_for_search=function(e){var t=[],n=V;for(var i in n){var r=n[i];r&&r.cid&&(r._lowerName=r.name.toLowerCase(),r._lowerAccentFoldedName=(0,w.Dp)(r.name.toLowerCase()),r._lowerOriginalName=r.originalName.toLowerCase(),r._alternativeTitles=r.alternativeTitles,r._displayNames=r.displayNames,r._lowerWebName=r.webName.toLowerCase(),r._lowerUniqueName=r.uniqueName?r.uniqueName.toLowerCase():r._lowerWebName,t.push(r))}return a.isFunction(e)&&t.sort(e),t}(ue.byRank));for(var u=s.length,c=0,l=0;l=0}))),h<0&&(h=a.findIndex(d._displayNames,(function(t){return t.name.toLowerCase().indexOf(e)>=0})))),h>=0&&(n.push(d),c++)}}}return n},resetCustomCategories:function(){R.length=0},resetCategory:function(e){var t=e.toLowerCase();R[t]=null},getCountryLanguages:ce,getCountryByIso:function(e){return(ae||(ae=le(H)),ae)[e]},getCountryById:function(e){return a.find(H,(function(t){return t.id===e}))},getCountryByNewspaperCID:function(e){if(!e||""==e)return null;var t=H,n=this.getCountryByIso("_i");if(n&&fe(e,n.newspapers))return n;var i=fe(e,N),r=i&&i.publicationCountryCode;if(r)return a.find(t,{iso:r});for(var o=0;o0?-1:1:this.setSortOrderPath(i))},this.setSortOrderPath=function(n){var i=o[n];e=i.path,t=i.order},l.A.loaded().then((function(){r.setOrder(n)}))},state:ye,currentState:o.observable(ye.titles),categoryType:o.observable(),category:o.observable(),categories:o.observableArray(),newspapers:new r.nd.ObservableCollectionNew([]),mainSectionCid:o.observable(),selectedTitle:o.observable(),toolbarHeader:o.observable(""),sort:o.observable(),configTitleEnable:o.observable(!1),myNewspapers:o.observableArray(),isNestedTtitles:o.observable(!1),currentCategory:o.observable(),allowSorting:o.observable(!0),isRecentlyReadCategory:o.observable(),categoriesClick:function(){be.resetFilter();var e=o.dataFor(arguments[1].target);be.sort(be.sortObj.getName(e.category.id));var t=be.sortObj.getParams();be.newspapers.setSort(t.path,t.order),be.plugin.setCurrentCategory(e),be.allowSorting("RecentlyReadIssues"!=be.currentCategory().id)},newspapersClick:function(){var e=o.dataFor(arguments[1].target);e.pluginIsCombo()?(be.plugin.setCurrentMainSection(e),be.isNestedTtitles(!0),be.prevFilter=be.filter(),be.resetFilter()):(be.plugin.setCurrentMainSection(e),be.clickOpen())},close:function(){Ae.hide()},clickCategoryType:function(e,t){return t||(t=event),be.resetFilter(),Ae.setCurrentCategoryType(r(t.currentTarget).attr("category-type")),!1},resetFilter:function(){be.filter(""),be.filterActive(!1)},filter:o.observable(""),filterActive:o.observable(!1),filterNewspapers:(0,a.throttle)(we,100),showCountryLanguagesToolbar:function(){return l.A.get("ui.Catalog.showCountryLanguagesToolbar",!0)},popularSortEnable:function(){return l.A.get("ui.Catalog.SortToolbar.popularSortEnable",!0)},clickBack:function(){return be.currentState()==ye.issueDates?be.currentState(ye.paperTitle):(be.prevFilter&&(be.filter(be.prevFilter),be.prevFilter=null),Ae.setCurrentMainSection(null),be.currentState(ye.titles),be.isNestedTtitles(!1)),!1},clickOpen:function(){return Ae.showNewspaper(this.mainSectionCid()),!1},stringStartsWith:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},clickSort:function(e,t){t||(t=event),this.sort(r(t.currentTarget).attr("sort-order")),be.sortObj.setOrder(this.sort());var n=be.sortObj.getParams();return this.newspapers.setSort(n.path,n.order).render(),!1},getCategory:function(e){var t=o.utils.arrayFilter(be.categories(),e);return t&&t.length?t[0].category:null},getCategoryById:function(e){return be.getCategory((function(t){return t.category.id===e}))},isNewspaperVisible:function(e){return!0},getNewspaperName:function(e){return!!be.mainSectionCid()&&e.shortName||e.displayName||e.name}};function we(){var e=!!be.filter(),t=be.filterActive()!==t;t&&(be.filterActive(e),be.newspapers.reset().updateSource(Ae.getNewspapers())),be.newspapers.setFilter(be.filter(),"name").render()}function Ce(e){this.category=e,this.tempNewspCount=o.observable(e.getAllChildNewspapersCount()),this.topLevelNewspCount=o.observable(e.newspaperCount),this.countOnlyTopLevel=o.observable(!1),this.newspCount=o.computed({read:function(){return this.countOnlyTopLevel()?this.topLevelNewspCount():this.tempNewspCount()},write:function(e){this.countOnlyTopLevel()?this.topLevelNewspCount(e):this.tempNewspCount(e)},deferEvaluation:!0,owner:this}),"mynewspapers"==e.id.toLowerCase()&&this.countOnlyTopLevel(!0)}o.bindingHandlers.titleCalendar={update:function(e,t,n,i,a){var s=t();if(o.utils.unwrapObservable(s)==ye.issueDates){var u=i.selectedTitle&&i.selectedTitle();u&&r.nd.issuesCalendar.load(u.cid,!0).then((function(t){var n=t;r.nd.ui.issuesCalendar.show(r(e),n,u.issueId(),u.cid),e=null,r.nd.ui.issuesCalendar.onDone((function(e,t,n){u.issueId(t),u.selectedDate(n.toUTCString()),u.issueThumb(u.getThumbUrlByWidth(400)),i.currentState(ye.paperTitle)}))}))}}},be.newspapersItems=be.newspapers.items,o.bindingHandlers.fadeVisible={init:function(e,t){var n=t();r(e).toggle(o.utils.unwrapObservable(n))},update:function(e,t){var n=t();r(e).parent().is(":visible")?o.utils.unwrapObservable(n)?r(e).fadeIn():r(e).fadeOut():r(e).hide()}},ge.extendCategories({selected:!1,setSelected:function(e){return this.selected=e,this.selectedKo(e),this},clickCategory:function(e,t){return Ae.setCurrentCategory(e),!1}},(function(){this.selectedKo=o.observable(this.selected)})),ge.extendNewspapers({formatIssueDate:function(){return this.issueInfo?C.Ay.formatDate(this.issueInfo.issueDate,"someresourcename","ddd, d MMM yyyy"):""},selectedDateFormated:function(){if(this.selectedDate()){var e=new Date(this.selectedDate());return C.Ay.formatDate(e,"someresourcename","ddd, d MMM yyyy")}return""},getSelectedOrLatestIssueId:function(){return this.issueId()?this.issueId():this.issueInfo&&this.issueInfo.issue},getThumbUrlByWidth:function(e){e=e||160;var t=null,n=this.getSelectedOrLatestIssueId();if(n){if(r.support.retina&&this.issueInfo&&this.issueInfo.issue==n&&this.issueInfo.pageWidth){var i=this.issueInfo.calculateThumbScale(2*e);i&&(e=Math.floor(this.issueInfo.calculateWidthForScale(i)/2),t=(0,u.F6)(n,i,1)+"&retina=2&targetWidth="+e)}t||(t=(0,u.Fv)(n,e,1,!0))}return t||(t=(0,u.sP)(this.cid,e,1,!0)),t||console.log("Unable to get url for cid: "+this.cid+", issue: "+n),t||""},pluginIsCombo:function(){return this.hasSections&&!be.mainSectionCid()},clickNewspaper:function(e){return this.pluginIsCombo()?Ae.setCurrentMainSection(e):Ae.showNewspaper(e),!1},dateIssueClick:function(e){be.currentState(be.state.issueDates)},resetSelection:function(){this.selectedDate(""),this.issueId("")}},(function(){this.selectedDate=o.observable(""),this.issueId=o.observable(""),this.issueThumb=o.observable(""),this.issueDates=o.observableArray()}));var Ae={show:function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return(n=null==e?void 0:e.metaData)?[3,2]:[4,(0,s.hz)()];case 1:n=i.sent(),i.label=2;case 2:return(t=n).publicationsCount<=1?[2,p.A.goView(c.lP.PagesView,{cid:l.A.get("catalog.MasterCid"),data:{}})]:[4,d.A.showDialog()];case 3:return[2,i.sent()?this.init(t).then((function(){return function(e){if(!(_e=m.default.getInstance())||_e.visible)return this;be.newspapers.setPageSize(50),be.sort(be.sortObj.getName(Ae.getCurrentCategoryId()));var t=be.sortObj.getParams();return be.newspapers.setSort(t.path,t.order),Ae.setDefaultCategoryType("countries"),be.resetFilter(),e&&e.filter&&be.filter(e.filter),be.plugin=Ae,_e.show({templateName:"v7.Client.Dialogs.NewCatalog",model:be}),this}(e)})):p.A.goView(c.lP.StoreHub,{catalogView:c.$r.Catalog})]}}))}))},init:function(e){return me||(me=new v.c,g.A.show(),Promise.all([ge.load(e),h.A.load()]).then((function(){g.A.hide(),me.resolve()}))),me.promise()},hide:function(){return _e.hide(),this},prop:function(e,t){return 1==arguments.length?ve[e]:(ve[e]=t,this)},setDefaultCategoryType:function(e){return this.prop("categoryType$default",e),this.setCurrentCategoryType(this.getCurrentCategoryType()),this},getDefaultCategoryType:function(){return this.prop("categoryType$default")},getCurrentCategoryType:function(){var e=be.categoryType();return!e&&this.getDefaultCategoryType()&&(e=this.getDefaultCategoryType(),this.setCurrentCategoryType(e)),e},setCurrentCategoryType:function(e){be.categoryType(e);var t=this;return this.getCategories().then((function(n){be.categories(n),t.setCurrentCategoryId(t.prop(e+"$categoryId"))})),this},getCurrentCategory:function(e){return ge.getCategory(this.getCurrentCategoryId(e))},getCurrentCategoryId:function(e){var t=this.prop("categoryId")||this.prop(this.prop(this.getCurrentCategoryType()+"$categoryId"));return t||e?t:l.A.get("ui.Catalog.Menu.defaultCategoryId","all")},setCurrentCategory:function(e){this.setCurrentCategoryId(e?e.category.id||e:null)},setCurrentCategoryId:function(e){var t=be.getCategoryById(this.getCurrentCategoryId());if(t&&t.setSelected(!1),e)t=be.getCategoryById(e);else{var n=o.utils.arrayFirst(be.categories(),(function(e){return be.stringStartsWith(e.category.id.toLowerCase(),"mynewspapers")}));if(n&&n.category&&n.category.newspaperCount)t=n.category;else{e=l.A.get("ui.Catalog.Menu.defaultCategoryId","all");var i=l.A.get("ui.Catalog.Menu.allSourcesEnable",!0);t=!e||"all"==e&&!i?be.categories()[0].category:ge.getCategory(e)}}return t&&(t.setSelected(!0),e=t.id),this.prop(this.getCurrentCategoryType()+"$categoryId",e),this.prop("categoryId",e),this.setCurrentMainSection(null),be.currentState(ye.titles),be.currentCategory(t),be.isRecentlyReadCategory("RecentlyReadIssues"===e),!1},setCurrentMainSection:function(e){var t=be.selectedTitle();return t&&t!=e&&t.resetSelection(),be.mainSectionCid(e?e.cid||e:null),e&&(e.selectedDate(e.issueInfo.issueDate.toUTCString()),e.issueId(e.issueInfo.issue),e.issueThumb(e.getThumbUrlByWidth(400))),be.selectedTitle(e),be.toolbarHeader(e?e.name:""),be.newspapers.reset().updateSource(this.getNewspapers()),be.selectedTitle()&&r.each(be.newspapers._source,(function(e,t){t.cid==be.selectedTitle().cid&&(be.newspapers._source[e]=be.selectedTitle())})),be.filter()?we():be.newspapers.render(),_e&&_e.resize(),this},getCategories:function(e){var t;e=e||be.categoryType(),(t="languages"==e?ge.languages:"countries"==e?ge.countries:[]).sort((function(e,t){return e.name.localeCompare(t.name)}));var n=l.A.get("ui.Catalog.Menu.myNewspapersEnable",!0),i=l.A.get("ui.Catalog.Menu.allSourcesEnable",!0);t=t.slice(0);var s=new v.c;if(r.nd.user.getLatestReadIssues().then((function(e){var n;l.A.get("ui.Catalog.Menu.recentlyReadEnable",!0)&&t.unshift((n=function(e){for(var t=[],n=[],i=0;i=0;--c)t=(0,a.union)(this.getChildCustomCategories(ge.custom_categories[c]),t);return Promise.all([s]).then((function(){return i&&t.unshift(ge.getCategory("all")),o.utils.arrayMap(t,(function(e){return new Ce(e)}))}))},getChildCustomCategories:function(e){for(var t=[],n=e.children.length-1;n>=0;--n)t=(0,a.union)(this.getChildCustomCategories(e.children[n]),t);return e.newspapers&&t.unshift(e),t},getNewspapers:function(){return this._getNewspapers()},_getNewspapers:function(){var e=this,t=be.mainSectionCid();if(t)return e.getNewspapersByMainSection(t);var n=e.getCurrentCategoryId(),i=!!be.filter();return e.getNewspapersByCategory(n,i)},getNewspapersByCategory:function(e,t){var n=be.getCategoryById(e);return n?t?n.allNewspapers:n.newspapers:[]},getNewspapersByMainSection:function(e){var t=ge.getNewspaper(e);if(t&&t.sections){var n=t.sections.slice(0);return n.unshift(t),n}return[]},showNewspaper:function(e){var t=e.cid?e:ge.getNewspaper(e),n=t.getSelectedOrLatestIssueId();n?f.A.showIssue(n):f.A.showNewspaper(t.cid),this.hide()}};r.nd.catalogDialog=Ae;var Ie=Ae},46943:function(e,t,n){"use strict";n.d(t,{A:function(){return R}});var i=n(58932),r=n(13302),o=n(91552),a=n(29392),s=n(51568),u=n(20847),c=n(12010),l=n(29583),d=n(56096),h=n(17065),f=n(3915),p=n(44260),m=n(78747),g=n(60330),v=n(78342),y=l.support.retina?420:210,_={slidesPerView:"auto",freeMode:!0,keyboard:!0,mousewheel:!0,updateOnImagesReady:!0,setWrapperSize:!0,observer:!0,observeParents:!0,touchStartPreventDefault:!1},b={showMeta:!1},w={viewModel:function(){function e(e){var t=void 0===e?{}:e,n=t.issue,i=t.page,o=t.selectedPages,a=t.options,s=void 0===a?{}:a,u=this;if(!n)throw new Error("issue not specified");this.issue=n,this.page=i||0,this.options=(0,r.assign)({},b,s),c.isObservable(o)?this.selectedPages=o:this.selectedPages=c.observableArray([i]),this.pagesCounter=c.observable(this.selectedPages().length),this.pagesCounterText=c.pureComputed((function(){return u.pagesCounter()>1?p.Ay.format("PagesSelector.PagesSelected",u.pagesCounter()):1===u.pagesCounter()?p.Ay.val("PagesSelector.PageSelected","1 Page Selected"):p.Ay.val("PagesSelector.SelectPage","Select Page")}),this),this.swiper=null,this.issueInfo=c.observable({}),this.spreads=c.observableArray([]),this.init()}return e.prototype.init=function(){var e=this;Promise.all([(0,h.ry)(this.issue),(0,h.SA)({issue:this.issue})]).then((function(t){var n=(0,i.zs)(t,2),o=n[0],a=n[1];e.issueInfo({issueName:o.issueName,displayDate:o.displayDate});var s=(0,r.chain)(a.Pages).map((function(t){return e.createPageModel((0,f.C)(t))})).sortBy("pageNumber").value(),u=(0,r.map)(s,e.pagePreload);Promise.all(u).then((function(){return e.afterRender()}));var c=(0,r.reduce)(s,(function(e,t){return 1===t.pageNumber||t.isLeft?(e[t.pageNumber]||(e[t.pageNumber]=[])).push(t):(e[t.pageNumber-1]||(e[t.pageNumber]=[])).push(t),e}),{});e.spreads((0,r.values)(c))}))},e.prototype.afterRender=function(){this.initSwiper(),this.options&&this.options.afterRender&&this.options.afterRender()},e.prototype.createPageModel=function(e){var t=Object.create(e);t.isLeft=e.pageNumber%2==0,t.pageUrl=g.A.getPageImageUrl(this.issue,e.pageNumber,{width:e.width,height:e.height},{height:y});var n=-1!==(0,r.indexOf)(this.selectedPages(),e.pageNumber);return t.isSelected=c.observable(n),t.loaded=c.observable(!1),t},e.prototype.pagePreload=function(e){return m.uv(e.pageUrl).then((function(){return e.loaded(!0)}))},e.prototype.selectPage=function(e){var t=!e.isSelected();e.isSelected(t),t?this.selectedPages.push(e.pageNumber):this.selectedPages.remove(e.pageNumber),this.pagesCounter(this.selectedPages().length),(0,v._)({pageNumber:e.pageNumber,isChecked:t,selectedPages:this.selectedPages()})},e.prototype.initSwiper=function(){var e=l("#issue-pages-selector");e.length&&(this.swiper=new d.A(e.get(0),_),this.slideToSelectedPage())},e.prototype.slideToSelectedPage=function(){if(this.swiper){var e=l(this.swiper.wrapperEl).find("#page_thumb".concat(this.page)).closest(".swiper-slide").index();this.swiper.slideTo(e)}},e}(),template:{ndTemplate:"v7.Client.IssuePagesSelector.ko.Component"},synchronous:!0},C="issue-pages-selector";c.components.isRegistered(C)||c.components.register(C,w);var A=n(20680),I={slidesPerView:"auto",freeMode:!0,keyboard:!0,mousewheel:!0,updateOnImagesReady:!0,setWrapperSize:!0,observer:!0,observeParents:!0,touchStartPreventDefault:!1},S={},P="issue-pages-list",x=function(){function e(e){var t=void 0===e?{}:e,n=t.thumbs,i=t.options,o=void 0===i?{}:i,a=(0,r.map)(c.unwrap(n),(function(e){return{pageUrl:e.url,area:e.area,loaded:c.observable(!1)}}));this.pages=c.observable(a),this.options=(0,r.assign)({},S,o),this.swiper=null}return e.prototype.mount=function(e){var t=this,n=(0,r.map)(this.pages(),this.pagePreload);Promise.all(n).then((function(){return t.afterRender(e)})).catch(A.logError)},e.prototype.afterRender=function(e){this.initSwiper(e),this.options&&this.options.afterRender&&this.options.afterRender()},e.prototype.initSwiper=function(e){var t=l(e).find("#".concat("swiper-container"));t.length&&(this.swiper=new d.A(t.get(0),I))},e.prototype.pagePreload=function(e){return m.uv(e.pageUrl).then((function(){return e.loaded(!0)}))},e}(),T={viewModel:{createViewModel:function(e,t){var n=new x(e);return n.mount(t.element),n}},template:{ndTemplate:"v7.Client.IssuePagesList.ko.Component"},synchronous:!0};c.components.isRegistered(P)||c.components.register(P,T);var k=n(82788),E=n(25890),M=u.A.base,D=a.Ay.view,N=o.A.list,L=["pageView","textView","comment","bookmark","listen","share","copy","print","pdf","export","translateArticle","translate","openInSmartEditor","vote"],V=function(e){function t(t,n){var i=e.call(this)||this;return i._context=n,i._view=t,i._menu=new D(i),i._itemsControllers=[],i._isItemSelected=!1,i.subscription=k.X.ofType(E.wf.ContextMenu).subscribe((function(){i._isItemSelected=!0})),i}return(0,i.C6)(t,e),t.prototype.show=function(){for(var t=this,n=[],r=0;rm}}),{title:r.isObservable(v)?v:r.observable(v),visible:r.observable(!1),datePicker:n,close:function(){e.hide(p.d.Close)}}}))}(a,t).then((function(e){if(!i){a.show({name:"calendar",templateName:"v7.Client.Dialogs.Calendar",model:e});var t=a.htmlRoot().find(".pop-body");(n=new w.A(e.datePicker)).show(t).then((function(){a.resize(),e.visible(!0)}))}})).catch((function(e){return a.hide(p.d.Unknown),Promise.reject(e)})),a}};f.default.calendar=I;var S,P=I,x=n(66973),T=((S={})[v.yx.Last3Days]="Dialogs.AdvancedSearch.Last3Days",S[v.yx.Today]="Dialogs.AdvancedSearch.Today",S[v.yx.ThisWeek]="Dialogs.AdvancedSearch.ThisWeek",S[v.yx.ThisMonth]="Dialogs.AdvancedSearch.ThisMonth",S[v.yx.Anytime]="Dialogs.AdvancedSearch.Anytime",S[v.yx.Range]="Dialogs.AdvancedSearch.Range",S),k="v7.Client.DateFormat.Issue";function E(e){return y.Ay.val(T[e])}var M=function(e,t,n){this.id=e,this.displayName=t,this.isSelected=(0,r.observable)(n)},D=function(e){function t(t,n){var i=e.call(this,v.yx.Range,E(v.yx.Range),n)||this,o=null!=t?t:{},a=o.start,s=o.stop;return i.from=(0,r.observable)(a?(0,x.R)(t.start):(0,C.Ec)()),i.to=(0,r.observable)(s?(0,x.R)(t.stop):(0,C.Ec)()),i.prettyFrom=ko.pureComputed((function(){var e=i.from();return y.Ay.formatDate(e,k)})),i.prettyTo=ko.pureComputed((function(){var e=i.to();return y.Ay.formatDate(e,k)})),i}return(0,i.C6)(t,e),t}(M),N=function(){function e(e){var t=e.dialog,n=e.date,i=e.dateRange;this.SearchRangeType=v.yx,this.dialog=t;var r=n||d.l.getDefaultDate();this.dates=[v.yx.Today,v.yx.Last3Days,v.yx.ThisWeek,v.yx.ThisMonth,v.yx.Anytime,v.yx.Range].map((function(e){return function(e,t,n){return e===v.yx.Range?new D(t,n):new M(e,E(e),n)}(e,i,e===r)}))}return e.prototype.back=function(){var e=(0,o.find)(this.dates,(function(e){return e.isSelected()})),t=function(e){return e.id===v.yx.Range}(e)?{from:(0,_.Yq)(e.from(),"yyyy-MM-dd"),to:(0,_.Yq)(e.to(),"yyyy-MM-dd")}:null;this.dialog.hide(p.d.Ok,{date:e?e.id:d.l.getDefaultDate(),dateRange:t})},e.prototype.select=function(e){this.dates.forEach((function(t){t.isSelected(t.id===e.id)})),this.dialog.resize()},e.prototype.pickFromDate=function(e){this.pickDate(e.from,{title:y.Ay.val("Dialogs.AdvancedSearch.Date.From"),currentDate:e.from(),currentMonth:e.from(),allowedPeriod:{to:e.to()}})},e.prototype.pickToDate=function(e){this.pickDate(e.to,{title:y.Ay.val("Dialogs.AdvancedSearch.Date.To"),currentDate:e.to(),currentMonth:e.to(),allowedPeriod:{from:e.from()}})},e.prototype.pickDate=function(e,t){P.show(null,t).onHide((function(t,n){n.status===p.d.Ok&&e(n.date)}))},e}(),L=function(){function e(){}return e.prototype.show=function(e){var t=void 0===e?{parentDialog:null,date:null,dateRange:null}:e,n=t.parentDialog,i=t.date,r=t.dateRange;return new Promise((function(e){var t=f.default.createInstance(n),o=new N({dialog:t,date:i,dateRange:r});t.onHide((function(t,n){o.dialog=null,e(n)})),t.show({templateName:"v7.Client.Dialogs.AdvancedSearch.Date",model:o,preventClosingOnClickOutside:!0})}))},e}(),V=new L,R=n(4797),H=n(12030),F=n(26906),B=n(75979),z=function(e){function t(t){var n=void 0===t?{}:t,i=n.publication,o=n.country,a=n.language,s=e.call(this,i)||this;return s.isSelected=r.observable(!1),s.topThumbUrl=s.getThumbUrlByWidth(100),s.country=o,s.language=a,s.countryAndLanguage=[o,a].reduce((function(e,t){return t&&t.displayName&&e.push(t.displayName),e}),[]).join(" / "),s}return(0,i.C6)(t,e),t}(n(94529).A),O=z,j=n(90006);function U(e){return y.Ay.format(1===e?"Dialogs.AdvancedSearch.TitleSelected":"Dialogs.AdvancedSearch.TitlesSelected",e)}var W=function(){function e(e){var t=e.dialog,n=e.category,i=e.groupName,a=e.selection,s=e.languages,u=e.countryDictionary,c=e.languageDictionary,l=e.searchQuery,d=this;this.dialog=t,this.category=n,this.groupName=i,this.selection=a,this.languages=s,this.languageIds=(0,o.isEmpty)(s)?[]:s.map((function(e){return e.id})),this.categoryIds=this.category?[this.category.id]:[];var h,f=this.selection.getCategorySelection(this.category.id);this._previousSelectedTitles=f&&f.titles?(0,o.values)(f.titles):[],this._currentSelectedTitles=this._previousSelectedTitles.slice(),this.isSearchMode=r.observable(!1),f&&(h=null!==f.titles&&(0,o.isEmpty)(this._previousSelectedTitles)),this.isSelectedAll=r.observable(h),this.titles=r.observableArray(),this.titlesSubscription=this.titles.subscribe((function(){d._restoreSelection(),setTimeout((function(){return d.dialog.resize()}),200)})),this.displayTitlesCount=U(this.category.publicationsCount),this.onScroll=(0,o.throttle)((function(){return d._titleList.hasMore()&&d._titleList.getMore()}),300);var p=(0,o.debounce)((function(e){d.isSearchMode(!0),d._currentSelectedTitles=d._getSelectedPublications(),d._titleList.search(e)}),500);this.searchQuery=r.observable(l||""),this.searchQuerySubscription=this.searchQuery.subscribe((function(e){""===(e=e.trim())?(d.isSearchMode(!1),d._titleList.search(e)):p(e)})),this._titleList=new B.A({provider:H.Px,ViewModel:function(e){var t=j.A.findFirstKeyEntry(e.categories,u),n=j.A.findFirstKeyEntry(e.categories,c);return new O({publication:e,country:t,language:n})},target:this.titles,filters:{hasCategories:this.categoryIds,inCategories:this.languageIds},pageSize:60,sorting:{name:"byName",order:1}}),this.hasMorePublications=r.computed((function(){return d.titles().length&&d._titleList.hasMore()}))}return e.prototype.selectAll=function(){this.isSelectedAll()?this.isSelectedAll(!1):(this.titles().forEach((function(e){return e.isSelected(!1)})),this.isSelectedAll(!0))},e.prototype.toggleSelection=function(e){e.isSelected(!e.isSelected()),this.isSelectedAll(!this._isAnySelected()),e.isSelected()||(0,o.remove)(this._previousSelectedTitles,(function(t){return t.cid===e.cid}))},e.prototype.back=function(){this._updateSelection(),this.dialog.hide(p.d.Ok),this.dialog=null},e.prototype.clearQuery=function(){this._titleList.search("")},e.prototype.loadPublications=function(){this._titleList.search("")},e.prototype._updateSelection=function(){var e=this.isSelectedAll();if(void 0!==e)if(e)this.selection.setCategory(this.category,this.groupName);else{var t=this._getSelectedPublications();t.length?this.selection.setTitles(t,this.category):this.selection.setCategory(this.category,this.groupName,null)}},e.prototype._restoreSelection=function(){var e=this;this._currentSelectedTitles.forEach((function(t){var n=(0,o.find)(e.titles(),(function(e){return e.cid===t.cid}));n&&n.isSelected(!0)}))},e.prototype._isAnySelected=function(){return this.titles().some((function(e){return e.isSelected()}))||this._previousSelectedTitles.length>0},e.prototype._getSelectedPublications=function(){return this.titles().filter((function(e){return e.isSelected()})).map((function(e){return{cid:e.cid,name:e.name,slug:e.slug,rank:e.rank,isFree:e.isFree,isSupplement:e.isSupplement,supplements:e.supplements,categories:e.categories,latestIssue:e.latestIssue}}))},e}(),Y=function(){function e(){}return e.prototype.show=function(e){var t=void 0===e?{}:e,n=t.parentDialog,i=t.category,r=t.groupName,o=t.selection,a=t.languages,s=t.countryDictionary,u=t.languageDictionary;return new Promise((function(e){var t=f.default.createInstance(n),c=new W({dialog:t,category:i,groupName:r,selection:o,languages:a,countryDictionary:s,languageDictionary:u});c.loadPublications(),t.onHide((function(t,n){c.titlesSubscription.dispose(),c.searchQuerySubscription.dispose(),e(n)})),t.show({templateName:"v7.Client.Dialogs.AdvancedSearch.Titles.InCategory",model:c,preventClosingOnClickOutside:!0})}))},e}(),X=new Y,q=n(47027),G=n(7368),K=200,J=function(){function e(e){var t=e.dialog,n=e.titleSelection,i=e.languages,a=e.showTabSwitcher,s=e.selectedTab,u=this;this.dialog=t,this.publicationsCount=r.observable(0),this.countries=r.observableArray(),this.categories=r.observableArray(),this.titles=r.observableArray(),this.titlesSubscription=this.titles.subscribe((function(){u._restorePublicationsSelection(),setTimeout((function(){return u.dialog.resize()}),K)})),this._currentSelectedTitles=[],this.languages=i,(0,o.isEmpty)(i)?this.languageIds=null:this.languageIds=i.map((function(e){return e.id})),this.selection=n,this.isSelectedAll=r.observable(this.selection.isEmpty()),this._restoreSelection(),this._countryDictionary={},this._languageDictionary={},this.isTabSwitcherVisible=!!j.A.isNil(a)||!!a,s=s||F.$I.Categories,this.selectedTab=r.observable(s),this.isCountryMode=r.pureComputed((function(){return u.selectedTab()===F.$I.Countries})),this.isCategoryMode=r.pureComputed((function(){return u.selectedTab()===F.$I.Categories})),this.isSearchMode=r.observable(!1),this.displayTotalCount="";var c=(0,o.debounce)((function(e){u.isSearchMode(!0),u._currentSelectedTitles=u._getSelectedPublications(),u._titleList.search(e)}),500);this.searchQuery=r.observable(""),this.searchQuerySubscription=this.searchQuery.subscribe((function(e){""===(e=e.trim())?(u.isSearchMode(!1),u._currentSelectedTitles=[],u.titles([])):c(e)})),this.onScroll=(0,o.throttle)((function(){return u.isSearchMode()&&u._titleList.hasMore()&&u._titleList.getMore()}),300),this._titleList=new B.A({provider:H.Px,ViewModel:function(e){var t=j.A.findFirstKeyEntry(e.categories,u._countryDictionary),n=j.A.findFirstKeyEntry(e.categories,u._languageDictionary);return new O({publication:e,country:t,language:n})},target:this.titles,filters:{hasCategories:this.languageIds},pageSize:60,sorting:{name:"byName",order:1}}),this.hasMorePublications=r.computed((function(){return u.titles().length&&u._titleList.hasMore()}))}return e.prototype.back=function(){this.save()},e.prototype.save=function(){this.isSearchMode()&&this.selection.setTitles(this.titles().filter((function(e){return e.isSelected()}))),this.dialog.hide(p.d.Ok),this.dialog=null},e.prototype.clearQuery=function(){this.searchQuery("")},e.prototype.selectAll=function(){this.isSelectedAll()?this.isSelectedAll(!1):(this.selection.clear(),this._getCatalogList().forEach((function(e){return e.forEach((function(e){return e.displaySelectionText("")}))})),this.isSelectedAll(!0))},e.prototype.toggleSelection=function(e){e.isSelected(!e.isSelected())},e.prototype.selectCountryTab=function(){var e=this;this.selectedTab()!==F.$I.Countries&&(this.selectedTab(F.$I.Countries),setTimeout((function(){return e.dialog.resize()}),K))},e.prototype.selectCategoryTab=function(){var e=this;this.selectedTab()!==F.$I.Categories&&(this.selectedTab(F.$I.Categories),setTimeout((function(){return e.dialog.resize()}),K))},e.prototype.showCategoryTitles=function(e){var t=this;X.show({parentDialog:this.dialog,category:e,groupName:this.selectedTab(),languages:this.languages,countryDictionary:this._countryDictionary,languageDictionary:this._languageDictionary,selection:this.selection}).then((function(e){e&&e.status===p.d.Ok&&(t._restoreSelection(),e.goToRoot&&t.save())}))},e.prototype.loadCatalog=function(){var e=this,t=null,n=b.A.get("catalog.root");return(0,R.DT)(n).then((function(n){var a=(0,i.zs)([n[0].categories].map((function(e){return e.map((function(e){return(0,o.assign)({displaySelectionText:r.observable("")},e)}))})),1)[0];return e.categories(a),t=(0,o.groupBy)(a,"titlePublicationCid"),(0,q.yC)((0,o.keys)(t))})).then((function(n){return n.forEach((function(n){t[n.cid]&&t[n.cid].forEach((function(e){e.historyItem=n,e.topThumbUrl=(0,G.Af)(n.latestIssue.key,100,n.latestIssue.expungeVersion)})),e._restoreSelection()}))})).catch(g.logError).finally((function(){m.A.hide(),e.dialog.resize()}))},e.prototype.loadPublicationsCount=function(){var e=this,t=(0,o.isEmpty)(this.languages)?(0,H.hz)().then((function(e){return e.publicationsCount})):Promise.resolve(this._getTitlesCountInLanguages());return t.then((function(t){e.displayTotalCount=U(t)})),t},e.prototype._getTitlesCountInLanguages=function(){return(0,o.reduce)(this.languages,(function(e,t){return e+t.publicationsCount}),0)},e.prototype._restoreSelection=function(){var e=this;this.selection&&(this.isSelectedAll(this.selection.isEmpty()),this._getCatalogList().forEach((function(t){return t.forEach((function(t){t.displaySelectionText(e._getDisplaySelectionTextForCategory(t.id))}))})))},e.prototype._getSelectedPublications=function(){return this.titles().filter((function(e){return e.isSelected()}))},e.prototype._restorePublicationsSelection=function(){var e=this;this._currentSelectedTitles.forEach((function(t){var n=(0,o.find)(e.titles(),(function(e){return e.cid===t.cid}));n&&n.isSelected(!0)}))},e.prototype._getCatalogList=function(){return[this.countries(),this.categories()]},e.prototype._getDisplaySelectionTextForCategory=function(e){if(!this.selection)return"";var t=this.selection.getCategorySelection(e);if(!t||null===t.titles)return"";if(t&&t.category)return y.Ay.val("Dialogs.AdvancedSearch.AllTitles");var n=(0,o.values)(t.titles);return 1===n.length?n[0].name:n.length>1?"".concat(n.length," ").concat(y.Ay.val("Dialogs.AdvancedSearch.Selected")):""},e}(),Q=function(){function e(){}return e.prototype.show=function(e){var t=void 0===e?{}:e,n=t.parentDialog,i=t.titleSelection,r=t.languages,o=t.showTabSwitcher,a=void 0!==o&&o,s=t.selectedTab;return new Promise((function(e){m.A.show();var t=f.default.createInstance(n),o=new J({dialog:t,titleSelection:i,languages:r,showTabSwitcher:a,selectedTab:s});return Promise.all([o.loadCatalog(),o.loadPublicationsCount()]).then((function(){t.onHide((function(t,n){o.titlesSubscription.dispose(),o.searchQuerySubscription.dispose(),e(n)})),t.show({templateName:"v7.Client.Dialogs.AdvancedSearch.Titles",model:o,preventClosingOnClickOutside:!0}),setTimeout((function(){return t.resize()}),K)})).catch(g.logError).finally((function(){return m.A.hide()}))}))},e}(),Z=new Q,$="simpleSearch",ee="advancedSearch",te=function(){function e(e){var t=e.dialog,n=e.searchQuery,i=this;this.dialog=t,this.languages=r.observableArray([]),this.isAuthorFocused=r.observable(!1),this.searchDate=r.observable(v.yx.Last3Days),this.dateRange=r.observable(null),this.searchLocations=r.observable(v.aZ.All),this.searchQuery=r.observable(n).extend({maxLength:c.A.searchTextMaxLength}),this.searchAnyWords=r.observable("").extend({maxLength:c.A.searchTextMaxLength}),this.searchPhrase=r.observable("").extend({maxLength:c.A.searchTextMaxLength}),this.searchExcludeWords=r.observable("").extend({maxLength:c.A.searchTextMaxLength}),this.hasQuery=r.pureComputed((function(){return!!(i.searchQuery()||i.searchAnyWords()||i.searchPhrase()||i.searchExcludeWords())})),this.searchAuthor=r.observable("").extend({customValidator:{message:y.Ay.val("Dialogs.AdvancedSearch.Author.Required","Required field"),handler:function(e){return i.hasQuery()||e}},trackDirtyState:!0}),this.hasAuthor=r.pureComputed((function(){return!!i.searchAuthor()})),this.touch=!!a.b.touch,this.titleSelection=new h.V,this.displayTitles=r.observable((0,h.o)(this.titleSelection)),this.displayDate=r.computed((function(){if(i.searchDate()===v.yx.Range&&i.dateRange()){var e=i.dateRange(),t=e.start,n=e.stop;return"".concat(t," - ").concat(n)}return E(i.searchDate())})),this.currentSearchOptions=r.observable($),this.toggleOptionsText=r.pureComputed((function(){return i.currentSearchOptions()===ee?y.Ay.val("Dialogs.AdvancedSearch.HideOptions","Hide Options"):y.Ay.val("Dialogs.AdvancedSearch.ShowOptions","Show Options")}))}return e.prototype.cancel=function(){this.dialog.hide(p.d.Cancel),this.dialog=null},e.prototype.search=function(){if((0,u.forceValidation)(this),(0,u.validate)(this)){var e=this._buildQuery(),t={type:v.nX.Advanced,state:v.IY.Custom,query:e,author:this.searchAuthor(),in:this.searchLocations(),date:this.searchDate(),hideSimilar:!1};(0,o.isEmpty)(this.languages())||(t.languages=this.languages().map((function(e){return e.iso})).join(",")),this.searchDate()===v.yx.Range&&(0,o.assign)(t,this.dateRange()),(0,o.assign)(t,this.titleSelection.toSearchParams()),l.c.newSearch(t),this.dialog.hide(p.d.Ok)}},e.prototype.showLanguages=function(){var e=this;this.dialog.suspend(),(0,s.o)().then((function(t){var n;t.cancelled||e.languages((null===(n=t.data)||void 0===n?void 0:n.selectedLanguages)||[]),e.dialog.resume()}))},e.prototype.showTitles=function(){var e=this;Z.show({parentDialog:this.dialog,titleSelection:this.titleSelection,languages:this.languages()}).then((function(t){t.status===p.d.Ok&&e.displayTitles((0,h.o)(e.titleSelection))}))},e.prototype.showDates=function(){var e=this;V.show({parentDialog:this.dialog,date:this.searchDate(),dateRange:this.dateRange()}).then((function(t){if(t.status===p.d.Ok&&(e.searchDate(t.date),t.date===v.yx.Range)){var n=t.dateRange,i=n.from,r=n.to;e.dateRange({start:i,stop:r})}}))},e.prototype.clearQuery=function(){this.searchQuery("")},e.prototype.restoreSelection=function(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return e=l.c.getSearchParams(),(0,o.isEmpty)(e)?[2,Promise.resolve(null)]:(this.searchDate(e.date||d.l.getDefaultDate()),this.searchLocations(v.aZ.All),this.searchQuery(e.query||""),this.searchAuthor(e.author||""),t=e.start,n=e.stop,(t||n)&&this.dateRange({start:t,stop:n}),[4,this.titleSelection.fromSearchParams(e)]);case 1:return i.sent(),this.displayTitles((0,h.o)(this.titleSelection)),[2]}}))}))},e.prototype.toggleSearchOptions=function(){this.currentSearchOptions()===$?this.currentSearchOptions(ee):this.currentSearchOptions($),this.dialog.resize()},e.prototype._buildQuery=function(){var e=this.searchQuery();if(this.currentSearchOptions()===$)return e;if(this.searchPhrase()&&(e+=' "'.concat(this.searchPhrase().replace(/['"]+/g,""),'"')),this.searchAnyWords()){var t=this.searchAnyWords().split(" ").filter((function(e){return e}));e+=" ".concat(t.join(" OR "))}if(this.searchExcludeWords()){var n=this.searchExcludeWords().split(" ").filter((function(e){return e}));e+=" -".concat(n.join(" -"))}return e},e}(),ne=function(){function e(){}return e.prototype.show=function(e){var t=void 0===e?{}:e,n=t.parentDialog,i=t.searchQuery;return new Promise((function(e){m.A.show();var t=f.default.getInstance(n),r=new te({dialog:t,searchQuery:i});t.onHide((function(t,n){e(n)}));var o={templateName:"v7.Client.Dialogs.AdvancedSearch",model:r,focusElement:".search .search-input",preventClosingOnClickOutside:!0};r.restoreSelection().then((function(){t.show(o)})).catch(g.logError).finally((function(){return m.A.hide()}))}))},e}(),ie=new ne},8403:function(e,t,n){"use strict";n(27664);var i=n(12010),r=n(55683),o=n(13302),a=n(1943),s=n(96587),u=n(44260),c=n(68483),l=/\s*;\s*|\s*,\s*|\s+/;function d(e){return e.article?e.article.Title:e.preview&&e.preview.issueName}function h(e){var t=e.dialog,n=e.context,s={context:n.preview&&n,to:i.observable("").extend({emailList:{delimiters:" ;,",message:u.Ay.val("Dialogs.Validators.EmailList","Please specify a list of valid EMail addresses separated by space, comma or semicolon.")},required:u.Ay.val("Dialogs.Validators.Required","This field is required."),trackDirtyState:!0}),userComments:i.observable(""),subject:i.observable(d(n)),submit:function(e){if((0,c.validate)(e)){var n={to:e.to().split(l),userComments:e.userComments(),subject:e.subject()};t.hide(r.d.Ok,n)}else e.to.notifySubscribers()},cancel:function(){t.hide(r.d.Cancel)},shareUsingPersonalEmail:function(e){(0,o.assign)(n,{to:e.to(),subject:e.subject(),userComments:e.userComments()}),function(e){return a.A.mailTo.available()?a.A.mailTo.activate(null,e):Promise.reject(new Error("action is not available"))}(n).then((function(){return t.hide(r.d.Cancel)}))}};return s}t.A={show:function(e){var t=void 0===e?{}:e,n=t.parent,i=t.context;return new Promise((function(e){var t=s.default.createInstance(n),r={templateName:"v7.Client.Dialogs.ShareEmail",model:h({dialog:t,context:i}),name:"ShareEmailDialog"};t.onHide((function(t,n){e(n)})),t.show(r)}))}}},41396:function(e,t,n){"use strict";n.d(t,{A:function(){return w}});var i=n(58932),r=n(29392),o=n(20847),a=n(42222),s=n(27189),u=n(68092),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype.item=function(){return this._getItem("manageaccount","Menu.Account.MyAccount","pri pri-account")},t.prototype.available=function(){return Promise.all([s.A.loaded(),(0,u.z)()]).then((function(e){var t=(0,i.zs)(e,2)[1],n=t&&t.maxSessionRequired;return s.A.get("pagesView.enableMyAccountMenu")&&!n}))},t.prototype.enabled=function(){return Promise.resolve(!0)},t.prototype.activate=function(){var e=this;s.A.loaded().then((function(){e._parent.hide(),window.location=s.A.get("Authentication.ExternalMyAccountPage")||"".concat(window.basePath,"accounting/account")}))},t}(a.A),l=c,d=(n(70989),n(86699),n(72167)),h=n(2215),f=n(6698),p=(n(84901),n(29583)),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype.item=function(){return this._getItem("signout","Viewer.SignOut","pri pri-logout")},t.prototype.available=function(){return Promise.resolve(!0)},t.prototype.enabled=function(){return Promise.resolve(!0)},t.prototype.activate=function(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return this._parent.hide(),[4,d.default.signOut()];case 1:return e.sent()&&(h.A.enableOriginalLanguage(),f.A.toolbarSetup(p("#toolbarTop"))),[2]}}))}))},t}(a.A),g=m,v=n(91552).A.list,y=r.Ay.view,_=o.A.base,b=[l,g],w=new(function(e){function t(){var t=e.call(this)||this;return t._menu=new y(t),t}return(0,i.C6)(t,e),t.prototype.renderer=function(){var e=this,t=new v(this).title("").headerEnable(!1),n=b.map((function(t){return new t(e)})).map((function(e){return e.available().then((function(t){return t?e:null}))}));return Promise.all(n).then((function(e){return e.filter((function(e){return null!==e})).map((function(e){return e.item()}))})).then((function(e){return e.forEach((function(e){t.addItem(e)})),t}))},t}(_))},45676:function(e,t,n){"use strict";var i,r=n(29583),o=n(12010),a=n(13302),s=n(44260),u=n(29392),c=n(47450),l=n(20847),d=n(91552),h=((i={view:{},sort:{}}).view[r.nd.catalogViewType.list]={title:"Menu.Item.List",available:!1},i.view[r.nd.catalogViewType.small_grid]={title:"Menu.Item.SmallGrid",available:!0},i.view[r.nd.catalogViewType.grid]={title:"Menu.Item.Grid",available:!0},i.view[r.nd.catalogViewType.newsstand]={title:"Menu.Item.Newsstand",available:!0},i.sort[r.nd.catalogSortType.by_alphabet]={title:"Menu.Item.ByAlphabet",available:!0,css:"pri pri-alphabeth"},i.sort[r.nd.catalogSortType.most_popular]={title:"Menu.Item.MostPopular",available:!0,css:"pri pri-popular"},i.sort[r.nd.catalogSortType.most_current]={title:"Menu.Item.MostCurrent",available:!0,css:"pri pri-recent"},i);function f(e){var t=this;t._menu=new u.Ay.view(this),t._viewState=e.view,t._sortState=e.sort,t._isSortMenuAvailable=e.isSortMenuAvailable}r.extend(f.prototype,l.A.base.prototype,{renderer:function(e){var t=this,n=(e=e||{}).options||[],i=new d.A.list(this).headerEnable(!1).title(e.title||"").width("320px");if(!a.isFunction(t._isSortMenuAvailable)||t._isSortMenuAvailable()){var r=i.addGroup();a.forEach(n.sort,(function(e){var n=h.sort[e];if(n&&n.available){var i=new c.A.radio(void 0,s.Ay.val(n.title),n.css);i.value=e,i.checked=o.computed({read:function(){return t._sortState()===e},owner:t}),i.enabled=o.observable(!0),i.onClick=function(e){t._sortState(e.value),t.hide()},r.add(i)}})),i.addGroup("","list-div")}var u=i.addGroup();return a.forEach(n.view,(function(e){var n=h.view[e];if(n&&n.available){var i=new c.A.radio(void 0,s.Ay.val(n.title),n.css);i.value=e,i.checked=o.computed({read:function(){return t._viewState()===e},owner:t}),i.enabled=o.observable(!0),i.onClick=function(e){t._viewState(e.value),t.hide()},u.add(i)}})),i}}),t.A=f},4497:function(e,t,n){"use strict";n.d(t,{h:function(){return U}});var i=n(12010),r=n(29583),o=n(13302),a=n(43125),s=n(28057),u=n(67303),c=n(72167),l=n(46977),d=n(75380),h=n(93018),f=n(70989),p=n(65678),m=n(44260),g=n(11261),v=n(84901),y=n(34466),_=n(2215),b=n(60713),w=n(91552),C=n(29392),A=n(26190),I=n(20847),S=(n(55683),n(13532)),P=n(89885),x=n(65263),T=n(82788),k=n(93134),E=n(25890),M=n(18429),D=n(37399),N=n(27189),L=n(60798),V=n(86699);function R(e,t,n,i,r){return(0,o.reduce)(t,(function(t,o){return t.then((function(){return function(e,t,n,i,r){if(!t)return Promise.resolve();var o=r[t];if("function"==typeof o){var a=new o(i);return Promise.resolve(a.available()).then((function(t){t&&("function"==typeof a.addItems?a.addItems(e,n):e.addItem(a.item(),n))}))}return Promise.resolve()}(e,o,n,i,r)}))}),Promise.resolve())}var H,F=n(13981),B=n(61445),z=((H={})[P.DA.interfaceLang]=b.A.get("language"),H[P.DA.fonts]=b.A.get("fonts"),H[P.DA.autoTranslate]=b.A.get("autoTranslate"),H[P.DA.togglePervasive]=b.A.get("togglePervasive"),H);function O(){this._menu=new C.Ay.view(this)}Object.assign(O.prototype,I.A.base.prototype,{renderer:function(e){var t=(e=e||{}).options||[],n=e.generalOptions||[],i=new C.Ay.renderers.list(this).title(e.title||"").width("320px");return Promise.all([R(i,t,void 0,this,z),R(i,n,m.Ay.val("Menu.Item.General","General"),this,z)]).then((function(){return i}))}});var j,U=new O;function W(e,t){var n=t.code(),r=t.title(),o=f.A.getActiveViewName();o!==p.lP.PagesView&&o!==p.lP.TextView||u.A.contentLanguage()!==n?this.code=n:r=m.Ay.format("Menu.OriginalLanguage",r),C.Ay.items.radio.call(this,e,r),this.checked=i.computed(this._checked,this)}function Y(){for(var e=[],t=0;t0&&(U.hide(),"email"===e.shareType?x.A.shareEmail({articleId:u.A.articles()[0].Id,contentType:"article"}):x.A.share({articleId:u.A.articles()[0].Id,contentType:"article"},e.shareType))}}),Object.assign(J.prototype,C.Ay.items.radio.prototype,{onClick:function(){this.controller().uncheckAll(),this.checked(!0)}}),Object.assign(Q.prototype,b.A.base.prototype,{item:function(){return this._item||(this._item=new q(this,m.Ay.val("Menu.Issue.IssueDate")).css("pri pri-date").bind(this.activate.bind(this))),this._item},hide:function(){this._parent.hide()},back:function(){this._parent.back()},available:function(){return!0},enabled:function(){return!0},done:function(){this._parent.hide();var e=this._parent.menu().position(),t=window.document.documentElement.clientWidth,n={isBrief:!this.isBrief,position:{x:t/2,y:e.top,align:{x:C.Ay.align.center,y:C.Ay.align.top}}},i=new I.A.singleItem(n);i.itemsControllerCTOR(b.A.get("issueDate")).itemsControllerParams([i]),i.show(n)},activate:function(){var e=this;T.X.send(new E.kh({action:"issue-date"}));var t=new w.A.list(this).title(m.Ay.val("Menu.Issue.IssueDate")),n=this._parent._config||{};Promise.all([N.A.loaded(),L.A.load(u.A.cid())]).then((function(){t.title().template("issueDate");var i=L.A.getData();if(t.title().enableChangeView=i.EnableCalendarView&&i.EnableListView,e.isBrief=i.EnableCalendarView&&i.EnableListView?n.isBrief:i.EnableListView,e.enableCalendarView=i.EnableCalendarView,e.enableListView=i.EnableListView,e.isBrief){var o=t.addGroup().scrollable(!0),a=[];for(var s in i.Years)if(i.Years.hasOwnProperty(s)){var u=i.Years[s];for(var c in u)if(u.hasOwnProperty(c)){var l=u[c];for(var d in l)if(l.hasOwnProperty(d)){var h=new Date(parseInt(s),parseInt(c)-1,parseInt(d));a.push(new G(e,h,i.Years[s][c][d],i.EnableFullDateView))}}}for(var y=a.length;y--;)o.add(a[y]);e._parent.showSubmenu(t)}else{t.title().backTitle(m.Ay.val("Buttons.Cancel.Text")),t.addCustomGroup("v7.Client.Menu.IssueCalendar"),e._parent.showSubmenu(t);var _=r("#issueCalendar").attr("dir",N.A.get("ui.Calendar.dir","ltr"));r.nd.ui.issuesCalendar.show(_,L.A.getData()).onChange.subscribe((function(t){e._parent.hide();var n=f.A.getActiveViewName();switch(n){case p.lP.ReadingMap:case p.lP.PagesView:case p.lP.TextView:v.A.goView(n,{issue:t});break;default:g.A.showIssue(t)}}))}}))}}),b.A.register("issueDate",Q),Object.assign(Z.prototype,b.A.base.prototype,{item:function(){this._item||(this._item=new Y(this,m.Ay.val("Menu.Translate")).css("pri pri-translate").bind(this.activate.bind(this)));var e=_.A.current.language();return this._item.translateLanguageCode(e?e.code():null),this._item},back:function(){this._parent.back()},hide:function(){this._parent.hide()},available:function(){return y.A.getAsync(y.A.restrictionTypes.translation).then((function(e){return e===y.A.restrictionResults.ALLOWED}),(function(){return!1}))},enabled:function(){return!h.A.issueIsDisplayed()||(0,d.Jr)("Translation",u.A.cid(),u.A.issue())},_isContentLanguageCode:function(e){return h.A.issueIsDisplayed()&&u.A.contentLanguage()===e},_addLanguages:function(e,t,n){for(var i=0;i0?(i=(0,o.filter)(i,(function(t){return e._isContentLanguageCode(t.code())||!t.isRtl()})),e._addLanguages(i,n,t)):(0,l.A)().show(m.Ay.val("Messages.TheLanguageIsNotSupported"))}))},activate:function(){var e=this;this.loading||(this.loading=!0,T.X.send(new E.kh({action:"translate"})),y.A.getAsync(y.A.restrictionTypes.translation).then((function(t){return t===y.A.restrictionResults.RESTRICTED?(e.hide(),c.default.signIn(),null):e._loadLanguages()})).catch((function(e){ndLogger.error(e)})).finally((function(){e.loading=!1})))}}),b.A.register("issueTranslate",Z),Object.assign($.prototype,b.A.base.prototype,{item:function(){return this._item||(this._item=new C.Ay.items.item(this,m.Ay.val("Buttons.Listen")).css("pri pri-listen").bind(this.activate.bind(this))),this._item},back:function(){this._parent.back()},available:function(){return!!N.A.get("ui.Listen.enable",!0)&&(f.A.getActiveViewName()!==p.lP.PagesView||u.A.issue()&&!(0,o.isEmpty)(u.A.articles()))},enabled:function(){return!!N.A.get("ui.Listen.enable",!0)&&(!h.A.issueIsDisplayed()||(0,d.Jr)("Sound",u.A.cid(),u.A.issue()))},activate:function(){T.X.send(new E.kh({action:"listen"}));var e=null,t=f.A.getActiveViewName(),n=f.A.getActiveView();t!==p.lP.PagesView&&t!==p.lP.TextView?e=(n.firstAvailableArticleToListen()||{}).Id:u.A.articles().length>0&&(e=u.A.articles()[0].Id),e&&(this._parent.hide(),v.A.goView(p.lP.Radio,{articleId:e}))}}),Object.assign(ee.prototype,b.A.base.prototype,{item:function(){return this._item||(this._item=new C.Ay.items.item(this,m.Ay.val("Menu.Share")).css("pri pri-share").bind(this.activate.bind(this))),this._item},back:function(){this._parent.back()},available:function(){return!0},enabled:function(){return!0},activate:function(){var e=this,t=new w.A.list(this).title("Share Issue"),n=t.addGroup().scrollable(!0);(0,d.Jr)("Blogging",null,u.A.issue()).then((function(t){t&&(n.add(new K(e,"Facebook","pri pri-facebook","facebook")),n.add(new K(e,"X","pri pri-twitter","twitter")),n.add(new K(e,"Evernote","pri pri-evernote","evernote")),n.add(new K(e,"OneNote","pri pri-onenote","onenote")),n.add(new K(e,"Instapaper","pri pri-instapaper","instapaper")))})),(0,d.Jr)("EmailSharing",null,u.A.issue()).then((function(t){t&&n.add(new K(e,"Email","pri pri-email","email"))})),this._parent.showSubmenu(t)}}),Object.assign(te.prototype,b.A.base.prototype,{item:function(){return this._item||(this._item=new C.Ay.items.item(this,m.Ay.val("Buttons.DownloadToDevice.Text")).css("pri pri-download").bind(this.activate.bind(this))),this._item},back:function(){this._parent.back()},done:function(){var e=[];i.utils.arrayForEach(this._group.items(),(function(t){t.checked()&&e.push(t.activationId)})),e.length>0&&M.A.download(u.A.issue(),e)},available:function(){return!0},enabled:function(){return!0},hide:function(){this._parent.hide()},activate:function(){var e=this;T.X.send(new E.kh({action:"download"})),M.A.onFinished((function(){return e._parent.hide()})),M.A.onChooseActivation((function(t,n){if(!(0,o.isEmpty)(n)){var r=new C.Ay.renderers.list(e).title(m.Ay.val("Menu.Item.DirectDownload")).canBeDone(!0);e._group=r.addGroup(m.Ay.val("Menu.Issue.DeliveredTo"),"group").footerText(m.Ay.val("Menu.DownloadIssue.ToHave")).scrollable(!0),i.utils.arrayForEach(n,(function(t){e._group.add(new X(e,t.Name,t.Id))})),e._group.items()&&(r.disableDone=i.computed((function(){return!i.utils.arrayFirst(e._group.items(),(function(e){return e.checked()}))}))),e._parent.showSubmenu(r)}})),M.A.download(u.A.issue())}}),b.A.register("issueDownload",te),Object.assign(ne.prototype,b.A.base.prototype,{item:function(){return this._item||(this._item=new C.Ay.items.item(this,m.Ay.val("Menu.Item.Export2EReader")).css("pri pri-exportereader").bind(this.activate.bind(this))),this._item},back:function(){this._parent.back()},done:function(){var e=i.utils.arrayFirst(this._group.items(),(function(e){return e.checked()}));e&&(D.A.addExportRequest(e.ticket),this._parent.hide())},available:function(){return V.A.isLogin()&&u.A.issue()&&u.A.enableSmart()},enabled:function(){return!0},hide:function(){this._parent.hide()},activate:function(){var e=this;T.X.send(new E.kh({action:"export-ereader"})),D.A.getDeviceTypes(u.A.issue()).then((function(t){var n=new C.Ay.renderers.list(e).title(m.Ay.val("Buttons.Export")).canBeDone(!0);e._group=n.addGroup(m.Ay.val("Menu.Issue.SelectDevice"),"group").scrollable(!0),i.utils.arrayForEach(t,(function(t){e._group.add(new J(e,t.Name,t.Ticket))})),e._group.items()&&(n.disableDone=i.computed((function(){return!i.utils.arrayFirst(e._group.items(),(function(e){return e.checked()}))}))),e._parent.showSubmenu(n)})).catch((function(){return e._parent.hide()}))},uncheckAll:function(){i.utils.arrayForEach(this._group.items(),(function(e){return e.checked(!1)}))}}),b.A.register("export",ne),Object.assign(ie.prototype,b.A.base.prototype,{item:function(){var e=this;return this._item||(this._item=new C.Ay.items.item(this).bind(this.activate.bind(this)),this._item.template("addToFavorites"),this._item.text=i.observable(""),this._item.cssString=i.observable(""),this._item.rootCss="addtofavor"),s.A.stream.subscribe((function(t){t.contains(u.A.cid())?(e._item.text(m.Ay.val("Menu.Item.RemoveFavoriteIssue")),e._item.cssString("pri pri-favoring"),e._actionName="remove-from-favorites"):(e._item.text(m.Ay.val("Menu.Item.AddToFavorites")),e._item.cssString("pri pri-favor"),e._actionName="add-to-favorites")})),this._item},available:function(){return!(0,F.Lt)(B.N$)},enabled:function(){return!0},activate:function(){var e=this;this.inProgress||(this.inProgress=!0,T.X.send(new E.kh({action:this._actionName})),s.A.togglePublication(u.A.cid()).finally((function(){e.inProgress=!1})))}}),Object.assign(re.prototype,b.A.base.prototype,{available:function(){return j.isAvailable()},enabled:function(){return j.isEnabled()},addItems:function(e){var t=e.addGroup(m.Ay.val("Menu.Items.ReadingMap","Reading Map")),n=new C.Ay.items.radio(this,m.Ay.val("Menu.Item.Off","Off")).bind(this._setState.bind(this,0));n.checked=i.computed(this._checked.bind(this,0)),t.add(n),(n=new C.Ay.items.radio(this,m.Ay.val("Menu.Item.AttentionMap","Attention Map")).bind(this._setState.bind(this,1))).checked=i.computed(this._checked.bind(this,1)),t.add(n),(n=new C.Ay.items.radio(this,m.Ay.val("Menu.Item.ReadingTimeMap","Reading Time Map")).bind(this._setState.bind(this,2))).checked=i.computed(this._checked.bind(this,2)),t.add(n),t.add(new C.Ay.items.item(this,m.Ay.val("Menu.Item.Thumbnails","Thumbnails")).bind(this._showThumbnailsView.bind(this)))},_state:null,_setState:function(e){switch(this._state(e),e){case 0:j.hide();break;case 1:j.show(P.KF.attentionMap);break;case 2:j.show(P.KF.readingTime);break;case 3:j.show(P.KF.adValue)}},_checked:function(e){return this._state()===e},_showThumbnailsView:function(){this._parent.hide(),v.A.goView(p.lP.ReadingMap,{issue:u.A.issue()})}}),Object.assign(oe.prototype,b.A.base.prototype,{item:function(){return this._item||(this._item=new C.Ay.items.item(this,m.Ay.val("Menu.Account.EmailAlerts")).css("pri pri-alerts").bind(this.activate.bind(this))),this._item},available:function(){return V.A.isLogin()&&N.A.get("ui.Sidebar.ShowEmailAlerts",!0)},enabled:function(){return V.A.isLogin()&&N.A.get("ui.Sidebar.ShowEmailAlerts",!0)},activate:function(){this._parent.hide(),v.A.goView(p.lP.EmailAlerts)}}),z[P.DA.issueDate]=Q,z[P.DA.lang]=Z,z[P.DA.listen]=$,z[P.DA.share]=ee,z[P.DA.download]=te,z[P.DA.export]=ne,z[P.DA.addToFavorites]=ie,z[P.DA.readingMap]=re,z[P.DA.emailAlerts]=oe},86699:function(e,t,n){"use strict";var i=n(29583),r=n(27189),o=n(96543),a=n(82230),s=(n(91717),n(58735)),u=n(61890),c=n(89247),l=new i.nd.baseLoader;function d(){o.A.trigger("onuserstatechanged",f)}function h(e){if(e){var t="",n=(0,c.DT)(),o="pagesView.Redirection.";switch(r.A.get(o+e+".Type")){case"1":t=n;break;case"2":t=decodeURIComponent(i.nd.navHistory.getReturnUrl());break;case"3":t=n+r.A.get("catalog.MasterCid");break;case"4":t=n+"latest";break;case"5":t=n+r.A.get(o+e+".Cid");break;case"6":t=r.A.get(o+e+".Url")}return t}}s.bind("tokenUpdated",d);var f={loader:l,userStateChanged:d,onUserStateChanged:function(e){o.A.bind(f,"onuserstatechanged",null,e)},userLocalesChanged:function(){o.A.trigger("onuserlocaleschanged",f)},onUserLocalesChanged:function(e){o.A.bind(f,"onuserlocaleschanged",null,e)},isLogin:function(){return(0,u.x)()},getSmartEditorUrl:function(e,t){return a.A.get("smartEditor","getEditUrl",{issueInfoId:e,page:t})},getLatestReadIssues:function(){return a.A.get("user","GetLatestReadIssues").then((function(e){return function(e){for(var t=[],n=0;n0},t.isIssueRestrictedBy=function(e){return r.get(this.issueRestrictions(),e,!1)},t.hasVisiblePages=function(){return r.some(this.pages.getPages(),(function(e){return!e.isRestrictedMode()}))},t.hasRestriction=function(e){return this.issue()?(0,u.Ez)(e,null,this.issue()):Promise.resolve(!1)};var n={switchToDefault:function(){return this.current(this.defaultZoom())},switchToMDefault:function(){return this.current(this.defaultMZoom())},defaultZoom:function(){return this._defaultZoom},defaultMZoom:function(){return this._defaultMZoom},zooms:function(){return this._zooms},current:function(e){return 0==arguments.length?this._current||this.defaultZoom():(this._current&&(this._current.isCurrent=!1),this._current=e||this.defaultZoom(),this._current&&(this._current.isCurrent=!0),this)},next:function(){return this._current?this._zooms[this._current._idx+1]:null},prev:function(){return this._current?this._zooms[this._current._idx-1]:null},_indexOf:function(e,t){for(var n=0;n1?1:-1,a=this._indexOf(n,i)+o,s=i[a];if(s){for(var u=Math.abs(r-s.maxHeight);s;){var c=i[a+=o];if(!c)return s;var l=Math.abs(r-c.maxHeight);if(l>u)return s;s=c,u=l}return s||n}}return n},_comp:function(e,t){return e>t?1:e=u)break;var v={maxWidth:0,maxHeight:m,_idx:_.length};a.push(v),g/s>=c&&u/g>=c&&(_.push(v),s=g)}}for(p=0;p=0;p--)if(_[p].zoomIdx==this._current.zoomIdx){d=_[p];break}d||(d=this._defaultMZoom)}else{var b;for(p=0;p<_.length;p++){if(_[p].maxHeight>=this._current.maxHeight){d=_[p];break}if(_[p].isMZoom)break;b=_[p]}d||(d=b||this._defaultZoom)}}return this.current(d||this._defaultZoom)}};return t}();function d(e,t){return void 0!==t&&e?e[t]():e}function h(e,t){this._pages=e,this._idx=t,this._views=[],this.isInited(!1)}h.prototype=h.fn={disable:function(){return this.pageInfo(null).isActive(!1).isInited(!1)},setPageType:function(e,t){return this.isSpread(1!=e).isSpreadLeft(2==e).isSpreadRight(3==e),this.pageType(e).isFirst(0==this._idx).isLast(t),this.isLast()&&(this._nextPage=null),this._leftPage=this._rightPage=null,this},pageInfo:function(e,t,n){return 0==arguments.length?this._info:(this._info=e,3==arguments.length&&this.setPageType(t,n),this)},bgcolor:function(){var e=l.bgcolor()||"#fff";return e.length>0&&"#"!=e.charAt(0)&&(e="#"+e),e},isSingleLayer:function(){return l.isSingleLayer()},addView:function(e,t){return t&&(this._views.push(t),e&&(this[e]=function(){return t})),this},leftPageIfSpread:function(e){return d(this._isSpreadRight?this.leftPage():this,e)},rightPageIfSpread:function(e){return d(this._isSpreadLeft?this.rightPage():this,e)},otherSpread:function(e){return d(this._isSpreadLeft?this.nextPage():this._isSpreadRight?this.prevPage():null,e)},nextPage:function(e){var t=this._nextPage;return t||(t=this._nextPage=this._pages.nextPage(this)),d(t,e)},nextSpread:function(e){var t=this.nextPage();return t&&t._isSpreadRight&&(t=t.nextPage()),d(t,e)},prevPage:function(e){var t=this._prevPage;return t||(t=this._prevPage=this._pages.prevPage(this)),d(t,e)},leftPage:function(e){var t=this._leftPage;return t||(t=this._leftPage=this._pages.leftPage(this)),d(t,e)},rightPage:function(e){var t=this._rightPage;return t||(t=this._rightPage=this._pages.rightPage(this)),d(t,e)},calculateZoomScale:function(e,t){return e.isMZoom?this.calculateMagnifierScale(e.zoomIdx):this.calculateScale(e.maxWidth,e.maxHeight,t||!e.disableRestrictedScales)},getZoomInfo:function(e){var t=!1;e.isDefaultZoom&&(this.isPotentiallyRestrictedMode()||this.hasPreviewKey())&&(t=!0);var n=this.calculateZoomScale(e,t),i=this.confirmRequiredForZoom(e,n);if(i&&t&&this.hasPreviewKey()){i=!1;var r=!0}return{zoom:e,scale:n,size:this.calculateSize(n),zoomMode:!0===e.isMZoom,confirmRequired:i,usePreviewKey:r}},calculateScale:function(e,t,n){var i=1e5,r=this;(!e||e<0)&&(e=1e5),(!t||t<0)&&(t=1e5),!r.maxUnrestrictedScale()||r.key()||n||(i=r.maxUnrestrictedScale());for(var o=r.width(),a=r.height(),s=l.heights(),u=s.length-1;u>=0;u--){var c=s[u];if(c<=t){var d=Math.floor(100*c/a);if(d<=i&&(e>=1e5||Math.floor(o*d/100)<=e))return d}}return Math.floor(100*s[0]/a)},calculateThumbScale:function(e,t,n){if(void 0===n&&(n=!1),!e&&!t)return 0;var i,r=this,o=r.width(),a=r.height(),s=r.pageInfo(),u=s.maxUnrestrictedPageSize,c=s.pageSizes;if(!(1!==r.pageNumber()&&n&&u&&(u.W||u.H)&&c&&c.length)){if(e)return Math.floor(100*e/o);if(t)return Math.floor(100*t/a)}return c.forEach((function(n){var r,s;(n.W||n.H)&&(n.W?s=(r=n.W)*a/o:r=(s=n.H)*o/a,u.W&&r>u.W||u.H&&s>u.H||(!i||e&&Math.abs(e-r)i.w||t&&Math.abs(t-s)i.h)&&(i={w:r,h:s}))})),i?Math.floor(100*i.w/o):0},calculateMagnifierScale:function(e){var t=l.magnifierPageSizes()[e];return t?Math.floor(Math.min(100*t.W/this.width(),100*t.H/this.height())):0},setKeyInfo:function(e,t){t?(this.previewKey(e),this.key(null)):(this.previewKey(null),this.key(e))},hasKey:function(){return"string"==typeof this.key()},hasPreviewKey:function(){return"string"==typeof this.previewKey()},confirmRequired:function(e){var t=this.maxUnrestrictedScale();return!(t<=0||e<=t||this.hasKey())},confirmRequiredForZoom:function(e,t){return!(e.isDefaultZoom||!this.isPotentiallyRestrictedMode())||this.confirmRequired(t||this.calculateZoomScale(e))},isRestrictedMode:function(){return!(this.hasKey()||this.hasPreviewKey())},isPotentiallyRestrictedMode:function(){return!l.coudlIssueBeRead()&&this.isRestrictedMode()},calculateSize:function(e){return{width:Math.round(e*this.width()/100),height:Math.round(e*this.height()/100)}},buildUrl:function(e,t,n,r){var o=this.key(),a=this.ver(),s=this.maxUnrestrictedScale();if(r&&r.usePreviewKey&&(o=o||this.previewKey()),n&&i.support.retina&&!this.isPotentiallyRestrictedMode()){var u=this.calculateSize(e),c=this.calculateScale(2.1*u.width,2.1*u.height,!!o);if(c&&c>e){e=c;var d="&retina=2&targetWidth="+u.width}}var h=o&&s>0&&e>s,f=h?i.nd.config.get("imageServers.largePages"):i.nd.config.get("imageServers.pages");return f[this._idx%f.length]+"?file="+l.issue()+"&page="+this.pageNumber()+"&scale="+e+(t?"&layer="+t:"")+(a?"&ver="+a:"")+(h?"&ticket="+encodeURIComponent(o):"")+(d||"")},buildMagnifierUrl:function(e,t,n){var r,o,a,s=this.key(),u=this.ver(),c=this.maxUnrestrictedScale(),d=s&&c>0&&e>c,h=d?i.nd.config.get("imageServers.zoomPages"):i.nd.config.get("imageServers.pages");return t?(r=t.id%h.length,o="&left="+t.l+"&top="+t.t+"&right="+t.r+"&bottom="+t.b,a="fg"):(r=this._idx%h.length,o="",a="bg"),!0===n&&(a=null),h[r]+"?file="+l.issue()+"&page="+this.pageNumber()+"&scale="+e+o+(a?"&layer="+a:"")+(u?"&ver="+u:"")+(d?"&ticket="+encodeURIComponent(s):"")},buildThumbUrl:function(e){return(0,s.F6)(l.issue(),e,this.pageNumber(),this.ver())},buildPictureUrl:function(e,t,n){return(0,s.N5)(l.issue(),t,n,e,this.ver())},articles:function(){var e=this.layout();return e?e.Articles:null},layout:function(e){return arguments.length>0?(this._pageLayout=e,this.isInited(!!e),this):this._pageLayout},pageName:function(){return this.layout().PageName},pageNumber:function(){return this.layout().PageNumber},section:function(){return this.layout().SectionName},width:function(){return this.layout().Width},height:function(){return this.layout().Height},loaded:function(){return null!=this._info},areas:function(){for(var e=[],t=this.height(),n=this.width(),i=0;ii._idx||!r&&d._idx=0;--i){var r=e[i];(o=this.getPage(r)).isActive(!0),n[r]=!0}for(i=t.length-1;i>=0;--i){var o;n[(o=t[i]).pageNumber()]||o.isActive(!1)}p()},firstPage:function(){return this.pagesCount()>0?a[0]:null},lastPage:function(){return a[this.pagesCount()-1]},nextPage:function(e){return e&&!e.isLast()?a[e._idx+1]:null},prevPage:function(e){return e&&!e.isFirst()?a[e._idx-1]:null},mostLeftPage:function(){return this[e.contentIsRtl()?"lastPage":"firstPage"]().leftPageIfSpread()},mostRightPage:function(){return this[e.contentIsRtl()?"firstPage":"lastPage"]().rightPageIfSpread()},leftPage:function(t){return this[e.contentIsRtl()?"nextPage":"prevPage"](t)},rightPage:function(t){return this[e.contentIsRtl()?"prevPage":"nextPage"](t)},getPageByIdx:function(e){return a[e]},getPage:function(e){return a[e-1]},getPages:function(){return a||[]},getViews:function(e){return r.map(this.getPages(),(function(t){return t[e]()}))},getFirstActivePage:function(){var e,t=this.activePages();return t&&(e=t).length>0?e[0]:void 0},getLastActivePage:function(){var e,t=this.activePages();return t&&(e=t).length>0?e[e.length-1]:void 0},resetKeyInfos:function(){i.each(a,(function(e,t){t.previewKey(null),t.key(null)}))},addViewFactory:function(e,t){return e&&t&&(s.push({name:e,fun:t}),i.each(a,(function(n,i){i.addView(e,t(i))})),e=t=void 0),this},gotoToPage:function(e,t){var n=i.Event("gotoPageCalled");return n.articleId=t,"number"==typeof e?e=this.getPage(e):"string"==typeof e&&(e=this.getPage(parseInt(e,10))),o=n.page=e,this.fireGotoPageCalled(n)},load:function(){return t?t.promise():Promise.resolve()},loadToc:m};return i.nd.extendObjectWithEvents(g,"gotoPageCalled"),i.nd.extendObjectWithProperties(g,"pagesCount,loaded,loading,activePages",!0,!0,!0),g}(l);l.pages=f;var p=f;t.A=l},90310:function(e,t,n){"use strict";var i=n(13302),r=n(92066),o=n(88089),a=n(27189),s=n(79341),u=n(39108),c=n(14359),l=n(84901),d=n(28027),h=n(96543),f=n(19939),p=n(66795),m=u.A.view,g=function(){function e(e){void 0===e&&(e={}),this._context=new r.o,this._defaultItemPreviewSizeFunction="generalArticle",this._onlineItemsLoader=f.tz,this._enableHistory=!1,this._builderConfig={},this.params=e,this.viewName=null}return e.prototype.init=function(e){this._context.textViewContainer=this._container=e},e.prototype.show=function(e){r.o.current=this._context;var t=(0,i.assign)({},e);e&&e.ignoreDataReset||this._contentProvider.reset(),this._builder.reset(),this._controller.enable().show(t)},e.prototype.reset=function(){this._contentProvider.reset()},e.prototype.applyFilter=function(){this.reset()},e.prototype.disable=function(){this._controller.disable()},e.prototype.hide=function(){this._controller.hide()},e.prototype.visibleArticles=function(){this._controller.visibleArticles()},e.prototype.firstAvailableArticle=function(){return this._controller.firstAvailableArticle()},e.prototype.firstAvailableArticleToListen=function(){return this._controller.firstAvailableArticleToListen()},e.prototype.resetState=function(e){this._controller.resetState(e)},e.prototype.getLeftPanelConfig=function(){var e=d.A.getPanelConfig(this._viewConfig);return this.params.issueIntroDisabled=!!e.issueIntroDisabled,e},e.prototype.saveViewConfig=function(e){this._viewConfig=e,h.A.global.trigger("viewUrlChanged",this._viewConfig)},e.prototype.getViewConfig=function(){return this._viewConfig},e.prototype.showView=function(e){return this.show(e),Promise.resolve()},Object.defineProperty(e.prototype,"_contentProvider",{get:function(){return this.__contentProvider||this._createAll(),this.__contentProvider},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_builder",{get:function(){return this.__builder||this._createAll(),this.__builder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_view",{get:function(){return this.__view||this._createAll(),this.__view},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_controller",{get:function(){return this.__controller||this._createAll(),this.__controller},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_statsManager",{get:function(){return this.__statsManager||this._createAll(),this.__statsManager},enumerable:!1,configurable:!0}),e.prototype._onViewStateChanged=function(e,t){if(t.id){var n={itemId:t.id,type:t.type,expanded:t.expanded,articleHistoryToken:t.articleHistoryToken||0,currentArticlePosition:t.articlePosition};l.A.updateState(n)}},e.prototype._createContentProvider=function(){var e=new o.A;return e.onlineListLoader=this._onlineListLoader,e.onlineItemsLoader=this._onlineItemsLoader,e},e.prototype._createBuilder=function(){var e=this._builderConfig;return e.itemPreviewSizeFunction||(e.itemPreviewSizeFunction=a.A.get(this._itemPreviewSizeFunctionConfig,this._defaultItemPreviewSizeFunction)),new s.A(e)},e.prototype._createView=function(){return new m(this._container,this._context)},e.prototype._createController=function(e,t,n,i){return new c.A(e,t,n,i).on("viewStateChanged",this._onViewStateChanged.bind(this))},e.prototype._createStatsManager=function(e,t){return new p.A(t,this.viewName,e,this._enableHistory)},e.prototype._createAll=function(){var e=this.__contentProvider=this._context.contentProvider=this._createContentProvider(),t=this.__builder=this._context.textViewColumnsBuilder=this._createBuilder(),n=this.__view=this._createView();this.__controller=this._context.textViewController=this._createController(e,t,n,this.params),this.__statsManager=this._createStatsManager(e,n)},e}();t.A=g},26637:function(e,t,n){"use strict";n.d(t,{A:function(){return ft}});var i=n(12010),r=n(13302),o=n(22537),a=n(27189),s=n(55383),u=n(58932),c=n(29583),l=n(96543),d=n(89885),h=n(65678),f=n(44260),p=n(86699),m=n(11261),g=n(84901),v=n(90006),y=n(45235),_=n(56096),b=n(97433);function w(e,t,n){var i,o,a,s,l,d,h=this,f=c(t);function p(e,t){(0,r.forEach)(e,(function(e){var n=e.style;n.webkitTransform=t,n.MsTransform=t,n.msTransform=t,n.MozTransform=t,n.OTransform=t,n.transform=t}))}function m(e){d||(e=0),b.b.csstransforms3d?p(f,"translate3d(".concat(e,"px, 0, 0)")):p(f,"translate(".concat(e,"px,0)"))}function g(e,t){var n=(0,r.isString)(t)?t:"".concat(t,"ms");(0,r.forEach)(e,(function(e){var t=e.style;t.webkitTransitionDuration=n,t.MsTransitionDuration=n,t.msTransitionDuration=n,t.MozTransitionDuration=n,t.OTransitionDuration=n,t.transitionDuration=n}))}h.setPanelVisibility=function(e){var t;if(s&&s.wrapperEl&&f){var n=f.width();e?(m(0),t=n):(m(-n),t=0),s.wrapperEl&&c(s.wrapperEl).css("padding-left","".concat(t,"px"))}},h.enablePanel=function(e){d=e,m(0)},h.panelWidth=function(){return f.width()},h.getSwiper=function(){return s},function(t){var n=(0,u.Cl)((0,u.Cl)({},t),{on:(0,u.Cl)((0,u.Cl)({},t.on),{touchStart:function(){l&&!o&&(i=l.position().left,o=!0,g(f,0))},setTransition:function(e){o||(a=e)},setTranslate:function(e){if(!o)if(e<0){var t=Math.floor(e-i);if(0!==t&&f&&f.length){var n=f.position().left,r=Math.round(n+t);r>0&&(r=0),r!==n&&(g(f,a),m(r))}}else g(f,0),m(0)},touchEnd:function(){o=!1,l&&(i=l.position().left)},progress:function(){if(f&&0!==f.length&&l){var e=l.position().left,t=Math.floor(e-i);if(0!==t){var n=f.position().left,r=f.width(),o=Math.round(n+.6*t);o<-r&&(o=-r),o>0&&(o=0),o!==n&&(a=0,m(o),i=e)}}},transitionEnd:function(){l&&(i=l.position().left)}})});s=new _.A(e.containerSelector,n),l=c(s.wrapperEl)}(n)}var C,A,I,S=function(){function e(e){this.options=(0,r.extend)({container:"",cellWidth:i.observable(0),spacer:20,forceNumRows:0},e),this.container=c(this.options.container),this.geometry={}}return e.prototype.minCellHeight=function(){return.9*this.options.cellWidth()},e.prototype.maxCellHeight=function(){return 1.5*this.options.cellWidth()},e.prototype.updateGeometry=function(e){this.container=c(e?"".concat(e," ").concat(this.options.container):this.options.container);var t=this.container.find(".hub-section-content");return this.geometry.hContent=t.length>0?t.height():0,this.geometry.hContent||(this.geometry.hContent=this.container.height()),this.geometry.numRows=Math.max(Math.floor(this.geometry.hContent/(this.minCellHeight()+this.options.spacer)),Math.floor(this.geometry.hContent/(this.maxCellHeight()+this.options.spacer)))||1,this.options.forceNumRows&&(this.geometry.numRows=Math.min(this.options.forceNumRows,this.options.forceNumRows)),this.geometry.hGrid=this.geometry.numRows>0?Math.floor((this.geometry.hContent+this.options.spacer)/this.geometry.numRows):0,this.geometry.wGrid=this.options.cellWidth()+this.options.spacer,this.container},e.prototype.place=function(e,t,n,i){var o=this;if(this.updateGeometry(),this.geometry.hContent){t=(0,r.isUndefined)(t)?0:t,n=(0,r.isUndefined)(n)?0:n;var a=t;if(this.geometry.numRows>0){var s=this.geometry.hGrid-this.options.spacer,u=this.geometry.wGrid-this.options.spacer;(0,r.forEach)(e,(function(e,i){var r=c(e),a=i-n;if(!(a<0)){var l=Math.floor(a/o.geometry.numRows),d=a%o.geometry.numRows;r.css({top:d*o.geometry.hGrid,left:t+l*o.geometry.wGrid,height:s,width:u}),r.find(".page3-thumb").css("max-height",s),r.find("img").one("load",(function(e){c(e.target).closest(".sgi").removeClass("is-hidden")}))}}));var l=Math.ceil((e.length-n)/this.geometry.numRows);a=t+l*this.geometry.wGrid-this.options.spacer}!v.A.isCompactScreen()&&(0,r.isFunction)(this.panelWidth)&&(a+=this.panelWidth()),i?this.container.find(i).width(a):this.container.width(a),this.geometry.containerWidth=a}},e}(),P=S,x=!1,T=function(e){function t(t){var n=this,o=window.navigator.userAgent.match(/Firefox\/(\d+)/),a=o&&o.length&&o.length>1,s=(0,r.extend)({container:"",keyboardControl:!1,mousewheelControl:!0,slidesPerView:"auto",freeMode:!0,grabCursor:!0,mousewheelSensitivity:a?8:1,cellWidth:(0,r.isFunction)(t.thumbWidth)?t.thumbWidth:i.observable(t.thumbWidth)},t);return(n=e.call(this,s)||this).cfg={frameSize:100},n.ignoreMouseClick=!1,n._busy=!1,n._isRenderingEnabled=i.observable(!0),n.isRenderingEnabled=i.computed({read:n._isRenderingEnabled,owner:n}),c(document).on("keypress",(function(e){n._onKeyPress(e)})),c(document).on("keyup",(function(e){n._onKeyUp(e)})),n.swiper=null,n}return(0,u.C6)(t,e),t.prototype.onMouseDown=function(e){e&&"mousedown"===e.type&&(C=e.clientX,A=e.clientY,this.ignoreMouseClick=!1),x=!0},t.prototype.onMouseMove=function(){this.ignoreMouseClick=x},t.prototype.onMouseUp=function(e){x=!1,e&&"mouseup"===e.type&&(this.ignoreMouseClick=Math.abs(C-e.clientX)>3||Math.abs(A-e.clientY)>3)},t.prototype.onResize=function(){},t.prototype.setPanelVisibility=function(e){this._lastVisibility=e},t.prototype.panelWidth=function(){return 320},t.prototype.update=function(e){this.initSwiper()&&this.swiper.update&&(this.swiper.update(e),this.swiper.lazy&&this.swiper.lazy.load())},t.prototype.setMode=function(e){var t=this;this.options.forceNumRows=e===d.Ay.catalogViewType.newsstand?1:0,(0,r.forEach)(this.sections(),(function(e){e.options.forceNumRows=t.options.forceNumRows}))},t.prototype.enableRendering=function(e){var t=this;this._isRenderingEnabled(!!e),this.sections&&(0,r.forEach)(this.sections(),(function(e){e&&e.enableRendering(t._isRenderingEnabled())}))},t.prototype.initSwiper=function(){var e=this;if(!this.swiper&&c(this.options.container).length>0){this.mover=new w({containerSelector:this.options.container},".store-panel-navmenu",this.options),this.swiper=this.mover.getSwiper(),this.swiper.on("touchStart",this.onMouseDown.bind(this)),this.swiper.on("touchMove",this.onMouseMove.bind(this)),this.swiper.on("touchEnd",this.onMouseUp.bind(this)),this.swiper.on("resize",this.onResize.bind(this)),this.setPanelVisibility=this.mover.setPanelVisibility,this._lastVisibility&&this.setPanelVisibility(this._lastVisibility),delete this._lastVisibility,this.panelWidth=this.mover.panelWidth;var t=c(this.options.container);t.on("mousedown touchstart",this.onMouseDown),t.on("mouseup touchend",this.onMouseUp),t.on("mousemove",this.onMouseMove),t.on("wheel",(function(){e.options.onMouseWheel&&e.options.onMouseWheel(e.swiper)}))}return this.swiper},t.prototype._onKeyUp=function(e){if(this.initSwiper(),this.swiper&&c(this.swiper.el).is(":visible")&&!c(".pop").is(":visible")){var t;switch(e.keyCode){case 37:t=-c(this.swiper.el).find("._issue_").width();break;case 39:t=c(this.swiper.el).find("._issue_").width()}t&&this._shiftContainer(t)}},t.prototype._onKeyPress=function(e){if(this.initSwiper(),this.swiper&&c(this.swiper.el).is(":visible")&&!c(".pop").is(":visible")&&" "===String.fromCharCode(e.which)){var t=c(this.swiper.el).find(".nd_swiper_container").width(),n=c(this.swiper.wrapperEl).width();n0&&(r=0),-r>n&&(r=-n),r!==i){this._busy=!0;var o=100*Math.abs(Math.ceil(e/c(this.swiper.el).find(".sgi").width()));this.swiper.once("transitionEnd",(function(){t._busy=!1})),this.swiper.setTransition(o),this.swiper.setTranslate(r),setTimeout((function(){t._busy&&(t._busy=!1,t.options.onTransitionEnd&&t.options.onTransitionEnd())}),o)}}},t.prototype.resetPosition=function(){this.initSwiper(),this.swiper&&(this.swiper.setTransition(0),this.swiper.setTranslate(0))},t.prototype.init=function(){this.initSwiper(),this.onResize()},t.prototype.getMenuMover=function(){return this.mover},t.prototype.setSortMode=function(){},t}(P),k=T,E=function(e){function t(t){var n=this,o=(0,r.extend)({sections:[],shortcuts:[],searchFilter:!1,preloadImages:!1,lazy:!0},t);return(n=e.call(this,o)||this).sections=i.observableArray(),n.sections.subscribe((function(e){(0,r.forEach)(e,(function(e){e&&e.updateParams({cellWidth:n.options.cellWidth})}))}),n),n.init(),n.updateSections(o.sections),n}return(0,u.C6)(t,e),t.prototype.updateSections=function(e){var t=this,n=this.sections();(0,r.forEach)(e,(function(e){e.options.cellWidth=t.options.cellWidth,e.reload();var i=e.id();(0,r.find)(n,(function(e){return e.id()===i}))||n.push(e)})),n=(0,r.compact)(n),(0,r.forEach)(n,(function(e){l.A.unbind(e,"onSectionContentChanged"),l.A.bind(e,"onSectionContentChanged",null,(function(){c(t.options.container).is(":visible")&&t.refreshView()}))})),this.sections(n),this.refreshView()},t.prototype.refreshView=function(){this.forceUniqueViews(),this.onResize()},t.prototype.onResize=function(){var e=this;this._debouncedResize||(this._debouncedResize=(0,r.debounce)((function(){var t=v.A.isCompactScreen()?0:e.panelWidth();(0,r.forEach)(c("".concat(e.options.container," .nd_swiper_container")).children(),(function(n){var i=c(n),o=i.attr("sid"),a=(0,r.find)(e.sections(),(function(e){return e&&e.id()===o}));a&&(a.updateAvailability(),a.isAvailable()&&(a.update(e.options.container),t+=i.outerWidth()+parseInt(i.css("margin-right"),10)))})),c("".concat(e.options.container," .nd_swiper_container")).width(t),e.update(!0),e.update(!0)}),150,{leading:!0,trailing:!0,maxWait:300})),c(this.options.container).is(":visible")&&this._debouncedResize()},t.prototype.invalidate=function(){(0,r.forEach)(i.utils.unwrapObservable(this.sections),(function(e){e.invalidate()}))},t.prototype.forceUniqueViews=function(){var e=this.sections(),t=[];(0,r.forEach)(c("".concat(this.options.container," section")),(function(n){var i=c(n);if(i.is(":visible")){var o=i.attr("sid"),a=(0,r.find)(e,(function(e){return e.id()===o}));a&&(a.options.checkUniqunes&&a.excludeThumbs(t),t=(0,r.reduce)(i.find(".sgi"),(function(e,t){return(0,r.union)(e,[c(t).attr("cid")])}),t))}}))},t.prototype.applySearchFilter=function(e){this.options.searchFilter&&(0,r.forEach)(this.sections(),(function(t){t.applySearchFilter&&t.applySearchFilter(e)}))},t.prototype.setSortMode=function(e){c(this.options.container).is(":visible")&&(0,r.forEach)(this.sections(),(function(t){t.setSortMode&&t.setSortMode(e)}))},t}(k),M=E,D=n(12030),N=n(7368),L=n(75380),V=[],R=!0,H=function(){R=!p.A.isLogin()},F=function(e,t,n){return{cid:e.cid,slug:e.slug,thumbUrl:(0,N.Af)(n||e.latestIssue.key,t,e.latestIssue.expungeVersion),name:e.name,anonymousContentRestricted:R&&(i=e.cid,null==V?void 0:V.includes(i)),issueDate:f.Ay.formatDate(e.latestIssue.issueDate,"v7.Client.DateFormat.Issue","d MMM yyyy"),supplements:e.supplements,latestIssue:e.latestIssue};var i},B=n(35797),z=".nd_swiper_container",O=function(e){return Math.ceil(window.screen.width/e.wGrid)*e.numRows},j=function(e){function t(t){var n=e.call(this,t)||this;return n.options.onTransitionEnd=function(e){n.updateItemsVisibility(e)},n.options.onReachEnd=function(e){n.updateItemsVisibility(e)},n.options.onReachBeginning=function(e){n.updateItemsVisibility(e)},n.options.onMouseWheel=function(e){n.updateItemsVisibility(e)},I=document.createElement("div"),n._firstIndex=0,n.src=[],n.sections=i.observableArray(),n._catalogFilter=null,n.updateSections(t.sections),n.init(),n}return(0,u.C6)(t,e),t.prototype.updateSections=function(e){var t=this,n=this.sections();(0,r.forEach)(e,(function(e){e.options.cellWidth=t.options.cellWidth,e.reload();var i=e.id();(0,r.find)(n,(function(e){return e.id()===i}))||n.push(e)})),n=(0,r.compact)(n),this.sections(n)},t.prototype.updateItemsVisibility=function(e){var t=this;function n(e,t){return i.applyBindingsToNode(I,{template:{name:"categoryContentTemplate_noslide",data:e}},t),c(I.innerHTML).addClass("autogen")}var r=this.options.context,o=O(this.geometry);if(this.updateGeometry(),!(this.geometry.numRows<=0)){var a=this.container.find(".issues"),s=a.children(),u=r.categoryDataFrame().length;if(0!==u){var l=(a.width()-e.wrapper.width())/2,d=-e.translate-l,h=Math.floor(d/this.geometry.wGrid)*this.geometry.numRows;if(h>0?this._firstIndex+h+(u-1)>=this.src.length&&(h=Math.max(this.src.length-u-1-this._firstIndex,0)):this._firstIndex+h<0&&(h=-this._firstIndex),0!==h){var f=void 0;if(h>0){var p=this._firstIndex+u;a.children().slice(0,h).remove();for(var m=0;m=h;m--)g=this.src[this._firstIndex+m],a.prepend(n(F(g,this.options.cellWidth()),r));f&&f.length>0&&i.applyBindingsToNode(f[0],{clickAndTouch:function(e,n){t.ignoreMouseClick||(t.ignoreMouseClick=!0,r.onIssueClick(e,n))}});var v=e.translate+h/this.geometry.numRows*this.geometry.wGrid;e.wrapper.transform("translate3d(".concat(v,"px, 0px, 0px)")),this._firstIndex+=h,this.place(this.container.find(".issues").children(),0,0,z)}this._firstIndex+u+2*o>this.src.length&&this._loadNextCatalogChunk()}}},t.prototype.onResize=function(){var e=this;if(this.isRenderingEnabled()){var t=0;(0,r.forEach)(this.sections(),(function(n){c(n.options.container).is(":visible")&&(n.update(e.options.container),t+=n.container.width()+parseInt(n.container.css("margin-right"),10))})),this.updateGeometry();var n=this.container.find(".issues");this.place(n.children(),t,0,z),this.update(!0)}},t.prototype.clearContent=function(){this.container.find(".issues .autogen").remove()},t.prototype.setCatalogFilter=function(e){this._catalogFilter=e,this._customLoadDataType=null,this._loadInitialView()},t.prototype.setContent=function(e){this._updateDataFrame(e),this.onResize()},t.prototype.setMode=function(t){e.prototype.setMode.call(this,t),this._loadInitialView()},t.prototype._loadNextCatalogChunk=function(e){var t=this;if(void 0===e&&(e=0),this._catalogFilter){if(this._totalCount>0&&this.src.length>=this._totalCount)return null;var n={filters:this._catalogFilter,orderBy:(0,B.O4)(this._catalogFilter.sortMode),offset:this.src.length};return e>0&&(n.limit=e),(0,D.Px)(n).then((function(e){t._totalCount=e.meta.totalCount,t.src=(0,r.slice)(t.src,0,e.meta.offset).concat(e.items)}))}return null},t.prototype._loadInitialView=function(){var e=this;this._firstIndex=0,this._totalCount=0,this.src=[],this.container.find(".issues").children().remove(),this.updateGeometry();var t=10*O(this.geometry);this._loadNextCatalogChunk(t).then((function(){e._updateDataFrame((0,r.slice)(e.src,e._firstIndex,t)),e.onResize()}))},t.prototype._updateDataFrame=function(e){var t=this,n=e.map((function(e){return F(e,t.options.cellWidth())}));this.options.context.categoryDataFrame(n);var i=c(this.options.container);if(i.is(":visible")){var r=e?e.length:0;i.find(".nodata").toggle(0===r)}},t.prototype.applySearchFilter=function(e){this._catalogFilter&&e!==this._catalogFilter.text&&(this._catalogFilter.text=e,this._loadInitialView())},t.prototype.setSortMode=function(e){this._catalogFilter&&e!==this._catalogFilter.sortMode&&(this._catalogFilter.sortMode=e,this._loadInitialView())},t}(k),U=j,W=function(e){function t(t){var n=this,o=(0,r.extend)({id:"",numcolumn:2,name:"Unknown",src:[],showtop:!1,subset:!1,checkUniqunes:!0},t);return o.container="section[sid=".concat(o.id,"]"),(n=e.call(this,o)||this).sortMode=d.Ay.catalogSortType.most_popular,n._uniqSubscriptions=[],n._languages=void 0,n._languagesCatalog=void 0,n._isRenderingEnabled=!0,n.dataChanged=!0,n.prevGeometry={},i.isObservable(n.options.src)&&n.options.src.subscribe((function(e){n.count(e?e.length:0)})),n.id=i.computed({read:function(){return n.options.id},owner:n}),n.name=i.computed({read:function(){return n.options.name},owner:n}),n.top=i.observable(),n.data=i.observableArray([]),n.count=i.observable(n.options.src.length),n.isAvailable=i.observable(),n.updateUniqnessSubscriptions(),n.load(),n}return(0,u.C6)(t,e),t.prototype.updateAvailability=function(){this.isAvailable(this.count()>0)},t.prototype.updateParams=function(e){this.options=(0,r.extend)(this.options,e)},t.prototype.enableRendering=function(e){this._isRenderingEnabled=!!e},t.prototype.applyLanguageFilter=function(e,t){this._languages=e,this._languagesCatalog=t,this.update()},t.prototype.update=function(e){var t=this;if(this.options&&this.options.src){var n=i.utils.unwrapObservable(this.options.src);if(this.count(n.length),this._isRenderingEnabled&&(this.updateGeometry(),this.geometry.hContent&&(this.prevGeometry.hContent!==this.geometry.hContent||this.dataChanged||e))){this.prevGeometry=c.extend(!0,{},this.geometry),this.dataChanged=!1;var o=this.geometry.numRows,a=this.options.numcolumn>0?(this.options.showtop?1:0)+o*this.options.numcolumn:-1,s=a>0?this.options.randomcount?this.options.randomcount:a:n.length;if(this._languages&&this._languages.length>0&&this._languagesCatalog){var u=[];(0,r.every)(n,(function(e){return(0,r.every)(t._languagesCatalog,(function(n){var i,r;return(null===(i=n.cn)||void 0===i?void 0:i.includes(e.index))&&(null===(r=t._languages)||void 0===r?void 0:r.includes(n.iso))&&u.push(e),u.length0?n.slice(0,a):n,d=0;if(this.options.showtop&&l.length>0){var h=F(l[0],600,l[0].latestIssue.key);this.top(h),l=l.slice(1);var f=Math.floor(this.geometry.hContent),p=c(this.container.find("._issue_")[0]),m=Math.floor(f*(h.latestIssue.firstPage.width/h.latestIssue.firstPage.height));p.css({top:0,left:0,height:f,width:m}),p.find(".page3-thumb").css("max-height",f),d=p.width()+this.options.spacer}else this.top(void 0);var g=l.map((function(e){return F(e,t.options.cellWidth(),e.latestIssue.key)}));this.data(g),this.place(this.container.find("._issue_"),d,this.options.showtop?1:0)}}},t.prototype.setDataSrc=function(e){(0,r.isEqual)(this.options.src,e)||(this.options.src=e,this.count(e.length),this.invalidate(),this.update())},t.prototype.invalidate=function(){this.dataChanged=!0,l.A.trigger("onSectionContentChanged",this)},t.prototype.load=function(){var e=this;this.options.filter&&(this.options.filter.orderBy=(0,B.O4)(this.sortMode),(0,D.Px)(this.options.filter).then((function(t){e.setDataSrc(t.items)})))},t.prototype.reload=function(){this.invalidate()},t.prototype.excludeThumbs=function(e){e&&(0,r.remove)(this.options.src,(function(t){return(0,r.find)(e,(function(e){return e===t.cid}))}))},t.prototype.updateUniqnessSubscriptions=function(){var e=this;(0,r.forEach)(this._uniqSubscriptions,(function(e){e.dispose()})),this._uniqSubscriptions=[],(0,r.forEach)(this.options.uniquness,(function(t){e._uniqSubscriptions.push(t.data.subscribe(e.update))}))},t.prototype.setSortMode=function(e){this.sortMode=e,this.load()},t.prototype._getUniqueItems=function(e,t){var n=e.slice(0,t);if(this.options.uniquness){var i=t+1,o=[],a=function(){var t=[];o=[];var a=(0,r.map)(n,"cid");if((0,r.forEach)(s.options.uniquness,(function(e){t=(0,r.uniq)((0,r.merge)(t,(0,r.intersection)(a,(0,r.map)(e.data(),"cid"))))})),t.length>0){o=(0,r.remove)(n,(function(e){return(0,r.indexOf)(t,e.cid)>=0}));var u=i+t.length,c=e.slice(i,u);if(0===c.length)return"break";i=u+1,n=n.concat(c)}},s=this;do{if("break"===a())break}while(o.length>0)}return n},t}(P),Y=W,X=n(64936),q=n(89489),G={load:function(){return q.A.get("featuredtitles","GetFeaturedTitlesCids",{})}},K=(n(91717),n(58735)),J=(n(69481),n(61890)),Q=new c.nd.baseLoader;function Z(){c.nd.event.trigger("onuserstatechanged",$)}K.bind("tokenUpdated",Z);var $={loader:Q,userStateChanged:Z,onUserStateChanged:function(e){return c.nd.event.bind($,"onuserstatechanged",null,e)},userLocalesChanged:function(){c.nd.event.trigger("onuserlocaleschanged",$)},onUserLocalesChanged:function(e){c.nd.event.bind($,"onuserlocaleschanged",null,e)},isLogin:function(){return(0,J.x)()},getLatestReadIssues:function(){return c.nd.services.api.get("user","GetLatestReadIssues").then((function(e){return function(e){for(var t=[],n=0;n0&&(n=(0,r.find)(e,(function(e){return null!==e.latestIssue.firstPage&&e.cid.toLowerCase()===t.toLowerCase()}))),n){var i=F(n,600,n.latestIssue.key);this.top(i)}this.items=e,this.invalidate()},t.prototype.load=function(){return(0,u.sH)(this,void 0,void 0,(function(){var e,t;return(0,u.YH)(this,(function(n){switch(n.label){case 0:return[4,pe.load()];case 1:return e=n.sent(),[4,Promise.all([(0,me.yC)(e.cids),a.A.getAsync("catalog.MasterCid")])];case 2:return t=n.sent(),this.setDataSrc(t[0],t[1]),[4,this._loadedDeferred.resolve(this)];case 3:return n.sent(),[2]}}))}))},t.prototype.loaded=function(){return this._loadedDeferred.promise()},t.prototype.getActiveShortcuts=function(){this.shortcuts(this.options.shortcuts().slice(0,3))},t.prototype.setSortMode=function(){},t}(Y),ve=ge,ye=function(e){function t(t){var n=e.call(this,(0,r.extend)({checkUniqunes:!1},t))||this;return n.items=[],n._loadedDeferred=new X.c,n}return(0,u.C6)(t,e),t.prototype.setDataSrc=function(e){this.items=e,this.invalidate()},t.prototype.load=function(){var e=this;p.A.getLatestReadIssues().then((function(t){var n=(0,u.fX)([],(0,u.zs)(new Set(t.map((function(e){return e.cid})))),!1);(0,me.yC)(n).then((function(t){e.setDataSrc(t),e._loadedDeferred.resolve(e)}))}))},t.prototype.loaded=function(){return this._loadedDeferred.promise()},t.prototype.setSortMode=function(){},t}(Y),_e=ye,be=function(e){(0,r.assign)(this,{id:e.id,name:e.name||"Unknown",flag:e.flag||!1,type:e.type,rank:e.rank||1,count:i.observable(),slug:e.path||""})},we=function(e){function t(t){var n=this,o=(0,r.extend)({numcolumn:1,src:i.observableArray(),checkUniqunes:!1},t);return(n=e.call(this,o)||this).shortcuts=i.observableArray(),n.classes=i.observable(),o.classes&&n.classes(o.classes),n}return(0,u.C6)(t,e),t.prototype.update=function(e){var t=this,n=this.options.src();if(this.count(n.length),n.length){var i=this.updateGeometry(e);if(this.geometry.hContent){this.shortcuts(n.slice(0,2*this.geometry.numRows*this.options.numcolumn));var o=this.geometry.hGrid/2,a=o-this.options.spacer;(0,r.forEach)(i.find(".hub-shortcut"),(function(e,n){var i=n%2,r=Math.floor(n/2)%t.geometry.numRows;c(e).css({top:r*t.geometry.hGrid+i*o,height:a})}))}}},t}(Y),Ce=we,Ae=function(e){function t(t){var n=(0,r.extend)({name:null},t);return e.call(this,n)||this}return(0,u.C6)(t,e),t.prototype.load=function(){var e=this;this.options.filter&&(this.options.filter.orderBy=(0,B.O4)(this.sortMode),(0,D.Px)(this.options.filter).then((function(t){t||(t={items:[]}),!e.options.showtop&&e.options.mainPublication&&t.items.unshift(e.options.mainPublication),e.options.src=void 0,e.setDataSrc(t.items)})))},t.prototype.applySearchFilter=function(e){this.options.filter&&this.options.filter.filters&&this.options.filter.filters.text!==e&&(this.options.filter.filters.text=e,this.load())},t}(Y),Ie=Ae,Se=n(26906),Pe={id:"",displayName:"Unknown",categoryItemClass:"accordion-item",scrollBarClass:"swiper-scrollbar",swiperContainerClass:"swiper-container"},xe=function(e){switch(e){case"group_".concat(Se.$I.Countries):return"pop-countries";case"group_".concat(Se.$I.Languages):return"pop-languages";case"group_".concat(Se.$I.Categories):return"pop-categories";default:return"pop-publicationtypes"}},Te=function(){function e(e,t){this.params=(0,r.merge)(Pe,e);var n=(0,r.map)(t,(function(e){return(0,r.clone)(e,!0)}));switch(this.params.id){case"group_".concat(Se.$I.Countries):var o=(0,r.remove)(n,(function(e){return"international"===e.id}));o&&o.length>0&&n.splice(0,0,o[0]);break;case"group_".concat(Se.$I.Categories):(0,r.forEach)(n,(function(e){return(0,r.extend)(e,{topThumbUrl:i.observable(),publication:{}})}));var a=(0,r.keyBy)(n,"titlePublicationCid");(0,me.yC)((0,r.map)(n,(function(e){return e.titlePublicationCid}))).then((function(e){(0,r.forEach)(e,(function(e){a[e.cid].publication=e,f.Ay.formatDate(e.latestIssue.issueDate,"date","yyyyMMdd"),a[e.cid].topThumbUrl((0,N.Af)(e.latestIssue.key,80,e.latestIssue.expungeVersion))}))}))}(0,r.assign)(this,{id:this.params.id,displayName:this.params.displayName,src:i.observable(n),css_class:xe(this.params.id),template:this.params.template})}return e.prototype.initSwiper=function(){if(this.swiper){if(this.swiper.update)try{this.swiper.update(!0)}catch(e){}}else if(this.id){var e="#".concat(this.id),t="".concat(e," .").concat(this.params.swiperContainerClass);if(c(t).length>0){var n=window.navigator.userAgent.match(/Firefox\/(\d+)/),i=n&&n.length&&n.length>1;this.swiper=new _.A("".concat(e," .").concat(this.params.swiperContainerClass),{scrollbar:"".concat(e," .").concat(this.params.scrollBarClass),direction:"vertical",slidesPerView:"auto",mousewheelControl:!0,freeMode:!0,mousewheelSensitivity:i?8:1})}}},e}(),ke=Te,Ee=n(4797),Me=[],De=[],Ne={animationTime:200,menuBodyClass:"navmenu-body",categoryItemClass:"accordion-item",categoryActiveItemClass:"accordion-active",categoryItemTitleClass:"accordion-header",categoryContentClass:"accordion-content",swiperContainerClass:"swiper-container",categoriesTemplate:"categories_categoryItemTemplate",typesTemplate:"types_categoryItemTemplate"},Le=i.observable(),Ve=function(e){switch(e){case"group_".concat(Se.$I.Countries):return Ne.countriesTemplate;case"group_".concat(Se.$I.Languages):return Ne.languagesTemplate;case"group_".concat(Se.$I.Categories):return Ne.categoriesTemplate;default:return Ne.typesTemplate}},Re=function(e,t,n){var i=new ke({id:e,displayName:t,template:Ve(e)},n);Me.push(i)},He=function(){function e(){var e=this;oe=(0,r.assign)({},Ne),this.data=i.observableArray(),this.isAvailable=i.observable(!0),this.isEnabled=!1,this.selectedCategory=i.computed({write:function(t){var n=Le();n&&t&&n.id===t.id||(Le(t),e.onResize(!0))},read:Le,owner:this}),ue={displayName:f.Ay.val("Catalog.Publications"),publicationsCount:"",slug:"~"}}return e.prototype.hide=function(){this.data([]),this.isAvailable(!1),l.A.trigger("onCatalogMenuChanged",this,{enabled:this.isAvailable(),sources:[]}),this.onResize(!0)},e.prototype.buildCategoryMenu=function(e,t,n){var i=this;if(void 0===e&&(e=[]),void 0===n&&(n=!1),!(0,r.isArray)(e))throw new TypeError("Array expected");this.isEnabled=!1,ae=t,se=e,(0,Ee.DT)(e,e,t).then((function(e){Me=[],(0,r.forEach)(e,(function(e){if(e.categories.length>=1){var t=e.categories.map((function(e){var t=(0,r.cloneDeep)(e);return t.sourceCountEnabled=oe.sourceCountEnabled,t}));n&&Re("group_".concat(e.id),e.displayName,[ue]),Re("group_".concat(e.id),e.displayName,t)}})),i.data(Me),i.selectedCategory(Me.length>0?Me[0]:void 0),i.isAvailable(i.data().length>0),l.A.trigger("onCatalogMenuChanged",i,{enabled:i.isAvailable(),sources:Me}),i.onResize(!0),i.isEnabled=!0}))},e.prototype.buildDefaultMenuItems=function(e){var t=e.allPublicationsCount||0,n=e.recentlyReadPublicationsCount||0;t>0&&De.push({displayName:f.Ay.val("Catalog.AllSources"),publicationsCount:t,slug:"all"}),n>0&&De.unshift({displayName:f.Ay.val("Catalog.RecentlyRead"),publicationsCount:n,slug:"recentlyread"})},e.prototype.applySearchFilter=function(e){e!==ae.text&&(ae.text=e,this.buildCategoryMenu(se,ae))},e.prototype.afterRender=function(e,t){t.initSwiper()},e.prototype.onResize=function(e){var t=c(".".concat(oe.menuBodyClass));if(0!==t.length){var n=this.selectedCategory();n&&t.find("li li").each((function(e,t){var n=c(t).find(".num").width();c(t).find("em").css("padding-right","".concat(n,"px"))}));var i=t.height()-t.find(".".concat(oe.categoryItemTitleClass)).outerHeight(!0)*Me.length;t.find(".".concat(oe.categoryContentClass)).each((function(t,r){var o=c(r),a=o.closest(".".concat(oe.swiperContainerClass)),s=o.closest(".".concat(oe.categoryItemClass));n&&s.attr("id")===n.id?(o.show(),e?a.animate({height:Math.min(c(r).height(),i)},{duration:oe.animationTime,easing:"easeOutQuad",complete:function(){var e=Me[t];if(e){e.initSwiper();var n=a.find(".".concat(oe.categoryContentClass)).children();if(n.length>1){var i=n.eq(0).get(0),r=n.eq(1).get(0);i&&r&&i.scrollIntoView&&(r.scrollIntoView(),i.scrollIntoView())}}}}):a.height(Math.min(i,a.find(".".concat(oe.categoryContentClass)).height()))):(a.height(0),c(r).hide())})),n&&n.initSwiper()}},e.prototype.selectCategory=function(e){return this.selectedCategory(e),!1},e.prototype.selectCategoryByType=function(e){var t=(0,r.find)(Me,(function(t){return t.id===e}));t&&this.selectCategory(t)},e.prototype.getMenuItemRef=function(e,t){var n;if(e&&t){var i=(0,r.find)(Me,(function(t){return t.id===e}));i&&(n=(0,r.find)(i.src(),(function(e){return e.id===t})))}return n},e}(),Fe=n(28057),Be=n(52518),ze=n(92078),Oe="category",je="home",Ue="supplements",We="topmagazines",Ye="topfreepublications",Xe="featured",qe="recentlyread",Ge="all",Ke={gridThumbWidth:190,smallGridThumbWidth:160,newstandThumbWidth:{xsmall:300,small:400,medium:400,large:600,xlarge:600},defaultSortMode:d.Ay.catalogSortType.most_popular,subsets:["newspapers","magazines","topnewspapers",We,Ye,Xe,qe,Ge],rootUrl:"catalog",customSectionPrefix:"publications_"},Je="#Panel_mainPanel",Qe=!1,Ze="",$e={},et={name:Se.Xy.SearchRank,order:Se.xB.Descending},tt=function(e){e.search=Ze,e.catalogView=h.$r.Catalog,e.pathFilters&&(r.forEach(e.pathFilters,(function(t,n){e["filter".concat(n)]=t})),delete e.pathFilters),g.A.goView(h.lP.StoreHub,e,!1,!0)},nt=function(e,t){var n=t.length-1,i=[];r.forEach(t,(function(e,t){var r=["crumb"];0===t&&r.push("first"),t===n&&r.push("last"),i.push('').concat(e.name,""))})),ce.topBarHeader(i.join(" "));var o=c(".toolbar-title > .crumb");o.off("click"),o.on("click",(function(e){if(v.A.isCompactScreen())c(Je).toggleClass("store-navmenu--open");else if(!c(e.target).hasClass("last")){var t=c(e.target).attr("url"),n=r.slice(t.split("/"),1);tt({pathFilters:n})}})),ze.default.enableActionMenu(e.actionMenuEnable),ze.default.searchMenuText(e.search)},it=function(e,t,n){e.pathFilters.length>0?(0,me.Gl)(e.pathFilters.join("/")).then((function(i){r.forEach(r.filter(i,{itemType:"Category"}),(function(e){n+="/".concat(e.item.slug),t.push({name:e.item.displayName,url:n})})),nt(e,t)})):nt(e,t)},rt=function(){function e(e){if(ce)return ce;(ce=this).topBarHeader=e,ce.mysuggestions=i.observableArray();var t=i.observable();ce.viewMode=i.computed({write:function(e){t(e),ce.homeContentViewer.enableRendering(e===je),ce.categoryContentViewer.enableRendering(e===Oe),ce.supplementsContentViewer.enableRendering(e===Ue)},read:t,owner:this});var n=i.observable(Ke.defaultSortMode);return ce.sortViewMode=i.computed({read:n,write:function(e){e!==n()&&(n(e),ce.setContentSortMode(e))}}),ce.categoryDataFrame=i.observableArray(),ce.shortcuts=i.observableArray(),ce.menushortcuts=i.observableArray(),ce.thumbWidth=i.observable(Ke.gridThumbWidth),ce.controller=void 0,ce.menu=new He,ce}return e.prototype.init=function(){var e=this;return Promise.all([a.A.loaded(),f.Ay.loaded(),(0,L.yO)("AnonymousContentRestricted").then((function(e){R=!p.A.isLogin(),V=e.cids,l.A.bind(p.A,"onuserstatechanged",H)}))]).then((function(){le=[new be({id:Se.b7.Newspapers,name:f.Ay.val("v7.Client.Catalog.newspapers"),type:"group_".concat(Se.b7.PublicationTypes),path:"newspapers"}),new be({id:Se.b7.Magazines,name:f.Ay.val("v7.Client.Catalog.magazines"),type:"group_".concat(Se.b7.PublicationTypes),path:"magazines"})],ce.shortcuts(le),ce.sectionFeatured=new ve({id:Xe,name:f.Ay.val("v7.Client.Catalog.featured"),showtop:!0,numcolumn:3,shortcuts:ce.shortcuts}),ce.sectionTopMagazines=new Y({id:We,name:(0,y.GP)(f.Ay.val("v7.Client.Catalog.topmagazines"),""),showtop:!0,randomcount:30,filter:{filters:{hasCategories:[Se.b7.Magazines]},orderBy:et,limit:40}}),ce.sectionRecentlyRead=new _e({id:qe,name:f.Ay.val("v7.Client.Catalog.recentlyread")}),ce.sectionShortcuts=new Ce({id:"shortcuts",name:f.Ay.val("v7.Client.Catalog.browsecatalog"),src:ce.shortcuts}),ce.sectionSupplements=new Ie({id:"supplements",showtop:!0,numcolumn:-1}),ce.sectionMenuShortcuts=new Ce({id:"menushortcuts",name:f.Ay.val("v7.Client.Catalog.browsecatalog"),src:ce.menushortcuts,classes:"store-hub-shortcuts-menu"});var t=[ce.sectionTopMagazines,ce.sectionFeatured,ce.sectionRecentlyRead,ce.sectionShortcuts,ce.sectionMenuShortcuts];switch(a.A.get("catalog.sections.freePublications.enabled",!0)&&(ce.sectionTopFreePublications=new Y({id:Ye,name:f.Ay.val("v7.Client.Catalog.topfreepublications"),filter:{filters:{isFree:!0},orderBy:et,limit:40}}),t.push(ce.sectionTopFreePublications)),ce.homeContentViewer=new M({container:".panelHomeViewSwiper",thumbWidth:ce.thumbWidth,sections:t}),ce.categoryContentViewer=new U({container:".panelCategoryContentSwiper",context:e,thumbWidth:ce.thumbWidth,sections:[ce.sectionMenuShortcuts]}),ce.supplementsContentViewer=new M({container:".panelSupplementsSwiper",thumbWidth:ce.thumbWidth,searchFilter:!0,sections:[ce.sectionSupplements,ce.sectionMenuShortcuts]}),ce._menuBinding=l.A.bind(ce.menu,"onCatalogMenuChanged",null,(function(e,t){ce._setMenuShortcuts(t.sources),r.isUndefined(t.enabled)||(ce.homeContentViewer.setPanelVisibility(t.enabled),ce.categoryContentViewer.setPanelVisibility(t.enabled),ce.supplementsContentViewer.setPanelVisibility(t.enabled)),ce._updateLeftMenu()})),l.A.bind(p.A,"onuserstatechanged",ce._userStatusChanged),a.A.get("ui.Catalog.CategorySortOrder.default")){case"alphabeth":ce.sortViewMode(d.Ay.catalogSortType.by_alphabet);break;case"date":ce.sortViewMode(d.Ay.catalogSortType.most_current)}var n=a.A.get("ui.TopToolbar.ThumbnailSize");return e.setContentViewMode(parseInt(n,10)),Promise.all([(0,D.hz)(),ce.sectionRecentlyRead.loaded()]).then((function(e){var t=(0,u.zs)(e,1)[0].publicationsCount,n={allPublicationsCount:a.A.get("ui.Catalog.Menu.allSourcesEnable",!0)?t:0,recentlyReadPublicationsCount:a.A.get("ui.Catalog.Menu.recentlyReadEnable",!0)?ce.sectionRecentlyRead.items.length:0};ce.menu.buildDefaultMenuItems(n),ce.initialized=!0}))}))},e.prototype.dispose=function(){ce.initialized&&(l.A.unbind(p.A,"onuserstatechanged",H),ce._menuBinding.dispose(),l.A.unbind(p.A,"onuserstatechanged",ce._userStatusChanged))},e.prototype.isSortMenuAvailable=function(){return $e.subset!==Xe},e.prototype._userStatusChanged=function(){ce.loadData($e)},e.prototype.loadData=function(e){ce.selectDataByConfig(e),s.Ay.hide(),e.subview!==je&&Qe&&(c("#toolbarSearchPanel").find("input").focus().click(),Qe=!1,ze.default._model.searchMenuHandler.model.initialView="home")},e.prototype.onResize=function(){c(".l-store").is(":visible")&&(ce._updateLeftMenu(),ce.menu.onResize(),ce._activeViewer().onResize())},e.prototype.resetActiveViewerPosition=function(){ce._activeViewer().resetPosition()},e.prototype.selectDataByConfig=function(e){var t,n;$e=e,Ze=c.trim($e.search),$e.pathFilters?(null===(t=$e.subsets)||void 0===t?void 0:t.includes($e.pathFilters[0]))&&($e.subset=$e.pathFilters[0],$e.pathFilters=r.slice($e.pathFilters,1)):$e.pathFilters=[],ce.viewMode($e.subview),n=$e,f.Ay.loaded().then((function(){var e=[],t=Ke.rootUrl;e.push({name:f.Ay.val("TopToolbar.StoreHubTitle"),url:t}),n.subview===Ue?(0,me.Gl)(n.issue_name,"Publication").then((function(i){i&&i.length>0&&"Publication"===i[0].itemType&&(t+="/".concat(i[0].item.slug,"/supplements"),e.push({name:i[0].item.name,url:t})),it(n,e,t)})):($e.subset&&(t+="/".concat($e.subset),e.push({name:(0,y.GP)(f.Ay.val("v7.Client.Catalog.".concat($e.subset)),""),url:t})),it(n,e,t))}));var i=[];$e.pathFilters&&$e.pathFilters.length>0?(0,me.Gl)($e.pathFilters[$e.pathFilters.length-1]).then((function(e){i=r.filter(e,{itemType:"Category"}),ce._buildView(i)})):ce._buildView(i)},e.prototype.setContentSortMode=function(e){ce._activeViewer().setSortMode(e)},e.prototype.setContentViewMode=function(e){switch(e){case d.Ay.catalogViewType.newsstand:ce.thumbWidth((t=c("html")).hasClass("screen-xsmall")?Ke.newstandThumbWidth.xsmall:t.hasClass("screen-small")?Ke.newstandThumbWidth.small:t.hasClass("screen-medium")?Ke.newstandThumbWidth.medium:t.hasClass("screen-large")?Ke.newstandThumbWidth.large:Ke.newstandThumbWidth.xlarge);break;case d.Ay.catalogViewType.small_grid:ce.thumbWidth(Ke.smallGridThumbWidth);break;case d.Ay.catalogViewType.grid:ce.thumbWidth(Ke.gridThumbWidth)}var t;ce._activeViewer().setMode(e),ce.onResize()},e.prototype.applySearchFilter=function(e,t){this._debouncedApplySearchFilter||(this._debouncedApplySearchFilter=r.debounce((function(e,t){switch(Ze=c.trim(e).toLowerCase(),ce.viewMode()){case je:(0,y.gP)(Ze)||(Qe=!0,tt({subset:Ge,search:Ze}));break;case Oe:""===Ze&&"home"===t?tt():(ce.categoryContentViewer.applySearchFilter(Ze),ce.menu.applySearchFilter(Ze));break;case Ue:ce.supplementsContentViewer.applySearchFilter(Ze)}return!1}))),this._debouncedApplySearchFilter(e,t)},e.prototype.addFilter=function(e){if(ce.menu.isEnabled){ce.menu.isEnabled=!1;var t=e.slug.split("/");r.forEach(t,(function(e){"~"===e?delete $e.pathFilters:".."===e?$e.pathFilters.pop():$e.pathFilters.push(e)})),tt($e)}return!1},e.prototype.onIssueClick=function(e,t){if(Ze="",$e.search="",ze.default.resetSearchText(),e)ce._navigateToIssue(e);else{var n=c(t.target).closest(".sgi").attr("cid");(0,me.yC)([n]).then((function(e){e.length>0&&ce._navigateToIssue(e[0])}))}return!1},e.prototype.onShortCutClick=function(e){var t=ce.menu.getMenuItemRef(e.type,e.id);t?ce.addFilter(t):(ce.menu.selectCategoryByType(e.type),c(Je).toggleClass("store-navmenu--open"))},e.prototype.showSection=function(e){var t=e.id(),n={},i=t.split("_");return(n=i.length>1?{category0:e.options.subcategory,filter0:i[1]}:{subset:t}).search=Ze,tt(n),!1},e.prototype._activeViewer=function(){switch(ce.viewMode()){case Oe:return ce.categoryContentViewer;case Ue:return ce.supplementsContentViewer;default:return ce.homeContentViewer}},e.prototype._getMover=function(){return ce._activeViewer().getMenuMover()},e.prototype._updateShortcuts=function(){var e=ce.shortcuts();r.forEach(e,(function(e){var t=ce.menu.getMenuItemRef(e.type,e.id);t&&e.count(t.publicationsCount)})),ce.sectionShortcuts.update()},e.prototype._setMenuShortcuts=function(e){var t=[];r.forEach(e,(function(e){var n=new be({id:e.id,name:e.displayName,type:e.id});t.push(n)})),ce.menushortcuts(t),ce.sectionMenuShortcuts.update(ce._activeViewer().options.container),ce._activeViewer().onResize()},e.prototype._updateUserSpecificData=function(){var e=this;return p.A.isLogin()?Fe.A.load().then((function(e){ce.onResize()})):Promise.all([(0,Ee.DT)([Se.$I.Countries,Se.$I.Languages]),Be.J()]).then((function(t){var n=(0,u.zs)(t,2),i=(0,u.zs)(n[0],2),o=i[0],a=i[1],s=n[1].locales,c=r.keyBy(o.categories,"iso"),l=r.keyBy(a.categories,"iso"),d=[],h=[];r.forEach(s,(function(e){c[e.country]&&d.push(c[e.country]),l[e.language]&&h.push(l[e.language])}));var f=r.map(h,(function(e){return l[e.iso].id})),p=r.map(d,(function(e){return new Y({id:Ke.customSectionPrefix+e.slug,name:e.name,filter:{filters:{hasCategories:[e.id],inCategories:f},orderBy:"RankDesc",limit:40}})}));e._updateSuggestedSections(p),e._extendShortcutsByCountries(p)}))},e.prototype._updateSuggestedSections=function(e){var t=ce.mysuggestions(),n=t.length===e.length&&r.reduce(t,(function(t,n,i){return t&&n.id()===e[i].id()&&r.isEqual(n.options.filter,e[i].options.filter)}),!0);n||ce.mysuggestions(e),ce.homeContentViewer.updateSections(e)},e.prototype._extendShortcutsByCountries=function(e){var t=r.map(e,(function(e,t){return new be({id:e.id,name:e.name,type:"group_".concat(Se.b7.Countries),flag:e.iso,rank:t,path:e.slug})})),n=le.concat(t),i=ce.shortcuts();i.length===n.length&&r.reduce(i,(function(e,t,i){return e&&t.id===n[i].id}),!0)||ce.shortcuts(n),ce._updateShortcuts()},e.prototype._updateLeftMenu=function(){v.A.isCompactScreen()?ce._disableLeftMenu():ce._enableLeftMenu()},e.prototype._disableLeftMenu=function(){c(Je).removeClass("store-navmenu--open");var e=ce._getMover();e&&(e.setPanelVisibility(!1),e.enablePanel(!1))},e.prototype._enableLeftMenu=function(){if(ce.menu.isAvailable()){var e=ce._getMover();e&&(e.setPanelVisibility(!0),e.enablePanel(!0))}},e.prototype._navigateToIssue=function(e){ce.viewMode()!==Ue&&e.supplements.length>0?tt({issue_name:e.slug}):(ze.default.enableActionMenu(!0),g.A.updateState({search:Ze}),m.A.showNewspaper(e.cid))},e.prototype._buildView=function(e){var t=""!==Ze&&void 0;switch(ce.viewMode()){case Ue:var n=[$e.issue_name];ce.sectionSupplements.options.showtop=0===$e.pathFilters.length,t=0!==$e.pathFilters.length||void 0,Array.prototype.push.apply(n,$e.pathFilters),(0,me.Gl)(n.join("/"),"Publication").then((function(e){var n=r.filter(e,{itemType:"Publication"}),i=r.first(r.map(n,(function(e){return e.item.cid}))),o=r.map(r.filter(e,{itemType:"Category"}),(function(e){return e.item.id}));if(n.length>0){var a=r.assign({},n[0].item);a.supplements=[],0===r.intersection(a.categories,o).length&&(a=void 0),ce.sectionSupplements.options.mainPublication=a}ce.sectionSupplements.options.filter={filters:{mainCid:i,hasCategories:o,text:Ze,isSupplement:t},orderBy:et},ce.sectionSupplements.load(),ce.menu.hide()}));break;case Oe:ce.categoryContentViewer.clearContent();var i=ce.sortViewMode(),o=r.map(e,(function(e){return e.item.id})),a=r.map(e,(function(e){return e.item.name}));switch($e.subset){case Ge:ce.categoryContentViewer.setCatalogFilter({text:Ze,isSupplement:t,hasCategories:o,sortMode:i}),ce.menu.hide();break;case Xe:pe.load().then((function(t){(0,D.Px)({filters:{cids:t.cids,hasCategories:o,sortMode:i}}).then((function(e){var t=e.items.map((function(e){return F(e,ce.thumbWidth())}));ce.categoryContentViewer.setContent(t)})),ce.menu.buildCategoryMenu(e,{cids:t.cids,isSupplement:!1})}));break;case qe:p.A.getLatestReadIssues().then((function(e){var t=(0,u.fX)([],(0,u.zs)(new Set(e.map((function(e){return e.cid})))),!1);t.length>0&&(0,D.Px)({filters:{cids:t,hasCategories:o,sortMode:i}}).then((function(e){var t=e.items.map((function(e){return F(e,ce.thumbWidth())}));ce.categoryContentViewer.setContent(t)})),ce.menu.hide()}));break;case We:var s=[Se.b7.Magazines];Array.prototype.push.apply(s,e),ce.categoryContentViewer.setCatalogFilter({hasCategories:s,text:Ze,isSupplement:t,sortMode:i}),ce.menu.buildCategoryMenu(e,{hasCategories:[Se.b7.Magazines],text:Ze,isSupplement:t});break;case Ye:ce.categoryContentViewer.setCatalogFilter({isFree:!0,text:Ze,isSupplement:t,hasCategories:o,sortMode:i}),ce.menu.buildCategoryMenu(e,{isFree:!0,text:Ze,isSupplement:t});break;default:ce.categoryContentViewer.setCatalogFilter({hasCategories:o,text:Ze,isSupplement:!1,sortMode:i}),ce.menu.buildCategoryMenu(a,{text:Ze,isSupplement:!1},$e.addPublicationsMenu||!1)}break;default:ce.menu.buildCategoryMenu([],{isSupplement:!1})}ce._activeViewer().onResize()},e.prototype._getTopCategories=function(e,t){var n=[];return r.forEach(e,(function(e){r.isUndefined(n[e.id])?n[e.id]=1:n[e.id]++})),e=r.uniq(e),r.slice(r.sortBy(e,(function(e){return-n[e.id]})),0,t)},e}(),ot=rt,at=n(45676),st=n(76855),ut=n(29583),ct={},lt="catalog";ct.init=function(e){(de=e.elm()).addClass("l-store")},ct.showView=function(e){return ut("#Panel_mainPanel").addClass("store-navmenu--open"),(fe=r.extend({subview:"home",header:"TopToolbar.StoreHubTitle",actionMenuEnable:!0},e)).maxCategoriesInPath=6,Promise.resolve(ut.nd.templates.loaded()).then((function(){s.Ay.show(),he?(he.resetActiveViewerPosition(),he.loadData(fe)):(he=new ot(ct.topBarConfigOptions.header)).init().then((function(){he.controller=ct,ut.nd.templates.renderTo("v7.Client.StoreHub",he,de),o.Ay.resize(r.throttle((function(){ut.nd.viewer.views.getActiveViewName()==h.lP.StoreHub&&he.onResize()}),100)),he.loadData(fe)}))})),fe&&fe.callback&&fe.callback(),Promise.resolve()},ct.reset=ct.showView,ct.disable=function(){he&&he.viewMode("hideAll")},ct.hide=ut.nd.noop,ct.registerRoutes=function(e){function t(e){for(var t=[],n=0;n<6&&e["filter"+n];n++)t.push(e["filter"+n].toLowerCase()),delete e["filter"+n];var i=t.length>0?t[0]:null;"topfreepublications"!==i&&"topmagazines"!==i&&"recentlyread"!==i&&"featured"!==i&&"mypublications"!==i&&"all"!==i||(e.subset=i,t.shift()),e.pathFilters=t}for(var n=[],i=0;i<6;i++)n.push("{filter"+i+"}");var r=new st.D(h.lP.StoreHub);for(i=6;i>0;i--){var o=lt+"/{issue_name}/supplements/"+n.slice(0,i).join("/");e.addRoute({name:"catalog_supplements_category_type"+i,template:o,defaults:{viewName:h.lP.StoreHub},constraints:{viewName:r},executeWith:function(e){e.subview="supplements",e.issue_name=decodeURI(e.issue_name),t(e)}})}for(e.addRoute({name:"catalog_supplements",template:lt+"/{issue_name}/supplements",defaults:{viewName:h.lP.StoreHub},constraints:{viewName:r},executeWith:function(e){e.subview="supplements",e.issue_name=decodeURI(e.issue_name),t(e)}}),i=5;i>0;i--)o=lt+"/"+n.slice(0,i).join("/"),e.addRoute({name:"catalog_category_type"+(i+1),template:o,defaults:{viewName:h.lP.StoreHub},constraints:{viewName:r},executeWith:function(e){e.subview="category",t(e)}});e.addRoute({name:"catalog",template:lt,defaults:{viewName:h.lP.StoreHub,thumbViewMode:a.A.get("ui.TopToolbar.ThumbnailSize","2")},constraints:{viewName:r},executeWith:function(e){e.subview=e.subset||e.search?"category":"home",e.search||ut.nd.viewer.topBar.resetSearchText()}})};var dt=i.observable(d.Ay.catalogSortType.most_popular);function ht(){return!he||he.isSortMenuAvailable()}ct.sortViewMode=i.computed({read:dt,write:function(e){he&&(he.sortViewMode(e),dt(he.sortViewMode()))}}),ct._thumbViewMode=i.observable(),ct.thumbViewMode=i.computed({read:ct._thumbViewMode,write:function(e){if(e!=ct._thumbViewMode()){var t=ut(".panelCategoryContentSwiper .store-grid");switch(t.removeClass("store-grid-grid store-grid-smallgrid store-grid-newsstand"),e){case d.Ay.catalogViewType.small_grid:t.addClass("store-grid-smallgrid");break;case d.Ay.catalogViewType.newsstand:t.addClass("store-grid-newsstand");break;case d.Ay.catalogViewType.grid:default:t.addClass("store-grid-grid")}ct._thumbViewMode(e),he.setContentViewMode(e)}}}),ct.filter=function(e,t){he&&he.applySearchFilter(e,t)},ct.currentView=function(){return he?he.viewMode():void 0},ct.topBarConfigOptions={},ct.getTopBarConfig=function(){return ct.topBarConfigOptions={backEnable:!0,isTitleDisabled:!0,actionMenuEnable:!0,actionMenuOptions:{sort:[d.Ay.catalogSortType.by_alphabet,d.Ay.catalogSortType.most_popular,d.Ay.catalogSortType.most_current],view:[d.Ay.catalogViewType.list,d.Ay.catalogViewType.small_grid,d.Ay.catalogViewType.grid,d.Ay.catalogViewType.newsstand]},actionMenuController:new at.A({sort:ct.sortViewMode,view:ct.thumbViewMode,isSortMenuAvailable:ht}),header:i.observable(""),headerClass:"toolbar-storetitle breadcrumbs"}};var ft=ct},62297:function(e,t,n){"use strict";n.d(t,{A:function(){return ce}});var i=n(29583),r=n(13302),o=n(2111),a=n(73690),s=n(27189),u=n(2072),c=n(14099),l=n(78733),d=n(2175),h=n(13020),f=n(67303),p=n(13981),m=n(61445),g=n(8021),v=n(46943),y=n(62444),_=n(89885),b=n(96543),w=n(86699),C=n(28027),A=n(60588),I=function(){function e(e){var t=this;this.page=null,this.keyChangeSubscription=null,this.pageCont=e,this.pageCont.onattached((function(){return t.onPageAttached()})),this.pageCont.onshowed((function(){return t.onPageShowed()})),this.pageCont.ondettached((function(){return t.onPageDettached()}))}return e.prototype.onPageAttached=function(){var e=this;this.page=this.pageCont.getPage(),this.keyChangeSubscription=b.A.bind(this.page,"keyChange",(function(){return e.refresh()}))},e.prototype.onPageDettached=function(){this.keyChangeSubscription&&(this.keyChangeSubscription.dispose(),this.keyChangeSubscription=null),this.hide(),this.page=null},e.prototype.onPageShowed=function(){this.refresh()},e.prototype.refresh=function(){if(this.page){var e=this.page.isPotentiallyRestrictedMode(),t=(0,p.Lt)(m.FE);e||t?this.hide():this.show()}},e.prototype.show=function(){this.getOrCreateElm().show()},e.prototype.hide=function(){this.elm&&this.elm.hide()},e.prototype.showBookmark=function(e){this.elm&&(e?this.elm.addClass("bookmarked"):this.elm.removeClass("bookmarked"))},e.prototype.getOrCreateElm=function(){var e=this;if(!this.elm){var t=this.pageCont.getLayersContainer().parent();this.elm=i("").css("zIndex",3).addClass("art-options-call").hide().tap((function(t){return e.showContextMenu(t)})).appendTo(t)}return this.elm},e.prototype.showContextMenu=function(e){if(!this.pageCont||!this.page)return!1;var t=f.A.issue(),n=this.page.pageNumber(),i={previewType:_.mo.page,issueName:f.A.contentName(),issueDate:f.A.issueDate(),getPageInfo:function(e){return f.A.pages.load().then((function(){var t=f.A.pages.getPage(e),n=t&&t.layout();if(n)return{height:n.Height,width:n.Width}}))}},r={page:n,issue:t,newspaperName:f.A.contentName(),preview:i};return new v.A(_.l8.pageView,r,void 0,{listRenderer:{adjustSizeAndPosition:!0}}).show({position:{x:e.pageX||e.touchX||0,y:e.pageY||e.touchY||0,align:{y:y.W.Bottom}}}),!1},e.prototype.dispose=function(){this.onPageDettached(),this.pageCont=null,this.elm.remove(),this.elm=null},e}(),S=n(58932),P=n(16343),x=n(68565),T=n(88813),k=n(82788),E=n(6176),M=n(82230),D=n(94615),N=n(11261),L=n(53236),V=n(83312),R=n(60330),H=n(47068),F=n(95853),B=n(68092),z=function(){function e(){var e=this;this.readyToRender=ko.observable(!0),this.cid=f.A.cid(),this.isLoggedIn=ko.observable(w.A.isLogin()),this.userEmail=ko.observable(""),this.userNickname=ko.observable(""),this.userHasActiveSubscription=ko.observable(!1),this.refreshUserInfo(),w.A.onUserStateChanged((function(){return(0,S.sH)(e,void 0,void 0,(function(){return(0,S.YH)(this,(function(e){switch(e.label){case 0:return[4,this.refreshUserInfo()];case 1:return e.sent(),[2]}}))}))})),this.issue=f.A.issue()}return e.prototype.getThumbnailUrl=function(e,t){if(!e)throw new Error("'cid' was not specified.");if(4!==e.length)throw new Error("'cid' must have 4 characters.");if(t<=0)throw new Error("'height' must be greater than 0.");return R.A.getThumbUrlByCidForHeight(e,t)},e.prototype.showEmailAlerts=function(){this.isLoggedIn()?window.location.href="emailalerts":this.showSignInDialog()},e.prototype.showGigyaSignInDialog=function(){V.A.init(),s.A.loaded().then((function(){var e=s.A.get("Authentication.Gigya.RegisterScreenSetParams");window.gigya.accounts.showScreenSet(e)}))},e.prototype.showIssue=function(e){if(!e)throw new Error("'issue' was not specified.");N.A.showIssue(e)},e.prototype.showSignInDialog=function(){return V.A.signIn().catch((function(e){}))},e.prototype.showSignInDialogAndRedirectToUpgradeSubscription=function(){return(0,S.sH)(this,void 0,Promise,(function(){return(0,S.YH)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),w.A.isLogin()?[3,3]:[4,this.signin()];case 1:return e.sent(),w.A.isLogin()?(f.A.issueLoaded(),[4,f.B.load()]):[2];case 2:e.sent(),e.label=3;case 3:return f.A.coudlIssueBeRead()||F.default.purchase({articleId:null,issueId:this.issue}),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.signin=function(e){return void 0===e&&(e={}),w.A.isLogin()?Promise.resolve():V.A.signIn(e).catch((function(){}))},e.prototype.signout=function(){V.A.signOut()},e.prototype.purchase=function(){return(0,S.sH)(this,arguments,Promise,(function(e){return void 0===e&&(e=!0),(0,S.YH)(this,(function(t){switch(t.label){case 0:return e?[4,this.signin()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[4,F.default.purchase({articleId:null,issueId:this.issue})];case 3:return[2,t.sent()]}}))}))},e.prototype.refreshUserInfo=function(){return(0,S.sH)(this,void 0,Promise,(function(){var e,t,n;return(0,S.YH)(this,(function(i){switch(i.label){case 0:return this.isLoggedIn(w.A.isLogin()),w.A.isLogin()?(this.readyToRender(!1),[4,L.default.load()]):[3,7];case 1:return i.sent(),this.userEmail(L.default.email),this.userNickname(L.default.nickname),[4,(0,B.z)()];case 2:return(null==(e=i.sent())?void 0:e.subscriptionMode)===D.Dm.Bundle?[3,3]:[3,5];case 3:return[4,(0,H.wB)(f.A.cid())];case 4:return t=i.sent()||[],this.userHasActiveSubscription(t.some((function(e){return e.IsActive}))),[3,6];case 5:n=D.it.Valid|D.it.Exceed,this.userHasActiveSubscription(!!(n&(null==e?void 0:e.subscriptionStatus))),i.label=6;case 6:return[3,8];case 7:this.userEmail(""),this.userNickname(""),this.userHasActiveSubscription(!1),i.label=8;case 8:return this.readyToRender(!0),[2]}}))}))},e}(),O=z,j=n(29583),U=function(){return f.A.contentIsRtl()},W=function(){return P.j.mobile&&(0,x.l)()},Y=function(){function e(e){this._id=e}return e.prototype.id=function(){return this._id},e.prototype.isPage=function(){return!1},e.prototype.isCustom=function(){return!1},e.prototype.isSpread=function(){return this.isSpreadRightImpl()||this.isSpreadLeftImpl()},e.prototype.isSpreadLeft=function(){return this.isSpreadLeftImpl()},e.prototype.isSpreadRight=function(){return this.isSpreadRightImpl()},e.prototype.isDistanceExceed=function(e,t){if(!e)return!1;for(var n=this,i=0;n&&n!==e&&i++<=t;)n=n.nextItem();if(n&&n===e)return!1;for(n=this,i=0;n&&n!==e&&i++<=t;)n=n.prevItem();return!n||n!==e},e.prototype.prevItem=function(){return this._prevItem},e.prototype.nextItem=function(){return this._nextItem},e.prototype.insertBefore=function(e){var t=this._prevItem;return e._nextItem=this,this._prevItem=e,t&&(t._nextItem=e,e._prevItem=t),this},e.prototype.insertAfter=function(e){var t=this._nextItem;return e._prevItem=this,this._nextItem=e,t&&(t._prevItem=e,e._nextItem=t),this},e.prototype.leftItem=function(){return U()?this.nextItem():this.prevItem()},e.prototype.rightItem=function(){return U()?this.prevItem():this.nextItem()},e.prototype.spreadOffsetLeft=function(){var e=this;return e.isSpreadRight()&&(e=e.leftItem()),e.offsetLeft()},e.prototype.spreadOffsetRight=function(){var e=this;return e.isSpreadLeft()&&(e=e.rightItem()),e.offsetRight()},e.prototype.setVisibilityForSpread=function(e,t){return this.setVisibility(e,t),this.isSpreadLeft()?this.rightItem().setVisibility(e,t):this.isSpreadRight()&&this.leftItem().setVisibility(e,t),this},e.prototype.getMidX=function(){return this.offsetLeft()+this.width()/2},e.prototype.isSpreadLeftImpl=function(){return!1},e.prototype.isSpreadRightImpl=function(){return!1},e.prototype.isVisible=function(){},e.prototype.offsetLeft=function(){},e.prototype.offsetRight=function(){},e.prototype.width=function(){},e.prototype.height=function(){},e.prototype.setPosition=function(){},e.prototype.setVisibility=function(){},e.prototype.dispose=function(){},e}(),X=function(e){function t(n){var i=e.call(this,t.buildId(n))||this;return i._page=n,i._view=n.PageView(),i}return(0,S.C6)(t,e),t.buildId=function(e){return"p_".concat(e.pageNumber())},t.prototype.isPage=function(){return!0},t.prototype.isSpreadLeftImpl=function(){return this._page.isSpreadLeft()},t.prototype.isSpreadRightImpl=function(){return this._page.isSpreadRight()},t.prototype.offsetLeft=function(){return this._view.getLeft()},t.prototype.offsetRight=function(){return this._view.getRight()},t.prototype.width=function(){return this._view.getWidth()},t.prototype.height=function(){return this._view.getHeight()},t.prototype.setPosition=function(e,t){return this._view.setPosition(e,t),this},t.prototype.setVisibility=function(e,t){return this._view.setVisibility(e,t),this},t.prototype.isVisible=function(){return this._view.isVisible()},t.prototype.isBlockVisible=function(){var e=this._view.getPosition(),t=e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth);return this._view&&this._view._elm&&this._view._elm.cont&&!this._page.isPotentiallyRestrictedMode()&&t},t.prototype.page=function(){return this._page},t.prototype.pageNumber=function(){return this._page.pageNumber()},t}(Y),q=function(e){function t(t,n,i,r,o){void 0===o&&(o={});var a=e.call(this,t)||this;return a._elm=n.createChild("div",{position:"absolute",transformOrigin:"0 0",overflow:"hidden"}).width(o.width||"auto").height(o.height||"auto"),a._root=o.root||j('
')),a._rect=new c.A(0,0,a._elm.width(),a._elm.height()),a._template=i,a._renderer=r,a._renderBlock(),a}return(0,S.C6)(t,e),t.prototype.isCustom=function(){return!0},t.prototype.offsetLeft=function(){return this._rect.left},t.prototype.offsetRight=function(){return this._rect.right},t.prototype.width=function(){return this._rect.width},t.prototype.height=function(){return this._rect.height},t.prototype.setPosition=function(e,t){return this._rect.left===e&&this._rect.top===t||(this._rect.locate(e,t),this._elm.css({left:this._rect.left,top:this._rect.top})),this},t.prototype.setVisibility=function(e){return this._visible!==e&&(this._visible=e,e?this._elm.show():this._elm.hide()),this},t.prototype.isVisible=function(){return this._visible},t.prototype.dispose=function(){this._elm.remove()},t.prototype._renderBlock=function(){var e=this;return this.setVisibility(!1),this._renderer(this._template,this._root).finally((function(){e._root.find("a").each((function(e,t){j(t).bind("touchend",(function(){window.location.href=j(t).attr("href")}))})),e._elm.append(e._root),e.setVisibility(!0)}))},t}(Y),G=function(e){function t(t){var n=s.A.get("UI.Views.ZeroPage.Width",300);return e.call(this,"zeropage",t,"v7.Client.ZeroPage",(function(e,t){return T.A.loaded().then((function(){var n=new O;T.A.renderTo(e,n,t),ko.applyBindings(n,t[0])}))}),{width:n,root:j('
')})||this}return(0,S.C6)(t,e),t}(q),K=function(e){function t(t,n,i,r){void 0===r&&(r={});var o=this;return o=e.call(this,t,n,i,(function(e,t){return function(e){return M.A.get("pages/getpage",{template:e})}(e).then((function(e){return t.append(e.content)}))}),r)||this,k.X.ofType(E.wf.PageViewSizeChanged).subscribe((function(e){o._setSize(e.payload.width,e.payload.height)})),o}return(0,S.C6)(t,e),t.prototype._setSize=function(e,t){var n=this._rect;n.width==e&&n.height==t||(n.width=e,n.height=t,n.speadHeight=t,this._elm.fastCss("width",e+"px"),this._elm.fastCss("height",t+"px"))},t}(q),J=function(){function e(e){this._container=e,this._blocks=[],this._blocksById={},this._isZeroPageEnabled=W()?s.A.get("pagesView.enableMobilePage0",!1):s.A.get("pagesView.enablePage0",!1),this._leftPanelPadding=!this._isZeroPageEnabled&&W()?2:20}return e.prototype.build=function(){var e,t=this;if(this.cleanUp(),this._blocks=[],this._isZeroPageEnabled){var n=new G(this._container);this._blocks.push(n),e=n}for(var i=f.A.pages.firstPage();i;){var o=new X(i);e&&e.insertAfter(o),this._blocks.push(o),i=i.nextPage(),e=o}if(!f.A.isIssueRestrictedBy("CustomPages")){var a=s.A.get("customPages.pages")||[];(0,r.forEach)(a,(function(e){var n=void 0===e.index||e.index>t._blocks.length?t._blocks.length:e.index,i=new K("custom-page-".concat(n),t._container,e.template);i._root.fastCss("width","inherit"),i._root.fastCss("height","inherit"),0===n?t._blocks[n].insertBefore(i):t._blocks[n-1].insertAfter(i),t._blocks.splice(n,0,i)}))}return this._blocksById=(0,r.keyBy)(this._blocks,(function(e){return e.id()})),this},e.prototype.getLeftItemForPage=function(e){return this._getItemForPage(e,!0)},e.prototype.getRightItemForPage=function(e){return this._getItemForPage(e,!1)},e.prototype.getItemForPage=function(e){return this._getItemForPage(e,!1)},e.prototype._getItemForPage=function(e,t){if(e&&(!0===t?e=e.leftPageIfSpread():!1===t&&(e=e.rightPageIfSpread()),e)){var n=X.buildId(e);return this._blocksById[n]}return null},e.prototype.cleanUp=function(){this._blocks.forEach((function(e){return e.dispose()}))},Object.defineProperty(e.prototype,"leftPadding",{get:function(){for(var e=2*this._leftPanelPadding,t=0;this._blocks[t].isCustom();)e+=this._blocks[t++].width()+20;return e},enumerable:!1,configurable:!0}),e}(),Q=n(55383),Z=(n(41613),n(64936)),$=n(97433),ee=n(43150),te=n(47074),ne=5e3,ie=!1,re=!1;s.A.loaded().then((function(){ne=s.A.get("analytics.PageViewDebounceTimeout",ne),ie=s.A.get("ui.Views.PageView.SingleZoom",!1)}));var oe=[],ae=[],se=function(){var e,t,n,u=f.A.zooms(),p=function(){var o,s,h,p,y,b=!1,A=!1,I=!1,S="PageView",P=null,x=0;function T(e){if(e&&e.PageView){var t=e.leftPageIfSpread().PageView();return t.getZoom().isDefaultZoom||t._rect.left+i(p).position().left>0}return!1}function M(e){i.nd.event.trigger("beforeScroll",i.nd.viewer.pagesView,{delta:e,reason:_.Ay.scrollReason.drag})}var D={gesturesStart:function(){V.isActiveOrPending()||(N.beforeDragStart(),N.dragStart())},scroll:function(e){if(!V.isActiveOrPending()){var t=e.target(),n={dx:e.dx(),dy:e.dy()},r={touchX:e.position().x,touchY:e.position().y};n.adjustDelta=i.noop,T(o)&&M(n.dx),N.dragGo(t,r,n)}},onFling:function(e){if(D._onframeArg=null,!V.isActiveOrPending()){var t=e.velocity();if(t.vx||0===t.vx||t.vy||0===t.vy){var n=e.target(),r={dx:t.vx,dy:t.vy},a={touchX:e.position().x,touchY:e.position().y},s=j.findClosestPage(a.touchX,a.touchY);if(!s)return!1;j.changeActivePage(s),r.dX2=r.dx,r.dY2=r.dy,r.dTime2=200,r.dX=e.totalDx(),r.dY=e.totalDy(),T(o)&&M(r.dX),N.dragStop(n,a,r),o&&o.PageView().zoomMode&&k.X.send(new E.gO({pageNumber:o.pageNumber()}))}i.nd.viewer.pagesView.layoutUpdated(this)}}},N={currentMode:0,pagesMode:1,zoomMode:2,_view1:null,_view2:null,_panelX:0,_panelY:0,beforeDragStart:function(e,n,i){F.cancel(),t.cancel()},dragStart:function(){if(N.currentMode=0,!t.isActive()&&o){var e=o.PageView();N._view1=e,N._view2=j.getActiveSpreadsSecondPageView();var n=p.offset();N._panelX=n.left,N._panelY=n.top,N.currentMode=e.getHeight()a.height){var h=d.getTop()+u;h>0?(h=0,i.adjustDelta(null,0)):h+d.getHeight()p,b=n.getItemForPage(s),w=b.spreadOffsetLeft(),C=b.spreadOffsetRight();if(1===s.pageNumber()&&b.prevItem()){var A=b.prevItem();if(_){if(y){if(1==v&&A.offsetRight()>d)return void j.animateToItem(A);if(-1==v&&w<0)return void j.animateToPage(s)}if(!y){if(-1==v&&A.offsetLeft()<0)return void j.animateToItem(A);if(1==v&&C>d)return void j.animateToPage(s)}}w=Math.min(w,A.spreadOffsetLeft()),C=Math.max(C,A.spreadOffsetRight())}var I=C-w;return(_||w>d||C<0)&&(m=!0),m||(s.isFirst()&&(y?C<.5*I&&(m=!0):C-d>.5*I&&(m=!0)),s.isLast()&&!s.isSpread()&&(y?C-d>.5*I&&(m=!0):C<.5*I&&(m=!0))),void(m&&(v||(v=a.dX&&(a.dX<0?1:-1)),j.animateToNextPage(v)))}if(p=2,m=!1,(a.dX2||a.dY2)&&a.dTime2<300){var S,P;a.dX2>0?S=d:P=d;var x,T,k,E=i.nd.momentum(a.dX2,a.dTime2,S,P,d);a.dY2>0?(x=-u.getTop(),k=0):((T=u.getHeight()+u.getTop()-h)<0&&(T=0),k=h-u.getHeight());var M=i.nd.momentum(a.dY2,a.dTime2,x,T,h);if(M.returnValue=k,E.dist&&M.dist&&(Math.abs(a.dY2)>Math.abs(a.dX2)?E.dist=0:M.dist=0),E.dist&&(Math.abs(a.dx)>p||Math.min(u.getLeft(),c.getLeft())+E.dist>h||Math.max(u.getRight(),c.getRight())+E.dist<0)&&(m=!0),m)return void j.animateToNextPage(a.dx>0?-1:1);E.dist&&t.play(E),M.dist&&F.play(M)}}}}};(e=function(e){this._page=e.page(),this._view=e,this._page.isSpread()&&(this._view2=this._page.isSpreadRight()?this._page.leftPageIfSpread().PageView():this._page.rightPageIfSpread().PageView()),this._transitionEndBinded=this._transitionEnd.bind(this)}).prototype={_active:!1,_page:null,_view:null,_view2:null,_zoom:null,isActive:function(){return this._active||this._view2&&this._view2.zoomAnimation()._active||!1},isActiveOrPending:function(){return this.isActive()||this._checkRightsForZoomDeferred||this._view2&&this._view2.zoomAnimation()._checkRightsForZoomDeferred||!1},abort:function(){if(!this.isActive())return this;var e=this._view,t=(this._view2,e.getElmCont());if(t.stop(!0,!1),this._transitionMode){this._transitionEnd(!0);var n=new i.nd.matrix(t.css("transform")).m11,r={left:translateLeft-this._origin.x*(n-1),top:translateTop-this._origin.y*(n-1)};e._rect.left=Math.floor(r.left),e._rect.top=Math.floor(r.top),e._rect.width=Math.floor(e._rect._width*n),e._rect.height=Math.floor(e._rect._height*n),this.disableTransitionForPages()}return this},startZoomAnimation:function(e,t,n,i){var r=this;if(this.isActiveOrPending()||L.isZoomLocked())return Promise.reject();var o=function(){return k.X.send(new E.tC({pageNumber:r._page.pageNumber()})),j._fire("zoomChanging",{zoom:e,origin:t,origin2:n}),r._prepareAndStartAnimation(e,t,n,i).then((function(){j._fire("zoomChanged",{zoom:u.current(),origin:t,origin2:n})}))},a=this._view.confirmRequiredForZoom(e);return i||!a?o():(this._checkRightsForZoomDeferred=!0,L.isZoomLocked(!0),f.A.requestPageConfirmation(this._page).then((function(){return r._view.confirmRequiredForZoom(e)?Promise.reject():Promise.resolve()})).then((function(){return o()})).catch((function(){})).finally((function(){r._checkRightsForZoomDeferred=!1,L.isZoomLocked(!1)})))},_prepareAndStartAnimation:function(e,t,n,i){return e.isDefaultZoom||M(-u.defaultZoom().maxWidth),this._prepareForAnimation(e,t,n,i),$.b.csstransitions&&$.b.csstransforms?this._startTransitionAnimation(300):$.b.csstransforms?this._startTransformAnimation(300):this._transitionEnd(),Promise.resolve()},_prepareForAnimation:function(e,t,n,i){var r=this._view,o=this._view2,a=r.getElmCont();this._active=!0,this._passiveMode=!0===i,this._activeMode=!!n&&!this._passiveMode,this._enableSyncSpread=!!o&&!this._passiveMode&&!this._activeMode,this._zoom=e,this._origin=t,this._origin2=n;var s=r.getSizeForZoom(e),u=r.getSizeForCurrentZoom();r._rect._width=u.width,r._rect._height=u.height,!this._passiveMode&&n&&o&&o.zoomAnimation()._prepareForAnimation(e,n,null,!0);var c=r.getWidth();return this._initialScale=c/u.width,this._finalScale=s.width/u.width,this._translateLeft=a.translateLeft(),this._translateTop=a.translateTop(),this._zoom.fitToHeight?this._translateTopFinal=j.getTopBaseLine():t.translateTopFinal||0===t.translateTopFinal?this._translateTopFinal=t.translateTopFinal:this._translateTopFinal=this._translateTop,t.translateTopFinalAdjustment&&(this._translateTopFinal+=t.translateTopFinalAdjustment),this._translateTopFinal!=this._translateTop?this._translateTopFinalForScale=this._translateTopFinal-this._origin.y*(1-this._finalScale):this._translateTopFinalForScale=this._translateTopFinal,t.translateLeftFinal||0===t.translateLeftFinal?this._translateLeftFinal=t.translateLeftFinal:this._translateLeftFinal=this._translateLeft,t.translateLeftFinalAdjustment&&(this._translateLeftFinal+=t.translateLeftFinalAdjustment),this._translateLeftFinal!=this._translateLeft?this._translateLeftFinalScale=this._translateLeftFinal-this._origin.x*(1-this._finalScale):this._translateLeftFinalScale=this._translateLeftFinal,this},_getMetadata:function(){var e=this._page.PageView()._elm;return e?e.metadata:null},_startTransitionAnimation:function(e){this._transitionMode=!0;var t=this._view,n=this._view2;if(!this._passiveMode){var i=this._getMetadata();i&&i.beforeZoom(this._view,this._view2);var r=this._finalScale,o=this._translateLeftFinalScale,a=this._translateTopFinalForScale,s={left:o-this._origin.x*(r-1),top:a-this._origin.y*(r-1)};if(t._rect.left=Math.floor(s.left),t._rect.top=Math.floor(s.top),t._rect.width=Math.floor(t._rect._width*r),t._rect.height=Math.floor(t._rect._height*r),!this._passiveMode&&n){r=n.zoomAnimation()._finalScale,n._rect.width=Math.floor(n._rect._width*r),n._rect.height=Math.floor(n._rect._height*r);var u=t.getTop(),c=t.getLeft();this._page.isSpreadRight()?c-=n.getWidth():c+=t.getWidth(),n._rect.left=c,n._rect.top=u}this.enableTransitionForPages(e),j.updatePagePositions(!0)}return!this._passiveMode&&n&&n.zoomAnimation()._startTransitionAnimationImpl(e),this._startTransitionAnimationImpl(e),this},_startTransitionAnimationImpl:function(e){this._transitionMode=!0;var t=this._view.getElmCont();return this._applyOrigin(),this._passiveMode||t.bind(i.props.transitionEndEvents,this._transitionEndBinded),t.css("transform",i.nd.matrix.toTranslateString(this._translateLeftFinalScale,this._translateTopFinalForScale)+" "+i.nd.matrix.toScaleString(this._finalScale)),this},_startTransformAnimation:function(e){this._transitionMode=!1;var t=this._view,n=this._view2,r=t.getElmCont();this._applyOrigin(),n&&n.zoomAnimation()._applyOrigin();var o={duration:e,easing:"linear",complete:this._complete.bind(this),step:this._step.bind(this)};r.animate(i.nd.animationEmptyStep,o)},_applyOrigin:function(){return 1===this._initialScale&&this._view.getElmCont().css("transformOrigin",this._origin.x+"px "+this._origin.y+"px"),this},_step:function(e,t,n){if(this._active){var r=this._page,o=this._view,a=this._view2,s=o.getElmCont(),c=t.pos,l=this._initialScale-(this._initialScale-this._finalScale)*c,d=this._translateLeft,h=this._translateTop;h!==this._translateTopFinalForScale&&(h=Math.floor(h-(h-this._translateTopFinalForScale)*c)),d!==this._translateLeftFinalScale&&(d=Math.floor(d-(d-this._translateLeftFinalScale)*c)),this._transitionMode||s.css("transform",i.nd.matrix.toTranslateString(d,h)+" "+i.nd.matrix.toScaleString(l));var f={left:d-this._origin.x*(l-1),top:h-this._origin.y*(l-1)};if(o._rect.left=Math.floor(f.left),o._rect.top=Math.floor(f.top),o._rect.width=Math.floor(o._rect._width*l),o._rect.height=Math.floor(o._rect._height*l),1===c&&!this._transitionMode||n){if(this._passiveMode)return;s.css("transform",i.nd.matrix.toTranslateString(o._rect.left,o._rect.top)),s.css("transformOrigin","0 0");var p=this._zoom,m=o.getZoom();if(m!=p&&(o.setZoom(p),o.loadImages(j.getVisibleRect(!0))),a){l=a.zoomAnimation()._finalScale,a._rect.width=Math.floor(a._rect._width*l),a._rect.height=Math.floor(a._rect._height*l);var g=o.getTop(),v=o.getLeft();r.isSpreadRight()?v-=a.getWidth():v+=o.getWidth(),a._rect.left=v,a._rect.top=g,a.getElmCont().css("transform",i.nd.matrix.toTranslateString(a._rect.left,a._rect.top)).css("transformOrigin","0 0"),m!=p&&(a.setZoom(p),a.loadImages(j.getVisibleRect(!0)))}this._active=!1;var y=(p.maxHeight/u.current().maxHeight).toFixed(1);k.X.send(new E.sV({scale:y,pageNumber:j.getActivePageOrDefault().pageNumber()})),u.current(p),V.onZoomAnimationComplete(o),this._passiveMode||j.updatePagePositions()}else this._enableSyncSpread?V.syncSpreadWhileAnimation(o,a,l):!this._passiveMode&&a&&a.zoomAnimation()._step(e,t,n),this._passiveMode||j.updatePagePositions(!0)}},_transitionEnd:function(e){var t,n=this._view.getElmCont();if(!0!==e&&(e=!1),e&&(t=n.css("transform")),n.unbind(i.props.transitionEndEvents,this._transitionEndBinded).css("transitionProperty","").css("transitionDuration","").css("transitionTimingFunction",""),e&&n.css("transform",t),this._passiveMode)this._active=!1;else{this._activeMode&&this._view2&&this._view2.zoomAnimation()._transitionEnd(e),this.disableTransitionForPages(),e||this._step(0,{pos:1},!0);var r=this._getMetadata();r&&r.afterZoom(this._view,this._view2)}},_complete:function(e,t){this._passiveMode?this._active=!1:(this._activeMode&&this._view2&&this._view2.zoomAnimation()._complete(),this._step(0,{pos:1}))},enableTransitionForPages:function(e){return g.getAllElmContainers().css({transitionProperty:i.props.cssTransform,transitionTimingFunction:"linear",transitionDuration:e+"ms"}),this},disableTransitionForPages:function(){return g.getAllElmContainers().css({transitionProperty:"",transitionTimingFunction:"",transitionDuration:""}),this},getPositionForZoom:function(e,t,n){var i=this._view,r=i.getElmCont(),o=V.getOrigin(i,t,n),a=i.getSizeForZoom(e),s=i.getSizeForZoom(i.getZoom()),u=a.width/s.width,c=r.translateLeft(),l=r.translateTop(),d={left:c-o.x*(u-1),top:l-o.y*(u-1)};return{left:Math.floor(d.left),top:Math.floor(d.top),currentLeft:c,currentTop:l,width:a.width,height:a.height,scale:u}}};var L={isZoomLocked:function(e){return arguments.length?(this._locked=e,this):this._locked}},V={_active:!1,_pending:!1,_page:null,_view:null,_view2:null,onZoomAnimationComplete:function(e){this._active||this._view!=e||(this._view=null,this._view2=null)},isZoomActive:function(){return!!this._active||!(!this._view||!this._view.zoomAnimation().isActive())},isActiveOrPending:function(){return!!(this._active||this._pending||this._view&&this._view.zoomAnimation().isActiveOrPending())},getOrigin:function(e,t,n){var i=e.getElmOffset();return{x:t-i.left,y:n-i.top}},zoomStart:function(e,t){if(!this.isActiveOrPending()&&!L.isZoomLocked()){var n=this._page=j.findClosestPage(e,t)||o;if(n){j.changeActivePage(n),this._active=!0;var i=this._view=n.PageView(),r=this._view2=null;n.isSpread()&&(r=this._view2=n.isSpreadRight()?n.leftPageIfSpread().PageView():n.rightPageIfSpread().PageView()),this._pageX=e,this._pageY=t,this._origin=this.getOrigin(i,e,t),this._origin2=r?this.getOrigin(r,e,t):null,this._originalZoom=i.getZoom(),this._originalZoom2=r?r.getZoom():null,this._startLeft=i.getLeft(),this._startTop=i.getTop(),i._rect._width=i._rect.width,i._rect._height=i._rect.height,r&&(r._rect._width=r._rect.width,r._rect._height=r._rect.height,this._startLeft2=r.getLeft(),this._startTop2=r.getTop()),i.getElmCont().css("transformOrigin",this._origin.x+"px "+this._origin.y+"px"),r&&r.getElmCont().css("transformOrigin",this._origin2.x+"px "+this._origin2.y+"px")}}},zoomStep:function(e,t,n){if(this._active||(this.zoomStart(t,n),this._active)){var r=this._view,o=this._view2,a=t-this._pageX,s=n-this._pageY,u=this._startLeft+a,c=this._startTop+s;r.getElmCont().css("transform",i.nd.matrix.toTranslateString(u,c)+" "+i.nd.matrix.toScaleString(e));var l={left:u-this._origin.x*(e-1),top:c-this._origin.y*(e-1)};r._rect.top=Math.floor(l.top),r._rect.left=Math.floor(l.left),r._rect.width=Math.floor(r._rect._width*e),r._rect.height=Math.floor(r._rect._height*e),o&&(u=this._startLeft2+a,c=this._startTop2+s,o.getElmCont().css("transform",i.nd.matrix.toTranslateString(u,c)+" "+i.nd.matrix.toScaleString(e)),l={left:u-this._origin2.x*(e-1),top:c-this._origin2.y*(e-1)},o._rect.top=Math.floor(l.top),o._rect.left=Math.floor(l.left),o._rect.width=Math.floor(o._rect._width*e),o._rect.height=Math.floor(o._rect._height*e)),j.updatePagePositions(!0)}},zoomEnd:function(e){if(this._active&&!this._pending){this._active=!1,this._pending=!0;var t=this._view,n=this._originalZoom,i=u.findZoom(e,!0,n),r=this;t.zoomAnimation().startZoomAnimation(i,this._origin,this._origin2).then((function(){return(t.getZoom()._idx===i._idx?Promise.resolve():t.zoomAnimation().startZoomAnimation(i,r._origin,r._origin2)).then((function(){r._pending=!1})).catch((function(){r._pending=!1}))}),(function(){return t.zoomAnimation().startZoomAnimation(n,r._origin,r._origin2).then((function(){r._pending=!1})).catch((function(){r._pending=!1}))}))}},syncSpreadWhileAnimation:function(e,t,n){if(t){var r=e.page();t._rect.width=Math.floor(t._rect._width*n),t._rect.height=Math.floor(t._rect._height*n);var o=e.getTop(),a=e.getLeft();r.isSpreadRight()?a-=t.getWidth():a+=e.getWidth(),t._rect.left=a,t._rect.top=o,t.getElmCont().css("transform",i.nd.matrix.toTranslateString(a,o)+" "+i.nd.matrix.toScaleString(n))}}},R={_scale:null,gesturesStart:function(){R._scale=null},pinch:function(e){var t=R._scale=e.scale(),n=e.center();V.zoomStep(t,n.x,n.y),k.X.send(new E.HU({pageNumber:j.getActivePageOrDefault().pageNumber()}))},scroll:function(e){null!=R._scale&&R.gesturesEnd()},gesturesEnd:function(){null!=R._scale&&(V.zoomEnd(R._scale),R._scale=null)}},H={onmousewheel:function(e){if(e.wheelDirVerticale&&e.wheelDirHorizontal&&(Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)?e.wheelDirVerticale=0:e.wheelDirHorizontal=0),e.wheelDirHorizontal){if(t.isActive())return!1;j.animateToNextPage(-1*e.wheelDirHorizontal)}else if(e.wheelDirVerticale){var n=e.pageX,i=e.pageY,r=j.findClosestPage(n,i);if(!r)return!1;j.changeActivePage(r);var o=r.PageView(),a=j.getActiveSpreadsSecondPageView(r);if(o.zoomAnimation().isActive())return!1;var s=V.getOrigin(o,n,i),c=a?V.getOrigin(a,n,i):null;u.current(o.getZoom());var l=e.wheelDirVerticale<0?u.next():u.prev();l&&o.zoomAnimation().startZoomAnimation(l,s,c)}return!1},onwheelHorizontal:function(e){if(e.deltaX&&e.deltaXCount>e.deltaYCount)return!t.isActive()&&!V.isZoomActive()&&(!(!ie&&u.current()!==u.defaultZoom())&&(j.animateToNextPage(e.deltaX),e.processed=!0,!1))},onwheelVerticale:function(e){if(e.deltaY&&e.deltaYCount>e.deltaXCount){if(t.isActive()||V.isZoomActive())return!1;var n=e.pageX,i=e.pageY,r=j.findClosestPage(n,i);if(!r)return!1;j.changeActivePage(r);var o=r.PageView(),a=j.getActiveSpreadsSecondPageView(r),s=V.getOrigin(o,n,i),c=a?V.getOrigin(a,n,i):null;u.current(o.getZoom());var l=e.deltaY<0?u.next():u.prev();return l&&(o.zoomAnimation().startZoomAnimation(l,s,c),e.processed=!0),!1}}};t=function(){var e,t,n,r,a,s,u=300,c=!0,l=0;function d(e,t,n,o){j.container().animate({translateLeft:e,leaveTransforms:c},n||u,o||r||i.nd.easing.nd1,(function(){h(t)}))}function h(e){a&&(j.changeActivePage(a,!0),a=null),(e||g)()}function f(o,a,c,l){var f,m=s=new Z.c,g=j._rect;if(o.dist){var v=o;u=v.time,o=g.left+v.dist}else u=300;return o=Math.floor(o),g.left!=o?(e=!0,n=o,a&&(f=p,a<0?(t=-g.width,o=g.width):(t=g.width,o=-g.width),n=0),r=i.nd.easing.nd1,d(o,f,c,l)):h(),m.promise()}function p(){var e=j._rect,n=o.PageView(),i=n.getWidth()/2;if(o.isSpread()){var r=o.otherSpread();i+=(o.isSpreadRight()?-1:1)*r.PageView().getWidth()/2}n.setLeft(Math.floor(e.width/2-i)),j.adjustActiveSpread(),j.updatePagePositions(),j.container().css("translateLeft",t),setTimeout(m,1)}function m(){r=i.nd.easing.nd1_reverse,d(n)}function g(){j._rect.left=j.container().translateLeft(),j.moveAnimation_finish(),e=!1,l=i.nd.now(),s&&(s.resolve(),s=null)}function v(t){e&&(j.container().stop(!0,!1,c),t&&j.container().css("translateLeft",n),s&&(s.reject(),s=null),g())}return{play:function(e,t){return a=null,f(e,t)},playAndChangeActivePage:function(e,t,n,i,r){return a=n,f(e,t,i,r)},finish:function(){v(!0)},cancel:function(){v(!1)},isActive:function(){return e},currentAnimationDeferred:function(){return s},finishTime:function(){return l}}}();var F=function(){var e,t,n,r,a,s,u=!0;function c(){e&&a&&a.animate({translateTop:t,leaveTransforms:u},s.returnTime,i.nd.easing.nd1_reverse,l)}function l(){n&&(n._rect.top=n.getElmCont().translateTop()),r&&(r._rect.top=r.getElmCont().translateTop()),n=null,r=null,a=null,e=!1,j.checkPages()}function d(n){e&&a&&(a.stop(!0,!1,u),n&&a.css("translateTop",t),l())}function h(){d(!0)}return{play:function(d){if(o){h(),n=o.PageView(),r=j.getActiveSpreadsSecondPageView(o);var f=d.dist?n.getTop()+d.dist:d;d.dist?d.top=f:d={top:f,time:300,returnTime:0},s=d,t=f,a=r?i([n.getElmCont()[0],r.getElmCont()[0]]):n.getElmCont(),e=!0;var p=l;d.returnTime&&"number"==typeof d.returnValue&&(p=c,t=d.returnValue),a.animate({translateTop:d.top,leaveTransforms:u},d.time,i.nd.easing.nd1,p)}},finish:h,cancel:function(){d(!1)},isActive:function(){return e}}}(),B=function(){var e=50,n={};function r(){j.animateToNextPage(1)}function o(){j.animateToNextPage(-1)}function a(e){return e&&e.PageView&&!e.PageView().getZoom().isDefaultZoom}function s(e,t){var n=p(e),i=n.left.getPosition(),r=V.getOrigin(n.left,i.left+i.width/2,i.top),o=n.right?V.getOrigin(n.right,i.left+i.width/2,i.top):null;u.current(n.left.getZoom());var a=t(u);a&&n.left.zoomAnimation().startZoomAnimation(a,r,o)}function c(e){return e.isSpreadRight()?e.leftPageIfSpread(S):e.isSpreadLeft()?e.rightPageIfSpread(S):null}function l(e,t,n,i){var r=t.getLeft();if(t.setLeft(r+i),n){var o=e.leftPageIfSpread(S)?t.getWidth():-t.getWidth();n.setLeft(r+o+i)}j.updatePagePositions()}function d(e,t,n,i){e.setTop(n+i),t&&t.setTop(n+i),j.updatePagePositions()}function h(e,t,n){var r=e.getLeft(),o=e.getWidth();if(!(n<0))return ri.windowWidth()/2}function p(e){if(!e.isSpread())return{left:e.PageView(),right:null};var t=e.isSpreadLeft();return{left:t?e.PageView():c(e),right:t?c(e):e.PageView()}}return n[ee.u.pgDown]=r,n[ee.u.left]=function(t){if(a(t)){var n=p(t);h(n.left,n.right,e)&&l(t,n.left,n.right,e)}else o()},n[ee.u.pgUp]=o,n[ee.u.right]=function(e){if(a(e)){var t=p(e);h(t.left,t.right,-50)&&l(e,t.left,t.right,-50)}else r()},n[ee.u.up]=function(t){if(a(t)){var n=p(t),i=n.left.getTop();if(i<0){var r=i-e<=0?e:Math.abs(i-e);d(n.left,n.right,i,r)}}},n[ee.u.down]=function(t){if(a(t)){var n=p(t),r=n.left.getTop(),o=n.left.getHeight();if(r+o+e>i.windowHeight()){var s=r+o+e>=i.windowHeight()?-50:-Math.abs(r+o-i.windowHeight());d(n.left,n.right,r,s)}}},n[ee.u.home]=function(){j.gotoPage(f.A.pages.firstPage())},n[ee.u.end]=function(){j.gotoPage(f.A.pages.lastPage())},n[ee.u.space]=function(e,n){if(!t.isActive()){var i=f.A.contentIsRtl();n&&n.shiftKey&&(i=!i),(i?o:r)()}},n[ee.u.equalsFirefox]=n[ee.u.numPlus]=n[ee.u.equals]=function(e){s(e,(function(e){return e.next()}))},n[ee.u.minus]=n[ee.u.numMinus]=n[ee.u.dash]=function(e){s(e,(function(e){return e.prev()}))},n}();function z(){return!(!o||!j.isEnable()||d.modal.isSet||d.busy.isSet)}var O={lastEvent:null,keyDown:function(e){z()&&(O.lastEvent=e)},keyPress:function(e){O.keyPressed=String.fromCharCode(e.which)},keyUp:function(e){z()&&O.process(e.keyCode,e)},process:function(e,t){if((te.uJ(e)||te.Fb(e))&&"INPUT"!=document.activeElement.nodeName)i.nd.viewer.topBar.showSearchMenu(),i.nd.viewer.topBar.searchMenuText(O.keyPressed);else{var n=B[e];"function"==typeof n&&n(o,t)}}},j=i.extend({},l.n.prototype,{_rect:new c.A,initPanel:function(e){y=e;var r=e.elm().addClass("pageview-container");(p=r.createChild("div","absolute")).width(1).height(1),p.optimizeForTransform(),n=new J(p),function(e){function t(e){return'

'+(e?"Prev":"Next")+"

"}e.append(t(!0)+t(!1)),e.tap(".rn-left",(function(){f.A.contentIsRtl()?j.animateToRightPage(1):j.animateToLeftPage()})).tap(".rn-right",(function(){f.A.contentIsRtl()?j.animateToLeftPage():j.animateToRightPage(1)})),i.nd.gestures.bind(e.find(".rn-left"),{longPress:function(){return j.gotoFirstPage(_.Ay.scrollReason.scrollZone)},gesturesEnd:function(){return j.stopConinuousAnimation()}}),i.nd.gestures.bind(e.find(".rn-right"),{longPress:function(){return j.gotoLastPage(_.Ay.scrollReason.scrollZone)},gesturesEnd:function(){return j.stopConinuousAnimation()}})}(r),i.nd.gestures.bind(e.elm(),{gesturesStart:D.gesturesStart,scroll:D.scroll,fling:D.onFling,keyPress:O.keyPress.bind(this),keyDown:O.keyDown.bind(this),keyUp:O.keyUp.bind(this)}),i.nd.gestures.bind(e.elm(),{gesturesStart:R.gesturesStart,pinch:R.pinch,gesturesEnd:R.gesturesEnd,scroll:R.scroll,contextMenu:function(e){var t={position:e.position()};i(e.event().target).trigger(i.Event("onContextMenu",{contextMenu:t}));var n=function(e){var n={position:{x:t.position.x,y:t.position.y,align:{y:i.nd.ui.menu.align.bottom}}},r=new v.A(i.nd.views.pageView,{controller:this,article:e,page:t.pageNumber,isPageCtxMenu:!0,issue:f.A.issue(),newspaperName:f.A.contentName(),pageInfoAccessor:f.A.getPageInfo,preview:e?{previewType:_.Ay.contextPreviewType.article}:{previewType:_.Ay.contextPreviewType.page,issueName:f.A.contentName(),issueDate:f.A.issueDate(),getPageInfo:function(e){return f.A.pages.load().then((function(){var t=f.A.pages.getPage(e),n=t&&t.layout();if(n)return{height:n.Height,width:n.Width}}))}}});r.show(n).catch((function(){}))};if(t.articleId)(0,a.G4)("Articles","GetItems",{articles:[t.articleId]}).then((function(e){e.Articles&&e.Articles.length>0&&n(new i.nd.data.article(e.Articles[0]))}));else{if(t.pageNumber){var r=f.A.pages.getPage(t.pageNumber);if(r&&r.isPotentiallyRestrictedMode())return}n()}}}),e.elm().wheel({accumulate:!0,accumulateMinInterval:60,accumulateMaxTime:300,accumulateMinTimeSinceProcessed:1e3,handler:H.onwheelHorizontal}).wheel({accumulate:!0,accumulateMinInterval:60,accumulateMaxTime:60,accumulateMinTimeSinceProcessed:800,handler:H.onwheelVerticale}),e.resize(j.onresize.bind(j)),f.A.pageKeysLoaded((function(e){j.isEnable()&&(j.reflow(),Q.Ay.hide())})),f.A.pageLoaded((function(e){j.reflow()})),f.A.pages.loadedChange((function(e){b=e.value,u.switchToDefault(),j.isEnable()&&(j.renderIssue(),Q.Ay.hide(),k.X.send(new E.wp({cid:f.A.cid(),date:f.A.issueDate()})))})),f.A.pages.gotoPageCalled((function(e){if(j.isEnable()&&(j.animateToPage(e.page),e.articleId)){var n=t.currentAnimationDeferred();n&&n.then((function(){j.zoomToArticle(e.page,e.articleId)}))}})),f.A.pages.addViewFactory(S,(function(e){return new m(e)})),this.onresize()},show:function(e){return e&&e.data&&e.data.resetSearchText&&(i.nd.viewer.topBar.resetSearchText(),i.nd.viewer.pagesViewHighlighter.confirm("")),P=e,A=!0,(b=f.A.pages.loaded())&&(e.disableAnimation&&(I=!0),u.switchToDefault(),this.renderIssue()),e&&e.callback&&e.callback(),this},hide:function(){return A=!1,this.unloadImages(),n.cleanUp(),this},disable:function(){return A=!1,b=!1,this},isEnable:function(){return A&&b&&f.A.pages.loaded()},reset:function(){o=null,ae=[],C.A.setInitialPosition(this)},onresize:function(){var e=y.rect();return this._rect.width=e.width,this._rect.height=e.height,p.width(2*e.width).height(2*e.height),this.reflowAsync()},reflowAsync:function(){return this.isEnable()&&requestAnimationFrame(this._onReflowAsync),this},_onReflowAsync:function(){j.isEnable()&&j.reflow()},renderIssue:function(){var e;if(Q.Ay.show(),n.build(),f.A.page()?e=f.A.page():P&&P.page&&(e=P.page),e&&(h=f.A.pages.getPage(e)),this.reflow(!0),P){if(P.page&&P.articleId){if(1===o.pageNumber()||o.key()||!o.isPotentiallyRestrictedMode()){var t=this,r=P.articleId;i.nd.viewer.pagesViewLayout.loaded().then((function(){t.zoomToArticle(o,r)}))}}else if(o){var a=P.zoom,s=P.origin,c=parseInt(a,10);isNaN(c)||(a=u.zooms()[c],s={x:0,y:0}),a&&s&&u.compareZooms(a,u.current())>0&&o.PageView().zoomAnimation().startZoomAnimation(a,s,P.origin2)}P=null}return this},getDefaultZoom:function(){return u.defaultZoom()},updateBaseLine:function(){var e,t=u,n=this._rect,i=n.height,r=n.width;return r<400||i<400?(t._updateZooms(r-3,i-3),e=2):r<800&&i>r?(t._updateZooms(r-10,i-10),e=5):(t._updateZooms(.5*(r-20),i-20),e=10),this._topBaseLine=e,this},getBaseLine:function(){return this._topBaseLine},getActivePageOrDefault:function(){var e=o;if(!e){var t=f.A.pages.activePages();t&&t.length>0&&(e=t[Math.floor(t.length/2)])}return e||(e=f.A.pages.firstPage()),e},getPendingPage:function(e){var t=h;return e&&(h=null),t},updateClassName:function(){var e=f.A.contentIsRtl(),t={"contentdir-rtl":e,"contentdir-ltr":!e};return r.each(t,(function(e,t){e?p.addClass(t):p.removeClass(t)})),this},reflow:function(e){if(e&&this.reset(),!this.isEnable())return this;e&&this.updateClassName();var t=this.updateBaseLine().getBaseLine(),n=this._rect.width,i=u,r=i.defaultZoom();ie?r=i.current():i.current(r);var a=this.getPendingPage(!0)||this.getActivePageOrDefault(),s=a.leftPageIfSpread(),c=a.rightPageIfSpread(),l=s.PageView(),d=c.PageView();if(a!==o){if(l!=d){l.setZoom(r),d.setZoom(r);var h=l.getWidth()+d.getWidth(),f=Math.floor((n-h)/2);l.setPosition(f,t),d.setPosition(f+l.getWidth(),t)}else l.setZoom(r),h=l.getWidth(),f=Math.floor((n-h)/2),l.setPosition(f,t);j.changeActivePage(a,!0)}else if(!a.PageView().zoomAnimation().isActiveOrPending()){var p=a.PageView().getZoom().fitToHeight;p||(p=i.compareZooms(r,a.PageView().getZoom())>0),p&&(a.PageView().setZoom(r).setTop(t),j.adjustActiveSpread(a))}for(var m=c.rightPage();m;)m.PageView().setZoom(r),m=m.rightPage();for(m=s.leftPage();m;)m.PageView().setZoom(r),m=m.leftPage();return this.updatePagePositions()},zoomToArticle:function(e,t){if(i.nd.viewer.pagesViewLayout){var n=i.nd.viewer.pagesViewLayout.findArticleRect(t,e);if(n){var r=e.PageView(),o=r.getElmOffset(),a={pageX:o.left+r.getWidth()/2,pageY:o.top+r.getHeight()/2,data:{regionRect:n,caller:"zoomToArticle"}};this.onpagedoubleclick(r,a)}}},onpagedoubleclick:function(e,t){var n,i=e.page();k.X.send(new E._G({pageNumber:i.pageNumber()})),this.changeActivePage(i);var r,o,a=this.getActiveSpreadsSecondPageView(i);this._rect.height>e.getHeight()?(r=u.defaultMZoom(),o=!0):r=u.defaultZoom();var s=V.getOrigin(e,t.pageX,t.pageY),c=a?V.getOrigin(a,t.pageX,t.pageY):null;if(o||ie){var l=t.data?t.data.regionRect:null;if(l){"zoomToArticle"===(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.caller)&&(r=u.current());var d=e.zoomAnimation().getPositionForZoom(r,t.pageX,t.pageY);l.L*=d.width,l.R*=d.width,l.T*=d.height,l.B*=d.height,l.L+=d.left,l.R+=d.left,l.T+=d.top,l.B+=d.top;var h=this._rect,f=h.height,p=h.width,m=null;l.L<0?m=d.left-l.L:l.R>p&&((y=l.R-p)>l.L&&(y=l.L),m=d.left-y);var g=null;if(l.T<0?g=d.top-l.T:l.B>f&&((y=l.B-f)>l.T&&(y=l.T),g=d.top-y),null!=g&&(s.translateTopFinal=g,c&&(c.translateTopFinal=g)),null!=m&&(s.translateLeftFinal=m,c)){var v=a.zoomAnimation().getPositionForZoom(r,t.pageX,t.pageY),y=d.left-m;c.translateLeftFinal=v.left-y}}}e.zoomAnimation().startZoomAnimation(r,s,c)},findClosestPage:function(e,t){if(!o)return null;var n=e-p.offset().left,i=1e9,r=null;for(var a in{nextPage:1,prevPage:2})for(var s=o;s;){var u,c=s.PageView();if(!c.isVisible())break;if(c.getLeft()>n)u=c.getLeft()-n;else{if(!(c.getRight()u&&(i=u,r=s),s=s[a]()}return r},getActiveSpreadsSecondPageView:function(e){return(e=e||o)?(e.isSpread||(e=e.page()),e.isSpread()?e.isSpreadRight()?e.leftPageIfSpread(S):e.rightPageIfSpread(S):null):null},adjustActiveSpread:function(e){if(!(e=e||o))return this;if(!e.isSpread())return this;var t,n=e.PageView();if(e.isSpreadRight())t=e.leftPageIfSpread(S);else{if(!e.isSpreadLeft())return this;t=e.rightPageIfSpread(S)}t.getZoom()!==n.getZoom()&&t.setZoom(n.getZoom());var i=n.getTop(),r=n.getLeft();e.isSpreadRight()?r-=t.getWidth():r+=n.getWidth(),t.setLeft(r),t.setTop(i);var a=this.getVisibleRect(!0);return n.setVisibility(!0,a),t.setVisibility(!0,a),this},getVisibleRect:function(e){var t=this._rect,n=t.height,i=t.width,r=e?0:i,o=e?0:n/2,a={left:-r,right:i+r,top:-o,bottom:n+o};return a.width=a.right-a.left,a.height=a.bottom-a.top,a},checkPages:function(){var e=n.getLeftItemForPage(o);if(!e)return this;var t=n.getItemForPage(s);s=null;var r=!e.isDistanceExceed(t,3);e.setVisibilityForSpread(!0,this.getVisibleRect(!1));var a=this._rect,u=a.width;if(e.spreadOffsetRight()<0||e.spreadOffsetLeft()>u)var c=!0,l=a.left+a.width/2;for(var d=this.getVisibleRect(!1),h=e.leftItem(),f=0;h;){if((v=h.offsetRight()>d.left)&&c&&h.isPage()){var p=Math.abs(l-h.getMidX());if(!g||pa&&l.offsetLeft()>a);)l.setPosition(c,s),c+=l.width(),!l.isSpreadRight()&&l.isSpread()||(c+=30),l=l.rightItem();var d=n.getLeftItemForPage(o);for(c=d.spreadOffsetLeft()-30,l=d.leftItem();l&&!(e&&c<0&&l.offsetRight()<0);)c-=l.width(),l.setPosition(c,s),!l.isSpreadLeft()&&l.isSpread()||(c-=30),l=l.leftItem();return i.nd.viewer.pagesView.layoutUpdated(this),function(e){if(e){var t=[];e.isPage()&&e.isBlockVisible()&&t.push(e.pageNumber());for(var n=e.leftItem();n&&n.isPage()&&n.isBlockVisible();)t.push(n.pageNumber()),n=n.leftItem();for(n=e.rightItem();n&&n.isPage()&&n.isBlockVisible();)t.push(n.pageNumber()),n=n.rightItem();"function"==typeof oe&&oe.cancel(),ae=ae||[],(oe=r.debounce((function(){r.difference(t,ae).forEach((function(e){k.X.send(new E.Hv({pageNumber:e})),ae.push(e)}))}),ne))()}}(n.getItemForPage(o)),t?this:this.checkPages()},checkRightsForZoom:function(e,t){return!(e&&t&&e.PageView().confirmRequiredForZoom(t))||f.A.requestPageConfirmation(e)},unloadImages:function(){r.invokeMap(f.A.pages.getViews(S),"_disable"),g.unloadImages()},getActiveSpreadWidth:function(){var e=o;if(!e)return 0;var t=e.leftPageIfSpread(S),n=e.rightPageIfSpread(S),i=t.getLeft();return n.getRight()-i},isSinglePageView:function(){return this.getActiveSpreadWidth()>this._rect.width},animateToPage:function(e,t){return this.gotoPage(e,!0,t)},animateToLeftPage:function(){var e=f.A.contentIsRtl()?-1:1;return this.animateToNextPage(-1*e)},animateToRightPage:function(){var e=f.A.contentIsRtl()?-1:1;return this.animateToNextPage(1*e)},animateToNextPage:function(e){var t=o;if(!t)return this;var n=this.isSinglePageView();if(e>0){if(n?t.rightPageIfSpread(S).getRight()0&&(t=t.leftPageIfSpread()):t=t.leftPageIfSpread(),!(t=t.leftPage()))return this.animateToPage(f.A.pages.mostRightPage(),-1);return this.animateToPage(t)},gotoPage:function(e,n,r){var o;2===arguments.length&&"boolean"!=typeof arguments[1]?(n=(o=arguments[1]).animate,r=o.dir):o={};var a=e.leftPageIfSpread(S),s=e.rightPageIfSpread(S),u=a.getLeft(),c=s.getRight(),l=this._rect.width,d=c-u;I&&(I=!1,n=!1),a.setVisibility(!0),s.setVisibility(!0);var h=Math.floor((l-d)/2);d>l&&(h=e==a.page()||a===s?5:l-a.getWidth()-s.getWidth()-5);var f=u-h;return n?t.playAndChangeActivePage(-f,r,e,o.duration,o.easing):(a.setLeft(h),a!=s&&s.setLeft(h+a.getWidth()),this.changeActivePage(e),this.updatePagePositions()),i.nd.event.trigger("beforeScroll",i.nd.viewer.pagesView,{delta:-f,reason:o.reason||_.Ay.scrollReason.keyPress}),this},animateToItem:function(e){if(e.isPage())return this.animateToPage(e.pageNumber());var t=this._rect.width-e.width(),n=Math.min(10,Math.max(t/2,0)),i=f.A.contentIsRtl()?this._rect.width-e.offsetRight()-n:-e.offsetLeft()+n;return this.animateToOffsetX(i)},animateToOffsetX:function(e){return t.play(e),this},onPageViewResizing:function(e){e.updateZoomState(this._rect);var t=this.getActiveSpreadsSecondPageView(e);if(t){var n=Math.max(e._rect.height,t._rect.height);e._rect.speadHeight=n,t._rect.speadHeight!=n&&(t._rect.speadHeight=n,t._updateElm())}},container:function(){return p},setViewportLeft:function(e){isNaN(e)||(x=e)},_isContinuousAnimationActive:!1,gotoFirstPage:function(e){if(!this._isContinuousAnimationActive){for(var t=f.A.pages.firstPage(),n=t;n&&(n.PageView().loadImages(),n!==o);n=n.nextPage());var i=300*(o.pageNumber()-t.pageNumber());this.gotoPage(t,{animate:!0,duration:i,easing:"linear",reason:e}),this._isContinuousAnimationActive=!0}},gotoLastPage:function(e){if(!this._isContinuousAnimationActive){for(var t=f.A.pages.lastPage(),n=o;n&&(n.PageView().loadImages(),n!==t);n=n.nextPage());var i=300*(t.pageNumber()-o.pageNumber());this.gotoPage(t,{animate:!0,duration:i,easing:"linear",reason:e}),this._isContinuousAnimationActive=!0}},stopConinuousAnimation:function(){this._isContinuousAnimationActive&&(t.cancel(),this._isContinuousAnimationActive=!1)}});return j.on("activePageChanged",(function(e,t){i.nd.navHistory.updateState({page:t.page.pageNumber()}),window.setTimeout((function(){!function(){if(o&&o._isFirst){var e=o.PageView().getLeft();j.animateToOffsetX(x+n.leftPadding-e)}}()}),0)})),j.on("zoomChanging",(function(e,t){i.nd.navHistory.updateState({zoom:t.zoom,origin:t.origin,origin2:t.origin2,articleId:null})})),j.on("zoomChanged",(function(e,t){i.nd.navHistory.updateState({zoom:t.zoom,origin:t.origin,origin2:t.origin2,articleId:null})})),{init:function(e){return j.initPanel(e),this},show:function(e){return j.show(e),this},disable:function(){return j.disable(),this},hide:function(){return j.hide(),this},renderIssue:function(){return j.renderIssue(),this},reflow:function(){return j.reflow(),this},getPageContainer:function(){return p},Elm_GetVisibleWidth:function(){return j._rect.width},getContainerRect:function(){return j._rect},getViewportRect:function(){var e=x,t=j._rect;return{top:t.top,left:Math.max(e,t.left),width:t.width-(e>t.left?e-t.left:0),height:t.height}},Page_ondoubleclick:function(e,t){var n=e._elm.tintCont,i=w.A.getRedirectionUrl("OnPageLockClicked");n.visible()&&""!==i?window.location=i:j.onpagedoubleclick(e,t)},onPageViewResizing:function(e){return j.onPageViewResizing(e),this},setViewportLeft:j.setViewportLeft}}();function m(e){this._page=e,this._rect=new c.A,this._disable(),this.bgcolor=e.bgcolor(),this._page.isInitedChange(this,this._page_isInitedChange.bind(this))}m.prototype={_elm:null,_rect:null,_viewport:null,_page:null,scale:0,zoomMode:0,bgcolor:null,_page_isInitedChange:function(e){e.value?this._pageInited():this._disable()},_pageInited:function(){return this.bgcolor=this.page().bgcolor(),this},_attachElm:function(){return this._elm||(this._elm=g.attach(this).update()),this},_updateElm:function(){return this._elm&&this._elm.update(),this},_detachElm:function(){return this._elm&&(this._elm=this._elm.detach(),this._onimageschange()),this},_disable:function(){return this.scale=0,this._zoomInfo=null,this._detachElm(),this._onimageschange(),this},updateZoomState:function(e){var t=this._rect.width>e.width||this._rect.height>e.height;this._zoomOn!==t&&(this._zoomOn=t,this._updateElm())},ondoubleclick:function(e){p.Page_ondoubleclick(this,e)},getClassName:function(){var e="page";if(this._page.isSpread()){var t=this._page.isSpreadLeft();f.A.contentIsRtl()&&(t=!t),e+=t?" page-left":" page-right"}else this._page.isFirst()?e+=" page-cover":this._page.isLast()&&(e+=" page-back");return this._page.isPotentiallyRestrictedMode()||(e+=" page-unlocked"),e+(this._zoomOn?" zoom-on":" zoom-off")},getElmCont:function(){return this._elm.cont},getElmOffset:function(){var e=this.getElmCont().offsetParent().offset();return e.left+=this.getLeft(),e.top+=this.getTop(),e},isVisible:function(){return!!this._elm},setVisibility:function(e,t){return e?this._attachElm()._loadImage(t):(this.page().isActive(!1),this._detachElm())},loadImages:function(e){return this._attachElm()._loadImage(e)},page:function(){return this._page},getSizeForZoom:function(e){return this.page().getZoomInfo(e).size},getScaleForZoom:function(e){return this.page().getZoomInfo(e).scale},getSizeForCurrentZoom:function(){return this.page().calculateSize(this.rscale)},moveAnimation:function(){return t},zoomAnimation:function(){return this._zoomAnimation||(this._zoomAnimation=new e(this)),this._zoomAnimation},_areZoomInfoEqual:function(e,t){return!(!e||!t)&&e.scale===t.scale&&e.confirmRequired===t.confirmRequired&&e.usePreviewKey===t.usePreviewKey&&e.zoomMode===t.zoomMode},setZoom:function(e){this._zoom=e;var t=this.page().getZoomInfo(e);return this._areZoomInfoEqual(t,this._zoomInfo)||(t.confirmRequired?this.scale||(this.scale=this.page().calculateZoomScale(u.defaultZoom())):this.scale=t.scale,this.rscale=t.scale,this.zoomMode=t.zoomMode,this._zoomInfo=t,this._setSize(t.size),this._onimageschange()),this},getZoom:function(){return this._zoom},getSize:function(){return this._rect},getWidth:function(){return this._rect.width},getHeight:function(){return this._rect.height},setPosition:function(e,t){return e=Math.floor(e),t=Math.floor(t),this._rect.left===e&&this._rect.top===t||(this._rect.locate(e,t),this._updateElm()),this},getPosition:function(){return this._rect},getLeft:function(){return this._rect.left},setLeft:function(e){return e=Math.floor(e),this._rect.left!==e&&(this._rect.left=e,this._updateElm()),this},getRight:function(){return this._rect.left+this._rect.width},getMidX:function(){return this._rect.left+this._rect.width/2},getTop:function(){return this._rect.top},setTop:function(e){return e=Math.floor(e),this._rect.top!==e&&(this._rect.top=e,this._updateElm()),this},hitTest:function(e,t){return!((e||0===e)&&(ethis._rect.left+this._rect.width)||(t||0===t)&&(tthis._rect.top+this._rect.height))},confirmRequiredForZoom:function(e){return this.page().confirmRequiredForZoom(e)},confirmRequired:function(e){return this.page().confirmRequired(e||this.rscale)},_onimageschange:function(){return this.img_inited=this.img_loaded=!1,this},_loadImage:function(e){var t=!1;if(this._attachElm(),this._initImages(),this.img_loaded)return this;this.img_loaded=!0;var n=this._elm.img;if(!this.zoomMode)return n.load(t),this;var i=this.scale,r=this.page().areas().length;if(e){var o=e.left,a=e.top;e.isRelative||(o-=this._rect.left,a-=this._rect.top);var s=o+e.width,u=a+e.height;this.img_loaded=n.loadCells({left:o,top:a,right:s,bottom:u},r,t,i)}else this.img_loaded=n.loadCells(null,r,t,i);return this},_initImages:function(){if(this.img_inited)return this;this.img_loaded=!1,this.img_inited=!0;var e=this.page(),t=this.scale,n=this._elm.img;n.setIsZoomMode(this.zoomMode),n.setSingleLayerMode(e.isSingleLayer()),n.setRect(this._rect);var i=!1===n.isLayersEnabled();if(this.zoomMode){i?(n.setBgUrl(null),n.setFgUrl(null)):(n.setBgUrl(e.buildMagnifierUrl(t)),n.setFgUrl(null));for(var r=e.areas(),o=t/100,a=0,u=r.length;a1&&(n.setBgUrl(null),n.setFgUrl(null)),this},_setSize:function(e,t){null!=e.width&&(t=e.height,e=e.width);var n=this._rect;return n.width==e&&n.height==t||(n.width=e,n.height=t),n.speadHeight=t,p.onPageViewResizing(this),k.X.send(new E.cq({width:e,height:t,pageNumber:this.page().pageNumber()})),this._updateElm(),this}};var g=function(){var e=[],t=0,n=[],a=i([]);function s(e){this.id=t++,this.parent=e,this.baseZindex=0,this.cont=this.parent.createChild("div",{position:"absolute",zIndex:this.baseZindex,transformOrigin:"0 0",overflow:"visible"}).optimizeShowHideForSingleElement(!0),this.imgCont=this.cont.createChild("div",{position:"absolute",zIndex:0,width:0,height:0,overflow:"hidden"}),this.tintCont=this.cont.createChild("div",{position:"absolute",zIndex:1,width:0,height:0,overflow:"hidden",display:"none"}),this.layersCont=this.cont.createChild("div",{position:"absolute",zIndex:2,width:0,height:0,overflow:"visible"}),this.img=h.A.createImage(this.imgCont.get(0)),this.cont.doubletap({doubleTap:this.ondoubleclick.bind(this),tap:this.ondoubleclick.bind(this)}),n.push(this),a=a.add(this.cont),y.pageContainerCreated(this),this.cont.bind("onContextMenu",this.onContextMenu.bind(this))}return s.prototype={id:null,bgcolor:null,onattached:i.nd.delegate(),ondettached:i.nd.delegate(),onshowed:i.nd.delegate(),onresized:i.nd.delegate(),onmoved:i.nd.delegate(),onupdated:i.nd.delegate(),onContextMenu:function(e){e.contextMenu.pageNumber=this.getPageNumber()},getLayersContainer:function(){return this.layersCont},getTintContainer:function(){return this.tintCont},getImgContainer:function(){return this.imgCont},getPageNumber:function(){return this.owner?this.owner.page().pageNumber():-1},getWidth:function(){return this.width},getHeight:function(){return this.height},ondoubleclick:function(e){this.owner&&this.owner.ondoubleclick(e)},unloadImages:function(){return this.img.reset(),this},getPage:function(){return this.owner?this.owner.page():null},getPageView:function(){return this.owner},getNormalizedVisibleRect:function(){if(!this.owner)return null;var e=this.owner.page(),t=this.getPageBoundingRect(),n=p.getViewportRect(),i=(0,o.SV)(n,t);if(!i)return null;var r=t.leftn.left?(n.left-t.left)/t.width:0,a=t.topn.top?(n.top-t.top)/t.height:0,s=i.height/t.height,u=i.width/t.width;return{left:r.toPrecision(4),top:a.toPrecision(4),height:s.toPrecision(4),width:u.toPrecision(4),visibleAreaSquare:i.width*i.height,visibleAreaToViewport:i.width*i.height/(n.width*n.height),scale:this.owner.scale,pageNumber:e.pageNumber(),pageName:e.pageName(),areaNumber:e.pageNumber(),areaName:e.pageName()}},getPageBoundingRect:function(){var e=p.getContainerRect(),t=this.getPageView()._rect;return{left:e.left+t.left,top:e.top+t.top,width:t.width,height:t.height}},isVisible:function(){var e=this.getNormalizedVisibleRect();return!!e&&parseFloat(e.width)&&parseFloat(e.height)},attach:function(e){return this.owner=e,this.cont[0].pageNumber=this.getPageNumber(),this.onattached(),this},detach:function(){return this.cont.hide(),this.cont.vis=!1,this.img.reset(),e.push(this),this.ondettached(),this.owner=null,this.bgcolor=null,this.className=null,null},update:function(){if(!this.owner)return i.writeError("trying update detached elm"),this;var e=this.owner._rect,t=this.cont[0];this.bgcolor!==this.owner.bgcolor&&(t.style.backgroundColor=this.bgcolor=this.owner.bgcolor),this.className!==this.owner.getClassName()&&(t.className=this.className=this.owner.getClassName());var n=!1;return this.width!==e.width&&(this.width=e.width,this.cont.fastCss("width",this.width+"px"),this.imgCont.fastCss("width",this.width+"px"),this.layersCont.fastCss("width",this.width+"px"),this.tintCont.fastCss("width",this.width+"px"),n=!0),this.height!==e.height&&(this.height=e.height,this.imgCont.fastCss("height",this.height+"px"),this.layersCont.fastCss("height",this.height+"px"),n=!0),this.speadHeight!==e.speadHeight&&(this.speadHeight=e.speadHeight,this.cont.fastCss("height",this.speadHeight+"px"),this.tintCont.fastCss("height",this.speadHeight+"px"),n=!0),this.cont.vis||(this.cont.show(),this.cont.vis=!0,this.onshowed()),n&&this.onresized(),(this.left!==e.left||this.top!==e.top||this.scale!==e.scale)&&(this.top=e.top,this.left=e.left,this.scale=e.scale,this.onmoved(),this._left=e.left,this.scale&&$.b.csstransforms?(this.cont.css("transform",i.nd.matrix.toTranslateString(this.left,this.top)+" "+i.nd.matrix.toScaleString(this.scale)),i.log("!!!TRANSFORM!!!")):this.cont.translate(this.left,this.top,!0)),this.onupdated(),this}},{attach:function(t){return e.length?e.pop().attach(t):new s(p.getPageContainer()).attach(t)},getAllElmContainers:function(){return a},unloadImages:function(){return r.invokeMap(n,"unloadImages"),this}}}(),y={init:function(e){return p.init(e),this},show:function(e){return C.A.linkView(this),p.show(e),this},disable:function(){return p.disable(),this},hide:function(){return p.hide(),this},getNavigationHistoryConfig:function(){return{issue:{includeInUrl:!0},cid:{includeInUrl:!0},bookmark:{includeInUrl:!0}}},getTopBarConfig:function(){var e=i.nd.issueMenuOptions;return{backEnable:!0,starEnable:!0,showNewpaperName:!0,headerClass:"toolbar-issuetitle",isMainMenuEnabled:!0,actionMenuOptions:[e.issueDate,e.listen,e.lang],generalMenuOptions:[e.emailAlerts,e.interfaceLang,e.fonts]}},pageContainerCreated:i.nd.delegate(!0),layoutUpdating:i.nd.delegate(!0),layoutUpdated:i.nd.delegate(!0),issueLayoutUpdated:i.nd.delegate(!0)};return y}(),ue=i.extend({},new u.A,se);!function(e){var t=[];function n(){if(w.A.isLogin()){var e=(0,r.filter)(t,(function(e){return e.page&&e.pageCont.isVisible()}));(function(e){var t=f.A.issue();return(0,A.Wm)(t).then((function(t){return(0,r.reduce)(e,(function(e,n){return e[n]=(0,r.some)(t,(function(e){return(0,r.includes)(e.pages,n)})),e}),{})}))})((0,r.map)(e,(function(e){return e.page.pageNumber()}))).then((function(t){e.forEach((function(e){var n=t&&t[e.page.pageNumber()];e.showBookmark(n)}))}))}}e.pageContainerCreated((function(e){return function(e){t.push(new I(e))}(e)})),e.issueLayoutUpdated((function(){return n()}));g.Lo.subscribe((function(){return(0,r.delay)((function(){return n()}),1e3)}));C.A.linkView(e)}(ue),i.nd.viewer.pagesView=ue;var ce=ue},47912:function(e,t,n){"use strict";var i,r=n(58932),o=n(29583),a=n(12010),s=n(13302),u=n(10358),c=n(12030),l=n(15397),d=n(65678),h=n(19299),f=n(67660),p=n(27189),m=n(82788),g=n(28057),v=n(11261),y=n(84901),_=n(12993),b=n(96587),w=n(29392),C=n(20847),A=n(60713),I=n(53236),S=n(2215),P=n(70989),x=n(64936),T=n(43150),k=n(51175),E=n(44260),M=n(88813),D=n(72672),N=n(86699),L=n(72167),V=n(42022);function R(){return i||(i=(0,r.sH)(this,void 0,void 0,(function(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,c.hz)()];case 1:return[2,e.sent()]}}))}))),i}function H(e){return function(){N.A.isLogin()?e.apply(this,arguments):L.default.signIn()}}t.A=function(){function e(e){this._config=o.extend({},this._defaultConfig,e),this._controller=null,this._model={enabled:a.observable(),css:a.observable(),template:a.observable(),title:a.observable()},o.extend(this,this._model),this.init()}function t(e,t){this.config=o.extend({},e),this.container=t}function n(e,t,n){this._config=o.extend({},this._defaultConfig,e),this.container=t,this.height=0,this.items=n||a.observableArray(),this.isAnimated=!1}o.extend(e.prototype,{_defaultConfig:{template:"sidebarSettings_default",authorized:!1,enabled:!0,constructor:C.A.singleItem,clickWrapper:function(e){e.apply(this,arguments)},position:{x:o.windowWidth()/2,y:o.windowHeight()/2,align:{x:w.Ay.align.center,y:w.Ay.align.center}}},init:function(){for(var e in this._model)this._model.hasOwnProperty(e)&&this._config[e]&&this._model[e](this._config[e])},update:function(){},onClick:function(){this._controller||(this._controller=new this._config.constructor(this._config),this._controller.itemsControllerCTOR(A.A.get(this._config.itemName)).itemsControllerParams([this._controller]));var e=this,t=function(){e._controller.show(e._config)};this._config.authorized&&(t=H(t)),e._config.clickWrapper(t)()},hide:function(){this._controller&&this._controller.toggleVisibleFlag&&this._controller.toggleVisibleFlag(!1)}}),o.extend(t.prototype,{controllers:null,container:null,_template:"v7.Client.Sidebar.Settings",height:0,initModel:function(){this.config.childClickWrapper&&(e.prototype._defaultConfig.clickWrapper=this.config.childClickWrapper),this.controllers=[];var t=new e({title:E.Ay.val("Menu.Fonts"),css:"",itemName:"fonts"});this.controllers.push(t),p.A.get("ui.Sidebar.ShowEmailAlertsInSettings",!0)&&(t=new e({title:E.Ay.val("Menu.Account.EmailAlerts"),authorized:!0,css:"",itemName:"emailAlerts"}),this.controllers.push(t)),p.A.get("interfaceLanguage").enabled&&((t=new e({template:"sidebarSettings_translate",title:E.Ay.val("Menu.InterfaceLanguage"),css:"",itemName:"language"})).interfaceLanguage=a.observable((0,h.KK)()),this.controllers.push(t))},render:function(e){this.container=e||this.container||o(document.body),M.A.renderTo(this._template,this,this.container)},show:function(){this.controllers||(this.initModel(),this.render())},update:function(){for(var e=0;e ul",K.container).outerHeight(),!K.isAnimated){K.isAnimated=!0;var n=K.container.outerHeight();0==n&&K.update(),K.container.parent("li").toggleClass("is-expanded"),K.container.animate({height:0===n?K.height:0},{duration:O.animationDuration,queue:!1,complete:function(){K.isAnimated=!1,A.apply(this,arguments)}})}}function C(){(J?Promise.resolve(J):(J=new n({childClickWrapper:h},o("#myNewspapersContainer",U.elm()),G.myNewspapers)).init().then((function(e){return J.height=o("> ul",J.container).outerHeight(),g.A.stream.subscribe((function(e){e.length>0?J&&J.update().then((function(){J.height=o("> ul",J.container).outerHeight()})):s()})),J}))).then((function(e){if(!e.isAnimated){e.isAnimated=!0;var t=e.container.outerHeight();e.container.parent("li").toggleClass("is-expanded"),e.container.animate({height:0===t?e.height:0},{duration:O.animationDuration,queue:!1,complete:function(){e.isAnimated=!1,A.apply(this,arguments)}})}}))}function A(){if(U&&X&&Y){var e=U.elm().innerHeight()-Y.outerHeight();X.css({height:e}),X.trigger("resize")}}function F(e){G&&G.tintEnabled()&&e.which===T.u.esc&&v(),z(e)}function B(e){e.velocity().vx<0&&Math.abs(e.velocity().vx)>Math.abs(e.velocity().vy)&&v()}function z(e){return e||(e=window.event),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,!1}var O={newsFeedEnabled:!0,catalogEnabled:!0,onDeviceEnabled:!1,favoritesEnabled:!1,monitorsEnabled:!0,peopleEnabled:!1,settingsEnabled:!0,giftCardEnabled:!1,hotzoneMapEnabled:!0,accountEnabled:!0,opinionsEnabled:!1,helpEnabled:!0,aboutEnabled:!0,blogEnabled:!0,slideProp:"translateLeft",animationDuration:350},j=null,U=null,W=null,Y=null,X=null,q=null,G=null,K=null,J=null,Q={configService:!0,myNewspaperService:!0,catalogService:!0,loaded:function(){for(var e in this)if(this.hasOwnProperty(e)&&"boolean"==typeof this[e]&&!this[e])return!1;return!0}},Z=!1;return{show:function(e){if(G)return c(),void v(e);var t;(t={enabled:a.observable(!1),tintEnabled:a.observable(!1),userInfoEnabled:a.observable(!0),signInEnabled:a.observable(!0),avatar:a.observable((0,u.tr)(I.default.nickname,I.default.photoUrl,u.eV.medium)),profileMenuShow:function(){v(H((function(){y.A.goView(d.lP.Profile,{type:"profile",profileId:I.default.getProfileId()})})))},isLogin:a.observable(N.A.isLogin()),nickName:a.observable("..."),photo:a.observable(I.default.photo||{}),signIn:function(){v((function(){L.default.signIn()}))},newspapersCountEnabled:a.observable(!1),newspapersCount:a.observable("…"),myNewspapers:a.observableArray(),newsFeedEnabled:a.observable(O.newsFeedEnabled),catalogEnabled:a.observable(O.catalogEnabled),catalogSimpleView:a.observable(!0),catalogShow:function(){return v((function(){return R().then((function(e){return D.default.show({metaData:e})}))}))},myNewspapersToggle:C,onDeviceEnabled:a.observable(O.onDeviceEnabled),onDeviceShow:function(){},favoritesEnabled:a.observable(p.A.get("ui.Bookmarks.enable",!1)),favoritesShow:function(){v((function(){var e=P.A.findView(d.lP.Bookmarks);y.A.goView(d.lP.Bookmarks,e.createParams({profileId:I.default.getProfileId()}),!0)}))},favoritesCountAll:a.observable(),monitorsEnabled:a.observable(O.monitorsEnabled),monitorsShow:function(){v((function(){y.A.goView(d.lP.Monitors,{type:"monitor",monitorId:0})}))},monitorsCount:a.observable(),peopleEnabled:a.observable(O.peopleEnabled),peopleShow:function(){},settingsEnabled:a.observable(O.settingsEnabled),settingsToggle:w,emailAlertEnabled:a.observable(O.emailAlertEnabled),emailAlertShow:function(){v((function(){o.nd.navHistory.goView(d.lP.EmailAlerts)}))},customizeHomeShow:function(){v(H((function(){b.default.feedSettings.show()})))},hotzoneMapEnabled:a.observable(O.hotzoneMapEnabled),hotzoneMapShow:function(){v((function(){y.A.goView(d.lP.HotSpotsHub)}))},accountEnabled:a.observable(O.accountEnabled),accountShow:function(){v((function(){window.location=window.basePath+"accounting/account"}))},opinionsEnabled:a.observable(O.opinionsEnabled),opinionsShow:function(){v((function(){y.A.goView(d.lP.OpinionsHub,{reload:!0})}))},helpEnabled:a.observable(O.helpEnabled),helpShow:function(){v((function(){y.A.goView(d.lP.Help)}))},aboutEnabled:a.observable(O.aboutEnabled),aboutLocation:a.observable(),blogEnabled:a.observable(O.blogEnabled),blogLocation:a.observable(),hotzoneMapEnabled:a.observable(),logout:function(){v((function(){return(0,r.sH)(this,void 0,void 0,(function(){return(0,r.YH)(this,(function(e){switch(e.label){case 0:return[4,L.default.signOut()];case 1:return e.sent()&&S.A.enableOriginalLanguage(),[2]}}))}))}))}}).categories=a.observableArray(),N.A.onUserStateChanged(i),G=t,i(),c(),M.A.renderTo("v7.Client.Sidebar",G,U.elm()),G.enabled(!0),(W=o("#sidebarMenu",U.elm())).css({position:"relative","-ms-touch-action":"none"}),o.browser.msie&&o.browser.msie_mode<10&&(O.slideProp="left"),W.css(O.slideProp,-W.outerWidth()),Y=o(".appmenu-header",W),X=o(".appmenu-body",W),q=o(".dialog-tint",U.elm()),k.Ay.bind(q,{fling:B,singleTap:function(){v()}}),A(),o(document).keyup(F),v(e)},init:function(e,t){j=t,(U=e).resize(null,A)}}}();return o.nd.viewer.sidebar=i}()},27461:function(e,t,n){"use strict";n.d(t,{eM:function(){return x},oi:function(){return T},w1:function(){return k}});var i=n(58932),r=n(29583),o=n(13302),a=n(27189),s=n(7368),u=n(10358),c=n(51568),l=n(53236),d=n(46977),h=n(44260),f=n(1943),p=n(92066),m=n(67606),g=n(85377),v=n(18970),y=n(3585),_=n(57551),b=n(21773),w=n(48389),C=n(70989),A=n(70953),I=n(67010),S=n(25778),P=function(){function e(e,t){void 0===t&&(t={}),this._parent=e||document.body,this._renderedBlock=null,this._context=t,this._available=!0,this._enabled=!0,this._disabledCssClass=""}return e.prototype.available=function(){return this._available&&e.available(this._context)},e.available=function(){return!0},e.prototype.enabled=function(){return this._enabled},e.prototype.disabledCssClass=function(){for(var e=[],t=0;t'));this.available()||t.css("display","none");var n=r('\n \n \n '.concat(h.Ay.val("Comments.WriteComment"),"\n "));return this._refreshUserPhoto(n),t.append(n),e.append(t),this._renderedBlock=t,this._renderedBlock},t.prototype._refreshUserPhoto=function(e){e&&e.find(".userphoto").html((0,u.tr)({nickname:l.default.nickName,imageId:l.default.avatarImageId,size:u.eV.large,fallbackAvatarUrl:l.default.photoUrl}))},t.prototype.click=function(){this._context&&this._enabled?f.A.comment.activate(this._context.view,this._context,!0):(0,d.A)(h.Ay.val("Dialogs.Alert.ActionUnavailable"))},t.prototype.bindEvents=function(){this._renderedBlock&&this._renderedBlock.tap(this.click.bind(this))},t.prototype.dispose=function(){for(var t=[],n=0;n=0?r="pos":i<0&&(r="neg"),o.assign(e,{template:function(){return'\n
  • \n \n \n ').concat(t,'\n \n ').concat(h.Ay.val("Menu.Comment"),"\n \n
  • ")},voteCssClass:"",onCommentsCountUpdated:function(t){if(e._elm){var n=t.PostsCount||"+";e._elm.find("span.lbl-comment > em").text(n)}},onCommentsMetaUpdated:function(t){if(e._elm){var n=this._getCommentElement();this._updateCounter(n,t.commentsCount)}},onVotesMetaUpdated:function(t){if(e._elm){var n=this._getCommentElement();this._updateVotes(n,t.dislikesCount>t.likesCount)}},_getCommentElement:function(){return e._elm.find("span.lbl-comment")},_updateVotes:function(e,t){t?e.removeClass("pos").addClass("neg"):e.removeClass("neg").addClass("pos")},_updateCounter:function(e,t){return e.find("em").text(t||"+")},bindEvents:function(){for(var t=[],i=0;i0?"pri-bookmarked":"pri-bookmark",rootClass:"ati-bookmark",text:this._context.article.BookmarkId&&(null===(n=this._context.article.Collections)||void 0===n?void 0:n.length)>0?h.Ay.val("SaveToCollection.Saved","Saved"):h.Ay.val("SaveToCollection.Save","Save"),postProcess:function(e){o.assign(e,{dispose:function(){for(var t=[],n=0;n0;o.assign(e,{template:function(){return'\n\n \n ').concat(n,'\n ').concat(i,"\n")},bindEvents:function(){for(var t=[],n=0;n\n \n ').concat(n,'\n ').concat(i,"\n")},bindEvents:function(){for(var t=[],n=0;n0&&(a=parseInt(e/o*100,10)),s.css("left","".concat(a,"%")),i?n.addClass("is-voted is-voted-mine"):n.removeClass("is-voted is-voted-mine");var u=r.find(".vote-bump");u.toggleClass("is-selected",i>0),u.find(".pri").toggleClass("pri-bumped",i>0).toggleClass("pri-bump",i<1),u.find(".vote-num").text(p(e));var c=r.find(".vote-dump");c.toggleClass("is-selected",i<0),c.find(".pri").toggleClass("pri-dumped",i<0).toggleClass("pri-dump",i>-1),c.find(".vote-num").text(p(t))}function v(e){g(e.likesCount,e.dislikesCount,e.currentUserVote)}},t.prototype.available=function(){return this._available&&P.available(this._context)},t}(T),E=function(e){function t(t,n){for(var a=[],s=2;s').addClass("page-img");if(u.appendTo(a),this._imgContainerHeight&&(a.css("height","".concat(this._imgContainerHeight,"px")),this._allImgContainerHeights&&a.attr("nd-heights","".concat(o.values(this._allImgContainerHeights)))),this._src&&u.attr("src",this._src),this._imgHeight&&u.attr("height",this._imgHeight),this._imgWidth&&u.attr("width",this._imgWidth),this._addByLine){var c=s.createChild("div").addClass("page-source"),l=s.createChild("div").addClass("page-date");c.text(this._newspaperName),l.text(this._issueDate),this._pageName&&s.createChild("div").addClass("page-num").text(this._pageName)}return t&&i.tap(this._onClick),this._renderedBlock=n,this._renderedBlock},t.prototype.imgContainerHeight=function(e){return e&&(this._imgContainerHeight=e),this},t.prototype.allImgContainerHeights=function(e){return e&&(this._allImgContainerHeights=e),this},t.prototype.imgHeight=function(e){return e&&(this._imgHeight=e),this},t.prototype.imgWidth=function(e){return e&&(this._imgWidth=e),this},t.prototype.addByLine=function(){for(var e=[],t=0;t=0&&r0&&0!=t?1:0,currentVote:e.CurrentVote,text:e.Text,parents:0,authorVote:e.AuthorVote,showCommentDialog:function(e){_.A.show({articleId:e.articleId,markerCommentId:e.publicId})},openProfile:function(e){y.F.goToProfile(e.profileName)}}}return{render:function(o,a,s,u){if(o&&s){var l=s.Replies.length,d=4*(u||0),h=s.Replies.slice(d,4+d);(e={view:n,showHeader:ko.observable(!1),readMore:ko.observable(0),articles:ko.observableArray([]),columnHeight:0,noMoreRoom:!1,moreReplies:ko.observable(0),expandReplies:function(e,t){p.o.current.textView.onReadMoreClicked(t)},addContent:function(e,i,r){if(c(e).is("article")){var o=c(e).closest("div.visitupdate-replies"),a=(0,g.ks)(),s=this.columnHeight-a;if(c(e).is("article.comment")&&c(e).height()>5*a&&c(e).find("div.text").css("overflow","hidden").height(4*a+"px"),this.view==t)if(c(e).is("article.comment")){if(s-o.height()<=a)return void(o=e.parentNode).parentNode.removeChild(o)}else{if(this.noMoreRoom)return void e.parentNode.removeChild(e);if(i&&c(e).before("
    "),s-o.height()<=a)return void(this.noMoreRoom=!0)}else if(this.view==n){if(s-o.height()<=a)return e.parentNode.removeChild(e),void this.moreReplies(this.moreReplies()+1);i&&c(e).before("
    ")}}}}).view=l>1?t:n,void 0===u&&l>4+d&&e.readMore(l-4+d),u||e.showHeader(!0),e.columnHeight=o.height();var f=c.map(s.Replies,(function(e){return e.ArticleId}));return Promise.all([c.nd.ui.replies.provider.getArticles(s.Replies),c.nd.ui.replies.provider.getReplies(f,s.Since,s.To)]).then((function(t){var o=t[0],a=t[1];if(o&&a){for(var s=0;s1?this._renderColumns(e,t):this._renderOneColumn();return Promise.resolve(n)},highlight:a.noop,estimatedColumnsCount:function(){return 1},dataItem:function(){return this._data}};var x=P,T=n(66973),k=n(43125),E=n(99915),M=n(60330),D=n(51002),N=n(2175),L=n(51175),V=(n(96723),function(e,t){this._templateName=e,this._container=t,this._width=this._container.width(),this._bind()});V._animationDuration=150,V._flingThreshold=.5,V.prototype={_templateName:null,_container:null,_currentIdx:0,_count:0,_appendedCount:0,_currentIdxChangedListener:null,_itemClickListener:null,_left:0,_savedLeft:0,_width:0,_isAnimating:!1,_isInGesture:!1,_bind:function(){L.Ay.bind(this._container,{gesturesStart:this._onGesturesStart.bind(this),scroll:this._onScroll.bind(this),fling:this._onFling.bind(this),gesturesEnd:this._onGesturesEnd.bind(this),singleTap:this._onSingleTap.bind(this),singleTapConfirmed:this._onSingleTapConfirmed.bind(this)})},_onPaginationClick:function(e){var t=e.target(),n=t.parentElement,i=c(n.children).index(t),r=0;-1!==i&&(this._currentIdxChangedListener&&this._currentIdxChangedListener(i),i>0&&(i0?this._isFirstItem()?t=Math.atan(this._left/1e3)*this._width:this._left=t=0:this._isLastItem()&&this._currentItemLeft()<0?t=-this._width*(1-Math.atan((this._left+this._width)/1e3)):this._isFirstItem()&&t<-this._width?this._left=t=-1*this._width:t<-2*this._width&&(this._left=t=-2*this._width),this._container.find("#scroller").css("left",t+"px"),!1}},_onFling:function(e){if(this._isInGesture){if(this._isFirstItem()&&this._left>0)this._animate(-this._left,V._animationDuration),this._left=0;else if(this._isLastItem()&&this._currentItemLeft()<0)this._animate(-this._currentItemLeft(),V._animationDuration),this._left-=this._currentItemLeft();else if(!this._left||this._left==-2*this._width||this._isLastItem()&&this._left==-this._width)this._updateState();else if(this._left==-this._width)this._updateState();else{var t=-this._left%this._width,n=e.velocity().vx;Math.abs(n)>=V._flingThreshold?(n<0&&(t-=this._width),this._animate(t,V._animationDuration),this._left+=t):tthis._savedLeft?(this._currentIdxChangedListener&&this._currentIdxChangedListener(this._currentIdx-1),this._currentIdx--,this._updateCounterElm()):this._lefto?(e1&&r.removeFirst(),e-o>=2&&(r.removeFirst(),r._appendedCount>1&&r.removeFirst(),r.prepend(n(e)),r.prepend(n(e-1)))):e0&&r.prepend(n(e-1)),e=2&&(r.removeLast(),r._appendedCount>1&&r.removeLast(),r.append(n(e)),r.append(n(e+1)))),this._currentIdx=e},_onCurrentItemClicked:function(e){var t=this._provider.item(e);if(t&&t.itemClick)return t.itemClick()}};var H=n(27189),F=function(){function e(e,t){var n=(0,T.R)(e.IssueDate);this.issue=(0,k.bR)(e.CID,n,e.IssueVersion),this.issueId=e.IssueId,this.page=e.Page||0,this.subtitle=b.Ay.formatDate(n,"someresourcename","ddd, d MMM yyyy"),this.thumbsrc=M.A.getPageImageUrl(this.issue,1,{width:e.PageWidth,height:e.PageHeight},{width:t})}return e.prototype.itemClick=function(){m.A.pageView&&a.isFunction(m.A.pageView.activate)&&m.A.pageView.activate(null,{article:{Issue:{Id:this.issue},Page:this.page}})},e}(),B=function(){function e(e,t){this.issues=e||[],this.width=t}return e.prototype.count=function(){return this.issues.length},e.prototype.item=function(e){if(e<0||e>=this.issues.length)throw new Error("Invalid index");var t=this.issues[e];return new F(t,this.width)},e}(),z=function(e){function t(t){var n=e.call(this,t)||this;return n.element=t.element,n.contentSize=0,n}return(0,o.C6)(t,e),t.prototype.getContentSize=function(){return this.contentSize},t.prototype.getHeight=function(){return this.element.outerHeight(!0)},t.prototype.hide=function(){e.prototype.hide.call(this),this.element.hide()},t.prototype.show=function(){e.prototype.show.call(this),this.element.show()},t}(D.A.Block),O=function(e){function t(t){var n=e.call(this,{id:"titles",priority:2,element:t.find("div.hg-titles"),contentBounds:[40,100],canHide:!0})||this;return n.maxHeight=n.element.outerHeight(!0),n.contentSize=100,n.decreaseStep=10,n}return(0,o.C6)(t,e),t.prototype.decrease=function(){this.contentSize-=this.decreaseStep;var e=Math.floor(this.maxHeight*this.contentSize/100);this.element.height(e)},t}(z),j=function(e){function t(t){var n=this,i=t.find("div.hg-about"),r=c(".hg-about-content",i).children().toArray();return(n=e.call(this,{id:"about",priority:1,element:i,canHide:!0,contentBounds:[0,r.length]})||this).children=r,n.contentSize=r.length,n}return(0,o.C6)(t,e),t.prototype.decrease=function(){this.contentSize--;var e=this.children.pop();e&&c(e).hide()},t}(z),U=function(e){function t(t){return e.call(this,{id:"bilboard",priority:0,element:t.find("div.hg-bilboard"),canHide:!1})||this}return(0,o.C6)(t,e),t}(z),W=function(e,t,n){var i={learnMoreHtml:b.Ay.format("Init.LearnMore",H.A.get("ui.Sidebar.BlogLocation"),H.A.get("ui.Sidebar.AboutLocation")),signUpHtml:b.Ay.format("Init.NewsletterSignUp.Text",H.A.get("ui.Sidebar.SignUpLocation")),openInNewWindow:function(){return this.url&&(window.open(this.url)||document.location.assign(this.url)),!1},appLinks:[{name:"iOS",className:"ios",url:"https://itunes.apple.com/app/pressreader/id313904711"},{name:"Android",className:"android",url:"https://play.google.com/store/apps/details?id=com.newspaperdirect.pressreader.android"},{name:"Windows 8",className:"win8",url:"http://apps.microsoft.com/windows/en-US/app/pressreader/16e63b44-220e-4303-a748-30b75dd4c9b9"},{name:"Blackberry",className:"blackberry",url:"http://appworld.blackberry.com/webstore/content/52138"}],socialLinks:[{name:"Facebook",className:"facebook",url:"https://www.facebook.com/PressReader"},{name:"X",className:"twitter",url:"https://twitter.com/pressreader"},{name:"Youtube",className:"youtube",url:"http://www.youtube.com/user/pressdisplay"},{name:"Wordpress",className:"wordpress",url:"http://blog.pressreader.com/"},{name:"Google",className:"google",url:"https://plus.google.com/+pressreader"}]};E.k.renderTo("v7.Client.InitBlock",i,e);var r=[new U(e),new j(e)],o=e.find("div.hg-titles");o&&n&&n.Data&&n.Data.TopIssues&&(function(e){var t=new V(e.templateName,e.container);new R(e.provider,t,{title:e.title})}({templateName:"v7.Client.TopTitles.Thumbnails",container:o,title:b.Ay.val("TopTitles"),provider:new B(n.Data.TopIssues,t)}),r.push(new O(e)));var a={getHeight:function(){return e.height()}};new D.A.Manager(a,r).build(D.A.LayoutStrategy.GUINNESS)};function Y(e){this._data=e}Y.prototype={_data:null,article:function(){return this._data},sectionElm:function(){return(0,l.uW)().section({id:"section-home",className:"section-home"})},reset:function(e){e&&(this._data=e)},tasks:function(){return[]},height:a.noop,_render:function(){var e=(new d.fd).addLayout(this).type(d.zX.InitBlock).articleColumnsCount(1).columnIdx(0),t=(0,S.Ef)(this._data,S.qF.Rendered);e.onDisposed((function(){t.release()}));var n=A.zt-A.oG,i=this.sectionElm().column().addClass("homegroup1").css({position:"absolute",top:"0px",width:n});return W(i.createChild("div").css("height",A.E3).elm(),n,this._data),e.addCell(new I.G(i.elm(),1,0,A.E3)),new d.Sl(e,e)},render:function(){return Promise.resolve(this._render())},highlight:a.noop,estimatedColumnsCount:function(){return 1},dataItem:function(){return this._data}};var X=Y,q=n(10730),G=(n(19939),n(65678));function K(e){this._data=e,this._columnWidth=A.zt-A.oG}c.nd.ui.monitors=function(){var e;function t(e,t,n,i,r){return{id:e,monitorId:t,searchTerm:n,articlesCount:r,articles:i,articlesKo:ko.observableArray(),currentArticleIndex:0,getNextArticle:function(){var e=this.articles.slice(this.currentArticleIndex,this.currentArticleIndex+1);return this.currentArticleIndex=this.currentArticleIndex+1,e},monitorClick:function(e,t){return c.nd.navHistory.goView(G.lP.Monitors,{type:"monitor",monitorId:e.monitorId,articlesCount:e.articlesCount}),!1}}}function n(e,t,n,i){return{issueId:t,articleId:e,title:n,page:i,articleClick:function(n,i,r){return c.nd.navHistory.goView(G.lP.Monitors,{type:"monitor",monitorId:r.monitorId,articlesCount:r.articlesCount,issue:t,articleId:e,token:r.id}),!1}}}return ko.bindingHandlers.fadeInArticle={init:function(t,n,i,r,o){var a=c(t).closest("div.visitupdate-monitors").height();c(t).hide(),c(t).next(".art-div").hide(),a=t?(this.currentIndex=0,this.maxSteps--):this.currentIndex=e,n},showHeader:ko.observable(!1),readMore:ko.observable(0),columnHeight:0,addOneMore:ko.observable(!0),expandMonitors:function(e,t){p.o.current.textView.onReadMoreClicked(t)}}}(s),e.columnHeight=i.height(),void 0===a&&s>4+u&&e.readMore(s-4+u),a||e.showHeader(!0),c.nd.ui.monitors.provider.getMonitors(o).then((function(i){for(var a=0;a1?this._renderColumns(n,e,t):this._renderOneColumn(n);return Promise.resolve(i)},highlight:a.noop,estimatedColumnsCount:function(){return 1},dataItem:function(){return this._data}};var J=K,Q=n(12010),Z=n.n(Q),$=n(79450),ee=n(88813),te=n(90006),ne=n(96587),ie=n(89885),re=n(53236),oe={},ae={followedByUsers:1,followsUsers:2},se={1:"{total} Followers",2:"{total} Following"};function ue(e){return(e.dataType==ae.followedByUsers?$.default.getUserFollowers:$.default.getUsersFollowed)(e.profileId,e.filter(),e.loadedItems,e.pageSize,e.currentOrder())}function ce(e,t,n){n&&e.users([]),a.forEach(t.items,(function(t){var n={_raw:t,avatar:(0,h.tr)({nickname:t.nickname,imageId:t.avatarImageId,size:h.eV.medium,fallbackAvatarUrl:t.photoUrl}),nickname:t.nickname,isFollowed:Q.observable(t.isFollowedByCurrentUser),canFollow:Q.observable(!t.equals(re.default.getProfileId()))};e.users.push(n)}));var i=t.total;e.otherCount(t.otherCount),e.headerTitle(se[e.dataType].replace("{total}",i)),e.loadedItems=e.users().length,e.canLoadMore(t.total-t.otherCount>e.loadedItems)}function le(e,t){return ue(e).then((function(n){ce(e,n,t)}))}oe.dataType=ae,oe.show=function(e,t){var n=ne.default.createInstance(),i={filter:Q.observable(""),currentOrder:Q.observable(ie.Ay.usersSortOrder.recent),orderBy:ie.Ay.usersSortOrder,pageSize:50,profileId:e,dataType:t,users:Q.observableArray([]),total:Q.observable(0),otherCount:Q.observable(0),headerTitle:Q.observable(""),loadedItems:0,canLoadMore:Q.observable(!0),loadingMore:Q.observable(!1),openProfile:function(e){n.hide(),e._raw.goToProfile()},close:function(){n.hide()},followUser:function(e){e._raw.ensureProfileName().then($.default.followUser).then((function(t){t&&t.followedByMe&&e.isFollowed(!0)}))},unFollowUser:function(e){e._raw.ensureProfileName().then($.default.unFollowUser).then((function(t){t&&!t.followedByMe&&e.isFollowed(!1)}))},cancelFilter:function(){i.filter(""),i.loadedItems=0,le(i,!0)},changeOrderBy:function(e){return function(){e!=i.currentOrder()&&(i.currentOrder(e),i.loadedItems=0,le(i,!0))}},_searchTimeout:null,searchKeyUp:function(){i._searchTimeout&&clearTimeout(i._searchTimeout);var e=i._searchTimeout=setTimeout((function(){i.loadedItems=0,ue(i).then((function(t){e==i._searchTimeout&&(ce(i,t,!0),i._searchTimeout=null)}))}),400)},listScrolled:function(){!i.loadingMore()&&i.canLoadMore()&&(i.loadingMore(!0),ue(i).then((function(e){ce(i,e),i.loadingMore(!1)}),(function(){i.loadingMore(!1)})))}};le(i).then((function(){n.show({templateName:"v7.Client.Dialogs.Users",model:i})}));var r={onHide:function(e){return n.onHide(e),r}};return r};var de,he=ne.default.users=oe,fe=n(72167),pe=n(46977),me=n(86699),ge=n(97433);function ve(e){var t="";if(e){var n=(e.title&&e.company?"v7.Client.Profile.TitleAndCompanyTemplate":e.title&&"v7.Client.Profile.TitleTemplate")||e.company&&"v7.Client.Profile.CompanyTemplate"||"";t=b.Ay.format2(n,{name:"title",value:e.title},{name:"company",value:e.company})}return t}function ye(e,t){if(t){e.followingUser(t.followedByMe),e.followedByUsersTotal(t.followedByUsersTotal),e.followsUsersTotal(t.followsUsersTotal);var n=function(e){return a.map(e,(function(e){return{profileName:e.getProfileId(),enAccountNumber:e.enAccountNumber(),nickName:e.nickName,avatar:(0,h.tr)({nickname:e.nickname,imageId:e.avatarImageId,size:h.eV.small,fallbackAvatarUrl:e.photoUrl})}}))};e.followedByUsers(n(t.followedByUsers)),e.followsUsers(n(t.followsUsers))}}function _e(e,t){e.avatar($ndAvatar.render(e.nickName(),t.photoUrl,e.photoWidth,e.photoHeight))}c.nd.ui.profile=de={render:function(e,t){var n=function(e){var t=e.getProfileId(),n=(e.enAccountNumber,{uploadElement:null,profileId:t,isOwnProfile:Q.observable(e.isCurrentUser),nickName:Q.observable(e.nickName),photoUrl:Q.observable(e.photoUrl),avatarImageId:Q.observable(e.avatarImageId),locationText:Q.observable(e.location||""),followingUser:Q.observable(!1),followedByUsersTotal:Q.observable(0),followsUsersTotal:Q.observable(0),followedByUsers:Q.observableArray(),followsUsers:Q.observableArray(),compactView:Q.observable(!1),compactTags:Q.observable(!1),jobTitle:Q.observable(ve(e.publicInfo)),tel:Q.observable(e.publicInfo&&e.publicInfo.tel),website:Q.observable(e.publicInfo&&e.publicInfo.website),httpWebsite:Q.observable(te.A.addUrlScheme(e.publicInfo&&e.publicInfo.website)),email:Q.observable(e.publicInfo&&e.publicInfo.email),facebook:Q.observable(e.publicInfo&&e.publicInfo.facebook),facebookProfileLink:Q.observable(e.publicInfo&&e.publicInfo.facebookProfileLink),twitter:Q.observable(e.publicInfo&&e.publicInfo.twitter),twitterProfileLink:Q.observable(e.publicInfo&&e.publicInfo.twitterProfileLink),google:Q.observable(e.publicInfo&&e.publicInfo.google),googleProfileLink:Q.observable(e.publicInfo&&e.publicInfo.googleProfileLink),openInNewWindow:function(e){return function(){return e&&(window.open(e)||document.location.assign(e)),!1}},renderTagsPanel:Q.observable(e.trendsWhereUserIsLeader.length&&e.isCurrentUser),renderTagsList:Q.observable(e.trendsWhereUserIsLeader.length),renderTagsTitle:Q.observable(e.trendsWhereUserIsLeader.length),renderSeeAllTags:Q.observable(!1),renderControls:Q.observable(e.isCurrentUser),isAccountVerified:Q.observable(!1),showWelcomeMsg:Q.observable(e.isCurrentUser),renderOpinionsTotal:Q.observable(!1),renderOpinions:Q.observable(!1),renderSeeAllOpinions:Q.observable(!1),MIN_TAGS:3,MAX_TAGS:7,MIN_OPINIONS:3,allOpinions:Q.observable(e.opinions),opinions:Q.observableArray(),trends:Q.observableArray(),isEditAvailable:Q.observable(e.isCurrentUser),isMyProfile:Q.observable(e.isCurrentUser),coverUrl:Q.observable(),loading:Q.observable(!1),_followUnfollow:function(e){return n.isOwnProfile()?Promise.reject("Cannot follow/unfollow own channel."):e(n.profileId)},followUser:function(){return n._followUnfollow($.default.followUser)},unFollowUser:function(){return n._followUnfollow($.default.unFollowUser)},files:Q.observable(),upload:function(){var e;n.files()&&(e=n.files()[0])&&(n.loading(!0,n),$.default.uploadProfilePhoto(e).then((function(){n.files(null),$.default.getProfile(t).then((function(e){_e(n,e),me.A.userStateChanged(),n.loading(!1,n)})).catch((function(){n.loading(!1,n)}))})).catch((function(){n.files(null),n.loading(!1,n),(0,pe.A)().show("An error has occurred.")})))},opinionsTotal:Q.observable(e.opinionsTotal),trendsTotal:Q.observable(e.trendsWhereUserIsLeaderTotal),commentsTotal:Q.observable(e.commentsTotal),enableOpinions:false,reloadMainInfo:function(){$.default.getProfileFull(n.profileId,!0).then((function(e){n.opinionsTotal(e.opinionsTotal),n.trendsTotal(e.trendsWhereUserIsLeaderTotal),n.commentsTotal(e.commentsTotal),n.allOpinions(e.opinions),n._fitItems()}))},seeAllWhoUserFollows:function(){n.isMyProfile()&&n.followsUsersTotal()>0&&he.show(t,he.dataType.followsUsers)},seeAllWhoFollowsTheUser:function(){n.isMyProfile()&&n.followedByUsersTotal()>0&&he.show(t,he.dataType.followedByUsers)},settingsClick:function(){m.A.myAccountChannel.activate()}});return _e(n,e),ye(n,e.followers),n}(t);ee.A.appendTo("v7.Client.Profile",n,e);var i=fe.default.onAfterAccountChanged.subscribe((function(){n.reloadMainInfo()})),r=$.default.followersUpdates.subscribe((function(e){n.profileId===e.profileId&&ye(n,e.followers)}));return n.dispose=function(){i.unsubscribe(),r.unsubscribe()},n._fitItems=function(){var e=c(".pg-user");!function(){var t=e.parent(),i=t.find(".pgu-coverphoto"),r=t.find(".pgu-tags"),o=t.find(".welcomemsg");n.opinions.removeAll(),n.trends.removeAll();var a=function(){return n.compactView()?0:i.outerHeight(!0)},s={getHeight:function(){return t.height()}},u=[new D.A.Block({id:"cover image",priority:3,getHeight:a,canHide:!0,hide:function(e){n.compactView()||(n.compactView(!0),e.stop())}}),new D.A.Block({id:"user info",priority:0,getHeight:function(){return e.outerHeight(!0)-r.outerHeight(!0)-a()},canHide:!1})];n.showWelcomeMsg()&&u.push(new D.A.Block({id:"info message",priority:100,getHeight:function(){return n.showWelcomeMsg()?o.outerHeight(!0):0},canHide:!1,getContentSize:function(){return n.showWelcomeMsg()?1:0},contentBounds:[0,1],increase:function(){n.showWelcomeMsg(!0),this.show()},decrease:function(){n.showWelcomeMsg(!1),this.hide()}})),new D.A.Manager(s,u).build()}(),ge.b.touch&&function(e,t){var n=e.find("input:file"),i="channel-upload-element",r=c("#"+i);r.length&&r.attr("content-id")!=t.profileId&&(Q.cleanNode(r[0]),r.remove(),r=null),n.length&&(r&&r.length||((r=n.clone()).attr("id",i).attr("content-id",t.profileId).hide(),c("body").append(r),Q.applyBindings(t,r[0])),Q.cleanNode(n[0]),ge.b.touch?c.nd.gestures.bind(n,{singleTap:function(){return r.trigger("click"),!1}}):n.on("click",(function(){return r.trigger("click"),!1})))}(e,n)},n._fitItems(),n}};var be=de,we=n(70989),Ce=n(84901),Ae=function(){function e(e){var t=this;this.profileId=e.profileId,this.isCompactView=te.A.isCompactScreen(),this.allCollections=(0,a.sortBy)(e.collections,"type"),this.collections=Q.observableArray(),this.collectionsTotal=Q.pureComputed((function(){return t.isCompactView?t.collections().length:0})),this.followingUser=Q.observable(!1),this.followedByUsersTotal=Q.observable(0),this.followsUsersTotal=Q.observable(0),this.followedByUsers=Q.observableArray(),this.followsUsers=Q.observableArray(),this.visibleFollowedByUsers=Q.observableArray(),this.visibleFollowsUsers=Q.observableArray(),this.renderFollowingList=Q.pureComputed((function(){return!!t.followsUsers().length})),this.renderFollowersList=Q.pureComputed((function(){return!!t.followedByUsers().length})),this.setFollowersInfo(e.followers)}return e.prototype.setFollowersInfo=function(){},e.prototype.seeAllCollections=function(){var e=we.A.findView(G.lP.Bookmarks);Ce.A.goView(G.lP.Bookmarks,e.createParams({profileId:this.profileId}))},e.prototype.labelClick=function(e){m.A.bookmarksView.activate(null,{profileId:this.profileId,collection:e.slug,collectionId:e.id})},e.prototype.openProfile=function(e,t){return y.F.ensureProfileName(e.profileName,e.enAccountNumber).then((function(e){return Ce.A.goView(G.lP.Profile,{type:"profile",profileId:e})})),t.preventDefault(),!1},e.prototype.seeAllWhoUserFollows=function(){he.show(this.profileId,he.dataType.followsUsers)},e.prototype.seeAllWhoFollowsTheUser=function(){he.show(this.profileId,he.dataType.followedByUsers)},e}(),Ie=D.A.Manager,Se=D.A.Block,Pe=D.A.LayoutStrategy,xe=$.default.followersUpdates,Te=function(){function e(e){var t=this;this._model=new Ae(e),this._subscription=xe.subscribe((function(e){e.profileId===t._model.profileId&&(t._model.setFollowersInfo(e.followers),t._container&&t.render(t._container))})),this._container=null}return e.prototype._getBlockHeight=function(e){return this._container.find(e).outerHeight(!0)},e.prototype.render=function(e){var t=this;this._ensureInit(e);var n=[];0!==this._model.allCollections.length&&n.push(new Se({id:"collections",priority:0,getHeight:function(){return t._getBlockHeight(".subgroup-collections")},hide:!1,getContentSize:function(){return t._model.collections().length},contentBounds:[3,this._model.allCollections.length],increase:function(){var e=t._model.allCollections[t._model.collections().length];e&&t._model.collections.push(e)},decrease:function(){return t._model.collections.pop()}})),this._model.renderFollowingList()&&n.push(new Se({id:"following",priority:1,getHeight:function(){return t._getBlockHeight(".subgroup-users.following")},canHide:!1,getContentSize:function(){return t._model.visibleFollowsUsers().length},contentBounds:[3,this._model.followsUsers().length],increase:function(){var e=t._model.followsUsers()[t._model.visibleFollowsUsers().length];e&&t._model.visibleFollowsUsers.push(e)},decrease:function(){return t._model.visibleFollowsUsers.pop()}})),this._model.renderFollowersList()&&n.push(new Se({id:"followers",priority:1,getHeight:function(){return t._getBlockHeight(".subgroup-users.followers")},canHide:!1,getContentSize:function(){return t._model.visibleFollowedByUsers().length},contentBounds:[3,this._model.followedByUsers().length],increase:function(){var e=t._model.followedByUsers()[t._model.visibleFollowedByUsers().length];e&&t._model.visibleFollowedByUsers.push(e)},decrease:function(){return t._model.visibleFollowedByUsers.pop()}})),new Ie({getHeight:function(){return t._container.height()}},n).build(Pe.HOEGAARDEN)},e.prototype._ensureInit=function(e){if(this._container&&this._container!==e)throw new Error("Cannot render into another container");this._container||(this._container=e,E.k.appendTo("v7.Client.Profile.Columns.Collections",this._model,this._container))},e.prototype.dispose=function(){this._container&&Q.cleanNode(this._container),this._subscription.unsubscribe()},e}(),ke=n(79371),Ee=n(67660),Me="profilegroup2";function De(e){this._data=e}De.prototype={_data:null,article:function(){return this._data},sectionElm:function(e){return(0,l.uW)().section({id:0,title:e})},reset:function(e){e&&(this._data=e)},tasks:function(){return[]},height:a.noop,_createEmptyColumn:function(e){var t=(new d.fd).addLayout(this).type(d.zX.Profile).articleColumnsCount(1).columnIdx(e),n=(0,S.Ef)(this._data,S.qF.Rendered);return t.onDisposed((function(){return n.release()})),t},_addMainColumn:function(e,t,n){var i=2*A.zt-A.oG,r=this._section.column().addClass(Me).css({position:"absolute",top:"0px",width:i});e.addCell(new I.G(r.elm(),2,0,A.E3));var o=r.createChild("div").css("height",A.E3).addClass("group-panel pg-cover").elm(),a=be.render(o,t,n);return this._section.hasHeaders&&this._section.innerHeader().css({visibility:"visible",left:A.Dh}),e.onDisposing((function(){a.dispose()})),e},_addCollectionsColumn:function(e,t){var n=A.zt-A.oG,i=this._section.column().addClass(Me).css({position:"absolute",top:"0px",width:n});e.addCell(new I.G(i.elm(),1,0,A.E3));var r=i.createChild("div").css("height",A.E3).addClass("group-panel pg-dashboard").elm();return(0,Ee.jT)(t.profileId).then((function(n){t.collections=(0,a.filter)(n,(function(e){return e.type!==ke.X.System}));var i=new Te(t);i.render(r),e.onDisposing((function(){i.dispose()}))})),e},_render:function(e){var t=this,n=[$.default.getProfileFull(e),b.Ay.loaded()];return me.A.isLogin()&&n.push(re.default.load()),Promise.all(n).then((function(e){var n=(0,o.zs)(e,1)[0],i=new d.Sl;if(n){var r=b.Ay.format("Dialogs.Comments.Comments",n.commentsTotal);t._section=t.sectionElm(r);var a=0,s=t._createEmptyColumn(a++);i.append(t._addMainColumn(s,n,re.default.getProfileId())),i.append(t._createEmptyColumn(a++)),n.collections&&n.collections.length&&te.A.isCompactScreen()&&(s=t._createEmptyColumn(a++),i.append(t._addCollectionsColumn(s,n,re.default.getProfileId())))}return i.disposed().then((function(){t._section.remove(),t._section=null})),i}),(function(){return(0,pe.A)().show(b.Ay.val("Errors.ErrorOccurred")),Promise.reject()}))},render:function(){return this._render(this._data.Data)},highlight:a.noop,estimatedColumnsCount:function(){return 1},dataItem:function(){return this._data}};var Ne=De,Le=n(88025),Ve=n(62625),Re=n(58799),He=n(92336);function Fe(e,t){return t.Width*t.Height-e.Width*e.Height}function Be(e,t){var n=e.Rank||-1;return(t.Rank||-1)-n}var ze=function(e,t){if(this.visible=Q.observable(!1),this.itemId=t,e.comment){this.commentVisible=Q.observable(!0),this.hyphComment=Re.A.hyphenate(e.comment),this.clamp=Q.observable(3),this.attachVisible=Q.observable(!1);var n=e.postsInArticle>0?" and ".concat(e.postsInArticle," others"):"";this.headerText="".concat(n," commented on ")}else this.headerText=" supported opinion:";c.extend(this,e)},Oe=function(e){var t=[];if(e.Images&&e.Images.length>0){for(var n=(0,A.y6)(),i=A.UO,r=e.Images.length,o=0;oi)){var u=Math.round(a.Height*s/100);u>n||t.push({image:a,width:n,height:u,scale:s})}}t.sort(Fe)}this.articleId=e.ArticleId,this.title=e.HyphenatedTitle||e.Title,this.subtitle=e.Subtitle,this.issueTitle=e.Issue&&e.Issue.Title,this.images=t,this.img=Q.observable()},je=function(){function e(e){var t,n=this;if(this.isPersonalizationDisabled=Q.observable(null===(t=He.A.getSponsor())||void 0===t?void 0:t.isEmbeddedModeEnabled),He.A.onSponsorshipStateChanged((function(){var e;n.isPersonalizationDisabled(null===(e=He.A.getSponsor())||void 0===e?void 0:e.isEmbeddedModeEnabled)})),!this.isPersonalizationDisabled()){var i=e&&e.recentlyJoined||[],r=e&&e.comments||[],o=0,s=(0,a.chain)(r.concat(i)).orderBy(["eventTime"],[!1]).slice(0,6).map((function(e){return new ze(e,o++)})).value();this.section=e.section,this.articlesKo=Q.observableArray([]),this.socialItemsKo=Q.observableArray(s),this.articlesVisible=Q.pureComputed((function(){return n.articlesKo().length}))}}return e.prototype.renderAttachments=function(e,t){t.hasAttachments&&new Ve.A(t.attachments,{renderVideoPlayer:!1,showGalleryOnClick:!1,itemsInLayout:1}).render(c(e))},e.prototype.articleClick=function(e){p.o.current&&p.o.current.textViewController&&p.o.current.textViewController.jump(e.articleId)},e.prototype.commentClick=function(e){_.A.show({articleId:e.articleId,markerCommentId:e.publicId})},e.prototype.profileClick=function(e){e.userProfile.goToProfile()},e.prototype.dispose=function(){},e}(),Ue=function(e){function t(t,n,i){var r=this,o={id:"item-".concat(t.itemId),priority:i,getHeight:function(){return c("li[item-id=".concat(t.itemId,"]"),n).outerHeight(!0)||0},canHide:!0,contentBounds:[0,10],getContentSize:function(){return r.contentSize},hide:function(){t.visible(!1)}};return t.comment?(o.increase=function(){++r.contentSize,t.visible()?!t.hasAttachments||t.attachVisible()?t.commentVisible()?t.clamp()<10&&(t.clamp(t.clamp()+1),10===t.clamp()&&(r.contentSize=10)):t.commentVisible(!0):t.attachVisible(!0):t.visible(!0)},o.decrease=function(){--r.contentSize,t.clamp()>3?t.clamp(t.clamp()-1):t.attachVisible()?t.attachVisible(!1):t.visible()&&(t.visible(!1),r.contentSize=0)}):(o.increase=function(){t.visible()||(t.visible(!0),r.contentSize=10)},o.decrease=function(){t.visible()&&(t.visible(!1),r.contentSize=0)}),(r=e.call(this,o)||this).contentSize=0,r}return(0,o.C6)(t,e),t}(D.A.Block),We=function(e){function t(t,n,i){var r=t&&t.length,o=n.find("section.subgroup-featarticles"),a={id:"articles",priority:1e3,contentBounds:[0,r],getHeight:function(){return o.outerHeight(!0)},canHide:!0,getContentSize:function(){return i.articlesKo().length},increase:function(){var e=i.articlesKo()&&i.articlesKo()[i.articlesKo().length-1];if(e&&e.images.length&&!e.img())e.img(e.images[0]);else{var n=t[i.articlesKo().length];n&&i.articlesKo.push(new Oe(n))}},decrease:function(){var e=i.articlesKo()&&i.articlesKo()[i.articlesKo().length-1];e&&e.img()?e.img(null):i.articlesKo.pop()}};return e.call(this,a)||this}return(0,o.C6)(t,e),t}(D.A.Block),Ye=function(){function e(e,t,n){this.container=e,this.social=t,this.articles=(0,a.filter)(n,(function(e){return((0,a.isFunction)(e.isLoaded)?e.isLoaded():e.isLoaded)&&e.canRender()})).sort(Be),this.model=new je(t),this.render(),this.buildBlocks()}return e.prototype.buildBlocks=function(){for(var e=this,t={getHeight:function(){return e.container.height()}},n=this.container.find(".subsection-hd"),i=0,r=[new D.A.Block({id:"sectionHeader",priority:i,getHeight:function(){return n.outerHeight(!0)},canHide:!1})],o=this.container.find("section.subgroup-update"),a=this.model.socialItemsKo(),s=a.length,u=0;u1?"stackTemplate":"pubTemplate",l.spreads=c?f:[f[0]],l.expand=function(){for(var e=[],t=0;t-1?this.widthFactor[t[n]]:this.widthFactor.default},t.prototype.GetTextViewColumnType=function(){return d.zX.Content}}(rt.n),n(91934)),st=u.A.renderer,ut=((nt={})[at.Lg.ArticlePreview]=s.A.renderer,nt[at.Lg.RegularArticle]=s.A.renderer,nt[at.Lg.SocialArticle]=s.A.renderer,nt[at.Lg.RegularPage]=function(e,t){return void 0===t&&(t=!1),st(e,t)},nt[at.Lg.Replies]=function(e){return new x(e)},nt[at.Lg.InitBlock]=function(e){return new X(e)},nt[at.Lg.Monitors]=function(e){return new J(e)},nt[at.Lg.Profile]=function(e){return new Ne(e)},nt[at.Lg.Social]=function(e){return new qe(e)},nt[at.Lg.BookmarkPages]=function(e){return it(e)},n(7443)),ct=n(96543);function lt(e,t){for(var n=[],i=Math.pow(e.length,t),r=i;r<2*i;r++){var o=r.toString(e.length).slice(-t).split("").map((function(t){return e[t]})).reverse();n.push(o)}return n}function dt(e,t,n,i,r){var o=i*n,a=t/100*r*(e/100*r);return 100-Math.round(100*o/a)}function ht(e,t,n,i){if(!(e.length\n \n "),o=c(r);o.appendTo(e.elm()),L.Yd.bind(o,{singleTapConfirmed:function(){t.aid=n.data.id,ct.A.trigger("click",this)},pinch:function(){t.aid=n.data.id,ct.A.trigger("pinch",this)}})}function mt(e,t,n,i){var r,a,s=e.createChild("div").addClass("hdlc-row").css("height","".concat(i,"%"));try{for(var u=(0,o.Ju)(n),c=u.next();!c.done;c=u.next())pt(s,t,c.value)}catch(e){r={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(r)throw r.error}}return s}function gt(e,t,n,i){var r="section_header_".concat(t.id);if(e.checkBuiltItemsList(r))return null;var a=(0,A.y6)(3),s=Math.round(p.o.current.textView.columns().height),u=function(e){for(var t,n,i,r=[],a=e[0],s=0;s<6&&(a=a.prev())&&a.Type!==ut.p.article;++s)if(a&&a.Type===ut.p.divider&&a.Data&&a.Data.Image){i=a.Data.Image.ArticleId;break}try{for(var u=(0,o.Ju)(e),c=u.next();!c.done;c=u.next()){var l=c.value;if(l.ArticleId!==i){if(l.Images&&l.Images.length>0){var d=l.Images.reduce((function(e,t){var n=t.Width*t.Height;return n<=e.area?e:{area:n,image:t}}),{area:0,image:null}).image;r.push({id:l.Id,title:l.Title,hyphenatedTitle:l.HyphenatedTitle,image:d,issue:l.Issue,formFactor:d.Width/d.Height})}if(r.length>8)break}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return r}(i);if(u.length<6)return St(e,t,n,i);var c=function(e,t,n,i){for(var r,a,s=null,u=[],c=2;c<=3;c++)u.push(c);for(c=2;c<=4;c++)try{for(var l=(r=void 0,(0,o.Ju)(lt(u,c))),d=l.next();!d.done;d=l.next()){var h=d.value,f=h.reduce((function(e,t){return e+t}));if(!(f<6||e.length1&&mt(f,h,c.shift(),m),function(e,t,n,i,r){var o=e.createChild("div").addClass("hdlc-row").css("height","".concat(r,"%"));o.append('

    ').append("".concat(b.Dv.val("Important.Title"),"")).append(t?''.concat(t,""):"").append("

    ").checkpoint(o.checkpoint()),o.addOnRenderedListener((function(e){!function(e,t,n,i,r,o){for(var a=e.parent(),s=a.innerHeight(),u=a.innerWidth(),c=parseInt(t.css("font-size"),10),l=parseInt(e.css("font-size"),10);(no||l>o)&&!(c<=r&&l<=r);)c<=r||(c--,i-4000&&mt(f,h,c.shift(),m),h.addCell(new I.G(f,1,0,p.o.current.textView.columns().height)),h.onDisposed((function(){return e.removeFromBuiltItemsList(r)})),h.addDivider(),e.addItemToBuiltItemsList(t,r),new d.Sl(h,h)}var vt=n(17065),yt=n(49656),_t=n(39407),bt=n(2215),wt=n(47027);var Ct=n(87837),At=1.5;function It(e,t,n){var i=(void 0===n?{}:n).showNewspaperName,r=void 0!==i&&i;e.append("
    ").append("
    ").append("

    ".concat(t.HyphenatedTitle||t.Title,"

    ")),t.Subtitle&&e.append("

    ".concat(t.Subtitle,"

    ")),e.append("
    "),r&&t.Issue&&(e.append('")),e.append("
    ")}function St(e,t,n,i){var r,a,s,u,c="section_header_".concat(t.id);if(e.checkBuiltItemsList(c))return null;var h,f=(new d.fd).section(t).type(d.zX.SectionHeader).noDividers(!0).width(Math.round(A.zt*At)),m=Math.round((0,A.y6)(At)),v=(0,l.uW)().section(t).column().addClass("col").css({position:"absolute",width:"".concat(m,"px"),top:"0px",bottom:"0px"}),y=v.createChild("div").addClass("teaser".concat(t.slug?" section-".concat(t.slug):"")).css({top:"auto",bottom:"auto"});if(e.checkCache(c)){var _=e.cache(c);h=_.items,y.append(_.html).checkpoint(_.height).elm()}else{h=[];var b=i[0];i.sort((function(e,t){var n=e===b?-1:e.Rank;return(t===b?-1:t.Rank)-n})),y.append(function(e){if(!e)return"";var t=e.title,n=e.subtitle,i=e.iconClassName?'
    \n \n
    '):"",r=n?'
    '.concat(n,"
    "):"";return'\n
    \n
    \n '.concat(i,'\n

    ').concat(t,"

    \n ").concat(r,"\n ").concat("","\n
    \n
    ")}(t)).checkpoint(y.checkpoint());var w=0;try{for(var C=(0,o.Ju)(i),P=C.next();!P.done;P=C.next()){var x=P.value;if(x.isLoaded&&(x.HyphenatedTitle||x.Title)){var T=y.height();w>0&&y.append(Ct.r.html),y.append('
    ')),It(y,x,n),y.append("
    ");var k=y.checkpoint(),E=p.o.current.textView.columns().height-T-k;if(E<=0)y.rollback();else{if(x.Images&&b!==x){var M=[];try{for(var D=(s=void 0,(0,o.Ju)(x.Images)),N=D.next();!N.done;N=D.next()){var L=N.value,V=Math.round(100*m/L.Width);if(!(V>A.UO)){var R=Math.round(L.Height*V/100);R>m||R>=E||M.push({image:L,width:m,height:R,scale:V})}}}catch(e){s={error:e}}finally{try{N&&!N.done&&(u=D.return)&&u.call(D)}finally{if(s)throw s.error}}M.length&&(M.sort((function(e,t){return t.width*t.height-e.width*e.height})),L=M[0],y.rollback(),w>0&&y.append(Ct.r.html),y.append('"),k=y.checkpoint())}if(++w,h.push(x),y.checkpoint(k),p.o.current.textView.columns().height-y.height()<=A.K_+(0,g._h)())break}}}}catch(e){r={error:e}}finally{try{P&&!P.done&&(a=C.return)&&a.call(C)}finally{if(r)throw r.error}}e.cache(c,{html:y.html(),height:y.height(),items:h})}y.css({top:"-24px",bottom:"-24px"}),f.addCell(new I.G(v,1,0,p.o.current.textView.columns().height));var H=h.map((function(e){return(0,S.Ef)(e,S.qF.RenderedInSectonHeader)}));return f.onDisposed((function(){e.removeFromBuiltItemsList(c),H.forEach((function(e){return e.release()}))})),e.addItemToBuiltItemsList(t,c),new d.Sl(f,f)}var Pt=function(){function e(){this.hasHeadColumn=!1,this.hasTailColumn=!1}return e.prototype.headColumnKey=function(e){return"g".concat(e.id)},e.prototype.buildHeadColumn=function(e,t,n,i){return null},e.prototype.tailColumnKey=function(e){return"gtail_".concat(e.id)},e.prototype.buildTailColumn=function(e,t){return null},e.prototype.build=function(){},e}(),xt=function(e){function t(){var t=e.call(this)||this;return t.hasHeadColumn=!0,t}return(0,o.C6)(t,e),t.prototype.buildHeadColumn=function(e,t,n,i){return void 0===i&&(i=t.articles()),St(e,t,n,i)},t}(Pt),Tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,o.C6)(t,e),t.prototype.buildHeadColumn=function(t,n,i,r){void 0===i&&(i={});var o=(0,a.assign)({},i);return o.showNewspaperName=!0,e.prototype.buildHeadColumn.call(this,t,n,o,r)},t}(xt),kt=function(e){function t(){var t=e.call(this)||this;return t.hasTailColumn=!0,t}return(0,o.C6)(t,e),t.prototype.buildTailColumn=function(e,t){return function(e,t){var n="section_footer_".concat(t.id);if(e.checkBuiltItemsList(n))return null;var i=(new d.fd).section(t).type(d.zX.CategoryTail).addDivider(),r=(0,l.uW)().section(t).column().addClass("col").css({position:"absolute",width:"".concat((0,A.y6)(),"px"),top:"0px",bottom:"0px"}),a=r.createChild("div").addClass("morearticles");if(e.checkCache(n)){var s=e.cache(n);a.append(s.html).checkpoint(s.height).elm()}else a.append('"),a.checkpoint(a.checkpoint()),e.cache(n,{html:a.html(),height:a.height()});a.css({top:"-24px",bottom:"-24px"}),i.addCell(new I.G(r,1,0,p.o.current.textView.columns().height)),i.onDisposed((function(){return e.removeFromBuiltItemsList(n)})),e.addItemToBuiltItemsList(t,n);var u=(0,l.uW)().parent();return u.data("readMoreCategoryElmRegistered")||(u.tap('a[nd-ui-type="category-link"]',(function(e){var t=c(e.target).closest('a[nd-ui-type="category-link"]').attr("group-id");if(t){var n,i,r=yt.J(t);if(r)if(r.slug)!function(e,t){if(!e)return!1;var n=(0,_t.J)(t),i=n.isValid?{category:e,country:n.countryCode.toLowerCase(),lang:n.languageCode.toLowerCase()}:{category:e};Ce.Q.goView(G.lP.Categories,i)}(r.slug,r.locale);else if(r.type===at.nn.FollowedChannel&&r.dto){var a={profileId:r.dto.id};Ce.Q.goView(G.lP.Profile,a)}else{var s=r,u=s.raw(),l=u.GroupId||u.id;switch("GroupType"in u?u.GroupType:u.type){case at.nn.Headlines:s.renderingType===at.dp.SocialCategory&&function(e){var t=(0,_t.J)(e);if(t.isValid){var n={category:"topnews",country:t.countryCode.toLowerCase(),lang:t.languageCode.toLowerCase()};Ce.Q.goView(G.lP.Categories,n)}}(l);break;case at.nn.Category:n=l,(i=H.A.get("ui.FeedSettings.Categories")[n])&&Ce.Q.goView(G.lP.Categories,{category:i.path});break;case at.nn.UserSection:!function(e){var t=(0,o.zs)(e.split("-"),3),n=t[1],i=t[2];(0,wt.jW)(n).then((function(e){var t={issue:e.latestIssue.key},r=bt.A.currentLanguage();r&&(t.lng=r),(0,vt.SA)(t).then((function(e){var r=e.Pages.find((function(e){return e.SectionName===i}));r?w.A.showIssuePage(r.PageNumber,t.issue):w.A.showNewspaper(n)}))}))}(l)}}}})),u.data("readMoreCategoryElmRegistered",!0)),new d.Sl(i,i)}(e,t)},t}(Tt),Et=function(e){function t(){var t=e.call(this)||this;return t.hasHeadColumn=!1,t}return(0,o.C6)(t,e),t.prototype.buildHeadColumn=function(){return null},t}(kt),Mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,o.C6)(t,e),t.prototype.buildHeadColumn=function(e,t,n,i){return gt(e,t,n,i)},t}(Tt),Dt={basic:new Pt,regular:new xt,regularHeadlines:new Tt,category:new kt,socialCategory:new Et,imagesHeadlines:new Mt},Nt=n(16213),Lt=null,Vt=[],Rt=!1;function Ht(e,t){if(!t)return e;var n=function(e,t){var n=e.concat(t).sort((function(e,t){return e.start-t.start})),i=n[0],r=[i];return(0,a.forEach)(n,(function(e){e.start>i.end?r.push(i=e):e.end>i.end&&(i.end=e.end)})),r}(e.intervals,t.intervals),i={totalDuration:e.totalDuration+t.totalDuration,count:e.count+t.count,intervals:n,duration:(0,a.reduce)(n,(function(e,t){return e+t.end-t.start}),0)};return(0,a.forIn)(e,(function(e,n){(0,a.includes)(["duration","count","totalDuration","intervals"],n)||(i[n]=n in t?Ht(e,t[n]):e)})),(0,a.forIn)(t,(function(t,n){n in e||(i[n]=t)})),i}var Ft,Bt,zt,Ot=function(){function e(e,t){this.name=e,this._children=[],t&&(this._parent=t),this._intervals=[],this._startTime=0,this._duration=0}return e.prototype.start=function(){return this._parent&&this._parent.start(),this._startTime||(this._startTime=(new Date).getTime()),this},e.prototype.duration=function(){return this._startTime?this._duration+(new Date).getTime()-this._startTime:this._duration},e.prototype.stop=function(){if((0,a.forEach)(this._children,(function(e){return e.stop()})),this._startTime){var e=(new Date).getTime();this._duration+=e-this._startTime,this._intervals.push({start:this._startTime,end:e}),this._startTime=0}return this},e.prototype.reset=function(){return(0,a.forEach)(this._children,(function(e){return e.reset()})),this._startTime=this._duration=0,this._intervals=[],this},e.prototype.restart=function(){return this.reset(),this.start(),this},e.prototype.add=function(t){var n=new e(t,this);return this._children.push(n),n},e.prototype.values=function(){var e=this.duration();return(0,a.transform)(this._children,(function(e,t){var n=t.values();t.name in e?e[t.name]=Ht(e[t.name],n):e[t.name]=n}),{totalDuration:e,count:1,duration:e,intervals:this._intervals})},e.prototype.parent=function(){return this._parent},e.prototype.print=function(){Rt&&Nt.A.log(this.values())},e}(),jt={get current(){return Lt},init:function(e){return Vt=[],Lt=new Ot(e)},create:function(e){return new Ot(e)},push:function(e){return Lt&&Vt.push(Lt),Lt=(0,a.isString)(e)?Lt?Lt.add(e):new Ot(e):e},pop:function(){var e=Lt;return Lt=Vt.pop(),e},reset:function(){Lt=null,Vt=[]},enable:function(){Rt=!0}},Ut=n(7599),Wt=n(61105),Yt=n(35429),Xt=function(){function e(){this._isResolved=!1,this._lastPromise=Promise.resolve(),this._promise=null,this._promiseResolve=null}return Object.defineProperty(e.prototype,"promise",{get:function(){var e=this;return this._isResolved?Promise.resolve():(this._promise||(this._promise=new Promise((function(t){e._promiseResolve=t}))),this._promise)},enumerable:!1,configurable:!0}),e.prototype.enqueue=function(e){var t=this;if(this._isResolved)throw new Error("Can't enqueue another promise: PromiseQueuePromise is already resolved.");var n=this._lastPromise.then((function(){return e})),i=this._lastPromise=new Promise((function(e){n.finally(e).catch(a.noop)}));return i.then((function(){i===t._lastPromise&&(t._lastPromise=null,t._isResolved=!0,t._tryResolve())})),n},e.prototype._tryResolve=function(){this._isResolved&&(this._promiseResolve&&this._promiseResolve(),this._promise=null,this._promiseResolve=null)},e}(),qt=u.A.renderer,Gt=Object.freeze({Invalid:0,Reserved:1,ReservedForCombining:2,Built:3,Failed:4}),Kt={generalArticle:function(e){var t=e.normalizedRank();return Math.min(A.tg-1,t*t*t*t*t*(A.tg-1))},topStories:function(e){return(0,a.isFunction)(e.isPreview)&&e.isPreview()||A.tg<=1?1:Math.min(A.tg,e.normalizedRate()*A.tg)},fullTextSearch:function(e){var t=e.normalizedRank();return Math.min(A.tg-1,t*t*t*t*t*(A.tg-1))},minimal:function(){return 0},newspaper:function(e){return Math.min(A.tg,Math.ceil(A.tg*Math.sqrt(e.NormRate)))},previewArticle:function(){return A.tg}},Jt={combinability:(Ft={},Ft[at.Lg.LastVisit]=null,Ft[at.Lg.Breakingnews]=null,Ft[at.Lg.Monitors]=null,Ft[at.Lg.AdBlock]=null,Ft[at.Lg.SocialArticle]=null,Ft),itemPreviewSizeFunction:"generalArticle",disableSectionFooter:!1},Qt=((Bt={})[at.Lg.ArticlePreview]=s.A.renderer,Bt[at.Lg.RegularArticle]=s.A.renderer,Bt[at.Lg.SocialArticle]=s.A.renderer,Bt[at.Lg.RegularPage]=function(e){return new qt(e)},Bt[at.Lg.Replies]=function(e){return new x(e)},Bt[at.Lg.InitBlock]=function(e){return new X(e)},Bt[at.Lg.Monitors]=function(e){return new J(e)},Bt[at.Lg.Profile]=function(e){return new Ne(e)},Bt[at.Lg.Social]=function(e){return new qe(e)},Bt[at.Lg.BookmarkPages]=function(e){return it(e)},Bt);function Zt(e){var t=Qt[e.dataType()];return t?t(e):null}var $t=((zt={})[at.dp.Basic]=Dt.basic,zt[at.dp.Regular]=Dt.regular,zt[at.dp.RegularHeadlines]=Dt.regularHeadlines,zt[at.dp.ImagesHeadlines]=Dt.imagesHeadlines,zt[at.dp.Category]=Dt.category,zt[at.dp.SocialCategory]=Dt.socialCategory,zt),en=new Yt.T;function tn(e){return e?$t[e.renderingType]:null}function nn(e){var t=e.dataType(),n=t===at.Lg.ArticlePreview?at.Lg.RegularArticle:t;return"".concat(n,"_").concat(e.getId())}var rn=function(){function e(e){this._rules=(0,a.assign)({},Jt),e&&(0,a.assign)(this._rules,e),this._itemPreviewSize=this._rules.itemPreviewSize||Kt[this._rules.itemPreviewSizeFunction]||Kt[Jt.itemPreviewSizeFunction],this._itemsState={},this._cache={},this._current=null,this._config=null,this._cancellationToken=null,this._wait=null,this._removeFromBuiltItemsListEventHandler=null}return e.key=function(){for(var e=[],t=0;t1||c?(0,a.isFunction)(s.estimateColumnsCountAsync)?s.estimateColumnsCountAsync(Math.ceil(u),this._cancellationToken.token):Promise.resolve(s.estimatedColumnsCount(Math.ceil(u))):Promise.resolve(0)).then((function(n){var r=Math.min(n,Math.ceil(u));if(i._rules.disableItemsBundling||r>=1||c||i._config.expandedArticle===e)return i._buildSingleItem(e,r);var o=l.add("combineItems").start();return i._combine(e,t).finally((function(){o.stop()})).then((function(t){if(!t||t.length<2)return i._buildSingleItem(e,1);var n=l.add("buildBundle").start(),r=i._buildBundle(t);return n.stop(),r}))}))},e.prototype._combine=function(e,t,n){if(!e||this._cancellationToken.isRequested)return Promise.reject();var i=[],r=0,o=A.zt/4,s=Math.ceil(A.E3/o),u=Ct.r.height,c=(o=A.E3/s)/A.E3,l=e.group();n=n||this._itemPreviewSize;for(var d=this._combine.bind(this,e,t,n),h=0,f=e;h<10;++h){if(h){var p=t<0?f.prev():f.next();if(void 0===p)return(t<0?f.prevDfd():f.nextDfd()).then(d,d);f=p}if(null===f||f.group()!==l)break;if(!f.loaded())return f===e?f.load().then(d):f.load().then(d,d);if(null!==this._rules.combinability[f.dataType()]){var m=nn(f),g=this._itemsState[m];if(g===Gt.ReservedForCombining||g===Gt.Built||m in this._cache){if(!h)return Promise.reject()}else{var v=Zt(f);if(v){var y=n(f);if(y1){if(v.estimatedColumnsCount(Math.ceil(y))>=1)continue;y=1}for(var _=null,b=y*A.E3;bA.E3){if(i.length)continue;return Promise.resolve(null)}if(r+=C+(i.length?u:0),(0,a.assign)(_,{item:f,renderer:v}),t<0?i.unshift(_):i.push(_),this._itemsState[m]=Gt.ReservedForCombining,A.E3-r-u=1?Math.floor(t):1;var i=Zt(e),r=nn(e);this._cache[r]={type:0,item:e,colspan:t},this.addItemToBuiltItemsList(e,r);var o=jt.current.add("render").start();return(!this._config||this._config.expandedArticle!==e||e.isPreview&&e.isPreview()?Promise.resolve(i.render(t,this._cancellationToken.token)):i.render(0,this._cancellationToken.token)).then((function(t){return(0,S.I_)(e,S.qF.Rendered,(function(){return n.removeFromBuiltItemsList(r)})),t}),(function(e){return n.removeFromBuiltItemsList(r),Promise.reject(e)})).finally((function(){o.stop()}))},e.prototype._buildBundle=function(e){for(var t,n=this,i={type:1,bundle:e,start:e[0].item},r=function(r){var a=e[r],s=nn(a.item);s in o._cache||(o._cache[s]=i),t&&t.addDivider(1,1),o.addItemToBuiltItemsList(a.item,s);var u=a.renderer.renderSingleColumnLayout(t,a);u?(t=u,(0,S.I_)(a.item,S.qF.Rendered,(function(){return n.removeFromBuiltItemsList(nn(a.item))}))):Nt.A.log("Render return null")},o=this,a=0;a0){for(var v=function(o){var d,h=void 0===o?{}:o,f=h.current,y=h.columns;if(r._cancellationToken.disposeIfRequested(y))return Promise.reject();var _=0;if(g+=A.tg,y)if(y.isEmpty()){if(f){var b={Id:f.Id,ArticleId:f.ArticleId,Type:f.Type,Title:f.Title};f.Issue&&(b.Issue=f.Issue.Id),Nt.A.log("Unable to build article(empty col): ".concat(JSON.stringify(b,"\t"))),(0,a.isFunction)(r._pushToHistory)&&r._pushToHistory(f,"ignored"),r._itemsState[nn(f)]=Gt.Failed}}else{var w=f.group();_=y.count(),c!==w&&(d=r._buildGroupsHeaders(c,w),c=w)}else r._current&&(r._current=r._current!==u?u:null);return(d||Promise.resolve()).then((function(o){if(o&&(_+=o.count(),s.appendColumns(o)),m+=_,g-=_,s.appendColumns(y),r._current&&g>0&&m0||m0&&m0||m0?" and ".concat(e.postsInArticle," others"):"";this.headerText="".concat(n," commented on ")}else this.headerText=" supported opinion:";l.extend(this,e)},w=function(e){var t=[];if(e.Images&&e.Images.length>0){for(var n=(0,u.y6)(),i=u.UO,r=e.Images.length,o=0;oi)){var c=Math.round(a.Height*s/100);c>n||t.push({image:a,width:n,height:c,scale:s})}}t.sort(y)}this.articleId=e.ArticleId,this.title=e.HyphenatedTitle||e.Title,this.subtitle=e.Subtitle,this.issueTitle=e.Issue&&e.Issue.Title,this.images=t,this.img=d.observable()},C=function(){function e(e){var t=this,n=e&&e.recentlyJoined||[],r=e&&e.comments||[],o=(0,i.filter)(n,(function(e){return!r.some((function(t){return t.opinion&&e.opinion.id===t.opinion.id&&e.authorId===t.authorId}))})),a=0,s=(0,i.chain)(r.concat(o)).orderBy(["eventTime"],[!1]).slice(0,6).map((function(e){return new b(e,a++)})).value();this.section=e.section,this.articlesKo=d.observableArray([]),this.socialItemsKo=d.observableArray(s),this.articlesVisible=d.pureComputed((function(){return t.articlesKo().length}))}return e.prototype.renderAttachments=function(e,t){t.hasAttachments&&new g.A(t.attachments,{renderVideoPlayer:!1,showGalleryOnClick:!1,itemsInLayout:1}).render(l(e))},e.prototype.articleClick=function(e){h.o.current&&h.o.current.textViewController&&h.o.current.textViewController.jump(e.articleId)},e.prototype.commentClick=function(e){m.A.show({articleId:e.articleId,markerCommentId:e.publicId})},e.prototype.profileClick=function(e){e.userProfile.goToProfile()},e}(),A=function(e){function t(t,n,i){var r=this,o={id:"item-".concat(t.itemId),priority:i,getHeight:function(){return l("li[item-id=".concat(t.itemId,"]"),n).outerHeight(!0)||0},canHide:!0,contentBounds:[0,10],getContentSize:function(){return r.contentSize},hide:function(){t.visible(!1)}};return t.comment?(o.increase=function(){++r.contentSize,t.visible()?!t.hasAttachments||t.attachVisible()?t.commentVisible()?t.clamp()<10&&(t.clamp(t.clamp()+1),10===t.clamp()&&(r.contentSize=10)):t.commentVisible(!0):t.attachVisible(!0):t.visible(!0)},o.decrease=function(){--r.contentSize,t.clamp()>3?t.clamp(t.clamp()-1):t.opinion&&t.commentVisible()?t.commentVisible(!1):t.attachVisible()?t.attachVisible(!1):t.visible()&&(t.visible(!1),r.contentSize=0)}):(o.increase=function(){t.visible()||(t.visible(!0),r.contentSize=10)},o.decrease=function(){t.visible()&&(t.visible(!1),r.contentSize=0)}),(r=e.call(this,o)||this).contentSize=0,r}return(0,c.C6)(t,e),t}(p.A.Block),I=function(e){function t(t,n,i){var r=t&&t.length,o=n.find("section.subgroup-featarticles"),a={id:"articles",priority:1e3,contentBounds:[0,r],getHeight:function(){return o.outerHeight(!0)},canHide:!0,getContentSize:function(){return i.articlesKo().length},increase:function(){var e=i.articlesKo()&&i.articlesKo()[i.articlesKo().length-1];if(e&&e.images.length&&!e.img())e.img(e.images[0]);else{var n=t[i.articlesKo().length];n&&i.articlesKo.push(new w(n))}},decrease:function(){var e=i.articlesKo()&&i.articlesKo()[i.articlesKo().length-1];e&&e.img()?e.img(null):i.articlesKo.pop()}};return e.call(this,a)||this}return(0,c.C6)(t,e),t}(p.A.Block),S=function(){function e(e,t,n){this.container=e,this.social=t,this.articles=(0,i.filter)(n,(function(e){return e.isLoaded()&&e.canRender()})).sort(_),this.model=new C(t),this.render(),this.buildBlocks()}return e.prototype.buildBlocks=function(){for(var e=this,t={getHeight:function(){return e.container.height()}},n=this.container.find(".subsection-hd"),i=0,r=[new p.A.Block({id:"sectionHeader",priority:i,getHeight:function(){return n.outerHeight(!0)},canHide:!1})],o=this.container.find("section.subgroup-update"),a=this.model.socialItemsKo(),s=a.length,u=0;u

    ".concat(t.HyphenatedTitle||t.Title,"

    ")),t.Subtitle&&e.append("

    ".concat(t.Subtitle,"

    ")),e.append("
    ")}function Q(e){return new Promise((function(t){x.A.getDataBySection(e).then((function(n){return t(function(e,t){var n=new a.Sl,i=e.article(0).group(),r=function(e,t){return(new a.fd).section(t).type(a.zX.SectionHeader).articleColumnsCount(1).columnIdx(0).noDividers(!0)}(0,i),o=(0,s.uW)().section(i).column().addClass("col").css({position:"absolute",width:"".concat((0,u.y6)(),"px"),top:"0",bottom:"0"}),c=o.createChild("div").addClass("teaser").css({top:"auto",bottom:"auto"});c.css({top:"-24px",bottom:"-24px"}),r.addCell(new D.G(o,1,0,u.E3));var l=new S(c.elm(),t,i.articles()),d=l.articles.map((function(e){return(0,M.Ef)(e,M.qF.RenderedInSectonHeader)}));return r.onDisposed((function(){K(r),l.dispose(),d.forEach((function(e){return e.release()}))})),n.append(r),V["s".concat(e.id)]=1,n}(e,n))})).catch((function(){return e.isReadyPromise().then((function(){return t(function(e){if(e.isEmpty)return a.Sl.empty;var t,n=(new a.fd).section(e.article(0).group()).type(a.zX.SectionHeader).noDividers(!0),r=(0,s.uW)().section(e.article(0).group()).column().addClass("col").css({position:"absolute",width:"".concat((0,u.y6)(),"px"),top:"0",bottom:"0"}),o=r.createChild("div").addClass("teaser").css({top:"auto",bottom:"auto"}),c="s".concat(e.id);if(c in H){var l=H[c];t=l.items,o.append(l.html).checkpoint(l.height).elm()}else{t=[];var d=e.article(0),h=e.articles();h.sort((function(e,t){var n=e===d?-1:e.Rank;return(t===d?-1:t.Rank)-n})),o.append('

    '.concat(e.title,"

    ")).checkpoint(o.checkpoint());var f=0;h.forEach((function(e){var n=o.height();f>0&&o.append(P.r.html),o.append('
    ')),J(o,e),o.append("
    ");var i=o.checkpoint(),r=u.E3-n-i;if(!(r<=0)){if(e.Images&&d!==e){var a=[],s=(0,u.y6)();if(e.Images.forEach((function(e){var t=Math.round(100*s/e.Width);if(!(t>u.UO)){var n=Math.round(e.Height*t/100);n>s||n>=r||a.push({image:e,width:s,height:n,scale:t})}})),a.length){a.sort((function(e,t){return t.Width*t.Height-e.Width*e.Height}));var c=a[0];o.rollback(),f>0&&o.append(P.r.html),o.append('"),i=o.checkpoint()}}return++f,t.push(e),o.checkpoint(i),!(u.E3-o.height()<=u.K_+P.r.height)&&void 0}o.rollback()})),H[c]={html:o.html(),height:o.height(),items:t}}o.css({top:"-24px",bottom:"-24px"}),n.addCell(new D.G(r,1,0,u.E3));var p=(0,i.map)(t,(function(e){return(0,M.Ef)(e,M.qF.RenderedInSectonHeader)}));return n.onDisposed((function(){K(n),p.forEach((function(e){return e.release()}))})),V["s".concat(e.id)]=1,new a.Sl(n,n)}(e))}))}))}))}function Z(e,t){var n,i=0,r=0;if(e.maxHeight>u.E3-u.K_)for(var o=0;o<4;++o){for(var a=o+2,s=Math.pow(a,e.count),c=void 0,l=0;lu.E3)break;f+=v.max,p.push(g),d=Math.floor(d/a)}if(!(c||h>u.E3||f<=r)&&(i=h,n=p,(r=f)>u.E3-u.K_))break}if(r>=u.E3)break}else for(n=[],i=(e.count-1)*P.r.height,o=0;ou.K_)if(r.max-r.min+y<=u.E3)y+=r.max-r.min,o=void 0;else{var a=Math.floor((u.E3-y)/u.K_);y+=a*u.K_,o+=a}return{renderer:e,type:n[i],lines:o}}))}function $(e){var t=null,n={type:2,bundle:e,start:e[0].item};return e.forEach((function(e){var i=e.item.Id;i in H||(H[i]=n),t&&t.addDivider(1,1),Y(e.item);var r=e.renderer.renderSingleColumnLayout(t,e);r?(t=r,(0,M.I_)(e.item,M.qF.Rendered,(function(){return q(e.renderer)}))):T.A.log("Render return null")})),t&&(t.section(e[0].item.group()).state().isBundle=!0),new a.Sl(t,t)}function ee(e){if(!e.type){var t=e.renderer,n=t.article();Y(n);var i=n===z?0:e.colspan;return t.render(i,L.token).then((function(e){return(0,M.I_)(n,M.qF.Rendered,(function(){return q(t)})),e}),(function(e){return q(t),Promise.reject(e)}))}if(1===e.type){var r,o=e.bundle,s=null,u=e.spread;return u||(e.spread=u=Z(o)),s=(new a.fd).articleIdx(o.renderers[0].article().Idx).columnIdx(0).addDivider(),u.forEach((function(e,t){var n=e.renderer,i=n.article();Y(i),r||(r=n.columnElm()),t&&P.r.appendTo(r),n.render(e.type,s,r,e.lines),(0,M.I_)(i,M.qF.Rendered,(function(){return q(n)}))})),s.articlesCount(u.length).bundle(o),s.addCell(new D.G(r,1,0,r.height())),Promise.resolve(new a.Sl(s,s))}return 2===e.type?Promise.resolve($(e.bundle)):null}function te(e,t){if(L.isRequested)return Promise.reject();for(var n=e,o=e.Section,a=[],s=0,c=u.zt/4,l=Math.ceil(u.E3/c),d=P.r.height,h=(c=u.E3/l)/u.E3,f=0;f=1)){for(var g=null,v=h*u.E3;vu.E3){if(a.length)continue;return Promise.resolve(null)}if(s+=_+(a.length?d:0),(0,i.assign)(g,{item:e,renderer:m}),t<0?a.unshift(g):a.push(g),X(e),u.E3-s-d=1){if(!i)break}else{var h=i?c:0,f=d.height(4).min,p=d.height(0).max,m=Math.max(r+h+f,o+h+p);m>u.E3||(r=m,s.push(d),t[e.Id]=1,o+=h+f,a+=h+p,i++)}}return{count:i,minHeight:o,maxHeight:a,renderers:s}}function ie(e){for(var t=0,n=0,i=0,r=P.r.height,o=0;ou.E3)return null;n+=a+c,i+=a+l}return{minHeight:n,maxHeight:i}}function re(e){if(e.length<=1||u.E3-e[e.length-1].maxHeight0;){for(var o=[r.shift()],a=t.length-1;a>=0;--a){var s=t[a].renderers.concat(o),c=t[a].count+o.length;o=[];for(var l=ie(s);!l;)c--,o.push(s.shift()),l=ie(s);if(t[a]={count:c,minHeight:l.minHeight,maxHeight:l.maxHeight,renderers:s},!o)break}if(o)return e;n--}return t}function oe(){if(G(),B){var e=B;return X(e),e.load().then((function(){return new Promise((function(e,t){(0,i.defer)((function(){L.isRequested?t():e()}))}))})).then((function(){return W(e)?Promise.reject():(e===O.startItem&&1&O.flag||e.Section.article(0)!==e||"s".concat(e.Section.id)in V?Promise.resolve():Q(e.Section)).then((function(t){return(e.Id in H?ee(H[e.Id]):function(e){var t=r.A.renderer(e),n=Math.ceil(u.tg*Math.sqrt(e.NormRate));n<1&&(n=1);var o=t.estimatedColumnsCount(n);if(o<1){var a=k.A.renderer(e).estimatedColumnsCount(n);a>=1&&(o=a)}if(o<1){if(e.isPreview())return te(e,1).then((function(n){return void 0===n?Promise.reject():!n||n.length<2?ee(H[e.Id]={type:0,renderer:t,colspan:1}):$(n)}));for(var s,c=e,l=e.Section,d=[],h={},f=0;f<4;++f){for(var p=!1,m=0;m1)s={type:1,bundle:e,spread:null,start:e.renderers[0].article()},e.renderers.forEach((function(e){H[e.article().Id]=s}));else{var t=e.renderers[0].article();H[t.Id]=s={type:0,renderer:r.A.renderer(t),colspan:1}}})):H[c.Id]=s={type:0,renderer:t,colspan:1},ee(s)}var v=Math.min(Math.floor(o),n);return H[e.Id]={type:0,renderer:t,colspan:v},Y(e),t.render(e===z?0:v,L.token).then((function(n){return(0,M.I_)(e,M.qF.Rendered,(function(){return q(t)})),n}),(function(e){return q(t),Promise.reject(e)}))}(e)).then((function(e){return t&&e?t.appendColumns(e):e}),(function(e){throw t&&t.dispose(),e}))}))}))}return Promise.reject()}function ae(e,t){for(var n=P.r.height,i=e.Section,r=0,o=0,a=0,s=0,c=[],l=0;l=1){if(!r)break}else{var h=r?n:0,f=d.height(4).min,p=d.height(0).max,m=Math.max(o+h+f,a+h+p);m>u.E3||(o=m,c.unshift(d),t[e.Id]=1,a+=h+f,s+=h+p,r++)}}return{count:r,minHeight:a,maxHeight:s,renderers:c}}function se(){if(!B)return Promise.reject(new Error("Cannot prepend columns. The starting SmartFlowItem is invalid."));var e=B;if(G(-1),!B){for(var t=e,n=e.prev();n;n=n.prev())t=n;return t&&!("s".concat(t.Section.id)in V)?Q(t.Section):Promise.reject()}var o=B;return X(o),Promise.all([e.load(),o.load()]).then((function(){return new Promise((function(e,t){(0,i.defer)((function(){L.isRequested?t():e()}))}))})).then((function(){return W(o)?Promise.reject():(e.Section===o.Section||"s".concat(e.Section.id)in V?Promise.resolve():Q(e.Section)).then((function(e){var t;return t=o.Id in H?ee(H[o.Id]):function(e){var t=r.A.renderer(e),n=Math.ceil(u.tg*Math.sqrt(e.NormRate));n<1&&(n=1);var i=t.estimatedColumnsCount(n);if(i<1){if(e.isPreview())return te(e,-1).then((function(n){return void 0===n?Promise.reject():!n||n.length<2?ee(H[e.Id]={type:0,renderer:t,colspan:1}):$(n)}));for(var o,a=[],s=e,c=e.Section,l={},d=0;d<4;++d){for(var h=!1,f=0;f1)o={type:1,bundle:e,spread:null,start:e.renderers[0].article()},e.renderers.forEach((function(e){H[e.article().Id]=o}));else{var t=e.renderers[0].article();H[t.Id]=o={type:0,renderer:r.A.renderer(t),colspan:1}}})):H[s.Id]=o={type:0,renderer:t,colspan:1},ee(o)}var m=Math.min(Math.floor(i),n);return H[e.Id]={type:0,renderer:t,colspan:m},Y(e),t.render(e===z?0:m,L.token).then((function(n){return(0,M.I_)(e,M.qF.Rendered,(function(){return q(t)})),n}),(function(e){return q(t),Promise.reject(e)}))}(o),t.then((function(t){return e&&t?e.prependColumns(t):e=t,o.Section.article(0)!==o||"s".concat(o.Section.id)in V?e:Q(o.Section).then((function(t){return e?e.prependColumns(t):t}))}),(function(t){throw e&&e.dispose(),t}))}))}))}function ue(){V={},R={},H={},F={},B=null}var ce={abort:function(){L&&L.request()},tasks:function(e){if(U(e))return null;var t=r.A.renderer(e);return t&&(0,i.isFunction)(t.tasks)?t.tasks():null},build:function(e,t,n){if(!t)return Promise.reject();if(L)throw new Error("Can't process multiple build requests simultaneously.");L=new o.Q,O=Object.assign({startItem:e},n),B=e,z=n?n.expandedArticle:void 0;var i,r=[],s=0,c=0,l=new a.Sl;if(t>0){i=function(n){if(r.shift(),L.disposeIfRequested(n))return r.length?r[0].then(i,i):Promise.reject();if(c+=u.tg,n)if(n.isEmpty())B&&G();else{var o=n.count();l.appendColumns(n),s+=o,c-=o}else B&&(B=B.next());return B&&c>0&&s0&&s=this._viewport.left?(this._innerHeaderIdx||f(i,"hidden"),p(n,this._scrollerLeft+this._padding)):(f(n,"hidden"),p(i,o-this._viewport.left<=r+this._padding+this._padding?o-this._padding-r:this._viewport.left+this._padding)),e)for(var a=t.innerHeaders(),s=this._innerHeaderIdx+1;s=2&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]))throw new Error("Invalid arguments");e={delta:arguments[0],duration:arguments[1],ignoreSectionHeaders:!!arguments[2]}}return this.playAnimation(e)},e.prototype.stop=function(){this._onCancelled.next()},e.prototype.playAnimation=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r,o,a,s;return(0,i.YH)(this,(function(i){switch(i.label){case 0:if(!(t=Math.round(e.delta)))return[2];this._isActive=!0,n=g.busyStateLock.lock(),r=Math.round(e.duration),this._left=this._view.scroller.left,o=[this._play(t,r,e.easing)],e.ignoreSectionHeaders||o.push(this._playSectionHeaders(t,r,e.easing)),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,Promise.all(o)];case 2:return i.sent(),[3,5];case 3:throw i.sent(),a=this._view.scroller.elm.translateLeft(),s=this._left+t-a,new I(a,s);case 4:return n.release(),this._isActive=!1,[7];case 5:return[2]}}))}))},e.prototype._play=function(e,t,n){var i,r=this;void 0===n&&(n="easeOutQuad");var o=this._view.scroller;return new Promise((function(a,s){i=r._onCancelled.subscribe(s),o.elm.animate({translateLeft:o.left+=e},{duration:t,complete:a,easing:n})})).finally((function(){o.elm.stop(!0),i.unsubscribe()}))},e.prototype._playSectionHeaders=function(e,t,n){var i,r=this;void 0===n&&(n="easeOutQuad");var o=this._view.scroller.container;return new Promise((function(a,s){i=r._onCancelled.subscribe(s),o.animate({empty:"100px"},{duration:t,easing:n,complete:a,step:function(t,n){r._view.correctSections(r._left+Math.floor(n.pos*e))}})})).finally((function(){o.stop(!0),i.unsubscribe()}))},e}(),P="left",x="left";function T(e){var t=Math.round(100*(e+1));return t>500?500:t}function k(e,t,n,r){return(0,i.sH)(this,void 0,void 0,(function(){var o,a,s,u;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return o=e.viewport(),a=e.scroller.left+t.left(),s=a+n,a>o.left&&s>o.right?(u=o.right-s,a+u=s&&(e.left=0||y>=0;){var I=v>=0?C[v]:null,S=y>=0?A[y]:null;if(I===S)++y>=A.length&&(y=-1),++v>=C.length&&(v=-1);else if(I&&!S)(F=I.elm())&&f.push(L(F,b+=10,B)),++v>=C.length&&(v=-1);else if(!I&&S)(F=S.elm())&&f.push(V(F,b+=10,B)),++y>=A.length&&(y=-1);else{var P=I.top(),x=I.height(),E=I.uid(),D=S.top(),R=S.height(),H=S.uid();if(P===D&&x===R)E===H?(O(I),j(S)):((F=I.elm())&&f.push(L(F,b+=10,B)),(F=S.elm())&&f.push(V(F,b+=10,B))),++v>=C.length&&(v=-1),++y>=A.length&&(y=-1);else if(P>=D+R)(F=S.elm())&&f.push(V(F,b+=10,B)),++y>=A.length&&(y=-1);else if(D>=P+x)(F=I.elm())&&f.push(L(F,b+=10,B)),++v>=C.length&&(v=-1);else{var F;(F=S.elm())&&f.push(V(F,b+=10,B)),++y>=A.length&&(y=-1),(F=I.elm())&&f.push(L(F,b+=10,B)),++v>=C.length&&(v=-1)}}}else f.push.apply(f,(0,i.fX)([],(0,i.zs)((0,o.chain)(A).map((function(e){return e.elm()})).filter().map((function(e){return N(e,b+=10,B)})).value()),!1))}else C&&(0,o.forEach)(C,O),A&&(0,o.forEach)(A,j)}return this._view.scroller.elm.height(),Promise.all(f).then((function(){g.busy.reset(),e.deleteArticleElm(),s._isActive=!1}))},e}(),Y=n(51175),X=n(67303),q=n(82788),G=n(93134),K=n(43125),J=n(65678),Q=n(70989),Z=((U={})[G.wf.SmartFlowClick]="Click",U[G.wf.SmartFlowDoubleClick]="DoubleClick",U[G.wf.SmartFlowReadMore]="ReadMore",U[G.wf.SmartFlowContextMenuRequested]="ContextMenuRequested",U[G.wf.SmartFlowPinch]="Pinch",U[G.wf.SmartFlowGesturesEnd]="GesturesEnd",U[G.wf.SmartFlowGesturesStart]="GesturesStart",U);q.X.ofType(G.wf.PageChanged).subscribe((function(e){var t=Q.A.getActiveViewName();t!==J.lP.TextView?q.X.send(new G.$4({viewName:t,title:e.payload.title})):q.X.send(new G.XO({viewName:t,cid:X.A.cid(),issueDate:(0,K.M6)(X.A.issue()),title:e.payload.title}))})),q.X.ofType(G.wf.SmartFlowClick,G.wf.SmartFlowDoubleClick,G.wf.SmartFlowReadMore,G.wf.SmartFlowContextMenuRequested,G.wf.SmartFlowPinch,G.wf.SmartFlowGesturesEnd,G.wf.SmartFlowGesturesStart).subscribe((function(e){var t=Q.A.getActiveViewName(),n=Z[e.type];t!==J.lP.TextView?q.X.send(new G.Ok({viewName:t,eventAction:n})):q.X.send(new G.Ij({viewName:t,eventAction:n,cid:X.A.cid(),issueDate:(0,K.M6)(X.A.issue())}))}));var $=n(18253),ee=n(46977),te=n(96543),ne=n(92078),ie=n(16213),re=function(){function e(){this.left=0,this.right=0,this.width=0,this.height=0}return e.prototype.isVisible=function(e,t){return e>=this.left&&ethis.left&&e+t<=this.right},e}(),oe=n(67010),ae=n(31172),se=n(2419),ue=n(28027),ce=n(43150),le=n(47074),de=300;!function(){r.nd.viewer.textView||(r.nd.viewer.textView={});var e={container:null,elm:null,left:0,width:0,oldLeft:void 0,oldWidth:void 0},t={showSections:!1};function n(){return r("#toolbarBottomPreview").is(":visible")}var l={};function f(n,i){this._context=i||s.o.current,this._context.textView=this,this._columns=new d.Sl,this._columns.width=0,this._columns.height=0,this._columns.preview=0,this._viewport=new re,this._context.textViewScroller=this._scroller=this.scroller=Object.assign({},e),this._config=Object.assign({},t),this._scrollAnimation=new S(this),this._bundleToMultiColumnsAnimation=new F(this),this._expandArticleAnimation=new W(this);var a=this;c.A.loaded().then((function(){a._config.showBookmarks=!X.A.isIssueRestrictedBy("Bookmarks"),a._config.showCommentsBubble=c.A.get("ui.Comments.enable",!0)&&c.A.get("ui.Comments.enableLabels",!0),a._config.enableSimilarArticles=c.A.get("ui.Similar.enable",!0)})),this._container=n,this._container.elm().css("overflow","hidden"),this._container.resize(null,this._onResize.bind(this)),this._scroller.container=n.elm().wheel({accumulate:!1,accumulateMaxTime:150,handler:this._onMouseWheel.bind(this)}),this._scroller.elm=this._scroller.container.html('
    ').addClass("scale".concat((0,b.W4)()," textview-container ").concat(_.get("TextView.Fontset",c.A.get("ui.TextView.Fontset","fontset1")))).children("#scroller").optimizeForTransform(),this._scrollZones=new $.R(n.elm(),this,"ui.Views.TextView.enableScrollPanels"),(new window.Image).src=r.nd.makeImageUrl("i-more.png"),Y.Ay.bind(this._scroller.container,{gesturesStart:this._onGesturesStart.bind(this),scroll:this._onScroll.bind(this),singleTap:this._onSingleTap.bind(this),singleTapConfirmed:this._onSingleTapConfirmed.bind(this),doubleTap:this._onDoubleTap.bind(this),fling:this._onFling.bind(this),pinch:this._onPinch.bind(this),contextMenu:this._onLongPress.bind(this),gesturesEnd:this._onGesturesEnd.bind(this),keyUp:this._onKeyUp.bind(this),keyPress:this._onKeyPress.bind(this)}),_.onSettingsChanged("TextView.Fontset").subscribe(this._onFontsetChanged.bind(this)),(0,b.K9)(this._onScaleChanged.bind(this)),function(e){l[ce.u.left]=e.scrollColumnLeft,l[ce.u.right]=e.scrollColumnRight,l[ce.u.down]=e.scrollToNextArticle,l[ce.u.up]=e.scrollToPrevArticle,l[ce.u.space]=e.scrollScreenRightAlign,l[ce.u.pgDown]=e.scrollScreenRightAlign,l[ce.u.pgUp]=e.scrollScreenLeftAlign}(this),this._toggleLoadingColumnsDebounced=(0,o.debounce)(this._toggleLoadingColumns.bind(this),10)}f.preload=function(){c.A.loaded().then((function(){for(var e="",t=w.o5;t<=w.IK;++t){e+='
    ');for(var n=1;n<=5;++n)e+='
    ')+'

    EnglishРусский

    EnglishРусский

    EnglishРусский

    ';e+="
    "}r(document.body).append(e)}))},f.prototype={_context:null,_container:null,_isVisible:!1,_isDisabled:!1,_columns:null,_viewport:null,_scroller:null,_config:null,_scrollZones:null,_scrollDirection:0,_viewedArticles:[],config:function(e){var n=this;return arguments.length?((0,o.forIn)(e,(function(e,i){i in t&&(n._config[i]=e)})),this):Object.assign({},this._config)},show:function(){return this._isVisible=!0,this._forceResize(),this},hide:function(){return this.reset(),this._isVisible=!1,te.A.trigger("hide",this),this},enable:function(){return this._isDisabled=!1,this},disable:function(){return this._isDisabled=!0,this},scrollDirection:function(){return this._scrollDirection},_onFontsetChanged:function(e){this._scroller.container.removeClass(this._fontset).addClass(e),this._fontset=e,this._forceResize(100)},_onScaleChanged:function(e,t){e!==t&&(this._scroller.container.removeClass("scale".concat(e)).addClass("scale".concat(t)),this._forceResize(10))},_onResize:function(){this._resize(100)},_restoreView:function(){ie.A.log("rightColumnsCount: ".concat(this.rightColumnsCount()));var e=this.visibleColumns();if(e&&this._viewport.columnsCount===e.length){var t=e[e.length-1];!t||t._layout||t._layouts||this.scrollColumnLeft()}y.Ay.hide(),(0,ee.A)().show(v.Ay.val("Errors.SiteDown"))},_resizeTimeoutID:0,_lastWidth:0,_lastHeight:0,_forceResize:function(e){this._lastWidth=this._lastHeight=0,this._resize(e)},_resize:function(e){if(this._resizeTimeoutID&&(clearTimeout(this._resizeTimeoutID),this._resizeTimeoutID=0),"number"!=typeof e){if(this._isVisible)if(this.isUpdateable()&&!g.busyState.isSet){var t=this._container.width(),n=this._container.height()-46-24;if(t!==this._lastWidth||n!==this._lastHeight){(0,b.Tc)(),te.A.trigger("beforeScroll",this,{reason:a.cf.alignmentCorrection}),this._lastWidth=t,this._viewport.width=t-this._viewport.left,this._viewport.right=t,this._viewport.height=this._lastHeight=n,this._scroller.elm.height(n);var i=(0,b.qZ)(),r=Math.ceil(t/i.max),s=Math.floor(t/r);s1&&(--r,s=Math.floor(t/r));var c=(i.max-i.min)/3;if(this._viewport.columnsCount=r,this._columns.width=1===r?Math.round(7*t/8):s,this._columns.height=n,this._columns.preview=1===r?1:Math.floor(3*r/4),(0,u.mn)({lineHeight:(0,b.ks)(),columnWidth:this._columns.width,columnHeight:this._columns.height,visibleColumnsCount:this._viewport.columnsCount,articlePreviewColumnsCount:this._columns.preview}),!(0,o.every)((0,u.S3)()))throw new Error("Invalid text view metrics. No layout can be built.");this._scroller.container.removeClass("col-narrow col-medium col-wide"),this._columns.width0&&e.dx()>0?Math.round(e.dx()/2*Math.sin(Math.PI/2*(this._viewport.width-this._scroller.left)/this._viewport.width)):this._viewport.width-this._scroller.left>this._scroller.width&&e.dx()<0?Math.round(e.dx()/2*Math.cos(Math.PI/2*(this._viewport.width-this._scroller.left-this._scroller.width)/this._viewport.width)):e.dx(),te.A.trigger("beforeScroll",this,{delta:t,reason:a.cf.drag}),this._move(t))},_onSingleTap:o.noop,_onSingleTapConfirmed:function(e){if(this._ignoreClick||!this._isInGesture||!this._columns._head)return!1;var t=e.position(),n=this.columnsByX(t.x),i=n.columns,r=n.column,o={x:t.x,y:t.y,columns:i,column:r,event:e,handled:!1};return te.A.trigger("click",this,o),!o.handled&&void 0},_onDoubleTap:function(e){if(!this._ignoreClick&&this._isInGesture&&this._columns._head){var t=e.position(),n=this.columnsByX(t.x),i=n.columns,r=n.column;te.A.trigger("doubleclick",this,{x:t.x,y:t.y,columns:i,column:r,event:e,handled:!1})}},_onFling:function(e){if(!(!this._isInGesture||se.O.isActive||ae.D.isActive||this._scroller.width<=this._viewport.width||this._isContinuousScrollAnimationActive)){var t=e.velocity().vx;if(t>8?t=8:t<-8&&(t=-8),this._scroller.left>this._viewport.left)this._scroll({delta:this._viewport.left-this._scroller.left,duration:de,reason:a.cf.bounce}).catch(o.noop);else if(this._viewport.width-this._scroller.left>this._scroller.width)this._scroll({delta:this._viewport.width-this._scroller.left-this._scroller.width,duration:de,reason:a.cf.bounce}).catch(o.noop);else if(Math.abs(t)>.5){var n=Math.log(.15/Math.abs(t))/Math.log(.998);n=n<=0?0:Math.round(n);var i=t*((1-Math.pow(.998,n+1))/(1-.998));this._scrollDistanceForDirection=i,this._scroll({delta:i,duration:n,align:!0,reason:a.cf.fling}).catch(o.noop)}else{var r=this.columnByX(this._viewport.left);r&&(i=r.nearestAnchorDelta(-this._scroller.left-r.left()+this._viewport.left))&&this._scroll({delta:i,duration:de,reason:a.cf.alignmentCorrection}).catch(o.noop)}}},_onPinch:function(e){if(this._isInGesture&&!this._ignoreClick)if(ae.D.isActive)ae.D.update(e);else if(se.O.isActive)se.O.update(e.scale());else{var t=e.center(),n=this.columnsByX(t.x),i=n.column,r=n.columns;te.A.trigger("pinch",this,{x:t.x,y:t.y,scale:e.scale(),columns:r,column:i})}},_onLongPress:function(e){if(this._isInGesture&&!this.isAnimating()&&!this._ignoreClick){var t=e.position(),n=this.columnsByX(t.x),i=n.column,r=n.columns;te.A.trigger("contextMenu",this,{x:t.x,y:t.y,columns:r,column:i,container:this._scroller.elm}),this._isInGesture=!1}},_getScrollDeltaForScrollColumnLeft:function(){var e=this.columnByX(this._viewport.left);return e?!(e=e.prev())&&this._scroller.left>=this._viewport.left?0:e&&e.width()||this._viewport.left-this._scroller.left:0},_getScrollDeltaForScrollColumnRight:function(){var e=this.columnByX(this._viewport.left);return e?-e.width():0},_stopContinuousScroll:null,_isContinuousScrollAnimationActive:!1,startContinuousScroll:function(e,t){var n=this;if(!this._scrollAnimation.isActive&&!this._isContinuousScrollAnimationActive){this._isContinuousScrollAnimationActive=!0;var i=g.busyStateLock.lock();ae.D.isActive&&ae.D.hide(),this._direction=this._scrollDirection=e;var r=this._viewport.left,o=e<0?r-this._scroller.left:this._viewport.right-this._scroller.width-this._scroller.left;te.A.trigger("beforeScroll",this,{delta:o,reason:t}),e<0&&(o+=this._viewport.left-r);var a=Math.round(Math.abs(o)/this._columns.width*de/2);this._toggleLoadingColumns(this._scroller.left+o),this._isInScroll=!0,Promise.all([this._scrollAnimation.play({delta:o,duration:a,easing:"linear"}).then((function(){return n._onScrollComplete(!1)}),(function(i){return n._onScrollCanceled(i),n._alignToNearestColumnAnchor(-e,t)})),new Promise((function(e){n._stopContinuousScroll=function(){n._scrollAnimation.isActive&&n._scrollAnimation.stop(),e(),n._stopContinuousScroll=null}}))]).then((function(){n._isContinuousScrollAnimationActive=!1,i.release()}))}},stopContinuousScroll:function(){this._stopContinuousScroll&&this._stopContinuousScroll()},scrollScreenLeft:function(e,t){if(!n()&&!this._scrollAnimation.isActive){var i;if(e){i=0;for(var r=this._currentColumn;r;r=r.prev()){var o=r.width();if(i+o>this._viewport.width)break;i+=o}}else if((i=Math.min(this._viewport.width,-this._scroller.left))<=0)return;this.scroll(i,de,!1,t).then(this.positionChanged.bind(this))}},scrollScreenRight:function(e,t){if(!n()&&!this._scrollAnimation.isActive){var i;if(e){i=0;for(var r=this._currentColumn;r;r=r.next()){var o=r.width();if(i+o>this._viewport.width)break;i+=o}}else if((i=Math.min(this._viewport.width,this._scroller.width+this._scroller.left-this._viewport.width))<=0)return;this.scroll(-i,de,!1,t).then(this.positionChanged.bind(this))}},scrollScreenRightAlign:function(e){this.scrollScreenRight(!0,e)},scrollScreenLeftAlign:function(e){this.scrollScreenLeft(!0,e)},scrollColumnLeft:function(e){if(!n()){var t=this._getScrollDeltaForScrollColumnLeft();t&&(this.scroll(t,de,!1,e),this.positionChanged())}},scrollColumnRight:function(e){if(!n()){var t=this._getScrollDeltaForScrollColumnRight();t&&(this.scroll(t,de,!1,e),this.positionChanged())}},scrollToNextArticle:function(){this._scrollToSingleArticle(!1,a.cf.keyPress)},scrollToPrevArticle:function(){this._scrollToSingleArticle(!0,a.cf.keyPress)},_scrollToSingleArticle:function(e,t){if(!this._scrollAnimation.isActive){var n=this.columnByX(this._viewport.left);if(n){var i,r=n.data();if(e){var o=i=0;for(n=n.prev();n&&((a=n.data())!==r&&(++o,r=a),2!==o)&&(i+=n.width(),null!==a);n=n.prev());}else for(i=-n.width(),n=n.next();n;n=n.next()){var a;if((a=n.data())!==r||null===a)break;i-=n.width()}i&&this.scroll(i,de,!1,t)}}},_onKeyPress:function(e){this.keyPressed=String.fromCharCode(e.which)},_onKeyUp:function(e){var t=this._scroller.container.visible();if(!(g.modalState.isSet||!t||this._scroll.width0&&(this._scrollDirection=-1),this._scrollDistanceForDirection=0,g.busyState.reset()},onReadMoreClicked:function(e){if(this.isAnimating())return!1;var t=e.pageX||e.touchX||0,n=e.pageY||e.touchY||0,i=this.columnsByX(t),r=i.columns,o=i.column;te.A.trigger("readmore",this,{x:t,y:n,columns:r,column:o});var a=this.articleByX(t);return q.X.send(new G.Nw({x:t,y:n,columns:r,title:a?a.Title:void 0})),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,!1},onContinuedFromClicked:function(e){if(!this.isAnimating()){var t=e.pageX||e.touchX||0,n=e.pageY||e.touchY||0,i=this.columnsByX(t),r=i.columns,o=i.column;te.A.trigger("continuedfrom",this,{x:t,y:n,columns:r,column:o}),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}},onToolsClicked:function(e){var t=e.pageX||e.touchX||0,n=e.pageY||e.touchY||0,i=this.columnsByX(t),r=i.columns,o=i.column;te.A.trigger("contextMenu",this,{x:t,y:n,columns:r,column:o}),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},_scroll:function(e){var t=this;if(this._scroller.width-this._viewport.left<=this._viewport.width)return Promise.reject();var n=e.delta,i=e.duration,r=e.align,o=e.reason||a.cf.unspecified;if(this._scrollAnimation.isActive)return Promise.reject();n=Math.round(n);var s=this._viewport.left;if(te.A.trigger("beforeScroll",this,{delta:n,reason:o}),n+=this._viewport.left-s,r){var u=this._scroller.left+n,c=this._viewport.width-u,l=void 0;if(u+this._columns.width>=0)l=-this._scroller.left;else if(c+this._columns.width>=this._scroller.width)l=this._viewport.width-this._scroller.width-this._scroller.left;else{var d=this.columnByX(-n);d&&(n+=d.nearestAnchorDelta(-u-d.left(),n)),(l=this._adjustDelta(n))===n&&(l=this._alignDelta(n))}l!==n&&(i=Math.round(l*i/n),n=l),n+=this._viewport.left}return this._toggleLoadingColumns(this._scroller.left+n),this._isInScroll=!0,this._scrollAnimation.play({delta:n,duration:i,easing:e.easing}).then((function(){return t._onScrollComplete(r)}),(function(e){throw t._onScrollCanceled(e),e}))},_adjustDelta:function(e){var t=window.smartFlowBounce||0;return this._scroller.left+e>0?this._columns.width*t-this._scroller.left:e<0&&this._viewport.width-this._scroller.left-e>this._scroller.width?this._viewport.width-this._columns.width*t-this._scroller.left-this._scroller.width:e},_alignDelta:function(e){var t=this._viewport.width/4;if(Math.abs(e)>=t){var n=this.columnByX(-e);if(n&&n.columnIdx()>0){for(var i=0,r=0,o=e,a=n.columnIdx()-1,s=n;a>=0&&s;--a,s=s.prev())i+=s.width();for(a=n.articleColumnsCount()-n.columnIdx()-1,s=n;a>=0&&s;--a,s=s.next())r+=s.width();if(i>r&&r<=t?o-=r:i<=t&&(o+=i),Math.abs(o)>=t)return this._adjustDelta(o)}}return e},_onScrollComplete:function(e){if(!(this._viewport.width>this._scroller.width))if(this._scroller.oldLeft=this._scroller.left=Math.round(this._scroller.left),this._scroller.left>this._viewport.left)this._scroll({delta:this._viewport.left-this._scroller.left,duration:de,reason:a.cf.alignmentCorrection}).catch(o.noop);else if(this._viewport.width-this._scroller.left>this._scroller.width)this._scroll({delta:this._viewport.width-this._scroller.left-this._scroller.width,duration:de,reason:a.cf.alignmentCorrection}).catch(o.noop);else{if(e&&this._scroller.left&&this._viewport.width-this._scroller.left0?-1:1,this._scroll({delta:e,duration:t,align:n,reason:i,easing:r})},scrollTo:function(e,t){var n=-(e.left()+this._scroller.left),i=128+32*Math.round(Math.abs(n)/this._columns.width);return i>512&&(i=512),this.scroll(n,i,!1,t)},moveTo:function(e){var t=this._viewport.left-(e.left()+this._scroller.left);this._move(t)},columnByX:function(e){if(this._columns.isEmpty())return null;for(var t=this._scroller.left,n=this._columns.head();n;n=n.next())if((t+=n.width())>e)return n;return null},columnsByX:function(e){for(var t=this._columns.head(),n=t,i=0,r=t,o=this._scroller.left+t.width();o<=e;){if(!(r=r.next()))return d.Sl.empty;r.columnIdx()?++i:(t=r,i=1),o+=r.width()}switch(r.type()){case d.zX.SectionHeader:case d.zX.Header:case d.zX.ImagesHeadline:t=n=r,i=1;break;default:for(n=r,i=1;;){var a=n.next();if(!a||a.columnIdx()<=0)break;n=a,++i}}var s=new d.Sl(t,n,i);return s.column=r,{columns:s,column:r}},articleByX:function(e){var t=this.columnByX(e);if(t&&t.cells().length>=0){var n=t.cells()[0].smartFlowItemId;return this.articleById(n)}return null},articleById:function(e){return s.o.current.textViewController.dataFeedManager().getArticleById(e)},columnsByArticle:function(e){for(var t=null,n=null,i=this._columns.head();i;i=i.next())if(i.type()!==d.zX.SectionHeader)if(i.hasItem(e))t?n=i:t=n=i;else if(t)break;return new d.Sl(t,n)},_move:function(e){e&&(this._scroller.left+=e,this._direction=e>0?-1:1),this._invalidate()},correctSections:function(e){this._config.showSections?(arguments.length||(e=this._scroller.left),this._visibleHeaders=function(e,t,n,i){var r=0,o=null;h=[];for(var a=i;a;r+=a.width(),a=a.next())o?o.addColumn(a,r,e+r)||(o.setHeaders(),o=m.create(a,r,e+r,t,n)):o=m.create(a,r,e+r,t,n);o&&o.setHeaders();var s=h;return h=null,s}(e,this._viewport,u.Dh,this._columns.head())):this._visibleHeaders=null},visibleTitleHeaders:function(){return this._visibleHeaders||[]},_invalidate:function(e){(e||void 0===this._scroller.oldLeft||this._scroller.oldLeft!==this._scroller.left)&&(this._scroller.elm.translateLeft(this._scroller.left),this._scroller.oldLeft=this._scroller.left,this.correctSections(),this._toggleLoadingColumns()),(e||void 0===this._scroller.oldWidth||this._scroller.oldWidth!==this._scroller.width)&&(this._scroller.elm.width(this._scroller.width),this._scroller.oldWidth=this._scroller.width),te.A.trigger("invalidated",this),te.A.trigger("invalidated",r.nd.viewer.textView)},_render:function(){var e=0;return this._columns.forEach((function(t){t.left(e),e+=t.width()})),e},invalidate:function(e){var t=this._render();this._scroller.left>this._viewport.left&&(0,o.defer)(this.scroll.bind(this),this._scroller.left+this._viewport.left,100),this._invalidate(e),this._scroller.width=t,this._onCurrentColumnChanged()},reset:function(){this._scrollAnimation.isActive&&this._scrollAnimation.stop(),ae.D.isActive&&ae.D.hide(),this._columns.dispose(),this._scroller.left=this._viewport.left,this._scroller.width=0,this._scroller.oldLeft=this._scroller.oldWidth=void 0,this._direction=this._scrollDirection=1,ue.A.setInitialPosition(this)},appendColumns:function(){for(var e,t,n,r=[],o=0;o0){for(var i=this._columns.detach(-n).head();i;i=i.dispose(1));if(this._columns.isEmpty())return this.reset(),this._columns}else{var r=0;for(i=this._columns.detach(-n).head();i;i=i.dispose(1))r+=i.width();if(this._columns.isEmpty())return this.reset(),this._columns;this._scroller.left+=r}return this._scroller.width=this._columns.getWidth(),this._columns}var a=e[0],s=a.tail().next(),u=a.head().left(),c=0;for(this._columns.detach(a),i=a.head();i;i=i.dispose(1))c+=i.width();if(this._columns.isEmpty())return this.reset(),this._columns;for(this._scroller.width-=c,this._scroller.left+u<0&&(this._scroller.left+=c,this._scroller.left>0&&(this._scroller.left=0));s;)s.left(u),u+=s.width(),s=s.next();return this._columns},replaceColumns:function(e,t){this._columns.replace(e,t),this._scroller.width=this._columns.getWidth(),this._toggleLoadingColumnsDebounced()},_currentColumn:null,_globalDirection:0,_accumulatedScroll:0,_articleViewDebounced:(0,o.debounce)((function(){var e=this.visibleArticles();(0,o.forEach)((0,o.difference)(e,this._viewedArticles),(function(e){q.X.send(new G.J$({articleId:(null==e?void 0:e.ArticleId)||(null==e?void 0:e.Id),title:(null==e?void 0:e.Title)||"",articleSource:(null==e?void 0:e.ArticleSource)||""}))})),this._viewedArticles=(0,o.union)(this._viewedArticles,e,(0,o.isEqual)((function(e,t){return e.ArticleId===t.ArticleId})))}),5e3),_onCurrentColumnChanged:function(){var e=this.columnByX(this._viewport.left);if(e!==this._currentColumn){if(e&&this._currentColumn){var t=this._currentColumn.left(),n=e.left();this._accumulatedScroll+=n-t,this._globalDirection=n>t?1:n=this._viewport.width&&(e&&e.section()&&q.X.send(new G.ME({title:e.section().title})),this._accumulatedScroll=0),this._currentColumn=e,te.A.trigger("currentColumnChanged",this,this._currentColumn),this._articleViewDebounced()}},globalDirection:function(){return this._globalDirection},visibleColumns:function(){for(var e=[],t=this._scroller.left,n=this._columns.head();n&&!(t>=this._viewport.right);n=n.next())(t>=this._viewport.left||t+n.colspanWidth()>this._viewport.left)&&e.push(n),t+=n.width();return e},visibleColumnsForArticles:function(){var e=[],t=this._columns.head();if(t){for(var n=Math.ceil(Math.abs(this._scroller.left/this._columns.width)),i=1;i<=n;i++)if(void 0===(t=t.next()))return e;for(i=1;i<=this._viewport.columnsCount&&(e.push(t),void 0!==(t=t.next()));i++);}return e},visibleArticles:function(){var e=[],t=this.visibleColumnsForArticles();return(0,o.forEach)(t,(function(t){t.type()===d.zX.Content&&(0,o.forEach)(t.cells(),(function(t){var n=t.smartFlowItemId;n&&-1===(0,o.indexOf)(e,n)&&e.push(n)}))})),(0,o.map)(e,this.articleById.bind(this)).filter((function(e){return!!e}))},articlesToTip:function(){var e=this.visibleColumns()||[],t=e[e.length-1];if(t){for(;t&&!t.layouts();)t=t.prev();if(t){for(var n=t.data(),i=Array.isArray(n)?n[0]:n,r=0;i&&(0,o.isFunction)(i.tokenized)&&i.tokenized();)i=i.next(),r++;return r}}},leftColumnsCount:function(){if(this._columns.isEmpty()||this._scroller.left>=this._viewport.left)return 0;for(var e=this._scroller.left,t=this._columns.head(),n=1;t&&!((e+=t.width())>=this._viewport.left);)++n,t=t.next();return n},rightColumnsCount:function(){if(this._columns.isEmpty()||this._scroller.left+this._scroller.width<=this._viewport.width)return 0;for(var e=this._scroller.left+this._scroller.width,t=this._columns.tail(),n=1;t&&!((e-=t.width())<=this._viewport.width);)++n,t=t.prev();return n},columns:function(){return this._columns},viewport:function(){return this._viewport},isUpdateable:function(){return!this._isInGesture&&!this.isAnimating()},isAnimating:function(){var e=r.nd.viewer.textView.animations;return this._scrollAnimation.isActive||this._expandArticleAnimation.isActive||e.expandArticleInBundle.isActive()||this._bundleToMultiColumnsAnimation.isActive},container:function(){return this._container},isVisible:function(e,t,n,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0);var r=e+this._scroller.left;if(r>=this._viewport.right)return!1;if(r+n=this._viewport.height)&&o+i>=0},_mouseWheelTimeout:0,_lastDirection:0,_disableScrollOnWheelAnimation:!1,_isWheelActive:!1,_onMouseWheel:function(e){if(!g.busyState.isSet||this._isWheelActive){var t=Math.abs(e.deltaX)>Math.abs(e.deltaY)?-e.deltaX:-e.deltaY;if(1===e.deltaMode&&(t*=(0,b.ks)()),!this._disableScrollOnWheelAnimation&&Math.abs(t)<100&&(this._disableScrollOnWheelAnimation=!0),!(!t||se.O.isActive||ae.D.isActive||this._columns.count()=this._viewport.left&&t>0||this._viewport.width-this._scroller.left>=this._scroller.width&&t<0||(this._isWheelActive||(this._isWheelActive=!0,g.busyState.set()),this._disableScrollOnWheelAnimation?this._applyMouseWheelDelta(t,!1,!1):this._applyMouseWheelDelta(t,!0,!0))}}},_applyMouseWheelDelta:function(e,t,n){if(t){var i=this.columnByX(this._viewport.left-e);e=e>0?i?this._viewport.left-i.left()-this._scroller.left:Math.ceil(e/this._columns.width)*this._columns.width:i?this._viewport.left-i.left()-this._scroller.left-i.width():Math.floor(e/this._columns.width)*this._columns.width}this._mouseWheelTimeout?(clearTimeout(this._mouseWheelTimeout),this._mouseWheelTimeout=0):n&&this._scroller.elm.css({transitionProperty:r.support.transform?r.props.cssTransform:"left",transitionTimingFunction:"ease-out",transitionDuration:"".concat(de,"ms")});var o=e>0?1:-1;this._lastDirection=this._scrollDirection=-o,this._direction=o,this._mouseWheelTimeout=setTimeout(this._onMouseWheelTimeout.bind(this),de),e>this._viewport.left-this._scroller.left?e=this._viewport.left-this._scroller.left:this._viewport.width-this._scroller.left-this._scroller.width>e&&(e=this._viewport.width-this._scroller.left-this._scroller.width),this._move(Math.round(e)),this.positionChanged()},positionChanged:function(){te.A.trigger("positionchanged",this._context.textView,{})},_onMouseWheelTimeout:function(){this._scroller.elm.css({transitionProperty:"",transitionTimingFunction:"",transitionDuration:""}),this._mouseWheelTimeout=this._lastDirection=0,this._onScrollComplete(),this._isWheelActive=!1,g.busyState.reset()},itemPreviewColumnsCount:function(){return this._columns.preview},setViewportLeft:function(e,t,n){if(!(0,o.isFinite)(e))return this;var i=e-this._viewport.left;return t&&(n?this.scroll(i,100,!1,a.cf.alignmentCorrection):this._move(i)),this._viewport.left=e,this._viewport.width-=i,te.A.trigger("viewportChanged",this,this._viewport),this},scrollAnimation:function(){return this._scrollAnimation},bundleToMultiColumnsAnimation:function(){return this._bundleToMultiColumnsAnimation},expandArticleAnimation:function(){return this._expandArticleAnimation},_alignToNearestColumnAnchor:function(e,t){void 0===t&&(t=a.cf.alignmentCorrection);var n=this.columnByX(this._viewport.left);if(n){var i=n.nearestAnchorDelta(-this._scroller.left-n.left()+this._viewport.left,e);if(i)return this._scroll({delta:i,duration:Math.round(de*(1+Math.abs(i)/this._columns.width)),reason:t}).catch(o.noop)}return Promise.resolve()},direction:function(){return this._direction}},r.nd.viewer.textView.view=f}();var he=r.nd.viewer.textView},89730:function(e,t,n){"use strict";var i=n(58932),r=n(29583),o=n(13302),a=n(7368),s=n(16213),u=n(92066),c=n(64609),l=n(1943),d=n(85464),h=n(23880),f=n(80543),p=n(11756),m=n(96543),g=n(48389),v=n(44260),y=n(67658),_=(n(3585),n(11261),n(97433),n(67010)),b=n(76900),w=n(2215),C=n(67303);function A(e,t){this._renderer=e,t&&(0,o.assign)(this,t)}function I(){var e=u.o.current;return"textViewRenderersArticleElms"in e||(e.textViewRenderersArticleElms={}),e.textViewRenderersArticleElms}function S(e){e=e||0;var t=I(),n=t[e];return n&&n._elm||(n=(0,d.uW)().section().article().addClass("art").css({position:"absolute",top:"-10000px",left:"-10000px"}),e>0?n.addClass("art-t".concat(e+1)):e<0&&n.addClass("art-stack"),t[e]=n),n}function P(){var e=u.o.current;return e.textViewRenderersColumnElm&&e.textViewRenderersColumnElm._elm||(e.textViewRenderersColumnElm=(0,d.uW)().section().column().addClass("col").css({position:"absolute",top:"-10000px",left:"-10000px"})),e.textViewRenderersColumnElm}function x(e){return u.o.current.textView.onReadMoreClicked(e.event?e.event():e),!1}function T(e){return u.o.current.textView.onToolsClicked(e.event?e.event():e),!1}function k(){var e=(0,d.uW)().parent();e._titleToolButtonRegistered||(e.tap(".art-options-call",T),e._titleToolButtonRegistered=!0)}function E(e){this._context=u.o.current,this._article=e,this._columnsStates=[],this._stats={},this._heights=[]}A.ndExtend({full:!1,merged:!1,setCurrent:function(){return this._renderer.currentLayout(this),this}}),E.prototype={_context:null,_article:null,_columnsStates:null,_columnsCount:-1,_estimatedColumnsCount:-1,_mode:0,_useHyphenatedTitle:!1,_stats:null,_articleElm:null,_elm:null,_image:null,_titleColspan:0,_titleType:0,_heights:null,_marker:null,_isAbstract:!0,isAbstract:function(){return this._isAbstract},article:function(){return this._article},dataItem:function(){return this._article},sectionElm:function(){return this._article?(0,d.uW)().section(this._article.Section):null},articleElm:function(){return this._articleElm||(this._articleElm=this.sectionElm().article().addClass("art")),this._articleElm},removeArticleElm:function(){return this._articleElm&&(this._articleElm.remove(),delete this._articleElm),this},columnElm:function(e,t,n){if(!arguments.length)return this.sectionElm().column().addClass("col").css({position:"absolute",width:"".concat((0,g.y6)(),"px")});if(this._elm){var i=n?(this._elm.top()+this._elm.height())%g.K_:0;if(i&&(i=g.K_-i),void 0!==t&&this._elm.maxHeight()-this._elm.height()

    ').append(this._useHyphenatedTitle?this._article.HyphenatedTitle:this._article.Title).append("

    "),1&t&&this._article.Subtitle&&e.append("

    ").append(this._article.Subtitle).append("

    "),e.append("
    "),2&t&&this.renderByline(e),e.append(""),g._b&&this._renderCommentsBubble(e.find("h1")),g.FG&&!C.A.isIssueRestrictedBy("Bookmarks")&&this._renderBookmarkButton(e.children("header"));var n="t_1_".concat(t),i=this._stats[n];i||(this._stats[n]=i=e.checkpoint()),e.checkpoint(i)}},renderMultipleColumnTitle:function(e,t,n,i){if(e){e.append("
    ").append("

    ").append(this._useHyphenatedTitle?this._article.HyphenatedTitle:this._article.Title).append("

    "),1&i&&!(4&i)&&this.renderSubtitle(e),e.append("
    "),2&i&&!(4&i)&&this.renderByline(e),g.FG&&!C.A.isIssueRestrictedBy("Bookmarks")&&this._renderBookmarkButton(e.children("header"));var r="t_2_1_".concat(n,"_").concat(i),o=this._stats[r];if(o||(this._stats[r]=o=e.checkpoint()),e.checkpoint(o),t){var a=t.findAvailablePosition(o,0,!1),s=new _.G({elm:e.elm(),colspan:n,top:a.top,height:o,smartFlowItemId:this._article.Id,type:_.n.Header});t.addCell(s),4&i&&this.renderRestOfTheTitle(this.columnElm(t,g.K_),i)}}},renderRestOfTheTitle:function(e,t){1&t&&this.renderSubtitle(e),2&t&&this.renderByline(e);var n="t_2_2_".concat(t),i=this._stats[n];i||(this._stats[n]=i=e.checkpoint()),e.checkpoint(i)},renderSubtitle:function(e){this._article.Subtitle&&e.append("

    ").append(this._article.Subtitle).append("

    ")},renderByline:function(e){(this._article.Byline||g.pJ&&this._article.Issue)&&(e.append('"))},_renderBookmarkButton:function(e){var t,n=this._article.BookmarkId&&(null===(t=this._article.Collections)||void 0===t?void 0:t.length)>0;e.append('')),k()},_renderCommentsBubble:function(e){var t=this,n='{3}';n=(n=(n=n.replace("{0}",this._article.HateItVotes>this._article.LikeItVotes?" neg":"")).replace("{2}",this._article.PostsCount?"":"visibility:hidden;")).replace("{3}",this._article.PostsCount||0),e.append(n),e.children(".lbl-comment").bind({"touchstart touchend mousedown mousemove mouseup MSPointerDown MSPointerUp":function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},"touchmove MSPointerMove":function(){return!1},click:function(){var e=t._article;return e&&c.A.show({articleId:e.ArticleId,articleTitle:e.Title,articleSubtitle:e.Subtitle,contextProfileName:u.o.profileId}),!1}})},renderTitle:function(e,t,n){if(t>1){void 0===n&&(n=3),this._translationDisclaimer(this.articleElm(),t,e);var i=this.articleElm().createChild("header").css({position:"absolute",width:"".concat((0,g.y6)(t),"px")});this.renderMultipleColumnTitle(i,e,t,n),this._titleColspan=t}else void 0===n&&(n=3),this.renderSingleColumnTitle(this.columnElm(e,g.K_),n),this._titleColspan=1},titleWidth:function(e,t){var n="t_w_".concat(e,"_").concat(t),i=this._stats[n];if(!i){this._stats[n]=i={max:0,min:0};var r=S(e).createChild("header").css("white-space","nowrap");this.renderMultipleColumnTitle(r,void 0,0,t),i.max=r.elm().width(),r.css({"white-space":"normal",width:"1px","overflow-x":"auto"}),i.min=r.elm()[0].scrollWidth,r.remove()}return{min:i.min,max:i.max}},renderImage1:function(e,t){var n=(0,g.y6)(),i=Math.round(100*n/t.Width),r=Math.round(t.Height*i/100),o=this.columnElm(e,r);if(!o)return!1;var a="i_1_".concat(t.Id),s=this._stats[a];return!(s&&o.height()+s>o.maxHeight()||(o.append('
    ').append("").append("=0?"&":"?","scale=").concat(i,'"')).append(' nd_url="'.concat(t.Url,'"')).append(' nd_scale="'.concat(i,'"')).append(' nd_uid="'.concat(t.Uid,'"')).append("/>"),t.Byline&&o.append("".concat(t.Byline,"")),o.append(""),(t.Title||t.Text)&&(o.append("
    "),t.Title&&o.append("".concat(t.Title,"")),t.Text&&o.append(" ".concat(t.Text)),o.append("
    ")),o.append("
    "),s||(this._stats[a]=s=o.checkpoint()),o.height()>o.maxHeight()||o.maxHeight()-o.height()").append("=0?"&":"?","scale=").concat(s,'"')).append(' nd_url="'.concat(t.Url,'"')).append(' nd_scale="'.concat(s,'"')).append(' nd_uid="'.concat(t.Uid,'"')).append("/>");if(t.Byline&&c.append("").append(t.Byline).append(""),c.append(""),(t.Title||t.Text)&&(c.append("
    "),t.Title&&c.append("").append(t.Title).append(""),t.Text&&c.append(" ").append(t.Text),c.append("
    ")),c.append(""),!o){var l=(0,d.uW)().section(0).article().addClass("art");l.elm.createChild("figure").css("width","".concat((0,g.y6)(i),"px")).addClass("art-pic").append(c.html()),this._stats[r]=o=l.elm.height(),l.remove()}var h=Math.round(g.K_/3);if(!this.isValidImageHeight(o)||!e.findAvailablePosition(o,0,!1,this._elm?[new _.G(this._elm.render(),1,this._elm.top(),this._elm.height())]:void 0))return c.remove(),!1;if(c.checkpoint(o),"bottom"===n){var f=g.E3-g.E3%g.K_-o;c.css("top",f),f-=h,this._elm&&this._elm.top()+this._elm.maxHeight()>f&&this._elm.maxHeight(f-this._elm.top());var p=new _.G({elm:c.elm(),colspan:i,top:f,height:o+h,smartFlowItemId:this._article.Id,type:_.n.Figure});e.addCell(p)}else f=e.findAvailablePosition(o,0,!1).top,this._elm&&(f=this._elm.top()+this._elm.height(),this._elm.maxHeight(this._elm.height())),p=new _.G({elm:c.elm(),colspan:i,top:f,height:o+h,smartFlowItemId:this._article.Id,type:_.n.Figure}),e.addCell(p);return!0},renderImage:function(e,t,n,i){if(this._article){var r,o;if(e){if(r="top",o=1===e.colspan?this.renderImage1(t,e.image):this.renderImage2(t,e.image,r,e.colspan))return}else r="bottom";var a=g.Ps;for(a>n&&(a=n);a;a--){var s=this.getImages(a);if(s&&s.length){if(!i&&a>1&&n>a)return{image:s[0],colspan:a,postponed:!0};for(var u=0;u1&&this.renderImage2(t,e,r,a))return{image:e,colspan:a};if(!(i||n<=a)){var c=new h.fd;if(o=void 0,(1===a&&this.renderImage1(c,e)||a>1&&this.renderImage2(c,e,r,a))&&(o={image:e,colspan:a,postponed:!0}),c.dispose(),o)return o}}}}}},pclasshtml:function(e,t){var n;return!e&&this._article.Annotation?n="art-annotation":e||this._titleType<3?n=null:(n="art-lead",(!t||t>=3)&&(n+=" dropcap")),n?' class="'.concat(n,'"'):""},addMarker:function(e){if(delete this._marker,!this._columnsStates)return this;var t=this._columnsStates[e];if(!t)return this;var n=t.blockIdx,i=t.lineIdx;if(!i)return this._marker={idx:n-1,block:this._article.Blocks[n-1].Text+g.kz},this;for(var r=this._article.Blocks[n].Text,o=Math.floor(r.length*i*g.K_/this.blockHeight(n)),a=S(this._titleType).createChild("div").css({position:"absolute",width:"".concat((0,g.y6)(),"px"),visibility:"hidden"}).addClass("col");o")).append(r.substr(0,o)+g.kz).append("

    ").checkpoint()/g.K_);for(a.rollback();s<=i&&!(++o>=r.length);){for(;o")).append(r.substr(0,o)+g.kz).append("

    ").checkpoint()/g.K_),a.rollback()}for(;s>i&&!(--o<=0);){for(;o>0&&" "!==r[o];)--o;s=Math.round(a.append("

    ")).append(r.substr(0,o)+g.kz).append("

    ").checkpoint()/g.K_),a.rollback()}return a.remove(),this._marker={idx:n,block:r.substr(0,o)+g.kz+r.substr(o)},this},removeMarker:function(){return delete this._markedBlock,this},renderText:function(e,t,n,i,r){if(this._article&&this._article.Blocks&&this._article.Blocks.length){i||(i=Number.MAX_VALUE);for(var o=this._renderingState(e).text,a=t;ai&&(l=i),r&&r[a])for(var d=0;d=h.lidx+h.lines)){l=Math.min(l,h.lines-n+h.lidx);break}}if(!l)return{blockIdx:a,lineIdx:n};c&&u.append('

    ')).checkpoint(c);var f=this.renderBlock(u,a,n,l);if(!f)break;if(o[a]={start:n,lines:f,outof:s},n+=f,(i-=f)<=0)return n=3?"".concat(t._titleType,"_"):"").concat(e)},r=this._stats,o=n?void 0:r[i(e)];if(!o){var a,s,u=2&this._mode?P().css("width","".concat((0,g.y6)(),"px")).createChild("article").addClass("art art-stack"):S(this._titleType).createChild("div").css({position:"absolute",width:"".concat((0,g.y6)(),"px"),visibility:"hidden"}).addClass("col"),c=void 0;n?(c=1,a=e):!e&&this._titleType>=3?(c=1,a=0):(a=e-e%(c=10))+c>this._article.Blocks.length&&(c=this._article.Blocks.length-a);for(var l=0;l")),this._marker&&this._marker.idx===l+a?u.append(this._marker.block):u.append(this._article.Blocks[l+a].Text),u.append("

    ");u.append("

    a

    "),u.elm().children().each((function(e){var t=this.offsetTop;e&&(n?o=t-s:r[i(e+a-1)]=t-s),s=t})),u.remove(),n||(o=r[i(e)])}return o},_blockHeightTask:function(e,t,n){var r,o,a=[this._mode,this._titleType];r=(0,i.zs)([t,n],2),this._mode=r[0],this._titleType=r[1],this.blockHeight(e),o=(0,i.zs)(a,2),this._mode=o[0],this._titleType=o[1]},renderBlock:function(e,t,n,i){var r=Math.min(i,Math.round(this.blockHeight(t,!1)/g.K_)-n),o=r*g.K_;e.append('

    "),this._marker&&this._marker.idx===t?e.append(this._marker.block):e.append(f.A.replace(this._article.Blocks[t].Text,this._article.Data)),e.append("

    ").checkpoint(o),k(),r},_translationDisclaimer:function(e,t,n){if(this._article.isOriginal()||w.A.currentLanguage())return null;var i=e.createChild("div").css({width:(0,g.y6)(t),position:"absolute"}).append('

    Translated into ').append(w.A.language(this._article.Language).title()).append('Show originalDisclaimer

    '),r=i.checkpoint();if(i.checkpoint(r),n){var o=n.findAvailablePosition(r,0,!1),a=new _.G({elm:i.elm(),colspan:t,top:o.top,height:r,smartFlowItemId:this._article.Id,type:_.n.Header});n.addCell(a)}return i},getImages:function(e){if(!this._article.Images||!this._article.Images.length)return null;for(var t=null,n=0;ng.UO)){var a=Math.round(i.Height*o/100);e>1&&!this.isValidImageHeight(a)||(t?t.push(i):t=[i])}}return t&&t.sort((function(e,t){return t.Width*t.Height-e.Width*e.Height})),t},isValidImageHeight:function(e){return g.E3-e>5*g.K_},reset:function(e){e&&(this._article=e),this.removeArticleElm()._columnsStates=[],this._columnsCount=this._estimatedColumnsCount=-1,this._stats={},this._heights=[],delete this._currentLayout},columnsCount:function(){return this.estimatedColumnsCount()},textLines:function(e,t,n){if(!this._article||!this._article.loaded())return 0;var i=0,r=g.K_,o=this._titleType;this._titleType=e;for(var a=n?0:this._article.StartBlockIdx||0;a0&&this._article.Title.toUpperCase()===this._article.Title&&--r;for(var o=r;o>=0;--o){var a=this.titleWidth(o,0),s=Math.ceil((a.max+g.oG)/g.zt),u=Math.ceil((a.min+g.oG)/g.zt),c=Math.min(Math.min(e,g.Ps),s);if(!o||!(1===c||c1&&(l=this.layoutByTitleLayout({type:o,colspan:c,split:!1},e,3|o<<3),n=this.pickLayout(n,l),l=this.layoutByTitleLayout({type:o,colspan:c,split:!0},e,7|o<<3),n=this.pickLayout(n,l)),o||(l=this.layoutByTitleLayout({type:o,colspan:1},e,3|o<<3),n=this.pickLayout(n,l))}}return n&&(this._stats[t]=n),this._mode=i,n},pickLayout:function(e,t){if(!e)return t;if(!t)return e;if(e.image&&!t.image)return e;if(!e.image&&t.image)return t;if(e.image&&t.image){if(e.image.image.s>t.image.image.s)return e;if(e.image.image.st.totalLines?t:Math.random()<.5?e:t},layoutByTitleLayout:function(e,t,n){for(var i=this.titleHeightsByColumns(e.type,e.colspan,n),r=0,o=g.Nw/2,a=0;a=c.colidx&&a1){var a=0;(u=this._translationDisclaimer(o,t))&&(a=u.height(),u.remove()),u=o.createChild("header").css({position:"absolute",width:"".concat((0,g.y6)(t),"px")}),this.renderMultipleColumnTitle(u,void 0,t,n),a+=u.height(),u.remove();for(var s=0;s0;--i){for(var r=-1,o=0,a=0;a<=e-i;++a){for(var s=-1,u=0;un.image.s&&(n.image=c,n.colidx=o,n.colspan=i):n={image:c,colidx:o,colspan:i})}}return n},image:function(e,t,n){var i=(0,g.y6)(t),r=Math.round(100*i/e.Width);if(r>g.UO)return null;var a=Math.round(e.Height*r/100);if(a>n)return null;var s={};return(0,o.forIn)(e,(function(e,t){s[t.toLowerCase()]=e})),s.width=i,s.height=a,s.url="image.Url".concat(e.Url.indexOf("?")>=0?"&":"?","scale=").concat(r),s.s=i*a,s.baseUrl=e.Url,s.scale=r,s},images:function(e,t){if(!this._article.Images||!this._article.Images.length)return null;for(var n=null,i=0;i").append("");return e.byline&&n.append('').append(e.byline).append(""),n.append(""),(e.title||e.text)&&(n.append("

    "),e.title&&n.append("").append(e.title).append(""),e.text&&n.append(" ").append(e.text),n.append("
    ")),n},fullImageHeight:function(e){var t="fih_".concat(e.id,"_").concat(e.width),n=this._stats[t];if(!n){var i=this.renderOutsideImage(e,S(0));this._stats[t]=n=i.height(),i.remove()}return n},bestImage:function(e,t){if(this._article){var n=this.images(e,t);if(!n)return null;for(var i=null,r=0;rt||(!i||o.s>i.s)&&((i=o).fullHeight=a)}return i}},renderLayout:function(e,t,n,i){n||t.addDivider();var r=(0,b.Ef)(this._article,b.qF.Rendered);if(t.onDisposed((function(){return r.release()})),t.addLayout(this),!t.section()&&this._article.group()&&t.section(this._article.group()),!n){this.articleElm().removeClass().addClass("art"),e.title.type&&this.articleElm().addClass("art-t".concat(e.title.type+1)),this._article.StartBlockIdx&&!e.merged&&this.renderContinuedFromElm(e,t);var o=3|e.title.type<<3;e.title.split&&(o|=4),this._titleType=e.title.type,this.renderTitle(t,e.title.colspan,o)}if(e.images)for(var a=0;a1){var o=t.findAvailablePosition(g.K_,0,!1),a=r(''.concat(i,"")).bind({"touchstart touchend mousedown mousemove mouseup MSPointerDown MSPointerUp":function(e){(e=e.originalEvent||e).stopPropagation?e.stopPropagation():e.cancelBubble=!0},"touchmove MSPointerMove":function(){return!1},click:function(e){n._context.textView.onContinuedFromClicked(e)}}).optimizeForTransform();this.articleElm().elm().append(a);var s=new _.G({elm:a,colspan:e.title.colspan,top:o.top,height:g.K_,smartFlowItemId:this._article.Id,type:_.n.Column,layout:e});t.addCell(s)}else this.columnElm(t,g.K_).append(''.concat(i,"")).checkpoint(g.K_).addOnRenderedListener((function(e){e.children("a.continued").bind({"touchstart touchend mousedown mousemove mouseup MSPointerDown MSPointerUp":function(e){(e=e.originalEvent||e).stopPropagation?e.stopPropagation():e.cancelBubble=!0},"touchmove MSPointerMove":function(){return!1},click:function(e){n._context.textView.onContinuedFromClicked(e)}})}))},renderImageLayout:function(e,t,n){var i=this.renderOutsideImage(n.image,this.articleElm());if(i.checkpoint(n.image.fullHeight),!n.colidx&&1===n.colspan||n.colidx+n.colspan<=t.colspan&&(!t.split||n.colidx)||n.colidx>=t.colspan){var r=e.findAvailablePosition(n.image.fullHeight,0,!1,this._elm?[new _.G(this._elm.render(),1,this._elm.top(),this._elm.height())]:void 0).top;this._elm&&(this._elm.height()?this._elm.maxHeight(this._elm.height()):(this._elm.remove(),delete this._elm));var o=new _.G({elm:i.elm(),colspan:n.colspan,top:r,height:n.image.fullHeight,smartFlowItemId:this._article.Id,type:_.n.Figure});e.addCell(o)}else r=g.E3-g.E3%g.K_-n.image.fullHeight,i.css("top",r),this._elm&&this._elm.top()+this._elm.maxHeight()>r&&this._elm.maxHeight(r-this._elm.top()),o=new _.G({elm:i.elm(),colspan:n.colspan,top:r,height:n.image.fullHeight,smartFlowItemId:this._article.Id,type:_.n.Figure}),e.addCell(o)},addEllipsis:function(e){for(var t=e.cells(),n=null,i=t.length-1;i>=0;--i)if(!t[i].type()){n=t[i];break}n&&this._addEllipsis(n.elm)},_addEllipsis:function(){var e=(0,d.uW)().parent();e._ellipsisElmRegistred||(e.tap(".readmore, .readmore-click-panel",x),e._ellipsisElmRegistred=!0)},estimatedColumnsCount:function(e){if(this._columnsCount>0)return this._columnsCount;var t=0;if(e){if(this._estimatedColumnsCount>=e)return this._estimatedColumnsCount;t=e*g.Nw}else e=Number.MAX_VALUE;var n=this.textLines(0,t,this._article.StartBlockIdx||0)/g.Nw;if(!n)return-1;if(n>e)return this._estimatedColumnsCount=n,n;n=Math.ceil(n);var i=this.layout(n);if(i.totalLines>this.textLines(i.title.type))return this._columnsCount=this._estimatedColumnsCount=n-.5,this._columnsCount;for(;nthis.textLines(i.title.type))return this._columnsCount=this._estimatedColumnsCount=n-.5,this._columnsCount;if(i.totalLines===this.textLines(i.title.type))return this._columnsCount=this._estimatedColumnsCount=n,this._columnsCount}return this._estimatedColumnsCount=n,this._estimatedColumnsCount},fullLayout:function(e,t){var n=new A(this,e);if(t&&(n.merged=!0),e.full)return n;if(n.full=!0,!this._article.Images||!this._article.Images.length)return n;var i,r=this.textLines(e.title.type,void 0,t),o=(g.Nw-g.VN)*g.K_;if(e.image){i=[];for(var a=0;a0;--v)if((s=this.image(i[a],v,o))&&!((w=this.fullImageHeight(s))>o)){p[a]=v;break}m[a]=p[a]}for(;;){var y=c.slice(0),_=void 0,b=[];for(a=0;ao)break;s.fullHeight=w;for(var C=Math.ceil(w/g.K_),I=0;;){var S=Number.MAX_VALUE;for(l=0;l=y.length&&y.push(g.Nw-g.VN),!((S=Math.min(S,y[l+I]))=C)break;++I}for(b.push({image:s,colspan:v,colidx:I}),l=0;l1){if(--m[a],!a&&e.image&&m[a]=0&&T>0;--a){var k=f[a],E=0;for(l=a-1;l>=0;--l){var M=f[l];if(M.colidx!==k.colidx){M.colidx+M.colspan===k.colidx&&(E=1);break}}if(T>E&&n.title.colspan===k.colidx+E&&++E,E>0){for(k.colidx+=E,l=a+1;ls.colspan||!s.postponed?this._stats[n]=r={title:{type:0,colspan:d},image:s}:this._stats[n]=r={title:{type:0,colspan:1},image:s};else{for(var u=Math.ceil(4*(this._article.SecNormRate||this._article.NormRate));u>1&&!((d=Math.min(Math.min(e,g.Ps),Math.ceil((this.titleWidth(u,3)+g.oG)/g.zt)))<2);u--){var c=this.sectionElm().article().addClass("art art-t".concat(u+1)),l=c.createChild("header").css({position:"absolute",width:"".concat((0,g.y6)(d),"px")});if(this.renderMultipleColumnTitle(l,void 0,d,3|u<<3),l.height()<=g.E3/2&&(this._stats[n]=r={title:{type:u,colspan:d},image:s}),c.remove(),r)break}if(!r){var d=Math.min(Math.min(e,g.Ps),Math.ceil((this.titleWidth(1,0)+g.oG)/g.zt));this._stats[n]=r={title:{type:d>1?1:0,colspan:d},image:s}}}t=(0,i.zs)(o,3),this._mode=t[0],this._articleElm=t[1],this._elm=t[2]}return r}},render:function(){for(var e=[],t=0;t(r.image?1:0)||this._article.isPreview())?this.addEllipsis(n.tail):r.full=!0,n.count=i}else{var l=e[0],d=e[1];(r=this.currentLayout())||(r=this.layout(1).setCurrent()),r=this.fullLayout(r,d);var f,p=function(e){var t=n.tail=new h.fd(n.tail).articleIdx(m._article.Idx).columnIdx(n.count);n.head||(n.head=t),e=m.renderLayout(r,t,n.count,l);var i=(0,b.Ef)(m._article,b.qF.Rendered);t.onDisposed((function(){return i.release()})),f=e},m=this;for(a=!0;a;n.count++)p(a),a=f;for(var g=n.head;g;g=g.next())g.articleColumnsCount(n.count)}return new h.Sl(n.head,n.tail)},estimatedColumnsCount2:function(e){var t;if(this._columnsCount>0)return this._columnsCount;if(e&&this._estimatedColumnsCount>=e)return this._estimatedColumnsCount;var n=0;if(this._article.Blocks&&this._article.Blocks.length){for(var r=0,o=0;o=e)return this._estimatedColumnsCount=n,n;n=Math.ceil(n||r/g.E3)}else n=1;this._mode=1;for(var a=[this._columnsStates,this._articleElm];;){var s=null;for(this._columnsStates=[],delete this._articleElm,o=0;o=e)return this._estimatedColumnsCount=n,this._mode=0,n;n++}},highlight:function(e){for(var t=e.articleColumnsCount(),n=this._article,i=f.A.replace(this._useHyphenatedTitle?n.HyphenatedTitle:n.Title,n.Data),o=n.Subtitle?f.A.replace(n.Subtitle,n.Data):null,a=0;a hgroup > h1").html(i),o&&a.find("header > hgroup > h2").html(o),a.children("div[bidx]").each((function(){var e,t=r(this),i=parseInt(t.attr("bidx"),10);i in u?e=u[i]:u[i]=e=f.A.replace(n.Blocks[i],n.Data),t.children("p").html(e)}));break;case _.n.Figure:break;case _.n.Header:a.find("hgroup > h1").html(i),o&&a.find("hgroup > h2").html(o)}},c=0;cg.zt;var a=!1;switch(e){case 0:this.renderTitle(t,1),this.renderImage(void 0,t,1,0),(s=this.renderText(t,0,0,i))?(arguments.length>4&&this.renderText(t,s.blockIdx,s.lineIdx,r),(arguments.length<=4||this._article.isPreview())&&(a=!0)):this._article.isPreview()&&(a=!0);break;case 1:this.renderTitle(t,1,1),this.renderImage(void 0,t,1,0),(s=this.renderText(t,0,0,i))&&arguments.length>4&&this.renderText(t,s.blockIdx,s.lineIdx,r),a=!0;break;case 2:this.renderTitle(t,1,0),this.renderImage(void 0,t,1,0),(s=this.renderText(t,0,0,i))&&arguments.length>4&&this.renderText(t,s.blockIdx,s.lineIdx,r),a=!0;break;case 3:this.renderTitle(t,1,1),(s=this.renderText(t,0,0,i))&&arguments.length>4&&this.renderText(t,s.blockIdx,s.lineIdx,r),a=!0;break;case 4:var s;this.renderTitle(t,1,0),(s=this.renderText(t,0,0,i))&&arguments.length>4&&this.renderText(t,s.blockIdx,s.lineIdx,r),a=!0}if(this._mode^=2,n)this._elm.render(),delete this._articleElm;else{var u=new _.G({elm:this._elm.render(),colspan:1,top:this._elm.top(),height:this._elm.height(),smartFlowItemId:this._article.Id,type:_.n.Column});t.addCell(u)}a&&this._addEllipsis(this._elm),delete this._elm}},height:function(e){var t;if(!this._heights[e]){var n=[this._articleElm,this._elm];delete this._articleElm,delete this._elm,this._mode=1;var r=new h.fd,o=this.sectionElm().column().addClass("col").css({position:"absolute",top:"0px",width:"".concat((0,g.y6)(),"px")});this.render(e,r,o,g.VN);var a=o.height();o.removeChildren(),this.render(e,r,o);var s=o.height();o.remove(),this._heights[e]={min:a,max:s},this._mode=0,r.dispose(),t=(0,i.zs)(n,2),this._articleElm=t[0],this._elm=t[1]}return this._heights[e]},estimatedColumnsCount:function(){return this._columnsCount>0?this._columnsCount:this._estimatedColumnsCount>0?this._estimatedColumnsCount:(this._columnsCount=this._estimatedColumnsCount=this.height(0).max/g.E3,this._columnsCount)},highlight:function(e){var t=this._article,n=e.cells()[0].elm().children("article[aid=".concat(t.Id,"]")),i=n.find("header > hgroup > h1"),o=i.find("a.lbl-comment").detach();i.html(f.A.replace(this._useHyphenatedTitle?t.HyphenatedTitle:t.Title,t.Data)).append(o),t.Subtitle&&n.find("header > hgroup > h2").html(f.A.replace(t.Subtitle,t.Data));var a=this,s={};n.children("div[bidx]").each((function(){var e=parseInt(r(this).attr("bidx"),10);e in s?this.parentNode.replaceChild(this,s[e]):s[e]=a.highlightRec(this)}))},highlightRec:function(e){if(!e||"true"===r(e).attr(g.TJ))return e;f.A.flatten(e);for(var t=[].slice.call(e.childNodes,0),n=0;n

    "):""},t.prototype._measureBlocks=function(e,t,n,i){var r=this;(0,o.forEach)(e.childNodes,(function(e,o){var a=t[o],s=window.getComputedStyle(e),u=Pt.f.textBlockCacheKey(a,n,i);if(r._cache[u]=parseFloat(s.height),e.className.length>0){var c=parseInt(s.getPropertyValue("margin-top"),10);0!==c&&(r._textBlockOffsetMap[u]=c)}}))},t}(Pt.f),Dt=n(79450),Nt=n(50794),Lt=n(53236),Vt=n(76900),Rt="is-following",Ht="pri-following",Ft="pri-follow",Bt={misc:0,miscAtTop:0,title:0,author:0},zt={id:0,data:{Nickname:"A A",FollowersCount:0}},Ot={};function jt(e,t,n){if(void 0===t&&(t=!1),(0,o.isEmpty)(e))return"";var i='

    ');return n&&(i+='\n
    \n
    '.concat(n,"
    \n
    \n ")),i+='
    ',(0,o.forEach)(e,(function(e){var t=e.id,n=e.data,r=n.FollowersCount?Z.Ay.format("v7.Client.Profile.NFollowers",n.FollowersCount):"",o=n.FollowedByCurrentUser?" ".concat(Rt):"",a=n.FollowedByCurrentUser?Ht:Ft,s=n.FollowedByCurrentUser?Z.Ay.val("v7.Client.Profile.Following"):Z.Ay.val("v7.Client.Profile.Follow"),u=(0,ne.tr)({nickname:n.Nickname,imageId:n.avatarImageId,size:ne.eV.large,fallbackAvatarUrl:n.PhotoUrl}),c=n.EnAccountNumber===Lt.default.enAccountNumber;i+='\n\n
    \n
    \n ').concat(u,'\n
    \n
    \n
    \n
    \n ').concat(n.Nickname,'\n ').concat(r,'\n
    \n
    \n
    \n
    \n
    \n ').concat(s,"\n
    \n
    \n
    \n
    ")})),"".concat(i,"

    ")}function Ut(e){if(!Bt.author){var t,n,i=e.getArticleElm();e.mutate((function(){(t=i.createChild("div").css({position:"absolute",width:"".concat((0,z.y6)(),"px")}).addClass("col")).append(jt([zt],!0)).append(jt([zt])).append(jt([zt,zt])).append(jt([zt],!1,"Follow Reporters")),n=t.elm().children("div.art-relauthors")})).measure((function(){var e=(0,o.map)(n.toArray(),(function(e){return r(e).outerHeight()})),t=Bt.author=e[2]-e[1];Bt.misc=e[1]-t,Bt.miscAtTop=e[0]-t,Bt.title=e[3]-t})).mutate((function(){t.remove(),i=t=n=null}))}}function Wt(e){var t=r(e.target).parents("a.user.featuser[author-id]"),n=t.attr("author-id");if(!n||!(n in Ot))return!1;var i=Ot[n];return(i.FollowedByCurrentUser?Dt.default.unFollowUser(i.ProfileName):Dt.default.followUser(i.ProfileName)).then((function(e){var n=i.FollowedByCurrentUser=e.followedByMe,r=i.FollowersCount=e.followedByUsersTotal;!function(e,t,n){var i=e.find("div.btn-icon.btn-follow");i.removeClass(Rt);var r=i.find("span.pri");r.removeClass(Ft).removeClass(Ht),t?(i.addClass(Rt),r.addClass(Ht),i.attr("title",Z.Ay.val("v7.Client.Profile.Following"))):(i.attr("title",Z.Ay.val("v7.Client.Profile.Follow")),r.addClass(Ft)),e.children("div.user-meta").find("span.meta").text(n?Z.Ay.format("v7.Client.Profile.NFollowers",n):"")}(t,n,r)})),!1}function Yt(e){var t=r(e.target).parents("a.user.featuser[author-id]").attr("author-id");if(!t||!(t in Ot))return!1;var n=Ot[t];return Nt.F.goToProfile(n.ProfileName),!1}var Xt=function(e){function t(){for(var t=[],n=0;n1?Z.Ay.val("v7.Client.Authors.Title"):Z.Ay.val("v7.Client.Author.Title")),r.append(jt(e,!n,i)),r},t.prototype._getCell=function(e,t,n,i,a){var s=e.height(),u=new $.G({elm:e.render(),colspan:1,top:a,height:s,smartFlowItemId:this._article.getId(),type:$.n.Column,layout:n});u.addBlock(this),i.addCell(u),(0,o.forEach)(t,(function(e){var t=e.id,n=e.data;Ot[t]=n}));var c=Lt.default.updates.subscribe((function(){var t=e.find("a.user.featuser[author-id]").toArray();(0,o.forEach)(t,(function(e){var t=r(e),n=t.attr("author-id");if(n&&n in Ot){var i=Ot[n],o=t.find("div.user-action");Lt.default.enAccountNumber===i.EnAccountNumber?o.hide():o.show()}}))}));return i.onDisposed((function(){c.unsubscribe(),(0,o.forEach)(t,(function(e){var t=e.id;delete Ot[t]}))})),u},t.prototype._fitAndRender=function(e,t,n,i){var r=this;if(i)return this._fitIntoPositionAndRender(e,i,n,{top:0,height:z.E3,columnIndex:t.count()});var a=0;return(0,o.forEach)(n.bottomPositionsAfterText(),(function(i){var o=r._fitIntoPositionAndRender(e,t.item(i.columnIndex),n,i);if(a+=o,(e+=o)>=r._authors.length)return!1})),a},t.prototype._fitIntoPositionAndRender=function(e,t,n,i){var r=function(){if(!Bt.author){var e=new Xe.i;Ut(e),e.execute()}return Bt}(),a=i.top?r.misc:r.miscAtTop;e||(a+=r.title);var s=(0,o.chain)(this._authors).slice(e).takeWhile((function(){return(a+=r.author)<=i.height})).value();if(!s.length)return 0;for(var u=n.articleElm(),c=this._getElm(s,u,i.top);c&&c.height()>i.height;){if(c.remove(),s.pop(),!s.length)return 0;c=this._getElm(s,u,i.top)}if(!c)return 0;var l=this._getCell(c,s,n,t,i.top),d=new Xt(this,"".concat(e,"_").concat(s.length));return d.height(l.height),n.applyBlockInstance(d,i.columnIndex,i.top),s.length},t.resize=function(){Bt.author=0,Bt.misc=0,Bt.miscAtTop=0,Bt.title=0},t}(F.C6),Kt=Gt,Jt=n(77409),Qt=n(37022),Zt=n(61105),$t=window.layoutStats={};function en(e){return u.o.current.textView.onReadMoreClicked((0,o.isFunction)(e.event)?e.event():e),!1}function tn(){var e=(0,X.uW)().parent();e._ellipsisElmRegistred||(e.tap(".readmore, .readmore-click-panel",en),e._ellipsisElmRegistred=!0),e._textLinksRegistered||(e.tap("p>a",(function(e){var t=e&&e.originalEvent&&e.originalEvent.target&&e.originalEvent.target.href;t&&(window.location=t)})),e._textLinksRegistered=!0)}var nn={},rn=null;function on(e){return e.Language===e.OriginalLanguage?e.Id:e.Id+e.Language}function an(){rn&&((0,o.forIn)(rn,(function(e){e.dispose()})),rn=null)}function sn(e){if(void 0===e&&(e=null),e){var t=on(e);t in nn&&(nn[t].dispose(),delete nn[t])}else rn&&an(),rn=nn,nn={}}function un(e,t){if(!e)return t;if(!t)return e;var n=e.textDistribution(),i=t.textDistribution();return n.emptyColumnsCount>i.emptyColumnsCount?t:n.emptyColumnsCountt)){var a=Math.min(t,Math.ceil((r.max+z.oG)/z.zt));if(!(a=o;--s){var u=e.copy();u.colspan=s,n._instances[++n._gInstanceId]=u;var c=e.toJSON(s);c.gInstanceId=n._gInstanceId,i.push(c)}}})),i},t.prototype._restoreInstances=function(e){var t=this;return e?((0,o.forEach)(e.blockInstances(),(function(e,n,i){e.gInstanceId in t._instances&&(i[n]=t._instances[e.gInstanceId])})),e.columns().forEach((function(e){(0,o.forEach)(e.cells(),(function(e){e.instance.gInstanceId in t._instances&&(e.instance=t._instances[e.instance.gInstanceId])}))})),e):e},t.prototype.textBlocksHeights=function(){return this._textBlocksHeights},t.prototype.tasks=function(){var e=this,t=new Zt.Q;return this._article.on("dispose",(function(){t.request()})),[function(){if(!t.isRequested)return Promise.all([e.estimateColumnsCountAsync(z.tg,t),Y.loaded]).then(t.rejectIfRequested).then((function(t){var n=(0,i.zs)(t,2),r=n[0],o=n[1],a=e._buildLayoutMap(o[0],{}),s=new Xe.i;return e._measure(r||z.tg,a,s),s.executeAsync()}))}]},t.prototype._measure=function(e,t,n){var r="measure_".concat(t.templateName);r in this._cache||(this._cache[r]=1,(0,o.forIn)(t.instances,(function(t){var r,o;try{for(var a=(0,i.Ju)(t),s=a.next();!s.done;s=a.next())s.value.measure(e,n)}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}})))},t.prototype._buildLayoutMap=function(e,t){var n=this,r=[],a={},s={},u=null;return(0,o.forEach)(e.blocks,(function(e){var c=n._blockMetaInfo(e,t);if(c){if(!r.length)if(c.roots.length>1){var l={type:"dummy",root:!0};r.push(l),u=[l],a.dummy=[]}else c.roots[0]&&(c.roots[0].root=!0);u&&(0,o.forEach)(u,(function(e){e.children=c.roots})),u=c.leaves,r.push.apply(r,(0,i.fX)([],(0,i.zs)(c.nodes),!1)),(0,o.assign)(a,c.instances),(0,o.assign)(s,c.blocks)}})),{templateName:e.name,blocks:s,nodes:r,instances:a}},t.prototype._blockMetaInfo=function(e,t){var n,r,a=this,s=null;switch(e.type){case"choose":s=(0,o.transform)(e.items,(function(e,n){var r,s,u,c=a._blockMetaInfo(n,t);c&&(e.isEmpty=!1,(r=e.nodes).push.apply(r,(0,i.fX)([],(0,i.zs)(c.nodes),!1)),(s=e.roots).push.apply(s,(0,i.fX)([],(0,i.zs)(c.roots),!1)),(u=e.leaves).push.apply(u,(0,i.fX)([],(0,i.zs)(c.leaves),!1)),(0,o.assign)(e.instances,c.instances),(0,o.assign)(e.blocks,c.blocks))}),{isEmpty:!0,nodes:[],roots:[],leaves:[],instances:{},blocks:{}});break;case"group":s=(0,o.transform)(e.items,(function(e,n){var r,s=a._blockMetaInfo(n,t);s&&(e.isEmpty=!1,(r=e.nodes).push.apply(r,(0,i.fX)([],(0,i.zs)(s.nodes),!1)),e.roots?e.leaves&&(0,o.forEach)(e.leaves,(function(e){e.children=s.roots})):e.roots=s.roots,e.leaves=s.leaves,(0,o.assign)(e.instances,s.instances),(0,o.assign)(e.blocks,s.blocks))}),{isEmpty:!0,nodes:[],instances:{},blocks:{}});break;default:var u=null,l=function(e){var t=e.article,n=e.config,i=e.cache;if(n.type===O.A.video){var r=(0,o.head)(t.Videos);if(r&&!He.canRender(r.Url)){var a={Height:r.Height,Id:r.Id||1,Title:r.Title,Url:r.ThumbnailUrl,Width:r.Width};return t.Images?t.Images.unshift(a):t.Images=[a],t.Videos=null,new be(t,n,i)}}if(n.type===O.A.comments&&!c.A.get("features.comments",!0))return null;var s=St[n.type];return s?new s(t,n,i):null}({article:this._article,config:e,cache:this._cache});if(l&&l.available(t))if(0===e.maxPreviewInstances)u=[];else{var d=l.instances();d&&(u=(0,o.filter)(d,(function(e){if((0,o.isFunction)(e.articleType)){var n=e.articleType();if(void 0!==t.articleType&&t.articleType!==n||void 0===t.articleType&&n<0)return!1}return!0})))}if(u){var h=[{type:e.type}];e.mandatory&&(h[0].imperative=!0),s={blocks:(n={},n[e.type]=l,n),nodes:h,roots:h,leaves:h,instances:(r={},r[e.type]=u,r)}}}return s&&!s.isEmpty?s:null},t.prototype.article=function(){return this._article},t.prototype.newArticleElm=function(){return(0,X.uW)().section(this._article.group()).article().addClass("art").attr("aid",this._article.Id)},t.prototype._appendColumn=function(e,t){var n=e.colspan;if(n!==t.count())throw new Error("Columns counts are inconsistent.");var i=e.colspan;e.appendColumn();var r=(new q.fd).columnIdx(i).addLayout(e),o=(0,Vt.Ef)(this._article,Vt.qF.Rendered);if(r.onDisposed((function(){return o.release()})),!r.section()){var a=this._article.group();a&&r.section(a)}t.append(r),t.forEach((function(e){e.articleColumnsCount(n)}))},t.prototype._renderBlocks=function(e){for(var t=this,n=[],i=1;i=e||n.count>=e)return n.count;n.max=e}else this._cache[t]=n={max:e,count:.5};var i={fromStart:!0,startBlockIdx:0,textBlocksCount:this._article.Blocks.length,colspan:e},r=this._buildLayoutMap(Y[0],i),a=(0,o.find)(r.nodes,(function(e){return e.root})),s=this._estimateLinesCount(r,a,e),u=e?e*z.Nw:Number.MAX_VALUE,c=(s+this._textLines(u,this._article.StartBlockIdx||0))/z.Nw;return(c>1||Kt.isAvailable(this._article)||ht.Ay.isAvailable(this._article,ht.Ay.mode.tools_comment)||ht.Ay.isAvailable(this._article,ht.Ay.mode.thumbnail))&&(c=Math.ceil(c)),n.count=c,c},t.prototype.estimateColumnsCountAsync=function(e,t){var n=this,i="ecc",r=null;if(i in this._cache){if((r=this._cache[i]).max>=e||r.count>=e)return Promise.resolve(r.count);r.max=e}else this._cache[i]=r={max:e,count:.5};var a={fromStart:!0,startBlockIdx:0,textBlocksCount:this._article.Blocks.length,colspan:e},s=this._buildLayoutMap(Y[0],a),u=(0,o.find)(s.nodes,(function(e){return e.root})),c=this._estimateLinesCount(s,u,e),l=e?e*z.Nw:Number.MAX_VALUE,d=this._lock.lock();return this._textLinesAsync(l,this._article.StartBlockIdx||0,t).then(t.rejectIfRequested).then((function(e){var t=(c+e)/z.Nw;return(t>1||Kt.isAvailable(n._article)||ht.Ay.isAvailable(n._article,ht.Ay.mode.tools_comment)||ht.Ay.isAvailable(n._article,ht.Ay.mode.thumbnail))&&(t=Math.ceil(t)),r.count=t,t})).finally((function(){return d.release()}))},t.prototype._estimateLinesCount=function(e,t,n){var i=this;if(!t)return 0;var r=0;return t.type in e.blocks&&(r+=e.blocks[t.type].estimateLinesCount(n)),(0,o.isEmpty)(t.children)||(r+=(0,o.chain)(t.children).map((function(t){return i._estimateLinesCount(e,t,n)})).max().value()),r},t.prototype.height=function(e){var t,n=this;if(e){var i=e-3*z.K_;if(i<=0)return;t=this.layoutSync(1,Y[1],!1,i,-1)}else e=z.E3,t=this.layoutSync(1,Y[1],!1,0,-1);if(t){var r=t.columns().head(),a=r.height();if(!(a>=e)){var s=r.findAllPositions(0,1,2*z.K_,!0,e);if(s&&s.length){var u=0,c=Math.round(this._textBlocksHeights.get(u,-1)/z.K_),l=this._article.Blocks.length;return(0,o.forEach)(s,(function(t){if(a>=e)return!1;var i=t.top,r=t.height;if(i+r>e&&(r=e-i)<=0)return!1;for(var o=Math.floor(r/z.K_);o>0;){var s=Math.min(c,o);if(i+=s*z.K_,a+=s*z.K_,(c-=s)<=0){if(++u>=l)break;c=Math.round(n._textBlocksHeights.get(u,-1)/z.K_)}o-=s}return!(u>=l)&&void 0})),t.applyConfig({titleType:-1}),{layout:t,height:a}}}}},t.prototype._textLines=function(e,t){if(!this._article||!this._article.loaded())return 0;for(var n=0,i=t?0:this._article.StartBlockIdx||0;i0?n._layout({maxColumns:e,template:a[0],strict:r,cancellationToken:t}).then(s):e>=-1?n._layout({maxColumns:1-e,template:a[0],cancellationToken:t}).then(s):n._article.Annotation&&n._article.Blocks?(n._article.Blocks.unshift({Role:"annotation",Text:n._article.Annotation}),n._article.Annotation=null,n._textBlocksHeights.reset(),e=o,n._layout({maxColumns:e,template:a[0],strict:r,cancellationToken:t}).then(s)):q.Sl.empty};return n._layout({maxColumns:e,template:a[0],strict:r,cancellationToken:t}).then(s)})).finally((function(){return a.release()}))},t.prototype.renderSingleColumnLayout=function(e,t){var n=t.layout,i=t.height,r=0;n.renderer(this).config().titleType=-1,this._currentLayout=n,e?(r=e.height(),this._renderBlocks(n,e)):e=this._renderBlocks(n).head();var a=r%z.K_;a&&(r+=z.K_-a);var s=e.findAvailablePosition(z.K_,0,!0);if(!s)return G.A.log("render article: no position for line"),e;var u=s.top-r,c=0,l=Math.round(this._textBlocksHeights.get(c,-1)/z.K_),d=this._renderingState(e).text,h=(0,z.y6)(),f=this._article.getId(),p=0,m=n.articleElm().createChild("div").css({position:"absolute",width:"".concat(h,"px")}).addClass("col"),g=Math.floor(Math.min(s.height,i-u)/z.K_)*z.K_,v=0,y=s.top,_=[];for(delete this._lastRenderedTextBlock;g>=z.K_;){var b=this._renderBlock(m,c,p,g,-1),w=b.lines,C=b.height;d[c]={start:p,lines:w,outof:l};var A=new F.VJ(c,p,w,y,m);if(n.addTextBlock(0,A),_.push(A),y+=C,u+=C,v+=C,(l-=w)<=0){if(++c>=this._article.Blocks.length)break;p=0,l=Math.round(this._textBlocksHeights.get(c,-1)/z.K_)}else p+=w;g-=C}(cMath.round(i/z.K_)&&!u&&!l&&(p={disableArtLeadFormatting:!0},c=Math.round(C._textBlocksHeights.get(u,s,p)/z.K_));i>=z.K_;){var w=C._renderBlock(n,u,l,i,s,p),A=w.lines,I=w.height;b[u]={start:l,lines:A,outof:c};var S=new F.VJ(u,l,A,v,n);if(e.addTextBlock(g,S),_.push(S),v+=I,a+=I,(c-=A)<=0){if(++u>=m)break;p=null,l=0,c=Math.round(C._textBlocksHeights.get(u,s)/z.K_)}else l+=A;i-=I}var P=new $.G({elm:n.elm(),colspan:1,top:t.top,height:a,smartFlowItemId:h,type:$.n.Column,layout:e});if(y.addCell(P),(0,o.forEach)(_,(function(e){e.cell(P)})),u>=m)return"break"},C=this;try{for(var A=(t=void 0,(0,i.Ju)(_)),I=A.next();!I.done&&"break"!==w(I.value);I=A.next());}catch(e){t={error:e}}finally{try{I&&!I.done&&(n=A.return)&&n.call(A)}finally{if(t)throw t.error}}}}return r.reattach(),ur.height&&!h?(t.cfg={disableArtLeadFormatting:!0},n._textBlocksHeights.getAsync(h,d,t.cfg).then((function(e){return t.height=e,t}))):t})).then(t.rejectIfRequested).then((function(i){return e.isExpanded?n._textBlocksHeights.getAllAsync(d).then(t.rejectIfRequested).then((function(e){for(var t=[i],n=h+1;n=c||u>=f?e(o):n._textBlocksHeights.getAsync(u,d).then((function(e){return{idx:u,height:e}})).then(s)}};s(i)}))})),m=this._lock.lock();return Promise.all([p,s]).then((function(t){for(var r,o,s,c,l,h=(0,i.zs)(t,1)[0],p=n._renderBlocks(e),m=(0,z.y6)(),g=0,v=h[g],y=h.length,_=Math.round(v.height/z.K_),b=0,w=n._article.getId(),C=-1,A=p.head();g=z.K_;){var L=n._renderBlock(k,v.idx,b,E,d,v.cfg),V=L.lines,R=L.height;S[v.idx]={start:b,lines:V,outof:_};var H=new F.VJ(v.idx,b,V,D,k);if(e.addTextBlock(C,H),N.push(H),D+=R,M+=R,(_-=V)<=0){if(++g>=y)break;v=h[g],b=0,_=Math.round(v.height/z.K_)}else b+=V;E-=R}var B=new $.G({elm:k.elm(),colspan:1,top:T.top,height:M,smartFlowItemId:w,type:$.n.Column,layout:e});A.addCell(B);try{for(var O=(s=void 0,(0,i.Ju)(N)),j=O.next();!j.done;j=O.next())(H=j.value).cell(B)}catch(e){s={error:e}}finally{try{j&&!j.done&&(c=O.return)&&c.call(O)}finally{if(s)throw s.error}}if(g>=y)break}}catch(e){r={error:e}}finally{try{x&&!x.done&&(o=P.return)&&o.call(P)}finally{if(r)throw r.error}}}}return Jt.S.mutateAsync((function(){a.reattach(),v.idx0||e.hasMoreToShow()?l&&n._addEllipsis(l.elm()):(p=n._renderAuthors(e,p),n._renderTools(e,p,1===p.count()&&!e.isExpanded)?(p.forEach((function(e){e.state().expanded=!0})),p=function(e,t,n,r){var o;if(!n.headItem.state().expanded)return n;var a=function(e,t){var n,i;if(!(null===(n=null==e?void 0:e.Images)||void 0===n?void 0:n.length))return[];var r={};return null===(i=t.blockInstances())||void 0===i||i.forEach((function(e){e.parent.type()===de._.Image&&(r[e.id()]=!0)})),e.Images.filter((function(e){return!r[e.Id]&&!(!e.Url||e.Height<=0||e.Width<=0)}))}(e,t).filter((function(e){return z.E3/e.Height*100<=z.UO}));if(!a.length)return n;var s=[],u=0;n.forEach((function(e){1===(u=Math.max(u-1,e.colspan()))&&s.push(e)})),s.length>1&&--s.length;for(var c=a.length/s.length,l=s.map((function(){return Math.floor(c)})),d=s.map((function(e,t){return t})),h=a.length%s.length,f=d.length;h>0;--h,--f){var p=d[Math.floor(Math.random()*f)];l[p]++,o=(0,i.zs)([d[f-1],d[p]],2),d[p]=o[0],d[f-1]=o[1]}var m=0,g=n.headItem.section();for(h=0;h=i?u=a=(s=Math.floor(i/z.K_))*z.K_:(s=Math.round(c/z.K_),u=i-(a=Math.min((s+1)*z.K_,i))

    "),this._marker&&this._marker.idx===t?e.append(this._marker.block):e.append(Q.A.replace(this._textBlocksHeights.textBlockInnerHtml(t),this._article.Data)),e.append("

    ").checkpoint(a),e.render(),{lines:s,height:a}},t.prototype._addEllipsis=function(e){e.children("div[bidx]:last").css("position","relative").fastAppend(this._article.PotentiallyAllowedToRead?z.Gr:z.J4)},t.prototype._refreshRenderedView=function(){this._currentLayout&&this._article&&this._refreshReadmore()},t.prototype._refreshReadmore=function(){var e=this._currentLayout.articleElm().find(z.PP);e.length&&(this._article.PotentiallyAllowedToRead?e.removeClass(z.A7):e.addClass(z.A7))},t.prototype._renderingState=function(e){var t=e.state(),n=t.rendering;n||(t.rendering=n={});var i=n[this._article.Id];return i||(n[this._article.Id]=i={text:{}}),i},t.prototype._onArticleUpdated=function(){this._cache={},this._textBlocksHeights.reset(),this._refreshRenderedView()},t.prototype.dispose=function(){var e=this;this._lock.onUnlockedOnce((function(){delete e._cache,delete e._textBlocksHeights,e._currentLayout&&(e._currentLayout.dispose(),delete e._currentLayout),e._article.off("updated",e._onArticleUpdatedHandler),delete e._onArticleUpdatedHandler,e._article.off("dispose",sn),delete e._article}))},t.prototype.expand=function(e,t){if(e||(e=this._currentLayout),!e)return null;if(t){var n=e.colspan;e.toolsColumnAdded&&--n;var i=Math.min(n,z.Ps);e=this.layoutSync(i,Y[0],!1,void 0,void 0,!0)}for(var r,o,a=e.colspan,s=e.copy().expandForText(),u=this._expand(s,un,a),c=u.totalTextLinesCount()-u.textDistribution().availableLines;c>0;)s=s.expand(Math.ceil(c/z.Nw)),c=(u=this._expand(s,un,a)).totalTextLinesCount()-u.textDistribution().availableLines;return o=u,(r=e)&&o&&(o.toolsCommentAdded=r.toolsCommentAdded,o.toolsThumbnailAdded=r.toolsThumbnailAdded,o.toolsAdded=r.toolsAdded),u},t.prototype._expand=function(e,t,n){var r,a,s,u,c=this,l=e.blockInstances();if((0,o.isEmpty)(l))return null;var d={};(0,o.forEach)(l,(function(e){d[e.blockType]=e}));for(var h=e.map(),f=(0,o.find)(h.nodes,(function(e){return e.root})),p=[],m=new Xe.i;f;){if(f.type in d){var g=d[f.type].expand();if(!(0,o.isEmpty)(g)){try{for(var v=(r=void 0,(0,i.Ju)(g)),y=v.next();!y.done;y=v.next())y.value.measure(z.Ps,m)}catch(e){r={error:e}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(r)throw r.error}}p.push.apply(p,(0,i.fX)([],(0,i.zs)(g),!1))}}else{var _=h.blocks[f.type];if(_&&(0,o.isFunction)(_.instances)&&(g=_.instances(),!(0,o.isEmpty)(g))){try{for(var b=(s=void 0,(0,i.Ju)(g)),w=b.next();!w.done;w=b.next())w.value.measure(z.Ps,m)}catch(e){s={error:e}}finally{try{w&&!w.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}p.push.apply(p,(0,i.fX)([],(0,i.zs)(g),!1))}}var C=f.children;if((0,o.isEmpty)(C))break;f=(0,o.find)(C,(function(e){return e.type in d}))||C[0]}m.execute();var A=this._restoreInstances(this._processQueueWithTimeConstraint(e,(0,o.map)(p,(function(e){return c._instances2JSON([e])})),t,n));return A.isExpanded=!0,A},t.prototype._processQueueWithTimeConstraint=function(e,t,n,i){var r=(0,o.now)(),a={},s=new Array(t.length),u=new Array(t.length),c=1;(0,o.forEach)(t,(function(e,t){u[t]=0,s[t]=e[0],c*=e.length})),a[u.join(".")]=1;var l=(0,o.reduce)(this._addInstances(e,s,i),n,null);if(l&&!l.textDistribution().emptyColumnsCount)return l;(0,o.forEach)(t,(function(e,t){var n=e.length-1;u[t]=n,s[t]=e[n]})),a[u.join(".")]=1;var d=(0,o.reduce)(this._addInstances(e,s,i,!1),n,l);if(2===c||!d||d===l)return d;l=d;for(var h=2;(0,o.now)()-r<1e3;){(0,o.forEach)(t,(function(e,t){var n=Math.floor(Math.random()*e.length);u[t]=n,s[t]=e[n]}));var f=u.join(".");if(!(f in a)&&(a[f]=1,(l=(0,o.reduce)(this._addInstances(e,s,i),n,l))&&l!==d||++h>=c))return l}return l},t.prototype._addInstances=function(e,t,n,i){void 0===i&&(i=!0);var r=e;if(i){var a=(0,o.sum)(t,(function(e){return Math.ceil(e.height/z.K_)*e.colspan}));r=e.copy().expandForText(a)}return(0,o.transform)(t,(function(e,t){var r=e.layouts;r.length>50&&(r=r.sort((function(e,t){return e.compareTo(t)===t?1:-1})).slice(0,50));var a=(0,o.chain)(r).map((function(e){return e.copy().addBlockInstance(t,{expand:!i,columnsCountToPreserve:n})})).flatten().value();if((0,o.isEmpty)(a)){if(i)return e.layouts=[],!1}else e.layouts=a;return!0}),{layouts:[r]}).layouts},t.prototype._processQueue=function(e,t,n,i,r,a){var s=this;if(n>=t.length)return e;var u=(0,o.chain)(t[n]).map((function(t){if(r){var n=Math.ceil(t.height/z.K_)*t.colspan;return e.copy().expandForText(n).addBlockInstance(t,{expand:r,columnsCountToPreserve:a})}return e.copy().addBlockInstance(t)})).flatten().value().sort((function(e,t){return e.compareTo(t)===t?1:-1}));if(!u.length)return this._processQueue(e,t,n+1,i,r,a);var c=null;return(0,o.forEach)(u,(function(e){var o=e.totalTextLinesCount()-e.textDistribution().availableLines;o>0&&e.expand(Math.ceil(o/z.Nw));var u=s._processQueue(e,t,n+1,i,r,a);if(!u.textDistribution().emptyColumnsCount)return c=u,!1;c=i(c,u)})),c},t.prototype.dataItem=function(){return this._article},t.prototype.highlight=function(e){for(var t=this,n=e.articleColumnsCount(),i=this._article,a=0;a0&&!this._view.rightColumnsCount()){var e=this._view.columns().tail();if(e&&e.type()===d.zX.Misc){var t=e.prev();if(t&&t.isLast()&&!this._allowResetREOF)return}}this._correctColumnsCount(10)},_ensureItems:function(){var e=this._currentViewState.article();if(e){var t=this._view.globalDirection();if(t<0)for(var n=0,i=e;n<32&&i;++n,i=i.prev())i.isLoaded();else if(t>0){var r=!0;for(n=0,i=e;n<32&&i;++n){if(i.isLoaded(),!i.tokenized()){var o=i.group();if(o){var a=o.raw();a&&4!==a.GroupType&&(r=!1)}}if(!i.hasNext()&&!r)break;i=i.next()}}}},_showCallback:null,_isShowing:!1,_updateInterval:null,resetState:function(e){P.A.global.trigger("textviewCleared"),this._currentArticleHistoryToken=null,e&&(e.itemId&&(this._currentViewState.id(e.itemId).type(0),e.expanded&&(this._currentViewState.expandedArticleId(e.itemId),b.X.send(new w.U1({articleId:e.itemId})))),e.currentArticlePosition&&this._setMinCount(e.currentArticlePosition),this._currentArticleHistoryToken=e.articleHistoryToken)},show:function(e){var t=this;this._isVisible||this._disabled||(this._isVisible=!0,e&&(this._updatePreviewPanel=e.updatePreviewPanel,e.historyTokenType&&(this._currentHistoryTokenType=e.historyTokenType),this._currentArticleHistoryToken=e.articleHistoryToken,this._setMinCount(e.currentArticlePosition?e.currentArticlePosition:0),this._allowResetREOF=e.allowResetREOF,this._ignoreGroupHeader=e.ignoreGroupHeader,this._isShowing=!0,this._showCallback=(0,a.once)((function(){t._isShowing=!1,(0,a.isFunction)(e.callback)&&e.callback()})),this._updateInterval=e.updateInterval,A.Ay.loaded().then(this._toggleTranslationMessage.bind(this)),this._view.config(e),this._config.highlightPattern=e.query,this._articlesFeedManager.loadPromise.then((function(){var n=t._articlesFeedManager.getAnchorItem();if(!n&&e.bookmarkId&&(n=t._articlesFeedManager.items.find((function(t){return t.Data&&t.Data.BookmarkId===e.bookmarkId}))),n){var i={itemId:n.getId(),type:0};n.Type===s.p.article&&(i.expanded=!0),t._setCurrentViewState(i)}else t._setCurrentViewState(e)})),this._view.show()))},_setCurrentViewState:function(e){e.articleId&&e.viewName===r.lP.TopNews&&e.expanded?(this._currentViewState.expandedArticleId(e.articleId),b.X.send(new w.U1({articleId:e.itemId}))):e.articleId&&e.viewName===r.lP.TextView?(this._articlesFeedManager.mandatoryArticleId=e.articleId,this._currentViewState.id(e.articleId).jump(!0).type(0).expandedArticleId(e.articleId),b.X.send(new w.U1({articleId:e.itemId}))):e.page?this._currentViewState.page(e.page).type(2):e.itemId&&(this._currentViewState.id(e.itemId).type(e.type),e.expanded&&(this._currentViewState.expandedArticleId(e.itemId),b.X.send(new w.GM({articleId:e.itemId}))))},_onDataResetPromise:null,_onDataReset:function(){var e=this;!this._disabled&&this._isVisible&&(void 0!==this._preventExpandAnimation&&(this._preventExpandAnimation=!0),this._onDataResetPromise||(this._onDataResetPromise=f.busy.resetPromise,this._onDataResetPromise.then((function(){e._ndLoadingHandle=g.Ay.show(e._ndLoadingHandle),I.A.reset(),l.A.reset(),p.A.reset(),e._builder.reset(),e._view.reset(),(0,c.uW)().reset(),e._toggleTranslationMessage(),e._abortColumnsBuilding(),e._articlesFeedManager.onLoadOnce((function(e){e.highlights&&e.highlights.text&&(_.A.highlight(e.highlights.text),_.A.confirm())})),e._articlesFeedManager.load(e._currentArticleHistoryToken,e._minCount).finally(e._correctColumnsCount.bind(e,10)),e._onDataResetPromise=null}))))},hide:function(){return this._isVisible?(this._abortColumnsBuilding(),this._isVisible=!1,I.A.cleanup(),this._view.hide(),this._ndLoadingHandle=g.Ay.hide(this._ndLoadingHandle),this):this},_onArticlesLoaded:function(e){if(!this._disabled){if(e&&e.length)for(var t=0;tc&&(r.left=c-r.width),r.top=Math.round(v-r.height/2),r.toph&&(r.top=h-r.height),void E.D.show(r)}if(n&&(r=this._articleContext(t.x,t.y,t.columns)))return this._jump(r.article),t.handled=!0,!1}}},_onDoubleClick:function(e,t){if(!this._disabled&&t.columns&&!t.columns.isEmpty()&&t.columns.column.state().controller===this){switch(t.columns.column.type()){case d.zX.SectionHeader:case d.zX.Header:case d.zX.CategoryTail:case d.zX.Monitors:case d.zX.AdBlock:case d.zX.RecommendedOpinions:case d.zX.Replies:return}return this._readMore(t.x,t.y,t.columns),t.handled=!0,!1}},_onReadMore:function(e,t){this._disabled||t.columns.head().state().controller!==this||(b.X.send(new w.hm),this._readMore(t.x,t.y,t.columns))},_readMore:function(e,t,n){var i=this;if(!this._disabled&&!n.column.state().expanded&&n.column.layouts()){var r=n.head();if(n.column.layouts().length>1||n.column.state().isBundle){var a=this._view.scroller.elm.offset().top;t-=a;var s=n.column,u=s.cell(t);if(!u)return;var c=u.layout;if(c){var l=c.dataItem();this._currentViewState.article(l).type(0),this._currentViewState.expandedArticle(l),this._preventExpandAnimation=!1,l.access().then((function(){i._preventExpandAnimation?i._preventExpandAnimation=void 0:i._view.bundleToMultiColumnsAnimation().play(s,t).then((function(e){for(var t=0;ti+e.height()||(h=n.id)}));if(!h||r.state().expandedArticleId===h)return;var g=this._articlesFeedManager.getArticleById(h);this._currentViewState.article(g).type(0),this._currentViewState.expandedArticle(g),this._preventExpandAnimation=!1,g.access().then((function(){if(i._preventExpandAnimation)i._preventExpandAnimation=void 0;else{var e=v.S9.play(g,n.column,p);if(e){var t=e.state();t.controller=i,t.expandedArticleId=h}}})).catch((function(){i._preventExpandAnimation=void 0,k.A.log("_readMore -> failed to load article ".concat(h))}))}}else r.type()===d.zX.Header?(t-=this._view.scroller.elm.offset().top,v.sx.play(r,t).then((function(e){if(e&&e.newnext&&e.newnext.count())for(var t=e.newnext.head(),n=0;n failed to load article ".concat(a.Id)),Promise.reject(e)})).then((function(){return n._view.expandArticleAnimation().isActive?Promise.reject(new Error("Another animation is in progress.")):(i=o.expand()).renderAsync()})).then((function(s){return(r=s).forEach((function(e){var t=e.state();t.controller=n,t.expanded=!0})),n._currentViewState.expandedArticle(a),n._view.expandArticleAnimation().play(o,e,i,r,t)})).then((function(){u.o.current.textView.replaceColumns(e,r),e.dispose(),n._view.invalidate(!0)}))},_onContinuedFrom:function(e,t){var n=this,i=t.columns,r=i.head();if(!this._disabled&&r.state().controller===this){var o=r.layouts()[0];if(!o.config().fromStart)if(r.articlesCount()>1);else{var a=o.dataItem();this._currentViewState.article(a).type(0).expandedArticle(a),this._preventExpandAnimation=!1,a.access().then((function(){if(n._preventExpandAnimation)n._preventExpandAnimation=void 0;else{var e=o.expand(!0),t=e.render().forEach((function(e){var t=e.state();t.controller=n,t.expanded=!0}));n._currentViewState.expandedArticle(a),n._view.expandArticleAnimation().play(o,i,e,t).then((function(){u.o.current.textView.replaceColumns(i,t),i.dispose(),n._view.invalidate()}))}})).catch((function(){n._preventExpandAnimation=void 0,k.A.log("_readMore -> failed to load article")}))}}},_onContextMenuRequested:function(e,t){if(!this._disabled&&t.columns.head().state().controller===this)switch(t.columns.column.type()){case d.zX.SectionHeader:case d.zX.Header:case d.zX.ImagesHeadline:case d.zX.Monitors:case d.zX.Opinion:case d.zX.Profile:case d.zX.SocialInfo:case d.zX.AdBlock:case d.zX.Social:case d.zX.BookmarkPages:case d.zX.RecommendedOpinions:case d.zX.InitBlock:case d.zX.Replies:case d.zX.PromoSection:return;default:var n=this._articleContext(t.x,t.y,t.columns);if(!n)return;var i={controller:this,article:n.article,preview:{previewType:m.Ay.contextPreviewType.article}};this._contextMenuController?this._contextMenuController.context(i):this._contextMenuController=new y.A(x.A,i),this._contextMenuController.show({context:{left:n.left+this._view.scroller.left,top:n.top,width:n.width,height:n.height},position:{x:t.x,y:t.y,align:{y:o.nd.ui.menu.align.center,x:o.nd.ui.menu.align.center}}}),b.X.send(new w.cm)}},_onPinch:function(e,t){if(!this._disabled){var n=this._imageContext(t.x,t.y,t.columns);if(n)E.D.show(n);else if(n=this._articleContext(t.x,t.y,t.columns)){for(var i=0,r=[],o=0;o".concat(a,"

    ")),(i+=a.length)>1024)break}M.O.show(r.join(""))}}},_onGesturesEnd:function(){this._disabled||this._textSizeManager&&(this._textSizeManager.dispose(),delete this._textSizeManager)},_onGesturesStart:function(){if(!this._disabled){var e=new Date(this._gesturesStartTime.getTime()+this._updateInterval);(new Date).getTime()>e.getTime()&&this._clearData(),this._gesturesStartTime=new Date}},_columnHasTokenizedArticle:function(e){var t=e.layouts();if(!t)return!1;for(var n=t.length-1;n>=0;--n)if(t[n].dataItem().tokenized())return!0;return!1},_articleContext:function(e,t,n){var i=n.column;if(i.type()===d.zX.InitBlock)return null;if(i.type()===d.zX.SectionHeader||i.type()===d.zX.CoverBlock){for(var r=0,s=0,u=i.cells(),c=null,l=0;lr+s))return c=e.attr("aid"),!1})),!c);l++);return c?{x:e,y:t,left:i.left(),top:r,width:S.zt,height:s,article:this._articlesFeedManager.getArticleById(c)}:null}if(i.type()===d.zX.ImagesHeadline)return i.aid?{x:e,y:t,left:i.left(),top:0,width:S.zt,height:S.E3,article:this._articlesFeedManager.getArticleById(i.aid)}:null;var h=0,f=S.E3,p=null;if(i.articlesCount()>1){u=i.cells();var m=function(e){var n=null;return u[e].elm.find("article").each((function(){var e=o(this);if(h=e.offset().top,f=e.height(),!(th+f))return n=e.attr("aid"),!1})),n?(p=g._articlesFeedManager.getArticleById(n))?"break":void 0:"continue"},g=this;for(l=0;l1){t-=this._view.scroller.elm.offset().top;var v=i.cell(t);if(!v)return!1;var y=v.layout;if(!y)return!1;2===(p=y.dataItem()).Type?(f=v.height,h=v.top+this._view.scroller.elm.offset().top):(f=y._articleElm.height(),h=y.articleElm().find("header").offset().top)}else{if(i.layouts()&&0===i.layouts().length)return!1;for(p=i.layouts()[0].dataItem(),h=this._view.scroller.elm.offset().top;i;){var _=i.prev();if(!_)break;var b=_.layouts();if((0,a.isEmpty)(b)||b[0].dataItem()!==p)break;i=_}}return{x:e,y:t,left:i.left(),top:h,width:i.articleColumnsCount()*S.zt,height:f,article:p}},_imageContext:function(e,t,n){var i=null,r=n.head(),a=this._view.scroller.left;if(n.column.type()===d.zX.ImagesHeadline){for(var s=n.column;s&&!s.cells().length;)s=s.prev();r=s}for(;r;){for(var u=r.cells(),c=function(n){var s=u[n],c=s.left+a;return c+s.colspan*S.zta+s)){var u=n.width();return i={x:e,y:t,elm:n,left:c,top:a,width:u,height:s,src:n.attr("src"),url:n.attr("nd_url"),scale:parseInt(n.attr("nd_scale"),10),maxScaleUrl:n.attr("nd_maxScaleUrl"),type:r.type()},!1}})):s.elm.find("img").not('[noresize="true"]').each((function(){var n=o(this),a=n.offset().top,s=n.height();if(!(ta+s)){var u=n.width();return i={x:e,y:t,elm:n,left:c,top:a,width:u,height:s,src:n.attr("src"),url:n.attr("nd_url"),scale:parseInt(n.attr("nd_scale"),10),maxScaleUrl:n.attr("nd_maxScaleUrl"),type:r.type()},!1}})),i?"break":void 0)},l=u.length-1;l>=0&&"break"!==c(l);--l);if(i||r===n.column)break;r=r.next()}return i},_rebuild:function(){var e=this;this._isVisible&&(this._ndLoadingHandle=g.Ay.show(this._ndLoadingHandle),this._reset().then((function(){e._correctColumnsCount(10),e._view.enable()})))},_resetPromise:null,_reset:function(){var e=this;if(this._resetPromise)return this._resetPromise;var t=this._resetPromise=new Promise((function(t){var n=function(){e._view.isUpdateable()?(e._view.reset(),(0,c.uW)().reset(),e._builder.reset(),e._appendColumnsTask&&e._appendColumnsTask.abort(),e._prependColumnsTask&&e._prependColumnsTask.abort(),t()):setTimeout(n,10)};n()}));return t.then((function(){e._resetPromise=null})),t},_screensToBuild:8,screensToBuild:function(e){return arguments.length?(this._screensToBuild=e,this):this._screensToBuild},_initialScreensToBuild:1,initialScreensToBuild:function(e){return arguments.length?(this._initialScreensToBuild=e,this):this._initialScreensToBuild},_correctColumnsCountTimeoutID:0,_direction:0,_correctColumnsCountHandler:null,_appendColumnsTask:null,_prependColumnsTask:null,_correctColumnsCount:function(e){var t=this;if(this._isVisible&&!this._disabled){if(this._correctColumnsCountTimeoutID&&(clearTimeout(this._correctColumnsCountTimeoutID),this._correctColumnsCountTimeoutID=0),(0,a.isNumber)(e))return this._correctColumnsCountHandler||(this._correctColumnsCountHandler=this._correctColumnsCount.bind(this)),void(this._correctColumnsCountTimeoutID=setTimeout(this._correctColumnsCountHandler,e));if(S.Ps)if(!this._view.isUpdateable()||!A.Ay.isLoaded()||this._appendColumnsTask||this._prependColumnsTask||f.busy.isSet)this._correctColumnsCount(100);else{this._updatePagesPanel(10);var n,i,r,o=S.Ps*this._screensToBuild,s=1===S.Ps?3:S.Ps,u=this._view.columns(),c=u.count(),l=u.head(),h=u.tail();if(l&&l.type()===d.zX.Misc&&(l=l.next(),--c),h&&h.type()===d.zX.Misc&&(h=h.prev(),--c),!u.isEmpty()&&l&&h){if(n=this._view.leftColumnsCount(),i=this._view.rightColumnsCount(),this._isShowing)this._direction=0;else if(i<=0){if(h.isLast()&&c>S.Ps)return;this._direction=1}else if(n<=0){if(l.isFirst()&&c>S.Ps)return;this._direction=-1}}else n=i=this._direction=0;if((i<=0&&n>0||L&&this._view.scrollDirection()>0&&n>s)&&!this._isShowing&&c>(r=c-n+s)){for(var p=l,m=l,v=null;p&&c>r;){var y=p.next();(!y||y.columnIdx()<=0)&&(v=p),p=y,--c}v&&(l=v.next(),this._prependColumnsTask&&this._prependColumnsTask.abort(),this._view.removeColumns(new d.Sl(m,v)))}if((n<=0&&i>0||L&&this._view.scrollDirection()<0&&i>s)&&!this._isShowing&&c>(r=c-i+s)){for(p=h,m=null,v=h;p&&c>r;)p.columnIdx()<=0&&(m=p),p=p.prev(),--c;m&&(h=m.prev(),this._appendColumnsTask&&this._appendColumnsTask.abort(),this._view.removeColumns(new d.Sl(m,v)))}if(this._config.enableExpiredDataItemsRemoval&&this._articlesFeedManager.removeOldArticles(this._config.dataItemExpirationDuration||36e5),this._isShowing?(r=S.Ps*this._initialScreensToBuild+1,n>0&&(r+=n)):c>S.Ps?r=n<=0||i<=0?S.Ps+s+o:L&&c0&&(r+=n),i>0&&(r+=i)),this._articlesFeedManager.isEmpty())this._view.columns().isEmpty()&&(this.appendEndColumn(),this._view.invalidate()),this._ndLoadingHandle=g.Ay.hide(this._ndLoadingHandle),this._showCallback();else{var _=!1,b=[];if(this._allowResetREOF&&h&&h.isLast()&&(h.isLast(!1),this._articlesFeedManager.resetREOF()),this._view.scrollDirection()>=0&&c0){var P=(new Date).getTime(),x=this._prependColumnsTask=new N(this.columns4prepend(l,I));x.promise.then((function(e){e&&(x.aborted?e.dispose():(t._prependColumns(e),t._correctColumnsCount(Math.max(100,Math.round(1.5*((new Date).getTime()-P))))))}),a.noop).finally((function(){x.aborted&&(_=!0),t._prependColumnsTask=null})),b.push(x.promise.catch(a.noop))}}Promise.all(b).finally((function(){_||(t._view.columns().isEmpty()?(t.appendEndColumn(),t._view.invalidate(),t._ndLoadingHandle=g.Ay.hide(t._ndLoadingHandle),t._showCallback()):t._checkViewAfterUpdate())}))}this._checkViewAfterUpdate()}}},_appendColumns:function(e){if(this._view.isUpdateable()){var t=this._view.columns().tail(),n=!!t&&t.type()===d.zX.Misc;e?e.count()&&(n?this._view.prependColumns(t,e):this._view.appendColumns(e)):null===e&&(n&&this._view.removeColumns(1),(t=this._view.columns().tail())&&t.isLast(!0)),this._checkViewAfterUpdate()}else setTimeout(this._appendColumns.bind(this,e),100)},_prependColumns:function(e){if(this._view.isUpdateable()){var t=this._view.columns().head(),n=!!t&&t.type()===d.zX.Misc;e?e.count()&&(n?this._view.appendColumns(t,e,!0):this._view.prependColumns(e)):(n&&this._view.removeColumns(-1),(t=this._view.columns().head())&&t.isFirst(!0)),this._checkViewAfterUpdate()}else setTimeout(this._prependColumns.bind(this,e),100)},_checkViewAfterUpdate:function(){var e=this._view.columns(),t=e.head(),n=e.tail();if(t){if(t.type()===d.zX.Misc){var i=t.next();if(!i)return;i.isFirst()&&this._view.removeColumns(-1),t=i}else t.isFirst()||(this._view.prependLoadingColumn().state().controller=this);if(n.type()===d.zX.Misc){var r=n.prev();r.isLast()&&!n.isLast()?(this._view.removeColumns(1),this.appendEndColumn()):!r.isLast()&&n.isLast()&&(this._view.removeColumns(1),this._view.appendLoadingColumn(!0).state().controller=this),n=r}else n.isLast()?this.appendEndColumn():this._view.appendLoadingColumn(!0).state().controller=this;if(this._view.invalidate(),n&&n.isLast()){var o=this._view.scroller,s=this._view.viewport(),u=o.left,c=u-s.left,l=o.width+u-s.left-s.width;if(l<0&&c<0){var h=Math.max(l,c),f=this._view.columnByX(h+s.left);f?(this._view.moveTo(f),f.type()===d.zX.Misc&&this._correctColumnsCount(10)):this._view.scroll(-h,100)}}var p=0;(0,a.forEach)(this._view.visibleColumns(),(function(e){p+=e.width()})),(p>=this._view.viewport().width||t&&n&&t.isFirst()&&n.isLast())&&(this._ndLoadingHandle=g.Ay.hide(this._ndLoadingHandle),this._showCallback())}},columns4append:function(e,t){return(0,i.sH)(this,void 0,void 0,(function(){var n,r,o,u,c,l,d,h,f,p,m,g,v=this;return(0,i.YH)(this,(function(i){switch(i.label){case 0:if(!t||this._disabled)throw new Error("Invalid parameters or disabled.");return n={flag:0,ignoreGroupHeader:this._ignoreGroupHeader,issueIntroDisabled:this._config.issueIntroDisabled},[4,this._articlesFeedManager.loadPromise];case 1:if(i.sent(),this._appendColumnsTask.aborted)throw new Error("Aborted");if(r=null,e)for(o=e;o;o=o.prev())if((u=o.layouts())&&u.length){r=u[0].dataItem();break}if(c=this._currentViewState.article(),r||(r=c),r?(this._currentViewState.type()||(n.flag|=1),(this._currentViewState.jump()||r===this._currentViewState.expandedArticle())&&(this._currentViewState.type()||(n.expandedArticle=r),this._currentViewState.jump(!1))):(l=this._articlesFeedManager.getFirstArticle(),(d=this._currentViewState.expandedArticleId())&&!n.expandedArticle&&(l&&(0,a.isFunction)(l.dataType)&&l.dataType()===s.p.initBlock&&(0,a.isFunction)(l.tokenized)&&l.tokenized(!0),n.expandedArticle=this._articlesFeedManager.getArticleById(d)),r=l),!r)throw new Error("Not sure what article to start building from.");for(h=[r],f=r.nextItem;f;f=f.nextItem)h.push(f);m=0,i.label=2;case 2:if(!(m1){for(var s=r.cells(),u=[],c=0;c=0;--o)if(r[o]){var a=r[o].dataItem();n[a.Idx]||(n[a.Idx]=!0,t.push(a))}}return t.length?t:null},_findFirstArticle:function(){if(this._disabled)return null;var e=this._view.visibleColumns();if(!e)return null;for(var t=0;t=0;--i){var r=n[i].dataItem();if(r)return r}}return null},firstAvailableArticle:function(){return this._firstArticleByPredicate((function(e){return e&&e.Type===s.p.article&&e.Id}))},firstAvailableArticleToListen:function(){return this._firstArticleByPredicate((function(e){return e&&e.Type===s.p.article&&e.Id&&e.Issue}))},_firstArticleByPredicate:function(e){if(this._disabled)return null;var t=this._findFirstArticle();if(!t)return null;for(var n=t;n;n=n.next())if(e(n))return n;return null},_lastVisiblePages:null,_updatePagesPanelTimeoutID:0,_updatePagesPanel:function(e){if(this._updatePreviewPanel)if(this._updatePagesPanelTimeoutID&&(clearTimeout(this._updatePagesPanelTimeoutID),this._updatePagesPanelTimeoutID=0),(0,a.isNumber)(e))this._updatePagesPanelTimeoutID=setTimeout(this._updatePagesPanel.bind(this),e);else if(this._view.isUpdateable()){var t=this.visibleArticles();if(t){for(var n=null,i={},r=t.length-1;r>=0;--r){var s=t[r];i[s.Page.number]||(i[s.Page.number]=1,n?n.push(s.Page.number):n=[s.Page.number])}n&&(n.sort(),!o.nd.viewer.pages||this._lastVisiblePages&&n.join(",")===this._lastVisiblePages||(o.nd.viewer.pages.startActivePageValidation(),o.nd.viewer.pages.setActivePageNumbers(n),o.nd.viewer.pages.finishActivePageValidation())),this._lastVisiblePages=n?n.join(","):null}}else this._updatePagesPanel(100)},translate:function(e,t){this._disabled||e.translation(t.code(),this._onArticleTranslated.bind(this))},_onArticleTranslated:a.noop,scrollToTip:function(){for(var e=(this._articlesFeedManager.items||{}).tail();e&&!e.tokenized();){var t=e.prev();if(!t||t.tokenized())break;e=t}e&&this.jump(e.Id,!0)},contentAccessToken:function(e){return arguments.length?(this._contentAccessToken=e,e):this._contentAccessToken},dataFeedManager:function(){return this._articlesFeedManager},removeArticle:function(e){var t=this,n=this._articlesFeedManager.getArticleById(e);if(n){var i=this._view.visibleColumns();if(i&&i.length>0){var r=n.next();i[0].hasItem(n)&&r&&this._currentViewState.article(r).type(0)}}this._ndLoadingHandle=g.Ay.show(this._ndLoadingHandle),this._reset().then((function(){n&&t._articlesFeedManager.removeArticle(n),t._correctColumnsCount(10)}))},_abortColumnsBuilding:function(){this._appendColumnsTask&&this._appendColumnsTask.abort(),this._prependColumnsTask&&this._prependColumnsTask.abort(),this._builder.abort()}}),t.A=V},90333:function(e,t,n){"use strict";var i=n(58932),r=n(13981),o=n(24167),a=n(78698),s=n(10235),u=n(44260),c={},l=function(){function e(e,t){this._id=e,c[e]=this,t&&(this._name=t)}return e.prototype.id=function(){return this._id},e.prototype.name=function(){return this._name||u.Ay.val("TextView.Fonts.".concat(this._id.substr(0,1).toUpperCase()).concat(this._id.substr(1)))},e}(),d=null,h=null;function f(){for(var e=[],t=0;t1)for(var n=0;n0&&(a=r.filter(a,(function(e){return!r.some(t,(function(t){return-1!==t.indexOf(e.raw)}))})));var s=r.map(a,(function(e){return i._regexps[e]||(i._regexps[e]=function(e){return e=(e=(e=(0,o.Dp)(e)).replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")).replace(/\s+/g,"\\s+"),new RegExp("\\b".concat(e,"\\b"),"ig")}(e)),i._regexps[e]})),u=function(e,t,i){var o=e.replace(i,""),a=null,s=function(e,t){var n={index:t,length:e.length};return a?a.push(n):a=[n],r.repeat(" ",e.length)};o=o.replace(/<[^<>]*>/g,(function(e){return r.repeat(" ",e.length)}));for(var u=0;u{0}',topic:'{0}'},g=null,v=/"([^"]+)"|'([^']+)'|([^\s]+)/g;function y(e){return Array.isArray(e)?e:r.isEmpty(e)?null:e.split(v).map((function(e){return e?e.trim():null})).filter((function(e){return e&&e.length}))}var _={highlight:function(e){return c||(c=new d(m.search)),c.highlight(y(e))},confirm:function(){return c.confirm()},highlightTopic:function(e){l||(l=new d(m.topic));var t=y(e);return l.acceptStrings(t),l},confirmTopic:function(){return l.confirm()},resetHighlightTopic:function(){l=null},highlightSection:function(e,t){if(e&&t){var n=p[e];return n||(p[e]=n=new d(m.topic)),n.acceptStrings(y(t)),n}},confirmSection:function(e){if(e)return p[e].confirm()},replace:function(e,t){var n=e,o=[];c&&(n=c.replace(n),o=r.map(c.getStrings(),(function(e){return e.toLowerCase()})));var a=h.A.getActiveViewName();return a===i.lP.Monitors||a===i.lP.TextView?l&&(n=l.replace(n,o)):a===i.lP.TopNews&&t&&p[t.GroupName]&&(n=p[t.GroupName].replace(n,o)),n},flatten:function(e){if(g||(g=function(){var e,t=[];for(var n in m)m.hasOwnProperty(n)&&(e=(m[n].match(/<\w.+?>/i)||[])[0])&&t.push(e);return t}()),g.length){for(var t=[].slice.call(e.children,0),n=!1,i=0;i=0;--n)t[n]===e&&this.remove(n);return this},updateSourceItems:function(e){return r.observable(this._source).refresh(e||[]),this.reset()},setSource:function(e){return this._source&&r([this._source]).unbind("arrayChange",this._onDataChangedHandler),this._source=e,e&&r([e]).bind("arrayChange",this._onDataChangedHandler),this.reset().update()},onDataChanged:function(e,t){return t&&(this.sourceChanged(),this.reset().update()),!0},update:function(e){var t=this._getArray();if(e){var n=t.slice(this.items.length,t.length);this._items.insert(this.items.length,n)}else this._items.refresh(t);var i=this;return setTimeout((function(){i.changed(e||!1)}),0),this},reset:function(){return this._top=this.pageSize,this._maxItems=this._source.length,this},renderMore:function(){return this._top=0?1:-1;var o=r.getPathExp(t);return n>0?i.sort((function(e,t){var n=o(e),i=o(t);return"string"==typeof n&&"string"==typeof n?(n=n.toLowerCase(),i=i.toLowerCase(),n.localeCompare(i)):n==i?0:n>i?1:-1})):i.sort((function(e,t){var n=o(e),i=o(t);return"string"==typeof n&&"string"==typeof n?(n=n.toLowerCase(),i=i.toLowerCase(),-1*n.localeCompare(i)):n==i?0:n>i?-1:1})),i},_getArray:function(){var e=this.getSourceForRendering()||[];return e=this._applyFilter(e),e=this._applySort(e),this._applyPaging(e)}},r.nd.ObservableCollectionNew=function(e){this._source=e,this.items=o.observableArray()},r.nd.ObservableCollectionNew.prototype={changed:r.nd.delegate(),render:function(e){var t=this._source||[];t=this._applyFilter(t),this._maxItems=t.length,t=this._applySort(t),t=this._applyPaging(t),this.items(t);var n=this;return setTimeout((function(){n.changed(!!e)}),0),this},canRenderMore:function(){return this._top=0?1:-1;var o=r.getPathExp(t);return n>0?i.sort((function(e,t){var n=o(e),i=o(t);return"string"==typeof n&&"string"==typeof n?(n=n.toLowerCase(),i=i.toLowerCase(),n.localeCompare(i)):n==i?0:n>i?1:-1})):i.sort((function(e,t){var n=o(e),i=o(t);return"string"==typeof n&&"string"==typeof n?(n=n.toLowerCase(),i=i.toLowerCase(),-1*n.localeCompare(i)):n==i?0:n>i?-1:1})),i}},l.getTmplItemColl=function(e,t){return e&&e.data?e.data[t]:null},l.getTmplItemCollNew=function(e,t){return e?e[t]:null},function(){function e(e){r.nd.domContentUpdating(r(this))}r.nd.domContentUpdating=r.nd.delegate(!0),r.nd.domContentUpdated=r.nd.delegate(!0);var t,n=[];function i(){t=0;for(var e=0;e0&&"{"===n[0]?JSON.parse(n):{delayLoadImages:!1};var i,o=new u.A(this,{useTransition:!0,onBeforeScrollStart:function(e){e||(e=window.event);var t=e.target||e.srcElement;this.onStartDefaultPreserved=!1,{a:1,input:1,select:1,textarea:1,button:1}[t.nodeName.toLowerCase()]||r(t).attr("nd-text-select")?this.onStartDefaultPreserved=!0:e.preventDefault?e.preventDefault():e.returnValue=!1},onScrollStart:function(e){e||(e=window.event),e=r.nd.fixTouchEvent(e);this._screenX=e.screenX,this._screenY=e.screenY},onBeforeScrollEnd:function(e){e||(e=window.event);var t=e.target||e.srcElement;s(),e=r.nd.fixTouchEvent(e);if(this.moved){if(t&&"INPUT"==t.nodeName)return;e.preventDefault?e.preventDefault():e.returnValue=!1}else this._cancelNextClick=!1},onAnimationStart:function(e){s(e),d(this,e,"onAnimationStart")},onAnimationEnd:function(){d(this,null,"onAnimationEnd")},onScrollEnd:function(){s(),this.animating||d(this,null,"onScrollEnd")}});o._cfg=n,t.attr("resize-consumer","yes").resize((function(e){o.refresh(),d(o,null,"resize")})),t.find("img").filter((function(e){return!this.complete})).on("load.iscroll",(function(){i&&clearInterval(i),i=setInterval((function(){o.wrapper&&o.refresh(),clearInterval(i)}),3e3),r(this).off("load.iscroll")})),t.attr("content-changed-consumer","yes").on("contentChanged",(function(e){o.refresh(),d(o,null,"contentChanged")}));var a=c.A.create(t[0]).subscribe((function(e){o._cancelNextClick=!1,o._cancelNextClick||(Math.abs(e.screenX-o._screenX)>2||Math.abs(e.screenY-o._screenY)>2)&&(o._cancelNextClick=!0),o._cancelNextClick&&e.stopPropagation()}));t.data("_subscription",a),o.__self=t,t.data(e,o),t=null}function s(e){var t=o.__self;if(t){var n=-(e?e.top:o.y),i=o.wrapperH,r=n+i,a=o.scrollerH,s=r/a,u=(a-r)/i;a&&i&&t.triggerHandler("scrolled",{scroller:o,scrolled:s,belowBottomScreens:u})}}})),n=null}(n),JSON.parse(n.attr("nd-no-parent-update")||"false")||function(n){n.parents(t).each((function(){var t=r(this).data(e);if(t){if(t._ndAppendingChilds)return void(t._ndAppendingChilds=!1);t._nd_scrollTo=!0,t.scrollTo(0,0,0),t._nd_scrollTo=!1,t.refresh(),d(t,null,"checkParentScroller")}}))}(n)}));var i={};function o(e,t){var n=i[t];n||(n=new RegExp("[\\?&]"+t+"=([^]*)"),i[t]=n);var r=n.exec(e);return null==r?"":decodeURIComponent(r[1])}function a(e,t){return t&&t.retina&&(t.targetWidth?e.width=t.targetWidth:e.onload=n),e.src=t.src,e}function s(e){var t=o(e,"retina");if(t){var n=o(e=e.replace("&retina="+t,""),"targetWidth");n&&(e=e.replace("&targetWidth="+n,""))}return{src:e,retina:t,targetWidth:n}}function d(e,t,n,i){var o=e._cfg;if(o&&o.delayLoadImages&&!e._ndUpdating&&!t){if(!i){if(e._pendingForLoadImagesForScroller)return;return e._pendingForLoadImagesForScroller=!0,void requestAnimationFrame((function(){e._pendingForLoadImagesForScroller=!1,d(e,t,n,!0)}))}var a=r(e.scroller);if(!a.is(":visible"))return a.length=0,a=null,void(e=null);var s=-e.y,u=e.wrapperH,c=s+u,l=[];if(2*u>e.scrollerH){for(var f=0,p=(v=a.find('span[delay-active!="1"][delay-image-src]')).length;f

    s?m=Math.max(m-u,s):g=Math.min(g+u,c),s=m,c=g}var v,y=[];if(!t)for(f=0,p=(v=a.find('span[delay-active="1"]')).length;f

    c||b.bottom=s&&l.push(v[f])}!function(e){for(var t=0,n=e.length;t';else if(t)u.innerHTML='

    ';else if(n){var d=document.createElement("img");u.appendChild(a(d,l))}else l.targetWidth?u.innerHTML='':u.innerHTML='';u.setAttribute("delay-active","1")}e.length=0}l.loadImagesForScroller=d,l.findScrollerElm=function(n){return n.data(e)?n:(n.parents(t).each((function(){var t=r(this);if(t.data(e))return i=t,!1})),n=null,i);var i},l.findScroller=function(n){var i=n.data(e);return i||n.parents(t).each((function(){var t=r(this).data(e);if(t)return i=t,!1})),n=null,i}}(),i="tmplFilter",r.nd.domContentUpdating((function(e){})),r.nd.domContentUpdated((function(e){!function(e){e.find("[nd-tmpl-filter]").each((function(){var e=r(this);if(!e.data(i)){var t=JSON.parse(this.getAttribute("nd-tmpl-filter")),n=t.targetSelector,o=t.collName,a=t.fieldName,s=t.resetSelector;s&&r(s).on("click",(function(){e.val(""),p()}));var u,c,d=r(n).tmplItem();e.on("touchstart mousedown",(function(e){e.stopPropagation(),r(this).focus()})),e.on("keyup",(function(e){c&&clearTimeout(c);var t=e.keyCode;if(13==t||10==t)return r(this).blur(),p(),!1;c=setTimeout(f,500)})),e.data(i,"inited")}function h(){return u||(d=r(n).tmplItem(),(u=l.getTmplItemColl(d,o))&&u.sourceChanged((function(){e.val(""),this.resetFilter()}))),u}function f(){c=0,p()}function p(){c&&(clearTimeout(c),c=0),h()&&h().setFilter(e.val(),a)}}))}(e)})),function(){var e="tmplPagination",t="[nd-tmpl-pagination]";r.nd.domContentUpdating((function(n){!function(n){n.find(t).each((function(){var t=r(this),n=t.data(e);if(n){n();var i=t.data("_subscription");i&&i.unsubscribe()}}))}(n)})),r.nd.domContentUpdated((function(n){!function(n){n.find(t).each((function(){var t=r(this);if(!t.data(e)){var n=t.tmplItem();if(n){var i=JSON.parse(this.getAttribute("nd-tmpl-pagination")),o=i.pageSize,a=i.collName,s=l.findScrollerElm(t);if(s){var u,c=function(){return u||(n=t.tmplItem(),(u=l.getTmplItemColl(n,a))&&(u.setPageSize(o),u.changed((function(e){var t=l.findScroller(s);t&&(e||(t._nd_scrollTo=!0,t.scrollTo(0,0,0),t._nd_scrollTo=!1),t.refresh(),l.loadImagesForScroller(t))})))),u};c(),s.bind("scrolled",(function(n,i){if(t.data(e)&&i.belowBottomScreens<3){if(i.scroller._nd_scrollTo)return;var r=c();if(r)return i.scroller._ndAppendingChilds=!0,void r.renderMore(o)}}))}}t.data(e,(function(){s=null,t=null}))}}))}(n)}))}(),function(){var e="tmplPagination",t="[nd-tmpl-pagination-new]";r.nd.domContentUpdating((function(n){!function(n){n.find(t).each((function(){var t=r(this).data(e);t&&t()}))}(n)})),r.nd.domContentUpdated((function(n){!function(n){n.find(t).each((function(){var t=r(this);if(!t.data(e)){var n=o.dataFor(t[0]);if(n){var i=JSON.parse(this.getAttribute("nd-tmpl-pagination-new")),a=i.pageSize,s=i.collName,u=l.findScrollerElm(t);if(u){var c,d=function(){return c||(n=o.dataFor(t[0]),(c=l.getTmplItemCollNew(n,s))&&(c.setPageSize(a),c.changed((function(e){if(u){var t=l.findScroller(u);t&&(e||(t._nd_scrollTo=!0,t.scrollTo(0,0,0),t._nd_scrollTo=!1),t.refresh(),l.loadImagesForScroller(t))}})))),c};d(),u.on("scrolled",(function(n,i){if(t.data(e)&&i.belowBottomScreens<3){if(i.scroller._nd_scrollTo)return;var r=d();if(r)return i.scroller._ndAppendingChilds=!0,void r.renderMore(a)}}))}}t.data(e,(function(){u&&(u.off("scrolled"),u=null),t=null}))}}))}(n)}))}()},83449:function(e,t,n){"use strict";n.d(t,{n:function(){return o}});var i=n(27189),r=n(60588);function o(e){return i.A.getAsync("snippetRenderer.apiUrl").then((function(t){return(0,r.nO)({pageSetId:e,baseUrl:t})}))}},8021:function(e,t,n){"use strict";n.d(t,{L2:function(){return y},Lo:function(){return f},P2:function(){return h},w6:function(){return g},xm:function(){return v}}),n(83449);var i=n(69463),r=n(1766),o=n.n(r),a=n(1435),s=n(53477),u=n(36945),c=n(44834),l=n(13981),d={create:1,update:2,delete:3},h=new i.B,f=h.asObservable(),p=(0,a.J)({expire:3e5});function m(){p.clear()}function g(e){var t=e.issue,n=e.pages;if(!t)return Promise.reject("issue not specified");if(o()(n))return Promise.reject("pages array is empty");var i={issue:t,pages:n};return(0,s.w6)(i).then((function(e){return h.next({event:d.create,data:i}),m(),e}))}function v(e,t){return e?o()(t)?Promise.reject("pages array is empty"):l.bX.runSaga((0,c.T1)(u.Sg,e,t)).toPromise().then((function(n){return h.next({event:d.update,data:{pageSetId:e,pages:t}}),m(),n})):Promise.reject("pageSetId not specified")}function y(e){return e?l.bX.runSaga((0,c.T1)(u.lN,e)).toPromise().then((function(){m(),h.next({event:d.delete,data:{pageSetId:e}})})):Promise.reject("contentId not specified")}},20680:function(e,t,n){"use strict";n.r(t),n.d(t,{alertError:function(){return f},logAndAlertError:function(){return h},logError:function(){return d}});var i=n(13302),r=n(46977),o=n(44260),a=n(16213),s=n(98177);function u(e){var t=e.error,n=e.message;return t.resourceKey?o.Ay.valAsync(t.resourceKey).then((function(e){return{error:t,message:e||n}})).catch((function(e){return a.A.error(e),Promise.reject(new Error(e))})):Promise.resolve({error:t,message:n})}function c(e){var t=e.message;return new Promise((function(e){var n=(0,r.A)();n.onClosed((function(){e()})),n.show(t)}))}function l(e){var t=void 0===e?{}:e,n=t.log,r=void 0===n||n,o=t.alert,l=[];return void 0!==o&&o&&(l.push(u),l.push(c)),function(e){return new Promise((function(t,n){if(void 0!==e){var o=function(e){if(null==e)return new Error("Unexpected error");if((0,i.isString)(e))return new Error(e);if(!(0,i.isObject)(e))throw new TypeError("Error has to be an object");return e instanceof Error||!("status"in e)||!("responseText"in e)?e:new s.A({status:e.status,responseText:e.responseText,responseJSON:e.responseJSON})}(e);r&&a.A.error(e),l.reduce((function(e,t){return e.then(t)}),Promise.resolve({error:o,message:o.message})).then((function(){n(o)}))}else n(e)}))}}var d=l(),h=l({alert:!0}),f=l({alert:!0,log:!1})},98177:function(e,t,n){"use strict";var i=n(58932),r=function(e){function t(t){var n=t.status,i=t.responseText,r=t.responseJSON,o=void 0===r?null:r,a=this,s=o&&o.message||i||"",u=o&&o.resourceKey;return(a=e.call(this,s,u,null)||this).status=n,a.responseText=i,a.responseJSON=o,a}return(0,i.C6)(t,e),t}(n(89993).A);t.A=r},89993:function(e,t,n){"use strict";var i=n(58932),r=n(13302),o=function(e){function t(t,n,i){var o=this;if(!(0,r.isString)(t))throw new TypeError("Exception message has to be a string.");return(o=e.call(this,t)||this).resourceKey=n,o.error=i,o}return(0,i.C6)(t,e),t}(Error);t.A=o},3993:function(e,t,n){"use strict";n.d(t,{_N:function(){return a},eB:function(){return o},m1:function(){return s}});var i=n(27189),r="v7.Client.Dialogs.Signin";function o(){return i.A.get("ui.SignIn.ExternalSystems")||[]}function a(){var e=i.A.get("ui.SignIn.customTemplate");return e?"".concat(r,".").concat(e):r}function s(){return i.A.get("Registration.SocialNetworkSignInAllowed",!1)}},92336:function(e,t,n){"use strict";n.d(t,{A:function(){return H}});var i=n(58932),r=n(41349),o=n.n(r),a=n(96543),s=n(34132),u=function(e){return{name:e.SponsorName,id:e.SponsorId,tags:e.SponsorTags.map((function(e){return e.Name.toLowerCase()})),isInternal:e.IsInternal,industry:e.Industry,isEmbeddedModeEnabled:e.IsEmbeddedModeEnabled,isNotificationEnabled:e.IsNotificationEnabled,hideRadiantPeriodTimer:e.HideRadiantPeriodTimer,isHotspotEnabled:e.IsHotspotEnabled,isGeoLocationValidationEnabled:e.IsGeoLocationValidationEnabled,notifications:e.Notifications?{broughtBy:e.Notifications.BroughtBy,complimentaryAccess:e.Notifications.ComplimentaryAccess,featuredCarouselTitle:e.Notifications.FeaturedCarouselTitle}:void 0,radiantPeriod:e.RadiantPeriod?{startDate:new Date(e.RadiantPeriod.StartDate),endDate:new Date(e.RadiantPeriod.EndDate)}:void 0,status:e.Status,commands:e.Commands}},c=n(58735),l=n(13981),d=n(78698),h=n(80835),f=n(33730),p=n(13302),m=n(54387),g=n(36106),v=n(65726),y=n(15397),_=n(90185),b=n(7368),w=n(65678),C=n(13384),A=n(45235),I=n(61445),S=n(47027),P=n(44260),x=n(46977),T=n(11261),k=(n(67650),n(84901)),E=n(78521),M=160,D=function(){function e(e,t,n){var i,r,o=this;this.templateContent=e,this._dialog=t;var a=n.publications,s=n.sponsor,u=n.radiantInfo,c=n.issuesInfo;if(this.featuredTitles=[],this.sponsorName=s.name,u){var d=new Date(u.RadiantPeriod.Start),h=new Date(u.RadiantPeriod.End),f=new Date;if(this.hasFreeAccess=!s.hideRadiantPeriodTimer&&d<=f&&h>f,this.hasFreeAccess){var w=(0,E.Us)(f,h);this.freeAccessTime=P.Ay.format("Sponsorship.Dialogs.ComplimentaryAccess.Time",(0,E.Us)(f,h)),this.complimentaryAccessMessage=(null===(i=s.notifications)||void 0===i?void 0:i.complimentaryAccess)?(0,A.GP)(s.notifications.complimentaryAccess,w):"".concat(P.Ay.val("Sponsorship.Dialogs.ComplimentaryAccess.Header")," ").concat(P.Ay.format("Sponsorship.Dialogs.ComplimentaryAccess.Time",w)),(null===(r=s.notifications)||void 0===r?void 0:r.complimentaryAccess)||(this.complimentaryAccessMessage1stPart=P.Ay.val("Sponsorship.Dialogs.ComplimentaryAccess.Header"),this.complimentaryAccessMessage2ndPart=P.Ay.format("Sponsorship.Dialogs.ComplimentaryAccess.Time",w))}u.RadiantPeriod&&(this.radiantPeriod={start:d,startStr:(0,C.yJ)(d,"MMMM d, yyyy"),end:h,endStr:(0,C.yJ)(h,"MMMM d, yyyy")})}if(c&&(this.issuesRemaining=P.Ay.format("Sponsorship.Dialogs.ComplimentaryAccess.IssuesLeft",c.Issues.Remaining)||"".concat(c.Issues.Remaining," issues remaining")),(0,y.Ct)(v.p,!0)){var I=n.documents;if(this.hasDocuments=I&&I.length>0,this.hasDocuments){var S=(0,p.chain)(I).map((function(e,t){return{goToTitle:function(){o.close(),(0,l.JD)((0,m.Ew)({listPosition:t,source:g.V.WelcomeMessage,label:e.title})),T.A.showDocument(e.Id)},imgUrl:(0,_.V)(e.Thumbnail.ImageId,{width:M}),scaledHeight:"",scaledWidth:M}})).value();this.featuredTitles=S}}if(this.hasFeaturedTitles=a.length>0,this.hasFeaturedTitles){var x=a.map((function(e){return{goToTitle:function(){o.close(),T.A.showIssueDetails({issue:e.latestIssue.key,country:e.countrySlug,newspaper:e.slug})},imgUrl:(0,b.Fv)({issue:e.latestIssue.key},M,1,!0),scaledHeight:"",scaledWidth:M}}));this.featuredTitles=this.featuredTitles.concat(x)}}return e.prototype.close=function(){this._dialog.hide()},e.prototype.activate=function(){(0,l.JD)((0,I.c0)({enabled:!0})),this._dialog.hide()},e.prototype.selectTitle=function(){this._dialog.hide(),k.A.goView(w.lP.StoreHub,{catalogView:w.$r.Catalog})},e}(),N=function(e,t){return(0,i.sH)(void 0,void 0,void 0,(function(){var n,r,o;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return e.isNotificationEnabled?t.Params.FeaturedTitles?[4,(0,S.yC)(t.Params.FeaturedTitles)]:[3,2]:[2];case 1:return n=i.sent(),[3,3];case 2:n=[],i.label=3;case 3:return r=n.reduce((function(e,t){return e[t.cid]=t,e}),{}),o=t.Params.FeaturedTitles.map((function(e){return r[e]})).filter((function(e){return e})),[2,new Promise((function(n){var i=(0,p.extend)({},{sponsor:e},{radiantInfo:t.Params.RadiantInfo,issuesInfo:t.Params.IssuesInfo,documents:t.Params.Documents,publications:o}),r=(0,x.A)(),a=new D(t.Data.Data,r,i);r.onClosed((function(){return n()})),r.show(a)}))]}}))}))},L=function(e){return(0,i.sH)(void 0,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){return e&&e.Data&&e.Data.Data?[2,(0,x.A)().show(e.Data.Data)]:[2]}))}))},V=n(35429),R="sponsorshipStateChanged",H=new(function(){function e(){var e=this;this.loadSponsorState=function(){return(0,i.sH)(e,void 0,void 0,(function(){var e,t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,this.loadMappedCurrentSponsor()];case 1:return(e=i.sent())||(t=!!(null===(n=this._sponsor)||void 0===n?void 0:n.status),this.off(t)),this._sponsor=e,[2,this._sponsor]}}))}))},this.loadMappedCurrentSponsor=function(){return(0,i.sH)(e,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,s.M_)()];case 1:return[2,(e=t.sent())?u(e):null]}}))}))},this._sponsor=void 0,this._isInIntermediateState=!1,this.reloadSponsorAndExecuteCommands().then((function(){return c.bind("tokenUpdated",(function(){return e.reloadSponsorAndExecuteCommands()}))}))}return e.prototype.init=function(e){var t;return e&&e.Sponsor?(null===(t=this._sponsor)||void 0===t?void 0:t.status)!==e.Sponsor.Status?this.changeSponsorState():void 0:this._sponsor?this.changeSponsorState():void 0},e.prototype.onSponsorshipStateChanged=function(e){a.A.bind(this,R,null,e)},e.prototype.getSponsor=function(){return this._sponsor},e.prototype.reloadSponsorAndExecuteCommands=function(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,this.changeSponsorState()];case 1:return e.sent(),[4,this.executeCurrentCommands(!1)];case 2:return e.sent(),[2]}}))}))},e.prototype.executeCurrentCommands=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return e&&(null===(t=this._sponsor)||void 0===t?void 0:t.commands)?[4,this.changeSponsorState(!0)]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.execCommands(null===(n=this._sponsor)||void 0===n?void 0:n.commands),[2]}}))}))},e.prototype.off=function(e){window.localStorage.removeItem("sponsorshipstatus"),this._sponsor=void 0,e&&a.A.trigger(R,this)},e.prototype.changeSponsorState=function(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return this._isInIntermediateState?[2]:(this._isInIntermediateState=!0,t=null===(r=this._sponsor)||void 0===r?void 0:r.status,e?[4,c.updateBearerToken()]:[3,2]);case 1:i.sent(),i.label=2;case 2:return[4,this.loadSponsorState()];case 3:return n=i.sent(),t!==(null==n?void 0:n.status)&&a.A.trigger(R,this),this._isInIntermediateState=!1,[2]}}))}))},e.prototype.execCommands=function(e){var t=this,n=(0,l.Lt)(d.nw);if(e&&n!==h.Z.Pervasive&&!(0,l.Lt)(f.Io).length){var r=new V.T;o()(e,(function(e){return(0,i.sH)(t,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){switch(t.label){case 0:switch(e.Name){case"Alert":return[3,1];case"HtmlDialog":return[3,3]}return[3,5];case 1:return[4,r.enqueue(L(e))];case 2:case 4:return t.sent(),[3,6];case 3:return[4,r.enqueue(N(this._sponsor,e))];case 5:return[3,6];case 6:return[2]}}))}))}))}},e}())},98346:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var i=n(58932),r=n(3978),o=n(12010),a=n(13302),s=n(75676),u=n(96587),c=n(55683),l=function(e){function t(t){var n=t.dialog,i=t.behaviourCase,r=e.call(this,{properties:i.properties,actions:i.actions.filter((function(e){return!(0,a.startsWith)(e.name,"$")}))})||this;return r.$actions=(0,a.reduce)(i.actions,(function(e,t){return(0,a.startsWith)(t.name,"$")&&(e[t.name.substr(1)]=new s.A(t)),e}),{}),r._dialog=n,r}return(0,i.C6)(t,e),t.prototype.$action=function(e){var t=this.$actions[e];if(void 0===t)throw new Error("action ".concat(e," is not defined"));this.action(t)},t.prototype.close=function(){this._dialog.hide(c.d.Cancel)},t.prototype.action=function(e){var t=this;Promise.resolve(e.execute()).then((function(){return t._dialog.hide(c.d.Ok)})).catch((function(e){return t._dialog.hide(c.d.Unknown,{error:e})}))},t}((function(e){var t=e.properties,n=e.actions;this.properties=(0,a.assign)({},t),this.actions=o.observableArray((0,a.map)(n,(function(e){return new s.A(e)})))})),d={show:function(e){return new Promise((function(t,n){(0,r.A)(e,r.p.SUBSCRIPTION_NOT_VALID).then((function(i){null==i&&n(new Error("".concat(r.p.SUBSCRIPTION_NOT_VALID," case not configured for ").concat(e))),null==i.templateId&&n(new Error("template not configured for ".concat(r.p.SUBSCRIPTION_NOT_VALID," of ").concat(e," profile")));var o=u.default.getParent(),a=u.default.createInstance(o),s=new l({dialog:a,behaviourCase:i}),d={templateName:i.templateId,model:s,name:"InvalidSubscriptionDialog"};a.onHide((function(e,i){i&&i.status===c.d.Ok?t(!0):n(i&&i.error?i.error:void 0)})),a.onRestore((function(){return a.resize()})),a.show(d)})).catch(n)}))}}},3978:function(e,t,n){"use strict";n.d(t,{A:function(){return u},p:function(){return s}});var i=n(45235),r=n(82230),o="subscriptions/behaviourprofiles",a={},s=Object.freeze({SUBSCRIPTION_NOT_VALID:"SubscriptionNotValid",MANAGE_SUBSCRIPTION:"ManageSubscription"});function u(e,t){if((0,i.gP)(e))throw new Error("profileName required");if((0,i.gP)(t))throw new Error("behaviourCase required");var n="".concat(e,"-").concat(t);return void 0!==a[n]?Promise.resolve(a[n]):r.A.get(o,"".concat(e,"/cases/").concat(t)).then((function(e){return a[n]=e,e}))}},75676:function(e,t,n){"use strict";n.d(t,{A:function(){return c}});var i=n(58932),r=n(13302),o=n(57351),a=n(1943),s=function(e){function t(t,n){var i=e.call(this)||this;return i._action=t,i._predefinedContext=n,i._buildContext=i._buildContext.bind(i),i.available=i.available.bind(i),i.enabled=i.enabled.bind(i),i.activate=i.activate.bind(i),i}return(0,i.C6)(t,e),t.prototype._buildContext=function(e){return(0,r.assign)({},this._predefinedContext,e)},t.prototype.available=function(e){return this._action.available(this._buildContext(e))},t.prototype.enabled=function(e){return this._action.enabled(this._buildContext(e))},t.prototype.activate=function(e){return this._action.activate(this._buildContext(e))},t}(o.A),u=function(){function e(e){var t=e.name,n=e.title,i=e.decoration,o=e.clientAction,u=e.params;this.name=t,this.title=n,this.decoration=i,this._action=function(e,t){var n=a.A[e];if(void 0===n)throw new Error("action '".concat(e,"' not supported"));if(null==t)return n;if(!(0,r.isObject)(t))throw new Error("unexpected type of action params '".concat(t,"' for action '").concat(e,"'. Object expected."));return new s(n,t)}(o,u)}return e.prototype.execute=function(e){return this._action.activate(e)},e}(),c=u},70953:function(e,t,n){"use strict";var i=n(69895);t.A=Object.freeze({base:i._.Base,ad:i._.Ad,annotation:i._.Annotation,comments:i._.Comments,continuedFromLink:i._.ContinuedFromLink,image:i._.Image,relatedAd:i._.RelatedAd,related:i._.Related,fullTitle:i._.FullTitle,title:i._.Title,subtitle:i._.Subtitle,tools:i._.Tools,video:i._.Video,text:i._.Text,translationBar:i._.TranslationBar})},60738:function(e,t,n){"use strict";n.r(t),n.d(t,{editTopicDialog:function(){return F}});var i,r=n(58932),o=n(88135),a=n(12010),s=n(68483),u=n(12993),c=n(47027),l=n(44260),d=n(55683),h=n(96587),f=n(87266),p=n(30657),m=((i={})[p.aZ.All]="Dialogs.AdvancedSearch.Anywhere",i[p.aZ.Headline]="Dialogs.AdvancedSearch.InHeadline",i[p.aZ.Body]="Dialogs.AdvancedSearch.InBody",i);function g(e){return l.Ay.val(m[e])}var v,y,_=function(e,t,n){this.id=e,this.displayName=t,this.isSelected=(0,a.observable)(n)},b=function(){function e(e){var t=e.dialog,n=e.location;this.dialog=t,n=n||f.l.DefaultLocation,this.locations=[p.aZ.Headline,p.aZ.Body].map((function(e){return new _(e,g(e),n===p.aZ.All||e===n)}))}return e.prototype.back=function(){this.save()},e.prototype.save=function(){var e=this.locations.filter((function(e){return e.isSelected()}));this.dialog.hide(d.d.Ok,{location:e.length===this.locations.length?p.aZ.All:e.filter((function(e){return e.isSelected()}))[0].id}),this.dialog=null},e.prototype.toggleSelection=function(e){var t=e.isSelected();t?this.locations.filter((function(t){return t.id!==e.id&&t.isSelected()})).length>0&&e.isSelected(!t):e.isSelected(!t)},e}(),w=function(){function e(){}return e.prototype.show=function(e){var t=void 0===e?{parentDialog:null,location:null}:e,n=t.parentDialog,i=t.location;return new Promise((function(e){var t=h.default.createInstance(n),r=new b({dialog:t,location:i});t.onHide((function(t,n){e(n)})),t.show({templateName:"v7.Client.Dialogs.ResultsLocated",model:r,preventClosingOnClickOutside:!0})}))},e}(),C=new w,A=n(13302);function I(e){return(0,r.sH)(this,void 0,void 0,(function(){return(0,r.YH)(this,(function(t){switch(t.label){case 0:return[4,y?Promise.resolve(y):(0,c.X6)().then((function(e){return y=(0,A.reduce)(e,(function(e,t){return e[t.name]=t.displayName,e}),{})}))];case 1:return[2,t.sent()[e]]}}))}))}function S(e){return(0,r.sH)(this,void 0,void 0,(function(){var t;return(0,r.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,c.jW)(e)];case 1:return[2,null==(t=n.sent())?void 0:t.name]}}))}))}var P=function(){function e(e){void 0===e&&(e={});var t=this;this.id=a.observable(e.id),this.topicTypeId=a.observable(e.topicTypeId||1),this.searchQuery=a.observable(e.searchQuery),this.searchAuthor=a.observable(e.searchAuthor),this.searchIn=a.observable(e.searchIn||"ALL"),this.languages=a.observableArray(e.languages),this.countries=a.observableArray(e.countries),this.newspapers=a.observableArray(e.newspapers),this.contentCount=a.observable(e.contentCount),this.searchQueryFocus=a.observable(!0),this.searchAuthorFocus=a.observable(!0),this.searchTerm=a.pureComputed((function(){var e=t.searchQuery(),n=t.searchAuthor();return e?Promise.resolve(e):n?l.Ay.valAsync("Topics.SearchByAuthor","%author%").then((function(e){return e.replace("%author%",n)})):l.Ay.valAsync("NotAvailable","N/A")})).extend({async:!0}),this.searchAuthorText=a.pureComputed((function(){return t.searchQuery()?t.searchAuthor():""})),this.searchInText=a.pureComputed((function(){var e=t.searchIn();return"ALL"===e?"":g(e)})),this.searchInLabel=a.pureComputed((function(){return g(t.searchIn())})),this.languageText=a.pureComputed((function(){var e,n=t.languages();return 0===n.length?Promise.resolve(""):1===n.length?(e=n[0],(v?Promise.resolve(v):(0,c.kG)().then((function(e){return v=(0,A.reduce)(e,(function(e,t){return e[t.iso]=t.displayName,e}),{})}))).then((function(t){return t[e]}))):l.Ay.valAsync("MyTopicsBar.Languages").then((function(e){return"".concat(n.length," ").concat(e)}))})).extend({async:!0}),this.newspaperText=a.pureComputed((function(){return(0,r.sH)(t,void 0,void 0,(function(){var e,t,n;return(0,r.YH)(this,(function(i){switch(i.label){case 0:return e=this.countries(),t=this.newspapers(),0!==e.length||0!==t.length?[3,1]:[2,""];case 1:return 1!==e.length||0!==t.length?[3,3]:[4,I(e[0])];case 2:case 4:return[2,i.sent()];case 3:return 0!==e.length||1!==t.length?[3,5]:[4,S(t[0])];case 5:return n=[],e.length&&n.push("".concat(e.length," ").concat(l.Ay.val("MyTopicsBar.Countries"))),t.length&&n.push("".concat(t.length," ").concat(l.Ay.val("MyTopicsBar.Titles"))),[2,n.join(", ")]}}))}))})).extend({async:!0}),this.showSimilar=a.pureComputed({read:function(){return 1===this.topicTypeId()},write:function(e){this.topicTypeId(e?1:2)},owner:this}),this.showSimilarText=a.computed((function(){return t.showSimilar()?l.Ay.val("Topics.TopStories"):""})),this.searchTermValid=a.pureComputed((function(){return t.searchQuery()||t.searchAuthor()})).extend({required:!0,trackDirtyState:!0}),this.isValid=this.searchTermValid}return e.prototype.resetSearchQuery=function(){this.searchQuery("")},e.prototype.resetSearchAuthor=function(){this.searchAuthor("")},e.prototype.toDto=function(){return{id:this.id(),topicTypeId:this.topicTypeId(),searchQuery:this.searchQuery(),searchAuthor:this.searchAuthor(),searchTerm:this.searchTerm(),searchIn:this.searchIn(),languages:this.languages(),countries:this.countries(),newspapers:this.newspapers()}},e}(),x=P,T=n(46977),k=n(94340),E=n(34109),M=n(20680),D=n(6714),N=n(46191),L=n(86699),V=n(72167),R=function(){function e(e){var t=e.dialog,n=e.topic,i=void 0===n?{}:n;this.dialog=t,this.dialogTitle=l.Ay.val(i.id?"Topics.EditTopic":"Topics.AddTopic"),this.topic=new x(i),this.isValid=this.topic.isValid,this.inputFocus=a.observable(!0),this.titleSelection=new E.V,this.titleSelection.fromCollections({titles:this.topic.newspapers(),countries:this.topic.countries()})}return e.prototype.cancel=function(){this.dialog.hide(d.d.Cancel),this.dialog=null},e.prototype.save=function(){return(0,r.sH)(this,void 0,void 0,(function(){var e,t,n,i;return(0,r.YH)(this,(function(r){switch(r.label){case 0:if(!(0,s.validate)(this.topic))return[2];if(L.A.isLogin())return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,V.default.signIn()];case 2:return r.sent(),L.A.isLogin()?[3,4]:[2];case 3:return(null==(e=r.sent())?void 0:e.userCancelled)?[2]:(ndLogger.error(e),[3,4]);case 4:k.A.show(),r.label=5;case 5:return r.trys.push([5,7,8,9]),t=this.topic.toDto(),[4,u.V.save(t)];case 6:return n=r.sent(),this.dialog.hide(d.d.Ok,{topic:n}),[3,9];case 7:return i=r.sent(),(0,M.logAndAlertError)(i),[3,9];case 8:return k.A.hide(),[7];case 9:return[2]}}))}))},e.prototype.showTitles=function(){var e=this;this.dialog.suspend();var t={},n=this.titleSelection.getCollections();n.titles.forEach((function(e,n){t[n]=(0,N.TP)(e,void 0,void 0)}));var i={newspapers:Object.values(t),countries:n.countries};(0,D.G)({initialSelections:i,useTabSwitcher:!1}).then((function(t){t.cancelled||(e.topic.countries(t.data.countries.map((function(e){return e.id}))),e.topic.newspapers(t.data.newspapers.map((function(e){return e.cid}))),e.titleSelection.fromCollections({titles:e.topic.newspapers(),countries:e.topic.countries()})),e.dialog.resume()}))},e.prototype.showLanguages=function(){var e=this;this.dialog.suspend();var t=this.topic.languages();(0,o.o)({initialSelections:t}).then((function(t){var n;t.cancelled||e.topic.languages(((null===(n=t.data)||void 0===n?void 0:n.selectedLanguages)||[]).map((function(e){return e.iso}))),e.dialog.resume()}))},e.prototype.showSearchLocations=function(){var e=this;C.show({parentDialog:this.dialog,location:this.topic.searchIn()}).then((function(t){t.status===d.d.Ok&&e.topic.searchIn(t.location)}))},e.prototype.confirmDelete=function(){var e=this,t=l.Ay.get("Topics.DeleteTopicConfirmationMessage").replace("%topic%",this.topic.searchTerm());(0,T.A)().confirm(t).then((function(){k.A.show(),u.V.delete(e.topic.id()).then((function(){e.dialog.hide(d.d.Ok)})).catch((function(){(0,T.A)().alert(l.Ay.val("Topics.DeleteErrorMessage"))})).finally((function(){return k.A.hide()}))}))},e}(),H=function(){function e(){}return e.prototype.show=function(e){var t=void 0===e?{}:e,n=t.parentDialog,i=t.topic;return new Promise((function(e){var t=h.default.createInstance(n),r=new R({dialog:t,topic:i});t.onHide((function(t,n){e(n)})),t.show({templateName:"v7.Client.Dialogs.EditTopic",model:r,name:"EditTopicDialog"}),t.htmlRoot().find(".textbox input").first().focus()}))},e}(),F=new H},92701:function(e,t,n){"use strict";n.d(t,{Y:function(){return o}});var i=n(58932),r=n(27189);function o(){return r.A.getAsync("res").then((function(e){if(e.locale){var t=(0,i.zs)(e.locale.split("-"),2);return{language:t[0],country:t[1]}}return{language:void 0,country:void 0}}))}},78521:function(e,t,n){"use strict";n.d(t,{AN:function(){return p},Ae:function(){return f},Ec:function(){return u},Hn:function(){return s},Us:function(){return l},Vd:function(){return d},dL:function(){return m},wT:function(){return h}});var i=n(13302),r=n(44260),o={second:"Second",minute:"Minute",hour:"Hour",day:"Day",week:"Week",month:"Month",year:"Year"};function a(e){if(!(0,i.isDate)(e))throw new TypeError("Date expected, given ".concat(typeof e))}function s(e){return e/864e5}function u(){return a(e=new Date),new Date(e.getFullYear(),e.getMonth(),e.getDate());var e}function c(e){return{year:e.getFullYear(),month:e.getMonth(),date:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}}function l(e,t,n){var i;void 0===n&&(n=2);try{i=function(e,t){if(void 0===t&&(t=new Date),a(e),a(t),e>t)throw new TypeError("The endDate (".concat(t,") must be later than the startDate (").concat(e,")"));var n=c(e),i=c(t),r=i.year-n.year,s=i.month-n.month,u=i.date-n.date,l=i.hours-n.hours,d=i.minutes-n.minutes,h=i.seconds-n.seconds;return h<0&&(d--,h+=60),d<0&&(l--,d+=60),l<0&&(u--,l+=24),u<0&&(s--,u+=new Date(new Date(t).setDate(0)).getDate()),s<0&&(r--,s+=12),[{prefix:o.year,duration:r},{prefix:o.month,duration:s},{prefix:o.day,duration:u},{prefix:o.hour,duration:l},{prefix:o.minute,duration:d},{prefix:o.second,duration:h}].reduce((function(e,t){return(t.duration>0||e.length)&&e.push({prefix:t.prefix,period:t.duration}),e}),[])}(e,t)}catch(e){return""}i.splice(n,Number.MAX_VALUE);var s="TimePeriod";return i.filter((function(e){return e.period>0})).map((function(e){var t=e.prefix;e.period>1&&(t="".concat(t,"s"));var n=[s,t].join(".");return r.Ay.format(n,e.period)})).join(" ")}function d(e,t){if(void 0===t&&(t=2),!(0,i.isDate)(e)){var n=parseInt(e,10);e=new Date(new Date-1e3*n)}return l(e,new Date,t)}function h(e,t){void 0===t&&(t=2);var n=d(e,t);return n?"".concat(n," ago"):n}var f=new Date(864e13),p=new Date(-864e13);function m(e,t){var n=Math.abs(t-e);return Math.floor(n/864e5)}},59940:function(e,t,n){"use strict";n.d(t,{a:function(){return v},i:function(){return p}});var i=n(13302),r=n(45235),o=/[\xAD\w\-.]/,a="(".concat(o.source,"|").concat(/[!#$%&'*+\-/=?^_`{|}~]/.source,")+"),s="".concat(o.source,"+"),u="(".concat(a,"@").concat(s,")"),c=new RegExp("\\b(mailto:)?()".concat(u,"(>?)\\b"),"gi"),l=/\b((?:https?:\/\/)|(?:ftp:\/\/))?((?:[a-z][-\w\xAD]{1,25}\.)+([a-z]{2,3}))(([/\\][.\-\w@~%?(&(amp;)?)#='"\xAD]*)*)\b/gi,d=(0,i.transform)(["com","org","net","int","edu","gov","mil","law","ac","ad","ae","af","ag","ai","al","am","an","ao","aq","ar","as","at","au","aw","ax","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bl","bm","bn","bo","bq","br","bs","bt","bv","bw","by","bz","ca","cc","cd","cf","cg","ch","ci","ck","cl","cm","cn","co","cr","cu","cv","cw","cx","cy","cz","de","dj","dk","dm","do","dz","ec","ee","eg","eh","er","es","et","eu","fi","fj","fk","fm","fo","fr","ga","gb","gd","ge","gf","gg","gh","gi","gl","gm","gn","gp","gq","gr","gs","gt","gu","gw","gy","hk","hm","hn","hr","ht","hu","id","ie","il","im","in","io","iq","ir","is","it","je","jm","jo","jp","ke","kg","kh","ki","km","kn","kp","kr","kw","ky","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","mc","md","me","mf","mg","mh","mk","ml","mm","mn","mo","mp","mq","mr","ms","mt","mu","mv","mw","mx","my","mz","na","nc","ne","nf","ng","ni","nl","no","np","nr","nu","nz","om","pa","pe","pf","pg","ph","pk","pl","pm","pn","pr","ps","pt","pw","py","qa","re","ro","rs","ru","rw","sa","sb","sc","sd","se","sg","sh","si","sj","sk","sl","sm","sn","so","sr","ss","st","su","sv","sx","sy","sz","tc","td","tf","tg","th","tj","tk","tl","tm","tn","to","tp","tr","tt","tv","tw","tz","ua","ug","uk","um","us","uy","uz","va","vc","ve","vg","vi","vn","vu","wf","ws","ye","yt","za","zm","zw"],(function(e,t){e[t]=1}),{});function h(e,t){return'').concat(e,"")}function f(e,t){return'').concat(e,"")}function p(e,t,n){if(void 0===t&&(t=h),void 0===n&&(n=f),(0,r.gP)(e))return e;var i=[],o=0,a=e.replace(c,(function(e){if(!e.includes(".."))return i.push(e),"\0".concat(o++,"\0")})).replace(l,(function(e,t,i,r,o){if(r in d){t=t||"http://",i=i.replace(/\xAD/g,""),o=o.replace(/&/gi,"&").replace(/\xAD/g,"");var a="".concat(t).concat(i).concat(o);return n(e,a)}return e}));return o?a.replace(/\0(\d+)\0/g,(function(e,n){return t(i[n],i[n].replace(/\xAD/g,""))})):a}var m=/["&'<>`/]/g,g={'"':""","&":"&","'":"'","<":"<",">":">","`":"`","/":"/"};function v(e){if(null==e)return"";if(!(0,i.isString)(e))throw new TypeError("String expected");return e.replace(m,(function(e){return g[e]}))}},78747:function(e,t,n){"use strict";n.d(t,{uv:function(){return r}});var i=n(45235);function r(e){return(0,i.gP)(e)?Promise.reject(new Error("url is expected to be a non empty string")):new Promise((function(t,n){var i=new Image;i.onload=function(){return t(e)},i.onerror=n,i.src=e}))}n(44260)},45191:function(e,t,n){"use strict";n.d(t,{y:function(){return r}});var i=n(13302);function r(e){return(0,i.isObject)(e)&&(0,i.isFunction)(e.then)}},14683:function(e,t,n){"use strict";var i,r=n(97433),o={};Object.defineProperties(o,{width:{enumerable:!0,get:function(){var e;return void 0===i&&(r.b.testStyles("#modernizr {".concat("width:100px;height:100px;overflow:scroll","}"),(function(t){e=t.offsetWidth-t.clientWidth})),i=e),i}},isHidden:{enumerable:!0,get:function(){return 0===o.width}}}),window.__scrollbar=o,t.A=o},85351:function(e,t,n){"use strict";n.d(t,{A:function(){return b}});var i=n(13302),r=n(45235),o=n(29583),a=n(27189),s=function(e){var t=void 0===e?{}:e,n=t.title,i=t.width,r=t.height,o=t.thumbnails,a=void 0===o?{}:o;this.title=n,this.width=i,this.height=r,this.thumbnails={small:a.small,medium:a.medium,large:a.large}},u=n(9485),c=/(youtube.com|youtu.be)/,l=/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/,d=function(){function e(){}return Object.defineProperty(e.prototype,"videoType",{get:function(){return"YouTube"},enumerable:!1,configurable:!0}),e.prototype.isValid=function(e){return!(0,r.gP)(e)&&c.test(e)&&null!==this.parseId(e)},e.prototype.parseId=function(e){var t=e.match(l);return t&&11===t[2].length?t[2]:null},e.prototype.getVideoInfoAsync=function(e){var t=this.parseId(e);return a.A.getAsync("ui.youtube").then((function(e){return o.getJSON("https://www.googleapis.com/youtube/v3/videos",{part:"snippet",id:t,key:e.key})})).then((function(e){var t=(void 0===e?{}:e).items,n=void 0===t?[]:t;if(0===n.length||!n[0].snippet)return Promise.reject("Error parsing youtube video");var i=n[0].snippet,r=i.title,o=i.thumbnails;return new s({title:r,width:640,height:360,thumbnails:{small:o.default.url,medium:o.medium.url,large:(o.maxres||o.high).url}})}))},e.prototype.getPlayerIframe=function(e,t,n,i){var o=void 0===i?{}:i,a=o.allowfullscreen,s=o.controls,u=o.showinfo,c=o.related;if((0,r.gP)(e))return null;var l=this.parseId(e);if((0,r.gP)(l))return null;var d="".concat("//www.youtube.com/embed","/").concat(l),h=a?"allowFullscreen":"",f=s?"1":"0",p=u?"1":"0",m=c?"1":"0";return'")},e.prototype.getPlayer=function(e,t,n){var i=(0,r.gP)(e)?null:this.parseId(e);return(0,r.gP)(i)?Promise.reject(new Error("couldn't extract videoId from url '".concat(e,"'"))):(n.videoId=i,u.A.create({player:"youtube",element:t}).setup(n))},e}(),h=/(player.)?vimeo\.com/,f=/(http(s)?:\/\/)?(www\.|player\.)?vimeo.com\/(\w*\/)*(\d+)(\/)?(#.*)?/,p=function(){function e(){}return Object.defineProperty(e.prototype,"videoType",{get:function(){return"Vimeo"},enumerable:!1,configurable:!0}),e.prototype.isValid=function(e){return!(0,r.gP)(e)&&h.test(e)&&null!==this.parseId(e)},e.prototype.parseId=function(e){var t=e.match(f);return t&&t[5]},e.prototype.getVideoInfoAsync=function(e){var t=this.parseId(e),n=o.getJSON((0,r.GP)("https://vimeo.com/api/v2/video/{0}.json",t),{format:"json"}).then((function(e){return new s({title:e[0].title,width:e[0].width,height:e[0].height,thumbnails:{small:e[0].thumbnail_small,medium:e[0].thumbnail_medium,large:e[0].thumbnail_large}})}));return new Promise((function(e,t){return n.then(e,t)}))},e.prototype.getPlayerIframe=function(e,t,n,i){var o=(void 0===i?{}:i).allowfullscreen;if((0,r.gP)(e))return null;var a=this.parseId(e);if((0,r.gP)(a))return null;var s="".concat("https://player.vimeo.com/video","/").concat(a),u=o?"allowFullscreen":"";return'")},e.prototype.getPlayer=function(e,t,n){var i=(0,r.gP)(e)?null:this.parseId(e);return(0,r.gP)(i)?Promise.reject(new Error("couldn't extract videoId from url '".concat(e,"'"))):(n.id=i,u.A.create({player:"vimeo",element:t}).setup(n))},e}(),m=n(32512),g=/(facebook.com)/,v=/^.*facebook\.com\/(.*\/videos\/|video\.php.*[?&]v=)(\w*)/,y=function(){function e(){}return Object.defineProperty(e.prototype,"videoType",{get:function(){return"Facebook"},enumerable:!1,configurable:!0}),e.prototype.isValid=function(e){return!(0,r.gP)(e)&&g.test(e)&&null!==this.parseId(e)},e.prototype.parseId=function(e){var t=e.match(v);return t?t[2]:null},e.prototype.getVideoInfoAsync=function(e){var t=this.parseId(e);return a.A.getAsync("socialMedia.facebook.videoMetaUrl").then((function(e){return(0,m.Tt)({url:(0,r.GP)(e,t)})})).then((function(e){return new s({title:e.Title,width:e.Width,height:e.Height,thumbnails:{small:e.Thumbnail.Url,medium:e.Thumbnail.Url,large:e.Thumbnail.Url}})}))},e.prototype.getPlayerIframe=function(e,t,n,i){var o=void 0===i?{}:i,a=o.allowfullscreen,s=o.showinfo;if((0,r.gP)(e))return null;var u=this.parseId(e);return(0,r.gP)(u)?null:'
    ')},e.prototype.getPlayer=function(e,t,n){var i=(0,r.gP)(e)?null:this.parseId(e);return(0,r.gP)(i)?Promise.reject(new Error("couldn't extract videoId from url '".concat(e,"'"))):(n.videoId=i,t.innerHTML=this.getPlayerIframe(e,n.width,n.height,n.playerVars),u.A.create({player:"facebook",element:t}).setup(n))},e}(),_=new(function(){function e(){this.embeders=[new d,new p,new y]}return e.prototype.get=function(e){return(0,r.gP)(e)?null:(0,i.find)(this.embeders,(function(t){return t.isValid(e)}))},e.prototype.exists=function(e){return this.embeders.some((function(t){return t.isValid(e)}))},e}()),b={getVideoInfo:function(e){var t=_.get(e);return t?t.getVideoInfoAsync(e):Promise.reject("Video url is not supported")},getVideoType:function(e){var t=_.get(e);return t?t.videoType:null},getVideoId:function(e){var t=_.get(e);return t?t.parseId(e):null},getPlayer:function(e,t,n){void 0===n&&(n={});var i=_.get(e);return i?i.getPlayer(e,t,n):Promise.reject(new Error("not found video player for source '".concat(e,"'")))},getPlayerIframe:function(e,t,n,i){void 0===i&&(i={});var r=_.get(e);return r?r.getPlayerIframe(e,t,n,i):null},playerExists:function(e){return _.exists(e)}}},9485:function(e,t,n){"use strict";n.d(t,{A:function(){return V}});var i,r=n(45235),o=n(58932),a=n(13302),s=function(){function e(t){if(!(0,a.isElement)(t))throw new TypeError("Element value is expected to be a DOM element");if(this.constructor===e)throw new TypeError("Cannot construct Player instances directly");this.element=t}return e.prototype.setup=function(e){return Promise.resolve(this)},e.prototype.play=function(){return Promise.resolve()},e.prototype.pause=function(){return Promise.resolve()},e.prototype.stop=function(){return Promise.resolve()},e.prototype.mute=function(){return Promise.resolve()},e.prototype.unmute=function(){return Promise.resolve(0)},e.prototype.setVolume=function(e){return Promise.resolve(0)},e.prototype.getVolume=function(){return Promise.resolve(0)},e.prototype.resize=function(e,t){return Promise.resolve()},e.prototype.on=function(e,t){if((0,r.gP)(e))throw new TypeError("event is expected to be a non-empty string");if(!(0,a.isFunction)(t))throw new TypeError("handler is expected to be a function")},e.prototype.destroy=function(){return this.element=null,Promise.resolve()},Object.defineProperty(e.prototype,"isFullScreen",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPlaying",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"video",{get:function(){return null},enumerable:!1,configurable:!0}),e}(),u=n(27189),c=n(16213),l=n(83323),d=0;function h(){return i||(i=u.A.getAsync("ad.spotxDirectSdkScript").then((function(e){return(0,r.gP)(e)?Promise.reject('Can\'t find "ad.spotxDirectSdkScript" parameter in config'):new Promise((function(t){(0,l.j)([e],(function(e){void 0===e&&(e=window.SpotX),t(e)}),(function(e){c.A.error(e),++d<5&&(i=null)}))}))})))}var f,p,m=function(e){function t(t){var n=e.call(this,t)||this;return n._playerInstance=null,n}return(0,o.C6)(t,e),t.prototype.setup=function(t){var n=this;return e.prototype.setup.call(this,t),h().then((function(e){return n._playerInstance=new e.DirectAdOS(t),n.on("AdPaused AdStopped",(function(){n._isPlaying=!1})),n.on("AdStarted",(function(){n._isPlaying=!0})),n._playerInstance.loadAd()})).then((function(){return n}))},t.prototype.play=function(){var e=this;return this._checkInstance().then((function(){e._playerInstance.loaded()&&!e._isPlaying&&(e._playerInstance.playAd(),e._isPlaying=!0)}))},t.prototype.stop=function(){var e=this;return this._checkInstance().then((function(){e._playerInstance.loaded()&&!e._isPlaying&&(e._playerInstance.stopAd(),e._isPlaying=!1)}))},t.prototype.pause=function(){var e=this;return this._checkInstance().then((function(){e._playerInstance.loaded()&&e._isPlaying&&(e._playerInstance.pauseAd(),e._isPlaying=!1)}))},t.prototype.on=function(t,n){var i=this;return this._checkInstance().then((function(){return e.prototype.on.call(i,t,n),h().then((function(e){t.split(" ").map((function(t){return i._getEventName(e,t)})).forEach((function(e){i._playerInstance.subscribe(n,e)}))}))}))},t.prototype.mute=function(){var e=this;this._checkInstance().then((function(){e._playerInstance.videoSlot().muted=!0}))},t.prototype.unmute=function(){var e=this;this._checkInstance().then((function(){e._playerInstance.videoSlot().muted=!1}))},t.prototype.setVolume=function(e){var t=this;this._checkInstance().then((function(){return t._playerInstance.setAdVolume(e/100),t.getVolume()}))},t.prototype.getVolume=function(){var e=this;this._checkInstance().then((function(){return 100*e._playerInstance.getAdVolume()}))},t.prototype.resize=function(e,t){var n=this;this._checkInstance().then((function(){n._playerInstance.resize(e,t)}))},Object.defineProperty(t.prototype,"isFullScreen",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"video",{get:function(){if(!this._playerInstance)throw new Error("Use .setup() to initialize the player");return this._playerInstance.videoSlot()},enumerable:!1,configurable:!0}),t.prototype._getEventName=function(e,t){switch(t){case"play":return e.DirectAdOS.Events.AD_RESUMED;case"pause":return e.DirectAdOS.Events.AD_PAUSED;case"complete":return e.DirectAdOS.Events.AD_AFTER_STOPPED;case"error":return e.DirectAdOS.Events.AD_ERROR;default:return t}},t.prototype._checkInstance=function(){var e=this;return new Promise((function(t,n){e._playerInstance?t(e._playerInstance):n(new Error("Use .setup() to initialize the player"))}))},t}(s),g=n(99526),v=n(25778),y=n(35765),_=n(45191),b=((f={})[1]="play",f[2]="pause",f[0]="complete",f[-2]="error",f),w=function(e){return new Promise((function(t,n){try{var i=e();(0,_.y)(i)?i.then(t):t(i)}catch(e){n(e)}}))},C=function(e){function t(t){var n=e.call(this,t)||this;return n._playerInstance=null,n._events=new g.m(1),n._subscriptions=[],n}return(0,o.C6)(t,e),t.prototype.setup=function(t){var n=this;return e.prototype.setup.call(this,t).then((function(){return new Promise((function(e){(0,y.R)("https://www.youtube.com/iframe_api").then((function(){return p||(p=new Promise((function(e){var t=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){t&&t(),e(window.YT)}}))),p})).then((function(i){t.events={onStateChange:function(e){return n._onPlayerStateChange(e)},onError:function(){return n._events.next("error")},onReady:function(){n._events.next("ready"),e(n)}},n._playerInstance=new i.Player(n.element,t)}))}))}))},t.prototype.play=function(){var e=this;return w((function(){return e._playerInstance.playVideo()}))},t.prototype.stop=function(){var e=this;return w((function(){return e._playerInstance.stopVideo()}))},t.prototype.pause=function(){var e=this;return w((function(){return e._playerInstance.pauseVideo()}))},t.prototype.mute=function(){var e=this;return w((function(){return e._playerInstance.mute()}))},t.prototype.unmute=function(){var e=this;return w((function(){return e._playerInstance.unMute()})).then((function(){return e.getVolume()}))},t.prototype.on=function(t,n){var i=this;e.prototype.on.call(this,t,n),t.split(" ").forEach((function(e){var t=i._events.pipe((0,v.p)((function(t){return t===e}))).subscribe(n);i._subscriptions.push(t)}))},t.prototype.setVolume=function(e){var t=this;return w((function(){return t._playerInstance.setVolume(e)}))},t.prototype.getVolume=function(){var e=this;return w((function(){return e._playerInstance.getVolume()}))},Object.defineProperty(t.prototype,"isPlaying",{get:function(){return 3===this._playerInstance.getPlayerState()||1===this._playerInstance.getPlayerState()},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){var t=this;return w((function(){return t._subscriptions.forEach((function(e){e.unsubscribe()})),t._subscriptions=null,t._playerInstance.destroy(),e.prototype.destroy.call(t)}))},t.prototype._onPlayerStateChange=function(e){if(e){var t=e.data;this._events.next(b[t])}},t}(s),A=function(e){return new Promise((function(t,n){return e.then(t).catch(n)}))},I=function(e){function t(t){var n=e.call(this,t)||this;return n._playerVolumeBeforeMute=100,n._playerInstance=null,n}return(0,o.C6)(t,e),t.prototype.setup=function(t){var i=this;return e.prototype.setup.call(this,t).then((function(){return new Promise((function(e,t){Promise.all([n.e(4641),n.e(8565)]).then(function(t){var i=n(2545).VimeoPlayerBase;e(i)}.bind(null,n)).catch((function(e){return t(e)}))}))})).then((function(e){return i._playerInstance=new e(i.element,t),i._playerInstance.on("play",(function(){i._isPlaying=!0})),i._playerInstance.on("pause",(function(){i._isPlaying=!1})),i._playerInstance.on("ended",(function(){i._isPlaying=!1})),A(i._playerInstance.ready())})).then((function(){return i}))},t.prototype.play=function(){return A(this._playerInstance.play())},t.prototype.stop=function(){return A(this._playerInstance.pause())},t.prototype.pause=function(){return A(this._playerInstance.pause())},t.prototype.mute=function(){var e=this;return this.getVolume().then((function(t){return e._playerVolumeBeforeMute=t,e.setVolume(0)}))},t.prototype.unmute=function(){return this.setVolume(this._playerVolumeBeforeMute)},t.prototype.on=function(t,n){var i=this;e.prototype.on.call(this,t,n),t.split(" ").forEach((function(e){i._playerInstance.on(e,n)}))},t.prototype.setVolume=function(e){return e/=100,A(this._playerInstance.setVolume(e)).then((function(e){return 100*e}))},t.prototype.getVolume=function(){return A(this._playerInstance.getVolume()).then((function(e){return 100*e}))},Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this._isPlaying},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){var t=this;return A(this._playerInstance.unload()).then((function(){return t._playerInstance.off("play"),t._playerInstance.off("pause"),t._playerInstance.off("ended"),e.prototype.destroy.call(t)}))},t}(s),S=n(69463),P="video-ready",x=function(e){function t(t){var n=t.id,i=t.player,r=e.call(this,n)||this;return r._player=i,r}return(0,o.C6)(t,e),Object.defineProperty(t.prototype,"player",{get:function(){return this._player},enumerable:!1,configurable:!0}),t}(function(){function e(e){this._id=e}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e}()),T=function(){function e(){this._initPromise=null,this._subject=new S.B}return e.prototype.destroy=function(){this._subject.unsubscribe()},e.prototype._load=function(){var e=this;return this._initPromise||(this._initPromise=new Promise((function(t,n){return Promise.all([u.A.getAsync("Authentication.OAuth.client_facebook.AppId"),u.A.getAsync("socialMedia.facebook.apiVersion")]).then((function(n){var i=(0,o.zs)(n,2),r=i[0],a=i[1];window.fbAsyncInit=function(){window.FB.init({appId:r,xfbml:!1,version:"v".concat(a)}),window.FB.Event.subscribe("xfbml.ready",(function(t){"video"===t.type&&e._subject.next(new x({id:t.id,player:t.instance}))})),t(window.FB)}})).then((function(){return(0,y.R)("https://connect.facebook.net/en_US/sdk.js")})).catch((function(e){return n(new Error("Couldn't initialize Facebook SDK (".concat(e,").")))}))}))),this._initPromise},e.prototype._getSubscription=function(e){var t=e.type,n=e.id,i=e.eventHandler,r=e.errorHandler,o=void 0===r?null:r;if(t===P)return this._subject.pipe((0,v.p)((function(e){return e instanceof x&&(null==n||e.id===n)}))).subscribe(i,o);throw new Error("Unsupport subscription for type '".concat(t,"'."))},e.prototype.onceEvent=function(e){var t=this,n=e.type,i=e.id;return new Promise((function(e,r){var o=t._getSubscription({type:n,id:i,eventHandler:function(t){o.unsubscribe(),e(t)},errorHandler:function(e){return r(e)}})}))},e.prototype.renderSocialPluginTag=function(e){var t=this;return new Promise((function(n,i){t._load().then((function(t){return t.XFBML.parse(e,(function(){return n()}))})).catch(i)}))},e}(),k=new T,E=n(20680),M={play:"startedPlaying",pause:"paused",stop:"finishedPlaying"},D=function(e){function t(t){var n=e.call(this,t)||this;return n._playerInstance=null,n._playerVolumeBeforeMute=100,n._isPlaying=!1,n._eventHandlers=[],n}return(0,o.C6)(t,e),t.prototype.setup=function(t){var n=this;e.prototype.setup.call(this,t);var i,r,o=(i=t.videoId,k.onceEvent({type:P,id:i})).then((function(e){var t=e.player;n._playerInstance=t,n._eventHandlers.push(t.subscribe("startedPlaying",(function(){n._isPlaying=!0})),t.subscribe("paused",(function(){n._isPlaying=!1})),t.subscribe("finishedPlaying",(function(){n._isPlaying=!1})),t.subscribe("error",(function(e){n._isPlaying=!1,(0,E.logError)(e)})))})).catch(E.logError);return Promise.all([o,(r=this.element,k.renderSocialPluginTag(r))]).then((function(){return n}))},t.prototype.play=function(){return this._playerInstance.play(),this.unmute()},t.prototype.stop=function(){return this.pause()},t.prototype.pause=function(){return this._playerInstance.pause(),Promise.resolve()},t.prototype.mute=function(){var e=this;return this.getVolume().then((function(t){e._playerVolumeBeforeMute=t,e._playerInstance.mute()}))},t.prototype.unmute=function(){return this._playerInstance.unmute(),this.setVolume(this._playerVolumeBeforeMute)},t.prototype.on=function(t,n){var i=this;e.prototype.on.call(this,t,n),t.split(" ").forEach((function(e){var t=M[e];t&&i._eventHandlers.push(i._playerInstance.subscribe(t,n))}))},t.prototype.setVolume=function(e){return this._playerInstance.setVolume(e/100),Promise.resolve(e)},t.prototype.getVolume=function(){return Promise.resolve(100*this._playerInstance.getVolume())},Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this._isPlaying},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){return this._eventHandlers.forEach((function(e){return e.release()})),this._eventHandlers.length=0,this._playerInstance=null,e.prototype.destroy.call(this)},t}(s),N=D,L=function(){function e(){}return e.prototype.create=function(e){var t=void 0===e?{}:e,n=t.player,i=t.element;if((0,r.gP)(n))throw new TypeError("Player value is expected to be a non-empty string");switch(n){case"spotx":return new m(i);case"youtube":return new C(i);case"vimeo":return new I(i);case"facebook":return new N(i);default:throw new TypeError("Player ".concat(n," is not supported"))}},e}(),V=new L},1943:function(e,t,n){"use strict";var i=n(29583);n(96723),i.nd.actions={},t.A=i.nd.actions},97433:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var i=function(e,t,n){var i,r,o,a={},s=t.documentElement,u="modernizr",c=t.createElement(u),l=c.style,d=t.createElement("input"),h=":)",f={}.toString,p=" -webkit- -moz- -o- -ms- ".split(" "),m="Webkit Moz O ms",g=m.split(" "),v=m.toLowerCase().split(" "),y="http://www.w3.org/2000/svg",_={},b={},w={},C=[],A=C.slice,I=function(e,n,i,r){var o,a,c,l,d=t.createElement("div"),h=t.body,f=h||t.createElement("body");if(parseInt(i,10))for(;i--;)(c=t.createElement("div")).id=r?r[i]:u+(i+1),d.appendChild(c);return o=["­",'"].join(""),d.id=u,(h?d:f).innerHTML+=o,f.appendChild(d),h||(f.style.background="",f.style.overflow="hidden",l=s.style.overflow,s.style.overflow="hidden",s.appendChild(f)),a=n(d,e),h?d.parentNode.removeChild(d):(f.parentNode.removeChild(f),s.style.overflow=l),!!a},S=(o={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},function(e,i){i=i||t.createElement(o[e]||"div");var r=(e="on"+e)in i;return r||(i.setAttribute||(i=t.createElement("div")),i.setAttribute&&i.removeAttribute&&(i.setAttribute(e,""),r=T(i[e],"function"),T(i[e],"undefined")||(i[e]=n),i.removeAttribute(e))),i=null,r}),P={}.hasOwnProperty;function x(e){l.cssText=e}function T(e,t){return typeof e===t}function k(e,t){return!!~(""+e).indexOf(t)}function E(e,t){for(var i in e){var r=e[i];if(!k(r,"-")&&l[r]!==n)return"pfx"!=t||r}return!1}function M(e,t,i){var r=e.charAt(0).toUpperCase()+e.slice(1),o=(e+" "+g.join(r+" ")+r).split(" ");return T(t,"string")||T(t,"undefined")?E(o,t):function(e,t,i){for(var r in e){var o=t[e[r]];if(o!==n)return!1===i?e[r]:T(o,"function")?o.bind(i||t):o}return!1}(o=(e+" "+v.join(r+" ")+r).split(" "),t,i)}for(var D in r=T(P,"undefined")||T(P.call,"undefined")?function(e,t){return t in e&&T(e.constructor.prototype[t],"undefined")}:function(e,t){return P.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=A.call(arguments,1),i=function(){if(this instanceof i){var r=function(){};r.prototype=t.prototype;var o=new r,a=t.apply(o,n.concat(A.call(arguments)));return Object(a)===a?a:o}return t.apply(e,n.concat(A.call(arguments)))};return i}),_.flexbox=function(){return M("flexWrap")},_.flexboxlegacy=function(){return M("boxDirection")},_.canvas=function(){var e=t.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},_.canvastext=function(){return!(!a.canvas||!T(t.createElement("canvas").getContext("2d").fillText,"function"))},_.webgl=function(){return!!e.WebGLRenderingContext},_.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:I(["@media (",p.join("touch-enabled),("),u,")","{#modernizr{top:9px;position:absolute}}"].join(""),(function(e){n=9===e.offsetTop})),n},_.geolocation=function(){return"geolocation"in navigator},_.postmessage=function(){return!!e.postMessage},_.websqldatabase=function(){return!!e.openDatabase},_.indexedDB=function(){return!!M("indexedDB",e)},_.hashchange=function(){return S("hashchange",e)&&(t.documentMode===n||t.documentMode>7)},_.history=function(){return!(!e.history||!history.pushState)},_.draganddrop=function(){var e=t.createElement("div");return"draggable"in e||"ondragstart"in e&&"ondrop"in e},_.websockets=function(){return"WebSocket"in e||"MozWebSocket"in e},_.rgba=function(){return x("background-color:rgba(150,255,150,.5)"),k(l.backgroundColor,"rgba")},_.hsla=function(){return x("background-color:hsla(120,40%,100%,.5)"),k(l.backgroundColor,"rgba")||k(l.backgroundColor,"hsla")},_.multiplebgs=function(){return x("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(l.background)},_.backgroundsize=function(){return M("backgroundSize")},_.borderimage=function(){return M("borderImage")},_.borderradius=function(){return M("borderRadius")},_.boxshadow=function(){return M("boxShadow")},_.textshadow=function(){return""===t.createElement("div").style.textShadow},_.opacity=function(){return"opacity:.55",x(p.join("opacity:.55;")+""),/^0.55$/.test(l.opacity)},_.cssanimations=function(){return M("animationName")},_.csscolumns=function(){return M("columnCount")},_.cssgradients=function(){var e="background-image:";return x((e+"-webkit- ".split(" ").join("gradient(linear,left top,right bottom,from(#9f9),to(white));"+e)+p.join("linear-gradient(left top,#9f9, white);"+e)).slice(0,-17)),k(l.backgroundImage,"gradient")},_.cssreflections=function(){return M("boxReflect")},_.csstransforms=function(){return!!M("transform")},_.csstransforms3d=function(){var e=!!M("perspective");return e&&"webkitPerspective"in s.style&&I("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",(function(t,n){e=9===t.offsetLeft&&3===t.offsetHeight})),e},_.csstransitions=function(){return M("transition")},_.fontface=function(){var e;return I('@font-face {font-family:"font";src:url("https://")}',(function(n,i){var r=t.getElementById("smodernizr"),o=r.sheet||r.styleSheet,a=o?o.cssRules&&o.cssRules[0]?o.cssRules[0].cssText:o.cssText||"":"";e=/src/i.test(a)&&0===a.indexOf(i.split(" ")[0])})),e},_.generatedcontent=function(){var e;return I(["#",u,"{font:0/0 a}#",u,':after{content:"',h,'";visibility:hidden;font:3px/1 a}'].join(""),(function(t){e=t.offsetHeight>=3})),e},_.video=function(){var e=t.createElement("video"),n=!1;try{(n=!!e.canPlayType)&&((n=new Boolean(n)).ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(e){}return n},_.audio=function(){var e=t.createElement("audio"),n=!1;try{(n=!!e.canPlayType)&&((n=new Boolean(n)).ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(e){}return n},_.localstorage=function(){try{return localStorage.setItem(u,u),localStorage.removeItem(u),!0}catch(e){return!1}},_.sessionstorage=function(){try{return sessionStorage.setItem(u,u),sessionStorage.removeItem(u),!0}catch(e){return!1}},_.webworkers=function(){return!!e.Worker},_.applicationcache=function(){return!!e.applicationCache},_.svg=function(){return!!t.createElementNS&&!!t.createElementNS(y,"svg").createSVGRect},_.inlinesvg=function(){var e=t.createElement("div");return e.innerHTML="",(e.firstChild&&e.firstChild.namespaceURI)==y},_.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(f.call(t.createElementNS(y,"animate")))},_.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(f.call(t.createElementNS(y,"clipPath")))},_)r(_,D)&&(i=D.toLowerCase(),a[i]=_[D](),C.push((a[i]?"":"no-")+i));return a.input||(a.input=function(n){for(var i=0,r=n.length;i",n="hidden"in e,i=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return void 0===e.cloneNode||void 0===e.createDocumentFragment||void 0===e.createElement}()}catch(e){n=!0,i=!0}}();var p={elements:r.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==r.shivCSS,supportsUnknownElements:i,shivMethods:!1!==r.shivMethods,type:"default",shivDocument:f,createElement:h,createDocumentFragment:function(e,n){if(e||(e=t),i)return e.createDocumentFragment();for(var r=(n=n||d(e)).frag.cloneNode(),o=0,a=l(),s=a.length;o=0,s=n.indexOf(r)>=0,a===s?[3,8]:[4,(0,x.yJ)(A(void 0,e))]):[3,9];case 7:return d.sent(),[2];case 8:return i=function(e,t,n){var i,r;return(0,o.YH)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,7,9,13]),[4,(0,x.yJ)(b({cidsToChange:[e]},n))];case 1:return a.sent(),i=void 0,t?[5,(0,o.Ju)((0,D.p)(O,e))]:[3,3];case 2:return i=a.sent(),[3,5];case 3:return[5,(0,o.Ju)((0,D.p)(j,e))];case 4:i=a.sent(),a.label=5;case 5:return[4,(0,x.yJ)(w({favorites:i},n))];case 6:return a.sent(),[3,13];case 7:return r=a.sent(),(0,N.z)(r),[4,(0,x.yJ)(C({cidsToChange:[e]},n))];case 8:return a.sent(),[3,13];case 9:return[4,(0,x.KW)()];case 10:return a.sent()?[4,(0,x.yJ)(C({cidsToChange:[e]},n))]:[3,12];case 11:a.sent(),a.label=12;case 12:return[7];case 13:return[2]}}))}(r,!s,e),[3,10];case 9:u=e.payload.cids,c=u.filter((function(e){return t.indexOf(e)<0})),l=t.filter((function(e){return u.indexOf(e)>=0})),i=function(e){var t,n,i,r,a;return(0,o.YH)(this,(function(s){switch(s.label){case 0:return t=e.payload.cids,[5,(0,o.Ju)((0,T.N)(q))];case 1:n=s.sent(),i=(0,o.fX)((0,o.fX)([],(0,o.zs)(t.filter((function(e){return n.indexOf(e)<0}))),!1),(0,o.zs)(n.filter((function(e){return t.indexOf(e)<0}))),!1),s.label=2;case 2:return s.trys.push([2,6,8,12]),[4,(0,x.yJ)(b({cidsToChange:i},e))];case 3:return s.sent(),[5,(0,o.Ju)((0,D.p)(U,t))];case 4:return r=s.sent(),[4,(0,x.yJ)(w({favorites:r},e))];case 5:return s.sent(),[3,12];case 6:return a=s.sent(),(0,N.z)(a),[4,(0,x.yJ)(C({cidsToChange:i},e))];case 7:return s.sent(),[3,12];case 8:return[4,(0,x.KW)()];case 9:return s.sent()?[4,(0,x.yJ)(C({cidsToChange:i},e))]:[3,11];case 10:s.sent(),s.label=11;case 11:return[7];case 12:return[2]}}))}((0,o.Cl)((0,o.Cl)({},e),{payload:(0,o.Cl)((0,o.Cl)({},e.payload),{cids:(0,o.fX)((0,o.fX)([],(0,o.zs)(c),!1),(0,o.zs)(l),!1)})})),d.label=10;case 10:return[4,(0,x.O4)({task:i,cancel:(0,x.s)(E.YC)})];case 11:return d.sent().cancel?[4,(0,x.ZT)()]:[3,13];case 12:d.sent(),d.label=13;case 13:return[2]}}))}function ne(e){var t,n,i,r,a,s;return(0,o.YH)(this,(function(u){switch(u.label){case 0:u.trys.push([0,5,6,7]),t=(0,o.Ju)(e),n=t.next(),u.label=1;case 1:return n.done?[3,4]:(i=n.value,[4,(0,x.yJ)(A(void 0,i))]);case 2:u.sent(),u.label=3;case 3:return n=t.next(),[3,1];case 4:return[3,7];case 5:return r=u.sent(),a={error:r},[3,7];case 6:try{n&&!n.done&&(s=t.return)&&s.call(t)}finally{if(a)throw a.error}return[7];case 7:return[2]}}))}function ie(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,x.yJ)(I())];case 1:return e.sent(),[2]}}))}function re(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,x.yJ)(l())];case 1:return e.sent(),[4,(0,x.yJ)(d())];case 2:return e.sent(),[2]}}))}var oe=n(31555),ae=n(5059),se=n(85387);function ue(e){var t=(0,se.wA)(),n=(0,se.d4)(q).indexOf(e)>=0,i=(0,se.d4)(K)(e),r=(0,ae.useCallback)((function(){i||t(y({cid:e}))}),[e,i,t]);return{favorite:n,favoriting:i,toggle:r}}var ce=n(22496),le=n(97556),de=n(99558),he=n(85738),fe=function(e){var t=e.favorite,n=e.loading,i=e.onlyIcon,r=e.toggle,o=(0,ce.f)().localizedString,a="pri pri-waitable ".concat(t&&!n?"pri-favoring":"pri-favor");return(0,oe.jsxs)(le.o,{className:(0,he.W)("addtofavor is-waitable",n&&"is-waiting",i&&"btn-icon"),onClick:r,children:[(0,oe.jsx)("span",{className:a,children:n&&(0,oe.jsx)(de.y,{type:"small"})}),(0,oe.jsx)("span",{className:"title",children:o("Menu.Item.AddToFavorites")})]})},pe=function(e){var t=e.cid,n=e.onlyIcon,i=void 0!==n&&n,r=ue(t),o=r.favorite,a=r.favoriting,s=r.toggle;return(0,oe.jsx)(fe,{favorite:o,loading:a,onlyIcon:i,toggle:s})},me=n(61577),ge=function(e){var t=e.cid,n=e.pervasive,i=(0,ce.f)().localizedString,r=ue(t),o=r.favorite,a=r.favoriting,s=r.toggle,u="pri pri-waitable ".concat(o&&!a?"pri-favoring":"pri-favor"),c=i(o?"Menu.Item.AddedToFavorites":"Menu.Item.AddToFavorites"),l=n?(0,he.W)("btn btn-action btn-followpub is-waitable",a&&"is-waiting"):(0,he.W)("btn-icon has-bg has-label-right is-waitable",o&&"is-favorite",a&&"is-waiting is-disabled"),d=n?"title":"btn-title";return(0,oe.jsxs)(me.n,{className:l,onClick:s,"aria-label":c,children:[(0,oe.jsx)("span",{className:u,"aria-hidden":"true",children:a&&(0,oe.jsx)(de.y,{type:"small"})}),(0,oe.jsx)("span",{className:d,children:c})]})},ve=n(74637),ye=function(e){var t=e.cid,n=e.onClick,i=(0,ce.f)().localizedString,r=ue(t),o=r.favorite,a=r.toggle,s=(0,ae.useCallback)((function(){a(),null==n||n(t)}),[a,t,n]),u=i(o?"Menu.Item.AddedToFavorites":"Menu.Item.AddToFavorites"),c=o?"pri pri-favoring":"pri pri-favor";return(0,oe.jsx)(ve.k,{text:u,icon:c,className:"addtofavor",onClick:s})},_e=n(51413),be=n(9064),we=(0,ae.forwardRef)((function(e,t){var n=e.cid,i=e.mode,r=e.onClick,o=(0,se.wA)(),a=(0,ce.f)().localizedString,s=ue(n),u=s.favorite,c=s.toggle,l=(0,ae.useCallback)((function(){o((0,_e.df)({category:"Menus",action:"IssueContextMenu",label:u?"remove-from-favorites":"add-to-favorites"})),c(),null==r||r(n)}),[u,c,n,r,o]),d=u?"pri pri-favoring":"pri pri-favor",h=a("Menu.Item.AddToFavorites");return(0,oe.jsx)(be.D,{ref:t,mode:i,text:h,icon:d,className:"addtofavor",onClick:l})})),Ce=n(3491),Ae=function(e){var t=e.onlyIcon;return(0,oe.jsx)(fe,{favorite:!1,loading:!1,onlyIcon:t,toggle:Ce})},Ie=n(61445),Se=function(e){var t=e.children;return(0,se.d4)(Ie.N$)?null:t};i.bX.addFeature(r,P,(function(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,x.IJ)(d,ee)];case 1:return e.sent(),[4,(0,k.S)([y,_],te,ne)];case 2:return e.sent(),[4,(0,x.IJ)(w,ie)];case 3:return e.sent(),[4,(0,x.jP)([E.YC,E.hl],re)];case 4:return e.sent(),[2]}}))}))},10358:function(e,t,n){"use strict";n.d(t,{He:function(){return g},QG:function(){return f},TW:function(){return v},eV:function(){return d},pJ:function(){return m},tr:function(){return h},xG:function(){return p}});var i=n(58932),r=n(45221),o=n(90185),a=n(53308),s=n(45235),u="v1/accounts/current/avatar",c="crop",l=80,d={small:{width:20,height:20},normal:{width:22,height:22},medium:{width:28,height:28},large:{width:44,height:44},huge:{width:48,height:48},giant:{width:120,height:120},ginormous:{width:160,height:160}};function h(e){var t=e.nickname,n=e.imageId,i=e.size,r=e.fallbackAvatarUrl,o=e.style,a=n?v(n,i):r?g(r,i):null;if(a){var u=i?{widthAttr:'width="'.concat(i.width,'"'),heightAttr:'height="'.concat(i.height,'"')}:{},c=u.widthAttr,l=void 0===c?"":c,d=u.heightAttr,h=void 0===d?"":d,f=o?'style="'.concat(o,'"'):"";return'').concat(t||')}return t?"".concat((0,s.gs)(t),""):""}function f(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,a.lx)(u)];case 1:return[2,e.sent().imageId]}}))}))}function p(e){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,a.zA)(u,"",JSON.stringify({imageId:e}),{contentType:"application/json; charset=utf-8"})];case 1:return[2,t.sent()]}}))}))}function m(){return(0,a.wu)(u)}function g(e,t){if(!e)return e;"http"!==e.substring(0,4)&&(e=window.basePath+e);var n=new r.A(e);return(null==t?void 0:t.width)&&t.width>0&&n.addQueryParam("width",t.width),(null==t?void 0:t.height)&&t.height>0&&n.addQueryParam("height",t.height),n.addQueryParam("fitMode",c),n.addQueryParam("quality",l),n.toString()}function v(e,t){return(0,o.V)(e,(0,i.Cl)((0,i.Cl)({},null!=t?t:{}),{fitMode:c,quality:l}))}},81832:function(e,t,n){"use strict";n.d(t,{C:function(){return _}});var i=n(31555),r=n(5059),o=n(85387),a=n(27602),s=n(22496),u=n(99529),c=n(61577),l=n(33005),d=n(98274),h=n(51747),f=n(58932),p=n(79223),m=n(11793),g={AND:"Search.And.Condition.Placeholder",OR:"Search.OR.Condition.Placeholder",NOT:"Search.NOT.Condition.Placeholder",NEAR:"Search.NEAR.Condition.Placeholder"},v=(0,f.fX)([],(0,f.zs)(Array(10)),!1).map((function(e,t){return{id:t.toString(),label:t.toString()}})),y=function(e){var t,n=e.condition,a=e.index,u=(0,o.wA)(),c=(0,s.f)().localizedString,d=(0,r.useMemo)((function(){return Object.keys(g).map((function(e){return{id:e,label:c(e)}}))}),[c]),h=-1!==["NEAR"].indexOf(n.type),f=(0,r.useCallback)((function(e){var t=e;u((0,l._s)({index:a,condition:{type:t,param:n.param||0,words:n.words}}))}),[u,a,n]),y=(0,r.useCallback)((function(e){var t=Number(e);u((0,l._s)({index:a,condition:{type:n.type,param:t,words:n.words}}))}),[u,a,n]),_=(0,r.useCallback)((function(e){u((0,l._s)({index:a,condition:{type:n.type,param:n.param,words:e}}))}),[u,a,n]),b=(0,r.useCallback)((function(){return u((0,l.mU)({index:a}))}),[u,a]);return(0,i.jsxs)(m.v,{children:[(0,i.jsx)(p.F,{type:"dropdown",options:d,selected:n.type,placeholder:c("Dropdown.Placeholder.PleaseSelect"),onChange:f}),h&&(0,i.jsx)(p.F,{type:"dropdown",options:v,selected:(null===(t=n.param)||void 0===t?void 0:t.toString())||v[0].id,onChange:y}),(0,i.jsx)(p.F,{type:"inputfield",placeholder:c(g[n.type]),value:n.words,onChange:_,onReset:function(){return _("")}}),(0,i.jsx)(p.F,{type:"button",placeholder:c("AdvancedSearch.RemoveFields"),onReset:b})]})},_=function(e){var t=e.booleanSearchMode,n=(0,o.wA)(),f=(0,s.f)().localizedString,p=(0,o.d4)(d.zW),m=p.length<10,g=(0,r.useCallback)((function(){m&&n((0,l.fq)())}),[n,m]),v=(0,r.useCallback)((function(){return n((0,u.sl)())}),[n]),_=(0,r.useCallback)((function(){return n((0,a.bv)({link:"https://care.pressreader.com/hc/en-us/articles/21185820571156-Boolean-Search-Essentials-Operators-and-Strategies",openNewWindow:!0}))}),[n]);return(0,i.jsxs)("div",{className:"form form-control-group advsearch-control-group",children:[(0,i.jsx)(h.$,{onSearch:e.onSearch,locationFilterEnabled:t,children:t&&p.map((function(e,t){return(0,i.jsx)(y,{condition:e,index:t},"cond_".concat(t))}))}),t&&(0,i.jsxs)("div",{className:"advsearch-buttons-container",children:[(0,i.jsxs)("div",{className:"advsearch-buttons-group advsearch-buttons-left",children:[(0,i.jsxs)(c.n,{className:"btn btn-add ".concat(m?"":"is-disabled"),onClick:g,children:[(0,i.jsx)("span",{className:"pri pri-pluscircle","aria-hidden":"true"}),(0,i.jsx)("span",{className:"btn-title",children:f("AdvancedSearch.AddFields")})]}),(0,i.jsxs)(c.n,{className:"btn btn-nolabel btn-help",onClick:_,children:[(0,i.jsx)("span",{className:"pri pri-help","aria-hidden":"true"}),(0,i.jsx)("span",{className:"btn-title",children:f("AdvancedSearch.Help")})]})]}),(0,i.jsx)("div",{className:"advsearch-buttons-group advsearch-buttons-right",children:(0,i.jsx)(c.n,{className:"btn btn-clear",onClick:v,children:(0,i.jsx)("span",{className:"btn-title",children:f("AdvancedSearch.CancelTag")})})})]})]})}},79223:function(e,t,n){"use strict";n.d(t,{F:function(){return l}});var i=n(31555),r=n(5059),o=n(2881),a=n(13384),s=n(9774),u=n(75517),c=n(85738),l=(0,r.forwardRef)((function(e,t){var n;return(0,i.jsxs)("div",{className:(0,c.W)("advsearch-col col-".concat(e.type),"dropdown"===e.type&&"col-dropdown","inputfield"===e.type&&"col--fit"),children:["inputfield"===e.type&&(0,i.jsx)(s.N,{type:"text",ref:t,label:(0,a.p3)("Dialogs.AdvancedSearch.InputField"),placeholder:e.placeholder,required:e.required,value:e.value||"",validators:e.required?["required"]:void 0,onChange:function(t,n){return e.onChange?e.onChange(n):o.l},onReset:e.onReset,onSubmit:e.onSubmit,hasReset:!0,isSearch:e.isSearch}),"dropdown"===e.type&&(0,i.jsx)(u.a,{options:e.options||[],selected:e.selected,onChange:null!==(n=e.onChange)&&void 0!==n?n:o.l,emptyOptionLabel:e.placeholder}),"button"===e.type&&(0,i.jsxs)("button",{className:"btn-icon btn-delete",title:e.placeholder,onClick:e.onReset,children:[(0,i.jsx)("span",{className:"pri pri-deletecircle","aria-hidden":"true"}),(0,i.jsx)("span",{className:"btn-title",children:e.placeholder})]})]})}));l.displayName="AdvancedSearchColumn"},11793:function(e,t,n){"use strict";n.d(t,{v:function(){return r}});var i=n(31555),r=function(e){var t;return(0,i.jsx)("div",{className:"form-item advsearch-row ".concat(null!==(t=e.className)&&void 0!==t?t:""),children:e.children})}},51747:function(e,t,n){"use strict";n.d(t,{$:function(){return d}});var i=n(31555),r=n(5059),o=n(85387),a=n(13384),s=n(82666),u=n(99529),c=n(79223),l=n(11793),d=function(e){var t=e.locationFilterEnabled,n=e.onSearch,d=e.children,h=(0,o.wA)(),f=(0,o.d4)(s.J9),p=(0,o.d4)(s.bg),m=(0,o.d4)(s.BF),g=(0,r.useRef)(null),v=(0,r.useCallback)((function(){return h((0,u.$2)({term:"",skipQuickSearch:!0}))}),[h]),y=(0,r.useCallback)((function(e){return h((0,u.$2)({term:e,skipQuickSearch:!0}))}),[h]),_=(0,r.useCallback)((function(e){return h((0,u.rm)({location:e}))}),[h]);return(0,r.useEffect)((function(){var e;null===(e=g.current)||void 0===e||e.focus()}),[g]),(0,i.jsx)("div",{className:"form form-control-group advsearch-control-group",children:(0,i.jsx)("fieldset",{className:"form-group advsearch-fields",children:(0,i.jsxs)("div",{className:"form-group-content",children:[(0,i.jsxs)(l.v,{className:"row-search",children:[(0,i.jsx)(c.F,{type:"inputfield",ref:g,isSearch:!0,placeholder:(0,a.p3)("Dialogs.AdvancedSearch.Placeholder"),value:f,onSubmit:n,onReset:v,onChange:y}),t&&(0,i.jsx)(c.F,{type:"dropdown",onChange:_,selected:p,options:m})]}),d]})})})}},71921:function(e,t,n){"use strict";n.d(t,{J:function(){return r},p:function(){return i}});var i="@pressreader.advancedsearch",r="".concat(i,".main-dialog")},33005:function(e,t,n){"use strict";n.d(t,{$A:function(){return _},I3:function(){return s},Kr:function(){return h},Ni:function(){return c},_s:function(){return v},e:function(){return f},fq:function(){return m},gV:function(){return l},gj:function(){return p},jT:function(){return a},mU:function(){return g},uM:function(){return d},uh:function(){return u},xe:function(){return y}});var i=n(89103),r=n(71921),o="".concat(r.p,"/common/"),a=(0,i.lQ)("".concat(o,"open_advanced_search")),s=(0,i.lQ)("".concat(o,"set_initial_selections")),u=(0,i.lQ)("".concat(o,"select_languages")),c=(0,i.lQ)("".concat(o,"language_selection_changed")),l=(0,i.lQ)("".concat(o,"select_publications")),d=(0,i.lQ)("".concat(o,"publications_selection_changed")),h=(0,i.lQ)("".concat(o,"author_changed")),f=(0,i.lQ)("".concat(o,"select_dates")),p=(0,i.lQ)("".concat(o,"date_range_selection_changed")),m=(0,i.lQ)("".concat(o,"add_search_condition")),g=(0,i.lQ)("".concat(o,"remove_search_condition")),v=(0,i.lQ)("".concat(o,"change_search_condition")),y=(0,i.lQ)("".concat(o,"change_search_conditions")),_=(0,i.lQ)("".concat(o,"search_conditions_changed"))},98274:function(e,t,n){"use strict";n.d(t,{$8:function(){return s},Kp:function(){return c},NX:function(){return a},ST:function(){return u},zW:function(){return l}});var i=n(29978),r=n(71921),o=function(e){return e[r.p]},a=(0,i.Mz)(o,(function(e){return e.selectedLanguages})),s=(0,i.Mz)(o,(function(e){return e.selectedPublications})),u=(0,i.Mz)(o,(function(e){return e.author})),c=(0,i.Mz)(o,(function(e){return{searchDate:e.searchDate,dateRange:e.dateRange}})),l=(0,i.Mz)(o,(function(e){return e.conditions}))},59148:function(e,t,n){"use strict";n.d(t,{V:function(){return c}});var i=n(29978),r=n(78698),o=n(28809),a=n(80835),s=(0,i.Mz)(r.nw,o._t,(function(e,t){var n;return e!==a.Z.Pervasive&&(null!==(n=t("features.search.advanced.enabled"))&&void 0!==n?n:e!==a.Z.Voyager)})),u=(0,i.Mz)(o._t,(function(e){var t;return null===(t=e("features.search.advanced.optionsEnabled"))||void 0===t||t})),c=(0,i.Mz)([r.uF,s,u],(function(e,t,n){var i=t&&!e,r=n&&t;return{advancedSearchEnabled:t&&(n||i),filtersEnabled:i,booleanSearchEnabled:r,advancedSearchInPopup:!e,hasAdvancedSearchSwitch:r&&e}}))},66435:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});var i="@pressreader/analytics_core"},54387:function(e,t,n){"use strict";n.d(t,{Ew:function(){return l},Fo:function(){return u},Gf:function(){return s},Ll:function(){return c},RN:function(){return d},Rl:function(){return a},U8:function(){return h}});var i=n(89103),r=n(66435),o="".concat(r.p,"/common/"),a=((0,i.lQ)("".concat(o,"analytics_auth_requested")),(0,i.lQ)("".concat(o,"analytics_user_changed")),(0,i.lQ)("".concat(o,"analytics_page_navigated"))),s=(0,i.lQ)("".concat(o,"analytics_page_navigated_legacy")),u=(0,i.lQ)("".concat(o,"analytics_replicaview_interacted")),c=(0,i.lQ)("".concat(o,"analytics_payment")),l=((0,i.lQ)("".concat(o,"analytics_call_to_action_invoked")),(0,i.lQ)("".concat(o,"analytics_universal_content_clicked"))),d=(0,i.lQ)("".concat(o,"update_tracking_id")),h=(0,i.lQ)("".concat(o,"set_active_reading_frame"))},51413:function(e,t,n){"use strict";n.d(t,{RR:function(){return c},df:function(){return a},dh:function(){return u},xB:function(){return s}});var i=n(89103),r=n(66435),o="".concat(r.p,"/generic/"),a=(0,i.lQ)("".concat(o,"event")),s=((0,i.lQ)("".concat(o,"exception")),(0,i.lQ)("".concat(o,"pageview"))),u=(0,i.lQ)("".concat(o,"timing")),c=(0,i.lQ)("".concat(o,"transaction"))},23304:function(e,t,n){"use strict";n.d(t,{f:function(){return s},r:function(){return a}});var i=n(97433);function r(){try{return"1"===window.doNotTrack||"yes"===navigator.doNotTrack||"1"===navigator.doNotTrack||"1"===navigator.msDoNotTrack||window.external&&"msTrackingProtectionEnabled"in window.external&&window.external.msTrackingProtectionEnabled()}catch(e){}return!1}function o(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}function a(e){var t,n;return{name:null!==(t=e.browser.name)&&void 0!==t?t:"",version:null!==(n=e.browser.version)&&void 0!==n?n:"",DNT:r(),touchSupported:i.b.touch,cookiesEnabled:o(),userAgent:window.navigator.userAgent}}function s(e){return{name:e.name,version:e.version,acceptLanguage:e.acceptLanguage,DNT:e.DNT,touchSupported:e.touchSupported,cookiesEnabled:e.cookiesEnabled,userAgent:e.userAgent}}},37618:function(e,t,n){"use strict";function i(e){var t,n;return{type:e.device.type,model:null!==(t=e.device.model)&&void 0!==t?t:"",vendor:null!==(n=e.device.vendor)&&void 0!==n?n:"",colorDepth:window.screen.colorDepth,screenSize:"".concat(window.screen.width,"x").concat(window.screen.height),devicePixelRatio:window.devicePixelRatio}}function r(e){return{type:e.type,model:e.model,vendor:e.vendor,screenSize:e.screenSize,colorDepth:e.colorDepth,devicePixelRatio:e.devicePixelRatio}}n.d(t,{L:function(){return r},l:function(){return i}})},98874:function(e,t,n){"use strict";function i(e){var t,n;return{name:null!==(t=e.os.name)&&void 0!==t?t:"",version:null!==(n=e.os.version)&&void 0!==n?n:""}}function r(e){return{name:e.name,version:e.version}}n.d(t,{J:function(){return i},f:function(){return r}})},47944:function(e,t,n){"use strict";function i(e){return{id:e.id,referer:e.referrer}}n.d(t,{F:function(){return i}})},88967:function(e,t,n){"use strict";n.d(t,{t:function(){return r}});var i=n(89247);function r(e){return"".concat(window.location.origin).concat((0,i.jM)(e))}},36106:function(e,t,n){"use strict";var i;n.d(t,{V:function(){return i}}),function(e){e[e.Catalog=0]="Catalog",e[e.WelcomeMessage=1]="WelcomeMessage"}(i||(i={}))},45840:function(e,t,n){"use strict";n.d(t,{c:function(){return u},p:function(){return c}});var i=n(88960),r="analytics:sessionid",o="analytics:sessionid:time";function a(){try{sessionStorage.setItem(o,(new Date).getTime().toString())}catch(e){}}function s(e){try{sessionStorage.setItem(r,e)}catch(e){}}var u=function(){var e;if(window.sessionStorage){var t=sessionStorage.getItem(o),n=t?new Date(Number(t)):new Date;(new Date).getTime()-n.getTime()>12e5?e=(0,i.A)():(e=sessionStorage.getItem(r))||(e=(0,i.A)()),s(e),a()}else e=(0,i.A)();return e},c=function(){var e=(0,i.A)();return window.sessionStorage&&(s(e),a()),e}},1614:function(e,t,n){"use strict";n.d(t,{z:function(){return a}});var i=n(58932),r=n(58735),o=n(32512);function a(){return(0,i.sH)(this,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,r.authorized()];case 1:return e=t.sent(),[4,(0,o.Z9)(e)];case 2:return[2,t.sent().config]}}))}))}},49151:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var i=n(58932),r=n(15397),o=n(53308),a=n(75125);function s(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,s,u,c,l;return(0,i.YH)(this,(function(d){switch(d.label){case 0:return[4,(0,r.kq)("res")];case 1:if(!(t=d.sent()))throw new Error("Resources and templates are not found.");return n=t.id,s=t.locale,u=t.ts,c={id:n,locale:s,ts:u,version:2},(null==e?void 0:e.resourceNames)&&(c.resourceNames=e.resourceNames),(null==e?void 0:e.templateNames)&&(c.templateNames=e.templateNames),(null==e?void 0:e.locale)&&(c.locale=e.locale),[4,(0,o.lx)("res",c)];case 2:return l=d.sent(),[2,{resources:!1===(null==e?void 0:e.includeStatic)?l.res:(0,i.Cl)((0,i.Cl)({},a.i),l.res),templates:l.templates}]}}))}))}},75125:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});var i={"Important.Title.aa":"Important ({0})","Important.Title.ab":"Important ({0})","Important.Title.ae":"Important ({0})","Important.Title.af":"Important ({0})","Important.Title.ak":"Important ({0})","Important.Title.am":"Important ({0})","Important.Title.an":"Important ({0})","Important.Title.ar":"Important ({0})","Important.Title.as":"Important ({0})","Important.Title.av":"Important ({0})","Important.Title.ay":"Important ({0})","Important.Title.az":"Important ({0})","Important.Title.ba":"Important ({0})","Important.Title.be":"Important ({0})","Important.Title.bg":"Important ({0})","Important.Title.bh":"Important ({0})","Important.Title.bi":"Important ({0})","Important.Title.bm":"Important ({0})","Important.Title.bn":"Important ({0})","Important.Title.bo":"Important ({0})","Important.Title.br":"Important ({0})","Important.Title.bs":"Important ({0})","Important.Title.ca":"Important ({0})","Important.Title.ce":"Important ({0})","Important.Title.ch":"Important ({0})","Important.Title.co":"Important ({0})","Important.Title.cr":"Important ({0})","Important.Title.cs":"Important ({0})","Important.Title.cu":"Important ({0})","Important.Title.cv":"Important ({0})","Important.Title.cy":"Important ({0})","Important.Title.da":"Important ({0})","Important.Title.de":"Important ({0})","Important.Title.dv":"Important ({0})","Important.Title.dz":"Important ({0})","Important.Title.ee":"Important ({0})","Important.Title.el":"Important ({0})","Important.Title.en":"Important ({0})","Important.Title.eo":"Important ({0})","Important.Title.es":"Important ({0})","Important.Title.et":"Important ({0})","Important.Title.eu":"Important ({0})","Important.Title.fa":"Important ({0})","Important.Title.ff":"Important ({0})","Important.Title.fi":"Important ({0})","Important.Title.fj":"Important ({0})","Important.Title.fo":"Important ({0})","Important.Title.fr":"Important ({0})","Important.Title.fy":"Important ({0})","Important.Title.ga":"Important ({0})","Important.Title.gd":"Important ({0})","Important.Title.gl":"Important ({0})","Important.Title.gn":"Important ({0})","Important.Title.gu":"Important ({0})","Important.Title.gv":"Important ({0})","Important.Title.ha":"Important ({0})","Important.Title.he":"Important ({0})","Important.Title.hi":"Important ({0})","Important.Title.ho":"Important ({0})","Important.Title.hr":"Important ({0})","Important.Title.ht":"Important ({0})","Important.Title.hu":"Important ({0})","Important.Title.hy":"Important ({0})","Important.Title.hz":"Important ({0})","Important.Title.ia":"Important ({0})","Important.Title.id":"Important ({0})","Important.Title.ie":"Important ({0})","Important.Title.ig":"Important ({0})","Important.Title.ii":"Important ({0})","Important.Title.ik":"Important ({0})","Important.Title.io":"Important ({0})","Important.Title.is":"Important ({0})","Important.Title.it":"Important ({0})","Important.Title.iu":"Important ({0})","Important.Title.ja":"Important ({0})","Important.Title.jv":"Important ({0})","Important.Title.jw":"Important ({0})","Important.Title.ka":"Important ({0})","Important.Title.kg":"Important ({0})","Important.Title.ki":"Important ({0})","Important.Title.kj":"Important ({0})","Important.Title.kk":"Important ({0})","Important.Title.kl":"Important ({0})","Important.Title.km":"Important ({0})","Important.Title.kn":"Important ({0})","Important.Title.ko":"Important ({0})","Important.Title.kr":"Important ({0})","Important.Title.ks":"Important ({0})","Important.Title.ku":"Important ({0})","Important.Title.kv":"Important ({0})","Important.Title.kw":"Important ({0})","Important.Title.ky":"Important ({0})","Important.Title.la":"Important ({0})","Important.Title.lb":"Important ({0})","Important.Title.lg":"Important ({0})","Important.Title.li":"Important ({0})","Important.Title.ln":"Important ({0})","Important.Title.lo":"Important ({0})","Important.Title.lt":"Important ({0})","Important.Title.lu":"Important ({0})","Important.Title.lv":"Important ({0})","Important.Title.mg":"Important ({0})","Important.Title.mh":"Important ({0})","Important.Title.mi":"Important ({0})","Important.Title.mk":"Important ({0})","Important.Title.ml":"Important ({0})","Important.Title.mn":"Important ({0})","Important.Title.mo":"Important ({0})","Important.Title.mr":"Important ({0})","Important.Title.ms":"Important ({0})","Important.Title.mt":"Important ({0})","Important.Title.my":"Important ({0})","Important.Title.na":"Important ({0})","Important.Title.nb":"Important ({0})","Important.Title.nd":"Important ({0})","Important.Title.ne":"Important ({0})","Important.Title.ng":"Important ({0})","Important.Title.nl":"Important ({0})","Important.Title.nn":"Important ({0})","Important.Title.no":"Important ({0})","Important.Title.nr":"Important ({0})","Important.Title.nv":"Important ({0})","Important.Title.ny":"Important ({0})","Important.Title.oc":"Important ({0})","Important.Title.oj":"Important ({0})","Important.Title.om":"Important ({0})","Important.Title.or":"Important ({0})","Important.Title.os":"Important ({0})","Important.Title.pa":"Important ({0})","Important.Title.pi":"Important ({0})","Important.Title.pl":"Important ({0})","Important.Title.ps":"Important ({0})","Important.Title.pt":"Important ({0})","Important.Title.qu":"Important ({0})","Important.Title.rm":"Important ({0})","Important.Title.rn":"Important ({0})","Important.Title.ro":"Important ({0})","Important.Title.ru":"Important ({0})","Important.Title.rw":"Important ({0})","Important.Title.ry":"Important ({0})","Important.Title.sa":"Important ({0})","Important.Title.sc":"Important ({0})","Important.Title.sd":"Important ({0})","Important.Title.se":"Important ({0})","Important.Title.sg":"Important ({0})","Important.Title.sh":"Important ({0})","Important.Title.si":"Important ({0})","Important.Title.sk":"Important ({0})","Important.Title.sl":"Important ({0})","Important.Title.sm":"Important ({0})","Important.Title.sn":"Important ({0})","Important.Title.so":"Important ({0})","Important.Title.sq":"Important ({0})","Important.Title.sr":"Important ({0})","Important.Title.ss":"Important ({0})","Important.Title.st":"Important ({0})","Important.Title.su":"Important ({0})","Important.Title.sv":"Important ({0})","Important.Title.sw":"Important ({0})","Important.Title.ta":"Important ({0})","Important.Title.te":"Important ({0})","Important.Title.tg":"Important ({0})","Important.Title.th":"Important ({0})","Important.Title.ti":"Important ({0})","Important.Title.tk":"Important ({0})","Important.Title.tl":"Important ({0})","Important.Title.tn":"Important ({0})","Important.Title.to":"Important ({0})","Important.Title.tr":"Important ({0})","Important.Title.ts":"Important ({0})","Important.Title.tt":"Important ({0})","Important.Title.tw":"Important ({0})","Important.Title.ty":"Important ({0})","Important.Title.ua":"Important ({0})","Important.Title.ug":"Important ({0})","Important.Title.uk":"Important ({0})","Important.Title.ur":"Important ({0})","Important.Title.uz":"Important ({0})","Important.Title.ve":"Important ({0})","Important.Title.vi":"Important ({0})","Important.Title.vo":"Important ({0})","Important.Title.wa":"Important ({0})","Important.Title.wo":"Important ({0})","Important.Title.xh":"Important ({0})","Important.Title.yi":"Important ({0})","Important.Title.yo":"Important ({0})","Important.Title.za":"Important ({0})","Important.Title.zh":"Important ({0})","Important.Title.zu":"Important ({0})","Countries.af-na":"Namibia","Countries.af-za":"South Africa","Countries.ar-_i":"International","Countries.ar-ae":"UAE","Countries.ar-au":"Australia","Countries.ar-bh":"Bahrain","Countries.ar-eg":"Egypt","Countries.ar-gb":"International","Countries.ar-in":"India","Countries.ar-jo":"Jordan","Countries.ar-kw":"Kuwait","Countries.ar-lb":"Lebanon","Countries.ar-om":"Oman","Countries.ar-ps":"Palestine","Countries.ar-qa":"Qatar","Countries.ar-ru":"Russia","Countries.ar-sa":"Saudi Arabia","Countries.ar-sd":"Sudan","Countries.be-by":"Belarus","Countries.bg-bg":"Bulgaria","Countries.bg-ru":"Bulgaria","Countries.bs-ba":"Bosnia and Herzegovina","Countries.ca-es":"Spain","Countries.cs-cz":"Czech Republic","Countries.da-dk":"Denmark","Countries.de-at":"Austria","Countries.de-ch":"Switzerland","Countries.de-de":"Deutschland","Countries.de-es":"Spain","Countries.de-li":"Liechtenstein","Countries.de-lu":"Luxembourg","Countries.de-ru":"Germany","Countries.de-th":"Thailand","Countries.de-us":"USA","Countries.el-cy":"Cyprus","Countries.el-gr":"Ελλάδα","Countries.el-ru":"Greece","Countries.en-_i":"Austria","Countries.en-ae":"UAE","Countries.en-at":"Austria","Countries.en-au":"Australia","Countries.en-az":"Azerbaijan","Countries.en-bb":"Barbados","Countries.en-be":"Belgium","Countries.en-bg":"Austria","Countries.en-bh":"Bahrain","Countries.en-br":"Brazil","Countries.en-by":"Belarus","Countries.en-ca":"Canada","Countries.en-ch":"Russia","Countries.en-cn":"China","Countries.en-cy":"Cyprus","Countries.en-cz":"Austria","Countries.en-de":"Australia","Countries.en-dk":"Austria","Countries.en-eg":"Egypt","Countries.en-es":"Spain","Countries.en-fi":"Austria","Countries.en-fr":"Australia","Countries.en-gb":"UK","Countries.en-gr":"Austria","Countries.en-gy":"Guyana","Countries.en-hk":"Australia","Countries.en-hr":"Croatia","Countries.en-hu":"Austria","Countries.en-id":"Austria","Countries.en-ie":"Ireland","Countries.en-il":"Israel","Countries.en-in":"India","Countries.en-iq":"Iraq","Countries.en-is":"Austria","Countries.en-it":"Australia","Countries.en-jm":"Jamaica","Countries.en-jp":"Austria","Countries.en-ke":"Kenya","Countries.en-kh":"Cambodia","Countries.en-kr":"Australia","Countries.en-kw":"Kuwait","Countries.en-ky":"Cayman Islands","Countries.en-kz":"Kazakhstan","Countries.en-lb":"Lebanon","Countries.en-li":"Austria","Countries.en-lk":"Sri Lanka","Countries.en-lu":"Austria","Countries.en-me":"Austria","Countries.en-mk":"Macedonia","Countries.en-mt":"Australia","Countries.en-mu":"Mauritius","Countries.en-my":"Malaysia","Countries.en-ng":"Nigeria","Countries.en-nl":"Netherlands","Countries.en-no":"Austria","Countries.en-np":"Nepal","Countries.en-nz":"New Zealand","Countries.en-om":"Oman","Countries.en-ph":"Philippines","Countries.en-pk":"Pakistan","Countries.en-pl":"Austria","Countries.en-pt":"Austria","Countries.en-qa":"Austria","Countries.en-ro":"Austria","Countries.en-rs":"Austria","Countries.en-ru":"Russia","Countries.en-sa":"Saudi Arabia","Countries.en-se":"Austria","Countries.en-sg":"Austria","Countries.en-sk":"Austria","Countries.en-th":"Thailand","Countries.en-tr":"Turkey","Countries.en-tw":"Taiwan","Countries.en-ua":"Austria","Countries.en-ug":"Uganda","Countries.en-us":"USA","Countries.en-vi":"USA","Countries.en-vn":"Viet Nam","Countries.en-za":"South Africa","Countries.en-zm":"Zambia","Countries.en-zw":"UK","Countries.es-ar":"Argentina","Countries.es-cl":"Chile","Countries.es-co":"Colombia","Countries.es-cr":"Costa Rica","Countries.es-do":"Dominican Republic","Countries.es-ec":"Ecuador","Countries.es-es":"España","Countries.es-gt":"Guatemala","Countries.es-mx":"Mexico","Countries.es-pa":"Panama","Countries.es-pr":"Puerto Rico","Countries.es-py":"Paraguay","Countries.es-ru":"Russia","Countries.es-sv":"El Salvador","Countries.es-us":"USA","Countries.es-ve":"Venezuela","Countries.et-ee":"Estonia","Countries.fa-ir":"Iran","Countries.fi-ee":"Estonia","Countries.fi-fi":"Finland","Countries.fr-be":"Belgium","Countries.fr-ca":"Canada","Countries.fr-ch":"Switzerland","Countries.fr-dz":"Algeria","Countries.fr-eg":"Egypt","Countries.fr-fr":" France","Countries.fr-ht":"Haiti","Countries.fr-il":"Israel","Countries.fr-kh":"Cambodia","Countries.fr-lb":"Lebanon","Countries.fr-lu":"Luxembourg","Countries.fr-mu":"Mauritius","Countries.fr-nc":"New Caledonia","Countries.fr-ru":"Russia","Countries.fr-sn":"Senegal","Countries.fr-us":"Haiti","Countries.fr-vn":"Viet Nam","Countries.ga-ie":"Ireland","Countries.gu-in":"India","Countries.he-il":"Israel","Countries.hi-in":"India","Countries.hi-ru":"India","Countries.hr-ae":"Croatia","Countries.hr-hr":"Croatia","Countries.hu-hu":"Hungary","Countries.hu-ro":"Romania","Countries.hu-sk":"Slovakia","Countries.hy-am":"Armenia","Countries.id-id":"Indonesia","Countries.is-is":"Iceland","Countries.it-ca":"Canada","Countries.it-ch":"Switzerland","Countries.it-it":"Italia","Countries.it-ru":"Italy","Countries.ja-jp":"Japan","Countries.ja-ru":"Japan","Countries.kn-in":"India","Countries.ko-kr":"Korea (South)","Countries.ko-ru":"Korea (South)","Countries.ko-us":"USA","Countries.lt-lt":"Lithuania","Countries.lv-lv":"Latvia","Countries.mk-mk":"Macedonia","Countries.ml-in":"India","Countries.mr-in":"India","Countries.ms-my":"Malaysia","Countries.ne-np":"Nepal","Countries.nl-be":"Belgium","Countries.nl-nl":"Nederland","Countries.nl-sr":"Suriname","Countries.no-no":"Norway","Countries.pa-gb":"UK","Countries.pl-_i":"International","Countries.pl-pl":"Polska","Countries.pt-ao":"Angola","Countries.pt-br":"Brazil","Countries.pt-pt":"Portugal","Countries.pt-ru":"Brazil","Countries.ro-ro":"Romania","Countries.ru-_i":"Germany","Countries.ru-am":"Armenia","Countries.ru-by":"Belarus","Countries.ru-de":"Germany","Countries.ru-ee":"Estonia","Countries.ru-fi":"Finland","Countries.ru-fr":"France","Countries.ru-gb":"Germany","Countries.ru-ru":"Россия","Countries.ru-tj":"Tajikistan","Countries.ru-ua":"Russia","Countries.ru-us":"USA","Countries.ru-uz":"Uzbekistan","Countries.si-lk":"Sri Lanka","Countries.sk-sk":"Slovakia","Countries.sl-si":"Slovenia","Countries.sq-al":"Albania","Countries.sq-ks":"Kosovo","Countries.sr-me":"Montenegro","Countries.sr-rs":"Serbia","Countries.sr-ru":"Russia","Countries.sv-ee":"Estonia","Countries.sv-fi":"Finland","Countries.sv-se":"Sweden","Countries.ta-in":"India","Countries.te-in":"India","Countries.th-th":"Thailand","Countries.tl-ph":"Philippines","Countries.tr-cy":"Northern Cyprus","Countries.tr-tr":"Turkey","Countries.uk-ua":"Ukraine","Countries.vi-vn":"Viet Nam","Countries.yi-us":"USA","Countries.zh-ca":"Canada","Countries.zh-cn":"China","Countries.zh-hk":"China","Countries.zh-my":"Malaysia","Countries.zh-ru":"China","Countries.zh-sg":"Singapore","Countries.zh-tw":"Taiwan","Countries.zh-us":"USA","Countries.zu-za":"South Africa"}},14497:function(e,t,n){"use strict";n.d(t,{Dz:function(){return s},Wb:function(){return a},oW:function(){return r},pW:function(){return i},xg:function(){return o}});var i="@pressreader/appcore",r="targetPlatform",o=365,a="facelift",s=365},38695:function(e,t,n){"use strict";n.d(t,{u:function(){return o}});var i=n(13981),r=n(78698);function o(){var e="Cookiebot",t=document.getElementById(e);if(!t){var n=(0,i.Lt)(r.zw);(t=document.createElement("script")).id=e,t.type="text/javascript",t.async=!0,t.src="https://consent.cookiebot.com/uc.js",t.setAttribute("data-cbid","06b589d2-9594-4323-af24-0b61ef0a0f2d"),t.setAttribute("data-culture",n.split("-")[0]),document.head.insertBefore(t,document.head.firstChild)}}},51972:function(e,t,n){"use strict";n.d(t,{Ts:function(){return v}});var i=n(58932),r=n(13981),o=n(28809),a=n(90050),s=n(30212),u=n(9141),c=n(45504),l=n(58735),d=n(1614),h=n(49151),f=n(38695),p=n(78698),m=n(57749),g=!1;function v(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n,v,y;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return g?[2]:[4,l.initAuthTickets()];case 1:i.sent(),l.bind("tokenUpdated",(function(){(0,r.JD)((0,o.fj)())})),g=!0,(0,a.s)(d.z),(0,u.n)(h.Q),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,(0,r.Cs)((0,o.fj)(),o.r4,o.Cl)];case 3:return i.sent(),[3,5];case 4:return e=i.sent(),(0,s.z)("Cannot load config.",e),[2];case 5:return i.trys.push([5,7,,8]),[4,(0,r.Cs)((0,c.Un)(),c.wy,c.zK)];case 6:return i.sent(),[3,8];case 7:return t=i.sent(),(0,s.z)("Cannot load resources.",t),[2];case 8:return(0,m.eN)(),n=(0,m.zH)(),v=(0,m.aC)(),y=(0,m.YG)(),(0,f.u)(),(0,r.JD)((0,p.ge)({targetPlatform:n,faceliftEnabled:v,experimentalEnabled:y})),[2]}}))}))}},78698:function(e,t,n){"use strict";n.d(t,{Ph:function(){return f},n1:function(){return p},ge:function(){return d},X6:function(){return R},Ky:function(){return N},LG:function(){return M},uF:function(){return D},q3:function(){return L},zw:function(){return G},LE:function(){return q},gt:function(){return X},hq:function(){return ee},D6:function(){return ie},XT:function(){return H},PM:function(){return V},R1:function(){return J},ZF:function(){return E},nw:function(){return k},Rt:function(){return Z},x2:function(){return $},Gm:function(){return h},Dx:function(){return m}});var i,r=n(13981),o=n(14497),a=n(58932),s=n(89103),u=n(80835),c=n(10235),l="".concat(o.pW,"/"),d=(0,s.lQ)("".concat(l,"core-module-load-done")),h=(0,s.lQ)("".concat(l,"start-app")),f=(0,s.lQ)("".concat(l,"app_started")),p=(0,s.lQ)("".concat(l,"change-target-platform")),m=(0,s.lQ)("".concat(l,"toggle-facelift-ui")),g=(0,s.lQ)("".concat(l,"legacy-platform-changed")),v={targetPlatform:u.Z.Web,faceliftEnabled:!1,experimentalEnabled:!1,legacyPlatform:c.O.Web,appStarted:!1},y=(0,s.vy)(v,(0,s.po)(d,(function(e,t){return(0,a.Cl)((0,a.Cl)({},e),{targetPlatform:t.payload.targetPlatform,faceliftEnabled:t.payload.faceliftEnabled,experimentalEnabled:t.payload.experimentalEnabled})})),(0,s.po)(f,(function(e,t){return(0,a.Cl)((0,a.Cl)({},e),{appStarted:!0})})),(0,s.po)(g,(function(e,t){var n=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{legacyPlatform:n.platform})}))),_=n(44834),b=n(89247),w=n(17950),C=n(29978),A=n(28809),I=n(30212);!function(e){e.Pressreader="pr",e.BrandedEditions="be"}(i||(i={}));var S=[i.Pressreader,i.BrandedEditions],P=n(57749),x=function(e){return e[o.pW]},T=(0,C.Mz)(A._t,(function(e){return e("features.app.target.platform",u.Z.Web)})),k=(0,C.Mz)(x,(function(e){return e.targetPlatform})),E=(0,C.Mz)(k,A._t,(function(e,t){var n=(t("features.app.platforms.supported","")||"").split(",").filter(P.Jo);return n.indexOf(e)<0&&n.push(e),n})),M=(0,C.Mz)(A._t,(function(e){return e("features.app.facelift.allowed",!1)})),D=(0,C.Mz)(x,(function(e){return e.faceliftEnabled})),N=(0,C.Mz)(x,(function(e){return e.experimentalEnabled})),L=(0,C.Mz)(k,A._t,(function(e,t){return[u.Z.Pervasive,u.Z.Voyager].indexOf(e)<0&&t("features.app.topbar.giftcard.enabled",!1)})),V=(0,C.Mz)(A._t,(function(e){return e("features.app.purchase.flow.enabled",!1)})),R=(0,C.Mz)(A._t,(function(e){var t=e("features.app.group.type",i.Pressreader);return S.indexOf(t)<0&&(0,I.z)("Invalid app group type ".concat(t)),t})),H=(0,C.Mz)(x,(function(e){return e.legacyPlatform})),F=(0,C.Mz)(x,(function(e){return e.appStarted}));function B(){return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,_.Lt)(F)];case 1:return e.sent()?[2]:[4,(0,_.yJ)(f())];case 2:return e.sent(),[2]}}))}function z(e){var t,n,i,r;return(0,a.YH)(this,(function(a){switch(a.label){case 0:return t=e.payload,n=t.newTargetPlatform,i=t.keepLocation,[4,(0,_.Lt)(T)];case 1:return r=a.sent(),[4,(0,_.Lt)(E)];case 2:return a.sent().indexOf(n)<0||(n===r?w.set(o.oW,"",{path:(0,b.DT)(),expiresInDays:-1}):w.set(o.oW,n,{path:(0,b.DT)(),expiresInDays:o.xg}),i?window.location.assign((0,b.Ti)()):window.location.assign((0,b.jM)(""))),[2]}}))}function O(e){var t;return(0,a.YH)(this,(function(n){switch(n.label){case 0:return t=e.payload.enable,[4,(0,_.Lt)(D)];case 1:return n.sent()===t||(t?w.set(o.Wb,"true",{path:(0,b.DT)(),expiresInDays:o.Dz}):w.set(o.Wb,"",{path:(0,b.DT)(),expiresInDays:-1}),window.location.assign((0,b.jM)(""))),[2]}}))}var j=n(1791),U=n(23131);function W(e){return{code:e.id,originalTitle:e.original,title:e.title,slug:e.slug,locale:e.locale,hrefLangs:e.hrefLangs}}var Y="en-us",X=(0,C.Mz)(A._t,(function(e){return e(U.F2,!0)})),q=(0,C.Mz)(A._t,(function(e){return e(U.dN,[]).map(W)})),G=(0,C.Mz)(A._t,(function(e){return e(U.mo,"en")})),K=(0,C.Mz)(A._t,(function(e){return e(U.iO,[])})),J=(0,C.Mz)(K,(function(e){var t;return null!==(t=e[0])&&void 0!==t?t:Y})),Q=(0,C.Mz)(A._t,(function(e){return function(e){if(!e)return null;var t=Object.keys(e.languages);return{enabled:e.enable,languages:t.map((function(t){return function(e,t){return{code:e,title:t.name,originalTitle:t.name,slug:e}}(t,e.languages[t])})),languagePairs:t.reduce((function(t,n){return t[n]=e.languages[n].pairs,t}),{})}}(e("translation"))})),Z=(0,C.Mz)(Q,(function(e){return j((function(t){if(!e)return[];var n=e.languages.find((function(e){return e.code===t}));if(!n)return[];var i=e.languagePairs[t];if(!i)return[];var r=i.map((function(t){return e.languages.find((function(e){return e.code===t}))})).filter((function(e){return!!e}));return(0,a.fX)([n],r,!0)}))})),$=(0,C.Mz)(A._t,(function(e){return e(U.NV)})),ee=(0,C.Mz)(A._t,(function(e){return e(U.mo,"en")===Y})),te=n(13384),ne=(0,r.bb)("language"),ie=(0,C.Mz)(A._t,ne,(function(e,t){var n,i=e("translation.languages");if(!i)return"";var r=i[t];return r?(0,te.AF)("Languages.".concat(t),null!==(n=r.name)&&void 0!==n?n:""):""}));r.bX.addFeature(o.pW,y,(function(){return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,_.jP)(h,B)];case 1:return e.sent(),[4,(0,_.jP)(p,z)];case 2:return e.sent(),[4,(0,_.jP)(m,O)];case 3:return e.sent(),[2]}}))}))},10235:function(e,t,n){"use strict";var i;n.d(t,{O:function(){return i}}),function(e){e[e.Web=0]="Web",e[e.iOS=1]="iOS",e[e.Android=2]="Android",e[e.MacOS=3]="MacOS",e[e.Win8=4]="Win8"}(i||(i={}))},57749:function(e,t,n){"use strict";n.d(t,{Jo:function(){return l},YG:function(){return p},aC:function(){return f},eN:function(){return d},zH:function(){return h}});var i=n(15397),r=n(89247),o=n(80835),a=n(17950),s=n(14497),u=[o.Z.Web,o.Z.Pervasive,o.Z.Voyager],c="accessibility=true";function l(e){return!!e&&u.indexOf(e)>=0}function d(){var e=(0,i.Ct)("features.app.target.platform",o.Z.Web),t=(0,i.Ct)("features.app.platforms.supported",e).split(",").filter(l);(window.location.search||"").toLowerCase().indexOf(c)>=0&&t.indexOf(o.Z.Pervasive)>=0&&a.set(s.oW,o.Z.Pervasive,{path:(0,r.DT)(),expiresInDays:s.xg})}function h(){var e=(0,i.Ct)("features.app.target.platform",o.Z.Web),t=a.get(s.oW,null);return e!==t&&l(t)&&(0,i.Ct)("features.app.platforms.supported",e).split(",").filter(l).indexOf(t)>=0&&(e=t),e}function f(){return!!(0,i.Ct)("features.app.facelift.enabled",!1)||!!(0,i.Ct)("features.beta.facelift.enabled",!1)||!!(0,i.Ct)("features.app.facelift.allowed",!1)&&"true"===a.get(s.Wb,null)}function p(){return(0,i.Ct)("features.app.facelift.allowed",!1)}},13981:function(e,t,n){"use strict";n.d(t,{rB:function(){return b},bb:function(){return _},JD:function(){return f},oM:function(){return m},Cs:function(){return v},Lt:function(){return p},M_:function(){return h},bX:function(){return d},B1:function(){return y},Ow:function(){return g}});var i=n(58932),r=n(44834),o=n(69463),a=n(3503),s=n(44229),u=n(71241),c=n(45164),l=n(74525),d=new(function(){function e(){var e,t;this._persistent=((e={})[l.N.Local]=(0,l.H)("pr.store",l.N.Local),e[l.N.Session]=(0,l.H)("pr.store",l.N.Session),e),this._storages=((t={})[l.N.Local]={},t[l.N.Session]={},t),this._reducers={none:function(e){return void 0===e&&(e=0),e}};var n=(0,s.HY)(this._reducers);this._sagaMiddlware=(0,u.Ay)({sagaMonitor:void 0}),this._sagas={};var i=s.Zz;this._store=(0,s.y$)(n,{},i((0,s.Tw)(this._sagaMiddlware))),this._store.subscribe(c(this._onStateChanged.bind(this),1e3))}return Object.defineProperty(e.prototype,"store",{get:function(){return this._store},enumerable:!1,configurable:!0}),e.prototype.addFeature=function(e,t,n){t&&(this._reducers[e]=t,this._onReducersChanged()),n&&(this._sagas[e]=this._sagaMiddlware.run(n))},e.prototype.addStoreStorage=function(e,t,n){this._storages[e][t]=n,this._persistent[e].hydrate(t,n)},e.prototype.removeFeature=function(e){e in this._reducers&&(delete this._reducers[e],this._onReducersChanged()),e in this._storages&&delete this._storages[e],e in this._sagas&&((0,r.ZT)(this._sagas[e]),delete this._sagas[e])},e.prototype.runSaga=function(e){return this._sagaMiddlware.run("function"==typeof e?e:function(){return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,e];case 1:return[2,t.sent()]}}))})},e.prototype._onReducersChanged=function(){this._store.replaceReducer((0,s.HY)(this._reducers))},e.prototype._onStateChanged=function(){var e=this._store.getState();e&&(this._persistent[l.N.Local].persist(e,this._storages[l.N.Local]),this._persistent[l.N.Session].persist(e,this._storages[l.N.Session]))},e}()),h=d.store,f=h.dispatch.bind(h),p=function(e){return e(h.getState())};function m(e){var t=new o.B,n=p(e);return h.subscribe((function(){var i=p(e);n!==i&&(n=i,t.next(i))})),t.asObservable()}function g(e,t){return void 0===t&&(t=1e3),new Promise((function(n){d.runSaga((function(){var o,a,s;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,(0,r.O4)({wait:(0,r.s)("".concat(e)),timeout:(0,r.cb)(t)})];case 1:return o=i.sent(),n(null!==(s=null===(a=o.wait)||void 0===a?void 0:a.payload)&&void 0!==s?s:null),[2]}}))}))}))}function v(e,t,n){for(var o=[],s=3;s=0,u=t(null!==(r=null==o?void 0:o.id)&&void 0!==r?r:"");return s&&!(null==u?void 0:u.sound)}}));i.bX.addFeature(r.p,o.F,(function(){return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,s.Zy)(Se)];case 1:return e.sent(),[4,(0,s.Zy)(St)];case 2:return e.sent(),[4,(0,s.Zy)(Be)];case 3:return e.sent(),[4,(0,s.Zy)(Me)];case 4:return e.sent(),[4,(0,s.Zy)(m)];case 5:return e.sent(),[2]}}))}))},74542:function(e,t,n){"use strict";n.d(t,{G:function(){return _},F:function(){return y}});var i=n(44229),r=n(72995),o=n(58932),a=n(4291),s=n(74010),u=n(89103),c=n(43566),l=n(27121);function d(e,t){var n;return null!==(n=e.articles[t])&&void 0!==n?n:{article:null,loading:s.U.None,loadingTags:[]}}var h=(0,u.vy)({articles:{}},(0,u.po)(c.YC,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{articles:{}})})),(0,u.po)(l.GV,(function(e,t){var n,i=t.payload,r=i.articleId,a=i.loadingTags;return(0,o.Cl)((0,o.Cl)({},e),{articles:(0,o.Cl)((0,o.Cl)({},e.articles),(n={},n[r]=(0,o.Cl)((0,o.Cl)({},d(e,r)),{loading:s.U.Pending,loadingTags:a}),n))})})),(0,u.po)(l.Bq,(function(e,t){var n,i,r,a=t.payload.article,u=a.id,c=null===(i=e.articles[u])||void 0===i?void 0:i.article;return null===a.issue&&0===a.paragraphs.length&&c&&c.issue&&(null===(r=c.paragraphs)||void 0===r?void 0:r.length)>0?e:(0,o.Cl)((0,o.Cl)({},e),{articles:(0,o.Cl)((0,o.Cl)({},e.articles),(n={},n[u]={article:a,loading:s.U.Done,loadingTags:[]},n))})})),(0,u.po)(l.YJ,(function(e,t){var n,i=t.payload.articleId;return(0,o.Cl)((0,o.Cl)({},e),{articles:(0,o.Cl)((0,o.Cl)({},e.articles),(n={},n[i]=(0,o.Cl)((0,o.Cl)({},d(e,i)),{loading:s.U.Failed,loadingTags:[]}),n))})})),(0,u.po)(l.Y3,(function(e,t){var n,i=t.payload,r=i.articleId,a=i.article,s=d(e,r),u=s.article;return u?(0,o.Cl)((0,o.Cl)({},e),{articles:(0,o.Cl)((0,o.Cl)({},e.articles),(n={},n[r]=(0,o.Cl)((0,o.Cl)({},s),{article:(0,o.Cl)((0,o.Cl)({},u),a)}),n))}):e})),(0,u.po)(l.rh,(function(e,t){var n,i,r=t.payload.articleUpdates,a={},s=!1;try{for(var u=(0,o.Ju)(r),c=u.next();!c.done;c=u.next()){var l=c.value,h=l.articleId,f=d(e,h).article;f&&(a[h]=(0,o.Cl)((0,o.Cl)({},e.articles[h]),{article:(0,o.Cl)((0,o.Cl)({},f),l)}),s=!0)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return s?(0,o.Cl)((0,o.Cl)({},e),{articles:(0,o.Cl)((0,o.Cl)({},e.articles),a)}):e})),(0,u.po)(l.TO,(function(e,t){var n,i,r,u,c=t.payload.articles,l=(0,o.Cl)({},e.articles),d=!1;try{for(var h=(0,o.Ju)(c),f=h.next();!f.done;f=h.next()){var p=f.value,m=p.id;a(p,null===(r=l[m])||void 0===r?void 0:r.article)||(d=!0,l[m]={article:(0,o.Cl)((0,o.Cl)({},null===(u=l[m])||void 0===u?void 0:u.article),p),loading:s.U.Done,loadingTags:[]})}}catch(e){n={error:e}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}return d?(0,o.Cl)((0,o.Cl)({},e),{articles:l}):e}))),f=n(57559);function p(e,t){return t in e.bookmarks?e.bookmarks[t]:{status:s.U.None,bookmarks:[]}}var m=(0,u.vy)({bookmarks:{},providers:{},previews:{}},(0,u.po)(f.kS,(function(e,t){var n,i=t.payload,r=(0,o.Cl)((0,o.Cl)({},p(e,i.articleId)),{status:s.U.Pending});return(0,o.Cl)((0,o.Cl)({},e),{bookmarks:(0,o.Cl)((0,o.Cl)({},e.bookmarks),(n={},n[i.articleId]=r,n))})})),(0,u.po)(f.Tr,(function(e,t){var n,i=t.payload,r=(0,o.Cl)((0,o.Cl)({},p(e,i.articleId)),{status:s.U.Done,bookmarks:i.bookmarks});return(0,o.Cl)((0,o.Cl)({},e),{bookmarks:(0,o.Cl)((0,o.Cl)({},e.bookmarks),(n={},n[i.articleId]=r,n))})})),(0,u.po)(f.Uf,(function(e,t){var n,i=t.payload,r=(0,o.Cl)((0,o.Cl)({},p(e,i.articleId)),{status:s.U.Failed});return(0,o.Cl)((0,o.Cl)({},e),{bookmarks:(0,o.Cl)((0,o.Cl)({},e.bookmarks),(n={},n[i.articleId]=r,n))})})),(0,u.po)(c.YC,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{previews:{},providers:{}})})),(0,u.po)(f.DE,(function(e,t){var n,i,r=t.payload,a=r.articleId;return(0,o.Cl)((0,o.Cl)({},e),{previews:(0,o.Cl)((0,o.Cl)({},e.previews),(n={},n[a]=r.preview,n)),providers:(0,o.Cl)((0,o.Cl)({},e.providers),(i={},i[a]={supported:r.supported,status:s.U.Done},i))})})),(0,u.po)(f.fk,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{bookmarks:{}})}))),g=n(84677),v=(0,u.vy)({articlesSocialMeta:{}},(0,u.po)(g._3,(function(e,t){var n=t.payload.articleSocialMetaUpdates,i=e.articlesSocialMeta,r=!1,a=n.reduce((function(e,t){var n,i,a,s,u=t.articleId,c=t.socialMetadataUpdate,l=e[u],d=(n=l,i=c,a={},s=!1,Number.isInteger(i.commentsCount)&&i.commentsCount!==(null==n?void 0:n.commentsCount)&&(a.commentsCount=i.commentsCount,s=!0),Number.isInteger(i.upVotes)&&i.upVotes!==(null==n?void 0:n.upVotes)&&(a.upVotes=i.upVotes,s=!0),Number.isInteger(i.downVotes)&&i.downVotes!==(null==n?void 0:n.downVotes)&&(a.downVotes=i.downVotes,s=!0),s?(0,o.Cl)((0,o.Cl)({},n),a):n);return d!==l&&(r=!0,e[u]=d),e}),(0,o.Cl)({},i));return r?(0,o.Cl)((0,o.Cl)({},e),{articlesSocialMeta:a}):e}))),y=(0,i.HY)({articles:h,share:m,social:v}),_=function(e){return e[r.p]}},12753:function(e,t,n){"use strict";var i;n.d(t,{m:function(){return i}}),function(e){e.ArticleContextMenu="article.actionmenu",e.ArticleShareContextMenu="article.share.actionmenu",e.ArticlePrintContextMenu="article.print.actionmenu",e.ArticleTranslationContextMenu="article.translation.actionmenu",e.ArticleTocContextMenu="article.toc.actionmenu",e.ArticleSaveToCollectionContextMenu="article.saveToCollection.actionmenu"}(i||(i={}))},88406:function(e,t,n){"use strict";n.d(t,{b:function(){return r}});var i=n(38053);function r(e){var t=e.id,n=e.primaryArticleId;return n||(0,i.c)(t),n}},38053:function(e,t,n){"use strict";n.d(t,{c:function(){return r}});var i=n(30212);function r(e){(0,i.z)(new Error("articlePrimaryIdMissing::Article primary id missing for article id: ".concat(e)))}},75054:function(e,t,n){"use strict";n.d(t,{E9:function(){return A},Gu:function(){return m},LY:function(){return s},Ok:function(){return f},Px:function(){return g},Py:function(){return p},Xd:function(){return x},Y8:function(){return y},Yj:function(){return b},Yl:function(){return S},eF:function(){return a},er:function(){return v},fY:function(){return I},gm:function(){return w},hZ:function(){return C},ng:function(){return h},nq:function(){return u},tk:function(){return k},tl:function(){return _},uF:function(){return T},v2:function(){return P}});var i=n(69463),r=n(25778),o=new i.B,a=o.pipe((0,r.p)((function(e){return"before"===e.type}))),s=o.pipe((0,r.p)((function(e){return"after"===e.type})));function u(e,t){o.next({type:e,authContext:t})}var c=new i.B;function l(e){return function(){for(var t=[],n=0;n0}},61929:function(e,t,n){"use strict";n.d(t,{s:function(){return s}});var i=n(58932),r=n(53308),o=n(3915),a=n(61890);function s(){return(0,i.sH)(this,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:if(!(0,a.x)())throw new Error("Cannot get profile for anonymous user.");return[4,(0,r.lx)("social","profiles/current")];case 1:return e=t.sent(),[2,(0,o.C)(e)]}}))}))}},84785:function(e,t,n){"use strict";n.d(t,{y:function(){return i}});var i="@pressreader/authentication-core"},18905:function(e,t,n){"use strict";n.d(t,{AC:function(){return m},DL:function(){return T},F:function(){return y},Fz:function(){return p},II:function(){return v},Op:function(){return h},PW:function(){return w},Qm:function(){return x},RX:function(){return g},Tk:function(){return d},Tm:function(){return A},W6:function(){return S},YC:function(){return C},Yg:function(){return i},_o:function(){return _},aT:function(){return l},dp:function(){return c},gx:function(){return I},hl:function(){return s},iC:function(){return u},of:function(){return f},tZ:function(){return P},zp:function(){return b}});var i,r=n(89103),o=n(84785),a="".concat(o.y,"/common/");!function(e){e[e.Unknown=0]="Unknown",e[e.Login=1]="Login",e[e.Logout=2]="Logout",e[e.SignUp=3]="SignUp"}(i||(i={}));var s=(0,r.lQ)("".concat(a,"initialized")),u=(0,r.lQ)("".concat(a,"login")),c=(0,r.lQ)("".concat(a,"login_began")),l=(0,r.lQ)("".concat(a,"login_done")),d=(0,r.lQ)("".concat(a,"login_failed")),h=(0,r.lQ)("".concat(a,"logout_request")),f=(0,r.lQ)("".concat(a,"logout_began")),p=(0,r.lQ)("".concat(a,"logout_done")),m=(0,r.lQ)("".concat(a,"logout_failed")),g=(0,r.lQ)("".concat(a,"signup")),v=(0,r.lQ)("".concat(a,"signup_began")),y=(0,r.lQ)("".concat(a,"signup_done")),_=(0,r.lQ)("".concat(a,"signup_failed")),b=(0,r.lQ)("".concat(a,"reset_auth_state")),w=(0,r.lQ)("".concat(a,"user_change_began")),C=(0,r.lQ)("".concat(a,"user_change_done")),A=(0,r.lQ)("".concat(a,"user_change_failed")),I=(0,r.lQ)("".concat(a,"recover_pwd")),S=(0,r.lQ)("".concat(a,"pwd_recovery_began")),P=(0,r.lQ)("".concat(a,"pwd_recovery_done")),x=(0,r.lQ)("".concat(a,"pwd_recovery_failed")),T=(0,r.lQ)("".concat(a,"user_avatar_changed"))},37654:function(e,t,n){"use strict";n.d(t,{DL:function(){return i.DL},F:function(){return i.F},Fz:function(){return i.Fz},IZ:function(){return r.IZ},Le:function(){return r.Le},Op:function(){return i.Op},PW:function(){return i.PW},RX:function(){return i.RX},Tk:function(){return i.Tk},XX:function(){return r.XX},YC:function(){return i.YC},Yg:function(){return i.Yg},_o:function(){return i._o},aT:function(){return i.aT},hl:function(){return i.hl},iC:function(){return i.iC},zp:function(){return i.zp}});var i=n(18905),r=n(55635)},55635:function(e,t,n){"use strict";n.d(t,{IZ:function(){return a},Le:function(){return u},U_:function(){return f},Vi:function(){return c},XX:function(){return s},_:function(){return h},_Z:function(){return l},rK:function(){return d}});var i=n(89103),r=n(84785),o="".concat(r.y,"/login/"),a=(0,i.lQ)("".concat(o,"authentication_request")),s=(0,i.lQ)("".concat(o,"authentication_done")),u=(0,i.lQ)("".concat(o,"authentication_error")),c=(0,i.lQ)("".concat(o,"resend_verification_email")),l=(0,i.lQ)("".concat(o,"max_number_of_emails_reached")),d=(0,i.lQ)("".concat(o,"check_is_enail_verified")),h=(0,i.lQ)("".concat(o,"registration_status_updated")),f=(0,i.lQ)("".concat(o,"reset_registration_status"))},43566:function(e,t,n){"use strict";n.d(t,{B6:function(){return u.B6},DL:function(){return s.DL},F:function(){return s.F},Fz:function(){return s.Fz},IZ:function(){return s.IZ},Le:function(){return s.Le},Op:function(){return s.Op},PW:function(){return s.PW},RX:function(){return s.RX},Tk:function(){return s.Tk},VL:function(){return u.VL},VW:function(){return u.VW},Vj:function(){return u.Vj},XX:function(){return s.XX},YC:function(){return s.YC},Yg:function(){return s.Yg},_o:function(){return s._o},aT:function(){return s.aT},hl:function(){return s.hl},iC:function(){return s.iC},mB:function(){return u.mB},zp:function(){return s.zp}});var i=n(13981),r=n(84785),o=n(15634),a=n(12175),s=n(37654),u=n(86011);i.bX.addFeature(r.y,o.F,a.f)},15634:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var i=n(58932),r=n(89103),o=n(18905),a=n(55635),s=n(50463),u={initialized:!1,authInProgress:!1,lastAuthError:null,lastRecoveryEmailSentTo:null,user:(0,s.r)(),userSettings:(0,s.e)(),maxNumberOfEmailsReached:!1,emailVerified:!1},c=(0,r.vy)(u,(0,r.po)(o.hl,(function(e,t){return(0,i.Cl)((0,i.Cl)({},e),{initialized:!0,user:t.payload.user,userSettings:t.payload.userSettings})})),(0,r.po)(o.aT,(function(e,t){return(0,i.Cl)((0,i.Cl)({},e),{user:t.payload.user,userSettings:t.payload.userSettings})})),(0,r.po)(o.F,(function(e,t){return(0,i.Cl)((0,i.Cl)({},e),{user:t.payload.user,userSettings:t.payload.userSettings})})),(0,r.po)(o.Fz,(function(e){return(0,i.Cl)((0,i.Cl)({},e),{user:(0,s.r)(),userSettings:(0,s.e)()})})),(0,r.po)(o.PW,(function(e){return(0,i.Cl)((0,i.Cl)({},e),{authInProgress:!0,lastAuthError:null})})),(0,r.po)(o.YC,(function(e){return(0,i.Cl)((0,i.Cl)({},e),{authInProgress:!1,lastAuthError:null})})),(0,r.po)(o.Tm,(function(e){return(0,i.Cl)((0,i.Cl)({},e),{authInProgress:!1})})),(0,r.po)(o.Tk,(function(e,t){return(0,i.Cl)((0,i.Cl)({},e),{lastAuthError:t.payload.error})})),(0,r.po)(o.AC,(function(e,t){return(0,i.Cl)((0,i.Cl)({},e),{lastAuthError:t.payload.error})})),(0,r.po)(o._o,(function(e,t){return(0,i.Cl)((0,i.Cl)({},e),{lastAuthError:t.payload.error})})),(0,r.po)(o.W6,(function(e){return(0,i.Cl)((0,i.Cl)({},e),{lastAuthError:null})})),(0,r.po)(o.tZ,(function(e,t){return(0,i.Cl)((0,i.Cl)({},e),{lastAuthError:null,lastRecoveryEmailSentTo:t.payload.email})})),(0,r.po)(o.Qm,(function(e,t){return(0,i.Cl)((0,i.Cl)({},e),{lastAuthError:{message:t.payload.error}})})),(0,r.po)(o.zp,(function(e){return(0,i.Cl)((0,i.Cl)({},e),{lastAuthError:null,lastRecoveryEmailSentTo:null})})),(0,r.po)(o.DL,(function(e,t){return(0,i.Cl)((0,i.Cl)({},e),{user:(0,i.Cl)((0,i.Cl)({},e.user),{avatarImageId:t.payload.imageId})})})),(0,r.po)(a._Z,(function(e){return(0,i.Cl)((0,i.Cl)({},e),{maxNumberOfEmailsReached:!0})})),(0,r.po)(a._,(function(e){return(0,i.Cl)((0,i.Cl)({},e),{emailVerified:!0})})),(0,r.po)(a.U_,(function(e){return(0,i.Cl)((0,i.Cl)({},e),{emailVerified:!1})})))},12175:function(e,t,n){"use strict";n.d(t,{f:function(){return B}});var i=n(58932),r=n(44834),o=n(78698),a=n(70113),s=n(61890),u=n(61929),c=n(71183),l=n(75054),d=n(58323),h=n(52451),f=n(15263),p=n(28809),m=n(30212),g=n(58735),v=n(80835),y=n(40657),_=n(52518),b=n(36439),w=n(18905),C=n(55635),A=n(75842),I=n(50463);function S(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n,r,o,a;return(0,i.YH)(this,(function(u){switch(u.label){case 0:return e=(0,s.x)()?y.Jt("shareEmail",null):Promise.resolve(null),t=_.J(),[4,Promise.all([e,t])];case 1:return n=i.zs.apply(void 0,[u.sent(),2]),r=n[0],o=n[1],a=o.following,[2,{feedSettings:{locales:o.locales,following:a},shareEmail:r}]}}))}))}function P(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n,r,o;return(0,i.YH)(this,(function(a){switch(a.label){case 0:return(0,s.x)()?[4,Promise.all([(0,u.s)(),S()])]:[2,{user:(0,I.r)(),userSettings:(0,I.e)()}];case 1:return e=i.zs.apply(void 0,[a.sent(),2]),t=e[0],n=e[1],0===(r=t.nickname).indexOf("nickname")&&(r=t.displayName||t.nickname),[2,{user:{id:t.profileId||t.profileName,enAccountNumber:t.enAccountNumber,userKey:"".concat(g.userKey()),name:r,displayName:t.displayName,avatarImageId:t.avatarImageId,photo:{url:null!==(o=t.photoUrl)&&void 0!==o?o:""},email:t.email,isAuthenticated:!0,enableServiceEmails:t.enableServiceEmails,enablePromotionalEmails:t.enablePromotionalEmails,refNumber:t.refNumber},userSettings:n}]}}))}))}function x(e){var t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:if("email"!==(t=e.payload.loginAs).system)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,r.T1)(c.Jv,{userName:t.email,password:t.password,enableAutologin:t.autologin})];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),(0,m.z)(n),[3,4];case 4:return[2]}}))}function T(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,r.T1)(c.CI)];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),(0,m.z)(e),[3,3];case 3:return[2]}}))}function k(e){var t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:if((t=e.payload.signUpAs).system!==h.K.Email)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,r.T1)(c.Hh,{emailAddress:t.email,password:t.password,firstName:t.firstName,lastName:t.lastName,enablePromotional:t.emailPromo,enableService:t.emailService,libraryUser:t.libraryUser,returnUrl:t.returnUrl})];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),(0,m.z)(n),[3,4];case 4:return[2]}}))}function E(e){var t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:t=e.payload.email,i.label=1;case 1:return i.trys.push([1,5,,7]),[4,(0,r.yJ)((0,w.W6)({email:t}))];case 2:return i.sent(),[4,(0,r.T1)(c.Aw,{userName:t})];case 3:return i.sent(),[4,(0,r.yJ)((0,w.tZ)({email:t}))];case 4:return i.sent(),[3,7];case 5:return n=i.sent(),[4,(0,r.yJ)((0,w.Qm)({email:t,error:(0,b.u)(n)}))];case 6:return i.sent(),[3,7];case 7:return[2]}}))}function M(e){return e.login?f.Y.Login:e.logout?f.Y.Logout:e.signup?f.Y.SignUp:f.Y.Unknown}function D(){var e,t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,(0,r.O4)({login:(0,r.s)(w.dp),logout:(0,r.s)(w.of),signup:(0,r.s)(w.II)})];case 1:return e=i.sent(),[4,(0,r.yJ)((0,w.PW)({reason:M(e)}))];case 2:return i.sent(),[4,(0,r.O4)({done:(0,r.O4)({login:(0,r.s)(w.aT),logout:(0,r.s)(w.Fz),signup:(0,r.s)(w.F)}),failed:(0,r.O4)({login:(0,r.s)(w.Tk),logout:(0,r.s)(w.AC),signup:(0,r.s)(w._o)})})];case 3:return(t=i.sent()).done?[4,(0,r.T1)(p.cD)]:[3,6];case 4:return i.sent(),[4,(0,r.yJ)((0,w.YC)({reason:M(t.done)}))];case 5:i.sent(),i.label=6;case 6:return t.failed?(n=t.failed.login||t.failed.logout||t.failed.signup,[4,(0,r.yJ)((0,w.Tm)({reason:M(t.failed),error:n.payload.error}))]):[3,8];case 7:i.sent(),i.label=8;case 8:return[3,0];case 9:return[2]}}))}function N(){var e,t,n,a,s;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,(0,r.Lt)(o.nw)];case 1:return i.sent()!==v.Z.Voyager?[3,3]:(e=(0,I.r)(),t=(0,I.e)(),[4,(0,r.yJ)((0,w.hl)({user:e,userSettings:t}))]);case 2:case 5:return i.sent(),[2];case 3:return[4,(0,r.T1)(P)];case 4:return n=i.sent(),a=n.user,s=n.userSettings,[4,(0,r.yJ)((0,w.hl)({user:a,userSettings:s}))]}}))}function L(e){var t,n,o,a=e.payload,s=a.system,u=a.provider;return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,r.T1)(P)];case 1:return t=e.sent(),n=t.user,o=t.userSettings,[4,(0,r.yJ)((0,w.aT)({user:n,userSettings:o,system:s,provider:u}))];case 2:return e.sent(),[2]}}))}function V(e){var t,n,o,a=e.payload,s=a.sponsorId,u=a.analyticsCtx,c=a.emailValidationRequired,l=a.email;return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,r.T1)(P)];case 1:return t=e.sent(),n=t.user,o=t.userSettings,[4,(0,r.yJ)((0,w.F)({user:n,userSettings:o,emailValidationRequired:!!s||!!c,email:l,analyticsCtx:u}))];case 2:return e.sent(),[2]}}))}function R(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,r.jP)((0,a.g)(l.gm),(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,r.yJ)((0,w.dp)({}))];case 1:return e.sent(),[2]}}))}))];case 1:return e.sent(),[4,(0,r.jP)((0,a.g)(l.hZ),L)];case 2:return e.sent(),[4,(0,r.jP)((0,a.g)(l.E9),(function(e){var t=e.payload,n=t.error,o=t.system;return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,r.yJ)((0,w.Tk)({error:n,system:o}))];case 1:return e.sent(),[2]}}))}))];case 3:return e.sent(),[4,(0,r.jP)((0,a.g)(l.fY),(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,r.yJ)((0,w.II)({}))];case 1:return e.sent(),[2]}}))}))];case 4:return e.sent(),[4,(0,r.jP)((0,a.g)(l.Yl),V)];case 5:return e.sent(),[4,(0,r.jP)((0,a.g)(l.v2),(function(e){var t=e.payload.error;return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,r.yJ)((0,w._o)({error:t}))];case 1:return e.sent(),[2]}}))}))];case 6:return e.sent(),[4,(0,r.jP)((0,a.g)(l.Xd),(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,r.yJ)((0,w.of)())];case 1:return e.sent(),[2]}}))}))];case 7:return e.sent(),[4,(0,r.jP)((0,a.g)(l.uF),(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,r.yJ)((0,w.Fz)())];case 1:return e.sent(),[2]}}))}))];case 8:return e.sent(),[4,(0,r.jP)((0,a.g)(l.tk),(function(e){var t=e.payload.error;return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,r.yJ)((0,w.AC)({error:t}))];case 1:return e.sent(),[2]}}))}))];case 9:return e.sent(),[2]}}))}function H(e){var t,n,o=e.payload;return(0,i.YH)(this,(function(e){switch(e.label){case 0:t=o.email,e.label=1;case 1:return e.trys.push([1,5,,6]),[4,(0,r.T1)(c.np,t)];case 2:return e.sent()!==d.Bq.MaxNumberOfEmailsReached?[3,4]:[4,(0,r.yJ)((0,C._Z)())];case 3:e.sent(),e.label=4;case 4:return[3,6];case 5:return n=e.sent(),(0,m.z)("Resend email verification error.",n),[3,6];case 6:return[2]}}))}function F(e){var t,n,o,a=e.payload;return(0,i.YH)(this,(function(e){switch(e.label){case 0:return t=a.email,n=a.password,[4,(0,r.Lt)(A.V$)];case 1:if(e.sent())return[2];e.label=2;case 2:return e.trys.push([2,11,,12]),[4,(0,r.T1)(c.iY,t)];case 3:return e.sent()!==d.m7.Registered?[2]:[4,(0,r.yJ)((0,w.iC)({loginAs:{email:t,password:n,system:"email",autologin:!0}}))];case 4:return e.sent(),[4,(0,r.O4)({done:(0,r.s)(w.aT),failed:(0,r.s)(w.Tk)})];case 5:return e.sent().done?[4,(0,r.s)(w.YC)]:[3,8];case 6:return e.sent(),[4,(0,r.yJ)((0,C._)())];case 7:return e.sent(),[3,10];case 8:return[4,(0,r.s)(w.Tm)];case 9:e.sent(),e.label=10;case 10:return[3,12];case 11:return o=e.sent(),(0,m.z)("Check email verification error.",o),[3,12];case 12:return[2]}}))}function B(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[5,(0,i.Ju)(R())];case 1:return e.sent(),[4,(0,r.Zy)(D)];case 2:return e.sent(),[4,(0,r.jP)(o.Ph,N)];case 3:return e.sent(),[4,(0,r.IJ)(w.iC,x)];case 4:return e.sent(),[4,(0,r.IJ)(w.Op,T)];case 5:return e.sent(),[4,(0,r.IJ)(w.RX,k)];case 6:return e.sent(),[4,(0,r.IJ)(w.gx,E)];case 7:return e.sent(),[4,(0,r.jP)(C.Vi,H)];case 8:return e.sent(),[4,(0,r.jP)(C.rK,F)];case 9:return e.sent(),[2]}}))}},75842:function(e,t,n){"use strict";n.d(t,{B6:function(){return c},V$:function(){return d},VL:function(){return u},VW:function(){return a},Vj:function(){return l},mB:function(){return s}});var i=n(29978),r=n(84785),o=function(e){return e[r.y]},a=(0,i.Mz)(o,(function(e){return e.initialized})),s=(0,i.Mz)(o,(function(e){return e.user})),u=(0,i.Mz)(o,(function(e){return e.userSettings})),c=(0,i.Mz)(u,(function(e){return e&&e.feedSettings&&e.feedSettings.locales||[]})),l=(0,i.Mz)(o,(function(e){return e.authInProgress})),d=((0,i.Mz)(o,(function(e){return e.lastAuthError})),(0,i.Mz)(s,(function(e){return Boolean(null==e?void 0:e.isAuthenticated)})),(0,i.Mz)(o,(function(e){return e.lastRecoveryEmailSentTo})),(0,i.Mz)(o,(function(e){return e.maxNumberOfEmailsReached})),(0,i.Mz)(o,(function(e){return e.emailVerified})))},86011:function(e,t,n){"use strict";n.d(t,{B6:function(){return i.B6},VL:function(){return i.VL},VW:function(){return i.VW},Vj:function(){return i.Vj},mB:function(){return i.mB}});var i=n(75842)},50463:function(e,t,n){"use strict";function i(){return{id:"anon_user_id",enAccountNumber:"",userKey:"anon_user_key",name:"anon_user",avatarImageId:"",photo:{url:null},email:"",isAuthenticated:!1,enableServiceEmails:!1,enablePromotionalEmails:!1}}function r(){return{feedSettings:{locales:[],following:[]},shareEmail:null}}n.d(t,{e:function(){return r},r:function(){return i}})},52451:function(e,t,n){"use strict";var i;n.d(t,{K:function(){return i}}),function(e){e.Library="library",e.Email="email",e.Bell="bell",e.Facebook="facebook",e.Twitter="twitter",e.Google="google",e.Instapaper="instapaper",e.Onenote="onenote",e.Evernote="evernote",e.RBDigital="rbdigital"}(i||(i={}))},51056:function(e,t,n){"use strict";n.d(t,{Ac:function(){return s},YF:function(){return l},YS:function(){return u},hL:function(){return o}});var i,r,o,a=n(20430);!function(e){e.FACEBOOK="facebook",e.TWITTER="twitter",e.GOOGLE="google",e.EVERNOTE="evernote",e.INSTAPAPER="instapaper",e.ONENOTE="onenote",e.SIP="library",e.ADFS="adfs",e.BELL="bell",e.PIANO="piano",e.OPENATHENS="openathens",e.EMAIL="email",e.BARCODE="barcode",e.VIDM="vidm",e.OPENIDCONNECT="openidconnect",e.URLREFERRER="urlreferrer",e.SPYDUS="spydus",e.RBDIGITAL="rbdigital",e.FINNA="finna",e.AXIELL="axiell",e.CAPITA="capita",e.SAML="saml",e.LCF="lcf",e.SIERRA="sierra",e.APPLE="apple",e.AUTH0="auth0"}(o||(o={}));var s,u=Object.freeze({FACEBOOK:"facebook",TWITTER:"twitter",GOOGLE:"google",INSTAPAPER:"instapaper",ONENOTE:"onenote",EVERNOTE:"evernote",LIBRARY:"library",BELL:"bell",PIANO:"piano",RBDIGITAL:"rbdigital",APPLE:"apple",AUTH0:"auth0",OPENIDCONNECT:"openidconnect"}),c=((i={})[o.SIP]=0,i[o.RBDIGITAL]=1,i[o.ADFS]=2,i[o.OPENATHENS]=3,i[o.EMAIL]=4,i[o.BARCODE]=5,i[o.VIDM]=6,i[o.OPENIDCONNECT]=7,i[o.SPYDUS]=8,i[o.FINNA]=9,i[o.AXIELL]=11,i[o.CAPITA]=12,i[o.SAML]=13,i[o.LCF]=14,i[o.SIERRA]=15,i.byValue={0:o.SIP,2:o.ADFS,3:o.OPENATHENS,4:o.EMAIL,5:o.BARCODE,6:o.VIDM,7:o.OPENIDCONNECT,8:o.SPYDUS,9:o.FINNA,11:o.AXIELL,12:o.CAPITA,13:o.SAML,14:o.LCF,15:o.SIERRA},Object.freeze(((r={})[o.FACEBOOK]=u.FACEBOOK,r[o.TWITTER]=u.TWITTER,r[o.GOOGLE]=u.GOOGLE,r[o.INSTAPAPER]=u.INSTAPAPER,r[o.ONENOTE]=u.ONENOTE,r[o.EVERNOTE]=u.EVERNOTE,r[o.BELL]=u.BELL,r[o.PIANO]=u.PIANO,r[o.AUTH0]=u.AUTH0,r[o.SIP]=u.LIBRARY,r[o.ADFS]=u.LIBRARY,r[o.VIDM]=u.LIBRARY,r[o.OPENIDCONNECT]=u.LIBRARY,r[o.OPENATHENS]=u.LIBRARY,r[o.CAPITA]=u.LIBRARY,r[o.AXIELL]=u.LIBRARY,r[o.FINNA]=u.LIBRARY,r[o.SPYDUS]=u.LIBRARY,r[o.LCF]=u.LIBRARY,r[o.SIERRA]=u.LIBRARY,r[o.RBDIGITAL]=u.RBDIGITAL,r[o.SAML]=u.LIBRARY,r[o.APPLE]=u.APPLE,r)));Object.freeze(a(c)),function(e){e.SIGNUP="signup",e.SHARING="sharing"}(s||(s={}));var l=Object.freeze({CANCELLED:"Cancelled",AUTHORIZATION_DENIED:"AuthorizationDenied",ACCESSTOKEN_EXPIRED:"TokenExpired",SIGNIN_ACCOUNT_EXISTS:"SignInAccountExists",LAST_SIGNIN_ACCOUNT:"LastAccountForSignIn",USERNAME_IN_USE:"UserNameInUse",EXTERNAL_USERID_MISMATCH:"AccessTokenFromDiffAccount",LINKED_TO_ANOTHER_ACCOUNT:"LinkedToAnotherAccount",UNEXPECTED_ERROR:"UnexpectedError"})},15263:function(e,t,n){"use strict";var i;n.d(t,{Y:function(){return i}}),function(e){e[e.Unknown=0]="Unknown",e[e.Login=1]="Login",e[e.Logout=2]="Logout",e[e.SignUp=3]="SignUp"}(i||(i={}))},1591:function(e,t,n){"use strict";n.d(t,{cs:function(){return u}});var i,r=n(58932),o=n(44834),a=n(43566);!function(e){e[e.V1=0]="V1",e[e.V2=1]="V2"}(i||(i={}));var s={login:!0,signUp:!1};function u(e,t){var n,u;return void 0===e&&(e={dialogVersion:i.V1}),void 0===t&&(t=s),(0,r.YH)(this,(function(i){switch(i.label){case 0:return[4,(0,o.Lt)(a.mB)];case 1:return i.sent().isAuthenticated?[2,!0]:(n=e.dialogVersion,u=e.introTextResourceId,[4,(0,o.yJ)((0,a.IZ)({dialogVersion:n,introTextResourceId:u,startWith:t}))]);case 2:return i.sent(),[4,(0,o.s)(a.XX)];case 3:return[2,i.sent().payload.authenticationResult]}}))}},19347:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var i=",";function r(e,t,n){!0===n?e[t]="1":!1===n&&(e[t]="0")}function o(e){var t,n,o,a,s={};return e?(e.mainCid&&(s.main=e.mainCid),e.text&&(s.q=e.text),e.startsWith&&(s.StartsWith=e.startsWith),(null===(t=e.cids)||void 0===t?void 0:t.length)&&(s.cid=e.cids.join(i)),(null===(n=e.hasCategories)||void 0===n?void 0:n.length)&&(s.has=e.hasCategories.join(i)),(null===(o=e.excCategories)||void 0===o?void 0:o.length)&&(s.exc=e.excCategories.join(i)),(null===(a=e.inCategories)||void 0===a?void 0:a.length)&&(Array.isArray(e.inCategories[0])?s.in=e.inCategories.map((function(e){return e.join(i)})):s.in=e.inCategories.join(i)),r(s,"supplement",e.isSupplement),r(s,"free",e.isFree),r(s,"cre",e.cre),r(s,"availability",e.available),s):s}},77813:function(e,t,n){"use strict";n.d(t,{DS:function(){return a},Pg:function(){return o},oD:function(){return s}});var i=n(58932),r=function(e){return e.iso?e.iso.toLowerCase():e.iso};function o(e){var t=(0,i.Cl)({},e),n=t.categories?t.categories.map(o):[];return delete t.categories,(0,i.Cl)((0,i.Cl)({},t),{items:n,iso:r(e)})}function a(e,t){var n=o(e);return n.parentNavGroupItemId=t,n}function s(e,t){var n=(0,i.Cl)({},e),o=n.categories?n.categories.map((function(t){return s(t,e.id)})):[];return delete n.categories,(0,i.Cl)((0,i.Cl)({},n),{items:o,iso:r(e),parentId:t})}},4797:function(e,t,n){"use strict";n.d(t,{AL:function(){return p},DT:function(){return l},M1:function(){return m},QN:function(){return d},ki:function(){return h},n0:function(){return f}});var i=n(58932),r=n(41e3),o=n(83489),a=n(19347),s=n(26906),u=n(53308),c=n(77813);function l(e,t,n,r){return(0,i.sH)(this,void 0,void 0,(function(){var o,s;return(0,i.YH)(this,(function(c){switch(c.label){case 0:return o={root:e},t&&(Array.isArray(t)?o.path=t:o.pathUri=t),r&&(o.orderBy=r),s=(0,a.m)(n),o=(0,i.Cl)((0,i.Cl)({},o),s),[4,(0,u.lx)("catalog","navigationgroups",o)];case 1:return[2,c.sent().items]}}))}))}function d(e){return l(e.rootGroupNames,e.path,e.filters,e.orderBy)}function h(e,t,n){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,l(e,[],t,n)];case 1:return[2,i.sent().map(c.Pg)]}}))}))}function f(e,t){return(0,i.sH)(this,void 0,void 0,(function(){var n,r,a,s;return(0,i.YH)(this,(function(u){switch(u.label){case 0:return n=t.inCategories.map((function(e){return Array.isArray(e)?e:[e]})),[4,h(e,t)];case 1:return r=u.sent(),0===n.length?[2,r]:(a=o(r,(function(e){return e.id})),s=n.map((function(r,o){var a=(0,i.Cl)((0,i.Cl)({},t),{inCategories:n.filter((function(e,t){return t!==o}))});return h(e,a)})),[4,Promise.all(s)]);case 2:return u.sent().forEach((function(e,t){var i=e.find((function(e){return e.items.some((function(e){return n[t].indexOf(e.id)>=0}))}));i&&(a[i.id]=i)})),[2,r.map((function(e){return a[e.id]}))]}}))}))}function p(e,t,n){return(0,i.sH)(this,void 0,void 0,(function(){var o,a,u,l,h,f,p,m,g,v,y,_,b,w,C,A=this;return(0,i.YH)(this,(function(I){switch(I.label){case 0:return e=e.filter((function(e){return e.items.length>1})),o=n.filter((function(t){return e.some((function(e){return e.id===s.b7.Countries&&e.items.some((function(e){return e.id===t}))}))})),(a=1===o.length?o[0]:null)?[4,d((0,i.Cl)((0,i.Cl)({},t),{rootGroupNames:[s.$I.Countries],path:(0,i.fX)((0,i.fX)([],t.path,!0),[a],!1)}))]:[3,2];case 1:(null==(h=I.sent())?void 0:h.length)&&(f=(0,c.DS)(h[0],a)).items.length>1&&(u=f.id,l=n.find((function(e){return f.items.some((function(t){return t.id===e}))})),e=(0,i.fX)((0,i.fX)([],e,!0),[f],!1)),I.label=2;case 2:return p=n.reduce((function(t,n){var i=e.find((function(e){return e.items.some((function(e){return e.id===n}))}));if(!i)return t;var r=t.find((function(e){return e.groupId===i.id}));return r||(r={groupId:i.id,items:[]},t.push(r)),r.items.push(n),t}),[]),m=(0,i.Cl)((0,i.Cl)({},t),{filters:(0,i.Cl)({},t.filters)}),(null===(C=m.filters.inCategories)||void 0===C?void 0:C.length)>0&&(Array.isArray(m.filters.inCategories[0])||(m.filters.inCategories=[m.filters.inCategories])),g=[],p.length?(v=(0,i.Cl)((0,i.Cl)({},m),{filters:(0,i.Cl)((0,i.Cl)({},m.filters),{inCategories:(0,i.fX)((0,i.fX)([],m.filters.inCategories,!0),p.map((function(e){return e.items})),!0)})}),y=d(v).then((function(e){return e.map(c.Pg)})),a?(_=d((0,i.Cl)((0,i.Cl)({},v),{rootGroupNames:[s.$I.Countries],path:(0,i.fX)((0,i.fX)([],v.path,!0),[a],!1)})).then((function(e){return(null==e?void 0:e.length)&&(0,c.DS)(e[0],a)})),g.push(Promise.all([y,_]).then((function(e){var t=e[0],n=e[1];if(n){var i=t.findIndex((function(e){return e.id===s.b7.Countries}));i>=0&&t.splice(i+1,0,n)}return t})))):g.push(y)):g.push(Promise.resolve(r(e))),g.push.apply(g,p.map((function(e){return(0,i.sH)(A,void 0,void 0,(function(){var t,n;return(0,i.YH)(this,(function(r){switch(r.label){case 0:return t=(0,i.Cl)((0,i.Cl)({},m),{filters:(0,i.Cl)((0,i.Cl)({},m.filters),{inCategories:(0,i.fX)((0,i.fX)([],m.filters.inCategories,!0),p.filter((function(t){return t!==e})).map((function(e){return e.items})),!0)})}),n=c.Pg,e.groupId===u&&(t.rootGroupNames=[s.$I.Countries],t.path=(0,i.fX)((0,i.fX)([],t.path,!0),[a],!1),n=function(e){return(0,c.DS)(e,a)}),[4,d(t)];case 1:return[2,r.sent().map(n)]}}))}))}))),[4,Promise.all(g)];case 3:return b=I.sent(),w=b[0],b.splice(0,1),p.forEach((function(t,n){var r=b[n].find((function(e){return e.id===t.groupId}));if(r){t.groupId===s.b7.Countries&&a&&l&&(r.items=r.items.filter((function(e){return e.id===a}))),t.groupId===s.b7.Countries&&a&&l&&(r.items=r.items.filter((function(e){return e.id===a}))),t.items.forEach((function(n){if(!r.items.find((function(e){return e.id===n}))){var o=e.find((function(e){return e.id===t.groupId})).items.find((function(e){return e.id===n}));r.items.push((0,i.Cl)((0,i.Cl)({},o),{publicationsCount:0}))}}));var o=w.findIndex((function(e){return e.id===t.groupId}));w.splice(o,1,r)}})),[2,w]}}))}))}function m(e){return(0,u.lx)("catalog/v1","navigationtree",{root:e})}},78897:function(e,t,n){"use strict";n.d(t,{IV:function(){return m},ny:function(){return h},So:function(){return l},xe:function(){return Y},Wc:function(){return M},s6:function(){return N},Aq:function(){return D},hC:function(){return k},X6:function(){return E},cR:function(){return V},E5:function(){return L},jg:function(){return R},t0:function(){return z},jA:function(){return j},LU:function(){return U},HD:function(){return O},F$:function(){return H},I:function(){return W}});var i=n(13981),r="libs.catalog.nav-groups",o=n(58932),a=n(56148),s=n(89103),u=n(74010),c="catalog/nav-groups",l=(0,s.lQ)("".concat(c,"/load_request")),d=(0,s.lQ)("".concat(c,"/load_began")),h=(0,s.lQ)("".concat(c,"/load_done")),f=(0,s.lQ)("".concat(c,"/load_failed")),p=(0,s.lQ)("".concat(c,"/load_cached")),m=(0,s.lQ)("".concat(c,"/catalog_changed")),g={initialized:!1,availNavGroups:(0,a.v)(),availNavGroupTree:(0,a.v)()},v=(0,s.vy)(g,(0,s.po)(m,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{availNavGroups:(0,a.v)(),availNavGroupTree:(0,a.v)()})})),(0,s.po)(d,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{initialized:!0,availNavGroups:(0,o.Cl)((0,o.Cl)({},e.availNavGroups),{status:u.U.Pending}),availNavGroupTree:(0,o.Cl)((0,o.Cl)({},e.availNavGroupTree),{status:u.U.Pending})})})),(0,s.po)(h,(function(e,t){var n=t.payload,i=n.availNavGroupTree,r=n.availNavGroups;return(0,o.Cl)((0,o.Cl)({},e),{availNavGroups:(0,o.Cl)((0,o.Cl)({},e.availNavGroups),{status:u.U.Done,entities:r,meta:{total:r.length}}),availNavGroupTree:(0,o.Cl)((0,o.Cl)({},e.availNavGroupTree),{status:u.U.Done,entities:i,meta:{total:i.length}})})})),(0,s.po)(f,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{availNavGroups:(0,o.Cl)((0,o.Cl)({},e.availNavGroups),{status:u.U.Failed}),availNavGroupTree:(0,o.Cl)((0,o.Cl)({},e.availNavGroupTree),{status:u.U.Failed})})}))),y=n(44834),_=n(43566),b=n(4797),w=n(77813),C=n(61445),A=n(29978),I=n(78698),S=n(26906),P=n(28809),x=n(80835),T=function(e){return e[r]},k=(0,A.Mz)(T,(function(e){return e.availNavGroups})),E=(0,A.Mz)(T,(function(e){return e.availNavGroups.status})),M=(0,A.Mz)(T,(function(e){return e.availNavGroupTree})),D=(0,A.Mz)(T,(function(e){return e.availNavGroupTree.status})),N=(0,A.Mz)(M,(function(e){var t={},n=function(e){e&&e.length>0&&e.forEach((function(e){t[e.id]=e,n(e.items)}))};return n(e.entities),t})),L=(0,A.Mz)(k,(function(e){return function(t,n){t=t.toLowerCase();var i=e.entities.find((function(e){return e.id===S.b7.Languages})),r=null==i?void 0:i.items.filter((function(e){return e.iso===t&&(!n||n.some((function(t){return t===e.id})))})),o=null==r?void 0:r[0];return(null==o?void 0:o.displayName)||t}})),V=(0,A.Mz)(k,(function(e){return function(t){t=t.toLowerCase();var n=e.entities.find((function(e){return e.id===S.b7.Countries})),i=null==n?void 0:n.items.find((function(e){return e.iso===t}));return(null==i?void 0:i.displayName)||t}})),R=(0,A.Mz)([P._t,I.nw],(function(e,t){var n=e("features.app.mobile.regionaleditions.enabled",!1);return t===x.Z.Voyager&&(n=!1),n})),H=(0,A.Mz)(k,(function(e){return e.status===u.U.Done})),F=(0,A.Mz)(k,(function(e){return e.entities.find((function(e){return e.id===S.b7.Categories}))})),B=(0,A.Mz)(k,(function(e){return e.entities.find((function(e){return e.id===S.b7.PublicationTypes}))})),z=((0,A.Mz)(F,B,(function(e,t){return t}),(function(e,t,n){return[S.b7.MagazinesSlug.toString(),S.b7.NewspapersSlug.toString(),S.b7.PDFBooksSlug.toString()].indexOf(n)>=0?null==t?void 0:t.items.find((function(e){return e.slug===n})):null==e?void 0:e.items.find((function(e){return e.slug===n}))})),(0,A.Mz)([P._t],(function(e){var t=e("catalog.root","");return t?t.split(","):S.n4}))),O=(0,A.Mz)([P._t],(function(e){var t=e("features.fts.root.group.names","");return t?t.split(","):S.lZ})),j=(0,A.Mz)([P._t],(function(e){return e("catalog.categories.root")||S.$I.Categories})),U=(0,A.Mz)([P._t],(function(e){return e("catalog.categories.order")})),W=(0,A.Mz)(M,(function(e,t){return t}),(function(e,t){var n;return null===(n=e.entities.find((function(e){return e.name===t})))||void 0===n?void 0:n.items}));function Y(e){return void 0===e&&(e=3),(0,o.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,y.Lt)(k)];case 1:return t.sent().status===u.U.Done?[2]:[4,(0,y.yJ)(l())];case 2:return t.sent(),[4,(0,y.s)([p,h,f])];case 3:return t.sent().type!=="".concat(f)?[3,5]:e-- >0?[4,Y(e)]:[3,5];case 4:t.sent(),t.label=5;case 5:return[2]}}))}function X(){var e,t,n,i,r,a,s;return(0,o.YH)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,6,8,12]),[4,(0,y.yJ)(d())];case 1:return o.sent(),[4,(0,y.Lt)(z)];case 2:return e=o.sent(),[4,(0,y.Lt)(U)];case 3:return t=o.sent(),[4,(0,y.T1)((function(){return Promise.all([(0,b.DT)(e,void 0,void 0,t),(0,b.M1)(e)])}))];case 4:return n=o.sent(),i=n[0],r=n[1],a=i.map(w.Pg),s=r.map((function(e){return(0,w.oD)(e)})),[4,(0,y.yJ)(h({availNavGroups:a,availNavGroupTree:s}))];case 5:return o.sent(),[3,12];case 6:return o.sent(),[4,(0,y.yJ)(f())];case 7:return o.sent(),[3,12];case 8:return[4,(0,y.KW)()];case 9:return o.sent()?[4,(0,y.yJ)(f())]:[3,11];case 10:o.sent(),o.label=11;case 11:return[7];case 12:return[2]}}))}function q(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,y.Lt)(k)];case 1:return e.sent().status!==u.U.Done?[3,3]:[4,(0,y.yJ)(p())];case 2:case 4:return e.sent(),[2];case 3:return[4,(0,y.O4)({load:X(),cancel:(0,y.s)(m)})]}}))}function G(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,y.yJ)(m())];case 1:return e.sent(),[4,(0,y.yJ)(l())];case 2:return e.sent(),[2]}}))}i.bX.addFeature(r,v,(function(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,y.IJ)(l,q)];case 1:return e.sent(),[4,(0,y.jP)([_.YC,C.B4],G)];case 2:return e.sent(),[2]}}))}))},12030:function(e,t,n){"use strict";n.d(t,{Px:function(){return u},e5:function(){return c},hz:function(){return d},jW:function(){return l}});var i=n(58932),r=n(19347),o=n(53308),a=100;function s(e){var t=e.offset,n=e.limit,o=void 0===n?a:n,s=e.orderBy,u=e.filters,c={offset:t,limit:o};s&&(c.orderBy=s.name?"".concat(s.name," ").concat(s.order):"".concat(s.order));var l=(0,r.m)(u);return(0,i.Cl)((0,i.Cl)({},c),l)}function u(e){var t=s(e);return(0,o.lx)("catalog","publications",t)}function c(e){var t=s(e);return(0,o.lx)("gifts/catalog","publications",t)}function l(e){return(0,o.lx)("catalog/v2","publications/".concat(e))}function d(){return(0,o.lx)("catalog","metadata")}},65726:function(e,t,n){"use strict";n.d(t,{C7:function(){return r},DI:function(){return a},IU:function(){return c},Jn:function(){return u},NR:function(){return l},SC:function(){return i},Ur:function(){return d},WQ:function(){return g},Xu:function(){return v},dE:function(){return h},fM:function(){return p},fR:function(){return s},nW:function(){return b},oK:function(){return _},od:function(){return y},p:function(){return m},xu:function(){return f},xw:function(){return o}});var i="features.book_support.enabled",r="features.library.books.disabled",o="features.braze_cards.enabled",a="features.catalogBodyCopy.enabled",s="app.views.catalog.books.just_added.enabled",u="ui.catalog.seeMoreLink.enabled",c="features.catalog.sort.order",l="features.catalog.categories.enabled",d="features.catalog.favorites.enabled",h="features.catalog.banners.enabled",f="features.catalog.featured.enabled",p="features.catalog.new_sections",m="features.featured_hotspot.enabled",g="features.catalog.publications.grid.layout.enabled",v="features.catalog.recentlyread.enabled",y="ui.PdfDownload.EnableDirectAcrobatDownload",_="ui.PdfDownload.EnableDirectAcrobatPageDownload",b="ui.PdfDownload.DefaultDownloadType"},35797:function(e,t,n){"use strict";n.d(t,{IK:function(){return u},NN:function(){return s},O4:function(){return o},kf:function(){return a}});var i=n(30657),r=n(26906),o=function(e){switch(e){case r.Yd.ByAlphabet:return{name:r.Xy.Name,order:r.xB.Ascending};case r.Yd.MostRecent:return{name:r.Xy.LatestIssueDate,order:r.xB.Descending};case r.Yd.Default:return{name:r.Xy.Default,order:r.xB.Ascending};case r.Yd.MostPopular:default:return{name:r.Xy.SearchRank,order:r.xB.Descending}}},a=function(e){switch(e){case i.mF.Date:return r.Yd.MostRecent;case i.mF.Relevance:default:return r.Yd.MostPopular}},s=function(e){switch(e){case i.mF.Date:return{field:"PublicationDate",reverse:!0};case i.mF.Relevance:default:return{field:"Relevance",reverse:!1}}};function u(e){switch(e){case!0:return"Sample";case!1:return"FullOrJustPurchased";default:return"none"}}},26906:function(e,t,n){"use strict";var i,r,o,a,s;n.d(t,{$I:function(){return r},Xy:function(){return s},Yd:function(){return c},b7:function(){return o},lZ:function(){return h},n4:function(){return d},sv:function(){return l},xB:function(){return a}}),function(e){e.Countries="Countries",e.Languages="Languages",e.PublicationTypes="PublicationTypes",e.Categories="BaseContentCatalog"}(r||(r={})),function(e){e.Undefined="",e.Favorites="mypublications",e.TopMagazines="topmagazines",e.MagazinesSlug="magazines",e.TopNewspapers="topnewspapers",e.NewspapersSlug="newspapers",e.PDFBooksSlug="pdfbooks",e.TopPublications="toppublications",e.TopFree="topfreepublications",e.Featured="featured",e.RecentlyRead="recentlyread",e.All="all",e.Trial="trial",e.FeaturedHotspot="featuredhotspot",e.Books="books",e.BooksGenres="genres",e.BooksSpecialCollection="special_collection",e.BooksAuthors="authors",e.BooksSeries="series",e.BaseContent="basecontent",e.Publications="publications",e.BooksMyBooks="library",e.NationalNews="national-news",e.LocalNews="local-news",e.PopularWorldwide="popular-worldwide",e.PopularInCountry="popular-in-country",e.AllNews="all-news",e.Free="free",e.MostPopular="mostpopular",e[e.Countries=656]="Countries",e[e.Languages=1032]="Languages",e[e.Categories=584]="Categories",e[e.PublicationTypes=8388608]="PublicationTypes",e[e.Magazines=150994944]="Magazines",e[e.Newspapers=142606336]="Newspapers",e[e.PDFBooks=164071058]="PDFBooks",e[e.International=938]="International",e[e.News=1124]="News"}(o||(o={})),function(e){e.Ascending="asc",e.Descending="desc",e.Default="default"}(a||(a={})),function(e){e.Name="name",e.Rank="rank",e.SearchRank="searchrank",e.LatestIssueDate="latestIssueDate",e.Default="default"}(s||(s={}));var u,c,l=((i={})[s.Name]=a.Ascending,i[s.Rank]=a.Descending,i[s.SearchRank]=a.Descending,i[s.LatestIssueDate]=a.Descending,i[s.Default]=a.Default,i),d=[r.PublicationTypes,r.Countries,r.Languages,r.Categories],h=[r.Countries,r.Languages];!function(e){e[e.List=0]="List",e[e.SmallGrid=1]="SmallGrid",e[e.Grid=2]="Grid",e[e.Newsstand=3]="Newsstand"}(u||(u={})),function(e){e[e.Default=3]="Default",e[e.ByAlphabet=0]="ByAlphabet",e[e.MostPopular=1]="MostPopular",e[e.MostRecent=2]="MostRecent"}(c||(c={}))},56716:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});var i="@pressreader/collections-popups"},87838:function(e,t,n){"use strict";n.d(t,{us:function(){return u},lF:function(){return a},XV:function(){return s},PL:function(){return c},AK:function(){return d},PV:function(){return h},mw:function(){return l}});var i=n(89103),r=n(56716),o="".concat(r.p,"/dialog_bookmark_edit/global/"),a=(0,i.lQ)("".concat(o,"save_to_collection_action/article_action")),s=(0,i.lQ)("".concat(o,"save_to_collection_action/article_done")),u=(0,i.lQ)("dialog_bookmark_edit/global/change_page_set_collection_action"),c=(0,i.lQ)("dialog_bookmark_edit/global/save_to_collection_action/issue_page"),l=(0,i.lQ)("bookmark.legacy.dialog.open.action"),d=(0,i.lQ)("bookmark.legacy.dialog.close.action"),h=(0,i.lQ)("".concat(o,"load_issue_pagesets"))},62139:function(e,t,n){"use strict";n.d(t,{GF:function(){return a},Gd:function(){return r},hk:function(){return o},md:function(){return s},pW:function(){return i}});var i="@pressreader/comments-popups",r="comments.dialog",o="add.video.dialog",a="report.user.dialog",s=20},88362:function(e,t,n){"use strict";n.d(t,{Fq:function(){return d},Wf:function(){return u},jy:function(){return a},kv:function(){return l},py:function(){return s},zr:function(){return c}});var i=n(89103),r=n(62139),o="".concat(r.pW,"/attachments/"),a=(0,i.lQ)("".concat(o,"add-image")),s=(0,i.lQ)("".concat(o,"add-video")),u=(0,i.lQ)("".concat(o,"attachment-upload-started")),c=(0,i.lQ)("".concat(o,"attachment-upload-done")),l=(0,i.lQ)("".concat(o,"attachment-upload-failed")),d=(0,i.lQ)("".concat(o,"attachment-deleted"))},18972:function(e,t,n){"use strict";n.d(t,{Aq:function(){return L},BV:function(){return x},Be:function(){return p},DN:function(){return w},FW:function(){return A},Gg:function(){return m},Jg:function(){return P},KJ:function(){return c},M3:function(){return s},TG:function(){return k},TV:function(){return E},Tq:function(){return g},Tw:function(){return D},VG:function(){return S},VW:function(){return _},Vk:function(){return T},YL:function(){return C},a$:function(){return v},b0:function(){return u},bD:function(){return l},eC:function(){return I},iX:function(){return N},kN:function(){return M},lY:function(){return a},nU:function(){return y},o$:function(){return d},oO:function(){return f},q1:function(){return b},t9:function(){return h}});var i=n(89103),r=n(62139),o="".concat(r.pW,"/comments/"),a=(0,i.lQ)("".concat(o,"load-previous-page")),s=(0,i.lQ)("".concat(o,"load-previous-page-began")),u=(0,i.lQ)("".concat(o,"load-previous-page-done")),c=(0,i.lQ)("".concat(o,"load-previous-page-failed")),l=(0,i.lQ)("".concat(o,"load-next-page")),d=(0,i.lQ)("".concat(o,"load-next-page-began")),h=(0,i.lQ)("".concat(o,"load-next-page-done")),f=(0,i.lQ)("".concat(o,"load-next-page-failed")),p=(0,i.lQ)("".concat(o,"load-replies")),m=(0,i.lQ)("".concat(o,"load-replies-began")),g=(0,i.lQ)("".concat(o,"load-replies-done")),v=(0,i.lQ)("".concat(o,"load-replies-failed")),y=(0,i.lQ)("".concat(o,"comment-edit-started")),_=(0,i.lQ)("".concat(o,"comment-edit-cancelled")),b=(0,i.lQ)("".concat(o,"post-comment")),w=(0,i.lQ)("".concat(o,"post-comment-began")),C=(0,i.lQ)("".concat(o,"post-comment-done")),A=(0,i.lQ)("".concat(o,"post-comment-failed")),I=(0,i.lQ)("".concat(o,"new-reply-posted")),S=(0,i.lQ)("".concat(o,"new-comment-posted")),P=(0,i.lQ)("".concat(o,"delete-comment")),x=(0,i.lQ)("".concat(o,"comment-deleted")),T=(0,i.lQ)("".concat(o,"comment-updated")),k=(0,i.lQ)("".concat(o,"vote")),E=(0,i.lQ)("".concat(o,"votes-updated")),M=(0,i.lQ)("".concat(o,"hide-comment")),D=(0,i.lQ)("".concat(o,"ban-user")),N=(0,i.lQ)("".concat(o,"user-banned")),L=(0,i.lQ)("".concat(o,"report-comment"))},72571:function(e,t,n){"use strict";n.d(t,{CC:function(){return a},F2:function(){return c},H2:function(){return v},IS:function(){return u},UD:function(){return h},VL:function(){return l},ck:function(){return g},dp:function(){return s},km:function(){return d},uH:function(){return m},vX:function(){return p},zl:function(){return f}});var i=n(89103),r=n(62139),o="".concat(r.pW,"/commoon/"),a=(0,i.lQ)("".concat(o,"initial-load-began")),s=(0,i.lQ)("".concat(o,"initial-load-done")),u=(0,i.lQ)("".concat(o,"initial-load-failed")),c=(0,i.lQ)("".concat(o,"follow-user")),l=(0,i.lQ)("".concat(o,"follow-user-done")),d=(0,i.lQ)("".concat(o,"unfollow-user")),h=(0,i.lQ)("".concat(o,"unfollow-user-done")),f=(0,i.lQ)("".concat(o,"open-user-profile")),p=(0,i.lQ)("".concat(o,"comments-dialog-opening")),m=(0,i.lQ)("".concat(o,"comments-dialog-opened")),g=(0,i.lQ)("".concat(o,"comments-dialog-closing")),v=(0,i.lQ)("".concat(o,"comments-dialog-closed"))},78754:function(e,t,n){"use strict";n.d(t,{G:function(){return y},F:function(){return v}});var i=n(44229),r=n(62139),o=n(58932),a=n(89103),s=n(88362),u=n(18972),c=(0,a.vy)({attachmentsByDraftId:{}},(0,a.po)(s.Wf,(function(e,t){var n,i=t.payload,r=i.draftId,a=i.attachment;return(0,o.Cl)((0,o.Cl)({},e),{attachmentsByDraftId:(0,o.Cl)((0,o.Cl)({},e.attachmentsByDraftId),(n={},n[r]=(0,o.fX)((0,o.fX)([],(0,o.zs)(e.attachmentsByDraftId[r]),!1),[a],!1),n))})})),(0,a.po)(s.zr,(function(e,t){var n,i=t.payload,r=i.draftId,a=i.attachment,s=e.attachmentsByDraftId[r],u=s.findIndex((function(e){return e.uniqueId===a.uniqueId}));return u<0?e:(0,o.Cl)((0,o.Cl)({},e),{attachmentsByDraftId:(0,o.Cl)((0,o.Cl)({},e.attachmentsByDraftId),(n={},n[r]=(0,o.fX)((0,o.fX)((0,o.fX)([],(0,o.zs)(s.slice(0,u)),!1),[a],!1),(0,o.zs)(s.slice(u+1)),!1),n))})})),(0,a.po)(s.kv,(function(e,t){var n,i=t.payload,r=i.draftId,a=i.attachment;return(0,o.Cl)((0,o.Cl)({},e),{attachmentsByDraftId:(0,o.Cl)((0,o.Cl)({},e.attachmentsByDraftId),(n={},n[r]=e.attachmentsByDraftId[r].filter((function(e){return e.uniqueId!==a.uniqueId})),n))})})),(0,a.po)(u.nU,(function(e,t){var n,i,r=t.payload,a=r.draftId,s=r.comment;return(0,o.Cl)((0,o.Cl)({},e),{attachmentsByDraftId:(0,o.Cl)((0,o.Cl)({},e.attachmentsByDraftId),(n={},n[a]=null!==(i=null==s?void 0:s.attachments)&&void 0!==i?i:[],n))})})),(0,a.po)(u.VW,(function(e,t){var n=t.payload.draftId,i=(0,o.Cl)({},e.attachmentsByDraftId);return delete i[n],(0,o.Cl)((0,o.Cl)({},e),{attachmentsByDraftId:i})})),(0,a.po)(s.Fq,(function(e,t){var n,i,r=t.payload,a=r.id,s=r.draftId;return(0,o.Cl)((0,o.Cl)({},e),{attachmentsByDraftId:(0,o.Cl)((0,o.Cl)({},e.attachmentsByDraftId),(n={},n[s]=null===(i=e.attachmentsByDraftId[s])||void 0===i?void 0:i.filter((function(e){return e.uniqueId!==a})),n))})}))),l=n(72571);function d(e,t,n){var i=t.findIndex((function(t){return t.id===e}));if(i<0)return{comments:t,comment:null};var r=n(t[i]);return{comments:(0,o.fX)((0,o.fX)((0,o.fX)([],(0,o.zs)(t.slice(0,i)),!1),[r],!1),(0,o.zs)(t.slice(i+1)),!1),comment:r}}var h,f=(0,a.vy)({comments:[],offset:0,totalCommentsCount:0,rootCommentsCount:0,isLoadingPreviousPage:!1,isLoadingNextPage:!1,isPostingDraftId:null,newCommentId:null,newPostId:null},(0,a.po)(l.CC,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{comments:[],offset:0,totalCommentsCount:0,newCommentId:null,newPostId:null,attachmentsByDraftId:{}})})),(0,a.po)(l.dp,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{comments:n.comments,offset:n.offset,totalCommentsCount:n.totalCommentsCount,rootCommentsCount:n.rootCommentsCount})})),(0,a.po)(u.o$,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{isLoadingNextPage:!0})})),(0,a.po)(u.t9,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{comments:(0,o.fX)((0,o.fX)([],(0,o.zs)(e.comments),!1),(0,o.zs)(n.comments),!1),totalCommentsCount:n.totalCommentsCount,rootCommentsCount:n.rootCommentsCount,isLoadingNextPage:!1})})),(0,a.po)(u.oO,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{isLoadingNextPage:!1})})),(0,a.po)(u.M3,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{isLoadingPreviousPage:!0})})),(0,a.po)(u.b0,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{comments:(0,o.fX)((0,o.fX)([],(0,o.zs)(n.comments),!1),(0,o.zs)(e.comments),!1),offset:Math.max(e.offset-n.comments.filter((function(e){return!e.parentId})).length,0),totalCommentsCount:n.totalCommentsCount,rootCommentsCount:n.rootCommentsCount,isLoadingPreviousPage:!1})})),(0,a.po)(u.KJ,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{isLoadingPreviousPage:!1})})),(0,a.po)(u.Gg,(function(e,t){var n=d(t.payload.commentId,e.comments,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{isLoadingReplies:!0})})).comments;return n===e.comments?e:(0,o.Cl)((0,o.Cl)({},e),{comments:n})})),(0,a.po)(u.Tq,(function(e,t){var n=t.payload,i=n.commentId,r=n.replies,a=d(i,e.comments,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{repliesCount:n.totalRepliesCount,isLoadingReplies:!1,isReloadRepliesRequired:!1})})).comments;if(a===e.comments)return e;n.replace&&(a=a.filter((function(e){return e.parentId!==i})));for(var s=-1,u=a.length-1;u>=0;--u)if(a[u].parentId===i||a[u].id===i){s=u+1;break}return(0,o.Cl)((0,o.Cl)({},e),{comments:s>=0?(0,o.fX)((0,o.fX)((0,o.fX)([],(0,o.zs)(a.slice(0,s)),!1),(0,o.zs)(r),!1),(0,o.zs)(a.slice(s)),!1):a})})),(0,a.po)(u.a$,(function(e,t){var n=d(t.payload.commentId,e.comments,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{isLoadingReplies:!1})})).comments;return n===e.comments?e:(0,o.Cl)((0,o.Cl)({},e),{comments:n})})),(0,a.po)(u.DN,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{isPostingDraftId:n.draftId})})),(0,a.po)(u.YL,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{isPostingDraftId:null})})),(0,a.po)(u.FW,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{isPostingDraftId:null})})),(0,a.po)(u.eC,(function(e,t){for(var n=t.payload,i=n.draftParentId,r=n.reply,a=-1,s=e.comments.length-1;s>=0;--s){var u=e.comments[s];if(u.parentId===r.parentId||u.id===r.parentId){a=s+1;break}}if(a<0)return e;var c=(0,o.fX)((0,o.fX)((0,o.fX)([],(0,o.zs)(e.comments.slice(0,a)),!1),[r],!1),(0,o.zs)(e.comments.slice(a+1)),!1);return c=d(i,c,(function(e){return(0,o.Cl)({},e)})).comments,c=d(r.parentId,c,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{repliesCount:e.repliesCount+1,isReloadRepliesRequired:!0})})).comments,(0,o.Cl)((0,o.Cl)({},e),{comments:c,newPostId:r.id})})),(0,a.po)(u.VG,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{comments:n.comments,offset:n.offset,rootCommentsCount:n.rootCommentsCount,totalCommentsCount:n.totalCommentsCount,newCommentId:n.comment.id,newPostId:n.comment.id})})),(0,a.po)(u.BV,(function(e,t){var n=d(t.payload.commentId,e.comments,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{isDeleted:!0})})),i=n.comments,r=n.comment;return i!==e.comments&&r?(0,o.Cl)((0,o.Cl)({},e),{comments:i,rootCommentsCount:r.parentId?e.rootCommentsCount:e.rootCommentsCount-1,totalCommentsCount:e.totalCommentsCount-1}):e})),(0,a.po)(u.Vk,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{comments:d(n.comment.id,e.comments,(function(){return n.comment})).comments,newPostId:n.comment.id})})),(0,a.po)(u.TV,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{comments:d(n.commentId,e.comments,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{currentVote:n.currentUserVote,likesCount:n.likesCount,dislikesCount:n.dislikesCount})})).comments})})),(0,a.po)(u.iX,(function(e,t){var n=t.payload.userProfileName,i=0,r=0,a=e.comments.map((function(e){return e.userProfile.profileName!==n?e:(++i,e.parentId||++r,(0,o.Cl)((0,o.Cl)({},e),{isDeleted:!0}))}));return i?(0,o.Cl)((0,o.Cl)({},e),{comments:a,totalCommentsCount:e.totalCommentsCount-i,rootCommentsCount:e.rootCommentsCount-r}):e})),(0,a.po)(l.VL,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{comments:e.comments.map((function(e){return e.userProfile.profileName!==n.userProfileName?e:(0,o.Cl)((0,o.Cl)({},e),{userProfile:(0,o.Cl)((0,o.Cl)({},e.userProfile),{isFollowedByCurrentUser:!0})})}))})})),(0,a.po)(l.UD,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{comments:e.comments.map((function(e){return e.userProfile.profileName!==n.userProfileName?e:(0,o.Cl)((0,o.Cl)({},e),{userProfile:(0,o.Cl)((0,o.Cl)({},e.userProfile),{isFollowedByCurrentUser:!1})})}))})}))),p=n(40724);!function(e){e[e.Popular=2]="Popular",e[e.Date=4]="Date",e[e.DateAsc=3]="DateAsc"}(h||(h={}));var m={popupId:"",articleId:"",orderBy:h.DateAsc,isLoaded:!1,popupStatus:p.P.CLOSED},g=(0,a.vy)(m,(0,a.po)(l.CC,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{isLoaded:!1,articleId:n.articleId})})),(0,a.po)(l.dp,(function(e,t){return t.payload,(0,o.Cl)((0,o.Cl)({},e),{isLoaded:!0})})),(0,a.po)(l.vX,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{popupStatus:p.P.OPENING,articleId:n.articleId})})),(0,a.po)(l.uH,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{popupStatus:p.P.OPEN,popupId:n.popupId})})),(0,a.po)(l.ck,(function(e,t){var n=t.payload.popupId;return e.popupId!==n?e:(0,o.Cl)((0,o.Cl)({},e),{popupStatus:p.P.CLOSING})})),(0,a.po)(l.H2,(function(e,t){var n=t.payload.popupId;return e.popupId!==n?e:(0,o.Cl)((0,o.Cl)({},e),{popupStatus:p.P.CLOSED})}))),v=(0,i.HY)({comments:f,common:g,attachments:c}),y=function(e){return e[r.pW]}},12299:function(e,t,n){"use strict";n.d(t,{$u:function(){return h},X3:function(){return d},Xg:function(){return b},i$:function(){return w},kG:function(){return y},o4:function(){return v},o8:function(){return l},pI:function(){return _},py:function(){return f},qy:function(){return C},t$:function(){return c},un:function(){return g},zc:function(){return p}});var i=n(29978),r=n(13981),o=n(43566),a=n(78754),s=n(32664),u=(0,i.Mz)(a.G,(function(e){return e.comments})),c=(0,i.Mz)(u,(function(e){return e.comments})),l=(0,i.Mz)(u,(function(e){return e.offset})),d=((0,i.Mz)(u,(function(e){return e.isLoadingPreviousPage||e.isLoadingNextPage})),(0,i.Mz)(u,(function(e){return e.isLoadingPreviousPage}))),h=(0,i.Mz)(u,s.KM,d,(function(e,t,n){return t&&e.offset>0&&!n})),f=(0,i.Mz)(u,(function(e){return e.isLoadingNextPage})),p=(0,i.Mz)(u,s.KM,f,(function(e,t,n){return t&&e.totalCommentsCount>e.comments.length&&e.rootCommentsCount>e.offset+e.comments.filter((function(e){return!e.parentId})).length&&!n})),m=(0,r.bb)("commentId"),g=(0,i.Mz)(m,c,(function(e,t){return t.find((function(t){return t.id===e}))})),v=(0,i.Mz)(m,c,(function(e,t){return t.filter((function(t){return t.parentId===e}))})),y=(0,i.Mz)(u,(function(e){return e.totalCommentsCount})),_=(0,i.Mz)(m,c,o.mB,(function(e,t,n){var i=t.find((function(t){return t.id===e}));return(null==i?void 0:i.userProfile.enAccountNumber)===n.enAccountNumber})),b=(0,i.Mz)(u,(function(e){return e.newCommentId})),w=(0,i.Mz)(u,(function(e){return e.newPostId})),C=(0,i.Mz)(s.yS,u,(function(e,t){return t.isPostingDraftId===e}))},32664:function(e,t,n){"use strict";n.d(t,{KM:function(){return c},Ut:function(){return l},YF:function(){return d},nw:function(){return p},q1:function(){return f},yS:function(){return u}});var i=n(29978),r=n(13981),o=n(40724),a=n(78754),s=(0,i.Mz)(a.G,(function(e){return e.common})),u=(0,r.bb)("draftId"),c=(0,i.Mz)(s,(function(e){return e.isLoaded})),l=(0,i.Mz)(s,(function(e){return e.popupId})),d=(0,i.Mz)(s,(function(e){return e.articleId})),h=(0,i.Mz)(s,(function(e){return e.popupStatus})),f=(0,i.Mz)(s,(function(e){return e.orderBy})),p=(0,i.Mz)(h,(function(e){return e===o.P.OPEN||e===o.P.OPENING}))},40724:function(e,t,n){"use strict";var i;n.d(t,{P:function(){return i}}),function(e){e.OPENING="opening",e.OPEN="open",e.CLOSING="closing",e.CLOSED="closed"}(i||(i={}))},57230:function(e,t,n){"use strict";n.d(t,{Pt:function(){return l},Q3:function(){return s},SG:function(){return a},Zn:function(){return u},lJ:function(){return d},mD:function(){return h},q6:function(){return o},yS:function(){return c}});var i=n(53308),r="purchase";function o(e){return(0,i.lx)(r,"GetPurchaseInfo",e)}function a(e){return(0,i.lx)(r,"GetArchivePurchaseInfo",e)}function s(e){return(0,i.zA)(r,"AddToBasket",JSON.stringify(e),{contentType:"application/json"})}function u(e){return(0,i.lx)(r,"GetPurchaseContext",e)}function c(e){return(0,i.lx)(r,e)}function l(e){return(0,i.zA)(r,"Checkout",e,{disableRetry:!0})}function d(e){return(0,i.zA)(r,"Confirm",JSON.stringify(e),{contentType:"application/json"})}function h(e){return(0,i.lx)(r,"pending-order/".concat(e))}},25351:function(e,t,n){"use strict";n.d(t,{br:function(){return o},cc:function(){return s},ts:function(){return a}});var i=n(58932),r=n(43125);function o(e){if(!e)return null;var t={token:e.token,title:e.title,callToAction:e.callToAction,highlight:e.highlight,features:e.features||[],tags:e.tags,currency:e.currency,price:e.price,formattedPrice:e.formattedPrice,discount:e.discount,formattedDiscount:e.formattedDiscount,total:e.total,formattedTotal:e.formattedTotal,issueIncluded:!1!==e.issueIncluded};return"RegularSubscription"===e.type?(0,i.Cl)((0,i.Cl)({},t),{type:"RegularSubscription",productId:e.productId,term:{duration:e.term.duration,units:e.term.units},autoRenewEnabled:e.autoRenewEnabled,autoRenewToProduct:o(e.autoRenewToProduct)}):"PublicationSubscription"===e.type?(0,i.Cl)((0,i.Cl)({},t),{type:"PublicationSubscription",productId:e.productId,term:{duration:e.term.duration,units:e.term.units},autoRenewEnabled:e.autoRenewEnabled,autoRenewToProduct:o(e.autoRenewToProduct),cids:e.cids,publicationsInfo:[]}):"SingleIssue"===e.type?(0,i.Cl)((0,i.Cl)({},t),{type:"SingleIssue",issueKey:e.issueKey,cid:e.cid,issueInfo:null}):"GiftCard"===e.type?(0,i.Cl)((0,i.Cl)({},t),{type:"GiftCard",productId:e.productId}):"Book"===e.type?(0,i.Cl)((0,i.Cl)({},t),{type:"Book",bookId:e.bookId,productId:e.productId,bookInfo:null,autoRenewEnabled:e.autoRenewEnabled,salesModelId:e.salesModelId,supplyModelId:e.supplyModelId}):null}function a(e){if(!e)return null;var t=e.Issue.Issue,n=(0,r._x)(t);return{cid:e.Issue.CID,issueKey:t,publicationName:e.Newspaper.Name,issueDate:n,expungeVersion:e.Issue.ExpungeVersion,couldBeRead:e.CouldPotentiallyBeRead,isFreeContent:e.SubscriptionsInfo.IsFreeContent,requiredAuthenticatedUser:e.SubscriptionsInfo.RequiredAuthenticatedUser}}function s(e){return e?{cid:e.cid,publicationName:e.displayName}:null}},23655:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});var i=n(58932);function r(e){return(0,i.Cl)({},e)}},77457:function(e,t,n){"use strict";n.d(t,{F9:function(){return a},JV:function(){return u},Sr:function(){return s},ho:function(){return c},pK:function(){return o}});var i=n(53308),r="v1/accounts/current/payments";function o(e){return(0,i.lx)(r,"history",{year:e})}function a(){return(0,i.lx)(r,"years")}function s(){return(0,i.lx)(r,"bundle/orders")}function u(e){return(0,i.lx)(r,"issues",{orderId:e})}function c(e){return(0,i.lx)(r,"receipt",{orderId:e})}},83534:function(e,t,n){"use strict";n.d(t,{Jn:function(){return a},eQ:function(){return s},zN:function(){return o}});var i=n(53308),r="v1/subscriptions";function o(){return(0,i.lx)(r,"current")}function a(e){return(0,i.yd)(r,"current/autorenew",JSON.stringify(e),{contentType:"application/json",disableRetry:!0})}function s(e,t){return(0,i.yd)(r,"".concat(e,"/autorenew"),JSON.stringify(t),{contentType:"application/json",disableRetry:!0})}},28695:function(e,t,n){"use strict";var i;n.d(t,{i:function(){return i}}),function(e){e.NotAllowed="NotAllowed",e.SiteDefault="SiteDefault",e.DirectDownload="DirectDownload",e.OfflineReaderDownload="OfflineReaderDownload",e.DirectAcrobatDownload="DirectAcrobatDownload",e.NDLightDownload="NDLightDownload",e.SingleIssueDownload="SingleIssueDownload"}(i||(i={}))},97781:function(e,t,n){"use strict";var i;function r(e){return"SingleIssue"===e.type}function o(e){return"RegularSubscription"===e.type}function a(e){return"PublicationSubscription"===e.type}n.d(t,{X:function(){return i},d8:function(){return o},nA:function(){return r},nw:function(){return a}}),function(e){e[e.Unknown=0]="Unknown",e[e.Agency=1]="Agency",e[e.Wholesale=2]="Wholesale",e[e.Free=3]="Free",e[e.Consignment=4]="Consignment",e[e.License=5]="License"}(i||(i={}))},94615:function(e,t,n){"use strict";var i,r,o;n.d(t,{Dm:function(){return i},it:function(){return r},tQ:function(){return o}}),function(e){e[e.Trial=0]="Trial",e[e.SingleCopy=1]="SingleCopy",e[e.Regular=2]="Regular",e[e.Print=3]="Print",e[e.AppDefault=4]="AppDefault",e[e.AppSingleCopy=5]="AppSingleCopy",e[e.AppRegular=6]="AppRegular",e[e.Bundle=7]="Bundle",e[e.Unknown=8]="Unknown"}(i||(i={})),function(e){e[e.Valid=1]="Valid",e[e.Exceed=2]="Exceed",e[e.Expired=4]="Expired",e[e.Suspended=8]="Suspended",e[e.Canceled=16]="Canceled",e[e.PaymentDeclined=32]="PaymentDeclined",e[e.NotValid=60]="NotValid",e[e.NoBalance=64]="NoBalance"}(r||(r={})),function(e){e[e.Month=0]="Month",e[e.Day=1]="Day"}(o||(o={}))},70474:function(e,t,n){"use strict";n.d(t,{qA:function(){return w},rU:function(){return b}});var i=n(13981),r="@pressreader/commerce-core",o=n(58932),a=n(89103),s=n(43566),u="".concat(r,"/"),c=(0,a.lQ)("".concat(u,"load_subscription_done")),l=(0,a.vy)({currentSubscription:null,activeBundles:[]},(0,a.po)(c,(function(e,t){var n=t.payload,i=n.currentSubscription,r=n.activeBundles;return(0,o.Cl)((0,o.Cl)({},e),{currentSubscription:i,activeBundles:r})})),(0,a.po)(s.Fz,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{currentSubscription:null})}))),d=n(44834),h=n(83534),f=n(77457),p=n(23655),m=n(30212),g=n(33260);function v(){var e,t,n;return(0,o.YH)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),[4,(0,d.Lt)(s.mB)];case 1:return i.sent().isAuthenticated?[4,(0,d.T1)(h.zN)]:[2];case 2:return e=i.sent(),[4,(0,d.T1)(f.Sr)];case 3:return t=i.sent(),[4,(0,d.yJ)(c({currentSubscription:(0,p.Y)(e),activeBundles:null==t?void 0:t.filter((function(e){return 1===e.status}))}))];case 4:return i.sent(),[3,6];case 5:return n=i.sent(),(0,m.z)(n),[3,6];case 6:return[2]}}))}var y=n(29978),_=function(e){return e[r]},b=(0,y.Mz)(_,(function(e){return e.currentSubscription})),w=(0,y.Mz)(_,(function(e){return e.activeBundles}));i.bX.addFeature(r,l,(function(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,d.jP)([s.hl,g.St,s.YC],v)];case 1:return e.sent(),[2]}}))}))},90050:function(e,t,n){"use strict";var i;function r(e){i=e}n.d(t,{s:function(){return r},z:function(){return i}})},28809:function(e,t,n){"use strict";n.d(t,{hm:function(){return h},r4:function(){return m},Cl:function(){return g},cD:function(){return D},FI:function(){return c},yC:function(){return d},fj:function(){return f},zg:function(){return P},Qt:function(){return k},_t:function(){return T},Hw:function(){return x}});var i=n(13981),r="@pressreader/config",o=n(58932),a=n(74010),s=n(89103),u=r+"/",c=(0,s.lQ)("".concat(u,"extend_config")),l=(0,s.lQ)("".concat(u,"config_extended")),d=(0,s.lQ)("".concat(u,"force_config_load_done")),h=(0,s.lQ)("".concat(u,"config_changed")),f=(0,s.lQ)("".concat(u,"load_config")),p=(0,s.lQ)("".concat(u,"config_load_began")),m=(0,s.lQ)("".concat(u,"config_load_done")),g=(0,s.lQ)("".concat(u,"config_load_failed")),v={config:{},status:a.U.None},y=(0,s.vy)(v,(0,s.po)(p,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{status:a.U.Pending})})),(0,s.po)(m,(function(e,t){return(0,o.Cl)((0,o.Cl)({},e),{config:t.payload.config,status:a.U.Done})})),(0,s.po)(g,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{status:a.U.Done})})),(0,s.po)(l,(function(e,t){return(0,o.Cl)((0,o.Cl)({},e),{config:t.payload.config})}))),_=n(44834),b=n(90050),w=n(29978),C=n(42832),A=n(1791);function I(e){return e[r]}function S(e,t,n){if(!C(e)||!t)return n;var i=function(t){return Object.keys(e).find((function(e){return e.toLowerCase()===t.toLowerCase()}))||t};if((t=i(t))in e)return e[t];for(var r=t.indexOf(".");r>0;r=t.indexOf(".",r+1)){var o=t.substring(0,r);if((o=i(o))in e)return S(e[o],t.substring(r+1),n)}return n}var P=(0,w.Mz)(I,(function(e){return e.config})),x=(0,w.Mz)(I,(function(e){return e.status})),T=(0,w.Mz)(I,(function(e){return A((function(t,n){return S(e.config,t,n)}),(function(e,t){return JSON.stringify({path:e,defaultValue:t})}))})),k=(0,w.Mz)(I,(function(e,t){return t}),(function(e,t,n){return n}),(function(e,t,n){return S(e.config,t,n)}));function E(){var e,t;return(0,o.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,_.Lt)(x)];case 1:return n.sent()===a.U.Pending?[2]:[4,(0,_.yJ)(p())];case 2:return n.sent(),b.z?[3,4]:[4,(0,_.yJ)(g())];case 3:return n.sent(),[2];case 4:return n.trys.push([4,11,,13]),[4,(0,_.O4)({config:(0,_.T1)(b.z),cancel:(0,_.s)(d)})];case 5:return e=n.sent(),t=e.config,e.cancel?[4,(0,_.yJ)(m({config:{}}))]:[3,7];case 6:return n.sent(),[3,9];case 7:return[4,(0,_.yJ)(m({config:t}))];case 8:n.sent(),n.label=9;case 9:return[4,(0,_.yJ)(h())];case 10:return n.sent(),[3,13];case 11:return n.sent(),[4,(0,_.yJ)(g())];case 12:return n.sent(),[3,13];case 13:return[2]}}))}function M(e){var t,n,i,r,a,s,u;return(0,o.YH)(this,(function(c){switch(c.label){case 0:return[4,(0,_.Lt)(P)];case 1:for(t=c.sent(),n=(0,o.Cl)({},t),i=0,r=Object.keys(e.payload.values);i0)return[2,u(e,t-1)];if(!(null!==(C="object"==typeof d&&(null==d?void 0:d.skipThrowException))&&void 0!==C&&C||h))throw new Error("No retries left.");return[3,8];case 5:return f=i.sent(),(null==(p=f)?void 0:p.message)?[4,(0,r.n)({message:p.message,isHtml:!0})]:[3,7];case 6:i.sent(),i.label=7;case 7:throw f;case 8:return[3,11];case 9:return(null==a?void 0:a.Parameters)?(m=a.Parameters,g=m.message,v=m.Text,y=new RegExp(/(<([^>]+)>)/gi),(_=!g||y.test(v)?v:g)?[4,(0,r.n)({message:_,isHtml:!0})]:[3,11]):[3,11];case 10:i.sent(),i.label=11;case 11:throw a;case 12:return[2]}}))}))}function c(e,t,n,i,r){return void 0===r&&(r=a),u((function(){return(0,o.lx)(e,t,n,i)}),r)}function l(e,t,n,i,r){return void 0===r&&(r=a),u((function(){return(0,o.zA)(e,t,n,i)}),r)}function d(e,t,n,i,r){return void 0===r&&(r=a),u((function(){return(0,o.yd)(e,t,n,i)}),r)}function h(e,t,n,i,r){return void 0===r&&(r=a),u((function(){return(0,o.wu)(e,t,n,i)}),r)}function f(e,t,n){void 0===n&&(n=!1);var i=e.toLowerCase();i in s&&!n||(s[i]=t)}},53235:function(e,t,n){"use strict";n.d(t,{_:function(){return a}});var i=n(58932);var r=n(53308);function o(e){return(0,r.lx)("calendar",{cid:e})}function a(e){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,o(e)];case 1:return[2,(n=t.sent(),{highlightPaidIssues:n.EnableHighlihtPaidIssues,enableCalendarView:n.EnableCalendarView,enableFullDateView:n.EnableFullDateView,enableListView:n.EnableListView,years:Object.keys(n.Years).map((function(e){return Number.parseInt(e,10)})).reduce((function(e,t){var i=n.Years[t];return e[t]=Object.keys(i).reduce((function(e,n){var r=i[parseInt(n,10)];return e[n]=Object.keys(r).reduce((function(e,i){var o=parseInt(i,10),a=new Date(t,parseInt(n,10)-1,o);return e[i]=function(e,t){return{disabledForPurchase:1===t.Dis,paid:1===t.P,issueDate:e,version:t.V}}(a,r[o]),e}),{}),e}),{}),e}),{})})]}var n}))}))}},17065:function(e,t,n){"use strict";n.d(t,{ES:function(){return c},FI:function(){return d},Ii:function(){return l},QP:function(){return u},SA:function(){return s},VV:function(){return h},kD:function(){return f},lW:function(){return p},pR:function(){return m},rs:function(){return a},ry:function(){return g}});var i=n(58932),r=n(53308),o=n(73690);function a(e,t){return(0,r.lx)("pagesMetadata",{issue:e,pageNumbers:t.join(",")})}function s(e){return(0,r.lx)("toc",e)}function u(e){return(0,r.lx)("layout",e)}function c(e){return(0,o.G4)("IssueInfo","GetIssueInfoById",{issueId:e})}function l(e){return(0,o.G4)("IssueInfo","GetIssueInfo",{issue:e})}function d(e,t){return(0,o.G4)("IssueInfo","GetIssueInfoByCid",{cid:e,issueDate:t})}function h(e){return(0,o.G4)("IssueInfo","GetIssueInfoByBookmark",{bookmarkId:e})}function f(e,t,n,i){return(0,o.G4)("IssueInfo","GetPageKeys",{issue:e,pageNumber:t,bookmark:n,preview:i})}function p(e){return(0,o.G4)("IssueInfo","GetIssueRuledPrice",{issueId:e})}function m(e){return(0,o._s)("issues","Confirm",{issueId:e})}function g(e){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,l(e)];case 1:return[2,(n=t.sent(),{issue:n.Issue.Issue,cid:n.Issue.CID,profileId:n.Issue.ProfileId,displayDate:n.Issue.IssueDateDisplayName,issueName:n.Newspaper.Name,isRightToLeft:n.Newspaper.IsRightToLeft,pagesCount:n.Pages})]}var n}))}))}},48912:function(e,t,n){"use strict";n.d(t,{dM:function(){return C},x$:function(){return m}});var i,r=n(58932),o=n(13981);!function(e){e[e.SingleIssue=2]="SingleIssue",e[e.SingleTitle=3]="SingleTitle"}(i||(i={}));var a=function(e,t){return e.filter((function(e){return e.Type===t})).reduce((function(e,t){return Object.entries(t.Pricing).forEach((function(t){var n=t[0],i=t[1].Total;e.push({price:i,currency:n})})),e}),[])},s=function(e){return{singleIssueProducts:a(e,i.SingleIssue),singleTitleProducts:a(e,i.SingleTitle)}},u=n(97781),c=n(25351);function l(e,t){var n=t.map(c.br);return{isFreeContent:e.IsFreeContent,requiredAuthenticatedUser:e.RequiredAuthenticatedUser,singleIssueProduct:n.find(u.nA),premiumProduct:n.filter(u.d8).find((function(e){return e.tags.indexOf("premium")>=0})),selectProduct:n.filter(u.d8).find((function(e){return e.tags.indexOf("selectPlan")>=0})),singleTitleProduct:n.find(u.nw)}}var d=n(43125),h=n(61445),f=n(46674),p=n(45235);function m(e){return e.Key?{key:e.Key,confirmationRequired:e.ConfirmationRequired}:null}function g(e){return{id:String(e.Id),primaryArticleId:"",regionId:e.RegionId,title:e.Title,text:e.Text,byline:e.Byline,rate:e.Rate,type:e.Type,contFromPage:e.ContFromPage,contFromReg:e.ContFromReg,contOnPage:e.ContOnPage,contOnReg:e.ContOnReg,image:e.Image&&{height:e.Image.Height,width:e.Image.Width,key:e.Image.Key,uid:e.Image.Uid}}}function v(e,t,n){var i,r,a=e.Newspaper.IsRightToLeft,s=t.PageNumber,u=s-1,c=s===e.Pages,l=0===u||c&&u%2==1?null:u%2==1?a?"right":"left":a?"left":"right",d=e.PagesInfo.find((function(e){return e.PageNumber===s})),p=n?m(n):null,v=s>1&&!p&&!((0,o.Lt)(h.pP)===f.D.On)&&!e.SubscriptionsInfo.IsFreeContent;return{pageNumber:s,pageName:t.PageName,expungeVersion:null!==(i=null==d?void 0:d.ExpungeVersion)&&void 0!==i?i:0,sectionName:t.SectionName,unhyphenatedSectionName:t.UnhyphenatedSectionName,spread:l,size:{width:t.Width,height:t.Height},pageKey:p,isLocked:v,imageMeta:null,articles:(null===(r=t.Articles)||void 0===r?void 0:r.map(g))||[]}}function y(e,t){if(!e.primaryArticleId)if(e.contFromReg||e.contOnReg){var n=e.id,i=new Map,r=function(e){e&&!i.has(e.regionId)&&(i.set(e.regionId,e),e.primaryArticleId&&(n=e.primaryArticleId),r(t.get(e.contOnReg||0)),r(t.get(e.contFromReg||0)))};r(e),i.forEach((function(e){e.primaryArticleId=n}))}else e.primaryArticleId=e.id}function _(e,t,n,i){var r=i.find((function(t){return t.sectionId===n&&t.primaryArticleId===e.primaryArticleId}));r?r.continuationRegions.push(e.regionId):i.push(function(e,t,n){return{sectionId:e,sectionName:t.sectionName,pageNumber:t.pageNumber,id:n.id,primaryArticleId:n.primaryArticleId,regionId:n.regionId,continuationRegions:[]}}(n,t,e))}function b(e){var t,n,i=null,o=-1,a=null,s=[];try{for(var u=(0,r.Ju)(e),c=u.next();!c.done;c=u.next()){var l=c.value;l.sectionId!==i&&(a=w(l,++o),s.push(a),i=l.sectionId),a&&!a.pageNumbers.includes(l.pageNumber)&&a.pageNumbers.push(l.pageNumber),s.push(l)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return s}function w(e,t){return{sectionId:e.sectionId,sectionIdx:t,sectionName:e.sectionName,pageNumbers:[]}}function C(e,t,n,i){var o,a,u,c,h,f,m,g,w,C=e.Issue.Issue,A=(0,d.Yb)(C),I=(0,d._x)(C),S=function(e,t){var n,i,o,a,s,u,c,l,h,f=[],m=[],g=new Map;try{for(var b=(0,r.Ju)(t.Pages||[]),w=b.next();!w.done;w=b.next()){var C=v(e,w.value);try{for(var A=(o=void 0,(0,r.Ju)(C.articles)),I=A.next();!I.done;I=A.next()){var S=I.value;g.set(S.regionId,S)}}catch(e){o={error:e}}finally{try{I&&!I.done&&(a=A.return)&&a.call(A)}finally{if(o)throw o.error}}f.push(C)}}catch(e){n={error:e}}finally{try{w&&!w.done&&(i=b.return)&&i.call(b)}finally{if(n)throw n.error}}var P,x,T,k="",E=[];try{for(var M=(0,r.Ju)(f),D=M.next();!D.done;D=M.next()){if(h!==(C=D.value).sectionName)h=C.sectionName,P=C.sectionName,x=C.pageNumber,void 0,T=(0,p.xe)(P),k="".concat(T,"_").concat(x),E.push({id:k,name:h,pages:[C.pageNumber],hasArticles:!!C.articles.length});else{var N=E[E.length-1];N.pages.push(C.pageNumber),N.hasArticles=N.hasArticles||!!C.articles.length}try{for(var L=(c=void 0,(0,r.Ju)(C.articles)),V=L.next();!V.done;V=L.next())y(S=V.value,g),_(S,C,k,m)}catch(e){c={error:e}}finally{try{V&&!V.done&&(l=L.return)&&l.call(L)}finally{if(c)throw c.error}}}}catch(e){s={error:e}}finally{try{D&&!D.done&&(u=M.return)&&u.call(M)}finally{if(s)throw s.error}}var R=function(e){var t={width:e.MaxUnrestrictedFirstPageSize.W,height:e.MaxUnrestrictedFirstPageSize.H},n={width:e.MaxUnrestrictedPageSize.W,height:e.MaxUnrestrictedPageSize.H},i=e.Heights.map((function(e){return{width:null,height:e}})),r=e.MagnifierPageSizes.map((function(e){return{width:e.W,height:e.H}}));return{singleLayer:1===e.Issue.ImagesEngineVersion,maxFirstPageSize:t,maxNonFirstPageSize:n,allowedNonTiledSizes:i,allowedTiledSizes:r}}(e);return(0,d.Gr)(R,f),{pages:f,sections:E,refs:m}}(e,t),P=S.pages,x=S.sections,T=S.refs;return{issueKey:C,issueCidDateKey:A,issueId:e.Issue.IssueId,date:I,issueVer:t.Meta.IssueVer,expungeVersion:e.Issue.ExpungeVersion,issueVersion:t.Meta.IssueVersion,couldBeRead:e.CouldPotentiallyBeRead,numPages:e.Pages,rtl:e.Newspaper.IsRightToLeft,newspaper:{cid:e.Issue.CID,name:e.Newspaper.Name,mastheads:e.Newspaper.Mastheads?{whiteImageId:e.Newspaper.Mastheads.WhiteImageId,colorImageId:e.Newspaper.Mastheads.ColorImageId,width:e.Newspaper.Mastheads.Width,height:e.Newspaper.Mastheads.Height}:null,isoLanguage:e.Newspaper.ISOLanguage,locale:e.Newspaper.Culture},slugs:e.Slugs?{country:e.Slugs.Country,newspaper:e.Slugs.Newspaper}:{country:"",newspaper:""},pages:P,articleRefs:T,contentRefs:b(T),sections:x,layout:{version:e.Layout.LayoutVersion},smartFlow:{layoutValid:e.Layout.ValidForSmartFlow,enabled:e.Newspaper.EnableSmart},availableProducts:s(i),purchaseInfo:l(e.SubscriptionsInfo,n),sponsorInfo:e.Sponsor?{name:e.Sponsor.Name,logoUrl:e.Sponsor.LogoUrl,broughtBy:e.Sponsor.BroughtBy||e.Sponsor.Name}:null,restrictions:{rateLimitsInfo:{hasReachedIssueReadLimit:null!==(u=null===(a=null===(o=e.Restrictions)||void 0===o?void 0:o.RateLimitsInfo)||void 0===a?void 0:a.HasReachedIssueReadLimit)&&void 0!==u&&u,hasReachedDailyIssueReadLimit:null!==(f=null===(h=null===(c=e.Restrictions)||void 0===c?void 0:c.RateLimitsInfo)||void 0===h?void 0:h.HasReachedDailyIssueReadLimit)&&void 0!==f&&f,hasIssueReadLimitReachingWarning:null!==(w=null===(g=null===(m=e.Restrictions)||void 0===m?void 0:m.RateLimitsInfo)||void 0===g?void 0:g.HasIssueReadLimitReachingWarning)&&void 0!==w&&w}}}}},78872:function(e,t,n){"use strict";function i(e){return{regionId:e.RegionId,articleId:String(e.ArticleId),primaryArticleId:String(e.RootArticleId),hateIt:e.HateIt,likeIt:e.LikeIt,comments:e.Comments}}function r(e){return{pageNumber:e.PageNumber,articles:(e.Articles||[]).map(i)}}n.d(t,{S:function(){return r}})},62456:function(e,t,n){"use strict";var i;n.d(t,{p:function(){return i}}),function(e){e[e.Unknown=0]="Unknown",e[e.Denied=1]="Denied",e[e.Granted=2]="Granted",e[e.ConfirmationRequired=3]="ConfirmationRequired",e[e.PurchaseRequired=4]="PurchaseRequired"}(i||(i={}))},43715:function(e,t,n){"use strict";var i;n.d(t,{y:function(){return i}}),function(e){e[e.None=0]="None",e[e.ShortContent=1]="ShortContent",e[e.Images=2]="Images",e[e.Issue=4]="Issue",e[e.Publication=8]="Publication",e[e.Paragraphs=16]="Paragraphs",e[e.Related=32]="Related",e[e.Similars=64]="Similars",e[e.Access=128]="Access",e[e.Comments=256]="Comments",e[e.Votes=512]="Votes",e[e.AnalyticProfiles=1024]="AnalyticProfiles",e[e.Classification=2048]="Classification",e[e.Summary=4096]="Summary"}(i||(i={}))},90546:function(e,t,n){"use strict";var i,r;function o(e){return"image"===e.type}n.d(t,{M_:function(){return i},Q9:function(){return o},m7:function(){return r}}),function(e){e[e.None=0]="None",e[e.Bold=1]="Bold",e[e.Italic=2]="Italic",e[e.Link=3]="Link",e[e.Quote=4]="Quote",e[e.Uppercase=5]="Uppercase",e[e.Lowercase=6]="Lowercase"}(i||(i={})),function(e){e[e.None=0]="None",e[e.Title=1]="Title",e[e.Subtitle=2]="Subtitle",e[e.SubtitleEmphasis=3]="SubtitleEmphasis"}(r||(r={}))},43125:function(e,t,n){"use strict";n.d(t,{Gr:function(){return o.G},Hd:function(){return i.H},M6:function(){return r.M6},PE:function(){return a.PE},TV:function(){return r.TV},TW:function(){return r.TW},Tm:function(){return r.Tm},Tq:function(){return a.Tq},XJ:function(){return r.XJ},Y5:function(){return r.Y5},Yb:function(){return r.Yb},_x:function(){return r._x},aV:function(){return i.a},bR:function(){return r.bR},pd:function(){return o.p},ph:function(){return r.ph},qT:function(){return r.qT},qY:function(){return a.qY},uw:function(){return a.uw}});var i=n(64517),r=n(79974),o=n(21994),a=n(70983)},41315:function(e,t,n){"use strict";n.d(t,{f:function(){return i}});var i=function(e){this.type=e}},70983:function(e,t,n){"use strict";n.d(t,{PE:function(){return i.P},Tq:function(){return a.T},qY:function(){return o.q},uw:function(){return r.u}});var i=n(73177),r=n(72424),o=n(99166),a=n(90531)},73177:function(e,t,n){"use strict";n.d(t,{P:function(){return u}});var i=n(58932),r=n(72424),o=n(41315),a=n(15869),s=a.v.fromNumber(281474976710656),u=function(e){function t(t,n){var i=e.call(this,r.u.Issue)||this;return i.issueId=t,i.articleNumber=n,i}return(0,i.C6)(t,e),t.prototype.toBinary=function(){var e=s.or(a.v.fromNumber(this.issueId));return(e=e.or(a.v.fromNumber(this.articleNumber).shiftLeft(32))).toNumber()},t.isValid=function(e){return e>=281474976710656&&e<562949953421312},t.parse=function(e){var n=a.v.fromNumber(e).or(s);return new t(n.extractBits(0,31),n.extractBits(32,47))},t}(o.f)},72424:function(e,t,n){"use strict";var i;n.d(t,{u:function(){return i}}),function(e){e.Issue="issue",e.Publication="publication"}(i||(i={}))},15869:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var i=4294967296,r=0x8000000000000000,o=function(){function e(e,t){this._low=e,this._high=t}return e.fromInt=function(t){return new e(0|t,t<0?-1:0)},e.fromBits=function(t,n){return new e(t,n)},e.fromNumber=function(t){return isNaN(t)?this.zero:t<=-r?e.minValue:t+1>=r?e.maxValue:t<0?e.fromNumber(-t).negate():new e(t%i|0,t/i|0)},e.prototype.shiftLeft=function(t){if(0==(t&=63))return this;var n=this._low;if(t<32){var i=this._high;return e.fromBits(n<>>32-t)}return e.fromBits(0,n<>>t|n<<32-t,n>>t)}return e.fromBits(n>>t-32,n>=0?0:-1)},e.prototype.and=function(t){return e.fromBits(this._low&t._low,this._high&t._high)},e.prototype.or=function(t){return e.fromBits(this._low|t._low,this._high|t._high)},e.prototype.toNumber=function(){return this._high*i+this.getLowBitsUnsigned()},e.prototype.equals=function(e){return this._high===e._high&&this._low===e._low},e.prototype.add=function(t){var n=this._high>>>16,i=65535&this._high,r=this._low>>>16,o=65535&this._low,a=t._high>>>16,s=65535&t._high,u=t._low>>>16,c=0,l=0,d=0,h=0;return d+=(h+=o+(65535&t._low))>>>16,h&=65535,l+=(d+=r+u)>>>16,d&=65535,c+=(l+=i+s)>>>16,l&=65535,c+=n+a,c&=65535,e.fromBits(d<<16|h,c<<16|l)},e.prototype.subtract=function(e){return this.add(e.negate())},e.prototype.not=function(){return e.fromBits(~this._low,~this._high)},e.prototype.negate=function(){return this.equals(e.minValue)?e.minValue:this.not().add(e.one)},e.prototype.getLowBitsUnsigned=function(){return this._low>=0?this._low:i+this._low},Object.defineProperty(e,"zero",{get:function(){return e.fromInt(0)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"one",{get:function(){return e.fromInt(1)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"minValue",{get:function(){return e.fromBits(0,-2147483648)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"maxValue",{get:function(){return e.fromBits(-1,2147483647)},enumerable:!1,configurable:!0}),e.prototype.extractBits=function(t,n){if(isNaN(t)||isNaN(n)||t<0||n<0||t>n)throw new Error("invalid parameter");var i=e.one.shiftLeft(n-t+1).subtract(e.one).shiftLeft(t);return this.and(i).shiftRight(t).toNumber()},e}()},99166:function(e,t,n){"use strict";n.d(t,{q:function(){return l}});var i=n(58932),r=n(72424),o=n(41315),a=n(15869),s=a.v.fromNumber(4503599627370496),u=0x8000000000000,c=a.v.fromNumber(u),l=function(e){function t(t,n){var i=e.call(this,r.u.Publication)||this;return i.publicationId=t,i.articleNumber=n,i}return(0,i.C6)(t,e),t.prototype.toBinary=function(){var e=this.publicationId<=16777215,t=s.or(a.v.fromNumber(this.publicationId));return(t=e?t.or(a.v.fromNumber(this.articleNumber).shiftLeft(24)):(t=t.or(a.v.fromNumber(this.articleNumber).shiftLeft(32))).or(c)).toNumber()},t.isValid=function(e){return e>=4503599627370496&&e<9007199254740992},t.parse=function(e){var n=a.v.fromNumber(e),i=n.and(c).toNumber()===u?32:24;return new t(n.extractBits(0,i-1),n.extractBits(i,50))},t}(o.f)},90531:function(e,t,n){"use strict";n.d(t,{T:function(){return o}});var i=n(99166),r=n(73177),o=function(){function e(){}return e.fromPublication=function(e,t){return new i.q(e,t)},e.fromIssue=function(e,t){return new r.P(e,t)},e.parse=function(e){if(i.q.isValid(e))return i.q.parse(e);if(r.P.isValid(e))return r.P.parse(e);throw new TypeError("Article ID ".concat(e," is not valid"))},e.isValid=function(e){return i.q.isValid(e)||r.P.isValid(e)},e}()},2953:function(e,t,n){"use strict";n.d(t,{H:function(){return c},a:function(){return l}});var i=n(1766),r=n(80477),o=2/3,a=1,s=4,u=4;function c(e,t){if(i(e))return null;var n=Math.min(t.screenWidth,t.screenHeight),c=Math.max(t.screenWidth,t.screenHeight)*r.S,l=e.reduce((function(e,t){if(!t.size||null===t.size.width||null===t.size.height)return e;var i=n/t.size.width,r=t.size.height/t.size.width;if(t.size.height*i<=c&&i<=s&&re.rate)return{image:t,rate:l}}return e}),null);return(null==l?void 0:l.image)||null}function l(e){if(!(null==e?void 0:e.length))return null;for(var t=null,n=0,i=0,r=e;iu)){var a=o.size.width*o.size.height;n4)throw new Error("cid length exeeds 4 characters");if(!i(t))throw new TypeError("issuedDate has to be a Date");if(!o(n)&&!r(n))throw new TypeError("issueVersion has to be either null or undefined or a String or a Number");if(r(n)&&(n<0||n>99))throw new Error("issueVersion has to be a number in [0..99] range");if(o(n)&&n.length>2)throw new Error("issueVersion exeeds 2 characters length");var u=t.getFullYear(),c=a("".concat(t.getMonth()+1),2,"0"),l=a("".concat(t.getDate()),2,"0"),f=a("".concat(n),2,"0");return"".concat(e).concat(u).concat(c).concat(l).concat(d).concat(f).concat(h)}function p(e){return o(e)&&!(0,s.gP)(e)&&e.length===u&&e.substring(12,18)===d&&e.substring(20,26)===h}function m(e){if(!p(e))throw new Error("".concat(e," is not valid issue key"))}function g(e){return m(e),e.substring(0,12)}function v(e){return e&&e.length===c||m(e),e.substring(4,12)}function y(e){m(e);var t=parseInt(e.substring(4,8),10),n=parseInt(e.substring(8,10),10),i=parseInt(e.substring(10,12),10);return new Date(t,n-1,i)}function _(e){return e&&e.length===c||m(e),e.substring(0,4)}function b(e){return m(e),Number(e.slice(c+d.length,c+d.length+l))}function w(e,t){if((0,s.gP)(e))throw new Error("cid required");if(e.length>4)throw new Error("cid length exeeds 4 characters");if(!t)return"".concat(e,"latest");if(!i(t))throw new TypeError("issuedDate has to be a Date");var n=t.getFullYear(),r=a("".concat(t.getMonth()+1),2,"0"),o=a("".concat(t.getDate()),2,"0");return"".concat(e).concat(n).concat(r).concat(o)}function C(e){var t=e.getFullYear(),n=a("".concat(e.getMonth()+1),2,"0"),i=a("".concat(e.getDate()),2,"0");return"".concat(t).concat(n).concat(i)}function A(e){if(!e||8!==e.length)throw new Error("".concat(e," is not valid issue date string"));var t=parseInt(e.substring(0,4),10),n=parseInt(e.substring(4,6),10),i=parseInt(e.substring(6,8),10);return new Date(t,n-1,i)}function I(e){var t=v(e);return"".concat(t.substring(0,4),"-").concat(t.substring(4,6),"-").concat(t.substring(6))}},21994:function(e,t,n){"use strict";n.d(t,{G:function(){return i.G},p:function(){return i.p}});var i=n(2252)},2252:function(e,t,n){"use strict";n.d(t,{G:function(){return u},p:function(){return r}});var i=n(91445);function r(e){return"".concat(Math.floor(e.width),"x").concat(Math.floor(e.height))}function o(e){return{singleLayer:e.singleLayer,maxUnrestrictedScale:e.maxUnrestrictedScale||0,sizes:e.sizes.map((function(e){return e.size})),tiled:e.sizes.reduce((function(e,t){return t.tiled&&(e[r(t.size)]=!0),e}),{}),scales:e.sizes.reduce((function(e,t){return e[r(t.size)]=t.scale,e}),{})}}function a(e,t){var n=(0,i.wC)(e,t),r=(0,i.EZ)(e.size,t.maxUnrestrictedPageSize,t.nonTiledSizes);return o({singleLayer:t.singleLayer,sizes:n,maxUnrestrictedScale:r})}function s(e,t,n){var r=(0,i.st)((0,i.wC)(e,n),(0,i.wC)(t,n)),a=r.left,s=r.right,u=(0,i.EZ)(e.size,n.maxUnrestrictedPageSize,n.nonTiledSizes),c=(0,i.EZ)(t.size,n.maxUnrestrictedPageSize,n.nonTiledSizes);return{left:o({singleLayer:n.singleLayer,sizes:a,maxUnrestrictedScale:u}),right:o({singleLayer:n.singleLayer,sizes:s,maxUnrestrictedScale:c})}}function u(e,t){for(var n=e.singleLayer,i=e.maxFirstPageSize,r=e.maxNonFirstPageSize,o=e.allowedNonTiledSizes,u=e.allowedTiledSizes,c=0;ct.width||i.height>t.height?n:a(e,i)}),0)}},56164:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});var i="@pressreader/content"},51880:function(e,t,n){"use strict";n.d(t,{Jh:function(){return Pe},W$:function(){return ft},EW:function(){return Me},u2:function(){return _},Gq:function(){return it},D0:function(){return rt},g$:function(){return g},g4:function(){return Fe},Tk:function(){return y},AZ:function(){return ht},Ly:function(){return Ae},q6:function(){return Ce},OL:function(){return we},z4:function(){return _e},GM:function(){return be},V2:function(){return te},Wt:function(){return K},GG:function(){return oe},sF:function(){return Se},rx:function(){return ye},qe:function(){return ve}});var i=n(13981),r=n(56164),o=r.p+"/issues",a=n(44229),s=n(58932),u=n(74010),c=n(89103),l=n(43566),d=n(33260),h=n(43125);function f(){for(var e=[],t=0;t0&&(i=window.setTimeout((function(){return n(new Error(u[r.Timeout]))}),e)),window.navigator.geolocation.getCurrentPosition((function(e){window.clearTimeout(i),t({lat:e.coords.latitude,lng:e.coords.longitude})}),(function(e){window.clearTimeout(i);var t=u[e.code];e.code!==r.Unknown&&e.code!==r.PositionUnavailable||(t+=" ".concat(e.message)),n(new Error(t))}),{timeout:e,enableHighAccuracy:!0,maximumAge:0})}))]}}))}))}function d(){return(0,o.sH)(this,void 0,void 0,(function(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,c()];case 1:return[2,"denied"===e.sent().state]}}))}))}function h(){return(0,o.sH)(this,void 0,void 0,(function(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,c()];case 1:return[2,"prompt"===e.sent().state]}}))}))}function f(){return(0,o.sH)(this,void 0,void 0,(function(){var e;return(0,o.YH)(this,(function(t){switch(t.label){case 0:return[4,c()];case 1:return"denied"===(e=t.sent()).state?[2,!1]:"granted"===e.state?[2,!0]:[2,Promise.race([new Promise((function(e){navigator.geolocation.getCurrentPosition((function(){return e(!0)}),(function(t){return e(!1)}))})),new Promise((function(t){e.onchange=function(){return t("granted"===e.state)}}))])]}}))}))}},2111:function(e,t,n){"use strict";function i(e,t){return!(Math.max(e.left,t.left)>=Math.min(e.left+e.width,t.left+t.width))&&Math.max(e.top,t.top)=n&&o>=r?{left:n,top:r,width:i-n,height:o-r}:null}function o(e,t){var n=Math.max(e.left,t.left),i=Math.min(e.left+e.width,t.left+t.width),r=Math.max(e.top,t.top),o=Math.min(e.top+e.height,t.top+t.height);return i>=n&&o>=r?{left:Math.max(t.left-e.left,0),top:Math.max(t.top-e.top,0),width:i-n,height:o-r}:null}function a(e,t,n){var i=Math.max(Math.min(e.left,t.left),n.left);if(Math.min(Math.max(e.left+e.width,t.left+t.width),n.left+n.width)=e.left&&t.x<=e.left+e.width&&t.y>=e.top&&t.y<=e.top+e.height}function u(e,t){var n=e.left,i=e.width,r=t.x;return Math.min(Math.abs(r-n),Math.abs(r-n-i))}function c(e,t){return t.top>=e.top&&t.top+t.height<=e.top+e.height}function l(e,t){return{top:e.top-t/2,left:e.left-t/2,width:e.width+t,height:e.height+t}}function d(e,t,n){return void 0===n&&(n=!0),n?e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height:!(Math.round(e.left-t.left)||Math.round(e.top-t.top)||Math.round(e.width-t.width)||Math.round(e.height-t.height))}n.d(t,{HY:function(){return i},IJ:function(){return a},Im:function(){return o},KZ:function(){return u},OU:function(){return c},SV:function(){return r},Uc:function(){return s},fT:function(){return l},oM:function(){return d}})},1724:function(e,t,n){"use strict";function i(e,t,n){void 0===n&&(n=!0);for(var i=null,r=Number.MAX_VALUE,o=0,a=t;os.width)continue;if(s.height&&e.height>s.height)continue}var u=(s.width?Math.abs(s.width-e.width)/e.width:1)*(s.height?Math.abs(s.height-e.height)/e.height:1);ua.width||e.height>a.height)){var s=Math.abs(a.width-e.width)/e.width*(Math.abs(a.height-e.height)/e.height);s0&&(i="up"===n?i:i-1),t[i]}function o(e,t,n){var i=e.width*t,r=e.height*t;return n&&(i=Math[n](i),r=Math[n](r)),{width:i,height:r}}n.d(t,{DA:function(){return i},F3:function(){return r},_6:function(){return o}})},42906:function(e,t,n){"use strict";n.d(t,{c:function(){return a}});var i=n(29978),r=n(65726),o=n(28809),a=(0,i.Mz)(o._t,(function(e){var t=e(r.SC,!1),n=e(r.C7,!1);return{enabled:t&&!n}}))},92716:function(e,t,n){"use strict";n.d(t,{m:function(){return s}});var i=n(29978),r=n(78698),o=n(28809),a=n(80835),s=(0,i.Mz)(o._t,r.nw,(function(e,t){var n,i=!(t===a.Z.Pervasive),r=e("UI.Comments.enable",!0)&&(null===(n=e("features.comment.enabled"))||void 0===n||n);return i&&r}))},43755:function(e,t,n){"use strict";n.d(t,{N:function(){return c}});var i=n(29978),r=n(78698),o=n(28809),a=n(80835),s=n(16343),u=n(68565),c=(0,i.Mz)(o._t,r.nw,(function(e,t){var n=t!==a.Z.Voyager,i=e("radio",{enable:!0}).enable,r=e("UI.Listen.enable",!0),o=!(s.j.mobile&&(0,u.l)())||e("features.views.article.optionsTool.showListenOnMobile.enabled",!0);return n&&i&&r&&o}))},18978:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var i=n(29978),r=n(90732),o=n(78698),a=n(28809),s=n(29178),u=n(30657),c=n(80835),l=n(18752),d=n(11677),h=n(42906),f=(0,s.g)(u.gN);function p(e){return{width:e.w,height:e.h}}var m=(0,i.Mz)(a._t,o.nw,l.L9,l.Fq,h.c,(function(e,t,n,i,o){var a=[];o.enabled||a.push(u.gN.Books);var s=t===c.Z.Pervasive,l=e("pageSizes.firstPageSizes")||[],h=e("pageSizes.pageSizes")||[],m=!s&&e("features.search.tabs.enabled",!0),g=e("features.search.tabs.available",Object.values(u.gN).join(",")).split(",").filter(f),v=r(g,a),y=e("features.search.tabs.default");return{defaultTab:f(y)?y:u.gN.All,tabsEnabled:m,tabsAvailable:v,firstPageSizes:l.map(p),pageSizes:h.map(p),imageServers:{imageDownload:e("imageServer.download.url",""),thumbs:e("imageServers.thumbs",[""])[0]},filtersCollapsible:[d.a.Small,d.a.XSmall].indexOf(n)>=0&&i===d.Z.Portrait,applyFiltersManually:t===c.Z.Pervasive,articleImagesSupported:t!==c.Z.Pervasive}}))},97471:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var i=n(29978),r=n(28809),o=(0,i.Mz)(r._t,(function(e){return e("ui.Sharing.enable",!0)&&e("UI.SharingMenu",[]).some((function(e){return e.enabled}))}))},90185:function(e,t,n){"use strict";n.d(t,{V:function(){return a}});var i=n(15397),r=n(45221),o=n(80704);function a(e,t){return function(e,t,n){var i=new r.A(e);return i.setPath("".concat(i.path()).concat(t)),n&&(0,o.u)(n,(function(e,t){null!=e&&i.addQueryParam(t,e)})),i.toString()}((0,i.Ct)("imageServer.download.url",""),e,t)}},7368:function(e,t,n){"use strict";n.d(t,{Af:function(){return y},Bs:function(){return m},F6:function(){return p},Fv:function(){return d},K6:function(){return c},N5:function(){return l},N6:function(){return u},OZ:function(){return g},TK:function(){return f},Ux:function(){return v},sP:function(){return h}});var i=n(58932),r=n(1729),o=(0,i.Cl)({},r);function a(e,t,n){if(t>0&&e.width>0){var i=100*t/e.width;return Math.min(i,n)}return 0}function s(e,t,n){if(t>0&&e.height>0){var i=100*t/e.height;return Math.min(i,n)}return 0}function u(e,t,n,i,r){return l(e,t,n,Math.floor(100*r/i))}function c(e,t,n,i,r){return l(e,t,n,Math.floor(100*r/i))}function l(e,t,n,i,r){return"string"==typeof e?o.getPictureUrlByIssueForScale(e,t,n,i,r):o.getPictureUrlByIssueForScale(e.issue,t,n,i,r)}function d(e,t,n,i){return void 0===n&&(n=1),void 0===i&&(i=!1),e?"string"==typeof e?o.getThumbUrlByIssueForWidth(e,t,n,i):o.getThumbUrlByIssueForWidth(e.issue,t,n,i):null}function h(e,t,n,i){return void 0===n&&(n=1),void 0===i&&(i=!1),"string"==typeof e?o.getThumbUrlByCidForWidth(e,t,n,i):e.issueInfo?d(e.issueInfo,t,n,i):o.getThumbUrlByCidForWidth(e.cid,t,n,i)}function f(e,t,n,i){return void 0===i&&(i=1),o.getThumbUrlByCidAndDateForWidth(e,t,n,i)}function p(e,t,n,i){return o.getThumbUrlForScale(e,t,n,i)}function m(e,t,n){return o.getPageImageScale(e,t,n)}function g(e,t,n,i){return o.getThumbUrlByRegionKey(e,t,n,i)}function v(e){var t=null;if(e)for(var n=0,i=e;n10||r.Width/r.Height>10)){var o=r.Width/r.Height;if(o>.7&&o<2){var u=a({width:r.Width},600,400),c=s({height:r.Height},120,400);if(u<=0||c<=0)continue;if(null===t){t=r;continue}if(r.Width>t.Width||r.Height>t.Height){t=r;continue}}}}return t}function y(e,t,n){var i=function(e,t,n,i){return"string"==typeof e?o.getFirstPageThumbUrlByIssueForWidth(e,t,1,i):o.getFirstPageThumbUrlByIssueForWidth(e.issue,t,1,i)}(e,t,0,!0);return i&&n&&(i+="&x=".concat(n)),i}},1729:function(e,t,n){"use strict";n.r(t),n.d(t,{getFirstPageThumbUrlByIssueForWidth:function(){return v},getPageImageScale:function(){return C},getPageImageUrl:function(){return w},getPictureUrlByIssueForScale:function(){return b},getThumbUrlByCidAndDateForHeight:function(){return p},getThumbUrlByCidAndDateForWidth:function(){return m},getThumbUrlByCidForHeight:function(){return f},getThumbUrlByCidForWidth:function(){return h},getThumbUrlByIssueForHeight:function(){return y},getThumbUrlByIssueForWidth:function(){return g},getThumbUrlByRegionKey:function(){return d},getThumbUrlForScale:function(){return _}});var i=n(58932),r=n(2291),o=n(1791),a=n(2838),s=n(77394),u=n(15397),c=o((function(e,t){var n=s((0,i.fX)((0,i.fX)([],e,!0),t,!0).map((function(e){return e.w})));return a(n,(function(e,t){return e>t}))}));function l(){return(0,u.Ct)("imageServers.thumbs",[])[0]}function d(e,t,n,i){var r=l();if(r){var o=new URLSearchParams;return o.set("regionKey",e),t&&o.set("file",t),void 0!==n&&o.set("scale",n.toString()),i&&o.set("ver",i),"".concat(r,"?").concat(o.toString())}}function h(e,t,n,i){void 0===n&&(n=1),void 0===i&&(i=!1);var r=l(),o="";return r?(i&&(t*=2,o="&retina=2"),t=I(t),"".concat(r,"?cid=").concat(e,"&page=").concat(n||1,"&width=").concat(t).concat(o)):null}function f(e,t,n){void 0===n&&(n=1);var i=l();return i?"".concat(i,"?cid=").concat(e,"&page=").concat(n,"&height=").concat(t):null}function p(e,t,n,i,r){void 0===i&&(i=1),void 0===r&&(r=!1);var o=l();if(!o)return null;var a="";if("string"!=typeof t){var s=t.getMonth()+1,u=t.getDate();a=t.getFullYear()+(s<10?"0":"")+s+(u<10?"0":"")+u}else a=t;var c="";return r&&(n*=2,c="&retina=2"),"".concat(o,"?cid=").concat(e,"&date=").concat(a,"&page=").concat(i,"&height=").concat(n).concat(c)}function m(e,t,n,i){void 0===n&&(n=160),void 0===i&&(i=1);var r=l();if(!r)return null;var o="";if("string"!=typeof t){var a=t.getMonth()+1,s=t.getDate();o=t.getFullYear()+(a<10?"0":"")+a+(s<10?"0":"")+s}else o=t;return"".concat(r,"?cid=").concat(e,"&date=").concat(o,"&page=").concat(i,"&width=").concat(n)}function g(e,t,n,i){var r=l();if(!r)return null;var o="";return i&&(t*=2,o="&retina=2"),t=I(t),"".concat(r,"?file=").concat(e,"&page=").concat(n||1,"&width=").concat(t).concat(o)}function v(e,t,n,i){var o=l();if(!o)return null;var a="";return i&&(t*=2,a="&retina=2"),t=function(e){var t=e,n=(0,u.Ct)("pageSizes.pageSizes",[]),i=(0,u.Ct)("pageSizes.firstPageSizes",[]),o=c(n,i);o.length&&(t=o.find((function(t){return t>e}))||r(o));return t}(t),"".concat(o,"?file=").concat(e,"&page=").concat(n||1,"&width=").concat(t).concat(a)}function y(e,t,n,i){void 0===n&&(n=1),void 0===i&&(i=!1);var o=l();if(!o)return null;var a="";return i&&(t*=2,a="&retina=2"),t=function(e){var t=e,n=(0,u.Ct)("pageSizes.pageSizes",[]).filter((function(e){return e.h>0}));if(n.length){var i=n.find((function(t){return t.h>e}));t=i?i.h:r(n).h}return t}(t),"".concat(o,"?file=").concat(e,"&page=").concat(n,"&height=").concat(t).concat(a)}function _(e,t,n,i){var r=l();return r?"".concat(r,"?file=").concat(e,"&page=").concat(n||1,"&scale=").concat(t).concat(i?"&ver=".concat(i):""):null}function b(e,t,n,i,r){var o=l();return o?"".concat(o,"?regionguid=").concat(t,"&scale=").concat(i,"&file=").concat(e,"&regionKey=").concat(n).concat(r?"&ver=".concat(r):""):null}function w(e,t,n,i,r){var o=A(t,n,i.width,i.height);if(!o)return null;var a=(0,u.Ct)("imageServers.pages",[])[0];return a?"".concat(a,"?file=").concat(e,"&page=").concat(t,"&scale=").concat(o).concat(r?"&layer=".concat(r):""):null}function C(e,t,n){return A(e,t,n.width,n.height)}function A(e,t,n,i){var r,o,a=t.width/100,s=t.height/100;n&&n>0&&(r=Math.floor(n/a)),i&&i>0&&(o=Math.floor(i/s));var c=(0,u.Ct)("pageSizes.pageSizes")||[],l=(0,u.Ct)("pageSizes.firstPageSizes")||[],d=[c];1===e&&d.push(l);var h=0;if(r&&n)for(var f=0,p=d;f=0;m--)if((C=b[m].w)&&!(C>n)){var g=Math.floor(C/a);g>r||(w=b[m].h)&&(g=Math.min(g,Math.floor(w/s)))>r||(h=Math.max(h,g))}var v=0;if(o&&i)for(var y=0,_=d;y<_.length;y++){var b;for(m=(b=_[y]).length-1;m>=0;m--){var w;if((w=b[m].h)&&!(w>i)){var C,A=Math.floor(w/s);A>o||(C=b[m].w)&&(A=Math.min(A,Math.floor(C/a)))>o||(v=Math.max(v,A))}}}return Math.min(h||v,v||h)}function I(e){var t=e,n=(0,u.Ct)("pageSizes.pageSizes",[]).filter((function(e){return e.w>0}));if(n.length){var i=n.find((function(t){return t.w>e}));t=i?i.w:r(n).w}return t}},80708:function(e,t,n){"use strict";n.d(t,{J:function(){return r},p:function(){return i}});var i="integrations-zotero",r=500},30212:function(e,t,n){"use strict";n.d(t,{z:function(){return s}});var i=n(58932),r=new(n(69463).B);function o(e){return e instanceof Error}function a(e){return null==e?"":o(e)?function(e){return"".concat(e.message,".\nStack: ").concat(e.stack)}(e):"object"==typeof e?(t=e,JSON.stringify(t,null,4)):String(e);var t}function s(e){for(var t,n=[],s=1;s=0&&(t.hash=e.slice(n),e=e.slice(0,n));var i=e.indexOf("?");i>=0&&(t.search=e.slice(i),e=e.slice(0,i)),e&&(t.pathname=e)}return t}(e):e),{state:t,key:a()})}function A(e){return[{state:(0,r.tw)(e.state),key:e.key},(c=e,"string"==typeof c?c:(t=c,n=t.pathname,i=void 0===n?"/":n,o=t.search,a=void 0===o?"":o,s=t.hash,u=void 0===s?"":s,a&&"?"!==a&&(i+="?"===a.charAt(0)?a:"?"+a),u&&"#"!==u&&(i+="#"===u.charAt(0)?u:"#"+u),i))];var t,n,i,o,a,s,u,c}window.addEventListener("popstate",(function(){w("POP")})),c.replaceState({state:{},key:a()},"")},60019:function(e,t,n){"use strict";n.d(t,{FU:function(){return c},Go:function(){return d},Jf:function(){return l},Pp:function(){return s},_n:function(){return h},lJ:function(){return o},tI:function(){return u}});var i=n(60573),r=n(53269),o=null,a={},s=function(e){o=e},u=function(e,t){var n=a[e]||{};return i(t,(function(e,t,i){return"stateLess"in(n[i]||{})?e.stateLessParams[i]=t:e.stateParams[i]=t,e}),{stateParams:{},stateLessParams:{}})},c=function(e,t){a[e]=t},l=function(e,t){return void 0===t&&(t={}),t.viewName=e,r.UN.generateUrl(t).then((function(e){return e&&e.url||""}))},d=!0,h=function(e){d=e}},12730:function(e,t,n){"use strict";n.d(t,{KZ:function(){return o},fJ:function(){return r}});var i={};function r(e,t,n,r){if(i[e])throw new Error("view name ".concat(e," was already registered in viewRegistry"));i[e]={load:t,component:n,fallback:r}}function o(e){return i[e]}},27602:function(e,t,n){"use strict";n.d(t,{gN:function(){return R},sh:function(){return F},r:function(){return C},Lm:function(){return A},DI:function(){return T},qF:function(){return k},TU:function(){return P},Ng:function(){return I},bv:function(){return S},Yr:function(){return O},P4:function(){return Y},cl:function(){return X},FL:function(){return U},aq:function(){return W},SP:function(){return N},PX:function(){return B},D0:function(){return _},so:function(){return b},Vp:function(){return he},SG:function(){return ge},Lr:function(){return fe},Ae:function(){return _e},zo:function(){return me},Do:function(){return we},zq:function(){return pe},RC:function(){return M},r7:function(){return w},By:function(){return z},cQ:function(){return x}});var i,r=n(13981),o="@pressreader/navigation-core",a=n(58932),s=n(78698),u=n(89103),c=n(76082),l=function(e,t){return(0,a.Cl)((0,a.Cl)({},e),{hash:t})},d=function(){for(var e=[],t=0;t0})),C=n(44834),A=n(56880),I=n(30212),S=n(88960);function P(e){var t,n=e.id,i=e.isCancelled,r=void 0===i||i,a=e.result,s=void 0===a?void 0:a,u=e.closeParent,c=void 0===u||u;return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,C.Lt)(y,{id:n})];case 1:return t=e.sent(),[4,(0,C.yJ)(d({id:n,isCancelled:r,result:s}))];case 2:return e.sent(),(null==t?void 0:t.parentId)&&c?[4,(0,C.yJ)(l({id:t.parentId,result:s,isCancelled:r}))]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}}))}function x(e){var t,n,i,r,a;return(0,o.YH)(this,(function(o){switch(o.label){case 0:return t=e.payload,n=t.id,i=t.result,r=t.isBack,a=t.isCancelled,[4,(0,C.T1)(P,{id:n,isCancelled:a,result:i,closeParent:!r})];case 1:return o.sent(),[2]}}))}function T(e){var t=e.id;return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,C.T1)(P,{id:t,isCancelled:!0,result:void 0,closeParent:!0})];case 1:return e.sent(),[2]}}))}function k(e,t){var n,i,r,a,s,c,d;return(0,o.YH)(this,(function(h){switch(h.label){case 0:return n=(0,S.A)(),[4,(0,C.yJ)(u({popup:(0,o.Cl)((0,o.Cl)({},e),{id:n})}))];case 1:if(h.sent(),!(null==t?void 0:t.onOpened))return[3,5];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,(0,C.Zy)(t.onOpened,n)];case 3:return i=h.sent(),[3,5];case 4:return r=h.sent(),(0,I.z)("Error running onOpened saga for ".concat(e.name,"."),r),[3,5];case 5:return[4,(0,A.l)(l,(function(e){return e.payload.id===n}))];case 6:if(s=h.sent(),a={popupId:n,cancelled:!0===s.payload.isCancelled,data:s.payload.result},c=!0,!(null==t?void 0:t.onClosing))return[3,10];h.label=7;case 7:return h.trys.push([7,9,,10]),[4,t.onClosing(a)];case 8:return c=!1!==h.sent(),[3,10];case 9:return d=h.sent(),(0,I.z)("Error running onClosing saga for ".concat(e.name),d),c=!1,[3,10];case 10:return c?[4,x(s)]:[3,12];case 11:return h.sent(),[3,13];case 12:return[3,5];case 13:return i?[4,(0,C.ZT)(i)]:[3,15];case 14:h.sent(),h.label=15;case 15:return[2,a]}}))}function E(e,t){var n;return(0,o.YH)(this,(function(i){switch(i.label){case 0:return[4,(0,C.Lt)(y,{id:e})];case 1:return(n=i.sent())?[4,(0,C.yJ)(c({popup:(0,o.Cl)((0,o.Cl)({},n),t)}))]:[2];case 2:return i.sent(),[2]}}))}i.bX.addFeature(r,h)},80606:function(e,t,n){"use strict";n.d(t,{Z_:function(){return I},_E:function(){return h},zU:function(){return x},qn:function(){return c},jX:function(){return f},NJ:function(){return l},jA:function(){return A},dg:function(){return d},Dh:function(){return P},JB:function(){return u},i3:function(){return _},Io:function(){return v},d3:function(){return S}});var i=n(13981),r="@pressreader/popups-legacy",o=n(58932),a=n(89103),s="@pressreader/popups-legacy/",u=(0,a.lQ)("".concat(s,"open_dialog")),c=(0,a.lQ)("".concat(s,"close_dialog_request")),l=(0,a.lQ)("".concat(s,"dialog_close_done")),d=(0,a.lQ)("".concat(s,"open_contextmenu")),h=(0,a.lQ)("".concat(s,"close_contextmenu_request")),f=(0,a.lQ)("".concat(s,"contextmenu_close_done")),p=(0,a.vy)({popups:[]},(0,a.po)(d,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{popups:(0,o.fX)((0,o.fX)([],e.popups,!0),[n.menu],!1)})})),(0,a.po)(f,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{popups:e.popups.filter((function(e){return e.id!==n.id}))})})),(0,a.po)(u,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{popups:(0,o.fX)((0,o.fX)([],e.popups,!0),[n.dialog],!1)})})),(0,a.po)(l,(function(e,t){var n=t.payload;return(0,o.Cl)((0,o.Cl)({},e),{popups:e.popups.filter((function(e){return e.id!==n.id}))})}))),m=n(29978),g=n(15520),v=(0,m.Mz)((function(e){return e[r]}),(function(e){return e.popups})),y=(0,m.Mz)(v,(function(e,t){return t}),(function(e,t){return e.find((function(e){return e.id===t}))})),_=(0,m.Mz)(v,(function(e){return e.filter((function(e){return e.type===g.n.Dialog}))})),b=n(44834),w=n(56880),C=n(88960);function A(e){var t;return(0,o.YH)(this,(function(n){switch(n.label){case 0:return t=(0,C.A)(),[4,(0,b.yJ)(d({menu:{type:g.n.ContextMenu,id:t,parentId:e.parentMenuId,name:e.name,context:e.context,position:e.position,positionCalculationStrategy:e.positionCalculationStrategy}}))];case 1:return n.sent(),[2,t]}}))}function I(e,t){var n;return(0,o.YH)(this,(function(i){switch(i.label){case 0:return[4,(0,b.Lt)(y,e)];case 1:return(null==(n=i.sent())?void 0:n.type)!==g.n.ContextMenu?[2]:[4,(0,b.yJ)(f({id:e,back:t.back}))];case 2:return i.sent(),t.back?[3,4]:n.parentId?[4,(0,b.yJ)(h({id:n.parentId,cancelled:!0}))]:[3,4];case 3:i.sent(),i.label=4;case 4:return[2]}}))}function S(e){return(0,o.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,w.l)(h,(function(t){return t.payload.id===e}))];case 1:return[2,t.sent()]}}))}function P(e,t,n){var i;return void 0===n&&(n=!0),(0,o.YH)(this,(function(r){switch(r.label){case 0:return i=(0,C.A)(),[4,(0,b.yJ)(u({dialog:{type:g.n.Dialog,id:i,name:e,context:t,supportNativeScroll:n}}))];case 1:return r.sent(),[2,i]}}))}function x(e){return(0,o.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,b.yJ)(l({id:e}))];case 1:return t.sent(),[2]}}))}i.bX.addFeature(r,p)},15520:function(e,t,n){"use strict";var i;n.d(t,{n:function(){return i}}),function(e){e[e.ContextMenu=0]="ContextMenu",e[e.Dialog=1]="Dialog"}(i||(i={}))},62444:function(e,t,n){"use strict";var i;n.d(t,{W:function(){return i}}),function(e){e[e.Center=0]="Center",e[e.Left=1]="Left",e[e.Right=2]="Right",e[e.Top=3]="Top",e[e.Bottom=4]="Bottom",e[e.ScreenCenter=10]="ScreenCenter",e[e.ScreenLeft=11]="ScreenLeft",e[e.ScreenRight=12]="ScreenRight",e[e.ScreenTop=13]="ScreenTop",e[e.ScreenBottom=14]="ScreenBottom",e[e.Auto=15]="Auto"}(i||(i={}))},33260:function(e,t,n){"use strict";n.d(t,{KT:function(){return s},qI:function(){return a},St:function(){return o}});var i=n(89103),r="@pressreader/purchase/",o=(0,i.lQ)("".concat(r,"purchase_done")),a=(0,i.lQ)("".concat(r,"issue_purchase_request_done")),s=(0,i.lQ)("".concat(r,"issue_purchase_request"))},20974:function(e,t,n){"use strict";n.d(t,{S:function(){return l},u:function(){return c}});var i=n(31555),r=n(5059),o=n(97556),a=n(83421),s=function(e){var t=["fli",e.className,"combobox-item"],n=(0,r.useId)(),s=(0,r.useContext)(a.L),u=(null==s?void 0:s.selectedItemId)===n,c=e.onClick,l=(0,r.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),c(),null==s||s.close()}),[c,s]);return(0,i.jsx)("li",{role:"none",className:"combobox-item-wrapper ".concat(u?"focused":""),children:(0,i.jsx)(o.o,{id:n,role:"option","aria-selected":u,onClick:l,tabIndex:-1,className:t.join(" "),children:e.children})})},u=(0,r.createContext)(null);function c(){return(0,r.useContext)(u)}var l=function(e){var t=e.inputRef,n=e.onClose,o=e.children,a=(0,r.useMemo)((function(){return{close:n,itemAs:s,searchInputRef:t}}),[n,t]);return(0,i.jsx)(u.Provider,{value:a,children:o})}},85834:function(e,t,n){"use strict";n.d(t,{O:function(){return v}});var i=n(58932),r=n(31555),o=n(5059),a=n(85387),s=n(59148),u=n(33005),c=n(81832),l=n(27602),d=n(64404),h=n(82666),f=n(99529),p=n(83421),m=n(20974),g=n(70317),v=function(e){var t=e.autoFocus,n=e.hasCancelButton,v=e.onChange,y=e.onSearch,_=e.onClose,b=(0,a.wA)(),w=(0,o.useRef)(null),C=(0,a.d4)(s.V),A=(0,a.d4)(h.iN),I=(0,a.d4)(l.SG),S=(0,a.d4)(l.zo),P=(0,a.d4)(h.Dm),x=(0,a.d4)(h.bg),T=(0,m.u)();T&&(T.searchInputRef=w);var k=(0,i.zs)((0,o.useState)(!1),2),E=k[0],M=k[1],D=E&&C.booleanSearchEnabled&&!C.advancedSearchInPopup&&A,N=(0,o.useMemo)((function(){return D&&E}),[D,E]),L=(0,i.zs)((0,o.useState)(P),2),V=L[0],R=L[1];(0,o.useEffect)((function(){var e;R(P),C.booleanSearchEnabled||b((0,f.$2)({term:P})),!A&&E&&(null===(e=w.current)||void 0===e||e.focus())}),[b,P,C.booleanSearchEnabled,A,w,E]),(0,d.C)((function(){(null==I?void 0:I.id)!==(null==S?void 0:S.id)&&(null==_||_())}),[null==I?void 0:I.id,null==S?void 0:S.id,_]);var H=(0,o.useCallback)((function(e,t){t||M(!0),R(C.booleanSearchEnabled?P:e),v&&v(e),P.trimEnd()!==e.trimEnd()&&b((0,f.$2)({term:e}))}),[v,R,C.booleanSearchEnabled,P,b,M]),F=(0,o.useCallback)((function(){M(!1),null==_||_()}),[M,_]),B=(0,o.useCallback)((function(){""===P?null==F||F():(v&&v(""),b((0,f.$2)({term:""})))}),[b,v,P,F]),z=(0,o.useCallback)((function(){""!==P&&(null==y||y(P,x),null==_||_())}),[y,_,P,x]),O=(0,o.useCallback)((function(){C.advancedSearchInPopup?(b((0,u.jT)({query:window.location.search})),null==_||_()):(E||M(!0),b((0,f.qM)()))}),[b,C.advancedSearchInPopup,_,E,M]),j=(0,o.useCallback)((function(){M(!0)}),[M]);return(0,r.jsx)("div",{className:"topbar-search ".concat(D?"advsearch-open":"results-open"),children:(0,r.jsxs)(p._,{value:V,ref:w,onChange:H,onSubmit:z,onClose:F,onReset:B,onFocus:t?j:void 0,onClick:t?void 0:j,autoFocus:t,options:{hasReset:!0},hasAdvancedSearchSwitch:C.hasAdvancedSearchSwitch,hasCancelButton:n,onAdvancedSearch:O,disabled:N,opened:E,allowUnfocus:e.allowUnfocus,children:[!D&&(0,r.jsx)(g.S,{inputRef:w,onClose:F,onAdvancedSearch:O}),D&&(0,r.jsx)(c.C,{onSearch:z,booleanSearchMode:!0})]})})}},70317:function(e,t,n){"use strict";n.d(t,{S:function(){return M}});var i=n(31555),r=n(5059),o=n(85387),a=n(78698),s=n(51880),u=n(43125),c=n(27602),l=n(12705),d=n(22496),h=n(82666),f=n(81779),p=n(13931),m=n(41002),g=n(97556),v=n(85738),y=function(e){var t=e.title,n=e.onClick,r=e.className,o=(0,v.W)("fli fli-action",r);return(0,i.jsx)(g.o,{className:o,role:"option",tabIndex:-1,onClick:n,children:(0,i.jsx)("div",{className:"fli-in",children:(0,i.jsx)("div",{className:"flic flic--fit",children:(0,i.jsx)("div",{className:"flic-in",children:(0,i.jsx)("div",{className:"title",children:t})})})})})},_=function(){var e=(0,o.d4)(h.Dm),t=(0,o.d4)(c.SG),n=(0,o.d4)(a.uF);if(!e||!t||!n)return null;var r=(0,f.P)(t)&&t.issueKey,s=(0,p.f)(t)||r;return r||s?(0,i.jsx)("div",{className:"flist flist-button list-type-topactions",children:(0,i.jsxs)("ul",{className:"flist-box",children:[r?(0,i.jsx)(w,{}):null,s?(0,i.jsx)(C,{issueKey:t.issueKey}):null]})}):null},b=function(e){var t=e.children;return(0,i.jsx)("li",{role:"none",className:"combobox-item-wrapper",children:t})},w=function(){var e=(0,o.wA)(),t=(0,d.f)().localizedString;return(0,i.jsx)(b,{children:(0,i.jsx)(y,{onClick:function(){return e((0,m.GX)())},title:t("Search.CurrentIssue"),className:"combobox-item"})})},C=function(e){var t=e.issueKey,n=(0,o.wA)(),r=(0,d.f)().localizedString,a=(0,u.Yb)(t),c=(0,l.y)(s.Wt,{cidDateKey:a}),h=null==c?void 0:c.info;if(!h)return null;var f=r("Search.CurrentTitle",h.newspaper.name);return(0,i.jsx)(b,{children:(0,i.jsx)(y,{onClick:function(){return n((0,m.vc)())},title:f,className:"combobox-item"})})},A=n(20974),I=n(59038),S=n(28507),P=n(68158),x=n(68863),T=function(){var e=(0,r.useContext)(I.j),t=(0,o.d4)(S.e);return(0,r.useEffect)((function(){null==e||e.reposition()}),[e,t]),Object.keys(t).map((function(e){var n=t[e],o=(0,P.eB)(e);if(!o||!(null==n?void 0:n.data))return null;var a=o.component;return(0,i.jsx)(x.a$.Provider,{value:{result:n},children:(0,i.jsx)(r.Suspense,{fallback:null,children:(0,i.jsx)(a,{result:n})})},e)}))},k=n(59148),E=function(e){var t=e.onAdvancedSearch,n=(0,d.f)().localizedString;return(0,o.d4)(k.V).advancedSearchEnabled?(0,i.jsx)("div",{className:"flist flist-button",children:(0,i.jsx)(y,{onClick:t,title:n("Dialogs.AdvancedSearch.Header")})}):null},M=function(e){var t=e.inputRef,n=e.onClose,o=e.onAdvancedSearch,a=(0,r.useCallback)((function(){null==n||n()}),[n]);return(0,i.jsxs)(A.S,{inputRef:t,onClose:a,children:[(0,i.jsx)(_,{}),(0,i.jsx)(T,{}),(0,i.jsx)(E,{onAdvancedSearch:o})]})}},68863:function(e,t,n){"use strict";n.d(t,{VM:function(){return u},a$:function(){return s},pr:function(){return c}});var i=n(31555),r=n(5059),o=n(97556),a=n(6666),s=(0,r.createContext)({result:null});function u(){return(0,r.useContext)(s)}var c=function(e){var t=e.title,n=e.className,s=e.disableAction,u=e.isShowMoreAction,c=e.children,l=e.actionTitle,d=e.ariaLabel,h=e.action,f=(0,r.useCallback)((function(e){return(0,a.T)(e.nativeEvent),null==h||h(),!1}),[h]);return(0,i.jsxs)("div",{className:"flist flist-button ".concat(n||""),children:[t&&(0,i.jsx)("div",{className:"flist-header",children:(0,i.jsxs)("div",{className:"header-content",children:[(0,i.jsx)("div",{className:"header-copy-wrapper",children:(0,i.jsx)("h2",{className:"title",children:t})}),!s&&(0,i.jsx)("div",{className:"header-accessory",children:(0,i.jsx)(o.o,{className:u?"seemore":"","aria-label":d,role:"option",tabIndex:-1,onClick:f,children:l})})]})}),(0,i.jsx)("ul",{className:"flist-box",children:c})]})}},35334:function(e,t,n){"use strict";n.d(t,{I:function(){return r},p:function(){return i}});var i="@pressreader/quicksearch",r="@pressreader.quicksearch.dialog"},41002:function(e,t,n){"use strict";n.d(t,{AR:function(){return l},GX:function(){return g},IN:function(){return s},Jt:function(){return a},_x:function(){return u},cj:function(){return f},eO:function(){return m},jp:function(){return p},pM:function(){return c},ps:function(){return d},vc:function(){return v},xS:function(){return h}});var i=n(89103),r=n(35334),o="".concat(r.p,"/common/"),a=(0,i.lQ)("".concat(o,"open_dialog")),s=(0,i.lQ)("".concat(o,"search_request")),u=(0,i.lQ)("".concat(o,"search_began")),c=(0,i.lQ)("".concat(o,"search_source_began")),l=(0,i.lQ)("".concat(o,"search_source_done")),d=(0,i.lQ)("".concat(o,"search_source_failed")),h=(0,i.lQ)("".concat(o,"search_done")),f=(0,i.lQ)("".concat(o,"search_failed")),p=(0,i.lQ)("".concat(o,"cancel_search")),m=(0,i.lQ)("".concat(o,"navigate_to_search")),g=(0,i.lQ)("".concat(o,"search_in_current_issue")),v=(0,i.lQ)("".concat(o,"search_in_current_title"))},28507:function(e,t,n){"use strict";n.d(t,{e:function(){return a},w:function(){return s}});var i=n(29978),r=n(35334),o=function(e){return e[r.p]},a=(0,i.Mz)(o,(function(e){return e.results})),s=(0,i.Mz)(o,(function(e){return e.status}))},68158:function(e,t,n){"use strict";n.d(t,{eB:function(){return o},h4:function(){return r},kh:function(){return a}});var i=[];function r(e){i.push(e)}function o(e){return i.find((function(t){return t.sourceId===e}))}function a(){return i}},64404:function(e,t,n){"use strict";n.d(t,{B:function(){return o},C:function(){return r}});var i=n(5059);function r(e,t){var n=(0,i.useRef)(!1);(0,i.useEffect)((function(){n.current?e():n.current=!0}),t)}function o(e){var t=(0,i.useRef)(!1);(0,i.useLayoutEffect)((function(){t.current?e():t.current=!0}))}},11718:function(e,t,n){"use strict";n.d(t,{r:function(){return u}});var i=n(5059),r=n(23684),o=n(4291),a=n(30212),s=n(3503);function u(e){for(var t=[],n=1;n/g,">")),decodeURIComponent(e)}function x(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);var n=e.map(I).join(f);if(t.length){var r=t.map((function(e){var t=(0,i.zs)(e,2),n=t[0],r=t[1];return"".concat(S(n)).concat(g).concat(S(r))})).join(m);n="".concat(n).concat(p).concat(r)}return n.replace(/%2C/g,",")}function T(){return window.basePath||"/"}function k(e){return c(e,f)&&(e=e.substring(1)),"".concat(T()).concat(e)}function E(e){var t=T();return c(e,t)?e.substring(t.length):e}function M(){var e=document.location,t=E(e.pathname);return"".concat(t).concat(e.search)}function D(){return 0===document.location.pathname.replace(T(),"").length}var N=/[;/\\?:@&=+$,<>#%.!*'"()[\]{}^`~–‘’“”»«]+/g,L=s((function(e){if(!a(e))throw new Error("Cannot generate slug for non-string value. Given ".concat(e));var t=e.trim().replace(N,"").replace(/[| -]+/g,"-");return encodeURI(t).toLowerCase()}));function V(e,t){if(!(0,l.Ct)(d.oo,!1))return e;var n=E(e).split(f).filter((function(e){return e})),i=(0,l.Ct)(d.dN,[]),r=i.find((function(e){return e.id===t}));if(n.length>0){var o=n[0].toLowerCase();i.find((function(e){return e.id===o&&!!e.slug}))&&n.shift()}return(null==r?void 0:r.slug)&&n.unshift(r.slug),T()+n.join(f)}function R(e){if(!(0,l.Ct)(d.oo,!1))return e;var t=(0,l.Ct)(d.zk,"").split(","),n=(0,l.Ct)(d.mo,""),i=(0,l.Ct)(d.dN,[]).find((function(e){return e.id===n})),r=null==i?void 0:i.slug,o=e.length>0?e[0].split("?")[0]:"/";return t.indexOf(o)>=0&&r&&e.unshift(r),e}function H(e){return R((null!=e?e:"").split("/")).join("/")}},30877:function(e,t,n){"use strict";n.d(t,{MN:function(){return r},PB:function(){return o},pW:function(){return i}});var i="@pressreader/search-core",r=110,o=30},46191:function(e,t,n){"use strict";n.d(t,{mU:function(){return m},TP:function(){return p},Xy:function(){return y}});var i,r,o=n(18647),a=n(26906),s=n(7368),u=n(15397),c=function(e){var t=(0,u.Ct)("baseUrls.images");return t?(t.endsWith("/")||(t+="/"),"".concat(t).concat(e)):null},l=n(30657),d=n(66973),h=n(30877),f=n(76433);function p(e,t,n){var i,r=o(e.latestIssue.issueDate)?e.latestIssue.issueDate:(0,d.R)(e.latestIssue.issueDate);return{id:e.id,cid:e.cid,categories:e.categories,selected:!1,displayName:e.displayName,imageUrl:null!==(i=(0,s.TK)(e.cid,r||"",h.MN))&&void 0!==i?i:"",subtitle:(0,f.fT)(t,n,e.categories)}}function m(e){var t={};return e&&e.items.forEach((function(n){t[n.id]=function(e,t){var n;return e===a.b7.Countries?n=c("flags/32/".concat(t.iso,".png")):e===a.b7.Categories&&t.titlePublicationCid&&(n=(0,s.sP)(t.titlePublicationCid,h.MN)),{id:t.id,iso:t.iso,imageUrl:null!=n?n:void 0,displayName:t.displayName,selected:!1}}(e.id,n)})),t}var g=((i={})[l.aZ.All]="Everywhere",i[l.aZ.Headline]="Header",i[l.aZ.Body]="Body",i),v=((r={})[l.yx.Today]="Today",r[l.yx.Last3Days]="ThreeDays",r[l.yx.ThisWeek]="Week",r[l.yx.ThisMonth]="Month",r[l.yx.Anytime]="AllTime",r[l.yx.Range]="DateRange",r);function y(e,t,n){var i,r,o,a,s={query:e.query,limit:n,continuationToken:t,author:e.author,languages:null===(i=e.languages)||void 0===i?void 0:i.split(","),cids:(null===(r=e.cids)||void 0===r?void 0:r.split(","))||(null===(o=e.newspapers)||void 0===o?void 0:o.split(",")),categories:null===(a=e.categories)||void 0===a?void 0:a.split(","),startDate:e.start,endDate:e.stop,hideSame:void 0===e.hideSimilar||Boolean(e.hideSimilar),location:g[e.in||l.pi],sortOrder:e.orderBy||l.mF.Relevance,documentsType:e.searchFor||l.m8.All,additionalFields:"All",articleSearchFields:"All",pageSearchFields:"All",shortTextLength:100};return(!e.start&&!e.stop||e.date)&&(s.period=v[e.date||l.lh]),s}},99529:function(e,t,n){"use strict";n.d(t,{$2:function(){return p},JL:function(){return v},Jb:function(){return c},Ox:function(){return f},a:function(){return l},iq:function(){return s},qM:function(){return h},qf:function(){return d},rm:function(){return m},sl:function(){return g},tX:function(){return u},uF:function(){return a}});var i=n(89103),r=n(30877),o="".concat(r.pW,"/"),a=(0,i.lQ)("".concat(o,"init_search_core")),s=(0,i.lQ)("".concat(o,"catalog_categories_loading")),u=(0,i.lQ)("".concat(o,"catalog_categories_loaded")),c=(0,i.lQ)("".concat(o,"search_parameters_changed")),l=(0,i.lQ)("".concat(o,"search_meta_changed")),d=(0,i.lQ)("".concat(o,"search_meta_description_changed")),h=(0,i.lQ)("".concat(o,"toggle_search_mode")),f=(0,i.lQ)("".concat(o,"set_search_mode")),p=(0,i.lQ)("".concat(o,"search_term_changed")),m=(0,i.lQ)("".concat(o,"query_changed")),g=(0,i.lQ)("".concat(o,"clear_search_query")),v=(0,i.lQ)("".concat(o,"search_query_tokens_changed"))},82666:function(e,t,n){"use strict";n.d(t,{EH:function(){return C},md:function(){return b},fI:function(){return w},nR:function(){return E},iN:function(){return v},BF:function(){return k},M8:function(){return x},HK:function(){return P},Wh:function(){return g},Gm:function(){return I},Dm:function(){return _},FC:function(){return N},J9:function(){return y},bg:function(){return T},Hw:function(){return m},eg:function(){return D},q$:function(){return M}});var i,r=n(29978),o=n(13981),a=n(18978),s=n(27602),u=n(13384),c=n(30877),l=n(30657),d=((i={})[l.aZ.All]="Dialogs.AdvancedSearch.Anywhere",i[l.aZ.Headline]="Dialogs.AdvancedSearch.InHeadline",i[l.aZ.Body]="Dialogs.AdvancedSearch.InBody",i),h=n(76433),f=(0,o.bb)("sourceKey"),p=function(e){return e[c.pW]},m=(0,r.Mz)(p,(function(e){return null==e?void 0:e.state})),g=(0,r.Mz)(p,(function(e){return null==e?void 0:e.searchMode})),v=(0,r.Mz)(g,(function(e){return"advanced"===e})),y=(0,r.Mz)(p,(function(e){return e.searchTerm})),_=(0,r.Mz)(p,(function(e){return e.query})),b=(0,r.Mz)(p,(function(e){return e.countries})),w=(0,r.Mz)(p,(function(e){return e.languages})),C=(0,r.Mz)(p,(function(e){return e.categories})),A=(0,r.Mz)(p,(function(e){return e.searchParameters})),I=(0,r.Mz)(f,A,(function(e,t){return t[e]})),S=(0,r.Mz)(p,(function(e){return e.searchMeta})),P=(0,r.Mz)(f,S,(function(e,t){return t[e]})),x=(0,r.Mz)(s.SG,(function(e){return e?(0,h.lm)(e):null})),T=(0,r.Mz)(p,(function(e){return e.searchLocation})),k=(0,r.Mz)(T,(function(e){return Object.keys(d).map((function(t){return{id:t,label:(0,u.p3)(d[t]),selected:e===t}}))})),E=(0,r.Mz)(a.W,(function(e){return e.defaultTab})),M=(0,r.Mz)(a.W,(function(e){return e.tabsEnabled})),D=(0,r.Mz)(a.W,(function(e){return e.tabsAvailable})),N=(0,r.Mz)(p,(function(e){return e.queryTokens}))},56455:function(e,t,n){"use strict";n.d(t,{n:function(){return o}});var i,r=n(30657),o=((i={})[r.yx.Last3Days]="Dialogs.AdvancedSearch.Last3Days",i[r.yx.Today]="Dialogs.AdvancedSearch.Today",i[r.yx.ThisWeek]="Dialogs.AdvancedSearch.ThisWeek",i[r.yx.ThisMonth]="Dialogs.AdvancedSearch.ThisMonth",i[r.yx.Anytime]="Dialogs.AdvancedSearch.Anytime",i[r.yx.Range]="Dialogs.AdvancedSearch.Range",i)},76433:function(e,t,n){"use strict";n.d(t,{Bw:function(){return v},aM:function(){return f},bs:function(){return y},fT:function(){return d},lm:function(){return b},m1:function(){return h},oK:function(){return m},y_:function(){return g},zO:function(){return w}});var i=n(58932),r=n(13384),o=n(29178),a=n(30657),s=n(56455),u=3,c=(0,o.g)(a.Gh);function l(e,t){var n,r;if(!e||0===e.length||!t)return null;try{for(var o=(0,i.Ju)(e),a=o.next();!a.done;a=o.next()){var s=a.value;if(s in t)return t[s]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null}function d(e,t,n){if(e||t)return[l(n,e),l(n,t)].reduce((function(e,t){return t&&e.push(t.displayName),e}),[]).join(" / ")}function h(e,t){return void 0===t&&(t=u),0===e.length?(0,r.p3)("Dialogs.AdvancedSearch.AllLanguages"):e.length>t?(0,r.p3)("Dialogs.AdvancedSearch.Selection.Languages",e.length):e.map((function(e){return e.displayName})).join(", ")}function f(e){return e<=0?"":(0,r.p3)(1===e?"Dialogs.AdvancedSearch.TitleSelected":"Dialogs.AdvancedSearch.TitlesSelected",e)}function p(e){return!e||0===e.length}function m(e){if(function(e){if(!e)return!0;var t=!1;return t||(t=!p(e.newspapers)),t||(t=!p(e.countries)),t||(t=!p(e.categories)),!t}(e))return(0,r.p3)("Dialogs.AdvancedSearch.AllTitles");var t=e.newspapers||[],n=e.countries||[],i=e.categories||[];if(1===t.length&&p(n)&&p(i))return t[0].displayName;if(1===n.length&&p(t)&&p(i))return n[0].displayName;if(1===i.length&&p(t)&&p(n))return i[0].displayName;var o=[];return 1===n.length?o.push(n[0].displayName):n.length>1&&o.push((0,r.p3)("Dialogs.AdvancedSearch.Selection.Countries",n.length)),1===i.length?o.push(i[0].displayName):i.length>1&&o.push((0,r.p3)("Dialogs.AdvancedSearch.Selection.Categories",i.length)),1===t.length?o.push(t[0].displayName):t.length>1&&o.push((0,r.p3)("Dialogs.AdvancedSearch.Selection.Titles",t.length)),o.join(", ")}function g(e){var t=e.searchDate,n=e.dateRange;if(t===a.yx.Range&&n){var i=n.start,o=n.stop;return"".concat(i," - ").concat(o)}return(0,r.p3)(s.n[t])}function v(e){var t,n=new URLSearchParams(e),i={query:null!==(t=n.get("query"))&&void 0!==t?t:""},r=n.get("author");r&&(i.author=r);var o=n.get("in");o&&(i.in=o);var a=n.get("date");a&&(i.date=a);var s=n.get("publicationDate");s&&c(s)&&(i.publicationDate=s);var u=n.get("start");u&&(i.start=u);var l=n.get("stop");l&&(i.stop=l);var d=n.get("languages");d&&(i.languages=d);var h=n.get("newspapers");h&&(i.newspapers=h);var f=n.get("cids");f&&(i.cids=f);var p=n.get("countries");p&&(i.countries=p);var m=n.get("categories");m&&(i.categories=m);var g=n.get("types");g&&(i.types=g);var v=n.get("genres");v&&(i.genres=v);var y=n.get("orderBy");return y&&(i.orderBy=y),i}function y(){var e=new URLSearchParams(window.location.search),t=Number(e.get("searchId"));return isNaN(t)?null:t}var _="search__";function b(e){return"".concat(_).concat(e.cacheKey)}function w(e){return e.startsWith(_)}},69761:function(e,t,n){"use strict";n.d(t,{I:function(){return r},p:function(){return i}});var i="@pressreader.search.languages",r="".concat(i,".select-languages-dialog")},88135:function(e,t,n){"use strict";n.d(t,{k:function(){return h},o:function(){return d}});var i=n(58932),r=n(44834),o=n(13981),a=n(33730),s=n(26877),u=n(69761),c=!1;function l(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return c?[2]:[4,Promise.all([n.e(8540),n.e(4326)]).then(n.bind(n,94326))];case 1:return(0,e.sent().init)(),c=!0,[2]}}))}))}function d(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n;return(0,i.YH)(this,(function(c){switch(c.label){case 0:return t=e.dialogId,n=e.initialSelections,[4,l()];case 1:return c.sent(),[4,new Promise((function(e){o.bX.runSaga((function(){var o;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return n?[4,(0,r.yJ)((0,s.I3)(n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return[4,(0,a.PB)({type:"dialog",name:u.I,supportNativeScroll:!0,parentId:t})];case 3:return o=i.sent(),e(o),[2]}}))}))}))];case 2:return[2,c.sent()]}}))}))}function h(e){var t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return t=e.dialogId,n=e.initialSelections,[4,l()];case 1:return i.sent(),n?[4,(0,r.yJ)((0,s.I3)(n))]:[3,3];case 2:i.sent(),i.label=3;case 3:return[4,(0,a.PB)({type:"dialog",name:u.I,supportNativeScroll:!0,parentId:t})];case 4:return[2,i.sent()]}}))}},26877:function(e,t,n){"use strict";n.d(t,{I3:function(){return c},Ni:function(){return u},jJ:function(){return s},lI:function(){return a}});var i=n(89103),r=n(69761),o="".concat(r.p,"/"),a=(0,i.lQ)("".concat(o,"load_language_list_action")),s=(0,i.lQ)("".concat(o,"language_list_changed")),u=(0,i.lQ)("".concat(o,"language_selection_changed")),c=(0,i.lQ)("".concat(o,"set_initial_selections"))},27889:function(e,t,n){"use strict";n.d(t,{p:function(){return i},s:function(){return r}});var i="@pressreader.search.publications",r="".concat(i,".select-publications-dialog")},6714:function(e,t,n){"use strict";n.d(t,{Y:function(){return h},G:function(){return d}});var i=n(58932),r=n(44834),o=n(13981),a=n(33730),s=n(47853),u=n(27889),c=!1;function l(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return c?[2]:[4,Promise.all([n.e(8540),n.e(4289)]).then(n.bind(n,34289))];case 1:return(0,e.sent().init)(),c=!0,[2]}}))}))}function d(){return(0,i.sH)(this,arguments,void 0,(function(e){return void 0===e&&(e={useTabSwitcher:!0}),(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,l()];case 1:return t.sent(),[4,new Promise((function(t){o.bX.runSaga((function(){var n;return(0,i.YH)(this,(function(r){switch(r.label){case 0:return[5,(0,i.Ju)(h(e))];case 1:return n=r.sent(),t(n),[2]}}))}))}))];case 2:return[2,t.sent()]}}))}))}function h(e){var t,n,o,c;return void 0===e&&(e={useTabSwitcher:!0}),(0,i.YH)(this,(function(i){switch(i.label){case 0:return t=e.dialogId,n=e.useTabSwitcher,o=e.initialSelections,[4,l()];case 1:return i.sent(),[4,(0,r.yJ)((0,s.I3)({initialSelections:o}))];case 2:return i.sent(),c={type:"dialog",name:u.s,supportNativeScroll:!0,parentId:t,useTabSwitcher:null==n||n},[4,(0,a.PB)(c)];case 3:return[2,i.sent()]}}))}},47853:function(e,t,n){"use strict";n.d(t,{I3:function(){return a},LM:function(){return d},Mj:function(){return l},_E:function(){return s},_U:function(){return c},ap:function(){return g},kT:function(){return f},o5:function(){return m},oY:function(){return p},rk:function(){return u},yO:function(){return h}});var i=n(89103),r=n(27889),o="".concat(r.p,"/"),a=(0,i.lQ)("".concat(o,"set_initial_selections_action")),s=(0,i.lQ)("".concat(o,"groups_loaded")),u=(0,i.lQ)("".concat(o,"select_titles_in_category_action")),c=(0,i.lQ)("".concat(o,"selection_updated_event")),l=(0,i.lQ)("".concat(o,"change_active_tab_action")),d=(0,i.lQ)("".concat(o,"load_catalog_metadata_action")),h=(0,i.lQ)("".concat(o,"catalog_metadata_updated")),f=(0,i.lQ)("".concat(o,"publications_filter_changed_event")),p=(0,i.lQ)("".concat(o,"publications_list_changed")),m=(0,i.lQ)("".concat(o,"item_selection_changed")),g=(0,i.lQ)("".concat(o,"reset_all_selections_action"))},31827:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var i="giftedAccessToken"},82534:function(e,t,n){"use strict";n.d(t,{Ct:function(){return C},HE:function(){return v},bE:function(){return _},gg:function(){return m},y$:function(){return y}});var i=n(58932),r=n(17207),o=n(20056),a=n(17950),s=n(31827),u=n(53308),c=n(19299),l=n(32512),d=function(){return window.basePath||"/"},h="".concat(d(),"authentication/v1"),f="pr_".concat(d(),"authTickets"),p=[];function m(e){p=(0,i.fX)([],e,!0),window.sessionStorage.setItem(f,JSON.stringify(e.filter((function(e){return e.session})).map((function(e){return e.value})))),window.localStorage.setItem(f,JSON.stringify(e.filter((function(e){return!e.session})).map((function(e){return e.value}))))}function g(){var e,t,n=JSON.parse(null!==(e=window.sessionStorage.getItem(f))&&void 0!==e?e:"[]"),r=JSON.parse(null!==(t=window.localStorage.getItem(f))&&void 0!==t?t:"[]");return n.length||r.length||!(null==p?void 0:p.length)?(0,i.fX)((0,i.fX)([],n,!0),r,!0):(m(p),g())}function v(){var e=a.get("PDAuth")?[]:g(),t=a.get(s.v)||void 0;return(0,l.Tt)({url:"".concat(h,"/initialize"),data:{tickets:e,language:(0,c.KK)(),urlReferrer:window.document.referrer,url:window.location.href,giftedAccessToken:t},maxRetries:3,method:"POST"})}function y(e,t){return(0,u.zA)({url:"".concat(h,"/signIn"),data:{signInToken:e,tickets:g(),language:(0,c.KK)(),enableAutoLogin:t},requestConfig:{contentType:"application/json",disableBearerToken:!0}})}function _(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){return[2,(0,u.zA)({url:"".concat(h,"/signout"),data:{tickets:g(),language:(0,c.KK)()},requestConfig:{contentType:"application/json",disableBearerToken:!0}})]}))}))}var b=void 0;function w(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:if(document.hidden)return[2,b];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,r.TR)()];case 2:return e=n.sent(),b=e,[2,e];case 3:return t=n.sent(),(0,o.R)("Authentication API refreshBearerToken","geoLocation",t),[2,void 0];case 4:return[2]}}))}))}function C(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return e?[4,w()]:[3,2];case 1:return n=i.sent(),[3,3];case 2:n=void 0,i.label=3;case 3:return t=n,[2,(0,u.zA)({url:"".concat(h,"/refresh"),data:{tickets:g(),language:(0,c.KK)(),lat:null==t?void 0:t.lat,lng:null==t?void 0:t.lng},requestConfig:{contentType:"application/json",disableBearerToken:!0}})]}}))}))}},58735:function(e,t,n){"use strict";n.r(t),n.d(t,{authorized:function(){return H},bearerToken:function(){return z},bind:function(){return O},initAuthTickets:function(){return M},isEmailVerified:function(){return X},online:function(){return D},setGiftedAccessToken:function(){return E},token:function(){return F},unbind:function(){return j},updateAuthorizationTickets:function(){return Y},updateBearerToken:function(){return R},userKey:function(){return B}});var i=n(58932),r=n(25208),o=n(69463),a=n(42861),s=n(30212),u=n(17950),c=n(24428),l=n(31827),d=n(82534),h=n(19299),f=n(32512),p="ab",m="sub",g="exp",v={},y=null,_=null,b=!1,w=null,C=!1,A=!1,I="",S=!0,P=!1,x=new o.B;x.subscribe({next:function(){S=!1},error:function(){S=!1}});var T=(0,a._)(x);function k(){S||(S=!0,T=(0,a._)(x))}var E=function(e){e&&u.set(l.v,e)};function M(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,W()];case 1:return[2,e.sent()];case 2:return[2,N(e.sent())];case 3:return[2]}}))}))}function D(){for(var e=[],t=0;tDate.now()?[2,e]:[4,R()];case 2:return n.sent(),[4,T];case 3:return[2,n.sent()]}}))}))}function F(){var e=(0,c.$)(z());return e?encodeURIComponent(e[p]):""}function B(){return y}function z(){return _}function O(e,t){var n=v[e];if(n||(n=v[e]={subject:new o.B,subscriptions:[]}),n.subscriptions.map((function(e){return e.callback})).indexOf(t)<0){var i=n.subject.subscribe(t).unsubscribe;n.subscriptions.push({callback:t,unsubscribe:i})}}function j(e,t){var n=v[e];if(n){var i=n.subscriptions.findIndex((function(e){return e.callback===t}));i<0||(n.subscriptions[i].unsubscribe(),n.subscriptions.splice(i,1))}}function U(e){var t=v[e];t&&t.subject.next()}function W(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:if(A)return[2];if(A=!0,!(t=new URL(document.location.href).searchParams.get("signInToken")))return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,d.y$)(t,!0)];case 2:return e=i.sent(),P=!0,[3,4];case 3:return n=i.sent(),(0,s.z)("EmailVerified: siteSignInResult error",n),[3,4];case 4:return e?[3,7]:[4,(0,d.HE)()];case 5:return 1!==(e=i.sent()).useGeoLocation?[3,7]:[4,(0,d.Ct)(!0)];case 6:e=i.sent(),i.label=7;case 7:return Y(e),[2]}}))}))}function Y(e){b=1===e.useGeoLocation,(0,d.gg)(e.tickets),L(e.bearerToken)}function X(){return P}},76514:function(e,t,n){"use strict";n.d(t,{f:function(){return o}});var i=n(58932),r=n(30264),o=function(e){function t(t,n,i){var r=e.call(this,n)||this;return r.status=t,r.statusText=n,r.json=i,r}return(0,i.C6)(t,e),t.prototype.getHttpError=function(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n,o,a,s;return(0,i.YH)(this,(function(u){switch(u.label){case 0:e={Message:"Unknown error",ResourceKey:null},u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.json];case 2:return e=u.sent(),[3,4];case 3:return u.sent(),[3,4];case 4:return e&&"string"==typeof e?t={message:e,resourceKey:""}:(n=e.Message,o=e.message,a=e.ResourceKey,s=(0,i.Tt)(e,["Message","message","ResourceKey"]),t=(0,i.Cl)((0,i.Cl)({},s),{message:null!=o?o:n,resourceKey:null!=a?a:""})),[2,new r.j({status:this.status,responseText:this.statusText,responseJSON:t})]}}))}))},t}(n(84386).e)},76131:function(e,t,n){"use strict";n.d(t,{J:function(){return o},h:function(){return r}});var i=new(n(69463).B);function r(e){e&&i.next(e)}var o=i.asObservable()},60213:function(e,t,n){"use strict";n.d(t,{a:function(){return m}});var i,r=n(58932),o=n(45400),a=n(1766),s=n(76514),u=n(76131),c=n(42832),l=n(81854);!function(e){e.JSON="application/json",e.FORM="application/x-www-form-urlencoded",e.MULTIPART="multipart/form-data",e.TEXT="text/plain"}(i||(i={}));var d=function(e,t){return t||(e instanceof FormData?i.MULTIPART:c(e)?i.FORM:i.TEXT)},h=function(e){return null===e||c(e)||l(e)},f=function(e,t){if(t.includes(i.MULTIPART)&&e instanceof FormData)return e;if(t.includes(i.FORM)){if(e instanceof URLSearchParams)return e;var n=c(e)?(0,o.stringify)(e,{arrayFormat:"indices",encodeValuesOnly:!0}):null;return n?new URLSearchParams(n):null}return t.includes(i.JSON)?c(e)?JSON.stringify(e):e:t.includes(i.TEXT)&&l(e)?e:null},p=new Map;function m(e){return(0,r.sH)(this,void 0,void 0,(function(){var t,n,i,c,l,m,g,v,y,_,b,w,C,A,I,S,P,x,T,k,E,M,D,N;return(0,r.YH)(this,(function(L){switch(L.label){case 0:t=e.url,n=e.timeout,i=e.cancellableKey,c=e.contentType,l=e.accept,m=e.data,g=e.query,v=void 0===g?{}:g,y=e.withCredentials,_=void 0!==y&&y,b=(0,r.Tt)(e,["url","timeout","cancellableKey","contentType","accept","data","query","withCredentials"]),w=b.headers?b.headers["Content-Type"]:void 0,C=d(m,c||w),A=(0,r.Cl)((0,r.Cl)((0,r.Cl)({},b.headers),c?{"Content-Type":C}:{}),l?{Accept:l}:{}),I=h(m)?f(m,C):null,S=new AbortController,i&&(null===(N=p.get(i))||void 0===N||N.abort(),p.set(i,S)),P=(0,r.Cl)((0,r.Cl)({},b),{body:I,headers:A,signal:S.signal}),x=a(v)?null:(0,o.stringify)(v,{arrayFormat:"brackets"}),T=x?"".concat(t,"?").concat(x):t,_&&(P.credentials="include"),k=n?new Promise((function(e,t){return setTimeout((function(){S.abort();var e="Request timed out",n=new s.f(408,e,Promise.resolve({Message:e,ResourceKey:null}));t(n)}),n)})):null,E=fetch(T,P).then((function(e){if(!e.ok)throw new s.f(e.status,e.statusText,e.json());var t=e.headers.get("ndstate");t&&(0,u.h)(t);var n=e.headers.get("content-type");return(null==n?void 0:n.includes("application/json"))?e.json():e.text()})),L.label=1;case 1:return L.trys.push([1,3,,7]),[4,Promise.race((0,r.fX)([E],k?[k]:[],!0))];case 2:return M=L.sent(),i&&p.delete(i),[2,M];case 3:return D=L.sent(),i&&p.delete(i),D instanceof s.f?[4,D.getHttpError()]:[3,5];case 4:throw L.sent();case 5:throw D;case 6:return[3,7];case 7:return[2]}}))}))}},53308:function(e,t,n){"use strict";n.d(t,{lx:function(){return h},wu:function(){return m},yd:function(){return p},zA:function(){return f}});var i=n(58932),r=n(41e3),o=n(15397),a=n(30264),s=n(58735),u=n(32512);function c(e){return!0===e||"true"===e}function l(e,t){return(0,i.sH)(this,arguments,void 0,(function(e,t){var n,r,l,d,h,f,p,m,g,v,y,_,b,w,C,A=t.url,I=t.service,S=t.command,P=t.data,x=t.requestConfig;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return x||(x={}),!x.serviceName&&I&&(x.serviceName="".concat(I).concat(S?"/".concat(S):"")),n={},I?[4,(0,o.kq)("services",{})]:[3,2];case 1:r=t.sent(),n=r[I]||{},t.label=2;case 2:return l=(0,u.H_)()||c(n.httpsrequired)||c(n.httpsRequired),d=!1,h={},f=(0,u.pc)(),n.cdnProfile&&(p=(0,o.Ct)("cdnProfiles",{})[n.cdnProfile])&&(!p.httpsBaseUrl&&l||(m=function(e){return e.indexOf("://")>0&&(e=e.substring(e.indexOf("/",8))),e}(f),l=l||c(p.httpsRequired),f=function(e,t){return"/"===e[e.length-1]&&"/"===t[0]&&(t=t.substring(1)),e+t}(f=l&&null!==(C=p.httpsBaseUrl)&&void 0!==C?C:p.baseUrl,m),d=!0)),g="".concat(f).concat(I,"/"),x.disableBearerToken||d?[3,4]:[4,(0,s.authorized)()];case 3:v=t.sent(),h.Authorization="Bearer ".concat(v),t.label=4;case 4:l&&(g=g.replace(/^http:\/\//i,"https://")),S&&(g+=S),y={maxRetries:x.disableRetry?0:3},_=(0,i.Cl)((0,i.Cl)({},y),n.retryPolicy),b=(0,i.Cl)((0,i.Cl)({method:e,url:A||g,data:"GET"===e?null:P,query:"GET"===e?P:null},x),{headers:(0,i.Cl)((0,i.Cl)({},h),x.headers)}),t.label=5;case 5:return t.trys.push([5,7,,8]),[4,(0,u.Ez)(b,_)];case 6:return[2,t.sent()];case 7:throw w=t.sent(),new a.j(w);case 8:return[2]}}))}))}function d(e){for(var t=[],n=1;n0&&"string"==typeof t[0]&&(a=t[0],t=t.slice(1));var s=void 0;t.length>0&&(s="object"==typeof t[0]?r(t[0]):void 0===t[0]?{}:t[0],t=t.slice(1));var u=void 0;return t.length>0&&(u=t[0],t=t.slice(1)),l(e,{service:o,command:a,data:s,requestConfig:u})}var c=(0,i.Cl)({},t[0]);return"object"==typeof c.data?c.data=r(c.data):void 0===c.data&&(c.data={}),c.requestConfig&&(c.requestConfig=r(c.requestConfig)),l(e,c)}function h(){for(var e=[],t=0;t=t.maxRetries)throw i;if(i instanceof s.f&&i.status<500)throw i;return[3,7];case 7:return++n,[3,3];case 8:throw new Error}}))}))}(e,t):f(e)}var m="",g=null!==(i=window.serviceUrl)&&void 0!==i?i:"https://ingress.pressreader.com/services/";function v(){for(var e=[],t=0;t0}var f=n(13384),p=n(79371),m=n(88612),g="readlater",v={facebook:"Menu.Facebook",twitter:"Menu.Twitter",evernote:"Menu.Evernote",instapaper:"Menu.Instapaper",onenote:"Menu.OneNote",email:"Menu.eMail",all:"ReadLater",channel:"Channel",public_all:"ReadLater"};function y(e){switch(e){case 1:return p.X.System;case 2:return p.X.User;case 3:return p.X.Sharing}}function _(e){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,f.Kc)()];case 1:return t.sent(),[2,o(e,(function(e){return e.id===g?0:1}),"name").map(b)]}}))}))}function b(e){var t=e.name,n=e.id;e.type!==p.X.User&&(0,m.X)(n,v)&&(t=(0,f.p3)(v[n]));var i=n===g;return{id:n,displayName:t,name:t,slug:e.webName,isPublic:e.isPublic,type:y(e.type),contentCount:e.contentCount,isDeleteDisabled:i}}var w=n(90189);function C(e,t){return(0,i.Cl)((0,i.Cl)({},(0,w.b)(t)),{pageSetId:e,collectionContent:a.P.pageSet})}function A(e,t){return(0,i.Cl)((0,i.Cl)({},(0,w.b)(t)),{articleId:e,collectionContent:a.P.article})}var I=n(60588),S=(0,s.J)({expire:3e5});function P(){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,c.qw)()];case 1:return[4,_(e.sent().items)];case 2:return[2,e.sent()]}}))}))}function x(e,t){return(0,i.sH)(this,void 0,void 0,(function(){var n,r;return(0,i.YH)(this,(function(i){if(!e)throw new Error("profileId not specified");return!t&&(n=S.get(e))?[2,n]:(r=(0,c.jT)(e).then((function(e){return _(e.items)})),S.set(e,r),[2,r])}))}))}function T(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n;return(0,i.YH)(this,(function(i){switch(i.label){case 0:if(!e)throw new Error("context not specified");return[4,(0,c.Wv)(e)];case 1:return t=i.sent(),n=t.id,S.clear(),u.YT.next({event:u.JT.create,data:n}),[2,t]}}))}))}function k(e){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(t){switch(t.label){case 0:if(!e)throw new Error("collectionId not specified");return[4,(0,c._F)(e)];case 1:return t.sent(),S.clear(),u.YT.next({event:u.JT.delete,data:e}),[2]}}))}))}function E(e,t){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(n){switch(n.label){case 0:if(!e)throw new Error("collectionId not specified");return[4,(0,c.jk)(e,t)];case 1:return n.sent(),S.clear(),u.YT.next({event:u.JT.update,data:e}),[2]}}))}))}function M(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r,a;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return e?(t="linked_".concat(e),(n=S.get(t))?[2,Promise.resolve(n)]:[4,(0,c.bG)(e)]):[2,Promise.reject("cid not specified")];case 1:return r=i.sent(),a=o(r,"orderKey").map((function(e){return Object.freeze({id:e.linkedCollection.id,name:e.linkedCollection.name,webName:e.linkedCollection.webName,contentCount:e.contentCount||"",profileId:e.linkedCollectionOwner.profileName})})),S.set(t,a),[2,a]}}))}))}function D(e){return(0,i.sH)(this,void 0,void 0,(function(){var t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return[4,V(e)];case 1:return t=n.sent(),[2,(0,i.Cl)((0,i.Cl)({},t),{articleId:e,collectionContent:a.P.article})]}}))}))}function N(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r;return(0,i.YH)(this,(function(o){switch(o.label){case 0:return[4,Promise.all([(0,I.aI)(e),(0,l.J)(e)])];case 1:return t=o.sent(),n=t[0],r=t[1],[2,(0,i.Cl)((0,i.Cl)({},C(e,r)),{pageSet:n,collectionContent:a.P.pageSet,pageSetId:e})]}}))}))}function L(e,t){return(0,i.sH)(this,void 0,void 0,(function(){var n,o,a;return(0,i.YH)(this,(function(s){switch(s.label){case 0:return[4,(0,I.Wm)(e)];case 1:return n=s.sent(),o=n.filter((function(e){return 0===r(t,e.pages).length})),a=o.map((function(e){return(0,l.J)(e.id).then((function(t){return(0,i.Cl)((0,i.Cl)({},t),{pageSet:e})}))})),[2,Promise.all(a)]}}))}))}function V(e){return(0,i.sH)(this,void 0,void 0,(function(){var t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,d.wr)(e)];case 1:return t=n.sent(),[2,A(e,t)]}}))}))}function R(e){return(0,i.sH)(this,void 0,void 0,(function(){var t;return(0,i.YH)(this,(function(n){switch(n.label){case 0:return t=e.map(l.J),[4,Promise.all(t)];case 1:return[2,n.sent().map((function(t,n){return C(e[n],t)})).filter(h)]}}))}))}function H(e,t){return(0,i.sH)(this,void 0,void 0,(function(){return(0,i.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,d.rD)(e,t)];case 1:return n.sent(),[2,A(e,t)]}}))}))}},90189:function(e,t,n){"use strict";function i(e){var t=e.createdDate,n=e.id;return t?{createdDate:new Date(t),id:n}:{id:n}}function r(e){return{collections:e.collections.map(i)}}n.d(t,{b:function(){return r}})},14821:function(e,t,n){"use strict";function i(e){var t,n,i=null!==(n=null!==(t=e.issueKey)&&void 0!==t?t:e.issue)&&void 0!==n?n:"";return{id:e.id,encryptedOwnerId:e.encryptedOwnerId,issueKey:i,issueId:e.issueId,issueVer:e.issueVer,pages:e.pages}}n.d(t,{j:function(){return i}})},60588:function(e,t,n){"use strict";n.d(t,{dW:function(){return g},nO:function(){return v},ZZ:function(){return m},Wm:function(){return p},aI:function(){return f},F8:function(){return y},xm:function(){return b},um:function(){return _}});var i=n(58932),r=n(8485),o=n(57962),a=n(74010),s=n(43125),u=n(53477),c=n(20263),l=n(14821),d={accepted:202,created:201,ok:200},h={202:a.U.Pending,201:a.U.Done,200:a.U.Pending};function f(e){if(!e)throw new Error("pageSetId not specified");return(0,u.ag)(e).then(l.j)}function p(e){if(!e)throw new Error("issue not specified");return(0,u._o)(e).then((function(e){return r(e.pageSets,l.j)}))}function m(e){return(0,i.sH)(this,arguments,void 0,(function(e){var t,n=e.issueKey,r=e.pages;return(0,i.YH)(this,(function(e){switch(e.label){case 0:return t=(0,s.Tm)(n),[4,p(n)];case 1:return[2,e.sent().find((function(e){return 0===o(e.pages,r).length&&e.issueVer===t}))]}}))}))}function g(e){return(0,i.sH)(this,arguments,void 0,(function(e){var t,n,r=e.issueKey,o=e.pages;return(0,i.YH)(this,(function(e){switch(e.label){case 0:return[4,m({issueKey:r,pages:o})];case 1:return(t=e.sent())?[3,3]:[4,(0,u.w6)({issue:r,pages:o})];case 2:return n=e.sent(),[2,(0,l.j)(n)];case 3:return[2,t]}}))}))}function v(e){return(0,i.sH)(this,arguments,void 0,(function(e){var t,n,r,o,s=e.pageSetId,c=e.baseUrl;return(0,i.YH)(this,(function(e){switch(e.label){case 0:if(!s)throw new Error("pageSetId not specified");return[4,(0,u.JR)({baseUrl:c,pageSetId:s})];case 1:if(t=e.sent(),n=t.status,r=t.location,n!==d.accepted&&n!==d.created)throw new Error("Response with unknown status. Code - ".concat(n));return[2,{status:null!==(o=h[n])&&void 0!==o?o:a.U.None,url:r}]}}))}))}function y(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,(0,u.v7)(e)];case 1:if(t=i.sent(),n=t.status,r=t.location,n!==d.ok&&n!==d.created)throw new Error("Response with unknown status. Code - ".concat(n));return[2,{status:h[n],url:r}]}}))}))}function _(e,t){return(0,c.yA)(e,{collections:t})}function b(e,t){return(0,u.tI)(e,{pages:t})}},97600:function(e,t,n){"use strict";n.d(t,{JT:function(){return i},YT:function(){return a}});var i,r=n(69463),o=n(25778);!function(e){e[e.create=1]="create",e[e.delete=2]="delete",e[e.update=3]="update"}(i||(i={}));var a=new r.B;a.pipe((0,o.p)((function(e){return e.event===i.delete})))},67373:function(e,t,n){"use strict";var i,r;n.d(t,{P:function(){return r},x:function(){return i}}),function(e){e[e.article=1]="article",e[e.pages=2]="pages",e[e.pageSet=3]="pageSet"}(i||(i={})),function(e){e[e.article=1]="article",e[e.pageSet=2]="pageSet"}(r||(r={}))},79371:function(e,t,n){"use strict";var i;n.d(t,{X:function(){return i}}),function(e){e[e.System=1]="System",e[e.User=2]="User",e[e.Sharing=3]="Sharing",e[e.Feed=10]="Feed"}(i||(i={}))},35374:function(e,t,n){"use strict";n.d(t,{$F:function(){return i},F:function(){return r},KM:function(){return o},LQ:function(){return a}});var i="all",r="channel",o="readlater",a=i},36945:function(e,t,n){"use strict";n.d(t,{UN:function(){return ct},Y$:function(){return l},vb:function(){return p},f8:function(){return f},jq:function(){return R},ym:function(){return z},O0:function(){return B},Dz:function(){return L},tB:function(){return N},z9:function(){return re},lL:function(){return ae},gq:function(){return se},Zn:function(){return le},Gx:function(){return ut},lN:function(){return it},pY:function(){return m},c_:function(){return O},Zo:function(){return V},e7:function(){return ce},AK:function(){return Te},sr:function(){return xe},zb:function(){return St},yT:function(){return qe},mg:function(){return Xe},C9:function(){return It},x3:function(){return xt},Ld:function(){return Pt},Sg:function(){return rt},wW:function(){return ke},gr:function(){return Ze}});var i=n(13981),r="@pressreader/social",o=n(44229),a=n(58932),s=n(89103),u=n(74010),c=r+"/article_collections/",l=(0,s.lQ)("".concat(c,"load_article_collections_action")),d=(0,s.lQ)("".concat(c,"load_article_collections_began")),h=(0,s.lQ)("".concat(c,"load_article_collections_done")),f=(0,s.lQ)("".concat(c,"load_article_collections_failed")),p=(0,s.lQ)("".concat(c,"load_article_collections_cancelled")),m=(0,s.lQ)("".concat(c,"reset_article_collections")),g=(0,s.lQ)("".concat(c,"upsert_article_collections_action")),v=(0,s.lQ)("".concat(c,"upsert_article_collections_began")),y=(0,s.lQ)("".concat(c,"upsert_article_collections_done")),_=(0,s.lQ)("".concat(c,"upsert_article_collections_failed")),b=(0,s.lQ)("".concat(c,"remove_article_from_collections_action")),w=(0,s.lQ)("".concat(c,"remove_article_from_collections_began")),C=(0,s.lQ)("".concat(c,"remove_article_from_collections_done")),A=(0,s.lQ)("".concat(c,"remove_article_from_collections_failed")),I=Object.freeze([h,f,p,y,_,C,A]);function S(e,t){var n,i=t.articleId,r=t.collections;return(0,a.Cl)((0,a.Cl)({},e),{articleCollections:(0,a.Cl)((0,a.Cl)({},e.articleCollections),(n={},n[i]=(0,a.Cl)((0,a.Cl)({},e.articleCollections[i]),{status:u.U.Done,collections:r}),n))})}function P(e,t){var n,i=t.articleId,r=t.status;return(0,a.Cl)((0,a.Cl)({},e),{articleCollections:(0,a.Cl)((0,a.Cl)({},e.articleCollections),(n={},n[i]=(0,a.Cl)((0,a.Cl)({},e.articleCollections[i]),{status:r}),n))})}var x=(0,s.vy)({articleCollections:{}},(0,s.po)(d,(function(e,t){return P(e,{articleId:t.payload.articleId,status:u.U.Pending})})),(0,s.po)(h,(function(e,t){var n=t.payload;return S(e,{articleId:n.articleId,collections:n.collections})})),(0,s.po)(f,(function(e,t){return P(e,{articleId:t.payload.articleId,status:u.U.Failed})})),(0,s.po)(p,(function(e,t){return P(e,{articleId:t.payload.articleId,status:u.U.None})})),(0,s.po)(v,(function(e,t){return P(e,{articleId:t.payload.articleId,status:u.U.Pending})})),(0,s.po)(y,(function(e,t){var n=t.payload;return S(e,{articleId:n.articleId,collections:n.articleCollections})})),(0,s.po)(_,(function(e,t){return P(e,{articleId:t.payload.articleId,status:u.U.Failed})})),(0,s.po)(m,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{articleCollections:(0,a.Cl)((0,a.Cl)({},e.articleCollections),(n={},n[i.articleId]=(0,a.Cl)((0,a.Cl)({},e.articleCollections[i.articleId]),{status:u.U.Failed,collections:void 0}),n))})})),(0,s.po)(w,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{articleCollections:(0,a.Cl)((0,a.Cl)({},e.articleCollections),(n={},n[i.articleId]=(0,a.Cl)((0,a.Cl)({},e.articleCollections[i.articleId]),{status:u.U.Pending}),n))})})),(0,s.po)(C,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{articleCollections:(0,a.Cl)((0,a.Cl)({},e.articleCollections),(n={},n[i.articleId]=(0,a.Cl)((0,a.Cl)({},e.articleCollections[i.articleId]),{status:u.U.Done,collections:void 0}),n))})})),(0,s.po)(A,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{articleCollections:(0,a.Cl)((0,a.Cl)({},e.articleCollections),(n={},n[i.articleId]=(0,a.Cl)((0,a.Cl)({},e.articleCollections[i.articleId]),{status:u.U.Failed}),n))})}))),T=n(77394),k=n(20056),E=r+"/issue/pageset/",M=((0,s.lQ)("".concat(E,"load_issue_pageset_by_issue_key_action")),(0,s.lQ)("".concat(E,"load_issue_pageset_by_issue_key_began"))),D=(0,s.lQ)("".concat(E,"load_issue_pageset_by_issue_key_done")),N=(0,s.lQ)("".concat(E,"load_issue_pageset_by_issue_key_failed")),L=(0,s.lQ)("".concat(E,"load_issue_pageset_by_issue_key_cancelled")),V=(0,s.lQ)("".concat(E,"reset_issue_pageset")),R=(0,s.lQ)("".concat(E,"load_issue_pageset_by_id_action")),H=(0,s.lQ)("".concat(E,"load_issue_pageset_by_id_began")),F=(0,s.lQ)("".concat(E,"load_issue_pageset_by_issue_key_done")),B=(0,s.lQ)("".concat(E,"load_issue_pageset_by_id_failed")),z=(0,s.lQ)("".concat(E,"load_issue_pageset_by_id_cancelled")),O=(0,s.lQ)("".concat(E,"reset_issue_pageset_by_id")),j=(0,s.lQ)("".concat(E,"upsert_page_set_collection_action")),U=(0,s.lQ)("".concat(E,"upsert_page_set_collection_began")),W=(0,s.lQ)("".concat(E,"upsert_page_set_collection_done")),Y=(0,s.lQ)("".concat(E,"upsert_page_set_collection_failed")),X=Object.freeze([W,Y]),q=(0,s.lQ)("".concat(E,"remove_pageset_from_collections_action")),G=(0,s.lQ)("".concat(E,"remove_pageset_from_collections_began")),K=(0,s.lQ)("".concat(E,"remove_pageset_from_collections_done")),J=(0,s.lQ)("".concat(E,"remove_pageset_from_collections_failed")),Q=(0,s.lQ)("".concat(E,"update_issue_pageset_by_id_action")),Z=(0,s.lQ)("".concat(E,"update_issue_pageset_by_id_began")),$=(0,s.lQ)("".concat(E,"update_issue_pageset_by_issue_key_done")),ee=(0,s.lQ)("".concat(E,"update_issue_pageset_by_id_failed")),te=Object.freeze((0,a.fX)([D,N,L,F,B,z,K,J,$,ee],(0,a.zs)(X),!1)),ne=(0,s.vy)({issuePageSets:{},pageSet:{},pageSetCollections:{}},(0,s.po)(M,(function(e,t){var n,i,r,o=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{issuePageSets:(0,a.Cl)((0,a.Cl)({},e.issuePageSets),(n={},n[o.issueKey]={status:u.U.Pending,issueKey:o.issueKey,pageSetIds:(null===(i=e.issuePageSets[o.issueKey])||void 0===i?void 0:i.pageSetIds)||[]},n)),pageSet:((null===(r=e.issuePageSets[o.issueKey])||void 0===r?void 0:r.pageSetIds)||[]).reduce((function(t,n){return t[n]=(0,a.Cl)((0,a.Cl)({},e.pageSet[n]),{pageSetId:n,status:u.U.Pending}),t}),(0,a.Cl)({},e.pageSet))})})),(0,s.po)(D,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{issuePageSets:(0,a.Cl)((0,a.Cl)({},e.issuePageSets),(n={},n[i.issueKey]={status:u.U.Done,issueKey:i.issueKey,pageSetIds:i.pageSet.map((function(e){return e.id}))},n)),pageSet:i.pageSet.reduce((function(t,n){return t[n.id]=(0,a.Cl)((0,a.Cl)({},e.pageSet[n.id]),{pageSetId:n.id,status:u.U.Done,pageSet:n}),t}),(0,a.Cl)({},e.pageSet))})})),(0,s.po)(N,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{issuePageSets:(0,a.Cl)((0,a.Cl)({},e.issuePageSets),(n={},n[i.issueKey]=(0,a.Cl)((0,a.Cl)({},e.issuePageSets[i.issueKey]),{status:u.U.Failed,pageSetIds:[]}),n))})})),(0,s.po)(V,(function(e,t){var n,i,r=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{issuePageSets:(0,a.Cl)((0,a.Cl)({},e.issuePageSets),(n={},n[r.issueKey]={status:u.U.None,issueKey:r.issueKey,pageSetIds:[]},n)),pageSet:(0,a.Cl)((0,a.Cl)({},e.pageSet),null===(i=e.issuePageSets[r.issueKey])||void 0===i?void 0:i.pageSetIds.reduce((function(t,n){return t[n]=(0,a.Cl)((0,a.Cl)({},e.pageSet[n]),{pageSetId:n,status:u.U.None,pageSet:void 0}),t}),(0,a.Cl)({},e.pageSet)))})})),(0,s.po)(O,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSet:(n={},n[i.pageSetId]=(0,a.Cl)((0,a.Cl)({},e.pageSet[i.pageSetId]),{pageSetId:i.pageSetId,status:u.U.None}),n)})})),(0,s.po)(L,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{issuePageSets:(0,a.Cl)((0,a.Cl)({},e.issuePageSets),(n={},n[i.issueKey]=(0,a.Cl)((0,a.Cl)({},e.issuePageSets[i.issueKey]),{status:u.U.None}),n))})})),(0,s.po)(H,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSet:(n={},n[i.pageSetId]=(0,a.Cl)((0,a.Cl)({},e.pageSet[i.pageSetId]),{pageSetId:i.pageSetId,status:u.U.Pending}),n)})})),(0,s.po)(F,(function(e,t){var n,i,r,o=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{issuePageSets:(0,a.Cl)((0,a.Cl)({},e.issuePageSets),(n={},n[o.issueKey]={status:(null===(i=e.issuePageSets[o.issueKey])||void 0===i?void 0:i.status)||u.U.None,issueKey:o.issueKey,pageSetIds:T(((null===(r=e.issuePageSets[o.issueKey])||void 0===r?void 0:r.pageSetIds)||[]).concat(o.pageSet.map((function(e){return e.id}))))},n)),pageSet:o.pageSet.reduce((function(t,n){return t[n.id]=(0,a.Cl)((0,a.Cl)({},e.pageSet[n.id]),{pageSetId:n.id,status:u.U.Done,pageSet:n}),t}),(0,a.Cl)({},e.pageSet))})})),(0,s.po)(B,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSet:(0,a.Cl)((0,a.Cl)({},e.pageSet),(n={},n[i.pageSetId]=(0,a.Cl)((0,a.Cl)({},e.pageSet[i.pageSetId]),{pageSet:void 0,status:u.U.Failed}),n))})})),(0,s.po)(z,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSet:(0,a.Cl)((0,a.Cl)({},e.pageSet),(n={},n[i.pageSetId]=(0,a.Cl)((0,a.Cl)({},e.pageSet[i.pageSetId]),{status:u.U.None}),n))})})),(0,s.po)(U,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSetCollections:(0,a.Cl)((0,a.Cl)({},e.pageSetCollections),(n={},n[i.pageSetId]={status:u.U.Pending,pageSetId:i.pageSetId,collections:[]},n))})})),(0,s.po)(W,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSetCollections:(0,a.Cl)((0,a.Cl)({},e.pageSetCollections),(n={},n[i.pageSetId]={status:u.U.Done,pageSetId:i.pageSetId,collections:i.collections},n))})})),(0,s.po)(Y,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSetCollections:(0,a.Cl)((0,a.Cl)({},e.pageSetCollections),(n={},n[i.pageSetId]={status:u.U.Failed,pageSetId:i.pageSetId,collections:[]},n))})})),(0,s.po)(G,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSetCollections:(0,a.Cl)((0,a.Cl)({},e.pageSetCollections),(n={},n[i.pageSetId]=(0,a.Cl)((0,a.Cl)({},e.pageSetCollections[i.pageSetId]),{status:u.U.Pending}),n)),issuePageSets:Object.keys(e.issuePageSets).reduce((function(t,n){return-1!==e.issuePageSets[n].pageSetIds.findIndex((function(e){return e!==i.pageSetId}))&&(t[n]=(0,a.Cl)((0,a.Cl)({},e.issuePageSets[n]),{status:u.U.Pending})),t}),(0,a.Cl)({},e.issuePageSets))})})),(0,s.po)(K,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSetCollections:(0,a.Cl)((0,a.Cl)({},e.pageSetCollections),(n={},n[i.pageSetId]={status:u.U.Done,pageSetId:i.pageSetId,collections:[]},n)),issuePageSets:Object.keys(e.issuePageSets).reduce((function(t,n){return t[n]=(0,a.Cl)((0,a.Cl)({},e.issuePageSets[n]),{pageSetIds:e.issuePageSets[n].pageSetIds.filter((function(e){return e!==i.pageSetId}))}),t}),(0,a.Cl)({},e.issuePageSets))})})),(0,s.po)(J,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSetCollections:(0,a.Cl)((0,a.Cl)({},e.pageSetCollections),(n={},n[i.pageSetId]=(0,a.Cl)((0,a.Cl)({},e.pageSetCollections[i.pageSetId]),{status:u.U.Failed}),n))})})),(0,s.po)(Z,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSet:(0,a.Cl)((0,a.Cl)({},e.pageSet),(n={},n[i.pageSetId]=(0,a.Cl)((0,a.Cl)({},e.pageSet[i.pageSetId]),{pageSetId:i.pageSetId,status:u.U.Pending}),n))})})),(0,s.po)($,(function(e,t){var n,i=t.payload,r=e.pageSet[i.pageSetId].pageSet;return r||(0,k.R)("Page set not found by id ".concat(i.pageSetId)),(0,a.Cl)((0,a.Cl)({},e),{pageSet:(0,a.Cl)((0,a.Cl)({},e.pageSet),(n={},n[i.pageSetId]=(0,a.Cl)((0,a.Cl)({},e.pageSet[i.pageSetId]),{status:u.U.Done,pageSetId:i.pageSetId,pageSet:r?(0,a.Cl)((0,a.Cl)({},r),{id:i.pageSetId,pages:i.pages}):void 0}),n))})})),(0,s.po)(ee,(function(e,t){var n,i=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{pageSet:(0,a.Cl)((0,a.Cl)({},e.pageSet),(n={},n[i.pageSetId]=(0,a.Cl)((0,a.Cl)({},e.pageSet[i.pageSetId]),{status:u.U.Failed}),n))})}))),ie=r+"/user_collections/",re=(0,s.lQ)("".concat(ie,"load_user_collections_action")),oe=(0,s.lQ)("".concat(ie,"load_user_collections_began")),ae=(0,s.lQ)("".concat(ie,"load_user_collections_done")),se=(0,s.lQ)("".concat(ie,"load_user_collections_failed")),ue=(0,s.lQ)("".concat(ie,"load_user_collections_cancelled")),ce=(0,s.lQ)("".concat(ie,"reset_user_collections_action")),le=Object.freeze([ae,se,ue]),de={status:u.U.None,userCollections:[]},he=(0,s.vy)(de,(0,s.po)(oe,(function(e){return(0,a.Cl)((0,a.Cl)({},e),{userCollections:(0,a.Cl)((0,a.Cl)({},e.userCollections),{status:u.U.Pending})})})),(0,s.po)(ae,(function(e,t){var n=t.payload;return(0,a.Cl)((0,a.Cl)({},e),{status:u.U.Done,userCollections:n.collections})})),(0,s.po)(se,(function(e){return(0,a.Cl)((0,a.Cl)({},e),{status:u.U.Failed})})),(0,s.po)(ce,(function(e){return(0,a.Cl)((0,a.Cl)({},e),{status:u.U.None,userCollections:[]})})),(0,s.po)(ue,(function(e){return(0,a.Cl)((0,a.Cl)({},e),{status:u.U.None})}))),fe=(0,o.HY)({userCollections:he,issuePageSet:ne,articleCollections:x}),pe=function(e){return e[r]},me=n(44834),ge=n(96424),ve=n(30212),ye=n(67660),_e=n(60474),be=n(88544),we=n(56880),Ce=n(29978),Ae=(0,Ce.Mz)(pe,(function(e){return e.articleCollections})),Ie=(0,Ce.Mz)(Ae,(function(e){return e.articleCollections})),Se=(0,i.bb)("articleId"),Pe=(0,Ce.Mz)(Ie,Se,(function(e,t){return e[t]})),xe=(0,Ce.Mz)(Pe,(function(e){return null==e?void 0:e.status})),Te=(0,Ce.Mz)(Pe,(function(e){return null==e?void 0:e.collections}));function ke(e){return(0,a.YH)(this,(function(t){switch(t.label){case 0:return[5,(0,a.Ju)((0,be.N)(xe,{articleId:e}))];case 1:return t.sent()!==u.U.Pending?[2]:[5,(0,a.Ju)((0,we.l)((0,a.fX)([],(0,a.zs)(I),!1),(function(t){return t.payload.articleId===e})))];case 2:return t.sent(),[2]}}))}function Ee(e){var t,n;return(0,a.YH)(this,(function(i){switch(i.label){case 0:return[5,(0,a.Ju)(ke(e))];case 1:return i.sent(),[5,(0,a.Ju)((0,be.N)(xe,{articleId:e}))];case 2:return void 0!==(t=i.sent())&&t!==u.U.None&&t!==u.U.Failed?t!==u.U.Done?[3,4]:[5,(0,a.Ju)((0,be.N)(Te,{articleId:e}))]:[3,6];case 3:return[2,null!=(n=i.sent())?n:void 0];case 4:return[5,(0,a.Ju)(Ee(e))];case 5:return[2,i.sent()];case 6:return[2,void 0]}}))}function Me(e){var t,n,i,r=e.articleId,o=e.isForce,s=void 0!==o&&o;return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[5,(0,a.Ju)(Ee(r))];case 1:return t=e.sent(),[4,(0,me.yJ)(d({articleId:r}))];case 2:return e.sent(),Boolean(t)&&!s?(i=t,[3,5]):[3,3];case 3:return[5,(0,a.Ju)((0,ge.p)(ye.oz,r))];case 4:i=e.sent(),e.label=5;case 5:return n=i,[4,(0,me.yJ)(h({articleId:r,collections:n}))];case 6:return e.sent(),[2]}}))}function De(e){var t,n,i,r=e.payload;return(0,a.YH)(this,(function(e){switch(e.label){case 0:return t=r.articleId,n=r.isForce,[4,ke(t)];case 1:e.sent(),e.label=2;case 2:return e.trys.push([2,4,6,10]),[5,(0,a.Ju)(Me({articleId:t,isForce:n}))];case 3:return e.sent(),[3,10];case 4:return i=e.sent(),(0,ve.z)(i),[4,(0,me.yJ)(f({articleId:t,error:i}))];case 5:return e.sent(),[3,10];case 6:return[4,(0,me.KW)()];case 7:return e.sent()?[4,(0,me.yJ)(p({articleId:t}))]:[3,9];case 8:e.sent(),e.label=9;case 9:return[7];case 10:return[2]}}))}function Ne(e){var t,n,i=e.payload,r=i.articleId,o=i.collectionsData;return(0,a.YH)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,5,,7]),[5,(0,a.Ju)(ke(r))];case 1:return e.sent(),[4,(0,me.yJ)(v({articleId:r}))];case 2:return e.sent(),[4,(0,me.T1)(ye.lw,r,o)];case 3:return t=e.sent(),[4,(0,me.yJ)(y({articleId:r,articleCollections:t}))];case 4:case 6:return e.sent(),[3,7];case 5:return n=e.sent(),(0,ve.z)(n),[4,(0,me.yJ)(_({articleId:r}))];case 7:return[2]}}))}function Le(e){var t,n=e.payload.articleId;return(0,a.YH)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,5,,7]),[5,(0,a.Ju)(ke(n))];case 1:return e.sent(),[4,(0,me.yJ)(w({articleId:n}))];case 2:return e.sent(),[4,(0,me.T1)(_e.SR,n)];case 3:return e.sent(),[4,(0,me.yJ)(C({articleId:n}))];case 4:case 6:return e.sent(),[3,7];case 5:return t=e.sent(),(0,ve.z)(t),[4,(0,me.yJ)(A({articleId:n}))];case 7:return[2]}}))}function Ve(){return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,me.p8)(l,De)];case 1:return e.sent(),[4,(0,me.jP)(g,Ne)];case 2:return e.sent(),[4,(0,me.jP)(b,Le)];case 3:return e.sent(),[2]}}))}var Re=n(67373),He=r+"/bookmarks/",Fe=(0,s.lQ)("".concat(He,"load_article_collections_action")),Be=((0,s.lQ)("".concat(He,"load_article_collections_began")),(0,s.lQ)("".concat(He,"load_article_collections_done"))),ze=(0,s.lQ)("".concat(He,"load_article_collections_failed")),Oe=n(60588),je=(0,Ce.Mz)(pe,(function(e){return e.issuePageSet})),Ue=(0,Ce.Mz)(je,(function(e){return e.pageSet})),We=(0,i.bb)("pageSetId"),Ye=(0,Ce.Mz)(Ue,We,(function(e,t){return e[t]})),Xe=(0,Ce.Mz)(Ye,(function(e){return null==e?void 0:e.status})),qe=(0,Ce.Mz)(Ye,(function(e){return null==e?void 0:e.pageSet})),Ge=(0,Ce.Mz)(je,(function(e){return e.pageSetCollections})),Ke=(0,Ce.Mz)(Ge,We,(function(e,t){return e[t]})),Je=(0,Ce.Mz)(Ke,(function(e){return null==e?void 0:e.collections})),Qe=(0,Ce.Mz)(Ke,(function(e){return null==e?void 0:e.status}));function Ze(e){return(0,a.YH)(this,(function(t){switch(t.label){case 0:return[5,(0,a.Ju)((0,be.N)(Xe,{pageSetId:e}))];case 1:return t.sent()!==u.U.Pending?[2]:[4,(0,me.s)((0,a.fX)([],(0,a.zs)(te),!1))];case 2:return t.sent(),[5,(0,a.Ju)((0,be.N)(Xe,{pageSetId:e}))];case 3:return t.sent()!==u.U.Pending?[2]:[5,(0,a.Ju)(Ze(e))];case 4:return t.sent(),[2]}}))}function $e(e){var t,n;return(0,a.YH)(this,(function(i){switch(i.label){case 0:return[5,(0,a.Ju)(Ze(e))];case 1:return i.sent(),[5,(0,a.Ju)((0,be.N)(Xe,{pageSetId:e}))];case 2:return null!=(t=i.sent())&&t!==u.U.None&&t!==u.U.Failed?t!==u.U.Done?[3,4]:[5,(0,a.Ju)((0,be.N)(qe,{pageSetId:e}))]:[3,6];case 3:return[2,null!=(n=i.sent())?n:null];case 4:return[5,(0,a.Ju)($e(e))];case 5:return[2,i.sent()];case 6:return[2,null]}}))}function et(e){var t;return(0,a.YH)(this,(function(n){switch(n.label){case 0:return[5,(0,a.Ju)((0,be.N)(Qe,{pageSetId:e}))];case 1:return(t=n.sent())!==u.U.Done?[3,3]:[5,(0,a.Ju)((0,be.N)(Je,{pageSetId:e}))];case 2:case 5:return[2,n.sent()];case 3:return t!==u.U.Pending?[3,6]:[4,(0,we.l)((0,a.fX)([],(0,a.zs)(X),!1),(function(t){return t.payload.pageSetId===e}))];case 4:return n.sent(),[5,(0,a.Ju)(et(e))];case 6:return[2,void 0]}}))}function tt(e,t){return(0,a.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,me.yJ)(j({pageSetId:e,collections:t}))];case 1:return n.sent(),[5,(0,a.Ju)(et(e))];case 2:return n.sent(),[2]}}))}function nt(e,t){var n,i;return(0,a.YH)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,5]),[4,(0,me.T1)(Oe.dW,{issueKey:e,pages:t})];case 1:return n=r.sent(),[4,(0,me.yJ)(D({issueKey:e,pageSet:[n]}))];case 2:return r.sent(),[2,n];case 3:return i=r.sent(),(0,ve.z)(i),[4,(0,me.yJ)(N({issueKey:e,error:i}))];case 4:throw r.sent(),i;case 5:return[2]}}))}function it(e){return(0,a.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,me.yJ)(q({pageSetId:e}))];case 1:return t.sent(),[4,(0,we.l)([K,J],(function(t){return t.payload.pageSetId===e}))];case 2:if(t.sent().type===String(J))throw new Error("Failed to remove page set from collections");return[2]}}))}function rt(e,t){return(0,a.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,me.yJ)(Q({pageSetId:e,pages:t}))];case 1:return n.sent(),[5,(0,a.Ju)((0,we.l)([$,ee],(function(t){return t.payload.pageSetId===e})))];case 2:if(n.sent().type===String(ee))throw new Error("Failed to update page set");return[2]}}))}var ot=n(1766),at=n(35374);function st(e,t){return(0,a.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,me.yJ)(g({articleId:e,collectionsData:t}))];case 1:return n.sent(),[4,(0,we.l)([y,_],(function(t){return t.payload.articleId===e}))];case 2:if(n.sent().type===String(_))throw new Error("Failed to upsert article collections");return[2]}}))}function ut(e){return(0,a.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,me.yJ)(b({articleId:e}))];case 1:return t.sent(),[4,(0,we.l)([C,A],(function(t){return t.payload.articleId===e}))];case 2:if(t.sent().type===String(A))throw new Error("Failed to remove article from collections");return[2]}}))}function ct(e){return(0,a.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,me.yJ)(Fe(e))];case 1:return t.sent(),[4,(0,we.l)([Be,ze],(function(t){return t.payload===e}))];case 2:if(t.sent().type===String(ze))throw new Error("Failed to add bookmark");return[2]}}))}function lt(e,t){return(0,a.YH)(this,(function(n){switch(n.label){case 0:return[5,(0,a.Ju)(dt({contentId:e,collections:t,contentType:Re.P.pageSet}))];case 1:return[2,n.sent()]}}))}function dt(e){var t=e.contentId,n=e.collections,i=e.contentType;return(0,a.YH)(this,(function(e){switch(e.label){case 0:if(!t)throw new Error("Content ID is not specified");return ot(n)&&(n=[{id:at.KM}]),i!==Re.P.article?[3,2]:[5,(0,a.Ju)(st(t,{collections:n}))];case 1:case 3:return e.sent(),[3,5];case 2:return i!==Re.P.pageSet?[3,4]:[5,(0,a.Ju)(tt(t,n))];case 4:throw new Error("unknown contentType");case 5:return[2]}}))}function ht(e){var t,n,i,r,o,s;return(0,a.YH)(this,(function(u){switch(u.label){case 0:return t=e.bookmarkType,n=e.bookmarkData,i=e.collections,t!==Re.x.pages?[3,2]:(o=n,[5,(0,a.Ju)(nt(o.issueKey,o.pages))]);case 1:s=u.sent(),r=s.id,u.label=2;case 2:if(t===Re.x.pageSet&&(r=n.pageSetId),!r)throw new Error("PageSet ID is not specified");return[5,(0,a.Ju)(lt(r,i||[]))];case 3:return u.sent(),[2]}}))}function ft(e){var t,n,i,r,o,s=e.payload;return(0,a.YH)(this,(function(e){switch(e.label){case 0:if(e.trys.push([0,6,,8]),!s)throw new Error("Bookmark is not specified");return t=s.bookmarkType,n=s.bookmarkData,i=s.collections,t!==Re.x.article?[3,2]:(r=n.articleId,[5,(0,a.Ju)(dt({contentId:r,collections:null!=i?i:[],contentType:Re.P.article}))]);case 1:return e.sent(),[3,4];case 2:return[5,(0,a.Ju)(ht(s))];case 3:e.sent(),e.label=4;case 4:return[4,(0,me.yJ)(Be(s))];case 5:return e.sent(),[3,8];case 6:return o=e.sent(),(0,ve.z)(o),[4,(0,me.yJ)(ze(s))];case 7:return e.sent(),[3,8];case 8:return[2]}}))}function pt(){return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,me.jP)(Fe,ft)];case 1:return e.sent(),[2]}}))}var mt=n(20263);function gt(e){var t,n,i,r,o=e.pageSetId,s=e.isForce,u=void 0!==s&&s;return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[5,(0,a.Ju)($e(o))];case 1:return t=e.sent(),[4,(0,me.yJ)(H({pageSetId:o}))];case 2:return e.sent(),Boolean(t)&&!u?(i=t,[3,5]):[3,3];case 3:return[4,(0,me.T1)(Oe.aI,o)];case 4:i=e.sent(),e.label=5;case 5:return n=i,[4,(0,me.yJ)(F({pageSet:n?[n]:[],issueKey:null!==(r=null==n?void 0:n.issueKey)&&void 0!==r?r:""}))];case 6:return e.sent(),[2]}}))}function vt(e){var t,n=e.payload;return(0,a.YH)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,5,9]),[5,(0,a.Ju)(Ze(n.pageSetId))];case 1:return e.sent(),[5,(0,a.Ju)(gt({pageSetId:n.pageSetId,isForce:n.isForce}))];case 2:return e.sent(),[3,9];case 3:return t=e.sent(),(0,ve.z)(t),[4,(0,me.yJ)(B({pageSetId:n.pageSetId,error:t}))];case 4:return e.sent(),[3,9];case 5:return[4,(0,me.KW)()];case 6:return e.sent()?[4,(0,me.yJ)(L({issueKey:n.pageSetId}))]:[3,8];case 7:e.sent(),e.label=8;case 8:return[7];case 9:return[2]}}))}function yt(e){var t,n=e.payload;return(0,a.YH)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,5,,7]),[5,(0,a.Ju)(Ze(n.pageSetId))];case 1:return e.sent(),[4,(0,me.yJ)(U(n))];case 2:return e.sent(),[4,(0,me.T1)(Oe.um,n.pageSetId,n.collections)];case 3:return e.sent(),[4,(0,me.yJ)(W(n))];case 4:case 6:return e.sent(),[3,7];case 5:return t=e.sent(),(0,ve.z)(t),[4,(0,me.yJ)(Y(n))];case 7:return[2]}}))}function _t(e){var t,n=e.payload;return(0,a.YH)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,5,,7]),[5,(0,a.Ju)(Ze(n.pageSetId))];case 1:return e.sent(),[4,(0,me.yJ)(G(n))];case 2:return e.sent(),[4,(0,ge.p)(mt.L2,n.pageSetId)];case 3:return e.sent(),[4,(0,me.yJ)(K(n))];case 4:case 6:return e.sent(),[3,7];case 5:return t=e.sent(),(0,ve.z)(t),[4,(0,me.yJ)(J(n))];case 7:return[2]}}))}function bt(e){var t=e.payload;return(0,a.YH)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,5,,7]),[5,(0,a.Ju)(Ze(t.pageSetId))];case 1:return e.sent(),[4,(0,me.yJ)(Z({pageSetId:t.pageSetId}))];case 2:return e.sent(),[4,(0,ge.p)(Oe.xm,t.pageSetId,t.pages)];case 3:return e.sent(),[4,(0,me.yJ)($(t))];case 4:case 6:return e.sent(),[3,7];case 5:return e.sent(),[4,(0,me.yJ)(ee({pageSetId:t.pageSetId}))];case 7:return[2]}}))}function wt(){return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,me.jP)(R,vt)];case 1:return e.sent(),[4,(0,me.jP)(j,yt)];case 2:return e.sent(),[4,(0,me.jP)(Q,bt)];case 3:return e.sent(),[4,(0,me.jP)(q,_t)];case 4:return e.sent(),[2]}}))}var Ct=n(28809),At=(0,Ce.Mz)(pe,(function(e){return e.userCollections})),It=(0,Ce.Mz)(Ct._t,(function(e){return{menu:e("ui.SharingMenu",[]).map((function(e){return{provider:e.id,enabled:e.enabled}}))}})),St=(0,Ce.Mz)(Ct._t,(function(e){return{oAuth:{facebookAppId:e("Authentication.OAuth.client_facebook.AppId")}}})),Pt=(0,Ce.Mz)(At,(function(e){return e.status})),xt=(0,Ce.Mz)(At,(function(e){return e.userCollections}));function Tt(){var e,t;return(0,a.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,me.Lt)(Pt)];case 1:return e=n.sent(),[4,(0,me.Lt)(xt)];case 2:return t=n.sent(),null!=e&&e!==u.U.None?e===u.U.Done?[2,t]:e===u.U.Failed?[2,null]:[4,(0,me.s)((0,a.fX)([],(0,a.zs)(le),!1))]:[3,5];case 3:return n.sent(),[5,(0,a.Ju)(Tt())];case 4:return[2,n.sent()];case 5:return[2,null]}}))}function kt(e){var t,n,i,r,o,s;return(0,a.YH)(this,(function(c){switch(c.label){case 0:return c.trys.push([0,10,,12]),[4,(0,me.Lt)(Pt)];case 1:return t=c.sent(),e&&t===u.U.Pending?(i=null,[3,4]):[3,2];case 2:return[5,(0,a.Ju)(Tt())];case 3:i=c.sent(),c.label=4;case 4:return n=i,[4,(0,me.yJ)(oe())];case 5:return c.sent(),Boolean(n)&&!e?(o=n,[3,8]):[3,6];case 6:return[4,(0,me.T1)(ye.Re)];case 7:o=c.sent(),c.label=8;case 8:return r=o,[4,(0,me.yJ)(ae({collections:r}))];case 9:return c.sent(),[2,r];case 10:return s=c.sent(),(0,ve.z)(s),[4,(0,me.yJ)(se({error:s}))];case 11:return c.sent(),[3,12];case 12:return[2,[]]}}))}function Et(e){var t,n=e.payload;return(0,a.YH)(this,(function(e){switch(e.label){case 0:t=n.isForce,e.label=1;case 1:return e.trys.push([1,,3,7]),[5,(0,a.Ju)(kt(t))];case 2:return e.sent(),[3,7];case 3:return[4,(0,me.KW)()];case 4:return e.sent()?[4,(0,me.yJ)(ue())]:[3,6];case 5:e.sent(),e.label=6;case 6:return[7];case 7:return[2]}}))}function Mt(){return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,me.p8)(re,Et)];case 1:return e.sent(),[2]}}))}i.bX.addFeature(r,fe,(function(){return(0,a.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,me.Zy)(wt)];case 1:return e.sent(),[4,(0,me.Zy)(Mt)];case 2:return e.sent(),[4,(0,me.Zy)(Ve)];case 3:return e.sent(),[4,(0,me.Zy)(pt)];case 4:return e.sent(),[2]}}))}))},34132:function(e,t,n){"use strict";n.d(t,{KP:function(){return c},M_:function(){return u},fm:function(){return l},su:function(){return s}});var i=n(58932),r=n(73690),o=n(17207),a="SponsorshipManager",s=function(e){return(0,r._s)(a,"SetHotzoneStatus",JSON.stringify({enabled:e}),{contentType:"application/json"})},u=function(){return(0,r.G4)(a,"get",{},{ignoreInitState:!0})},c=function(){return(0,r.G4)(a,"GetCobranding",{})},l=function(){return(0,i.sH)(void 0,void 0,void 0,(function(){var e;return(0,i.YH)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,o.TR)()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=void 0,[3,3];case 3:return[2,(0,r._s)(a,"findAndActivateByLocation",e?JSON.stringify({myLat:e.lat,myLng:e.lng}):void 0,{contentType:"application/json"})]}}))}))}},61445:function(e,t,n){"use strict";n.d(t,{cl:function(){return _},xJ:function(){return T},sF:function(){return P},$4:function(){return x},dZ:function(){return E},pP:function(){return k},uL:function(){return l},NX:function(){return d},GQ:function(){return p},rx:function(){return m},$y:function(){return v},Wj:function(){return f},RR:function(){return y},FE:function(){return M},N$:function(){return D},jA:function(){return N},B4:function(){return g},c0:function(){return h}});var i=n(13981),r="@pressreader/sponsorship-core",o=n(58932),a=n(74010),s=n(89103),u=n(43566),c="".concat(r,"/"),l=(0,s.lQ)("".concat(c,"load_hotspot_info")),d=(0,s.lQ)("".concat(c,"load_hotspot_info_cancelled")),h=(0,s.lQ)("".concat(c,"toggle_hotspot")),f=(0,s.lQ)("".concat(c,"open_hotspot")),p=(0,s.lQ)("".concat(c,"load_hotspot_info_done")),m=(0,s.lQ)("".concat(c,"load_hotspot_info_failed")),g=(0,s.lQ)("".concat(c,"sponsorship_changed")),v=(0,s.lQ)("".concat(c,"load_partner_info")),y=(0,s.lQ)("".concat(c,"partner_info_changed")),_=(0,s.lQ)("".concat(c,"find_and_activate_sponsorship_by_location")),b={loading:a.U.None,sponsor:null,partner:void 0},w=(0,s.vy)(b,(0,s.po)(u.YC,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{loading:a.U.None,sponsor:null})})),(0,s.po)(p,(function(e,t){var n=t.payload.sponsor;return(0,o.Cl)((0,o.Cl)({},e),{loading:a.U.Done,sponsor:n})})),(0,s.po)(m,(function(e){return(0,o.Cl)((0,o.Cl)({},e),{loading:a.U.Failed})})),(0,s.po)(g,(function(e,t){var n=t.payload.sponsor;return(0,o.Cl)((0,o.Cl)({},e),{loading:a.U.Done,sponsor:n})})),(0,s.po)(y,(function(e,t){var n=t.payload.partner;return(0,o.Cl)((0,o.Cl)({},e),{partner:n})}))),C=n(29978),A=n(28809),I=n(46674),S=function(e){return e[r]},P=(0,C.Mz)(S,(function(e){return e.loading})),x=(0,C.Mz)(S,(function(e){return e.sponsor})),T=(0,C.Mz)(x,(function(e){return!!(null==e?void 0:e.isHotspotEnabled)})),k=(0,C.Mz)(x,(function(e){return null==e?void 0:e.status})),E=(0,C.Mz)(x,(function(e){return(null==e?void 0:e.status)===I.D.On?e:null})),M=(0,C.Mz)(x,(function(e){return(null==e?void 0:e.isEmbeddedModeEnabled)||!1})),D=(0,C.Mz)(M,A._t,(function(e,t){return e||t("features.authentication.disabled",!1)})),N=(0,C.Mz)(S,(function(e){return e.partner}));i.bX.addFeature(r,w)},46674:function(e,t,n){"use strict";var i;n.d(t,{D:function(){return i}}),function(e){e[e.Off=0]="Off",e[e.Busy=1]="Busy",e[e.On=2]="On",e[e.BusyLimitExceeded=3]="BusyLimitExceeded",e[e.OutOfHotspot=4]="OutOfHotspot"}(i||(i={}))},80835:function(e,t,n){"use strict";var i,r;n.d(t,{Z:function(){return i}}),function(e){e.Web="web",e.Pervasive="pervasive",e.Voyager="voyager"}(i||(i={})),function(e){e.JPEG="image/jpeg",e.PNG="image/png",e.GIF="image/gif",e.WEBP="image/webp",e.PDF="application/pdf",e.EPUB_ZIP="application/epub+zip"}(r||(r={}))},91894:function(e,t,n){"use strict";n.d(t,{u:function(){return i}});var i=[{prop:"",css:"",fun:""},{prop:"Webkit",css:"-webkit-",fun:"webkit"},{prop:"Moz",css:"-moz-",fun:"moz"},{prop:"ms",css:"-ms-",fun:"ms"},{prop:"O",css:"-o-",fun:"o"}]},84386:function(e,t,n){"use strict";n.d(t,{e:function(){return r}});var i=n(58932),r=function(e){function t(t){var n=this.constructor,i=e.call(this,t)||this;return Object.setPrototypeOf(i,n.prototype),i}return(0,i.C6)(t,e),t}(Error)},30264:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});var i=n(58932),r=function(e){function t(t){var n=t.status,i=t.responseText,r=t.responseJSON,o=this,a=(null==r?void 0:r.message)||i||"",s=null==r?void 0:r.resourceKey;return(o=e.call(this,a,s)||this).status=n,o.responseText=i,o.responseJSON=r,o}return(0,i.C6)(t,e),t}(function(e){function t(t,n){var i=e.call(this,t)||this;return i.resourceKey=n,i}return(0,i.C6)(t,e),t}(n(84386).e))},3503:function(e,t,n){"use strict";function i(e){return null!=e}function r(e){return function(t){return i(null==t?void 0:t[e])}}function o(e){for(var t=[],n=1;ni[1])continue;i=u}}return i}function p(e){return e&&e.isDefault}function m(e){return!!e&&(function(e){var t=e.getAttribute("tabindex"),n=t?Number(t):null;(null===n||!Number.isFinite(n)||n<-1)&&e.setAttribute("tabindex","-1")}(e),e.focus(),!0)}var g=(0,r.memo)((function(e){var t=(0,r.useRef)({type:u.S.SkipLinkContainer,items:[]}),n=(0,a.f)(t.current),c=(0,r.useRef)({}),l=(0,r.useMemo)((function(){return{isDefault:!1,addItem:function(e){t.current.items.indexOf(e)<0&&t.current.items.push(e)},removeItem:function(e){var n=t.current.items.indexOf(e);n>=0&&t.current.items.splice(n,1)},skip:function(e){return e.ref.current?n.goNext(t.current,h(e.ref.current),e.tag):null},goNext:function(e,i,r){var o,a,s=t.current,u=s.items.filter((function(t){return t!==e})),c=f(u,r,i),l=null;if(c)l=null!==(o=c[0].ref.current)&&void 0!==o?o:null;else{if(!p(n))return n.goNext(s,i,r);var d=f(u,r);l=null!==(a=null==d?void 0:d[0].ref.current)&&void 0!==a?a:null}return l&&m(l)?l:null},registerInGlobalContext:function(e){var t=e.tag;if(t)if(p(n)){var i=c.current;i[t]&&i[t]!==e&&(0,o.z)('A ISkipLinkTargetItem with tag "'.concat(t,'" is already registered in the global context')),i[t]=e}else n.registerInGlobalContext(e);else(0,o.z)("ISkipLinkTargetItem should have a tag when registered in the global context")},removeFromGlobalContext:function(e){var t=e.tag;t&&(p(n)?delete c.current[t]:n.removeFromGlobalContext(e))},goToTag:function(e){if(!p(n))return n.goToTag(e);var t=c.current[e];return!!t&&m(t.ref.current)}}}),[t,c,n]);return(0,i.jsx)(s.y.Provider,{value:l,children:e.children})}));g.displayName="SkipLinkContainer"},20820:function(e,t,n){"use strict";n.d(t,{q:function(){return c}});var i=n(31555),r=n(5059),o=n(30212),a=n(97556),s=n(30431),u=n(77511),c=(0,r.memo)((0,r.forwardRef)((function(e,t){var n=(0,r.useRef)(void 0),c=(0,r.useMemo)((function(){return{type:u.S.SkipLink,ref:n,tag:e.tag}}),[e.tag]),l=(0,s.f)(c),d=e.onClick,h=(0,r.useCallback)((function(){var e=l.skip(c);e?null==d||d(e):(0,o.z)("SkipLink: No SkipLinkTarget found for the item:",c)}),[l,c,d]),f=(0,r.useCallback)((function(e){n.current=e,"function"==typeof t?t(e):t&&(t.current=e)}),[t]);return(0,i.jsx)(a.o,{ref:f,id:e.id,onClick:h,className:"skip-link ".concat(e.className||""),"aria-label":e["aria-label"],children:e.children})})));c.displayName="SkipLink"},70841:function(e,t,n){"use strict";n.d(t,{P:function(){return u}});var i=n(5059),r=n(55134),o=n(88612),a=n(30431),s=n(77511),u=(0,i.memo)((function(e){var t=(0,i.useRef)(void 0),n=(0,i.useMemo)((function(){return{type:s.S.SkipLinkTarget,ref:t,tag:e.tag}}),[e.tag]);(0,a.f)(n);var u=i.Children.only(e.children);return(0,i.useMemo)((function(){var e;if(!t)return u;if(!(0,i.isValidElement)(u))return u;var n=u.type,a=(0,r.G)(n)?n.refProp:"ref";return(0,i.cloneElement)(u,((e={})[a]=function(e){if(t.current=e,(0,o.m)(u,"ref")){var n=u.ref;"function"==typeof n?n(e):(0,o.m)(n,"current")&&(n.current=e)}},e))}),[u])}));u.displayName="SkipLinkTarget"},30431:function(e,t,n){"use strict";n.d(t,{d:function(){return c},f:function(){return l}});var i=n(5059),r=n(85387),o=n(30212),a=n(27602),s=n(64769),u=n(63567);function c(){var e=(0,i.useContext)(s.y);if(!e||e.isDefault){var t=new Error("SkipLinkContainerContext should be used inside a context provider");throw(0,o.z)(t),t}return e}function l(e){var t=(0,i.useContext)(s.y),n=(0,r.wA)(),o=t.addItem,c=t.removeItem,l=t.removeFromGlobalContext,d=t.registerInGlobalContext;return(0,i.useLayoutEffect)((function(){if((0,u.Q)(e)){var t={type:"skipLinkTarget",timestampMs:Date.now(),refocusTarget:{id:e.tag}};return d(e),n((0,a.FL)(t)),function(){l(e),n((0,a.aq)({reason:"skip-link-target-unmount",target:t}))}}}),[e,d,l,n]),(0,i.useEffect)((function(){return o(e),function(){c(e)}}),[e,o,c]),t}},64769:function(e,t,n){"use strict";n.d(t,{y:function(){return a}});var i=function(){},r=function(){return null},o={isDefault:!0,addItem:i,removeItem:i,goNext:r,skip:r,registerInGlobalContext:i,removeFromGlobalContext:i,goToTag:function(){return!1}},a=(0,n(5059).createContext)(o)},77511:function(e,t,n){"use strict";var i;n.d(t,{S:function(){return i}}),function(e){e[e.SkipLink=0]="SkipLink",e[e.SkipLinkTarget=1]="SkipLinkTarget",e[e.SkipLinkContainer=2]="SkipLinkContainer"}(i||(i={}))},63567:function(e,t,n){"use strict";n.d(t,{Q:function(){return o},U:function(){return r}});var i=n(77511);function r(e){return e.type===i.S.SkipLinkTarget}function o(e){return r(e)&&"tag"in e&&"string"==typeof e.tag}},18752:function(e,t,n){"use strict";n.d(t,{dS:function(){return h},HG:function(){return c},el:function(){return T},LU:function(){return I},CL:function(){return x},ff:function(){return A},Fq:function(){return P},L9:function(){return S},l9:function(){return H},O4:function(){return k},iz:function(){return d}});var i=n(13981),r="@pressreader/ui-common",o=n(58932),a=n(89103),s=n(75069),u="ui/common/",c=(0,a.lQ)("".concat(u,"screen_resized")),l=(0,a.lQ)("".concat(u,"screen_changed")),d=(0,a.lQ)("".concat(u,"topbar_height_changed")),h=(0,a.lQ)("".concat(u,"notify_screen_reader")),f=(0,a.lQ)("".concat(u,"screen_reader_notified")),p={screen:(0,s.gc)(),notification:null},m=(0,a.vy)(p,(0,a.po)(l,(function(e,t){return(0,o.Cl)((0,o.Cl)({},e),{screen:(0,o.Cl)({},t.payload.screen)})})),(0,a.po)(f,(function(e,t){var n;return(0,o.Cl)((0,o.Cl)({},e),{notification:{id:((null===(n=e.notification)||void 0===n?void 0:n.id)||0)+1,message:t.payload.message}})}))),g=n(44834),v=n(4291),y=n(29978),_=n(28809),b=n(11677),w=n(16343),C=function(e){return e[r]},A=(0,y.Mz)(C,(function(e){return e.screen})),I=(0,y.Mz)(A,(function(e){return w.j.mobile?e.screenType<=b.a.Small?"phone":"tablet":"desktop"})),S=(0,y.Mz)(A,(function(e){return e.screenType})),P=(0,y.Mz)(A,(function(e){return e.orientation})),x=(0,y.Mz)(C,(function(e){return e.notification})),T=(0,y.Mz)(_._t,(function(e){return{threshold:e("app.common.swiper.threshold",0)}})),k=(0,y.Mz)(_._t,(function(e){return e("ui.Sidebar.SignInEnabled",!0)&&e("ui.TopToolbar.SignInEnabled",!0)}));function E(e,t){var n=e.headerHeight;(null==t?void 0:t.newHeaderHeight)&&(n=t.newHeaderHeight);var i=(0,s.gc)(),r={top:n,left:0,width:i.availWidth,height:i.availHeight-n};return(0,o.Cl)((0,o.Cl)({},i),{headerHeight:n,viewport:r})}function M(e,t){return(0,o.YH)(this,(function(n){switch(n.label){case 0:return v(e,t)?[3,2]:[4,(0,g.yJ)(l({prevScreen:e,screen:t}))];case 1:n.sent(),n.label=2;case 2:return[2]}}))}function D(){var e,t;return(0,o.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,g.Lt)(A)];case 1:return e=n.sent(),t=E(e),[4,M(e,t)];case 2:return n.sent(),[2]}}))}function N(e){var t,n,i;return(0,o.YH)(this,(function(r){switch(r.label){case 0:return t=e.payload.topbarHeight,[4,(0,g.Lt)(A)];case 1:return n=r.sent(),i=E(n,{newHeaderHeight:t}),[4,M(n,i)];case 2:return r.sent(),[2]}}))}function L(e){return(0,o.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,g.yJ)(f({message:e.payload.message}))];case 1:return t.sent(),[2]}}))}var V=n(27602),R=n(65678),H=(0,y.Mz)(V.SG,(function(e){return[R.lP.Article,R.lP.FTSArticles,R.lP.TextView,R.lP.TopNews].some((function(t){return t===(null==e?void 0:e.viewName)}))}));i.bX.addFeature(r,m,(function(){return(0,o.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,g.jP)(c,D)];case 1:return e.sent(),[4,(0,g.jP)(d,N)];case 2:return e.sent(),[4,(0,g.jP)(h,L)];case 3:return e.sent(),[2]}}))}))},75069:function(e,t,n){"use strict";n.d(t,{DK:function(){return h},I1:function(){return p},gc:function(){return u},jG:function(){return l},jd:function(){return d},pX:function(){return f},w3:function(){return c}});var i=n(58932),r=n(80835),o=n(11677),a=n(88960),s=n(1333);function u(){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;if(void 0===e||void 0===t)throw new Error("Critical error: document size is undefined.");var n=e>t?o.Z.Landscape:o.Z.Portrait;return{screenWidth:window.screen.width,screenHeight:window.screen.height,screenType:(0,s.a)(),availWidth:e,availHeight:t,orientation:n,devicePixelRatio:window.devicePixelRatio,headerHeight:0,viewport:{top:0,left:0,width:e,height:t}}}function c(e,t,n){return"vp_".concat(e.width,"_").concat(t||"","_").concat(n)}function l(e){return e===r.Z.Voyager?"platform-".concat(r.Z.Web," platform-extend-").concat(r.Z.Voyager):"platform-".concat(e)}function d(){return"a".concat((0,a.A)())}function h(e){var t=e.offsetHeight,n=getComputedStyle(e);return t+(parseInt(n.marginTop,10)+parseInt(n.marginBottom,10))}function f(e,t){if("function"==typeof e.closest)return e.closest(t)||null;if(!Element.prototype.matches)return null;for(var n=e;n;n=n.parentElement)if(n.matches(t))return n;return null}var p=function(e){return(0,i.fX)([],e,!0).sort((function(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}))}},6666:function(e,t,n){"use strict";n.d(t,{T:function(){return i}});var i=function(e){return e.stopPropagation(),e.preventDefault(),!1}},16957:function(e,t,n){"use strict";n.d(t,{Px:function(){return m},_U:function(){return p},bx:function(){return v},sP:function(){return g}});var i=n(58932),r=n(83123),o=n(26308),a=n(19589),s=n(26476),u=n(74594),c=50,l=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],d="webkitbeginfullscreen",h="webkitendfullscreen",f=document;function p(){return!!(f.fullscreenElement||f.webkitFullscreenElement||f.mozFullScreenElement||f.msFullscreenElement)}function m(e){return(0,i.sH)(this,void 0,void 0,(function(){var t,n,r,o;return(0,i.YH)(this,(function(i){if(!e)throw new TypeError("`element` is expected to be a DOM element");return[2,(null===(t=e.requestFullscreen)||void 0===t?void 0:t.call(e))||(null===(n=e.msRequestFullscreen)||void 0===n?void 0:n.call(e))||(null===(r=e.webkitRequestFullscreen)||void 0===r?void 0:r.call(e))||(null===(o=e.mozRequestFullScreen)||void 0===o?void 0:o.call(e))]}))}))}function g(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n,r;return(0,i.YH)(this,(function(i){return[2,(null===(e=f.exitFullscreen)||void 0===e?void 0:e.call(f))||(null===(t=f.msExitFullscreen)||void 0===t?void 0:t.call(f))||(null===(n=f.mozCancelFullScreen)||void 0===n?void 0:n.call(f))||(null===(r=f.webkitExitFullscreen)||void 0===r?void 0:r.call(f))]}))}))}function v(e){var t=l.map((function(e){return(0,o.R)(document,e).pipe((0,s.T)((function(){return p()})))}));return r(e)&&(t.push((0,o.R)(e,d).pipe((0,s.T)((function(){return!0})))),t.push((0,o.R)(e,h).pipe((0,s.T)((function(){return!1}))))),a.h.apply(void 0,t).pipe((0,u.c)(c))}},32874:function(e,t,n){"use strict";function i(e){var t=window.devicePixelRatio;return Math.round(e*t)/t}n.d(t,{L:function(){return i}})},1333:function(e,t,n){"use strict";n.d(t,{a:function(){return s}});var i=n(11677),r=n(68565),o=n(16343),a=[[1200,i.a.XLarge],[992,i.a.Large],[768,i.a.Medium],[480,i.a.Small],[0,i.a.XSmall]];function s(){var e=(0,r.Q)(),t=e.width;o.j.mobile&&(t=Math.min(e.width,e.height));for(var n=0,s=a;n=u[0])return u[1]}return i.a.XSmall}},69851:function(e,t,n){"use strict";function i(e){var t=document.documentElement,n=e.getBoundingClientRect(),i=n.top+window.scrollY-t.clientTop,r=i+n.height,o=n.left+window.scrollX-t.clientLeft;return{bottom:r,left:o,right:o+n.width,top:i}}function r(e,t){var n=i(t),r=i(e),o=n.topr.bottom;o?(e.scrollTop=n.top-r.top+e.scrollTop,e.scrollTopm-r&&b>m&&(b=m),g+_+r-p>0&&g-r<=0&&(_=Math.max(0,p-g-r));var A=Math.max(0,_-w-C),I=!1;if(f&&f.childElementCount>0&&A>0){for(var S=0,P=0;PA}return{width:b,height:A,scrollable:I}},l=function(e){var t=(0,o.useMemo)((function(){var t,n,i,r,o;return i={alignX:(null===(t=e.position.align)||void 0===t?void 0:t.x)||a.W.Center,alignY:(null===(n=e.position.align)||void 0===n?void 0:n.y)||a.W.Center},r=i.alignX,o=i.alignY,function(e){var t=e.initialPosition,n=e.totalHeight,i=e.totalWidth,s=e.windowHeight,u=e.windowWidth,c=e.marginPx,l=void 0===c?0:c,d=t.top,h=t.left;o===a.W.Top||o===a.W.ScreenTop||(o===a.W.Center?n>s-(d=t.top-n/2-l)&&(d=s-n-l):o===a.W.Bottom?d=t.top-n:o===a.W.ScreenCenter?d=(s-n)/2:o===a.W.ScreenBottom&&(d=s-n)),d=Math.max(Math.ceil(d),l),r===a.W.Left||r===a.W.ScreenLeft||(r===a.W.Center?h=t.left-i/2:r===a.W.Right?h=t.left-i:r===a.W.ScreenCenter?h=(u-i)/2:r===a.W.ScreenRight&&(h=t.left-i)),(h=Math.max(Math.ceil(h),l))+i>u-l&&(h=i>u?0:u-i-Math.min(l,(u-i)/2));var f=d+n+l-s;if(f>0){var p=d-l;p>0&&(d=f>p?l:d-f)}return{top:Math.ceil(d),left:Math.ceil(h)}}}),[e.position.align]);return(0,r.jsx)(s.y,(0,i.Cl)({},e,{positionCalculationStrategy:t,bodyDimensionsOverrideCb:c}))}},37389:function(e,t,n){"use strict";n.d(t,{D:function(){return o},R:function(){return a}});var i=n(5059),r=(0,i.createContext)(null),o=r.Provider,a=function(){return(0,i.useContext)(r)}},10207:function(e,t,n){"use strict";n.d(t,{K:function(){return i}});var i=n(5059).createContext({close:function(){throw new Error("Not implemented")}})},41035:function(e,t,n){"use strict";n.d(t,{S:function(){return u}});var i=n(31555),r=n(5059),o=n(13384),a=n(97556),s=n(61577),u=(0,r.forwardRef)((function(e,t){var n=e.onClose,u=(0,r.useRef)(null),c=(0,r.useRef)(null),l=(0,r.useState)(0),d=l[0],h=l[1],f=(0,r.useMemo)((function(){return{minWidth:d}}),[d]),p=(0,r.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),n({back:!0})}),[n]),m=(0,r.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),n({back:!1})}),[n]);return(0,r.useLayoutEffect)((function(){if(u.current&&c.current){var e=Math.max(u.current.clientWidth,c.current.clientWidth);d!==e&&h(e)}})),(0,i.jsxs)("div",{ref:t,className:"toolbar-in",children:[(0,i.jsxs)("div",{className:"toolbar-left",ref:u,style:f,children:[e.leftControls,!e.leftControls&&e.canGoBack&&(0,i.jsx)(a.o,{className:"toolbar-button toolbar-button-back",onClick:p,children:(0,i.jsx)("span",{children:(0,i.jsx)("span",{children:(0,o.p3)("Buttons.Back.Text")})})}),!e.leftControls&&!e.canGoBack&&(0,i.jsx)(s.n,{className:"btn toolbar-btn",onClick:m,children:(0,i.jsx)("span",{className:"title",children:(0,o.p3)("Buttons.Close")})})]}),(0,i.jsxs)("div",{className:"toolbar-center",children:[e.centerControls,!e.centerControls&&e.title&&(0,i.jsx)("h1",{children:e.title})]}),(0,i.jsx)("div",{className:"toolbar-right",ref:c,style:f,children:e.rightControls})]})}))},59565:function(e,t,n){"use strict";n.d(t,{t:function(){return y}});var i=n(31555),r=n(5059),o=n(76700),a=n(31728);function s(e){return e instanceof HTMLElement&&!e.hasAttribute("disabled")&&!e.hasAttribute("inert")}var u=n(6666),c=n(43150),l=n(88960),d=n(18416),h=n(23068),f=n(45164),p=n(64492),m=(0,r.createContext)(null),g=(0,r.forwardRef)((function(e,t){var n=(0,r.useRef)(null),a=(0,o.N)(t),s=(0,r.useState)(null),u=s[0],c=s[1];(0,r.useEffect)((function(){if(e.opened){var t=f((function(){var t=(0,h.GY)(e.options,e.controledByRef,a,n);c(t)}),200);return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}}),[e.controledByRef,e.opened,e.options,a]),(0,r.useEffect)((function(){if(e.opened){var t=(0,h.GY)(e.options,e.controledByRef,a,n);c(t)}else c(null)}),[e.opened,a,e.controledByRef,n,e.options]);var l=(0,r.useMemo)((function(){return{reposition:function(){var t=(0,h.GY)(e.options,e.controledByRef,a,n);c(t)}}}),[e.options,a,e.controledByRef,n]),d=e.opened&&!!u,g={display:e.opened?"block":"none",visibility:d?"visible":"hidden",position:"fixed",left:null==u?void 0:u.x,top:null==u?void 0:u.y,maxWidth:null==u?void 0:u.maxWidth},v=(null==u?void 0:u.maxHeight)?{maxHeight:null==u?void 0:u.maxHeight}:void 0;return(0,i.jsxs)(m.Provider,{value:l,children:[e.opened&&(0,i.jsx)(p._,{ref:n,style:{visibility:d?"visible":"hidden"},className:"dialog-tint dropdown-tint"}),(0,i.jsx)("div",{ref:a,className:"dropmenu dropmenu-body-wrapper",style:g,children:(0,i.jsx)("div",{className:"dropmenu-body",style:v,children:(0,i.jsx)("div",{className:"pop-list dropmenu-list-wrapper",children:e.children})})})]})}));g.displayName="ContextMenuBody";var v=n(10207),y=(0,r.forwardRef)((function(e,t){var n,f=e.button.props,p=(0,o.N)(null!==(n=f.ref)&&void 0!==n?n:null),m=(0,r.useRef)(null),y=(0,r.useRef)(null),_=(0,r.useContext)(a.w),b=(0,r.useState)(-1),w=b[0],C=b[1],A=f.onClick,I=(0,r.useCallback)((function(e){null==A||A(e),e.stopPropagation(),C((function(e){return-1===e?0:-1}))}),[C,A]),S=f.onKeyDown,P=(0,r.useCallback)((function(e){if(null==S||S(e),y.current){var t=Array.from(x(y.current)),n=-1;switch(e.keyCode){case c.u.up:n=t.length-1;break;case c.u.down:case c.u.space:case c.u.enter:n=0;break;default:return}-1!==n&&(C(n),_.startKeyboardInteraction(),e.preventDefault(),e.stopPropagation())}}),[y,C,_]),x=(0,r.useCallback)((function(e){return void 0===e&&(e=y.current),e?(t=e,void 0===n&&(n=s),Array.from(t.querySelectorAll('a, button, [role="link"][tabindex], [role="button"][tabindex]')).filter(n)):[];var t,n}),[]),T=(0,r.useCallback)((function(e){var t;e&&(null===(t=p.current)||void 0===t||t.focus()),C(-1)}),[C]),k=(0,r.useCallback)((function(e){switch(e.keyCode){case c.u.esc:case c.u.enter:return void T(!0);case c.u.tab:return void T(!1)}var t=x();if(t.length){var n=t.indexOf(e.target),i=(0,h.LC)({event:e,contextMenuItems:t,focusedMenuItemIndex:n});n!==i&&(_.startKeyboardInteraction(),t[i].focus(),(0,u.T)(e))}}),[w,_,x,T]);(0,r.useLayoutEffect)((function(){if(m.current){var e=m.current,t=function(e){return e.stopPropagation()};return e.addEventListener("keyup",t),function(){return e.removeEventListener("keyup",t)}}}),[m]),(0,r.useEffect)((function(){if(-1!==w&&m.current){var e=Array.from(x(m.current));e.length>0&&setTimeout((function(){e[w].focus()}),25)}}),[m,w]);var E=-1!==w,M=(0,r.useCallback)((function(){T(!1)}),[T]),D=(0,r.useCallback)((function(){var e=m.current;if(e){var t=document.activeElement,n=x(e),i=p.current===t,r=!!n.find((function(e){return t&&function(e,t){if(e===t)return!0;if(!e.children)return!1;for(var n=0;nm){var g=o.top-u.top;a.height>g?m>g?(f=o.bottom,p=m):(f=o.top-g,p=g):f=o.top-a.height}else f=o.bottom;return((h=o.left+o.width/2-c/2)+c>u.left+u.width||hu.left+u.width||e.align===l.K.Right)&&(h=e.align===l.K.Right?o.right-c:u.left+u.width-c),{x:h,y:f,maxHeight:p,maxWidth:u.width}}function f(e){var t=e.event,n=e.contextMenuItems,i=e.focusedMenuItemIndex,o=n.length;if(!o)return i;if(i>o-1||i<0){var u=new Error('"focusedMenuItemIndex" is out of bounds. Value is "'.concat(i,'", whereas menu items list length is "').concat(o,'"'));throw(0,r.z)(u),u}var c=i,l=!0;switch(t.keyCode){case a.u.up:c--;break;case a.u.down:c++;break;case a.u.home:case a.u.pgUp:c=0;break;case a.u.end:case a.u.pgDown:c=n.length-1;break;default:if((0,s.aE)(t.key)){var d=t.key.toLowerCase(),h=n.findIndex((function(e){return(e.textContent||"").toLowerCase().startsWith(d)}));-1!==h&&(c=h)}else l=!1}return l?(c<0?c=n.length-1:c>=n.length&&(c=0),c):i}function p(e){return e.x===o.W.Auto&&e.y===o.W.Auto}function m(e){void 0===e&&(e=document.body);var t=window.getComputedStyle(e).getPropertyValue(c);return t?parseInt(t):u}},54218:function(e,t,n){"use strict";n.d(t,{LN:function(){return c},t9:function(){return l},zp:function(){return d}});var i=n(58932),r=n(31555),o=n(5059),a=n(3491),s=n(64404),u=(0,o.createContext)({onUpdate:a}),c=function(e){var t=e.onUpdate,n=(0,o.useMemo)((function(){return{onUpdate:t}}),[t]);return(0,r.jsx)(u.Provider,(0,i.Cl)({value:n},e))},l=function(e){var t=(0,o.useContext)(u).onUpdate;return(0,s.B)(t),(0,r.jsx)(r.Fragment,{children:e.children})};function d(){var e=(0,o.useContext)(u).onUpdate;(0,s.B)(e)}},54805:function(e,t,n){"use strict";n.d(t,{b:function(){return a}});var i=n(31555),r=n(5059),o=n(76700),a=(0,r.forwardRef)((function(e,t){var n,a=e.scrollable,s=e.mouseDrag,u=e.className,c=e.style,l=e.scrollPosition,d=e.onScroll,h=e.onKeyDown,f=e.children,p=a&&s,m=(0,r.useRef)({canDrag:!1,dragging:!1,startX:0,diffX:0}).current,g=(0,r.useRef)(0),v=g.current,y=(0,o.N)(t),_=(0,r.useRef)(0);_.current=(null===(n=y.current)||void 0===n?void 0:n.scrollLeft)||0;var b=(0,r.useCallback)((function(e){if(p){var t=Date.now()-v<150;(m.diffX||t)&&e.stopPropagation()}}),[p,m,v]),w=(0,r.useCallback)((function(e){if(p){var t=e.currentTarget;m.canDrag=!0,m.startX=t.scrollLeft+e.clientX,m.diffX=0,e.preventDefault()}}),[p,m]),C=(0,r.useCallback)((function(){if(p&&(m.canDrag=!1,m.dragging)){m.dragging=!1;var e=y.current;if(e){var t=1,n=function(){var i=Math.pow(t,3);i<=0||(e.scrollLeft+=m.diffX*i,t-=.01,window.requestAnimationFrame(n))};n(),g.current=Date.now()}}}),[y,p,m]),A=(0,r.useCallback)((function(e){if(p&&(m.canDrag&&(m.dragging=!0),m.dragging)){var t=e.currentTarget;m.diffX=m.startX-(e.clientX+t.scrollLeft),t.scrollLeft+=m.diffX,e.preventDefault()}}),[p,m]),I=(0,r.useCallback)((function(e){a&&e.stopPropagation()}),[a]),S=(0,r.useCallback)((function(e){a&&e.stopPropagation()}),[a]),P=(0,r.useCallback)((function(){var e,t=(null===(e=y.current)||void 0===e?void 0:e.scrollLeft)||0,n=t-_.current;_.current=t,null==d||d(n)}),[y,d]);return(0,r.useEffect)((function(){var e=y.current,t=new AbortController,n=t.signal;return null==e||e.addEventListener("touchmove",I,{signal:n}),null==e||e.addEventListener("wheel",S,{signal:n}),document.addEventListener("mouseup",C,{signal:n}),h&&(null==e||e.addEventListener("keydown",h,{signal:n})),function(){t.abort()}}),[y,I,S,h,C]),(0,r.useEffect)((function(){l&&y.current&&(y.current.scrollLeft=l)}),[y,l]),(0,i.jsx)("div",{ref:y,className:u,style:c,onScroll:P,onClickCapture:b,onMouseDown:w,onMouseUp:C,onMouseMove:A,children:f})}))},21290:function(e,t,n){"use strict";n.d(t,{K:function(){return s},x:function(){return a}});var i=n(31555),r=n(5059),o=n(32242),a=(0,r.createContext)(null);function s(e){var t=(0,o.X)(e),n=t[0],r=t[1];return(0,i.jsx)("div",{ref:n,className:e.className,children:(0,i.jsx)(a.Provider,{value:r,children:e.children})})}},73314:function(e,t,n){"use strict";n.d(t,{c:function(){return s}});var i=n(31555),r=n(5059),o=n(61577),a=n(85738),s=(0,r.forwardRef)((function(e,t){var n=e.title,r=e.icon,s=e.role,u=void 0===s?"menuitem":s,c=e.meta,l=e.subtitle,d=e.isDisabled,h=void 0!==d&&d,f=e.className,p=void 0===f?void 0:f,m=e.tabIndex,g=void 0===m?0:m,v=e.onClick;return(0,i.jsxs)(o.n,{ref:t,role:u,className:(0,a.W)("btn-icon",p,h&&"is-disabled"),tabIndex:g,onClick:v,children:["string"==typeof r?(0,i.jsx)("span",{className:(0,a.W)("pri",r),"aria-hidden":"true"}):r,(0,i.jsx)("span",{className:"title",children:n}),l&&(0,i.jsx)("span",{className:"text-secondary",children:l}),c&&(0,i.jsx)("span",{className:"meta",children:c})]})}))},64492:function(e,t,n){"use strict";n.d(t,{_:function(){return a}});var i=n(31555),r=n(5059),o=n(76700),a=(0,r.forwardRef)((function(e,t){var n=(0,o.N)(t),a=e.onKeyDown;return(0,r.useLayoutEffect)((function(){var e=function(e){e.preventDefault()},t=function(e){e.preventDefault()},i=n.current;return null==i||i.addEventListener("touchmove",e),null==i||i.addEventListener("wheel",t),a&&(null==i||i.addEventListener("keydown",a)),function(){null==i||i.removeEventListener("touchmove",e),null==i||i.removeEventListener("wheel",t),a&&(null==i||i.removeEventListener("keydown",a))}}),[n,a]),(0,i.jsx)("div",{ref:n,className:e.className,style:e.style,role:e.role,onTouchMove:e.onTouchMove,onClick:e.onClick,children:e.children})}));a.displayName="NoScrollDiv"},13984:function(e,t,n){"use strict";n.d(t,{a:function(){return a}});var i=n(31555),r=n(5059),o=n(85738),a=function(e){var t=e.onChange,n=(0,r.useState)(!1),a=n[0],s=n[1],u=(0,r.useId)(),c=(0,r.useCallback)((function(){return s(!0)}),[s]),l=(0,r.useCallback)((function(){return s(!1)}),[s]),d=(0,r.useCallback)((function(n){e.disabled||t(n.currentTarget.checked)}),[e.disabled,t]),h=(0,o.W)("radio",e.checked&&"checked",e.disabled&&"dis",e.className,a&&"focus");return(0,i.jsxs)("label",{className:h,children:[(0,i.jsxs)("span",{id:u,className:"title",children:[e.title,!!e.count&&(0,i.jsx)("span",{className:"count",children:e.count})]}),(0,i.jsx)("input",{type:"radio",name:e.groupName,checked:e.checked,"aria-labelledby":u,"aria-checked":e.checked,tabIndex:e.checked?0:-1,onChange:d,onFocus:c,onBlur:l})]})}},93230:function(e,t,n){"use strict";n.d(t,{M:function(){return o}});var i=n(31555),r=n(99558),o=function(){return(0,i.jsx)("div",{id:"Panel_loadingScreenLabel","data-testid":"loadingScreen",className:"alert alert-wait",children:(0,i.jsx)("div",{className:"alert-body",children:(0,i.jsx)("div",{className:"ab-content overthrow",children:(0,i.jsx)(r.y,{type:"large"})})})})}},57324:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});var i=(0,n(5059).createContext)({isScrollEnabled:!1,scrollY:null})},99558:function(e,t,n){"use strict";n.d(t,{y:function(){return o}});var i=n(31555),r=n(22496);function o(e){var t=(0,r.f)().localizedString,n="pr-spinner ".concat("small"===e.type?"pr-spinner-s":"pr-spinner-l");return(0,i.jsx)("div",{className:n,children:(0,i.jsxs)("div",{className:"spinner",role:"status","aria-live":"polite","aria-label":t("Loading.Text","Loading..."),children:[(0,i.jsx)("div",{className:"spinner-line line1"}),(0,i.jsx)("div",{className:"spinner-line line2"}),(0,i.jsx)("div",{className:"spinner-line line3"}),(0,i.jsx)("div",{className:"spinner-line line4"}),(0,i.jsx)("div",{className:"spinner-line line5"}),(0,i.jsx)("div",{className:"spinner-line line6"}),(0,i.jsx)("div",{className:"spinner-line line7"}),(0,i.jsx)("div",{className:"spinner-line line8"}),(0,i.jsx)("div",{className:"spinner-line line9"}),(0,i.jsx)("div",{className:"spinner-line line10"}),(0,i.jsx)("div",{className:"spinner-line line11"})]})})}},1052:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});var i={},r={dialogs:i,register:function(e,t){if(i[e])throw new Error('Dialog "'.concat(e,'" was already registered.'));i[e]=t},unregister:function(e){i[e]&&delete i[e]}}},59038:function(e,t,n){"use strict";n.d(t,{a:function(){return c},j:function(){return u}});var i=n(31555),r=n(5059),o=n(97598),a=n(64492),s=n(19869),u=(0,r.createContext)(null),c=(0,r.memo)((0,r.forwardRef)((function(e,t){var n=e.controlledByRef,c=(0,r.useRef)(null),l=(0,r.useRef)(null),d=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(function(){return{getBodyEl:function(){return c.current}}}),[c]);var h=(0,r.useState)(null),f=h[0],p=h[1],m=(0,r.useCallback)((function(){var e=(0,s.GY)(n,d,l);if(e){var t=n.current.getBoundingClientRect();e.y=t.height}p(e)}),[n,d,l]);(0,r.useEffect)((function(){if(!e.opened)return p(null),void(0,o.enableBodyScroll)(c.current);m()}),[e.opened,m,p,c]);var g=(0,r.useMemo)((function(){return{reposition:m}}),[m]);(0,r.useLayoutEffect)((function(){var e=n.current,t=function(){e.blur()},i=c.current;return(0,o.disableBodyScroll)(i),i.addEventListener("touchmove",t),function(){i.removeEventListener("touchmove",t),(0,o.enableBodyScroll)(i)}}),[c,n,e.opened]);var v=e.opened&&!!f,y={maxHeight:null==f?void 0:f.maxHeight};return(0,i.jsxs)(u.Provider,{value:g,children:[e.opened&&(0,i.jsx)(a._,{ref:l,style:{visibility:v?"visible":"hidden"},className:"dialog-tint combobox-tint",onClick:e.onTintClick}),(0,i.jsx)("div",{ref:d,className:"dropmenu combobox-body-wrapper",children:(0,i.jsx)("div",{ref:c,className:"dropmenu-body combobox-body",style:y,children:(0,i.jsx)("div",{className:"combobox-list-wrapper",children:e.children})})})]})})));c.displayName="FormComboBoxListBody"},83421:function(e,t,n){"use strict";n.d(t,{L:function(){return g},_:function(){return v}});var i=n(31555),r=n(5059),o=n(11718),a=n(22496),s=n(31728),u=n(61577),c=n(6666),l=n(69851),d=n(45235),h=n(85738),f=n(9774),p=n(59038),m=n(19869),g=(0,r.createContext)(null),v=(0,r.forwardRef)((function(e,t){var n=e.value,v=e.autoFocus,y=e.hasCancelButton,_=e.disabled,b=e.opened,w=e.options,C=e.hasAdvancedSearchSwitch,A=e.allowUnfocus,I=void 0!==A&&A,S=e.onChange,P=e.onSubmit,x=e.onClose,T=e.onReset,k=e.onAdvancedSearch,E=e.onFocus,M=e.onClick,D=(0,a.f)().localizedString,N=(0,r.useId)(),L=(0,r.useId)(),V=(0,r.useState)(v),R=V[0],H=V[1],F=(0,r.useMemo)((function(){return{clickOutsideDeactivates:!0,initialFocus:!1,activate:R,pause:I}}),[I,R]),B=(0,o.r)(F),z=(0,r.useRef)(null),O=(0,r.useRef)(null),j=(0,r.useRef)(null),U=(0,r.useRef)(null),W=(0,r.useState)(null),Y=W[0],X=W[1],q=(0,r.useState)(n),G=q[0],K=q[1];(0,r.useEffect)((function(){H(b&&!_),K(n)}),[b,_,n]),(0,r.useImperativeHandle)(t,(function(){return{focus:function(){O.current.focus()},blur:function(){O.current.blur()}}}),[O]);var J=(0,r.useContext)(s.w),Q=(0,r.useCallback)((function(){H(!1),X(null),null==x||x()}),[X,x]),Z=(0,r.useCallback)((function(e){""!==n&&(null==P||P(n),Q()),(0,c.T)(e.nativeEvent)}),[P,Q,n]),$=(0,r.useCallback)((function(e){if("Tab"!==e.key){var t=(0,m.FE)(j.current),n=(0,m.oO)(t),i=t.indexOf(n);switch(e.key){case"Escape":return Q(),(0,c.T)(e.nativeEvent);case"Enter":var r=(0,m.QA)(B.current),o=(0,m.SM)(r);return"BUTTON"===(null==o?void 0:o.tagName)?o.click():n&&n.click(),(0,c.T)(e.nativeEvent);case"ArrowUp":--i<0&&(i=t.length-1);break;case"ArrowDown":++i>=t.length&&(i=0);break;case"Home":case"PageUp":i=0;break;case"End":case"PageDown":i=t.length-1;break;default:if(!(0,d.aE)(e.key))return;i=-1}if(J.startKeyboardInteraction(),t[i]||(i=-1),-1!==i)return t[i].focus(),X(t[i].id),(0,l.$v)(z.current.getBodyEl(),t[i]),(0,c.T)(e.nativeEvent);O.current.focus(),X(null)}}),[B,O,j,z,J,Q,X]),ee=(0,r.useCallback)((function(e){K(e),S(e,b)}),[S,b,K]),te=(0,r.useCallback)((function(){T&&T(),ee("")}),[ee,T]),ne=(0,r.useMemo)((function(){return{selectedItemId:Y,close:Q}}),[Q,Y]),ie=(0,r.useMemo)((function(){return w||{hasProminentReset:!1}}),[w]);return(0,i.jsx)(g.Provider,{value:ne,children:(0,i.jsxs)("div",{ref:B,className:(0,h.W)("combobox-wrapper",b&&"combobox-opened"),onKeyDown:$,children:[(0,i.jsx)("div",{className:"combobox",role:"combobox","aria-haspopup":"listbox","aria-owns":L,"aria-expanded":b,"aria-controls":L,children:(0,i.jsx)("div",{className:"ui-search has-searchbtn",ref:U,children:(0,i.jsx)("div",{role:"search","aria-label":D("Site.Search.Header.Aria"),children:(0,i.jsxs)("div",{className:"search-container",children:[(0,i.jsx)(f.N,{id:N,ref:O,type:"search",value:G,"aria-label":D("Search.Description.Label"),"aria-autocomplete":"list","aria-controls":L,"aria-activedescendant":Y,placeholder:D("Buttons.Search.Text"),onChange:function(e,t){return ee(t)},onSubmit:Z,onAdvancedSearch:k,hasAdvanced:C,onReset:te,onFocus:E,onClick:M,autoFocus:v,hasReset:ie.hasReset,hasProminentReset:ie.hasProminentReset,disabled:_}),(0,i.jsxs)(u.n,{type:"submit",className:"btn btn-action btn-search",tabIndex:0,onClick:Z,children:[(0,i.jsx)("span",{className:"pri pri-search","aria-hidden":"true"}),(0,i.jsx)("span",{className:"title",children:D("Buttons.Search.Text")})]}),y&&(0,i.jsxs)(u.n,{type:"submit",className:"btn btn-cancel",tabIndex:0,onClick:Q,children:[(0,i.jsx)("span",{className:"pri pri-close","aria-hidden":"true"}),(0,i.jsx)("span",{className:"title",children:D("Buttons.Cancel")})]})]})})})}),(0,i.jsx)(p.a,{ref:z,controlledByRef:U,opened:b,onTintClick:Q,children:b&&(0,i.jsx)("ul",{id:L,ref:j,role:"listbox",className:"combobox-list","aria-labelledby":"",children:e.children})})]})})}));v.displayName="FormComboBox"},19869:function(e,t,n){"use strict";n.d(t,{FE:function(){return a},GY:function(){return o},QA:function(){return u},SM:function(){return c},oO:function(){return s}});var i=n(2111),r=-20;function o(e,t,n){if(!e.current||!t.current||!n.current)return null;var o,a,s=e.current.getBoundingClientRect(),u=t.current.getBoundingClientRect(),c=n.current.getBoundingClientRect(),l={top:c.top,left:c.left,width:c.width,height:c.height};l=(0,i.fT)(l,r);var d=s.width,h=null,f=l.height-s.bottom;if(u.height>f){var p=s.top-l.top;u.height>p?f>p?(a=s.bottom,h=f):(a=s.top-p,h=p):a=s.top-u.height}else a=s.bottom,h=f;return(o=s.left+s.width/2-d/2)+d>l.left+l.width&&(o=s.left),o+d>l.left+l.width&&(o=s.right-d),{x:o,y:a,width:d,maxHeight:h}}function a(e){if(!e)return[];var t=Array.from(e.getElementsByTagName("a"));return t.filter((function(e){var t;return"option"===(null===(t=e.attributes.getNamedItem("role"))||void 0===t?void 0:t.value)})).filter((function(e){return"none"!==window.getComputedStyle(e.parentElement).display}))}function s(e){return e.find((function(e){return document.activeElement===e}))}function u(e){return e?Array.from(e.querySelectorAll('[tabindex="0"]')):[]}function c(e){return e.find((function(e){return document.activeElement===e}))}},75517:function(e,t,n){"use strict";n.d(t,{a:function(){return h}});var i=n(31555),r=n(5059),o=n(27797),a=n(88960),s=n(76542),u="_empty_option_id_",c=window.navigator.userAgent.indexOf("Windows")>=0;function l(e,t,n){var i,r,o,a,u,c=["form-control"];return(null===(i=e.config)||void 0===i?void 0:i.labelType)===s.h.Outer?c.push("has-formlabel"):(null===(r=e.config)||void 0===r?void 0:r.labelType)===s.h.Inner?c.push("has-inputlabel"):(null===(o=e.config)||void 0===o?void 0:o.labelType)===s.h.InnerLeft&&c.push("has-prefixinputlabel"),(null===(a=e.config)||void 0===a?void 0:a.validationLabelType)===s.q.Inner?c.push("has-innervalidation"):(null===(u=e.config)||void 0===u?void 0:u.validationLabelType)===s.q.Outer&&c.push("has-outervalidation"),e.required&&c.push("is-required"),!t&&n&&c.push("is-error"),e.disabled&&c.push("is-disabled"),c.join(" ")}function d(e,t){var n=["form-input-control","selectbox"];return t&&n.push("focus"),e.selected&&n.push("has-value"),e.className&&n.push(e.className),n.join(" ")}var h=(0,r.memo)((function(e){var t,n,s=e.onChange,h=(0,r.useState)(!0),f=h[0],p=h[1],m=(0,r.useState)(!1),g=m[0],v=m[1],y=(0,r.useState)(!!e.selected),_=y[0],b=y[1],w=(0,r.useMemo)(a.A,[]),C=(0,r.useMemo)(a.A,[]),A=(0,r.useMemo)(a.A,[]),I=(0,r.useRef)(!1),S=(0,r.useCallback)((function(t){if(!e.disabled){var n=t.target.value;n!==e.selected&&(I.current=!0,s(n,t))}}),[e.disabled,e.selected,s,I]);(0,r.useEffect)((function(){I.current||b(!!e.selected)}),[I,e.selected,b]);var P=(0,r.useCallback)((function(){v(!0)}),[v]),x=(0,r.useCallback)((function(){v(!1),b(!0)}),[v]),T=e.options.find((function(t){return t.id===e.selected})),k=!!(null===(t=e.config)||void 0===t?void 0:t.validationWithFieldLabel);return(0,i.jsxs)("div",{className:l(e,f,_),children:[e.label&&(0,i.jsx)("label",{className:"form-label",htmlFor:w,"aria-hidden":!0,children:e.label}),(0,i.jsx)("div",{className:"form-input",children:(0,i.jsxs)("div",{className:d(e,g),children:[(0,i.jsxs)("select",{"aria-required":e.required,"aria-invalid":_&&!f,"aria-labelledby":e.label?C:null,"aria-describedby":A,title:e.title,className:"control-input selectbox-select",id:w,name:e.name,value:null!==(n=null==T?void 0:T.id)&&void 0!==n?n:u,autoComplete:e.autoComplete,required:e.required,disabled:e.disabled,onChange:S,onFocus:P,onBlur:x,children:[!T&&(0,i.jsx)("option",{value:u,disabled:!0,hidden:c,"aria-hidden":!0,children:e.emptyOptionLabel}),e.options.map((function(e){return(0,i.jsx)("option",{value:e.id,children:e.label},e.id)}))]}),(0,i.jsx)("span",{className:"select ".concat(T?"value":"placeholder"),"aria-hidden":!0,children:T?T.label:e.emptyOptionLabel}),e.label&&(0,i.jsx)("span",{id:C,className:"input-label",children:(0,i.jsx)("span",{className:"label-title",children:e.label})}),e.validators&&(0,i.jsx)("div",{className:"form-message",children:(0,i.jsx)("div",{id:A,className:"form-validation-error",role:"alert",children:(0,i.jsx)(o.D,{className:"validation-text",fieldLabel:k?e.label:null,validators:e.validators,value:e.selected,isInputDirty:_,onChange:p})})})]})})]})}));h.displayName="FormDropdown"},9774:function(e,t,n){"use strict";n.d(t,{N:function(){return c}});var i=n(31555),r=n(5059),o=n(13384),a=n(27797),s=n(85738),u=n(76542),c=(0,r.forwardRef)((function(e,t){var n,c,l,d,h,f,p,m=(0,r.useState)(!0),g=m[0],v=m[1],y=(0,r.useState)(!1),_=y[0],b=y[1],w=(0,r.useState)(!!e.value),C=w[0],A=w[1],I=(0,r.useId)(),S=e.id||I,P=(0,r.useId)(),x=(0,r.useId)(),T=(0,r.useRef)(!1),k=(0,r.useRef)(null),E=e.onChange,M=e.onFocus,D=e.onBlur,N=e.onSubmit,L=e.onKeyDown,V=e.onReset,R=(0,r.useCallback)((function(t){if(!e.disabled){var n=t.target.value;n!==e.value&&(T.current=!0,E(t,n))}}),[e.disabled,e.value,E,T]);(0,r.useEffect)((function(){T.current||A(!!e.value)}),[T,e.value,A]);var H=(0,r.useCallback)((function(){b(!0),null==M||M()}),[b,M]),F=(0,r.useCallback)((function(){return window.setTimeout((function(){document.activeElement!==k.current&&(b(!1),A(!0),null==D||D())}),1)}),[b,D]),B=(0,r.useCallback)((function(t){e.disabled||("Enter"===t.code?(b(!1),A(!0),null==N||N(t)):null==L||L(t))}),[e.disabled,N,A,L]),z=(0,r.useCallback)((function(){var t;e.disabled||(null==V||V(),null===(t=document.getElementById(S))||void 0===t||t.focus())}),[e.disabled,V,S]),O=!!(null===(n=e.config)||void 0===n?void 0:n.validationWithFieldLabel),j=e.placeholder||null;(null===(c=e.config)||void 0===c?void 0:c.labelType)===u.h.Inner&&(j=null);var U=e.disabled?(0,o.p3)("Menu.Search.BasicSearch"):(0,o.p3)("Menu.Search.AdvancedSearch");return(0,i.jsxs)("div",{className:(0,s.W)("form-control",(null===(l=e.config)||void 0===l?void 0:l.labelType)===u.h.Outer&&"has-formlabel",(null===(d=e.config)||void 0===d?void 0:d.labelType)===u.h.Inner&&"has-inputlabel",(null===(h=e.config)||void 0===h?void 0:h.labelType)===u.h.InnerLeft&&"has-prefixinputlabel",(null===(f=e.config)||void 0===f?void 0:f.validationLabelType)===u.q.Inner&&"has-innervalidation",(null===(p=e.config)||void 0===p?void 0:p.validationLabelType)===u.q.Outer&&"has-outervalidation",e.required&&"is-required",!g&&C&&"is-error",e.disabled&&"is-disabled"),children:[e.label&&(0,i.jsx)("label",{className:"form-label",htmlFor:S,children:(0,i.jsx)("span",{className:"label-title",children:e.label})}),(0,i.jsxs)("div",{className:"form-input",children:[(0,i.jsxs)("div",{className:(0,s.W)("form-input-control","textbox",_&&"focus",e.value&&"has-value",e.hasProminentReset?"has-prominent-reset":e.hasReset&&"has-reset",e.isSearch&&"is-search",e.hasAdvanced&&"has-advsearch",e.className),children:[(0,i.jsx)("input",{ref:t,"aria-required":e.required,"aria-invalid":C&&!g,"aria-labelledby":e.label?P:null,"aria-describedby":e.validators?x:null,type:e.type,className:"control-input textbox-input",id:S,name:e.name,autoCapitalize:"off",autoCorrect:"off",autoComplete:e.autoComplete||"off",spellCheck:!1,value:e.value,placeholder:j,required:e.required,disabled:e.disabled,maxLength:e.maxLength,onChange:R,onFocus:H,onClick:e.onClick,onBlur:F,onKeyDown:B,"aria-autocomplete":e["aria-autocomplete"],"aria-controls":e["aria-controls"],"aria-activedescendant":e["aria-activedescendant"],"aria-label":e["aria-label"],autoFocus:e.autoFocus,tabIndex:0}),e.label&&(0,i.jsx)("span",{id:P,className:"input-label",children:(0,i.jsx)("span",{className:"label-title",children:e.label})}),(e.hasReset||e.hasProminentReset)&&(0,i.jsxs)("button",{ref:k,className:"btn-icon btn-reset",title:(0,o.p3)("Buttons.Reset"),tabIndex:0,onClick:z,children:[(0,i.jsx)("span",{className:"pri pri-reset","aria-hidden":"true"}),(0,i.jsx)("span",{className:"title",children:(0,o.p3)("Buttons.Reset")})]}),e.hasAdvanced&&(0,i.jsxs)("button",{onClick:e.onAdvancedSearch,className:"btn-icon btn-advsearch",title:U,tabIndex:0,children:[(0,i.jsx)("span",{className:"pri pri-filter","aria-hidden":"true"}),(0,i.jsx)("span",{className:"title",children:U})]})]}),e.validators&&(0,i.jsx)("div",{className:"form-message",children:(0,i.jsx)("div",{id:x,className:"form-validation-error",role:"alert",children:(0,i.jsx)(a.D,{className:"validation-text",fieldLabel:O?e.label:null,validators:e.validators,value:e.value,isInputDirty:C,onChange:v})})})]})]})}));c.displayName="FormTextbox"},76542:function(e,t,n){"use strict";var i,r;n.d(t,{h:function(){return i},q:function(){return r}}),function(e){e[e.Outer=0]="Outer",e[e.Inner=1]="Inner",e[e.InnerLeft=2]="InnerLeft"}(i||(i={})),function(e){e[e.Outer=0]="Outer",e[e.Inner=1]="Inner"}(r||(r={}))},54777:function(e,t,n){"use strict";n.d(t,{KB:function(){return c},l8:function(){return u}});var i=n(58932),r=n(84386),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t}(r.e),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t}(r.e),s={};function u(e,t){if(s[e])throw new o('Popup "'.concat(e,'" is already reagistered.'));s[e]=t}function c(e){var t=s[e];if(!t)throw new a('Popup "'.concat(e,'" is not found.'));return t}},19578:function(e,t,n){"use strict";n.d(t,{J:function(){return s}});var i=n(5059),r=n(76700),o=n(8049),a=n(90690),s=(0,i.forwardRef)((function(e,t){var n=e.onMeasure,s=e.children,u=(0,r.N)(t),c=(0,o.Z)(u.current),l=(0,i.useMemo)((function(){return(0,a.t)(s,{ref:u})}),[u,s]);return(0,i.useEffect)((function(){c&&n(c)}),[c,n]),l}));s.displayName="PopupChildMeasurer"},48508:function(e,t,n){"use strict";n.d(t,{f:function(){return g}});var i=n(58932),r=n(31555),o=n(5059),a=n(659),s=n(32874),u=n(8049),c=n(19578),l=n(53537),d=Object.freeze({flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden",minHeight:"100px",height:"auto"}),h=Object.freeze({display:"flex",flexDirection:"column",height:"100%",flex:"1 1 auto",overflow:"hidden"}),f=Object.freeze({flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden",height:"auto"}),p=Object.freeze({flex:"1 1 auto",overflowY:"auto",overflowX:"hidden",height:"100%",boxSizing:"border-box",transition:"height 0.2s ease-in-out"}),m=(0,o.forwardRef)((function(e,t){var n=e.className,a=e.style,s=e.height,u=e.mode,c=e.contentClassName,l=void 0===c?"pop-body-content":c,f="css"===u,p=(0,o.useMemo)((function(){return(0,i.Cl)((0,i.Cl)({height:s},a),f?d:void 0)}),[f,s,a]),m=(0,o.useMemo)((function(){return f?h:void 0}),[f]);return(0,r.jsx)("div",{className:n,style:p,children:(0,r.jsx)("div",{ref:t,className:l,style:m,children:e.children})})}));function g(e){var t=e.children,n=e.footer,d=e.scrollableSegmentClassName,h=void 0===d?"pop-segment-scrollable":d,g=e.childrenDimensions,v=e.contentContainerRefCb,y=(0,i.Tt)(e,["children","footer","scrollableSegmentClassName","childrenDimensions","contentContainerRefCb"]),_=(0,l.WF)(),b=_.maxContentHeight,w=_.mode,C=_.onContentResize,A="css"===w,I=(0,o.useState)(null),S=I[0],P=I[1],x=(0,o.useState)(null),T=x[0],k=x[1],E=(0,o.useState)(),M=E[0],D=E[1],N=(0,o.useState)(!1),L=N[0],V=N[1],R=(0,o.useState)(),H=R[0],F=R[1],B=(0,o.useState)(),z=B[0],O=B[1],j=(0,o.useRef)(null),U=(0,u.Z)(S),W=(0,o.useCallback)((function(){var e,t;if(!A&&b&&U){var n=(null===(e=j.current)||void 0===e?void 0:e.getBoundingClientRect().height)||0,i=(null==g?void 0:g.height)?(null!==(t=null==g?void 0:g.height)&&void 0!==t?t:0)+n:U.height,r=i>b,o=Math.min(b,i),a=o-n;F((0,s.L)(o)),O((0,s.L)(a)),V(r)}}),[A,U,g,b]),Y=(0,o.useMemo)((function(){return A?p:{overflowY:"auto"}}),[A]),X=(0,o.useMemo)((function(){return{style:Y,className:"pop-segment-scrollable-in"}}),[Y]),q=(0,o.useMemo)((function(){return a(t)?t((0,i.Cl)((0,i.Cl)({},X),{bodyHeight:H,scrollable:L})):(0,r.jsx)("div",(0,i.Cl)({},X,{children:(0,o.isValidElement)(t)?(0,o.cloneElement)(t,(0,i.Cl)({},t.props)):t}))}),[t,H,L,X]),G=(0,o.useMemo)((function(){return(0,i.Cl)((0,i.Cl)({},A?void 0:{height:z}),A?f:void 0)}),[z,A]),K=null==M?void 0:M.width,J=(0,o.useMemo)((function(){return T&&K?(0,i.Cl)((0,i.Cl)({},T),{width:K}):T}),[T,K]);(0,o.useLayoutEffect)(W,[W,J]),(0,o.useLayoutEffect)((function(){J&&C(J)}),[J,C]),(0,o.useEffect)((function(){null==v||v(S)}),[S,v]);var Q=(0,r.jsx)("div",{className:h,style:G,children:A?q:(0,r.jsx)(c.J,{onMeasure:k,children:q})}),Z=A?Q:(0,r.jsx)(c.J,{onMeasure:D,children:Q}),$=(0,o.isValidElement)(n)?(0,o.cloneElement)(n,{ref:j}):n;return(0,r.jsxs)(m,(0,i.Cl)({},y,{ref:P,height:H,mode:w,children:[Z,null!=$?$:null]}))}},53537:function(e,t,n){"use strict";n.d(t,{QU:function(){return o},WF:function(){return u},sE:function(){return s}});var i=n(5059),r=n(30212),o=Object.freeze({mode:"js",onContentResize:function(){(0,r.z)(new Error("PopupContainerDynamicSizeContext is not initialized."))}}),a=(0,i.createContext)(o),s=a.Provider,u=function(){return(0,i.useContext)(a)}},25509:function(e,t,n){"use strict";n.d(t,{E:function(){return A}});var i=n(58932),r=n(31555),o=n(5059),a=n(30212),s=n(11718),u=n(85738),c=n(32874),l=n(53537);function d(e){var t=e.totalWidth,n=e.totalHeight,i=e.windowHeight,r=e.windowWidth;return{top:Math.max((i-n)/2,0),left:Math.max((r-t)/2,0)}}var h=function(e){return parseInt(e,10)||0},f=n(8049),p=n(90690);function m(e){var t=e.coordinateValue,n=e.coordinatePlusTotalSize-e.windowSize;return n>0?Math.max((0,c.L)(t-n),0):Math.max(t,0)}function g(e){var t=e.coordinate,n=e.marginPx,i=e.windowSize,r=e.totalSize,o=Math.abs(i-r),a=o-t;if(Math.round(t)>=n&&a>=n)return t;var s=Math.min(o/2,n),u=(0,c.L)(t?t-s:s);return u<0?t:u}function v(e){var t=e.currentPosition,n=e.totalHeight,i=e.totalWidth,r=e.windowHeight,o=e.windowWidth,a=e.marginPx,s=void 0===a?0:a,u=t.left,c=t.top;return{top:g({coordinate:m({coordinateValue:c,coordinatePlusTotalSize:c+n,windowSize:r}),marginPx:s,windowSize:r,totalSize:n}),left:g({coordinate:m({coordinateValue:u,coordinatePlusTotalSize:u+i,windowSize:o}),marginPx:s,windowSize:o,totalSize:i})}}function y(e){var t=e.calcCurrentPosition,n=(0,i.Tt)(e,["calcCurrentPosition"]),r=n.initialPosition,o=r.left,a=r.top,s=n.currentPosition,u=s.left,c=s.top;if(u===o&&c===a){var l=t(n);u=l.left,c=l.top}return v((0,i.Cl)((0,i.Cl)({},n),{currentPosition:{left:u,top:c}}))}var _=Object.freeze({center:d,expand:v,centerXExpandY:function(e){var t=e.initialPosition,n=e.currentPosition,i=e.totalHeight,r=e.totalWidth,o=e.windowHeight,a=e.windowWidth,s=e.marginPx;return y({initialPosition:t,currentPosition:n,totalHeight:i,totalWidth:r,windowHeight:o,windowWidth:a,marginPx:void 0===s?0:s,calcCurrentPosition:function(e){var t=e.initialPosition,n=t.left,r=t.top,o=e.totalWidth,a=e.marginPx;return{left:n-o/2,top:r-i-(void 0===a?0:a)}}})},centerXExpandBottom:function(e){var t=e.initialPosition,n=e.currentPosition,i=e.totalHeight,r=e.totalWidth,o=e.windowHeight,a=e.windowWidth,s=e.marginPx;return y({initialPosition:t,currentPosition:n,totalHeight:i,totalWidth:r,windowHeight:o,windowWidth:a,marginPx:void 0===s?0:s,calcCurrentPosition:function(e){var t=e.initialPosition,n=t.left,i=t.top,r=e.totalWidth,o=e.marginPx;return{left:n-r/2,top:i+(void 0===o?0:o)}}})}}),b=Object.freeze({display:"flex",flexDirection:"column",overflow:"hidden",boxSizing:"border-box",maxHeight:"100%"}),w=Object.freeze({display:"flex",flexFlow:"column nowrap",height:"100%",maxHeight:"inherit",overflow:"hidden"}),C=Object.freeze({flex:"0 0 auto"}),A=function(e){var t=e.role,n=void 0===t?"dialog":t,m=e.position,g=e.containerRef,v=e.widthPx,y=e.size,A=void 0===y?"default":y,I=e.marginPx,S=void 0===I?0:I,P=e.positionCalculationStrategy,x=e.className,T=void 0===x?"pop":x,k=e.mode,E=void 0===k?l.QU.mode:k,M=e.onPositionChange,D=(0,o.useState)(null),N=D[0],L=D[1],V=(0,o.useRef)(null),R=(0,o.useRef)(null),H=(0,o.useRef)(null),F=(0,i.Cl)({clickOutsideDeactivates:!1,escapeDeactivates:!1},e.focusTrapOptions),B=(0,s.r)(F),z=(0,o.useMemo)((function(){return function(e){L(e),B.current=e}}),[B]),O=(0,o.useMemo)((function(){return m?{left:m.center.x,top:m.center.y}:void 0}),[m]),j="function"==typeof P?P:P?_[P]:void 0;P&&!j&&(0,a.z)('The strategy "'.concat(P,'" is not supported'));var U=function(e){var t,n,r=e.headerRef,a=e.subheaderRef,s=e.footerRef,u=e.containerElement,f=e.initialPosition,p=e.mode,m=e.marginPx,g=e.strategy,v=void 0===g?d:g,y=e.onPositionChange,_=(0,o.useState)(null!==(t=null==f?void 0:f.left)&&void 0!==t?t:0),b=_[0],w=_[1],C=(0,o.useState)(null!==(n=null==f?void 0:f.top)&&void 0!==n?n:0),A=C[0],I=C[1],S=(0,o.useState)(0),P=S[0],x=S[1],T=(0,o.useState)("css"===p?void 0:0),k=T[0],E=T[1],M=(0,o.useCallback)((function(e){var t,n,i,o,l,d,g;if(u){var y=window.innerWidth,_=window.innerHeight,C=function(e){var t=e.paddingTop,n=e.paddingBottom,i=e.marginTop,r=e.marginBottom,o=e.borderTop,a=e.borderBottom;return Object.values({paddingTop:t,paddingBottom:n,marginTop:i,marginBottom:r,borderTop:o,borderBottom:a}).reduce((function(e,t){return e+h(t)}),0)}(u.style),S=null!==(n=null===(t=null==r?void 0:r.current)||void 0===t?void 0:t.getBoundingClientRect().height)&&void 0!==n?n:0,P=null!==(o=null===(i=null==a?void 0:a.current)||void 0===i?void 0:i.getBoundingClientRect().height)&&void 0!==o?o:0,T=null!==(d=null===(l=null==s?void 0:s.current)||void 0===l?void 0:l.getBoundingClientRect().height)&&void 0!==d?d:0;if("js"===p){var k=_-S-P-T-C;E((0,c.L)(k))}void 0!==(null==e?void 0:e.width)&&x((0,c.L)(e.width));var M=null!==(g=null==e?void 0:e.width)&&void 0!==g?g:u.getBoundingClientRect().width,D=void 0!==(null==e?void 0:e.height)?e.height+S+P+T+C:function(e){var t=e.style,n=t.marginBottom,i=t.marginTop;return e.getBoundingClientRect().height+h(n)+h(i)}(u),N=v({initialPosition:{left:Number(null==f?void 0:f.left),top:Number(null==f?void 0:f.top)},currentPosition:{left:b,top:A},totalWidth:M,totalHeight:D,windowHeight:_,windowWidth:y,marginPx:m}),L=N.left,V=N.top;w(Math.round(L)),I(Math.round(V))}}),[u,r,a,s,v,b,A,f,p,m]),D=(0,o.useMemo)((function(){return(0,i.Cl)((0,i.Cl)({},l.QU),{left:b,top:A,width:P,maxContentHeight:k,mode:p,onContentResize:M})}),[b,A,P,k,M]);return(0,o.useEffect)((function(){var e=function(){return M()};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[M]),(0,o.useLayoutEffect)(M,[M]),(0,o.useEffect)((function(){null==y||y({left:b,top:A})}),[b,A,y]),D}({containerElement:N,headerRef:V,subheaderRef:R,footerRef:H,initialPosition:O,marginPx:S,mode:E,strategy:j,onPositionChange:M}),W=U.left,Y=U.top,X=U.onContentResize,q="css"===E,G=(0,o.useMemo)((function(){return(0,i.Cl)({left:W,top:Y,width:v||void 0},q?b:{})}),[q,W,Y,v]),K=q?w:void 0,J=q?C:void 0,Q=(0,f.Z)(N);return(0,o.useEffect)((function(){null==g||g(N)}),[N,g]),(0,o.useEffect)((function(){var e=document.body.style.overflowY;return document.body.style.overflowY="hidden",function(){document.body.style.overflowY=e}}),[]),(0,o.useEffect)((function(){X(null!=Q?Q:{})}),[Q,X]),(0,r.jsx)(l.sE,{value:U,children:(0,r.jsx)("div",{ref:z,role:n,className:(0,u.W)(T,null!==A&&"pop-".concat(A)),style:G,children:(0,r.jsxs)("section",{ref:B,role:n,"aria-modal":"true","aria-label":e.ariaLabel,style:K,children:[(0,p.t)(e.header,{ref:V,style:J}),(0,p.t)(e.subheader,{ref:R,style:J}),e.children,(0,p.t)(e.footer,{forwardRef:H,style:J})]})})})}},8049:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var i=n(5059),r=n(30212),o=n(19504);function a(e){if(!e)return null;var t=e.getBoundingClientRect();return Object.freeze(t)}function s(e){var t=(0,i.useState)(a(e)),n=t[0],s=t[1],u=(0,o.L)((function(){return globalThis.ResizeObserver?new globalThis.ResizeObserver((function(e){var t=null==e?void 0:e[0].target;t&&s(a(t))})):((0,r.z)("ResizeObserver is not supported"),null)}));return(0,i.useLayoutEffect)((function(){if(e&&u)return u.observe(e),function(){u.unobserve(e)}}),[e,u]),(0,i.useEffect)((function(){return function(){null==u||u.disconnect()}}),[]),n}},90954:function(e,t,n){"use strict";function i(e){return"dialog"===(null==e?void 0:e.type)}function r(e){return"menu"===(null==e?void 0:e.type)}function o(e){return"alert"===(null==e?void 0:e.type)}n.d(t,{MD:function(){return r},nL:function(){return o},rp:function(){return i}})},90690:function(e,t,n){"use strict";n.d(t,{t:function(){return r}});var i=n(5059);function r(e,t){var n,r="function"==typeof e?e():e;return null!==(n=(0,i.isValidElement)(r)?(0,i.cloneElement)(r,t):r)&&void 0!==n?n:null}},83999:function(e,t,n){"use strict";n.d(t,{g:function(){return d},p:function(){return l}});var i=n(31555),r=n(5059),o=n(659),a=n(97556),s=n(70841),u=n(6666),c=n(85738),l=(0,r.createContext)({asMenuItem:!0,tabIndex:-1,hidden:!1}),d=function(e){var t=(0,r.useContext)(l),n=t.asMenuItem,d=t.hidden,h=t.tabIndex,f=null;e.icon&&(f=o(e.icon)?e.icon():(0,i.jsx)("span",{className:e.icon,"aria-hidden":"true"}));var p=[],m=[];n?(p.push("dropmenu-item-wrapper"),m.push("dropmenu-item")):(p.push("ui-nav-item"),m.push("nav-link"));var g=(0,r.useCallback)((function(t){return e.onClick(),(0,u.T)(t.nativeEvent)}),[e.onClick]),v=(0,i.jsxs)(a.o,{role:n?"menuitem":null,onClick:g,href:e.hrefSEO,className:m.join(" "),tabIndex:h,style:{visibility:d?"hidden":void 0},"aria-hidden":d,children:[f,(0,i.jsx)("span",{className:"title",children:e.title})]});return(0,i.jsx)("li",{role:n?"none":void 0,className:(0,c.W)("nav-item",p.join(" "),e.selected?"is-selected":"",d?"nav-item-hidden":"",e.className),children:n?v:(0,i.jsx)(s.P,{tag:e.title,children:v})})}},62713:function(e,t,n){"use strict";n.d(t,{D:function(){return b},a:function(){return _}});var i=n(31555),r=n(5059),o=n(85387),a=n(59423),s=n(74855),u=n(13384),c=n(51425),l=n(70841),d=n(20820),h=n(18752),f=n(54218),p=n(21290),m=n(97556),g=n(78698),v=n(80835),y=function(){var e=(0,o.wA)(),t=(0,o.d4)(g.nw),n=(0,o.d4)(g.ZF);if(-1===n.indexOf(v.Z.Pervasive)||n.length<2)return null;var r=t===v.Z.Pervasive,a=r?n.filter((function(e){return e!==v.Z.Pervasive}))[0]:v.Z.Pervasive,s=r?(0,u.p3)("Menu.SwitchTo.Normal"):(0,u.p3)("Menu.SwitchTo.Pervasive");return r?null:(0,i.jsx)(m.o,{className:"skip-link",onClick:function(){return e((0,g.n1)({newTargetPlatform:a}))},children:s})},_=(0,r.createContext)(null),b=function(e){var t,n,m=(0,o.wA)(),g=e.onHeaderContextChanged,v=(0,r.useId)(),b=(0,s.W)({throttleTime:100,trackWidth:!0,trackHeight:!0,trackTop:!0}),w=b[0],C=b[1],A=(0,r.useState)("none"),I=A[0],S=A[1];(0,r.useEffect)((function(){var e=0,t=function(){var t=Math.round(window.pageYOffset);if(!(Math.abs(t-e)<0)){if(0===t||e<0)return S("none"),void(e=0);S(t<=e?"down":"up"),e=t}};return window.addEventListener("scroll",t),function(){window.removeEventListener("scroll",t)}}),[S]),(0,r.useEffect)((function(){(null==C?void 0:C.height)&&m((0,h.iz)({topbarHeight:C.height}))}),[null==C?void 0:C.height,m]);var P=(0,r.useRef)(null),x=(0,r.useRef)(null),T=(0,r.useRef)(null),k=(0,r.useMemo)((function(){return a((function(){if(w.current&&P.current&&T.current&&x.current){if(!e.align||"none"===e.align)return P.current.style.cssText="flex: 1;",x.current.style.cssText="flex: 1 1 auto;",void(T.current.style.cssText="flex: 1;");var t=w.current.clientWidth;P.current.style.cssText="",x.current.style.cssText="",T.current.style.cssText="";var n=x.current.clientWidth;x.current.style.flex="1",2*T.current.clientWidth+n>t?(P.current.style.cssText="",x.current.style.cssText="flex: 1",T.current.style.cssText=""):(P.current.style.cssText="flex: 1;",x.current.style.cssText="",T.current.style.cssText="flex: 1;")}}),100,{leading:!0,trailing:!0})}),[e.align,w]);(0,r.useLayoutEffect)((function(){k()}),[null==C?void 0:C.width,k]);var E=(0,r.useMemo)((function(){return(null==C?void 0:C.height)&&(null==C?void 0:C.width)?{height:C.height,width:C.width,visible:!0,realign:k}:{height:0,width:0,visible:!1,realign:k}}),[null==C?void 0:C.height,null==C?void 0:C.width,k]);(0,r.useEffect)((function(){null==g||g(E)}),[E,g]);var M=null===(t=e.center)||void 0===t?void 0:t.call(e,null),D=!e.config||e.config.canSkipToMainContent,N=(null===(n=e.config)||void 0===n?void 0:n.skipLinks)||[];return(0,i.jsx)(_.Provider,{value:E,children:(0,i.jsxs)(c.X,{children:[(0,i.jsx)("div",{className:"site-header-v2 site-header-ghost scroll-dir-".concat(I," ").concat(e.className||""),style:{height:null==C?void 0:C.height}}),(0,i.jsxs)("header",{id:v,ref:w,className:"site-header-v2 scroll-dir-".concat(I," ").concat(e.className||""),children:[D&&(0,i.jsx)(l.P,{children:(0,i.jsx)(d.q,{children:(0,u.p3)("MainContentSkipLink")})}),(0,i.jsx)(c.X,{children:N.map((function(e){return(0,i.jsx)(d.q,{tag:e.tag,"aria-label":e.title,children:e.title},e.title)}))}),(0,i.jsx)(y,{}),(0,i.jsxs)("div",{className:"m-topbar ".concat(e.replaceWith?"content-replaced":""),children:[(0,i.jsx)("div",{className:"topbar-content",children:(0,i.jsxs)(f.LN,{onUpdate:k,children:[(0,i.jsx)("div",{ref:P,className:"topbar-controls topbar-left",children:(0,i.jsx)(p.K,{className:"topbar-left-content",trackWidth:!0,children:e.left})}),(0,i.jsx)("div",{ref:x,className:"topbar-center",children:(0,i.jsx)("div",{className:"topbar-center-content",children:M})}),(0,i.jsx)("div",{ref:T,className:"topbar-controls topbar-right",children:(0,i.jsx)("div",{className:"topbar-right-content",children:e.right})})]})}),e.replaceWith&&(0,i.jsx)("div",{className:"topbar-content-replacement",children:e.replaceWith})]}),e.accessory]}),e.outerAccessory]})})}},72944:function(e,t,n){"use strict";n.d(t,{c:function(){return f}});var i=n(31555),r=n(5059),o=n(85387),a=n(89247),s=n(6666),u=n(27602),c=n(65678),l=n(97556),d=n(13384),h=(0,a.DT)(),f=function(){var e=(0,o.wA)(),t=(0,o.d4)(u.Lr).homeViewName,n=t&&t!==c.lP.Landing?"".concat(h).concat(t):"".concat(h),a=(0,r.useCallback)((function(t){return e((0,u.TU)({})),(0,s.T)(t.nativeEvent)}),[e]);return(0,i.jsx)("div",{className:"topbar-logo",children:(0,i.jsx)(l.o,{className:"logo-pressreader","aria-label":(0,d.p3)("Navigation.Logo.Aria"),onClick:a,href:n,children:(0,i.jsx)("span",{children:(0,d.p3)("BrandPublisher")})})})}},42597:function(e,t,n){"use strict";n.d(t,{q:function(){return p}});var i=n(31555),r=n(58932),o=n(5059),a=n(13384),s=n(21290),u=n(83999),c=n(62713),l=n(67760),d=function(e){var t,n=(0,o.useContext)(c.a),d=(0,o.useContext)(s.x),h=(0,o.useState)(e.alwaysCompact),f=h[0],p=h[1],m=(0,o.useRef)(null),g=(0,r.fX)((0,r.fX)([],e.items,!0),e.menuItems||[],!0),v=(0,o.useMemo)((function(){if(!m.current||!(null==d?void 0:d.width))return{visible:e.items.length,total:g.length};var t,n=0,i=0,r=(t=m).current?Array.from(t.current.getElementsByTagName("li")).reduce((function(e,t){return t.classList.contains("ui-nav-item")&&(t.classList.contains("ui-nav-more")?e.navMoreItem=t:e.navItems.push(t)),e}),{navItems:[],navMoreItem:null}):null,o=r.navItems,a=r.navMoreItem.getBoundingClientRect().width;if(1===o.length)return{visible:1,total:o.length};for(var s=0,u=0;u1),{visible:n,total:o.length}}),[null==d?void 0:d.width,e.items,g.length,e.alwaysCompact]),y=(v.visible!==v.total||(null===(t=e.menuItems)||void 0===t?void 0:t.length))&&!f;return(0,o.useEffect)((function(){n.realign()}),[n.realign,v,n]),(0,i.jsx)("nav",{role:"navigation",className:"ui-nav","aria-label":(0,a.p3)("Navigation.Site"),children:(0,i.jsxs)("div",{className:"ui-nav-content ".concat(f?"is-compact":""),children:[f&&(0,i.jsx)("div",{className:"ui-nav-controls-compact",children:(0,i.jsx)(l.t,{type:"menu",label:(0,a.p3)("Buttons.Menu"),children:g})}),(0,i.jsx)("div",{className:"ui-nav-controls",children:(0,i.jsx)("ul",{ref:m,className:"ui-nav-nav",children:g.reduce((function(e,t,n){var r=n=e?{isValid:!0}:{isValid:!1,message:t}}}(e.minLength,e.message))):"equalTo"===e.name?(0,C.A)(e.requiredValue,e.message):"regex"===e.name?(t=e.name+(e.message||"")+e.regex,A[t]||(A[t]=function(e,t){return function(n){return t||(t=""),null==n||""===n.trim()||e.test(n)?{isValid:!0}:{isValid:!1,message:t}}}(e.regex,e.message))):void 0}(e)}));this.validatorsSubject.next(t)}this.valueSubject.next(this.props.value)},t.prototype.canShowMessage=function(){return this.props.showMessageAlways||this.props.isInputDirty},t.contextType=I.L,t}(o.PureComponent)},79416:function(e,t,n){"use strict";function i(e,t){return function(n){return n===e?{isValid:!0}:{isValid:!1,message:t}}}n.d(t,{A:function(){return i}})},52518:function(e,t,n){"use strict";n.d(t,{J:function(){return o},h:function(){return a}});var i=n(58932),r=n(40657);function o(){return(0,i.sH)(this,void 0,void 0,(function(){var e,t,n,o,a,s,u,c,l,d,h,f,p,m;return(0,i.YH)(this,(function(i){switch(i.label){case 0:return[4,(0,r.Jt)("FeedSettings")];case 1:return(e=i.sent())?e.locales||(e.locales=[]):e={locales:[],following:null,sections:null},e.locales.length?[3,5]:[4,(0,r.Jt)("DefaultLocales")];case 2:return(null==(t=i.sent())?void 0:t.length)?[3,4]:[4,(0,r.zm)()];case 3:(null==(t=i.sent())?void 0:t.length)||(t=["en-US"]),i.label=4;case 4:for(n=0,o=t;n=i.u[0]&&e<=i.u[9]||e>=i.u.num0&&e<=i.u.num9},a=function(e){return e>64&&e<91||e>96&&e<123},s=function(e){return e<=i.u.delete&&e!==i.u.space},u=function(e,t){return t&&[i.u.a,i.u.x,i.u.c,i.u.v].indexOf(e)>=0},c=function(e){return e>=i.u.f1&&e<=i.u.f12};function l(e,t){return e===i.u.delete?r.e.Delete:e===i.u.backspace?r.e.Backspace:e===i.u.x&&t?r.e.Cut:e===i.u.v&&t?r.e.Paste:o(e)?r.e.Type:r.e.None}},22702:function(e,t,n){"use strict";var i;n.d(t,{e:function(){return i}}),function(e){e[e.None=0]="None",e[e.Delete=1]="Delete",e[e.Backspace=2]="Backspace",e[e.Cut=3]="Cut",e[e.Paste=4]="Paste",e[e.Type=5]="Type"}(i||(i={}))},43150:function(e,t,n){"use strict";n.d(t,{u:function(){return i}});var i={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pause:19,capsLock:20,esc:27,space:32,pgUp:33,pgDown:34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,semicolonFirefox:59,equalsFirefox:61,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,context:93,num0:96,num1:97,num2:98,num3:99,num4:100,num5:101,num6:102,num7:103,num8:104,num9:105,numMultiply:106,numPlus:107,numMinus:109,numPeriod:110,numDivision:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,minus:173,semicolon:186,equals:187,dash:189,":":188,".":190,"/":191,"`":192,openSquareBracket:219,"\\":220,closeSquareBracket:221,singleQuote:222,win:224}},86854:function(e,t,n){"use strict";n.d(t,{Y:function(){return i}});var i=Object.keys},12651:function(e,t,n){"use strict";n.d(t,{r:function(){return r}});var i=["ar","arc","dv","far","ha","he","khw","ks","ku","ps","ur","yi"];function r(e){return i.indexOf(e)>=0}},35765:function(e,t,n){"use strict";n.d(t,{R:function(){return o}});var i=n(58932),r={};function o(e,t){try{(null==e?void 0:e.startsWith("//"))&&(e="".concat(document.location.protocol).concat(e)),new URL(e)}catch(e){return Promise.reject(e)}var n=(0,i.Cl)({async:!0},t);return r[e]||(r[e]=new Promise((function(t,i){var r=document.createElement("script");r.onload=function(){return t(r)},r.onerror=function(t){return i(new URIError("The script ".concat(e," didn't load correctly. ").concat(t)))},Object.keys(n).forEach((function(e){r[e]=n[e]})),document.body.appendChild(r),r.src=e}))),r[e]}},9045:function(e,t,n){"use strict";n.d(t,{De:function(){return u},tw:function(){return c}});var i=n(58932),r=n(41e3),o={object:{},name:"",caseSensitive:!1},a=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},s=function(e){return(0,i.Cl)({},e)};function u(e){var t=e.object,n=function(e){var t=(0,i.Cl)((0,i.Cl)({},o),e),n=t.object,r=t.name,u=t.caseSensitive;if(a(n)&&r)return Object.keys(s(n)).find(u?function(e){return e===r}:function(e){return e.toLocaleLowerCase()===r.toLocaleLowerCase()})}({object:t,name:e.name,caseSensitive:e.caseSensitive});return n?s(t)[n]:void 0}function c(e){var t=r(e);if(!a(t))return t;var n=s(t);return Object.keys(n).forEach((function(e){"function"==typeof n[e]?delete n[e]:a(n[e])&&(n[e]=c(n[e]))})),n}},68565:function(e,t,n){"use strict";n.d(t,{Q:function(){return r},l:function(){return o}});var i=480;function r(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight}}function o(){var e=r();return e.width=v&&e<=y}function b(e){return!Number.isNaN(e)&&!_(e)}function w(e){return 1===e.length&&!!e.match(/\S/)}function C(e,t){return e.substring(0,t)+e.substring(t+1)}function A(e,t,n){if(t>n){var i=t;t=n,n=i}return e.substring(0,t)+e.substring(n+1)}function I(e){return e?e.replace(/\u00AD/g,""):e}function S(e){void 0===e&&(e="");for(var t="",n=0,i=e.split(" ");ns?h(Math.min(i,t)):(e(),r=Date.now(),h(t))}})).unsubscribe;return{dispose:function(){l&&clearTimeout(l),f()}}}},41233:function(e,t,n){"use strict";n.d(t,{u:function(){return f}});var i=n(31555),r=n(85387),o=n(18752),a=n(58932),s=n(5059),u=n(48473),c=n(41349),l=n(28809),d=n(23131),h=n(89247),f=function(e){var t,n,f,p,m,g;t=(0,r.d4)(l._t),n=t(d.oo,!1),f=t(d.dN,[]),p=t(d.zk,"").split(","),m=t(d.HA,""),g=new RegExp(m),(0,s.useEffect)((function(){if(n){var e=(0,h.Ti)().split(h.qt).filter((function(e){return""!==e}));if(e.length>0){var t=e[0].toLowerCase();f.find((function(e){return e.id===t}))&&e.shift()}if(!(e.length>0&&m&&g.test(e.join("/")))){var i=e.length>0?e[0]:"/";if(!(p.indexOf(i)<0))return f.forEach((function(t){var n;if((null===(n=t.hrefLangs)||void 0===n?void 0:n.length)>0){var i=(0,a.fX)([],(0,a.zs)(e),!1);t.slug&&i.unshift(t.slug);var r="".concat(window.location.origin).concat((0,h.DT)()).concat(i.join(h.qt));t.hrefLangs.forEach((function(e){var t=document.createElement("link");t.rel="alternate",t.href=r,t.hreflang=e,document.head.appendChild(t)}))}})),function(){var e=document.head.getElementsByTagName("link");c(u(e,(function(e){return"alternate"===e.rel})),(function(e){return document.head.removeChild(e)}))}}}}),[f,n,p]);var v=(0,r.d4)(o.ff).availHeight,y=["app-panel-content-container","container-".concat(e.viewName)];return e.subviewName&&y.push("subview-".concat(e.viewName,"-").concat(e.subviewName)),e.className&&y.push(e.className),(0,i.jsx)("div",{className:y.join(" "),style:{minHeight:v},children:e.children})}},54688:function(e,t,n){"use strict";n.d(t,{G:function(){return f}});var i=n(58932),r=n(85387),o=n(77394),a=n(78698),s=n(27602),u=n(61445),c=n(18752),l=n(75069),d=n(73663),h=["root-panel","root-panel-mobile"];function f(e){void 0===e&&(e=[]);var t=(0,r.d4)(d.oA),n=(0,r.d4)(d.LA),f=(0,r.d4)(a.X6),p=(0,r.d4)(u.N$),m=(0,r.d4)(a.nw),g=(0,r.d4)(c.LU),v=(0,r.d4)(a.uF),y=(0,r.d4)(s.zq),_=(0,r.d4)(d.Bo),b=o((0,i.fX)((0,i.fX)((0,i.fX)((0,i.fX)([],(0,i.zs)(h),!1),(0,i.zs)(e),!1),(0,i.zs)(_),!1),[(0,l.jG)(m)],!1));return t&&b.push(t),n&&b.push("scale".concat(n)),y&&b.push("view-".concat(y)),b.push("device-".concat(g)),"phone"!==g&&"tablet"!==g||b.push("device-mobile"),v&&b.push("facelift-on"),f&&b.push("app-".concat(f)),p&&b.push("mode-embedded"),b.join(" ")}},68819:function(e,t,n){"use strict";n.d(t,{i:function(){return I}});var i,r=n(31555),o=n(5059),a=n(85387),s=n(10358),u=n(78698),c=n(43566);!function(e){e.SignIn="signin",e.SignInEmail="signin-email",e.SignInLibrary="signin-library",e.SignUpEmail="signup-email",e.EmailVerification="email-confirmation",e.ForgotPwd="forgot-pwd"}(i||(i={}));var l=n(27602),d=n(65678),h=n(64404),f=n(22496),p=n(61445),m=n(80835),g=n(61577),v=n(59565),y=n(62713),_=n(26906),b=n(42906),w=n(74637),C=n(89486),A=function(){var e=(0,a.wA)(),t=(0,f.f)().localizedString,n=(0,a.d4)(c.mB),i=(0,a.d4)(u.nw),o=(0,a.d4)(u.uF),h=(0,a.d4)(b.c),p=i===m.Z.Pervasive;return(0,r.jsxs)(r.Fragment,{children:[!p&&(0,r.jsxs)(r.Fragment,{children:[!o&&(0,r.jsx)(w.k,{icon:"pri pri-compose",text:t("ToolbarTop.NewPost"),onClick:function(){return e((0,l.Ng)({viewName:d.lP.Post}))}}),!o&&(0,r.jsx)(w.k,{icon:function(){return(0,r.jsx)(C.a,{user:n,size:s.eV.medium})},text:t("Menu.Account.MyProfile"),onClick:function(){return e((0,l.Ng)({viewName:d.lP.Profile,params:{profileId:n.id}}))}}),(0,r.jsx)(w.k,{icon:"pri pri-account",text:t(o?"NavigationBar.Account":"Menu.Account.MyAccount"),onClick:function(){return e((0,l.Ng)({viewName:d.lP.Account,params:{anchor:"account"}}))}}),o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.k,{icon:"pri pri-bookmarks",text:t("Tab.Item.Bookmarks"),onClick:function(){return e((0,l.Ng)({viewName:d.lP.Bookmarks,params:{profileId:n.id}}))}}),(0,r.jsx)(w.k,{icon:"pri pri-publications",text:t("v7.Client.Catalog.mypublications"),onClick:function(){return e((0,l.Ng)({viewName:d.lP.StoreHub,params:{catalogView:d.$r.Catalog,filter0:_.b7.Favorites}}))}}),h.enabled&&(0,r.jsx)(w.k,{icon:"pri pri-books",text:t("v7.Client.Catalog.mybooks"),onClick:function(){return e((0,l.Ng)({viewName:d.lP.StoreHub,params:{catalogView:d.$r.Books,filter0:_.b7.BooksMyBooks}}))}})]})]}),(0,r.jsx)(w.k,{icon:"pri pri-logout",text:t("Sidebar.LogOut"),onClick:function(){return e((0,c.Op)())}})]})},I=function(){var e=(0,a.wA)(),t=(0,f.f)().localizedString,n=(0,o.useContext)(y.a),_=(0,a.d4)(c.mB),b=(0,a.d4)(u.nw),w=(0,a.d4)(p.N$);return(0,h.C)((function(){n.realign()}),[n.realign,_.isAuthenticated,b]),b===m.Z.Voyager||w?null:_.isAuthenticated?(0,r.jsx)(v.t,{className:"btn-account",button:(0,r.jsxs)(g.n,{className:"btn btn-dropdown","data-testid":"myProfileButton","aria-label":t("Header.Menu.User"),children:[(0,r.jsx)(C.a,{user:_,size:s.eV.normal}),(0,r.jsx)("span",{className:"btn-title",children:t("Header.Menu.User")})]}),children:(0,r.jsx)(A,{})}):b===m.Z.Pervasive?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g.n,{"data-testid":"loginButton",className:"btn btn-login ".concat(w?"is-disabled":""),onClick:w?void 0:function(){return e((0,l.Ng)({viewName:d.lP.Auth,params:{subview:i.SignIn}}))},children:(0,r.jsx)("span",{className:"btn-title",children:t("Buttons.Login.Text")})}),(0,r.jsx)(g.n,{className:"btn btn-signup ".concat(w?"is-disabled":""),onClick:w?void 0:function(){return e((0,l.Ng)({viewName:d.lP.Auth,params:{subview:i.SignUpEmail}}))},children:(0,r.jsx)("span",{className:"btn-title",children:t("Buttons.SignUp")})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g.n,{"data-testid":"loginButton",className:"btn btn-login ".concat(w?"is-disabled":""),onClick:w?void 0:function(){return e((0,c.IZ)({}))},children:(0,r.jsx)("span",{className:"btn-title",children:t("Buttons.Login.Text")})}),(0,r.jsx)(g.n,{className:"btn btn-signup ".concat(w?"is-disabled":""),onClick:w?void 0:function(){return e((0,c.IZ)({startWith:{signUp:!0}}))},children:(0,r.jsx)("span",{className:"btn-title",children:t("Buttons.SignUp")})})]})}},86353:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});var i=n(31555),r=n(85387),o=n(27602),a=n(22496),s=n(61577),u=function(){var e=(0,r.wA)(),t=(0,a.f)().localizedString;return(0,i.jsxs)(s.n,{className:"btn-icon btn-back",title:t("Buttons.Back.Text"),onClick:function(){return e((0,o.Lm)())},children:[(0,i.jsx)("span",{className:"pri pri-back","aria-hidden":"true"}),(0,i.jsx)("span",{className:"btn-title",children:t("Buttons.Back.Text")})]})}},86718:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var i=n(31555),r=n(85387),o=n(22496),a=n(61577),s=n(59565),u=n(73663),c=function(e){var t=(0,r.wA)(),n=(0,o.f)().localizedString;return e.children?(0,i.jsx)(s.t,{className:"btn-options",button:(0,i.jsxs)(a.n,{className:"btn-icon",children:[(0,i.jsx)("span",{className:"pri pri-action","aria-hidden":"true"}),(0,i.jsx)("span",{className:"btn-title",children:n("Buttons.Options")})]}),children:e.children}):(0,i.jsxs)(a.n,{className:"btn-icon btn-options",onClick:function(e,n){return t((0,u.de)({center:n.center}))},children:[(0,i.jsx)("span",{className:"pri pri-action","aria-hidden":"true"}),(0,i.jsx)("span",{className:"btn-title",children:n("Buttons.Options")})]})}},34788:function(e,t,n){"use strict";n.d(t,{u:function(){return re}});var i,r=n(58932),o=n(31555),a=n(5059),s=n(85387),u=n(78698),c=n(80835),l=n(18752),d=n(72944),h=n(62713),f=n(27602),p=n(65678),m=n(64404),g=n(22496),v=n(61445),y=n(97556),_=n(59565),b=n(74637),w=n(11677);!function(e){e.Billing="billing",e.Success="success",e.Receipt="receipt"}(i||(i={}));var C,A=function(){var e=(0,s.wA)(),t=(0,g.f)().localizedString,n=(0,a.useContext)(h.a),r=(0,s.d4)(l.L9),c=(0,s.d4)(u.q3),d=(0,s.d4)(v.FE),C=r>w.a.Medium;if((0,m.C)((function(){n.realign()}),[n.realign,C,c]),d||!c)return null;var A=C?(0,o.jsx)(y.o,{className:"toolbar-button-text toolbar-button-giftcard",children:(0,o.jsx)("span",{children:(0,o.jsx)("span",{className:"btn-title",children:t("ToolbarTop.GiftCards")})})}):(0,o.jsx)(y.o,{className:"toolbar-button-text toolbar-button-giftcard",children:(0,o.jsx)("span",{children:(0,o.jsx)("span",{className:"pri pri-gift","aria-hidden":"true"})})});return(0,o.jsxs)(_.t,{className:"btn-giftcards",button:A,children:[(0,o.jsx)(b.k,{text:t("ToolbarTop.BuyGiftCard"),icon:"pri pri-gift",onClick:function(){return e((0,f.Ng)({viewName:p.lP.GiftCard,params:{subview:i.Billing}}))}}),(0,o.jsx)(b.k,{text:t("ToolbarTop.RedeemGiftCard"),icon:"pri pri-giftredeem",onClick:function(){return e((0,f.bv)({link:"giftedaccess/campaign/giftcard-redeem"}))}})]})},I=n(46674),S=n(61577),P=function(){var e=(0,s.wA)(),t=(0,g.f)().localizedString,n=(0,a.useContext)(h.a),i=(0,s.d4)(v.pP);if((0,m.C)((function(){return n.realign()}),[n.realign,i]),void 0===i)return null;var r=function(e){switch(e){case I.D.Off:case I.D.OutOfHotspot:return"off";case I.D.Busy:case I.D.BusyLimitExceeded:return"wait";case I.D.On:return"on";default:return""}}(i);return(0,o.jsxs)(S.n,{className:"btn-icon btn-hotspot ".concat(r),onClick:function(){return e((0,v.Wj)())},children:[(0,o.jsx)("span",{className:"pri pri-hotspot","aria-hidden":"true"}),(0,o.jsx)("span",{className:"btn-title",children:t("Buttons.Hotzone.Text")})]})},x=n(68819),T=n(86718),k=n(10610),E=function(e){var t=(0,s.d4)(u.nw);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(A,{}),(0,o.jsx)(P,{}),!1!==e.search&&(0,o.jsx)(k.u,{}),(0,o.jsx)(x.i,{}),t!==c.Z.Voyager&&(0,o.jsx)(T.u,{children:e.optionsMenuItems})]})},M=n(42597),D=n(89247),N=n(73663),L=n(83999),V=function(e){var t=e.selected,n=e.title,i=e.hrefSEO,r=e.catalogView,a=(0,s.wA)(),u=(0,g.f)().localizedString;return(0,o.jsx)(L.g,{icon:"pri pri-sources",title:null!=n?n:u("Navigation.Catalog"),selected:t,onClick:function(){return a((0,f.Ng)({viewName:p.lP.StoreHub,params:{catalogView:null!=r?r:p.$r.Catalog}}))},hrefSEO:i})},R=function(e){var t=(0,s.wA)(),n=(0,g.f)().localizedString;return(0,o.jsx)(L.g,{icon:"pri pri-newsfeed",title:n("Navigation.ForYou"),selected:e.selected,onClick:function(){return t((0,f.Ng)({viewName:p.lP.TopNews}))},hrefSEO:e.hrefSEO})},H=function(e){var t=(0,s.wA)();return(0,o.jsx)(L.g,{icon:"pri pri-home",title:e.title,selected:e.selected,onClick:function(){return t((0,f.Ng)({viewName:p.lP.Home}))},hrefSEO:e.hrefSEO})},F=function(e){var t=(0,s.wA)(),n=(0,g.f)().localizedString;return(0,o.jsx)(L.g,{icon:"pri pri-books",title:n("v7.Client.Catalog.pdfbooks"),selected:e.selected,onClick:function(){return t((0,f.Ng)({viewName:p.lP.StoreHub,params:{catalogView:p.$r.PDFBooks}}))}})},B=function(e){var t=(0,s.wA)(),n=(0,g.f)().localizedString;return(0,o.jsx)(L.g,{icon:"pri pri-magazine",title:n("v7.Client.Catalog.magazines"),selected:e.selected,onClick:function(){return t((0,f.Ng)({viewName:p.lP.StoreHub,params:{catalogView:p.$r.Magazines}}))}})},z=function(e){var t=(0,s.wA)(),n=(0,g.f)().localizedString;return(0,o.jsx)(L.g,{icon:"pri pri-newspaper",title:n("v7.Client.Catalog.newspapers"),selected:e.selected,onClick:function(){return t((0,f.Ng)({viewName:p.lP.StoreHub,params:{catalogView:p.$r.Newspapers}}))}})},O=n(92961),j=function(e){var t=e.title,n=e.addDivider,i=void 0!==n&&n,r=(0,s.wA)(),u=(0,a.useContext)(L.p).asMenuItem,c=(0,a.useCallback)((function(){r((0,O.D8)())}),[r]);return u?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(L.g,{icon:"pri pri-arrowleft",title:t,selected:!1,className:"dropmenu-item-aux-top",onClick:c}),i&&(0,o.jsx)("div",{role:"separator",className:"nav-divider"})]}):null},U=(0,D.DT)(),W=function(e){var t=(0,s.wA)(),n=(0,g.f)().localizedString;return(0,o.jsx)(L.g,{icon:"pri pri-hotspotmap",title:n("Sidebar.HotzoneMap"),selected:e.selected,onClick:function(){return t((0,f.Ng)({viewName:p.lP.HotSpotsHub}))},hrefSEO:e.hrefSEO})},Y=(0,D.DT)(),X=n(13981),q=n(26906),G=n(78897),K=n(12705),J=n(29978);!function(e){e[e.Default=0]="Default",e[e.Tabbar=1]="Tabbar"}(C||(C={}));var Q=(0,J.Mz)(u.nw,l.LU,(function(e,t){var n=e===c.Z.Pervasive,i=C.Default;return"phone"===t&&(i=C.Tabbar),{enabled:n,navigationMode:i}})),Z=function(e){var t=(0,s.wA)(),n=(0,g.f)().localizedString;return(0,o.jsx)(L.g,{icon:"pri pri-myprofile",title:n("Catalog.MyFavorites"),selected:e.selected,onClick:function(){return t((0,f.Ng)({viewName:p.lP.MyProfile}))}})},$=function(e){var t,n,i,r,u,c=(0,g.f)().localizedString,l=(n=q.$I.PublicationTypes,i=(0,s.wA)(),r=(0,K.y)(G.I,n),u=(0,s.d4)(G.F$),(0,a.useEffect)((function(){u||i((0,G.So)())}),[i,u]),null!=r?r:[]),d=(0,s.d4)(f.SG),h=null!==(t=null==d?void 0:d.currentPath)&&void 0!==t?t:"none",m=(0,s.d4)(Q),v=[(0,o.jsx)(H,{title:c("Navigation.Home"),selected:""===h||(null==d?void 0:d.viewName)===p.lP.Home},"pervasive_home")],y={magazines:p.$r.Magazines,newspapers:p.$r.Newspapers};return l.forEach((function(e){var t=y[e.slug];t&&v.push((0,o.jsx)(L.g,{icon:"pri pri-".concat(e.slug),title:e.displayName,selected:h.startsWith(e.slug),onClick:function(){return(0,X.JD)((0,f.Ng)({viewName:p.lP.StoreHub,params:{catalogView:t}}))}},"pervasive_".concat(e.slug)))})),m.enabled&&v.push((0,o.jsx)(Z,{selected:h.startsWith("myprofile")},"pervasive_myprofile")),(0,o.jsx)(M.q,{mode:e.mode,items:v})},ee=function(e){var t=(0,s.d4)(v.FE),n=(0,s.d4)(u.nw),i=function(){var e,t=(0,g.f)().localizedString,n=(0,s.d4)(u.nw),i=(0,s.d4)(N.aq),r=(0,s.d4)(f.SG),l=null!==(e=null==r?void 0:r.currentPath)&&void 0!==e?e:"none";return(0,a.useMemo)((function(){if(n===c.Z.Pervasive)return[];var e=[];if(n===c.Z.Web){!i.exitPublication.enabled||(null==r?void 0:r.viewName)!==p.lP.PagesView&&(null==r?void 0:r.viewName)!==p.lP.TextView&&(null==r?void 0:r.viewName)!==p.lP.Article||e.push((0,o.jsx)(j,{title:t("Navigation.ExitPublication"),addDivider:!0},"web_exit_publication"));var a=l.startsWith("catalog")||l.endsWith("details")||l.endsWith("latest");e.push((0,o.jsx)(V,{selected:a,hrefSEO:"".concat(U,"catalog")},"web_catalog")),i.topnews.enabled&&e.push((0,o.jsx)(R,{selected:(null==r?void 0:r.viewName)===p.lP.TopNews,hrefSEO:"".concat(U,"foryou")},"web_topnews"))}return n===c.Z.Voyager&&(e.push((0,o.jsx)(H,{title:t("Navigation.Home"),selected:""===l||(null==r?void 0:r.viewName)===p.lP.Home},"voyager_home")),i.books.enabled&&e.push((0,o.jsx)(F,{selected:l.startsWith("pdfbooks")},"voyager_books")),e.push((0,o.jsx)(B,{selected:l.startsWith("magazines")},"voyager_magazines")),e.push((0,o.jsx)(z,{selected:l.startsWith("newspapers")},"voyager_newspapers"))),e}),[i,l,t,r,n])}(),r=function(){var e,t=(0,s.wA)(),n=(0,g.f)().localizedString,i=(0,s.d4)(u.nw),r=(0,s.d4)(N.aq),l=(0,s.d4)(f.SG),d=null!==(e=null==l?void 0:l.currentPath)&&void 0!==e?e:"none";return(0,a.useMemo)((function(){if(i!==c.Z.Web)return[];var e=[];return r.hotspotMap.enabled&&e.push((0,o.jsx)(W,{selected:d.startsWith("hotspot"),hrefSEO:"".concat(Y,"hotspot/map")},"web_hotspot")),r.about.enabled&&e.push((0,o.jsx)(L.g,{title:n("Sidebar.About"),selected:!1,onClick:function(){r.about.location&&t((0,f.bv)({link:r.about.location,openNewWindow:!0}))},hrefSEO:"//about.pressreader.com/"},"web_about")),r.blog.enabled&&e.push((0,o.jsx)(L.g,{title:n("Sidebar.Blog"),selected:!1,onClick:function(){r.blog.location&&t((0,f.bv)({link:r.blog.location,openNewWindow:!0}))},hrefSEO:"//blog.pressreader.com/"},"web_blog")),r.help.enabled&&e.push((0,o.jsx)(L.g,{icon:"pri pri-help",title:n("Sidebar.HelpCenter"),selected:!1,onClick:function(){r.help.location&&t((0,f.bv)({link:r.help.location,openNewWindow:!0}))},hrefSEO:"//care.pressreader.com/hc"},"web_help")),e}),[i,r,d,n,t])}();return n===c.Z.Pervasive?(0,o.jsx)($,{mode:e.mode}):(0,o.jsx)(M.q,{mode:e.mode,items:i,menuItems:t?[]:r})},te=n(80784),ne=n(10320),ie=function(e){var t=(0,s.d4)(u.nw),n=(0,s.d4)(l.LU),i=(0,a.useContext)(ne.D),r=[],f=null,p="none"!==e.navigation;p&&(f=t===c.Z.Pervasive?"phone"===n?"tabbar":"navbar":"compact"===e.navigation?"inline-compact":"inline");var m=(0,o.jsxs)(o.Fragment,{children:[t===c.Z.Pervasive&&!e.left&&!e.center&&(0,o.jsx)(d.c,{}),e.left,p&&("inline"===f||"inline-compact"===f)&&(0,o.jsx)(ee,{mode:f})]}),g=e.center;t===c.Z.Pervasive||g||(g=function(){return(0,o.jsx)(d.c,{})});var v=(0,a.useMemo)((function(){return e.align?e.align:"inline"===f?"sides-flex":g?"center-flex":"none"}),[e.align,f,g]),y=e.right||(0,o.jsx)(E,{optionsMenuItems:e.optionsMenuItems,search:e.search}),_=e.accessory,b=e.outerAccessory;return"navbar"===f?_=(0,o.jsxs)(o.Fragment,{children:[_,p&&(0,o.jsx)(ee,{mode:"navbar"})]}):"tabbar"===f&&(b=(0,o.jsxs)(o.Fragment,{children:[b,p&&(0,o.jsx)(ee,{mode:"tabbar"})]})),i.showSearchInput&&(r.push("site-header-search-shown"),b=(0,o.jsx)(o.Fragment,{children:b})),i.extraControlsShown&&r.push("site-header-access-controls-shown"),(0,o.jsx)(h.D,{className:r.join(" "),left:m,center:g,right:y,align:v,replaceWith:i.showSearchInput?(0,o.jsx)(te.O,{}):null,accessory:_,outerAccessory:b,config:e.config,onHeaderContextChanged:e.onHeaderContextChanged})},re=function(e){return(0,o.jsx)(ne.j,{children:(0,o.jsx)(ie,(0,r.Cl)({},e))})}},80784:function(e,t,n){"use strict";n.d(t,{O:function(){return c}});var i=n(31555),r=n(5059),o=n(85387),a=n(41002),s=n(85834),u=n(10320),c=function(){var e=(0,o.wA)(),t=(0,r.useContext)(u.D),n=(0,r.useCallback)((function(n,i){t.setShowSearchInput(!1),e((0,a.eO)({query:n,location:i}))}),[e,t]),c=(0,r.useCallback)((function(){t.setShowSearchInput(!1)}),[t]);return(0,i.jsx)(s.O,{onSearch:n,onClose:c,autoFocus:!0})}},10610:function(e,t,n){"use strict";n.d(t,{u:function(){return C}});var i=n(31555),r=n(5059),o=n(85387),a=n(78698),s=n(41002),u=n(64404),c=n(80835),l=n(18752),d=n(62713),h=n(11677),f=n(10320),p=n(22496),m=n(61577),g=function(e){var t=e.onClick,n=(0,p.f)().localizedString;return(0,i.jsxs)(m.n,{className:"btn-icon btn-search",onClick:t,children:[(0,i.jsx)("span",{className:"pri pri-search","aria-hidden":"true"}),(0,i.jsx)("span",{className:"btn-title",children:n("Buttons.Search")})]})},v=n(58932),y=n(27602),_=n(13384),b=n(9774),w=function(e){var t=e.onSearch,n=(0,o.d4)(y.SG),a=(0,v.zs)((0,r.useState)(""),2),s=a[0],u=a[1];return(0,r.useEffect)((function(){return u("")}),[null==n?void 0:n.currentPath]),(0,i.jsx)("div",{className:"topbar-search",children:(0,i.jsx)("div",{className:"ui-search",children:(0,i.jsx)("div",{role:"search","aria-label":(0,_.p3)("Site.Search.Header.Aria"),children:(0,i.jsx)("div",{className:"search-container",children:(0,i.jsx)(b.N,{value:s,"aria-label":(0,_.p3)("Site.Search.Header.Placeholder"),"aria-autocomplete":"list",placeholder:(0,_.p3)("Site.Search.Header.Placeholder"),onChange:function(e,t){return u(t)},onSubmit:function(){return t(s)}})})})})})},C=function(){var e=(0,o.wA)(),t=(0,r.useContext)(d.a),n=(0,r.useContext)(f.D),p=(0,o.d4)(a.nw),m=(0,o.d4)(l.L9);(0,u.C)((function(){t.realign()}),[t.realign,m]);var v=function(t){return e((0,s.eO)({query:t}))};return p===c.Z.Pervasive?m<=h.a.Medium?(0,i.jsx)(g,{onClick:function(){return v("")}}):(0,i.jsx)(w,{onSearch:v}):m<=h.a.Small?(0,i.jsx)(g,{onClick:function(){return e((0,s.Jt)({query:""}))}}):(0,i.jsx)(g,{onClick:function(){n.setShowSearchInput(!0)}})}},10320:function(e,t,n){"use strict";n.d(t,{D:function(){return s},j:function(){return u}});var i=n(58932),r=n(31555),o=n(5059),a=n(3491),s=(0,o.createContext)({showSearchInput:!1,setShowSearchInput:a,extraControlsShown:!1,setExtraControlsShown:a}),u=function(e){var t=e.children,n=(0,i.zs)((0,o.useState)(!1),2),a=n[0],u=n[1],c=(0,i.zs)((0,o.useState)(!1),2),l=c[0],d=c[1],h=(0,i.zs)((0,o.useState)(),2),f=h[0],p=h[1],m=(0,o.useMemo)((function(){return{showSearchInput:a,setShowSearchInput:function(e){u(e),e?p(document.activeElement):f&&f.focus()},extraControlsShown:l,setExtraControlsShown:d}}),[a,u,l,d,f]);return(0,r.jsx)(s.Provider,{value:m,children:t})}},89486:function(e,t,n){"use strict";n.d(t,{a:function(){return s}});var i=n(31555),r=n(10358),o=n(90185),a=n(45235),s=function(e){var t=e.user,n=e.size;return t.isAuthenticated?(0,i.jsx)("span",{className:"userphoto",children:function(){var e,s,u=t.avatarImageId&&(0,o.V)(t.avatarImageId)||t.photo&&t.photo.url&&(0,r.He)(t.photo.url);return u?(0,i.jsx)("img",{src:u,width:null!==(e=null==n?void 0:n.width)&&void 0!==e?e:0,height:null!==(s=null==n?void 0:n.height)&&void 0!==s?s:0,alt:""}):(0,i.jsx)("span",{className:"userphoto-title",children:(0,a.gs)(t.name)})}()}):(0,i.jsx)("span",{className:"userphoto"})}},93399:function(e,t,n){"use strict";n.d(t,{_:function(){return u}});var i=n(31555),r=n(5059),o=n(85738),a=function(e){var t=e.viewName,n=e.subviewName,r=e.contentClassName,a=e.children;return(0,i.jsx)("div",{"data-testid":t,className:(0,o.W)("".concat(t,"-hub view-hub"),n&&"subview-".concat(n)),role:"main",children:(0,i.jsx)("div",{className:"".concat(t,"-panel-content view-panel-content"),children:(0,i.jsx)("div",{className:(0,o.W)("".concat(t,"-panel view-panel"),r),children:a})})})},s=n(41233),u=function(e){var t=e.viewName,n=e.subviewName,o=e.className,u=e.contentClassName,c=e.header,l=e.footer,d=e.contextProvider,h=e.children,f=d||r.Fragment;return(0,i.jsx)(s.u,{viewName:t,className:o,children:(0,i.jsxs)(f,{children:[c,(0,i.jsx)(a,{viewName:t,subviewName:n,contentClassName:u,children:h}),l]})})}},8351:function(e,t,n){"use strict";n.d(t,{$Y:function(){return l},H5:function(){return o},IK:function(){return d},L9:function(){return a},O1:function(){return c},aq:function(){return f},dz:function(){return u},o5:function(){return h},oL:function(){return s},pW:function(){return r}});var i=n(89247),r="@pressreader/views-common",o="contextmenu.views.common.translate",a="contextmenu.views.common.interfacelang",s="contextmenu.views.common.fonts",u="TextView.Scale",c="TextView.Fontset",l="".concat((0,i.DT)(),"multilanguage"),d=7,h=1,f="features.views.homefeed.enabled"},99891:function(e,t,n){"use strict";n.d(t,{A9:function(){return u},C6:function(){return A},LM:function(){return y},Mu:function(){return w},WC:function(){return m},Xm:function(){return p},Y:function(){return c},aA:function(){return v},cn:function(){return a},de:function(){return g},e_:function(){return d},iI:function(){return h},ku:function(){return f},mQ:function(){return I},nt:function(){return C},qX:function(){return s},ru:function(){return b},sr:function(){return l},uT:function(){return _}});var i=n(89103),r=n(8351),o="".concat(r.pW,"/"),a=(0,i.lQ)("".concat(o,"change_interface_language")),s=(0,i.lQ)("".concat(o,"change_font")),u=(0,i.lQ)("".concat(o,"change_font_done")),c=(0,i.lQ)("".concat(o,"available_fonts_changed")),l=(0,i.lQ)("".concat(o,"change_font_scale")),d=(0,i.lQ)("".concat(o,"increase_font_scale")),h=(0,i.lQ)("".concat(o,"decrease_font_scale")),f=(0,i.lQ)("".concat(o,"font_scale_changed")),p=(0,i.lQ)("".concat(o,"open_change_interface_language_menu")),m=(0,i.lQ)("".concat(o,"open_fonts_menu")),g=(0,i.lQ)("".concat(o,"open_legacy_options_menu")),v=(0,i.lQ)("".concat(o,"open_translate_menu")),y=(0,i.lQ)("".concat(o,"translate_menu_opened")),_=(0,i.lQ)("".concat(o,"translate_menu_closed")),b=(0,i.lQ)("".concat(o,"translate_menu_language_code_changed")),w=(0,i.lQ)("".concat(o,"legacy_app_load_began")),C=(0,i.lQ)("".concat(o,"legacy_app_load_done")),A=(0,i.lQ)("".concat(o,"legacy_app_load_failed")),I=(0,i.lQ)("".concat(o,"check_issue_read_limits"))},73663:function(e,t,n){"use strict";n.d(t,{qX:function(){return _.qX},A9:function(){return _.A9},sr:function(){return _.sr},cn:function(){return _.cn},mQ:function(){return _.mQ},iI:function(){return _.iI},ku:function(){return _.ku},e_:function(){return _.e_},Mu:function(){return _.Mu},nt:function(){return _.nt},C6:function(){return _.C6},Xm:function(){return _.Xm},WC:function(){return _.WC},de:function(){return _.de},aA:function(){return _.aA},g0:function(){return ie},oA:function(){return re},LA:function(){return oe},NO:function(){return de},TZ:function(){return he},iA:function(){return fe},aq:function(){return ne},oG:function(){return se},oz:function(){return ce},C4:function(){return ue},py:function(){return me},ND:function(){return ae},Bo:function(){return le},ru:function(){return _.ru}});var i=n(13981),r=n(25672),o=n(31555),a=n(5059),s=n(85387),u=n(78698),c=n(51880),l=n(43125),d=n(12705),h=n(22496),f=n(3503),p=n(34624),m=n(6201),g=n(41035),v=n(18844),y=n(74637),_=n(99891),b=n(8351),w=n(58932),C=n(74010),A=n(89103),I=n(24167),S={fonts:[],currentFontId:null,currentFontScale:parseInt(I.get(b.dz,"3"),10),legacyAppStatus:C.U.None},P=(0,A.vy)(S,(0,A.po)(_.Y,(function(e,t){var n=t.payload;return(0,w.Cl)((0,w.Cl)({},e),{fonts:n.fonts})})),(0,A.po)(_.A9,(function(e,t){var n=t.payload;return(0,w.Cl)((0,w.Cl)({},e),{currentFontId:n.fontId})})),(0,A.po)(_.ku,(function(e,t){var n=t.payload;return(0,w.Cl)((0,w.Cl)({},e),{currentFontScale:n.fontScale})})),(0,A.po)(_.Mu,(function(e){return(0,w.Cl)((0,w.Cl)({},e),{legacyAppStatus:C.U.Pending})})),(0,A.po)(_.nt,(function(e){return(0,w.Cl)((0,w.Cl)({},e),{legacyAppStatus:C.U.Done})})),(0,A.po)(_.C6,(function(e){return(0,w.Cl)((0,w.Cl)({},e),{legacyAppStatus:C.U.Failed})}))),x=n(44834),T=n(51413),k=n(47476);function E(){return(0,w.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,x.yJ)((0,T.df)({category:"Menus",action:"IssueContextMenu",label:"fonts"}))];case 1:return e.sent(),[2]}}))}function M(){return(0,w.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,k.j)(_.WC,E)];case 1:return e.sent(),[2]}}))}var D=n(4291),N=n(10235),L=n(30212),V=n(27602),R=n(80606),H=n(62444),F=n(89247),B=n(19299),z=n(82534),O=n(61445),j=n(80835),U=n(74057),W=n(29978),Y=n(14823),X=n(43566),q=n(70474),G=n(28809),K=n(42906),J=n(33730),Q=n(46674),Z=n(18752),$=n(11677),ee=n(60456),te=function(e){return e[b.pW]},ne=(0,W.Mz)(G._t,K.c,O.FE,u.uF,(function(e,t,n,i){var r={hotspotMap:{enabled:!1},about:{enabled:!1,location:null},blog:{enabled:!1,location:null},help:{enabled:!1,location:null},topnews:{enabled:!0},books:{enabled:t.enabled},exitPublication:{enabled:i}},o=e("app.views.common.nav_menu");if(!o)return r;var a=Y(r,o);return{hotspotMap:{enabled:e(a.hotspot_map.enabled_feature_key,!0)},about:{enabled:a.about.enabled,location:a.about.location},blog:{enabled:a.blog.enabled,location:a.blog.location},help:{enabled:a.help.enabled,location:a.help.location},topnews:{enabled:a.topnews.enabled&&!n&&e(b.aq,!0)},books:{enabled:t.enabled},exitPublication:{enabled:i}}})),ie=(0,W.Mz)(te,(function(e){return e.fonts})),re=(0,W.Mz)(te,(function(e){return e.currentFontId})),oe=(0,W.Mz)(te,(function(e){return e.currentFontScale})),ae=((0,W.Mz)(oe,(function(e){return eb.o5})),(0,W.Mz)(te,(function(e){return e.legacyAppStatus}))),se=(0,W.Mz)(V.zq,ae,R.i3,J.i3,(function(e,t,n,i){var r=!e&&!n.length&&!i.length;return t!==C.U.Done&&r})),ue=(0,W.Mz)(X.Vj,ae,(function(e,t){return e||t===C.U.Pending})),ce=(0,W.Mz)(R.i3,J.i3,(function(e,t){return!(e.length&&e[e.length-1].supportNativeScroll||t.length&&t[t.length-1].supportNativeScroll)})),le=(0,W.Mz)(G._t,(function(e){return e("app.common.rootPanelClassName","").split(" ").filter((function(e){return e}))})),de=(0,W.Mz)(G._t,u.uF,(function(e,t){return t&&e("features.feedback.form.enabled",!1)})),he=(0,W.Mz)(G._t,(function(e){return e("features.feedback.form.url","")})),fe=(0,W.Mz)(u.nw,Z.LU,Z.ff,G._t,(function(e,t,n,i){return{showFooterContent:i("features.views.footer.generic.showContent",!0),showFooterLinks:e!==j.Z.Voyager,mobileView:"phone"===t||n.screenType<=$.a.Medium}})),pe=(0,W.Mz)(G._t,(function(e){var t=e("translation");return{enable:(0,ee.A)(null==t?void 0:t.enableTextViewTranslation.value),enableForAnonymous:(0,ee.A)(null==t?void 0:t.enableTextViewTranslation.enableForAnonymous),enableForSponsored:(0,ee.A)(null==t?void 0:t.enableTextViewTranslation.enableForSponsored),enableForPremium:(0,ee.A)(null==t?void 0:t.enableTextViewTranslation.enableForPremium),enableForRegistered:(0,ee.A)(null==t?void 0:t.enableTextViewTranslation.enableForRegistered)}})),me=(0,W.Mz)(u.nw,X.mB,q.rU,O.pP,pe,(function(e,t,n,i,r){return e!==j.Z.Voyager&&(i===Q.D.On?r.enableForSponsored:t.isAuthenticated?n&&n.isUnlimited?r.enableForPremium:n&&n.isFree?r.enableForRegistered:r.enable:r.enableForAnonymous)}));function ge(e){var t,n,i,r,o,a,s,u,c,l=e.payload;return(0,w.YH)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,6,,7]),t=l.parentMenuId,n=l.center,i=l.issueKey,r=l.currentLanguageCode,o={center:null!=n?n:{x:0,y:0},align:n?{y:H.W.Center,x:H.W.Center}:{x:H.W.ScreenCenter,y:H.W.ScreenCenter}},[5,(0,w.Ju)((0,R.jA)({parentMenuId:t,name:b.H5,context:{issueKey:i,currentLanguageCode:r},position:o}))];case 1:return a=e.sent(),[4,(0,x.yJ)((0,_.LM)())];case 2:return e.sent(),[4,(0,x.O4)({close:(0,R.d3)(a),navigateBegan:(0,x.s)(V.DI)})];case 3:return s=e.sent(),[4,(0,R.Z_)(a,{back:(null===(c=s.close)||void 0===c?void 0:c.payload.back)||!1})];case 4:return e.sent(),[4,(0,x.yJ)((0,_.uT)())];case 5:return e.sent(),[3,7];case 6:return u=e.sent(),(0,L.z)(u),[3,7];case 7:return[2]}}))}function ve(e){var t,n,i,r,o,a;return(0,w.YH)(this,(function(s){switch(s.label){case 0:return s.trys.push([0,6,,7]),t={center:e.payload.center,align:{y:H.W.ScreenCenter,x:H.W.ScreenCenter}},[4,(0,R.jA)({parentMenuId:e.payload.parentMenuId,name:b.L9,context:null,position:t})];case 1:return n=s.sent(),[4,(0,R.d3)(n)];case 2:return i=s.sent().payload,[4,(0,R.Z_)(n,{back:i.back})];case 3:return s.sent(),[4,(0,x.Lt)(u.zw)];case 4:return r=s.sent(),[4,(0,x.Lt)(u.R1)];case 5:return o=s.sent(),window.localStorage.setItem(b.$Y,JSON.stringify({interfaceLangCode:r,preferredLanguageCode:o,result:!1})),[3,7];case 6:return a=s.sent(),(0,L.z)(a),[3,7];case 7:return[2]}}))}function ye(e){var t,n,i,r,o=e.payload;return(0,w.YH)(this,(function(e){switch(e.label){case 0:return t=o.languageCode,n=(0,F.m2)(window.location.pathname+window.location.search,t),[4,(0,x.Lt)(u.nw)];case 1:return e.sent()===j.Z.Voyager?[3,5]:[4,(0,x.T1)(B.gV,t)];case 2:return e.sent(),[4,(0,x.Lt)(O.$4)];case 3:return i=e.sent(),[4,(0,x.T1)(z.Ct,!!(null==i?void 0:i.isGeoLocationValidationEnabled))];case 4:return e.sent(),setTimeout((function(){window.location.assign(n)}),30),[3,6];case 5:r=(0,F.jM)("ChangeLanguage?lng=".concat(t,"&returnUrl=").concat(encodeURIComponent(n))),setTimeout((function(){window.location.assign(r)}),30),e.label=6;case 6:return[2]}}))}function _e(){var e,t;return(0,w.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,x.Lt)(u.XT)];case 1:return e=n.sent()===N.O.Android?[{id:"fontset1",name:null},{id:"fontset2",name:"Sans Serif"},{id:"fontset3",name:"Palantino"},{id:"fontset4",name:"Times"}]:[{id:"fontset1",name:null},{id:"fontset2",name:"Palantino"},{id:"fontset3",name:"Times New Roman"},{id:"fontset4",name:"Helvetica"},{id:"fontset5",name:"Verdana"},{id:"fontset6",name:"Georgia"},{id:"fontset-dyslexic",name:"Dyslexic"}],[4,(0,x.Lt)(ie)];case 2:return t=n.sent(),D(e,t)?[3,4]:[4,(0,x.yJ)((0,_.Y)({fonts:e}))];case 3:n.sent(),n.label=4;case 4:return[2]}}))}function be(){var e,t;return(0,w.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,x.Lt)(re)];case 1:return e=n.sent(),t=I.get(b.O1,"fontset1"),e===t?[3,3]:[4,(0,x.yJ)((0,_.A9)({fontId:t}))];case 2:n.sent(),n.label=3;case 3:return I.onSettingsChanged(b.O1).subscribe((function(e){(0,i.JD)((0,_.A9)({fontId:e}))})),[2]}}))}function we(e){var t,n,i,r,o,a=e.payload;return(0,w.YH)(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),t=a.center?{center:a.center,align:{y:H.W.Center,x:H.W.Center}}:{center:{x:0,y:0},align:{y:H.W.ScreenCenter,x:H.W.ScreenCenter}},[4,(0,R.jA)({parentMenuId:a.parentMenuId,name:b.oL,context:{showFonts:a.showFonts},position:t})];case 1:return n=e.sent(),[4,(0,x.O4)({close:(0,R.d3)(n),navigateBegan:(0,x.s)(V.DI)})];case 2:return i=e.sent(),[4,(0,R.Z_)(n,{back:(null===(o=i.close)||void 0===o?void 0:o.payload.back)||!1})];case 3:return e.sent(),[3,5];case 4:return r=e.sent(),(0,L.z)(r),[3,5];case 5:return[2]}}))}function Ce(e){var t=e.payload;return(0,w.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,x.Lt)(re)];case 1:return e.sent()!==t.fontId&&I.set(b.O1,t.fontId),[2]}}))}function Ae(e){var t,n,i,r=e.payload;return(0,w.YH)(this,(function(e){switch(e.label){case 0:return t=r.fontScale,n=(0,U.V)(t),[4,(0,x.Lt)(oe)];case 1:return i=e.sent(),n===i?[2]:(I.set(b.dz,n),[4,(0,x.yJ)((0,_.ku)({fontScale:n}))]);case 2:return e.sent(),[2]}}))}function Ie(){var e;return(0,w.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,x.Lt)(oe)];case 1:return e=t.sent(),[4,(0,x.yJ)((0,_.sr)({fontScale:e+1}))];case 2:return t.sent(),[2]}}))}function Se(){var e;return(0,w.YH)(this,(function(t){switch(t.label){case 0:return[4,(0,x.Lt)(oe)];case 1:return e=t.sent(),[4,(0,x.yJ)((0,_.sr)({fontScale:e-1}))];case 2:return t.sent(),[2]}}))}function Pe(){return(0,w.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,x.jP)(_.Xm,ve)];case 1:return e.sent(),[4,(0,x.jP)(_.cn,ye)];case 2:return e.sent(),[4,(0,x.jP)(_.aA,ge)];case 3:return e.sent(),[4,_e()];case 4:return e.sent(),[4,be()];case 5:return e.sent(),[4,(0,x.jP)(_.WC,we)];case 6:return e.sent(),[4,(0,x.jP)(_.qX,Ce)];case 7:return e.sent(),[4,(0,x.jP)(_.sr,Ae)];case 8:return e.sent(),[4,(0,x.jP)(_.e_,Ie)];case 9:return e.sent(),[4,(0,x.jP)(_.iI,Se)];case 10:return e.sent(),[2]}}))}var xe=n(87542),Te=n(13384);function ke(e){var t,n;return(0,w.YH)(this,(function(i){switch(i.label){case 0:return(t=e.payload)?(n=null,t.hasReachedDailyIssueReadLimit?n=(0,Te.p3)("ReadLimit.DailyLimitExceeded"):t.hasReachedIssueReadLimit?n=(0,Te.p3)("ReadLimit.IssuesHardLimitExceeded"):t.hasIssueReadLimitReachingWarning&&(n=(0,Te.p3)("ReadLimit.IssuesSoftLimitExceeded")),n?[4,(0,xe.Z)({message:n})]:[3,2]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}function Ee(){return(0,w.YH)(this,(function(e){switch(e.label){case 0:return[4,(0,k.j)(_.mQ,ke)];case 1:return e.sent(),[2]}}))}r.A.register(b.H5,(function(e){var t,n=(0,s.wA)(),i=e.onClose,r=e.context,b=r.issueKey,w=r.currentLanguageCode,C=(0,h.f)().localizedString,A=(0,l.Yb)(b||""),I=(0,d.y)(c.Wt,{cidDateKey:A}),S=(0,s.d4)(u.Rt)((null===(t=null==I?void 0:I.info)||void 0===t?void 0:t.newspaper.isoLanguage)||"").filter(f.R),P=S.find((function(e){var t;return e.code===(null===(t=null==I?void 0:I.info)||void 0===t?void 0:t.newspaper.isoLanguage)})),x=!!w&&(null==P?void 0:P.code)!==w,T=(0,a.useCallback)((function(e){void 0===e&&(e={back:!1}),i({back:e.back})}),[i]),k=function(e){T(),n((0,_.ru)({languageCode:e===P?null:e.code}))};if(b&&S.length)return(0,o.jsx)(m.E,{menuId:e.menuId,parentMenuId:e.parentMenuId,context:e.context,position:e.position,onClose:e.onClose,header:(0,o.jsx)(g.S,{title:C("Menu.Translate"),canGoBack:!!e.parentMenuId,onClose:T}),body:(0,o.jsx)(p.f,{grouped:!0,children:(0,o.jsxs)(v.S,{children:[x&&P&&(0,o.jsx)(y.k,{text:C("Menu.OriginalLanguage",P.title),icon:"",onClick:function(){return k(P)}}),S.filter((function(e){return e.code!==w&&e.code!==(null==P?void 0:P.code)})).sort((function(e,t){return e.titlei.IK?i.IK:e=i)&&Object.keys(__webpack_require__.O).every((function(e){return __webpack_require__.O[e](t[a])}))?t.splice(a--,1):(o=!1,i0&&deferred[u-1][2]>i;u--)deferred[u]=deferred[u-1];deferred[u]=[t,n,i]},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},getProto=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);__webpack_require__.r(n);var i={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var r=2&t&&e;"object"==typeof r&&!~leafPrototypes.indexOf(r);r=getProto(r))Object.getOwnPropertyNames(r).forEach((function(t){i[t]=function(){return e[t]}}));return i.default=function(){return e},__webpack_require__.d(n,i),n},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.f={},__webpack_require__.e=function(e){return Promise.all(Object.keys(__webpack_require__.f).reduce((function(t,n){return __webpack_require__.f[n](e,t),t}),[]))},__webpack_require__.u=function(e){return({1608:"libs.catalog.publications.section",2270:"app.popups.share.email.article",4364:"viewer.legacy",4570:"app.views.topstories",6324:"app.views.article",8565:"vimeo.player.external"}[e]||e)+".build.min.js"},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},inProgress={},dataWebpackPrefix="beclient:",__webpack_require__.l=function(e,t,n,i){if(inProgress[e])inProgress[e].push(t);else{var r,o;if(void 0!==n)for(var a=document.getElementsByTagName("script"),s=0;s