PageSourceSearch

https://www.dottnet.it/chunk-DKKIKRSU.js

js dottnet.it collected 2026-09-24 23:00:19 UTC 14,691 bytes, 2 lines download raw bytes

1import{H as h,n as H,sa as y}from"./chunk-D6D3AAD3.js";import{C as G}from"./chunk-PNFMGFAD.js";import{Na as W,Ta as V,Za as P,d as o,e as _,f as N,h as b,j as F}from"./chunk-4Y56RSU2.js";import{$b as L,Ba as a,Db as B,Ed as g,La as A,Ma as p,Na as w,Pb as C,Qb as T,Ra as v,Zb as u,_b as m,_c as D,ab as O,ad as M,cc as E,dd as c,fc as S,jb as f,jd as U,mb as k,tb as q,tc as R,wa as j}from"./chunk-Z6AKCX7O.js";var $=(()=>{class n{static{this.eventListenersRegistered=!1}constructor(){this.logService=a(y),this.document=a(p),this.logService.info("PRBService constructor"),typeof pbjs>"u"?this.logService.error("PRB is not loaded. Make sure the script is included in your index.html"):this.logService.info("PRB is defined")}getCuratorId(){return typeof getCuratorId=="function"?getCuratorId():null}initializePrebid(e,t,i,s,d){let r=this.getBannerSize(t);this.logService.info("PRB Bidder banner size:",r),pbjs.que=pbjs.que||[],pbjs.que.push(()=>{this.logService.info("PRB Bidder queue is running..."),this.setBidderConfigWithLogging(i);let l=[{code:e,mediaTypes:{banner:{sizes:r}},bids:[{bidder:"docereeadmanager",params:{placementId:this.getPlacemenId(t,s),publisherUrl:this.document.location.href}}],safeframe:{allowExpansionByPush:!0,allowExpansionByOverlay:!0,sandbox:"allow-scripts allow-same-origin"}}];this.registerEventListenersOnce(),this.logService.info("PRB Adding ad units:",l),this.logService.info("PRB Requesting bids..."),pbjs.requestBids({adUnits:l,bidsBackHandler:()=>{this.handleBidsBack(),pbjs.setTargetingForGPTAsync(),d&&typeof googletag<"u"&&googletag.cmd.push(()=>{googletag.pubads().refresh([d])})}})})}getBannerSize(e){return b(e)}getPlacemenId(e,t){switch(t){case"xs":return"DOC-1080-1";case"sm":return e===o.Square?"DOC-1080-1":"DOC-1081-1";default:return e===o.Square?"DOC-1080-1":"DOC-1301-1"}}handleBidsBack(){let e=pbjs.getBidResponses();this.logService.info("PRB Bid Responses:",e),this.logService.info("PRBTargeting set:",JSON.stringify(pbjs.getAdserverTargeting())),Object.keys(e).forEach(t=>{let i=e[t].bids;i&&i.length>0?i.forEach(s=>{this.logService.info(`PRB Bid for ${t}:`,s)}):this.logService.warn(`PRB No bids received for ad unit: ${t}`)})}setBidderConfigWithLogging(e){this.logService.info("PRB Attempting to set bidder config..."),typeof pbjs.setBidderConfig=="function"?(this.logService.info("PRB Bidder getCuratorId:",this.getCuratorId()),pbjs.setBidderConfig({bidders:["docereeadmanager"],config:{docereeadmanager:{user:{data:{specialization:e,platformUid:this.getCuratorId()}}}}}),this.logService.info("PRB Bidder config set successfully")):this.logService.error("PRB setBidderConfig is not a function. Check Prebid.js version.")}registerEventListenersOnce(){n.eventListenersRegistered||(n.eventListenersRegistered=!0,pbjs.onEvent("auctionInit",e=>{this.logService.info("PRB Auction Init:",e)}),pbjs.onEvent("bidRequested",e=>{this.logService.info("PRB Bid Requested:",e),e.bids.forEach(t=>{t.bidder==="docereeadmanager"&&this.logService.info("prebid Doceree Bid Request:",t)})}),pbjs.onEvent("bidResponse",e=>{this.logService.info("PRB Bid Response:",e)}),pbjs.onEvent("auctionEnd",e=>{this.logService.info("Prebid Auction End:",e);let t=googletag.pubads().getSlots().map(i=>({slot:i.getAdUnitPath(),targeting:i.getTargetingMap()}));this.logService.info("GPT Targeting prebid:",t)}),pbjs.onEvent("bidWon",e=>{this.logService.info("PRB Bid Won:",e)}),pbjs.onEvent("bidTimeout",e=>{this.logService.warn("PRB Bid Timeout:",e)}),pbjs.onEvent("adRenderFailed",e=>{this.logService.info("PRB Ad render failed:",e)}))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=j({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function K(n,x){if(n&1&&(u(0,"div"),L(1,"div",1),m()),n&2){let e=S(2);f(),R(e.bannerTypeClass),E("id",e.divLivrea())}}function Q(n,x){if(n&1&&C(0,K,2,3,"div"),n&2){let e=S();T(e.livreaEmpty()?-1:0)}}function Y(n,x){if(n&1&&(u(0,"div"),L(1,"div",1),m()),n&2){let e=S();f(),R(e.bannerTypeClass),E("id",e.divCode())}}var I=50,me=(()=>{class n{constructor(){this.BannerVisualizationType=o,this.destroyRef=a(w),this.logService=a(y),this.platformId=a(O),this.document=a(p),this.changeDetectorRef=a(U),this.renderer=a(k),this.router=a(W),this.envService=a(V),this.prebidService=a($),this.bpObserver=a(H),this.injector=a(A),this.targetBanner=c(null),this.bannerType=c(o.Billboard),this.isUserLogged=c(!1),this.topic=c(null),this.livreaActiveFlag=c(!0),this.adSlot=c(null),this.showLivrea=!0,this.divCode=v(""),this.divLivrea=v(""),this.livreaEmpty=v(!1),this.breakpoint="",this.previousLoggedState=!1,this.previousTarget=null,this.activeSlots=[],this.slotMap=new Map,this.slotRenderEndedCallback=null,M(()=>{let e=this.targetBanner(),t=this.isUserLogged();g(this.platformId)&&D(()=>{let i=this.previousLoggedState!==t;if(i&&(this.logService.info("banner effect Login state changed:",t),this.previousLoggedState=t),!e){this.previousTarget=null,this.logService.info("banner effect targetBanner is null"),this.clearAllBanners();return}!i&&_(this.previousTarget,e)||(this.previousTarget=e,this.logService.info("banner effect targetBanner changed:",e),this.setupBanner(e))})}),M(()=>{let e=this.topic(),t=this.targetBanner(),i=this.isUserLogged();!g(this.platformId)||!t||D(()=>
1{if(e?.isSold&&i)this.logService.info("topic changed and is sold:",e),this.handleTopicChange(e,t);else if(this.topicDiv){this.logService.info("topic not sold (or guest): resetting banner to default"),this.clearAllBanners(),this.topicDiv=void 0;let s=this.adSlot();this.divCode.set(s?.divCode??""),s&&B(()=>this.setupBanner(t),{injector:this.injector})}})})}ngOnInit(){let e=this.adSlot();if(this.resolvedBannerType=e?.bannerType??this.bannerType(),this.logService.info("bannerType ",this.resolvedBannerType),this.bannerTypeClass=this.resolvedBannerType+"-banner",this.prebidActive=this.envService.prebidActive,this.adUnitLivrea=this.envService.adUnitLivrea,this.divLivrea.set(this.envService.divLivrea),e&&this.divCode.set(e.divCode),this.previousLoggedState=this.isUserLogged(),this.showLivrea=this.livreaActiveFlag(),this.showLivrea){let t=P(this.router.url.split("/")[1]);this.showLivrea=t?.livreaAttivo?t.livreaAttivo:P("home")?.livreaAttivo}this.changeDetectorRef.detectChanges()}ngAfterViewInit(){if(g(this.platformId)){this.breakpointSub=this.bpObserver.observe([h.XSmall,h.Small]).pipe(F(this.destroyRef)).subscribe(()=>{this.bpObserver.isMatched(h.XSmall)?this.breakpoint="xs":this.bpObserver.isMatched(h.Small)&&(this.breakpoint="sm")});try{this.dottnetToolbar=this.document.querySelector("dottnet-toolbar"),this.sidenavContentId=this.document.querySelector("#sidenav-content"),this.sidenavContainer=this.document.querySelector("mat-sidenav-container"),this.appWrapper=this.document.querySelector(".app-wrapper")}catch(e){this.logService.error("Error selecting DOM elements:",e)}typeof googletag<"u"&&(this.slotRenderEndedCallback=e=>{e.slot.getSlotElementId()===this.divLivrea()&&(e.isEmpty?(this.livreaEmpty.set(!0),this.changeDetectorRef.detectChanges(),this.logService.info("livrea bannertype empty"),this.removeLivreaStyle()):(this.logService.info("livrea bannertype not empty"),this.addLivreaStyle())),this.changeDetectorRef.detectChanges()},googletag.cmd.push(()=>{googletag.pubads().addEventListener("slotRenderEnded",this.slotRenderEndedCallback)}))}}clearAllBanners(){if(this.logService.info("Clearing all banner slots"),this.removeLivreaStyle(),typeof googletag<"u"&&this.activeSlots.length>0)try{googletag.cmd.push(()=>{try{let e=googletag.pubads().getSlots();for(let t of this.activeSlots){let i=e.find(s=>s.getSlotElementId()===t);i&&googletag.destroySlots([i])}this.clearBannerElements(),this.activeSlots=[],this.slotMap.clear()}catch(e){this.logService.error("Error clearing Google Tag Manager slots:",e)}})}catch(e){this.logService.error("Error executing Google Tag Manager command:",e)}else this.clearBannerElements();this.changeDetectorRef.detectChanges()}clearBannerElements(){try{let e=this.divCode();if(e){let i=this.document.getElementById(e);i&&(i.innerHTML="")}let t=this.divLivrea();if(t){let i=this.document.getElementById(t);i&&(i.innerHTML="")}if(this.topicDiv){let i=this.document.getElementById(this.topicDiv);i&&(i.innerHTML="")}}catch(e){this.logService.error("Error clearing banner elements:",e)}}handleTopicChange(e,t){this.showLivrea=!1;let i=this.resolvedBannerType,s=this.topicDiv;e.billboardDiv?.length>1&&i==o.Billboard&&(this.topicDiv=e.billboardDiv,this.divCode.set(e.billboardDiv),this.topicAdUnit=e.adUnitBillboard,this.topicSize=[[250,250],[970,250],[728,90]]),e.squareDiv?.length>1&&i==o.Square&&(this.topicDiv=e.squareDiv,this.divCode.set(e.squareDiv),this.topicAdUnit=e.adUnitSquare,this.topicSize=[[300,250],[250,250]]);let d=!!s&&s!==this.topicDiv;if(d&&this.destroySlot(s),this.changeDetectorRef.detectChanges(),d&&this.topicDiv){let r=this.document.getElementById(this.topicDiv);r&&(r.innerHTML="")}this.defineSlots(t,this.topicDiv,this.topicAdUnit,this.topicSize)}setupBanner(e){this.specialty=N(e.idSpecializzazione),this.logService.info("target banner specialty",this.specialty);let t=this.resolvedBannerType,i=this.adSlot();t!==o.Livrea&&i&&this.defineSlots(e,i.divCode,i.adUnit,b(i.bannerType)),G()&&this.resolvedBannerType==o.Livrea&&this.showLivrea&&this.setupLivreaSlot(e);let s=this.topic();s?.isSold&&this.isUserLogged()&&this.handleTopicChange(s,e)}setupLivreaSlot(e){let t=this.divLivrea();this.livreaEmpty()||!this.document.getElementById(t)?(this.destroySlot(t),this.livreaEmpty.set(!1),this.changeDetectorRef.detectChanges(),B(()=>this.defineSlots(e,t,this.adUnitLivrea,[[1024,768]]),{injector:this.injector})):(this.defineSlots(e,t,this.adUnitLivrea,[[1024,768]]),this.changeDetectorRef.detectChanges())}destroySlot(e){typeof googletag<"u"&&googletag.cmd.push(()=>{try{let t=googletag.pubads().getSlots().find(i=>i.getSlotElementId()===e);t&&googletag.destroySlots([t])}catch(t){this.logService.error("Error destroying slot:",t)}}),this.activeSlots=this.activeSlots.filter(t=>t!==e),this.slotMap.delete(e)}defineSlots(e,t,i,s){if(!t||!i||!s){this.logService.info("Missing required parameters for defineSlots",{div:t,adUnit:i,size:s});return}if(typeof googletag>"u"){this.logService.info("googletag is not defined");return}this.activeSlots.includes(t)||this.activeSlots.push(t),googletag.cmd.push(()=>{let d=googletag.pubads().getSlots().find(r=>r.getSlotElementId()===t);if(d)this.applyTargeting(d,e),googletag.pubads().refresh([d]);else if(this.document.getElementById(t)){let r=googletag.defineSlot(i,s,t);this.slotMap.set(t,r);let l=this.resolvedBannerType,X=!!this.topicDiv&&t===this.topicDiv,z=this.prebidActive&&!X&&(l===o.Billboard||l===o.Square||l===o.Leaderboard);z&&(this.logService.info("prebidActive TRUE"),this.initPrebid(t,l,this.specialty,this.breakpoint)),this.resolvedBannerType==o.Billboard&&r.defineSizeMapping(googletag.sizeMapping().addSize([992,0],[[970,250]]).addSize([768,0],[[728,90]]).addSize([320,0],[[250,250],[300,250]]).addSize([0,0],[[250,250]]).build()),this.resolvedBannerType==o.Leaderboard&&r.defineSizeMapping(googletag.sizeMapping().addSize([768,0],[[728,90]]).addSize([320,0],[[250,250],[300,250]]).addSize([0,0],[[250,250]]).build()),this.applyTargeting(r,e),r.addService(googletag.pubads()),googletag.cmd.push(()=>{googletag.display(t),z||googletag.pubads().refresh([r])}),this.changeDetectorRef.detectChanges()}this.changeDetectorRef.detectChanges()})}ngOnDestroy(){if(this.breakpointSub&&this.breakpointSub.unsubscribe(),g(this.platformId)){if(typeof googletag<"u"&&this.slotRenderEndedCallback){let e=this.slotRenderEndedCallback;googletag.cmd.push(()=>{googletag.pubads().removeEventListener("slotRenderEnded",e)}),this.slotRenderEndedCallback=null}this.clearAllBanners(),this.resolvedBannerType===o.Livrea&&this.removeLivreaStyle()}}removeLivreaStyle(){this.logService.info("remove divLivrea bannertype");try{let e=this.document.body;if(e){let t=e.querySelector("#GenecyDFPAdWallpaperCont");t&&e.removeChild(t)}this.sidenavContentId?.classList&&this.renderer.removeClass(this.sidenavContentId,"livrea-class"),this.sidenavContainer?.classList&&this.renderer.removeClass(this.sidenavContainer,"livrea-class"),this.dottnetToolbar?.classList&&this.renderer.removeClass(this.dottnetToolbar,"livreaToolbarStyle"),this.appWrapper?.classList&&this.renderer.removeClass(this.appWrapper,"livrea-active")}catch(e){this.logService.error("Error removing livrea style:",e)}}addLivreaStyle(){try{this.sidenavContentId?.classList&&this.renderer.addClass(this.sidenavContentId,"livrea-class"),this.sidenavContainer?.classList&&this.renderer.addClass(this.sidenavContainer,"livrea-class"),this.dottnetToolbar?.classList&&this.renderer.addClass(this.dottnetToolbar,"livreaToolbarStyle"),this.appWrapper?.classList&&this.renderer.addClass(this.appWrapper,"livrea-active")}catch(e){this.logService.error("Error adding livrea style:",e)}}initPrebid(e,t,i,s,d=0){if(!e){this.logService.info("divPreBid is undefined");return}if(window.pbjs){this.logService.info("PRB is defined, initializing...,",e);let r=this.slotMap.get(e);this.prebidService.initializePrebid(e,t,i,s,r)}else{if(d>=I){this.logService.error(`PRB failed to load after ${I} retries (${I*100}ms)`);return}this.logService.info("PRB not defined, waiting... (attempt "+(d+1)+")"),setTimeout(()=>this.initPrebid(e,t,i,s,d+1),100);return}}applyTargeting(e,t){e.clearTargeting(),this.isUserLogged()&&e.setTargeting("cat",String(t.idCategoria)).setTargeting("pr",String(t.idProvincia)).setTargeting("spec",String(t.idSpecializzazione)).setTargeting("cont",String(t.idContenuto)).setTargeting("tcont",String(t.idTipoContenuto)).setTargeting("can",String(t.idCanale)).setTargeting("tcan",String(t.idTipoCanale))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=q({type:n,selectors:[["dottnet-banner"]],inputs:{targetBanner:[1,"targetBanner"],bannerType:[1,"bannerType"],isUserLogged:[1,"isUserLogged"],topic:[1,"topic"],livreaActiveFlag:[1,"livreaActiveFlag"],adSlot:[1,"adSlot"]},decls:3,vars:1,consts:[[1,"flex-row","flex-justify-center","flex-align-center","banner-container"],[3,"id"]],template:function(t,i){if(t&1&&(u(0,"div",0),C(1,Q,1,1)(2,Y,2,3,"div"),m()),t&2){let s;f(),T((s=i.bannerType())===i.BannerVisualizationType.Livrea?1:2)}},styles:[".billboard-banner[_ngcontent-%COMP%]{margin:8px;height:250px}.square-banner[_ngcontent-%COMP%]{margin:8px 0;height:250px;max-width:300px}.leaderboard-banner[_ngcontent-%COMP%]{margin:8px;height:100%}@media (min-width: 768px) and (max-width: 960px){.billboard-banner[_ngcontent-%COMP%]{height:90px}}"],changeDetection:0})}}return n})();export{me as a};
2//# sourceMappingURL=chunk-DKKIKRSU.js.map

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.