1import{f as q}from"./chunk-MIXPOUNZ.js";import{$b as F,Ca as x,Cb as _,Da as A,H as g,Hb as B,He as $,Ia as W,Ib as R,R as y,Sb as D,Wb as E,_b as k,ac as M,cc as N,cd as Q,fb as c,jd as V,na as b,nb as j,pa as C,sa as S,ta as I,tb as T,v as u,va as v,xg as L,yc as P,zc as O}from"./chunk-ADQO3XXX.js";var K=(()=>{let e=class e{constructor(i,t){this.siteService=i,this.languageService=t}init(){return this.siteService.getSite().pipe(g(Boolean),y(1),u(i=>i.affirmConfig),C(this.languageService.getActive()),b(([i,t])=>{i&&(window._affirm_config={public_api_key:i.publicKey,script:i.scriptUrl,country_code:i.countryCode,locale:t},this.triggerAffirm())}))}isEnabled(){return this.siteService.getSite().pipe(g(Boolean),y(1),u(i=>!!i.affirmConfig))}triggerAffirm(){(function(i,t,s,f,r,m,h,a){let o=i[s]||{},l=document.createElement(m),w=document.getElementsByTagName(m)[0],d=function(G,H,J){return function(){G[H]._.push([J,arguments])}};o[f]=d(o,f,"set");let p=o[f];for(o[r]={},o[r]._=[],p._=[],o._=[],o[r][h]=d(o,r,h),o[a]=function(){o._.push([h,arguments])},r=0,a="set add save post open empty reset on off trigger ready setProduct".split(" ");r<a.length;r++)p[a[r]]=d(o,f,a[r]);for(r=0,a=["get","token","url","items"];r<a.length;r++)p[a[r]]=function(){};l.async=!0,l.src=t[m],w.parentNode.insertBefore(l,w),delete t[m],p(t),i[s]=o})(window,window._affirm_config,"affirm","checkout","ui","script","ready","jsReady")}};e.\u0275fac=function(t){return new(t||e)(v(q),v(L))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var Z=["affirm"];function ee(n,e){if(n&1&&(B(0,"div",1,0),N(2,"\xA0"),R()),n&2){let U=D();E("id","affirm-promo-",U.id,"")}}var ie=0,oe=(()=>{let e=class e{constructor(i,t,s){this.winRef=i,this.renderer=t,this.affirmService=s,this.pageType="product",this.showWhenBelow=!0,this.showWhenAbove=!0,this.id=++ie,this.affirmComponent=void 0,this.enabled$=this.affirmService.isEnabled()}get amount(){return this.eligibility.eligible?this.eligibility.amount.intValue:0}get shouldRender(){return this.eligibility.eligible||this.eligibility.reason===void 0?!0:this.eligibility.reason<0?this.showWhenBelow:this.showWhenAbove}ngOnInit(){if(this.winRef.nativeWindow)try{this.affirmComponent=this.winRef.nativeWindow.affirm?.ui.components.create("promo",{pageType:this.pageType,amount:this.amount})}catch{}}ngAfterViewInit(){this.render()}ngOnChanges(){this.affirmDiv?.nativeElement&&this.renderer.setProperty(this.affirmDiv.nativeElement,"textContent"," "),this.affirmComponent?.update({pageType:this.pageType,amount:this.amount}),this.render()}render(){this.affirmComponent?.render(`#affirm-promo-${this.id}`)}};e.\u0275fac=function(t){return new(t||e)(c($),c(j),c(K))},e.\u0275cmp=x({type:e,selectors:[["sip-affirm-messaging"]],viewQuery:function(t,s){if(t&1&&k(Z,5),t&2){let f;F(f=M())&&(s.affirmDiv=f.first)}},inputs:{eligibility:"eligibility",pageType:"pageType",showWhenBelow:"showWhenBelow",showWhenAbove:"showWhenAbove"},features:[W],decls:2,vars:3,consts:[["affirm",""],[1,"affirm-promo-message",3,"id"]],template:function(t,s){t&1&&(T(0,ee,3,2,"div",1),P(1,"async")),t&2&&_(0,O(1,1,s.enabled$)&&s.shouldRender?0:-1)},dependencies:[Q],styles:[".affirm-promo-message[_ngcontent-%COMP%]{font-size:16px;padding-top:10px;height:60px}"],changeDetection:0});let n=e;return n})();var pe=(()=>{let e=class e{};e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=A({type:e}),e.\u0275inj=I({imports:[V]});let n=e;return n})();export{K as a,oe as b,pe as c};
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.