1"use strict";(self.webpackChunkhbApp=self.webpackChunkhbApp||[]).push([[8477],{71863(I,h){h._p="funnel.composer",h.xU="funnel.pianoContentExclusiveForAbo",h.GK="funnel.pageview",h.xD="funnel.theme",h.h1="funnel.user"},43524(I,h,t){t.d(h,{PianoService:()=>x});var m=t(29293),a=t.n(m),o=t(47266),d=t(81230),P=t(97084),M=t(52889),v=t(57166),O=t(99289),A=t(14907),L=t(26926),p=t(41981),K=t(78950),R=t(4504),S=t(23634),f=t(61617),B=t(29885),n=t(82444),i=t(91124),s=t(71863),u=t(84412),_=t(92771),E=t(54843),l=t(7673),c=t(41584),W=t(5964),N=t(96354),b=t(25558),U=t(88141),j=t(87400);let x=(()=>{class g{#c;#d;static{this.KICKER_META_TAG_NAME="cXenseParse:kicker"}static{this.ARTICLE_ID_META_TAG_NAME="cXenseParse:articleid"}#t;#s;#i;#r;#h;#u;#n;#o;#E;#m;#a;#f;#e;#_;#l;get window(){return this.#u.defaultView}constructor(){this.#c=500,this.#d=5e3,this.#t=new u.t(null),this.waitForScriptLoaded=(0,E._)(this.#t.pipe((0,W.p)(e=>null!==e))),this.#s=0,this.#i=new _.m(1),this.experienceExecuted=this.#i.pipe((0,U.M)(()=>{null!==this.window&&this.window.performance.mark("piano_experience_trigger")}),(0,b.n)(e=>e?(0,l.of)(!0):(0,c.O)(this.#c).pipe((0,U.M)(()=>performance.mark("piano_experience_timeout")),(0,N.T)(()=>(this.#e.count("piano_experience_timeout"),!0))))),this.vendorId="5eec8924b8e05c699567f398",this.content=null,this.#r=null,this.hasConsent=(0,o.vPA)(!1),this.#h=(0,o.WQX)(p.Y).theme,this.#u=(0,o.WQX)(o.qQL),this.#n=(0,o.WQX)(A.M),this.#o=(0,o.WQX)(j.d),this.#E=(0,o.WQX)(f.I),this.#m=(0,o.WQX)(S.u),this.#a=(0,o.WQX)(B.UserService),this.#f=(0,o.WQX)(P.u),this.#e=(0,o.WQX)(K.Z),this.#_=(0,o.WQX)(d.W8),this.#l=`cXenseParse:${this.#n.funnel.pianoBrandPrefix}-subscriptionTags`,!this.#n.isServerside&&((0,o.QZP)(()=>{this.#o?.hasGrant(this.vendorId).then(e=>{this.hasConsent.set(e)})}),(0,o.QZP)(()=>(0,i.provideData)(s.xD,this.#h())))}init(){var e=this;this.#f.readyToLoad.then(()=>this.loadScript()),this.#m.contentStream.subscribe(r=>{this.content=r,this.updateMetaTags(r),a()(function*(){yield e.waitForScriptLoaded,!1!==e.#t.value&&(yield e.providePageData())})()})}providePageData(){var e=this;return a()(function*(){const r=yield(0,E._)(e.#a.replaySubject),D=yield(0,E._)(e.#a.premiumProducts),C=yield e.#a.hasAccessCategory(O.K.Paid),T=e.content;if(null===T)return;if(null!==e.window&&e.window.performance.mark("piano_experience_start"),e.#s=Date.now(),e.#i.next(!1),null===r)return(0,i.provideData)(s.GK,{content:T}),void(0,i.provideDataWithHistory)(s.GK,{content:T});const y={...r,accountId:r.accountId??"",email:r.email??"",firstName:r.firstName??null,lastName:r.lastName??null,premiumProducts:D,isSubscriber:C};(0,i.provideData)(s.GK,{user:y,content:T}),(0,i.provideDataWithHistory)(s.GK,{user:y,content:T})})()}#v(){if(0===this.#s)return;const e=Date.now()-this.#s,r={group:this.#e.getGroupForSummaryInMilliseconds(e,250,10)};this.#e.summary("piano_experience_load_time",e,r),this.#e.count("piano_experience_received")}loadScript(){var e=this;return a()(function*(){if(!e.#t.value&&null!==e.#o)try{yield e.#o.hasGrant(e.vendorId).then(r=>{if(!1===r)throw new Error("No consent for piano")}),(0,i.subscribe)(s._p,()=>{e.#v(),e.#i.next(!0)}),yield(0,L.d)(e.#u,e.#n.funnel.piano,"module"),e.#e.count("piano_loaded"),e.#t.next(!0)}catch{e.#e.count("piano_not_loaded"),e.#t.next(!1),e.#i.next(!0)}})()}updateMetaTags(e){this.removeTags(),this.addTag(this.getContentClassification(e).toLowerCase()),this.isRepublished(e)&&this.addTag("republished"),(0,R.Ri)(e)&&this.addTag("podcast_detailpage"),(0,R.fO)(e)&&this.addTag("live_detailpage"),this.addTag(this.getContentAccessCategory(e)),this.addTag(this.getKicker(e),g.KICKER_META_TAG_NAME),this.addTag(this.getArticleId(e),g.ARTICLE_ID_META_TAG_NAME);const r=this.getSubscriptionTags(e);r&&r.length>0&&this.addTag(r.join(","),this.#l,r.length>1?{"data-separator":","}:void 0)}isRepublished(e){return!!(0,R.ni)(e)&&!0===e.header.dates.republished}getContentAccessCategory(e){return"meta"in e&&"contentAccessCategory"in e.meta?{[n.EjM.none]:"",[n.EjM.hPlus]:"h+",[n.EjM.hPlusPremium]:"h+ premium",[n.EjM.hPlusPremiumBusiness]:"h+ premium business",[n.EjM.wiwoPlus]:"wiwo+"}[e.meta.contentAccessCategory]:""}getSubscriptionTags(e){if("meta"in e&&"subscriptionTags"in e.meta)return e.meta.subscriptionTags}getContentClassification(e){return"meta"in e&&"classification"in e.meta?e.meta.classification:n.cGP.free}getKicker(e){return"header"in e&&"kicker"in e.header?e.header.kicker:""}getArticleId(e){return"meta"in e&&"id"in e.meta&&"string"==typeof e.meta.id?e.meta.id:""}addTag(e,r,D){0!==e.length&&this.#_.addTag({name:r??this.getMetaTagName(),content:e,...D})}removeTags(){for(const e of[this.getMetaTagName(),this.#l,g.KICKER_META_TAG_NAME,g.ARTICLE_ID_META_TAG_NAME]){const r=`name="${e}"`;
1for(;null!==this.#_.getTag(r);)this.#_.removeTag(r)}}getMetaTagName(){return`cXenseParse:${this.#n.funnel.pianoBrandPrefix}-articleState`}getMeteringRule(){var e=this;return a()(function*(){try{if(null!==e.#r)return e.#r;if(!0!==(yield e.waitForScriptLoaded))return null;const D=Date.now();e.#r=Promise.race([e.#n.funnel.getMeteringRule(),(0,E._)((0,c.O)(e.#d)).then(()=>null)]);const C=yield e.#r;if(null===C)return e.#e.count("piano_metering_timeout"),null;const T=Date.now()-D,y={group:e.#e.getGroupForSummaryInSeconds(T)};return e.#e.summary("piano_metering_load_time",T,y),e.#e.count("piano_metering_received"),{...C,isPianoMeteringRule:!0}}catch{return null}})()}getContentOrigin(e){return e.includes(v.j.original)?v.j.original:e.includes(v.j.piano)?v.j.piano:v.j.pending}getContentMode(e,r){return this.isPianoContentAllowed(r)?e===v.j.piano?M.K.piano:M.K.original:M.K.fallback}isPianoContentAllowed(e){return this.hasConsent()&&this.#E.isActive(e)}static{this.\u0275fac=function(r){return new(r||g)}}static{this.\u0275prov=o.jDH({token:g,factory:g.\u0275fac,providedIn:"root"})}}return g})()},52889(I,h,t){t.d(h,{K:()=>m});var m=function(a){return a.fallback="fallback",a.piano="piano",a.original="original",a}(m||{})},57166(I,h,t){t.d(h,{j:()=>m});var m=function(a){return a.pending="",a.piano="piano",a.original="original",a}(m||{})},68477(I,h,t){t.d(h,{x:()=>f});var m=t(29293),a=t.n(m),o=t(31635),d=t(47266),P=t(99829),M=t(12654),v=t(26034),O=t(99289),A=t(14907),L=t(93077),p=t(82444),K=t(5964),R=t(43524),S=t(29885);class f{static{this.FREE_ARTICLES_REMAINING_TOAST=Object.freeze({message:"Nur noch wenige Freiartikel verf\xfcgbar."})}static{this.NO_FREE_ARTICLES_REMAINING_TOAST=Object.freeze({message:"Sie haben das Limit Ihrer Freiartikel erreicht!",type:v.C.important})}constructor(n,i,s,u,_,E,l){this.environment=n,this.document=i,this.router=s,this.localStorageService=u,this.userService=_,this.injector=E,this.pianoService=l,this.METERING_STORAGE_KEY="HB.METERING",this.LIMIT_ALMOST_REACHED_COUNT=5,this._activeRule=null,this.alreadyCountedForThisNavigation=!1,this.environment.metering.enabled&&(this.removeOldClicks(n.metering.expiresAfterDays),this.router.events.pipe((0,K.p)(c=>c instanceof P.wF)).subscribe(()=>{this.alreadyCountedForThisNavigation=!1}))}get activeRule(){return"string"==typeof this.store?.id?{id:this.store.id,limit:this.store.limit,count:this.count}:null}getRule(){var n=this;return a()(function*(){return n.environment.metering.enabled?(n._activeRule||(yield n.setRule()),n._activeRule):null})()}get count(){return Object.values(this.store.count).reduce((n,i)=>n+i,0)}get rules(){return this.environment.metering.rules}get today(){return(new Date).toLocaleDateString("en-US")}get store(){return this.localStorageService.get(this.METERING_STORAGE_KEY)??{count:{}}}set store(n){this.localStorageService.set(this.METERING_STORAGE_KEY,n)}removeOldClicks(n){const i=24*n*60*60*1e3,s=(new Date).getTime(),u={...this.store,count:{}};Object.keys(this.store.count).forEach(_=>{s-new Date(_).getTime()<i&&(u.count[_]=this.store.count[_])}),this.store=u}increaseStore(n){const i=this.store,{id:s,limit:u,isPianoMeteringRule:_}=n,E=(i.count[this.today]??0)+1,l={...i.count,[this.today]:E};this.store={...i,count:l,id:s,limit:u,isPianoMeteringRule:_??!1}}setRule(){var n=this;return a()(function*(){const{location:i,referrer:s,defaultView:u}=n.document,_=n.rules.find(l=>{let c=!0;return l.restrictions.url&&(c=c&&l.restrictions.url.test(i.href)),l.restrictions.referrer&&(c=c&&l.restrictions.referrer.test(s)),l.restrictions.userAgent&&u&&(c=c&&l.restrictions.userAgent.test(u.navigator.userAgent)),c});if(_&&!1===_.canBeOverwrittenByPiano)return void(n._activeRule=_);const E=yield n.pianoService.getMeteringRule();n._activeRule=null===E?n.isPianoMeteringRuleStored?n.getStoredPianoMeteringRule():_??null:E})()}get isPianoMeteringRuleStored(){return!0===this.store.isPianoMeteringRule}getStoredPianoMeteringRule(){return this.store.isPianoMeteringRule&&this.store.id&&this.store.limit?{id:this.store.id,restrictions:{},limit:this.store.limit,isPianoMeteringRule:!0,canBeOverwrittenByPiano:!0}:null}
1isLimitReached(n){return this.count>=n.limit&&!this.alreadyCountedForThisNavigation}getMeteringHeader(n){var i=this;return a()(function*(){const[,s]=/\/(\d+)\.html(\?.*)?$/.exec(n)??[];if("string"!=typeof s)return"1";const _=yield i.getRule();return _?i.isLimitReached(_)?"1":"0":"1"})()}increaseCount(n){var i=this;return a()(function*(){if(!i.environment.metering.enabled)return;const s=yield i.getRule(),u=!!s&&i.isLimitReached(s);i.informUserAboutRemainingFreeArticles(n,u),s&&!i.alreadyCountedForThisNavigation&&n===p.cGP.metered&&!u&&(i.alreadyCountedForThisNavigation=!0,i.increaseStore(s))})()}informUserAboutRemainingFreeArticles(n,i){var s=this;return a()(function*(){const u=n===p.cGP.metered,_=yield s.userService.hasAccessCategory(O.K.Paid);if(!u||_)return;const{ToastService:E}=yield t.e(8057).then(t.bind(t,60438)),l=s.injector.get(E);if(i)return l.add(f.NO_FREE_ARTICLES_REMAINING_TOAST);const c=yield s.getRule();return(c?c.limit-s.count:0)<s.LIMIT_ALMOST_REACHED_COUNT?l.add(f.FREE_ARTICLES_REMAINING_TOAST):void 0})()}static{this.\u0275fac=function(i){return new(i||f)(d.KVO(A.M),d.KVO(d.qQL),d.KVO(P.Ix),d.KVO(L.s),d.KVO(S.UserService),d.KVO(d.zZn),d.KVO(R.PianoService))}}static{this.\u0275prov=d.jDH({token:f,factory:f.\u0275fac,providedIn:"root"})}}(0,o.Cg)([(0,M.Y)({defaultValue:{count:{}}}),(0,o.Sn)("design:type",Object),(0,o.Sn)("design:paramtypes",[Object])],f.prototype,"store",null),(0,o.Cg)([(0,M.Y)({defaultValue:Promise.resolve()}),(0,o.Sn)("design:type",Function),(0,o.Sn)("design:paramtypes",[]),(0,o.Sn)("design:returntype",Promise)],f.prototype,"setRule",null)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.