1import{b as p,ai as d,ah as n,J as u,S as l,C as v}from"./storefrontApp.5Jl33SLO.min.js";import{S as m}from"./chunk-storefront_base_lit_element.BngXaMu.js";import{e as f}from"./chunk-vendor-lit.NvY0u02.js";import{P as h}from"./chunk-product_review_events.Ro9L3Du.js";import"./chunk-vendor-di.Bh23gdA.js";import"./chunk-storefront_settings_constants.DIF02Gz.js";import"./chunk-vendor-rxjs.Dp7kflo.js";import"./chunk-vendor-lodash.CWHFt7Z.js";import"./chunk-vendor-phoenix.cdKS79L.js";class R extends p{constructor(e){super(),this._rateAndReviewApi=e}disableVotingIfAlreadyVoted(e,i){this._rateAndReviewApi.selectHasBeenReviewed$(e).subscribe(o=>{if(o||this._rateAndReviewApi.hasBeenReviewed(e)){const t=i.querySelector("product-vote"),r=i.querySelector("product-vote[disabled]");t&&(t.hidden=!0),r&&(r.hidden=!1)}})}}var E=Object.defineProperty,_=(s,e,i,o)=>{for(var t=void 0,r=s.length-1,a;r>=0;r--)(a=s[r])&&(t=a(e,i,t)||t);return t&&E(e,i,t),t};class c extends m{constructor(){super(...arguments),this.productId=""}static{this.moduleName=d.component}connectedCallback(){super.connectedCallback(),this.getApi(n.api).then(e=>{new R(e).disableVotingIfAlreadyVoted(this.productId,this)}),this.eventBus.emit(new u(h.reviewsRendered))}}_([f({type:String,attribute:"product-id"})],c.prototype,"productId");class y extends l{static{this.dependencies=[n.feature]}static{this.featureName=d.feature}init(){return{cores:[{type:v,instance:[c]}]}}}export{y as ProductReviewInitializer};
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.