SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./BkjgI35gdl.js",import.meta.url,"BkjgI35gdl");SML.di("./D5IdwQBwqd.js",import.meta.url,"D5IdwQBwqd");
SML.dm("0Z5i5741wq",["C42E8rVVpA","CsxDAjmHZE","BkjgI35gdl","D5IdwQBwqd"],(async(t,e,s,i)=>{const o=i.W(e.s);let r=class extends o{constructor(){super(...arguments),this.shareButtonText="",this.permalink="",this.size=t.ac.Medium,this.menuSize=s.L.Medium,this.buttonClass="",this.isDesktopViewport=!1,this.ssr=!1,this.appearance="secondary",this.shareMenuFeatureName=t.aB,this.shareMenuTemplateId=i.S,this.useButton=!1,this.useMenu=!1,this.showFullButtons=!1,this.translationLanguage=""}static get styles(){return[t.t]}handlePostShareClick(t){this.isAllowedEvent(t)&&(this.isDesktopViewport?this.handleDesktopShareClick(t):this.handleMobileShareClick(t),this.ssr&&(this.isShareDropdownOpened?this.handleShareDropdownClose():this.handleShareDropdownOpen()))}render(){return this.ssr?e.x` `:this.useMenu?this.renderOnlyShareMenuItem({handleShareClick:this.handlePostShareClick,menuSize:this.menuSize,attributes:{className:this.buttonClass}}):this.useButton?this.renderOnlyShareButton({handleShareClick:this.handlePostShareClick,size:this.size,attributes:{className:this.buttonClass},showFullButtons:this.showFullButtons}):this.renderShareDropdown({handleShareClick:this.handlePostShareClick,appearance:this.appearance,size:this.size,shareButtonText:this.shareButtonText,attributes:{className:this.buttonClass}})}};t._([t.n({type:String,attribute:"share-button-text"})],r.prototype,"shareButtonText",void 0),t._([t.n({type:String})],r.prototype,"permalink",void 0),t._([t.n({type:String})],r.prototype,"size",void 0),t._([t.n({type:String})],r.prototype,"menuSize",void 0),t._([t.n({type:String,attribute:"button-class"})],r.prototype,"buttonClass",void 0),t._([t.n({type:Boolean,attribute:"is-desktop-viewport"})],r.prototype,"isDesktopViewport",void 0),t._([t.n({type:Boolean,attribute:"ssr"})],r.prototype,"ssr",void 0),t._([t.n({type:String})],r.prototype,"appearance",void 0),t._([t.n({type:String,attribute:"share-menu-feature-name"})],r.prototype,"shareMenuFeatureName",void 0),t._([t.n({type:String,attribute:"share-menu-template-id"})],r.prototype,"shareMenuTemplateId",void 0),t._([t.n({type:Boolean,attribute:"use-button"})],r.prototype,"useButton",void 0),t._([t.n({type:Boolean,attribute:"use-menu"})],r.prototype,"useMenu",void 0),t._([t.n({type:Boolean,attribute:"show-full-buttons"})],r.prototype,"showFullButtons",void 0),t._([t.n({type:String})],r.prototype,"translationLanguage",void 0),r=t._([t.e("shreddit-post-share-button")],r)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");
SML.dm("1i4g9fLWHY",["C42E8rVVpA","CsxDAjmHZE","DUzIBJc2in"],(async(e,a,t)=>{let r=class extends e.h4{constructor(){super(...arguments),this._fullscreenBlurEl=document.createElement("div"),this._appliedBlurFilter=null,this._blurElement=null,this.shouldContentScroll=!1,this.isFooterEmpty=!0,this.render=()=>{const t=a.x` `,r=a.x`
`,n=a.x` `;return a.x` ${e.cA(this.modal?"\n \n":"\n \n")} `}}static get styles(){return a.i`${e.h4.styles}:host{--content-padding:var(--spacer-md);box-sizing:border-box;max-width:none;border-radius:var(--rem16);padding:0;overflow:hidden}#wrapper{display:flex;flex-direction:column;align-items:center;height:100%;position:relative;font-size:16px;box-sizing:border-box;max-height:inherit;min-height:inherit;overflow:hidden}slot[name=closeButton]{display:inline-flex;position:absolute;position:absolute;top:0;inset-inline-end:0;margin:var(--content-padding)}#header{display:flex;flex-direction:column;gap:var(--spacer-sm);align-items:center;text-align:start;width:100%;box-sizing:border-box}#header.with-icon{text-align:center;padding:0 var(--rem40)}slot[name=title]{font-size:var(--rem18);font-weight:700}slot:not([name]){display:flex;flex-grow:1;width:100%;padding:var(--spacer-xs) 0;font-size:var(--rem14)}#footer{display:flex;flex-direction:column;gap:var(--spacer-sm);width:100%;background:var(--color-ui-modalbackground);padding:var(--spacer-md);box-sizing:border-box}slot[name=tertiaryButton]{display:inline-flex;justify-content:center;font-size:14px}#footer.empty{display:none}@media (min-width:640px){#content{padding:var(--content-padding)}#header,#header.with-icon{flex-direction:row;padding-inline:0 var(--spacer-2xl)}#footer{flex-direction:row-reverse;align-items:center;justify-content:end}slot[name=tertiaryButton]{margin-inline-end:auto}slot[name=title]{text-align:start}}#content{height:100%;max-height:100%;width:100%;overflow:auto;position:relative;--content-padding:var(--spacer-md);padding:var(--content-padding);box-sizing:border-box;flex:1}.overflowing-content{max-height:100%;overflow-y:auto}.sticky-footer{box-shadow:var(--elevation-md)}slot[name=closeButton].floating{box-shadow:var(--elevation-sm);border-radius:999px}`}connectedCallback(){super.connectedCallback(),Object.assign(this._fullscreenBlurEl.style,{position:"fixed",top:"0",bottom:"0",right:"0",left:"0",backdropFilter:n(4)})}disconnectedCallback(){this._fullscreenBlurEl.remove(),e.g_.remove(this),this.resizeObserver?.disconnect()}firstUpdated(){this.resizeObserver=new ResizeObserver((()=>{this.measureShouldContentScroll()})),this.resizeObserver.observe(this.content)}calcFooterChildren(){this.isFooterEmpty=!(this._footerSlot?.length||this._primaryButtonSlot?.length||this._secondaryButtonSlot?.length||this._tertiaryButtonSlot?.length)}measureShouldContentScroll(){this.shouldContentScroll=Boolean(this.content?.scrollHeight&&this.content?.scrollHeight>this.content.offsetHeight)}showModal(a){if(e.g_.add(this),super.showModal(),null!=a?.blur){const e=!0===a.blur?4:Number(a.blur);this._appliedBlurFilter=n(e),a?.blurElement?(this._blurElement=a.blurElement,t=this._blurElement,r=this._appliedBlurFilter,t.style.filter=t.style.filter+" "+r):(Object.assign(this._fullscreenBlurEl.style,{backdropFilter:this._appliedBlurFilter}),document.body.append(this._fullscreenBlurEl))}var t,r}close(){this.open&&(super.close(),e.g_.remove(this),null!=this._blurElement&&null!=this._appliedBlurFilter?(!function(e,a){const t=e.style.filter.split(" ").filter(Boolean).reverse(),r=t.indexOf(a);if(-1===r)return;t.splice(r,1),e.style.filter=t.reverse().join(" ")}(this._blurElement,this._appliedBlurFilter),this._appliedBlurFilter=null,this._blurElement=null):this._fullscreenBlurEl.remove())}};function n(e){return`blur(${e}px)`}e._([e.v()],r.prototype,"shouldContentScroll",void 0),e._([e.l({slot:"titleGraphic"})],r.prototype,"_titleGraphic",void 0),e._([e.Q("#content")],r.prototype,"content",void 0),e._([e.Q("#footer")],r.prototype,"footer",void 0),e._([e.v()],r.prototype,"isFooterEmpty",void 0),e._([e.av({slot:"footer",flatten:!0})],r.prototype,"_footerSlot",void 0),e._([e.av({slot:"primaryButton",flatten:!0})],r.prototype,"_primaryButtonSlot",void 0),e._([e.av({slot:"secondaryButton",flatten:!0})],r.prototype,"_secondaryButtonSlot",void 0),e._([e.av({slot:"tertiaryButton",flatten:!0})],r.prototype,"_tertiaryButtonSlot",void 0),r=e._([e.e("faceplate-modal")],r);const i=()=>"Something went wrong saving the avatar.",o=()=>"Something went wrong while saving the banner.";function l(e){return e?.[0]?.message??"Something went wrong";}const s=e=>({error:e||"There was an error uploading the file."});async function d(a,r){const n=t.U.get(a.type);if(!n)throw new Error(`${a.type} files are not supported.`);try{const i=await async function(a){const t=await e.C({operation:e.H.CreateSubredditStructuredStylesUploadLease,variables:{input:a}});if(t.errors?.length)throw new Error(l(t.errors));const r=t.data.createSubredditStructuredStylesUploadLease;if(r?.ok&&r.uploadLease)return{uploadLeaseUrl:r.uploadLease.uploadLeaseUrl,uploadLeaseHeaders:r.uploadLease.uploadLeaseHeaders};throw new Error(l(r?.errors))}({...r,filepath:a.name,mimetype:n}),o=await t.X(a,i);return o?{url:o}:s()}catch(e){return i=e.message,window.Sentry?.captureMessage?.(`Media file upload failed with error: ${i}`),s(e.message)}var i}return {C:class{constructor(){this.url=void 0}async makeGQLRequest(...a){return e.C(...a)}async uploadMedia(...e){return d(...e)}async saveImage({subredditId:e,url:a,fileContent:t,uploadType:r,gqlOperation:n}){if(t)try{const n=await this.uploadMedia(t,{subredditId:e,imagetype:r});if(a=n.url?decodeURIComponent(n.url):a,n.error)return this.handleError(r);this.url=a}catch(e){return this.handleError(r)}try{await this.makeGQLRequest({operation:n,variables:{input:{subredditId:e,[this.getOperationArg(r)]:a??""}}})}catch(e){return this.handleError(r)}return null}async saveCommunityIcon(a,t,r){return this.saveImage({subredditId:a,url:t,fileContent:r,uploadType:e.h5.CommunityIcon,gqlOperation:e.H.UpdateSubredditIcon})}async saveBanner(a,t,r){return this.saveImage({subredditId:a,url:t,fileContent:r,uploadType:e.h5.BannerBackgroundImage,gqlOperation:e.H.UpdateSubredditBanner})}async saveMobileBanner(a,t,r){return this.saveImage({subredditId:a,url:t,fileContent:r,uploadType:e.h5.MobileBannerImage,gqlOperation:e.H.UpdateSubredditBanner})}handleError(a){switch(a){case e.h5.BannerBackgroundImage:return o();case e.h5.MobileBannerImage:return "Something went wrong while saving the mobile banner.";case e.h5.CommunityIcon:default:return i()}}getOperationArg(a){switch(a){case e.h5.BannerBackgroundImage:return"bannerBackgroundImage";case e.h5.MobileBannerImage:return"mobileBannerImage";case e.h5.CommunityIcon:default:return"communityIcon"}}},E:o,get F(){return r},O:"mod-show-post-level-crowd-control-modal",a:i,u:d};}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("2otSEWQ18j",["C42E8rVVpA","CsxDAjmHZE"],(async(e,t)=>{let n=class extends t.s{render(){return t.x` `}interactionHandler(e){e instanceof KeyboardEvent&&"Enter"!==e.key||this.dispatchEvent(new Event("interactionEvent"))}};n=e._([e.e("shreddit-interactable-element")],n)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./Yp_OV6CjXa.js",import.meta.url,"Yp_OV6CjXa");SML.di("./2otSEWQ18j.js",import.meta.url,"2otSEWQ18j");
SML.dm("4sA0yuQ93h",["C42E8rVVpA","CsxDAjmHZE","Yp_OV6CjXa","2otSEWQ18j"],(async(e,i,t)=>{const r=e=>{switch(e){case t.R.Spoiler:return `${"View spoiler"}`;case t.R.NsfwAndSpoiler:return `${"View NSFW content & spoilers"}`;default:return `${"View NSFW content"}`;}};let s=class extends i.s{constructor(){super(),this.blurred=!0,this.isNsfwAllowed=!0,this.blurRadius=40,this.mode=t.M.Slot,this.isCrosspost=!1,this.isRichtextContent=!1,this.hasMetadata=!1,this._windowEvents=new e.E(this,(()=>window)),this.handleNsfwEvent=e=>{if("xpromo/view/nsfw_blur"===e.SAN){this.isNsfwAllowed=!1;const e=this.querySelector('div[slot="revealed"]');e&&this.removeChild(e)}},this._windowEvents.define(e.by,this.handleNsfwEvent)}static get styles(){return[e.t,i.i`.outer{width:100%;overflow:hidden;z-index:0;position:relative}.overlay{cursor:pointer;position:absolute;width:100%;height:100%;top:0;left:0;z-index:1;display:flex;justify-content:center;align-items:center}.inner.blurred{display:block;pointer-events:none;background:rgba(0,0,0,.8)}.legacy-button{background:rgba(0,0,0,.07);border:1px solid #fff;color:#fff;padding:10px 20px;position:absolute;text-transform:uppercase;cursor:pointer}`]}renderOverlay(s){const n=this.reason?e.Z({appearance:"media",size:e.ac.Small,shape:"pill",children:r(this.reason)}):i.x``;return this.reason===t.R.Spoiler&&this.blurred?i.x`${o({content:n})}`:this.isNsfwAllowed&&this.blurred&&s?o({content:n}):""}render(){const r=this.isRichtextContent&&this.blurred,s=this.reason===t.R.NSFW||this.reason===t.R.NsfwAndSpoiler;return i.x` ${this.renderOverlay(s)}
${this.mode===t.M.Slot&&this.blurred?i.x` `:i.x` `} ${this.blurred?i.x`
`:""}
`}handleClick(){const e=this.reason===t.R.NSFW||this.reason===t.R.NsfwAndSpoiler;(this.reason===t.R.Spoiler&&this.blurred||this.blurred&&e)&&(this.isNsfwAllowed||this.reason===t.R.Spoiler)&&(this.blurred=!1)}};e._([e.v()],s.prototype,"blurred",void 0),e._([e.v()],s.prototype,"isNsfwAllowed",void 0),e._([e.n({type:Number,attribute:"blur-radius"})],s.prototype,"blurRadius",void 0),e._([e.n({type:String})],s.prototype,"reason",void 0),e._([e.n({type:String})],s.prototype,"mode",void 0),e._([e.n({type:Boolean,attribute:"is-crosspost"})],s.prototype,"isCrosspost",void 0),e._([e.n({type:Boolean,attribute:"is-richtext-content"})],s.prototype,"isRichtextContent",void 0),e._([e.n({type:Boolean,attribute:"has-metadata"})],s.prototype,"hasMetadata",void 0),s=e._([e.e("shreddit-blurred-container")],s);const o=({content:e})=>i.x`${e}
`;return{get S(){return s}}}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("9vUF7asw4v",["CsxDAjmHZE"],(async a=>{const{svg:c}=a.g(),l=a.m(c` `,"0 0 20 20","admin-fill"),{svg:h}=a.g();return{a:a.m(h` `,"0 0 20 20","admin"),b:l}}));
SML.dm("B-DM_KtOOe",[],(async()=>{var n;!function(n){n.Collapsed="0",n.Expanded="1"}(n||(n={}));const e={[n.Collapsed]:"flex-nav-collapsed",[n.Expanded]:"flex-nav-expanded"},t=Object.values(n);return{F:"hui_flex_nav_expanded_state",a:{LeftSidebarContainer:"left-sidebar-container",ContainerDiv:"flex-left-nav-container",ContentsDiv:"flex-left-nav-contents",ButtonsContainer:"flex-nav-buttons",ExpandButton:"flex-nav-expand-button",CollapseButton:"flex-nav-collapse-button",SubgridContainer:"subgrid-container"},get b(){return n},c:e,i:n=>!!n&&t.includes(n)}}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("B2OLf9kcBe",["CsxDAjmHZE"],(async c=>{const{svg:h}=c.g();return{b:c.m(h` `,"0 0 20 20","browser")}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./CKuUwv2_dV.js",import.meta.url,"CKuUwv2_dV");SML.di("./BWUv70NGv2.js",import.meta.url,"BWUv70NGv2");SML.di("./LmpbptXIUN.js",import.meta.url,"LmpbptXIUN");
SML.dm("B2U2qlR-Hi",["C42E8rVVpA","CsxDAjmHZE","BWUv70NGv2","CKuUwv2_dV","LmpbptXIUN"],(async(t,e,s)=>{var i;!function(t){t.small="small",t.medium="medium"}(i||(i={}));let o=class extends e.s{constructor(){super(...arguments),this.size=i.medium}render(){return e.x` `}};function r({pageType:t,url:e}){return {page_type:t,...(e ? {pane_name:e} : {})};}function a({subredditId:t,subredditName:e}){return {id:t,...(e ? {name:e} : {})};}o.styles=[e.i`:host{--emote-btn-size:2.25rem;--emote-size:1.75rem;display:block}:host([size=small]){--emote-btn-size:1.25rem;--emote-size:1.25rem}.emote::slotted(img){width:var(--emote-size);height:var(--emote-size);object-fit:contain;margin:0!important;padding:0!important}`,t.t],t._([t.n({type:String,reflect:!0})],o.prototype,"size",void 0),o=t._([t.e("community-status")],o);const n=e=>t.b({source:s.S.COMMUNITY_STATUS,action:s.A.CLICK,noun:s.N.STATUS_LINK},{action_info:r(e),subreddit:a(e)}),l=e.s;let d=class extends l{constructor(){super(...arguments),this.subredditId="",this.subredditName="",this.open=()=>{this.bottomSheet?.showModal()},this.close=()=>{this.bottomSheet?.close()},this.handleKeyUp=t=>{"Enter"!==t.key&&"Space"!==t.key||this.close()},this.handleStatusClicks=e=>{const s=e.composedPath().find((t=>t instanceof HTMLAnchorElement));s&&t.f(this,n({subredditId:this.subredditId,subredditName:this.subredditName,pageType:this._getPageType(),url:s.href}))},this._getPageType=t.x}render(){return e.x`
${""}
${t.Z({appearance:"secondary",attributes:{onclick:this.close,className:"mt-sm",id:"close-button"},children:"Close"})}
`;}};d.styles=[e.i`:host{display:inline-flex}slot[name=emote]::slotted(img){max-height:148px;margin-bottom:32px!important}slot[name=primary-btn]::slotted(*){margin-top:24px}`,t.t],t._([t.n({type:String,attribute:"subreddit-id"})],d.prototype,"subredditId",void 0),t._([t.n({type:String,attribute:"subreddit-name"})],d.prototype,"subredditName",void 0),t._([t.Q("#bottom-sheet")],d.prototype,"bottomSheet",void 0),d=t._([t.e("community-status-bottom-sheet")],d);const m=e.s;let c=class extends m{constructor(){super(...arguments),this.subredditId="",this.subredditName="",this.handleClick=()=>{this.hovercard?.close()},this.handleKeyUp=t=>{"Enter"===t.key&&this.handleClick()},this.handleStatusClicks=e=>{const s=e.composedPath().find((t=>t instanceof HTMLAnchorElement));s&&t.f(this,n({subredditId:this.subredditId,subredditName:this.subredditName,pageType:this._getPageType(),url:s.href}))},this._getPageType=t.x}render(){return e.x`
${""}
`}};c.styles=[e.i`slot[name=emote]::slotted(img){max-height:140px;max-width:148px!important;margin-bottom:0!important}faceplate-hovercard::part(content-container){background:var(--color-neutral-content-strong)}`,t.t],t._([t.n({type:String,attribute:"subreddit-id"})],c.prototype,"subredditId",void 0),t._([t.n({type:String,attribute:"subreddit-name"})],c.prototype,"subredditName",void 0),t._([t.Q("faceplate-hovercard")],c.prototype,"hovercard",void 0),c=t._([t.e("community-status-tooltip")],c)}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("B5z9hfVW57",["CsxDAjmHZE"],(async s=>{const{svg:l}=s.g();return{s:s.m(l` `,"0 0 20 20","show-fill")}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./Lp7s0JcW39.js",import.meta.url,"Lp7s0JcW39");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./DXq5Aj1CdK.js",import.meta.url,"DXq5Aj1CdK");SML.di("./BxXMRtW0Ao.js",import.meta.url,"BxXMRtW0Ao");SML.di("./CdpPgPWvJM.js",import.meta.url,"CdpPgPWvJM");
SML.dm("B7Xz0DsbLe",["C42E8rVVpA","Lp7s0JcW39","CsxDAjmHZE","DXq5Aj1CdK","BxXMRtW0Ao","CdpPgPWvJM"],(async(t,e,r)=>{let i=class extends r.s{constructor(){super(...arguments),this.subredditName="",this.userName="",this.thingId="",this.subredditId="",this.userId="",this.forceOpen=!1,this.postId="",this.conversationId="",this.isUserDeleted=!1,this.triggerSource=e.a.USERNAME,this.openModNotes=async e=>{const{subredditName:r,userName:i,thingId:s,subredditId:o,userId:d,triggerSource:n,postId:p}=this,u=e??n;t.p(t.T.ModNotesRailOpen,{subredditName:r,userName:this.isUserDeleted?"deleted":i,thingId:s,subredditId:o,userId:this.isUserDeleted?"deleted":d,triggerSource:u,postId:p,conversationId:this.conversationId})},this.handleAnchorClick=t=>{t instanceof MouseEvent&&0!==t.button||t.ctrlKey||t.metaKey||(t.preventDefault(),this.openModNotes())},this.preventAnchorClick=t=>{const e=t.target;if(e instanceof HTMLSlotElement){e.assignedElements().forEach((t=>{(t instanceof HTMLAnchorElement||this.forceOpen||this.isUserDeleted)&&(t.onclick=this.handleAnchorClick,t.ontouchstart=this.handleAnchorClick)}))}}}render(){return this.isUserDeleted||this.subredditName&&this.subredditId&&this.userName&&this.userId?r.x` `:r.x` `}};return t._([t.n({type:String,attribute:"subreddit-name"})],i.prototype,"subredditName",void 0),t._([t.n({type:String,attribute:"user-name"})],i.prototype,"userName",void 0),t._([t.n({type:String,attribute:"thing-id"})],i.prototype,"thingId",void 0),t._([t.n({type:String,attribute:"subreddit-id"})],i.prototype,"subredditId",void 0),t._([t.n({type:String,attribute:"user-id"})],i.prototype,"userId",void 0),t._([t.n({type:Boolean,attribute:"force-open"})],i.prototype,"forceOpen",void 0),t._([t.n({type:String,attribute:"post-id"})],i.prototype,"postId",void 0),t._([t.n({type:String,attribute:"conversation-id"})],i.prototype,"conversationId",void 0),t._([t.n({type:Boolean,attribute:"is-user-deleted"})],i.prototype,"isUserDeleted",void 0),t._([t.n({type:String,attribute:"trigger-source"})],i.prototype,"triggerSource",void 0),i=t._([t.e("mod-notes-opener")],i),{get ModNotesOpener(){return i}}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CHpnYscvgU.js",import.meta.url,"CHpnYscvgU");SML.di("./BFDJQElz9q.js",import.meta.url,"BFDJQElz9q");
SML.dm("BG8P3or1N1",["C42E8rVVpA","CHpnYscvgU","BFDJQElz9q"],(async(e,t,a)=>{const n={get:()=>{if(!e.a0.isAvailable())return;const t=e.a0.getItem(e.a1.I18nPostTranslationBanner);return t?JSON.parse(t):void 0},set:t=>{e.a0.isAvailable()&&e.a0.setItem(e.a1.I18nPostTranslationBanner,JSON.stringify(t))},update:e=>{const t=n.get()||{};n.set({...t,...e})}},r="shreddit_mt_immersive_en",o=new Set,s=t=>{if(o.has(t))return;o.add(t);const a=e.am(t);return e.an({experimentName:t,variant:a??"",experimentVersion:""})};return{P:n,i:function(){const e=window.location?.search??"";return new URLSearchParams(e).has("tl")},l:t=>{const{error:a,ids:n,element:r,componentName:o}=t,s=e.b({source:"translate_button",action:"error",noun:"app"},{action_info:{reason:a,type:o},setting:{value:n.toString(),values:n}});e.f(r,s)},o:{post:(t,n)=>{if(s(r),t.id){const r=a.b({archived:n?.archived,authorId:n?.authorId,createdTimestamp:n?.createdTimestamp,domain:n?.domain,id:n?.id??"",nsfw:n?.nsfw,promoted:n?.promoted,score:n?.score,spoiler:n?.spoiler,subredditId:n?.subredditId,subredditPrefixedName:n?.subredditPrefixedName,postTitle:n?.postTitle,postType:n?.postType,recommendationSource:n?.recommendationSource,commentCount:n?.commentCount,permalink:n?.permalink,postLanguage:n?.postLanguage,translationLanguage:n?.translationLanguage,isPostTranslated:n?.isPostTranslated});e.f(t,r)}},comment:(a,n)=>{s(r);const o=t.b(n);e.f(a,o)}}}}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("BHPKNOzIpV",["CsxDAjmHZE"],(async h=>{const{svg:a}=h.g();return{l:h.m(a` `,"0 0 20 20","lock")}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");
SML.dm("BIrqd8tOEI",["C42E8rVVpA"],(async e=>{const a="devplatform",r=a=>{switch(a){case e.ah.PostDetail:return"pdp";case e.ah.Profile:return"profile";case e.ah.Community:return"subreddit";case e.ah.Embed:return"embed";case e.ah.Home:case e.ah.Popular:case e.ah.All:case e.ah.CustomFeed:case e.ah.GeoCuratedFeed:case e.ah.UserPosts:case e.ah.ModQueue:case e.ah.ModQueueAll:case e.ah.SearchResults:return"feed";default:return""}};var t;!function(e){e.all="all",e.arena="arena",e.conversation="conversation",e.custom="custom",e.embed="embed",e.home="home",e.modQueue="mod_queue",e.modQueueAll="mod_queue_all",e.news="news",e.popular="popular",e.profile="profile",e.promotedSearchTrend="promoted_search_trend",e.read="read",e.search="search",e.subreddit="subreddit",e.user="user",e.watch="watch"}(t||(t={}));const o=a=>{switch(a){case e.ah.All:return t.all;case e.ah.ArenaFeed:return t.arena;case e.ah.Community:return t.subreddit;case e.ah.CustomFeed:case e.ah.GeoCuratedFeed:return t.custom;case e.ah.Embed:return t.embed;case e.ah.Home:return t.home;case e.ah.ModQueue:return t.modQueue;case e.ah.ModQueueAll:return t.modQueueAll;case e.ah.Popular:return t.popular;case e.ah.Profile:return t.profile;case e.ah.SearchResults:return t.search;case e.ah.UserPosts:return t.user;default:return""}};return{D:a,a:(e,a)=>{if(URL.canParse(e)){const r=new URL(e);return r.searchParams.set("entry_point",a),r.toString()}return e},c:e=>({source:a,action:e.action,noun:e.noun,devplatform_custom_post_info:{post_id:e.postId,subreddit_id:e.subredditId,block_type:e.blockType,presentation_context:e.pageType?r(e.pageType):"",feed_type:e.pageType?o(e.pageType):"",watermark:e.watermark,post_chrome:e.post_chrome},devplatform:{runtime:"web",installation_id:e.appInstallationId,app_id:e.appId,app_slug:e.appSlug,app_name:e.appSlug,app_version_number:e.appVersionNumber,public_api_version:e.appPublicApiVersion,internal_entry_point:e.internalEntryPoint||"",app_recommendation_criteria:e.appRecommendationCriteria||""},init_info:e.init_info,request:{user_agent:e.userAgent},post:e.post,definition:e.definition})}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./BFDJQElz9q.js",import.meta.url,"BFDJQElz9q");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");
SML.dm("BJn-lERYAs",["C42E8rVVpA","CsxDAjmHZE","BFDJQElz9q","DUzIBJc2in"],(async(e,t,i)=>{var a=t.i`.image-caption-container-collapsed{background:rgba(0,0,0,.6)}.image-caption-container-expanded{background:rgba(0,0,0,.8)}.text-primary-blue{color:#629fff}`;let o=class extends t.s{constructor(){super(...arguments),this.imageCaption="",this.outboundUrl="",this.shortenedUrl="",this.imageIndex="",this.isMore=!0,this.shouldShowMoreLessButton=()=>{const e=this.shadowRoot?.querySelector("figCaption")?.querySelector(`#gallery-image-caption-text-${this.imageIndex}`);if((e?.scrollWidth||0)>(e?.clientWidth||0)||(e?.scrollHeight||0)>(e?.clientHeight||0)){const e=this.shadowRoot?.querySelector("figCaption")?.querySelector(`#caption-more-button-${this.imageIndex}`);e?.classList?.remove(i.C),e?.classList?.add(i.x)}}}static get styles(){return[e.t,a]}getTruncateTextOverFlow(){return this.outboundUrl?"truncate":"line-clamp-2"}showMoreLessButtonText(){return this.isMore?"more":"less";}updateCaptionContainer(){const e=this.shadowRoot?.querySelector("figCaption"),t=e?.querySelector(`#gallery-image-caption-container-${this.imageIndex}`),i=e?.querySelector(`#gallery-image-caption-text-container-${this.imageIndex}`),a=e?.querySelector(`#gallery-image-caption-text-${this.imageIndex}`);this.isMore?(i?.classList?.remove("overflow-auto"),a?.classList?.add(this.getTruncateTextOverFlow()),t?.classList?.remove("image-caption-container-expanded"),t?.classList?.add("image-caption-container-collapsed")):(i?.classList?.add("overflow-auto"),a?.classList?.remove(this.getTruncateTextOverFlow()),t?.classList?.remove("image-caption-container-collapsed"),t?.classList?.add("image-caption-container-expanded"))}handleMoreLessButtonClicked(e){e.stopPropagation(),e.preventDefault(),this.isMore=!this.isMore,this.updateCaptionContainer();const t=this.shadowRoot?.querySelector("figCaption")?.querySelector(`#caption-more-button-${this.imageIndex}`),i=t?.querySelector(`#caption-more-button-text-${this.imageIndex}`);i&&(i.textContent=this.showMoreLessButtonText())}showMoreLessButton(){return t.x`${e.Z({appearance:"primary",size:e.ac.Small,attributes:{className:"text-primary-blue not-italic font-bold text-12 flex items-end bg-transparent\n hover:bg-transparent focus:bg-transparent active:bg-transparent visited:bg-transparent\n hidden rounded-none",onclick:this.handleMoreLessButtonClicked,id:`caption-more-button-${this.imageIndex}`},children:t.x` ${this.showMoreLessButtonText()}
`})}`}firstUpdated(){this.shouldShowMoreLessButton()}render(){return t.x` ${this.imageCaption&&t.x`
${this.imageCaption} ${this.outboundUrl?"":t.x`${this.showMoreLessButton()}`}
`} ${this.outboundUrl&&t.x`
`}
`}};return e._([e.n({type:String,attribute:"image-caption"})],o.prototype,"imageCaption",void 0),e._([e.n({type:String,attribute:"outbound-url"})],o.prototype,"outboundUrl",void 0),e._([e.n({type:String,attribute:"shortened-url"})],o.prototype,"shortenedUrl",void 0),e._([e.n({type:String,attribute:"image-index"})],o.prototype,"imageIndex",void 0),o=e._([e.e("gallery-caption")],o),{get GalleryCaption(){return o}}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./hqZhqS6qH4.js",import.meta.url,"hqZhqS6qH4");SML.di("./PJJ5-f-jpV.js",import.meta.url,"PJJ5-f-jpV");SML.di("./CXhXPoA40F.js",import.meta.url,"CXhXPoA40F");SML.di("./C-4AJ2Y78L.js",import.meta.url,"C-4AJ2Y78L");SML.di("./5YOkNVVwii.js",import.meta.url,"5YOkNVVwii");SML.di("./CZU1X6W5t6.js",import.meta.url,"CZU1X6W5t6");SML.di("./cjhvxMuwOm.js",import.meta.url,"cjhvxMuwOm");SML.di("./wDRHyxVKtb.js",import.meta.url,"wDRHyxVKtb");SML.di("./DCTgJU864D.js",import.meta.url,"DCTgJU864D");SML.di("./0Z5i5741wq.js",import.meta.url,"0Z5i5741wq");SML.di("./PaIPteKyLX.js",import.meta.url,"PaIPteKyLX");SML.di("./HWzb-DWZS3.js",import.meta.url,"HWzb-DWZS3");SML.di("./BZFHJN-Awe.js",import.meta.url,"BZFHJN-Awe");SML.di("./BeSXmWRKRU.js",import.meta.url,"BeSXmWRKRU");SML.di("./BaFXWsm32y.js",import.meta.url,"BaFXWsm32y");SML.di("./clzw02fdiy.js",import.meta.url,"clzw02fdiy");SML.di("./Cm1OoSEr5r.js",import.meta.url,"Cm1OoSEr5r");SML.di("./D5IdwQBwqd.js",import.meta.url,"D5IdwQBwqd");SML.di("./DYzo2YMMuI.js",import.meta.url,"DYzo2YMMuI");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");SML.di("./7ymiBBk8xO.js",import.meta.url,"7ymiBBk8xO");SML.di("./BFDJQElz9q.js",import.meta.url,"BFDJQElz9q");SML.di("./BYUKEbOT4E.js",import.meta.url,"BYUKEbOT4E");SML.di("./BIrqd8tOEI.js",import.meta.url,"BIrqd8tOEI");SML.di("./CsrVq94Zej.js",import.meta.url,"CsrVq94Zej");SML.di("./Cj45kFzx5i.js",import.meta.url,"Cj45kFzx5i");SML.di("./UD2pUVjMzE.js",import.meta.url,"UD2pUVjMzE");SML.di("./FcQsMjK8eg.js",import.meta.url,"FcQsMjK8eg");SML.di("./K26PgUrfyw.js",import.meta.url,"K26PgUrfyw");SML.di("./BG8P3or1N1.js",import.meta.url,"BG8P3or1N1");SML.di("./CZFRGXDPUQ.js",import.meta.url,"CZFRGXDPUQ");SML.di("./BkjgI35gdl.js",import.meta.url,"BkjgI35gdl");SML.di("./DIb1irMc8d.js",import.meta.url,"DIb1irMc8d");SML.di("./CrfIEMT3YQ.js",import.meta.url,"CrfIEMT3YQ");SML.di("./eO3FsZKN3d.js",import.meta.url,"eO3FsZKN3d");SML.di("./sXKB1kTPf8.js",import.meta.url,"sXKB1kTPf8");SML.di("./Bv2UEnJP_M.js",import.meta.url,"Bv2UEnJP_M");SML.di("./CuC-xwr_mY.js",import.meta.url,"CuC-xwr_mY");SML.di("./CbrVzpDtc2.js",import.meta.url,"CbrVzpDtc2");SML.di("./hidyRU_yeg.js",import.meta.url,"hidyRU_yeg");SML.di("./Hw1PFKH8z9.js",import.meta.url,"Hw1PFKH8z9");SML.di("./Da-UYDWSOS.js",import.meta.url,"Da-UYDWSOS");SML.di("./BVwlQhSoPB.js",import.meta.url,"BVwlQhSoPB");SML.di("./CHpnYscvgU.js",import.meta.url,"CHpnYscvgU");SML.di("./1i4g9fLWHY.js",import.meta.url,"1i4g9fLWHY");SML.di("./CKuUwv2_dV.js",import.meta.url,"CKuUwv2_dV");SML.di("./BtqmVQuPYp.js",import.meta.url,"BtqmVQuPYp");SML.di("./tmkhvHLxT3.js",import.meta.url,"tmkhvHLxT3");SML.di("./B-LM1r1oJd.js",import.meta.url,"B-LM1r1oJd");SML.di("./DrM-WGXCsZ.js",import.meta.url,"DrM-WGXCsZ");
SML.dm("BVeqrhRSRj",["C42E8rVVpA","CsxDAjmHZE","cjhvxMuwOm","wDRHyxVKtb","PaIPteKyLX","HWzb-DWZS3","BZFHJN-Awe","BeSXmWRKRU","BaFXWsm32y","clzw02fdiy","Cm1OoSEr5r","D5IdwQBwqd","DUzIBJc2in","7ymiBBk8xO","BFDJQElz9q","BYUKEbOT4E","BIrqd8tOEI","CsrVq94Zej","Cj45kFzx5i","UD2pUVjMzE","K26PgUrfyw","BG8P3or1N1","hqZhqS6qH4","PJJ5-f-jpV","CXhXPoA40F","C-4AJ2Y78L","5YOkNVVwii","CZU1X6W5t6","DCTgJU864D","0Z5i5741wq","DYzo2YMMuI","FcQsMjK8eg","CZFRGXDPUQ","BkjgI35gdl","DIb1irMc8d","CrfIEMT3YQ","eO3FsZKN3d","sXKB1kTPf8","Bv2UEnJP_M","CuC-xwr_mY","CbrVzpDtc2","hidyRU_yeg","Hw1PFKH8z9","Da-UYDWSOS","BVwlQhSoPB","CHpnYscvgU","1i4g9fLWHY","CKuUwv2_dV","BtqmVQuPYp","tmkhvHLxT3","B-LM1r1oJd","DrM-WGXCsZ"],(async(t,e,o,i,s,n,r,a,l,d,p,h,u,c,m,b,v,g,T,E,S,C)=>{const y=72e6,I=[y,y,1296e5,216e6,216e6],k=()=>{const e=localStorage.getItem(t.a1.CrosspostingUpsellExperiment);if(e)return JSON.parse(e)},P=e=>{localStorage.setItem(t.a1.CrosspostingUpsellExperiment,JSON.stringify(e))},N=async e=>{if((()=>{const t=k();if(!t)return!1;const{timer:e,snoozes:o,savedDate:i}=t;return o>=I.length||(new Date).getTime()-i0&&"Subreddit"===i[0]?.node?.subredditInfo.__typename?i[0]?.node?.subredditInfo:void 0};function R(t,e=!0){t=t||"";const[o,i]=t.split("?");let s=`https://www.reddit.com${("/"!==o[0]&&o.length>0?"/":"")+o}`;return e&&!s.endsWith("/")&&(s+="/"),i&&(s+=`?${i}`),s}let _=class extends e.s{constructor(){super(),this.name="",this.prefixedName="",this.subredditId="",this.isNsfw=!1,this.postId="",this.isOpen=!1,this.wasSeen=!1,this.trackExperimentEvent=(e,o,i)=>{t.f(this,t.b({source:e,action:o,noun:i},{subreddit:{id:this.subredditId,name:this.name,nsfw:this.isNsfw},post:{id:this.postId||""}}))},this.onShareClick=()=>{P({timer:18e5,snoozes:1,savedDate:(new Date).getTime()}),this.isOpen=!1,this.wasSeen=!0,this.trackExperimentEvent("crosspost_prompt","share","button")},this.onSkipClick=()=>{this.onMaybeSetCooldown(),this.isOpen=!1},new t.ar(this,this,{threshold:[.5]})}connectedCallback(){t.ax.subscribe(this.onMaybeSetCooldown,{shouldBeCalledFirst:!0}),super.connectedCallback(),this.addEventListener("faceplate-leave",this.onMaybeSetCooldown),this.trackExperimentEvent("crosspost_prompt","view","coachmark"),setTimeout((()=>{this.onMaybeSetCooldown()}),3e5)}disconnectedCallback(){super.disconnectedCallback(),t.ax.unsubscribe(this.onMaybeSetCooldown),this.removeEventListener("faceplate-leave",this.onMaybeSetCooldown)}onMaybeSetCooldown(){this.wasSeen||this.saveNoShareTimer()}saveNoShareTimer(){const t=k(),e=t?.snoozes||0;P({snoozes:e+1,timer:I[e],savedDate:(new Date).getTime()}),this.trackExperimentEvent("crosspost_prompt","hide","button"),this.wasSeen=!0}render(){return e.x` ${"Share with your newly created community"}
${`${this.prefixedName} might enjoy this post, try sharing it in your community.`}
${t.Z({attributes:{slot:"primary-button",href:R(`${this.prefixedName}/submit/?source_id=${this.postId}&crosspost_experiment_referral=true`),target:"_blank",rel:"noopener noreferrer",onclick:this.onShareClick},children:"Share",appearance:"plainInverted",size:t.ac.Small})} ${t.Z({attributes:{slot:"secondary-button",onclick:this.onSkipClick},children:"Skip",appearance:"plainInverted",size:t.ac.Small})} `;}};_.styles=[t.t],t._([t.n({type:String,attribute:"name"})],_.prototype,"name",void 0),t._([t.n({type:String,attribute:"prefixed-name"})],_.prototype,"prefixedName",void 0),t._([t.n({type:String,attribute:"subreddit-id"})],_.prototype,"subredditId",void 0),t._([t.n({type:Boolean,attribute:"nsfw"})],_.prototype,"isNsfw",void 0),t._([t.n({type:String,attribute:"post-id"})],_.prototype,"postId",void 0),t._([t.n({type:Boolean,attribute:"open",reflect:!0})],_.prototype,"isOpen",void 0),t._([t.v()],_.prototype,"wasSeen",void 0),_=t._([t.e("crosspost-upsell-coachmark")],_);let w=class extends e.s{constructor(){super(...arguments),this.translationContextValue=t.aD,this.postId="",this.href="",this.withIntervention=!1,this.isImmersiveVisit=!1}canShowInterventionModal(){const e=!!t.a0.getItem(t.a1.I18nTranslationInterventionShown);return!!this.translationContextValue?.isTranslationActive&&this.withIntervention&&!e}onShowOriginalClick(t){t.preventDefault?.(),t.stopPropagation?.(),this.canShowInterventionModal()?this.translationInterventionModal.handleTranslationOverride({isTranslationActive:!1,id:this.postId}):this.navigateToOriginal()}navigateToOriginal(){window.location.href=this.href}render(){const t=e.x` `;return e.x` ${"See original"} ${this.canShowInterventionModal()?t:e.A}`;}};w.styles=[t.t],t._([t.aC({context:t.aE,subscribe:!0}),t.v()],w.prototype,"translationContextValue",void 0),t._([t.Q("translation-intervention-modal")],w.prototype,"translationInterventionModal",void 0),t._([t.n({type:String,attribute:"post-id"})],w.prototype,"postId",void 0),t._([t.n({type:String,attribute:"href"})],w.prototype,"href",void 0),t._([t.n({type:Boolean,attribute:"with-intervention"})],w.prototype,"withIntervention",void 0),t._([t.n({type:Boolean,attribute:"isImmersiveVisit"})],w.prototype,"isImmersiveVisit",void 0),w=t._([t.e("mtseo-show-original-link")],w);const O="toggle__expando",x="toggle__expando-button",D=t.ac.Small,f=["flex flex-row justify-center items-center","h-xl","font-semibold","relative"].join(" "),L="thumbnail",A="ssr-share-button",M="share-button",U="mod-content-actions",H="credit-bar",$="post-flair",B="full-post-link",j="mod-content-state-indicators";class V{constructor(e){this.initialized=!1,this.handleToggleEvent=e=>{t.i(e)&&this.toggleExpando()},(this.host=e).addController(this)}get expandoElement(){return this.host.isCompactView?this.host.querySelector(`.${O}`):this.host.shadowRoot?.querySelector('slot[name="expando"]')??null}get hasExpandoContent(){return this.host.isCompactView?!!this.host.querySelector(`.${O}`):!!this.host.shadowRoot?.querySelector('slot[name="expando"]')?.assignedElements().length}get toggleElement(){return(this.host.isCompactView?this.host.querySelector(`button.${x}`)||this.host.shadowRoot?.querySelector(`button.${x}`):this.host.shadowRoot?.querySelector('slot[name="thumbnail"]'))??null}async hostConnected(){await this.host.updateComplete,this.initializeListeners()}hostDisconnected(){this.toggleElement?.removeEventListener("click",this.handleToggleEvent),this.toggleElement?.removeEventListener("keydown",this.handleToggleEvent),this.initialized=!1}async hostUpdated(){await this.host.updateComplete,this.initialized||this.initializeListeners()}initializeListeners(){this.initialized||this.expandoElement&&this.hasExpandoContent&&this.toggleElement&&(this.toggleElement?.addEventListener("click",this.handleToggleEvent),this.toggleElement?.addEventListener("keydown",this.handleToggleEvent),this.initialized=!0)}toggleExpando(){this.expandoElement&&this.hasExpandoContent&&(this.host.showExpando=!this.host.showExpando,this.expandoElement.classList.toggle("hidden",!this.host.showExpando),this.expandoElement.classList.toggle("block",this.host.showExpando))}renderExpandoButton(){const t="Expand content",o={attributes:{className:"icon-expand","aria-hidden":"true"},size:r.I[D]},i=this.host.showExpando?e.c(o):E.e(o),s=this.hasExpandoContent?"":"disabled pointer-all";return e.x` ${r.c({appearance:u.aq()?"bordered":"secondary",attributes:{type:"button",className:`${x} ${f} ${s}`,disabled:!this.hasExpandoContent,"aria-expanded":this.host.showExpando?"true":"false","aria-label":"post content","aria-controls":`${this.host.id}-expando-content`},size:D,leadingIcon:i,screenReaderContent:t})} `;}}class z{constructor(e){this.initializeHotkeys=()=>{this.host.viewContext===m.P.CommentsPage&&(this.subscriberController?.subscribe(t.co.NEXT_POST_COMMENT,this.nextPostOrComment),this.subscriberController?.subscribe(t.co.PREVIOUS_POST_COMMENT,this.prevPostOrComment),this.subscriberController?.subscribe(t.co.UPVOTE,this.upvote),this.subscriberController?.subscribe(t.co.DOWNVOTE,this.downvote),this.subscriberController?.subscribe(t.co.REPLY_TO_COMMENT,this.onReplyToComment),this.subscriberController?.subscribe(t.co.HIDE_POST,this.onToggleHide),this.subscriberController?.subscribe(t.co.TOGGLE_SAVE,this.onToggleSave),this.subscriberController?.subscribe(t.co.TOGGLE_COLLAPSE_COMMENT,this.onCommentToggleCollapse),this.subscriberController?.subscribe(t.co.COPY_POST_OR_COMMENT_LINK,this.onCopyLink),this.subscriberController?.subscribe(t.co.SUBMIT,this.onSubmitComment))},this.findShredditPost=t=>t instanceof K?t:t?.querySelector("shreddit-post, shreddit-ad-post"),this.cleanupHotkeys=()=>{this.host.viewContext===m.P.CommentsPage&&(this.subscriberController?.unsubscribe(t.co.NEXT_POST_COMMENT,this.nextPostOrComment),this.subscriberController?.unsubscribe(t.co.PREVIOUS_POST_COMMENT,this.prevPostOrComment),this.subscriberController?.unsubscribe(t.co.UPVOTE,this.upvote),this.subscriberController?.unsubscribe(t.co.DOWNVOTE,this.downvote),this.subscriberController?.unsubscribe(t.co.REPLY_TO_COMMENT,this.onReplyToComment),this.subscriberController?.unsubscribe(t.co.HIDE_POST,this.onToggleHide),this.subscriberController?.unsubscribe(t.co.TOGGLE_SAVE,this.onToggleSave),this.subscriberController?.unsubscribe(t.co.TOGGLE_COLLAPSE_COMMENT,this.onCommentToggleCollapse),this.subscriberController?.unsubscribe(t.co.COPY_POST_OR_COMMENT_LINK,this.onCopyLink),this.subscriberController?.unsubscribe(t.co.SUBMIT,this.onSubmitComment))},this.nextPostOrComment=()=>{this.postOrCommentTraversalController?.traverse(S.P.NEXT);const e=this.postOrCommentTraversalController?.current instanceof K?"post":"comment";t.f(this.host,m.a0("next",e))},this.prevPostOrComment=()=>{this.postOrCommentTraversalController?.traverse(S.P.PREV);const e=this.postOrCommentTraversalController?.current instanceof K?"post":"comment";t.f(this.host,m.a0("previous",e))},this.upvote=()=>{this.onVote(b.V.Upvote)},this.downvote=()=>{this.onVote(b.V.Downvote)},this.onFocus=t=>{this.host.viewContext===m.P.CommentsPage?this.host.shadowRoot?.querySelector(".shreddit-post-container")?.focus(t):this?.host.querySelector("[slot=full-post-link]")?.focus(t)},this.onVote=async t=>{let e;if(!this.postOrCommentTraversalController?.current)return;e=this.postOrCommentTraversalController?.isCurrentComment?(this.postOrCommentTraversalController?.current).commentActionRow:this.postOrCommentTraversalController?.current;const o=void 0;e&&(e.interactionFromHotkey=!0,t===b.V.Upvote?await e.handleUpvote(o):await e.handleDownvote(o),e.interactionFromHotkey=!1)},this.customPostTraversal=(t,e)=>{if(t===S.P.NEXT){const t=e?.querySelector("shreddit-comment-tree");if(t||"shreddit-comment-tree"===e?.tagName.toLowerCase())return e?.querySelector("shreddit-comment")}else if(!e?.previousElementSibling&&"shreddit-comment-tree"===e?.parentElement?.tagName.toLowerCase())return document.querySelector("shreddit-post")},this.onReplyToComment=()=>{this.postOrCommentTraversalController?.isCurrentPost?this.host.handleClickCommentsButton():this.postOrCommentTraversalController?.current?.querySelector("shreddit-comment-action-row")?.focusOnCommentComposer()},this.onToggleSave=()=>{if(this.postOrCommentTraversalController?.isCurrentComment){const t=this.postOrCommentTraversalController?.current?.overlowMenuItemProps?.find((t=>"save"===t.id));t?.onClick?.()}else this.postOverflowActions?.find((t=>"save"===t.id))?.onClick()},this.onToggleHide=()=>{(this.postOrCommentTraversalController?.isCurrentPost||this.host.isFeed)&&this.postOverflowActions?.find((t=>"hide"===t.id))?.onClick()},this.onCopyLink=()=>{let t;t=this.postOrCommentTraversalController?.isCurrentComment?this.postOrCommentTraversalController?.current?.shareButton:this.host.shareButtonRef?.value,t?.handleCopyLinkClick()},this.onCommentToggleCollapse=()=>{this.postOrCommentTraversalController?.isCurrentComment&&this.postOrCommentTraversalController.current.handleCollapse?.()},this.onSubmitComment=()=>{if(this.postOrCommentTraversalController?.isCurrentComment)this.postOrCommentTraversalController.current?.shredditComposer?.form?.submit();else{const e=t.bx(document.activeElement,"shreddit-composer");e?.form?.submit()}},this.host=e,e.addController(this)}hostConnected(){this.subscriberController=new t.cn(this.host),this.postOrCommentTraversalController=new S.a(this.host,{type:S.b.COMMENTS_PAGE,getFirstElement:()=>this.host,customPostOrCommentDetection:this.findShredditPost,customTraversal:(t,e)=>this.customPostTraversal(t,e)}),this.initializeHotkeys()}hostDisconnected(){this.cleanupHotkeys()}get postOverflowActions(){return this.host.querySelector("shreddit-post-overflow-menu")?.overflowActions}onToggleExpando(){this.host._expandoController?.toggleExpando()}}const F=({isPDP:t,triggerElem:o})=>t?u.cU({triggerElem:o,target:`selector(${p.S})`,attribute:"pageindex",value:"1"}):e.A;const G=h.W(t.W(e.s));let K=class extends G{get readMoreButton(){return this.querySelector(`#${this.id}-read-more-button`)??void 0}getCurrentVoteType(){return this.postVoteType}constructor(){super(),this.archived=!1,this.deleted=!1,this.hidden=!1,this.id="",this.game=!1,this.nsfw=!1,this.promoted=!1,this.spoiler=!1,this.subredditId=void 0,this.isSubscribed=!1,this.postLanguage="",this.translationLanguage="",this.isTranslationOn=!1,this.commentCount=0,this.permalink="",this.viewContext=m.P.AggregateFeed,this.viewType=t.a6.CardView,this.isSlimCard=!1,this.isDesktopViewport=!1,this.isReportingEnabled=!1,this.isLinkPost=!1,this.isAma=!1,this.isEmbed=!1,this.isNotBrandSafe=!1,this.isCrosspost=!1,this.isCrosspostable=!1,this.isEmbeddable=!1,this.isUserLoggedIn=!1,this.disabled=!1,this.showFullContent=!1,this.isTranslatable=!1,this.isTranslationFetched=!1,this.isPostTranslated=!1,this.isPostBodyTranslated=!1,this.isMTSEOUserPage=!1,this.shouldHideOriginalLanguageLink=!1,this.hasMTSEOTranslationInterruption=!1,this.morePostsCursor=void 0,this.isPostLeaveEventsEnabled=!1,this.isLocked=!1,this.isBanned=!1,this.isContestMode=!1,this.isPromoteablePost=!1,this.previousActionsFeature=!1,this.updateAnimation=void 0,this.itemState=g.M.UNMODERATED,this.areReportsExpandable=!1,this.isCompactUIExp=!1,this.isPostCommentTapExp=!1,this.isPdpSeekerM1LO=!1,this.shareButtonSSR=!1,this.interactionFromHotkey=!1,this.applyFeedsSimplification=!1,this.inlineGameTag=!1,this.showPostRemovalBanner=!0,this.showExpando=!1,this.useShortHiddenPostForm=!1,this.isThumbnailSet=!1,this.isUpdatingPostBody=!1,this.displayPostAnalytics=!1,this.isCrosspostingCoachmarkOpen=!1,this.eligibleCrosspostingSubreddit=void 0,this.hasBeenViewed=!1,this.hasBeenConsumed=!1,this._events=new t.E(this),this._outboundLinkTrackingController=new p.O(this,(()=>({pageType:t.x(),postId:this.id,subredditId:this.subredditId}))),this._expandoController=new V(this),this.pubsub=new t.m(this),this.shareButtonRef=t.U(),this.onSubscriptionChange=async e=>{let o;this.subredditName===e.name&&(o=e.subscribed&&this.isSubscribed!==e.subscribed,this.isSubscribed=e.subscribed),o&&this.isEligibleForRelatedCommunityRecommendations&&(await this._activateFeature({name:t.gc,queryParams:{subredditId:this.subredditId||"",pageType:String(t.x())},root:(this.isHomeFeed||this.isPopularFeed)&&this.parentElement||document,renderMode:this.isHomeFeed||this.isPopularFeed?t.P.Append:void 0}))},this.handleVisibilityChange=t=>{this.isPostInViewport&&t&&(this._hasPageUnloaded=!1,this.isPDP||(this.handleView(m.o(this),!0),this.becameVisibleOnScreenTimestamp=Date.now()))},this.handleCalledFirstVisibilityChange=e=>{this.isPostInViewport&&(e||this._hasPageUnloaded||(this.handleConsume(),this.isPostLeaveEventsEnabled&&t.f(this,m.a1(this))))},this._activateFeature=async e=>t.j(e),this.showShortHiddenPostForm=()=>this.hidden&&this.useShortHiddenPostForm,this.handleLoadMorePosts=async()=>{const t=document.querySelector(`#partial-more-posts-${this.morePostsCursor}`);t&&"true"!==t?.getAttribute("hasBeenLoaded")&&(t?.setAttribute("hasBeenLoaded","true"),await(t?.load()))},this.trackConsume=()=>{t.f(this,m.a2(this))},this.handleRsvpClick=e=>{t.f(this,m.t(this))},this.handleUnRsvpClick=e=>{t.f(this,m.v(this))},this._getPostScoreDelta=t=>b.g(this.postVoteType,t),this._onUpdatePostVoteType=async()=>await b.o(this.id,"post",this.postVoteType),this.trackReadMoreClick=()=>{t.f(this,m.a3(this))},this.onBeforeUnloadCallback=()=>{this.onBeforeUnload()},this.handleCustomPostSnapshotEvent=async()=>{const e=this.querySelector("devvit-post"),o=e?await e.captureSafetyReport():"";this.dispatchEvent(t.c("stage-devplatform-snapshot",{postId:this.id,encodedData:o}))},this.setStateApproved=()=>{this.showPostRemovalBanner=!1,this.itemState=g.M.APPROVED},this.setStateRemoved=()=>{this.showPostRemovalBanner=!0,this.itemState=g.M.REMOVED},this.onPostUpdateAction=({postId:t,action:e,value:o})=>{if(this.id===t)switch(e){case c.a.markAsNsfw:this.nsfw=o;break;case c.a.markAsSpoiler:this.spoiler=o;break;case c.a.delete:this.deleted=o;break;case c.a.hide:this.applyHideChanges(o);break;case c.a.lock:this.isLocked=Boolean(o);break;case c.a.approve:case c.a.approveOptimistic:this.setStateApproved();break;case c.a.remove:case c.a.removeAsSpam:case c.a.confirmRemoval:case c.a.addRemovalReason:case c.a.removeOptimistic:case c.a.removeAsSpamOptimistic:case c.a.confirmRemovalOptimistic:this.setStateRemoved()}},this.applyHideChanges=t=>{this.useShortHiddenPostForm=t,this.hidden=t},this.unhidePost=async()=>{try{await c.n(this.id,!0);const e=t.c("faceplate-alert",{level:t.X.success,message:"Removed from hidden"});this.dispatchEvent(e);const o={postId:this.id,action:c.a.hide,value:!1};this.pubsub.publish(t.T.PostUpdated,o),t.f(this,m._(this.viewContext))}catch(e){const o=t.c("faceplate-alert",{level:t.X.error,sourceElement:"unhide-post",cause:"uncategorized",message:"Unable to unhide post"});this.dispatchEvent(o)}},this.addEventListener("click",this.handleClickPost),new t.ar(this,this,{threshold:[.5]})}static get styles(){return[t.t,t.K(".rpl-vote-button-group {\n /* APPEARANCE AGNOSTIC STYLES */\n /* PLAIN APPEARANCE */\n /* SECONDARY APPEARANCE */\n /* BORDERED APPEARANCE */\n --vote-button-divider-color: var(--color-neutral-border-weak);\n /* MEDIA APPEARANCE */\n}\n.rpl-vote-button-group:not([disabled]) .rpl-vote-button-group-label {\n color: var(--vote-button-label-color);\n}\n.rpl-vote-button-group:not([disabled]):hover.rpl-vote-button-group-label {\n color: var(--vote-button-label-color-hover);\n}\n.rpl-vote-button-group .rpl-vote-button-group-divider {\n background-color: var(--vote-button-divider-color);\n}\n.rpl-vote-button-group[disabled] button[rpl]:disabled {\n --button-color-background-disabled: transparent;\n}\n.rpl-vote-button-group.button-plain {\n --vote-button-label-color: var(--color-secondary-plain);\n --vote-button-label-color-hover: var(--color-secondary-plain);\n}\n.rpl-vote-button-group.button-plain button[rpl]:first-child {\n --button-color-text-hover: var(--color-upvote-plain-weaker);\n}\n.rpl-vote-button-group.button-plain button[rpl]:last-child {\n --button-color-text-hover: var(--color-downvote-plain-weaker);\n}\n.rpl-vote-button-group.button-plain.upvote {\n --vote-button-label-color: var(--color-upvote-plain);\n}\n.rpl-vote-button-group.button-plain.upvote button[rpl]:first-child {\n --button-color-text-default: var(--color-upvote-plain-weaker);\n --button-color-text-hover: var(--color-upvote-plain-weaker);\n --button-color-text-disabled: var(--color-upvote-plain-disabled);\n --button-color-text-activated: var(--color-upvote-plain-weaker);\n}\n.rpl-vote-button-group.button-plain.downvote {\n --vote-button-label-color: var(--color-downvote-plain);\n}\n.rpl-vote-button-group.button-plain.downvote button[rpl]:last-child {\n --button-color-text-default: var(--color-downvote-plain-weaker);\n --button-color-text-disabled: var(--color-downvote-plain-disabled);\n --button-color-text-activated: var(--color-downvote-plain-weaker);\n}\n.rpl-vote-button-group.button-secondary {\n --vote-button-label-color: var(--color-secondary-plain);\n --vote-button-label-color-hover: var(--color-secondary-plain);\n --vote-button-divider-color: var(--color-neutral-border);\n}\n.rpl-vote-button-group.button-secondary button[rpl]:first-child {\n --button-color-text-hover: var(--color-upvote-plain-weaker);\n}\n.rpl-vote-button-group.button-secondary button[rpl]:last-child {\n --button-color-text-hover: var(--color-downvote-plain-weaker);\n}\n.rpl-vote-button-group.button-secondary.upvote,\n.rpl-vote-button-group.button-secondary.upvote button[rpl] {\n --button-color-text-default: var(--color-upvote-onBackground);\n --button-color-text-hover: var(--color-upvote-onBackground);\n --button-color-text-disabled: var(--color-upvote-disabled);\n --button-color-text-activated: var(--color-upvote-onBackground);\n}\n.rpl-vote-button-group.button-secondary.upvote:not([disabled]),\n.rpl-vote-button-group.button-secondary.upvote button[rpl]:not([disabled]) {\n --button-color-background-default: var(--color-upvote-background);\n --button-color-background-hover: var(--color-upvote-background-hover);\n --button-color-background-active: var(--color-upvote-background-hover);\n --vote-button-divider-color: var(--color-upvote-onBackground);\n --vote-button-label-color: var(--color-media-onBackground);\n}\n.rpl-vote-button-group.button-secondary.downvote,\n.rpl-vote-button-group.button-secondary.downvote button[rpl] {\n --button-color-text-default: var(--color-downvote-onBackground);\n --button-color-text-hover: var(--color-downvote-onBackground);\n --button-color-text-disabled: var(--color-downvote-disabled);\n --button-color-text-activated: var(--color-downvote-onBackground);\n}\n.rpl-vote-button-group.button-secondary.downvote:not([disabled]),\n.rpl-vote-button-group.button-secondary.downvote button[rpl]:not([disabled]) {\n --button-color-background-default: var(--color-downvote-background);\n --button-color-background-hover: var(--color-downvote-background-hover);\n --button-color-background-active: var(--color-downvote-background-hover);\n --vote-button-divider-color: var(--color-upvote-onBackground);\n --vote-button-label-color: var(--color-media-onBackground);\n}\n.rpl-vote-button-group.button-bordered-cab {\n --vote-button-label-color: var(--color-secondary-plain);\n --vote-button-label-color-hover: var(--color-secondary-plain);\n}\n.rpl-vote-button-group.button-bordered-cab button[rpl]:first-child {\n --button-color-text-hover: var(--color-upvote-plain-weaker);\n}\n.rpl-vote-button-group.button-bordered-cab button[rpl]:last-child {\n --button-color-text-hover: var(--color-downvote-plain-weaker);\n}\n.rpl-vote-button-group.button-bordered-cab.upvote {\n --vote-button-label-color: var(--color-upvote-plain);\n}\n.rpl-vote-button-group.button-bordered-cab.upvote button[rpl]:first-child {\n --button-color-text-default: var(--color-upvote-plain-weaker);\n --button-color-text-hover: var(--color-upvote-plain-weaker);\n --button-color-text-disabled: var(--color-upvote-plain-disabled);\n --button-color-text-activated: var(--color-upvote-plain-weaker);\n}\n.rpl-vote-button-group.button-bordered-cab.downvote {\n --vote-button-label-color: var(--color-downvote-plain);\n}\n.rpl-vote-button-group.button-bordered-cab.downvote button[rpl]:last-child {\n --button-color-text-default: var(--color-downvote-plain-weaker);\n --button-color-text-hover: var(--color-downvote-plain-weaker);\n --button-color-text-disabled: var(--color-downvote-plain-disabled);\n --button-color-text-activated: var(--color-downvote-plain-weaker);\n}\n.rpl-vote-button-group.button-media-cab {\n --vote-button-label-color: var(--color-media-onBackground);\n --vote-button-label-color-hover: var(--color-media-onBackground);\n --vote-button-divider-color: var(--color-media-border-weak);\n}\n.rpl-vote-button-group.button-media-cab button[rpl]:first-child {\n --button-color-text-hover: var(--color-upvote-onStrongScrim-weaker);\n}\n.rpl-vote-button-group.button-media-cab button[rpl]:last-child {\n --button-color-text-hover: var(--color-downvote-onStrongScrim-weaker);\n}\n.rpl-vote-button-group.button-media-cab.upvote {\n --vote-button-label-color: var(--color-upvote-onStrongScrim);\n}\n.rpl-vote-button-group.button-media-cab.upvote button[rpl]:first-child {\n --button-color-text-default: var(--color-upvote-onStrongScrim-weaker);\n --button-color-text-activated: var(--color-upvote-onStrongScrim-weaker);\n --button-color-text-disabled: var(--color-upvote-onStrongScrim-disabled);\n}\n.rpl-vote-button-group.button-media-cab.downvote {\n --vote-button-label-color: var(--color-downvote-onStrongScrim);\n}\n.rpl-vote-button-group.button-media-cab.downvote button[rpl]:last-child {\n --button-color-text-default: var(--color-downvote-onStrongScrim-weaker);\n --button-color-text-activated: var(--color-downvote-onStrongScrim-weaker);\n --button-color-text-disabled: var(--color-downvote-onStrongScrim-disabled);\n}\n.pdp-flair-slot::slotted(*) {\n margin: var(--size-2xs) 0;\n}\n.feed-flair-slot::slotted(*) {\n margin-bottom: var(--size-xs);\n}\n.text-decoration-none {\n text-decoration: none;\n}\n:host([item-state~='APPROVED']),\n:host([item-state~='REMOVED']) {\n background-color: var(--color-neutral-background-weak);\n}\n:host([updateAnimation~='light']) {\n animation: realtimeFade 3s;\n animation-timing-function: ease-out;\n}\n:host([updateAnimation~='dark']) {\n animation: realtimeFadeNight 3s;\n animation-timing-function: ease-out;\n}\n@keyframes realtimeFade {\n from {\n background-color: #fff2bd;\n border: 1px solid #dbaf00;\n }\n to {\n background-color: #f0f5f9;\n border: 1px solid transparent;\n }\n}\n@keyframes realtimeFadeNight {\n from {\n background-color: #665505;\n border: 1px solid #382d03;\n }\n to {\n background-color: #030303;\n border: 1px solid #343536;\n }\n}\n.condensed-post-title-heading {\n margin: 0;\n}\n")]}connectedCallback(){super.connectedCallback(),t.g()&&this.initModActionsController(),this.querySelector("shreddit-post-text-body")?.addEventListener(m.R,this.trackReadMoreClick),this.isObserved||this.enableObserver({rootMargin:"0px"}),this.postVoteType=this.voteType,this.postScore=this.score,this.gallery&&this.addEventListener("faceplate-carousel:slide",this.handleCarouselArrowClick),this.addEventListener("faceplate-hovercard:open",this.handleHovercardOpen),this.addEventListener("capture-devplatform-snapshot",this.handleCustomPostSnapshotEvent),t.ax.subscribe(this.onBeforeUnloadCallback,{shouldBeCalledFirst:!0}),t.ay(this.handleVisibilityChange,{immediate:!0}),t.ay(this.handleCalledFirstVisibilityChange,{immediate:!0,shouldBeCalledFirst:!0}),this.pubsub.subscribe(t.T.PostUpdated,this.onPostUpdateAction),this.addEventListener(c.e,this.handleClickCommentsButton),this.addEventListener(c.f,this.handleShareButtonInteraction),this.addEventListener(c.b,this.handleRsvpClick),this.addEventListener(c.E,this.handleUnRsvpClick),this.pubsub.subscribe(t.T.SubredditSubscriptionChange,this.onSubscriptionChange),this.hotkeyController=new z(this)}async initModActionsController(){const{ModActionsController:t}=await SML.di("./ATX576QdO9.js",import.meta.url,"ATX576QdO9");new t(this,{getThingIdFn:()=>this.id})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.listingBelowConsumeTimer),this.isObserved&&this.disableObserver(),this.hasBeenViewed=!1,this.isPostInViewport=!1,this.querySelector("shreddit-post-text-body")?.removeEventListener(m.R,this.trackReadMoreClick),this.gallery&&this.removeEventListener("faceplate-carousel:slide",this.handleCarouselArrowClick),this.removeEventListener("faceplate-hovercard:open",this.handleHovercardOpen),t.ax.unsubscribe(this.onBeforeUnloadCallback),t.az(this.handleVisibilityChange),t.az(this.handleCalledFirstVisibilityChange),this.removeEventListener(c.e,this.handleClickCommentsButton),this.removeEventListener(c.f,this.handleShareButtonInteraction),this.removeEventListener(c.b,this.handleRsvpClick),this.removeEventListener(c.E,this.handleUnRsvpClick),this.removeEventListener("capture-devplatform-snapshot",this.handleCustomPostSnapshotEvent)}get isFeed(){return m.d(this.viewContext)}get isPopularFeed(){return this.isFeed&&m.a4(t.x())}get isHomeFeed(){return this.isFeed&&m.a5(t.x())}get isPDP(){return m.i(this.viewContext)}get isCardView(){return u.cQ(this.viewType)}get isCompactView(){return u.bW(this.viewType)}get shouldInlineGameTag(){return this.inlineGameTag&&u.cQ(this.viewType)}get isEligibleForRelatedCommunityRecommendations(){return this.isUserLoggedIn&&!!this.subredditId&&(this.isPDP&&!this.isDesktopViewport||this.isHomeFeed||this.isPopularFeed)}renderThumbnail(){return e.x` `}renderCommentsButton(){return function({viewContext:o,commentCount:i,permalink:s,pdpTarget:n,onClick:l,isUserLoggedIn:d,isPostCommentTapExp:p}){const h={className:f,onclick:l,name:"comments-action-button","data-post-click-location":t.f6.COMMENTS_BUTTON},c=m.d(o)?{...h,href:s,target:n??"_self"}:{...h,type:"button"};return r.c({appearance:"secondary",attributes:c,size:D,children:[F({isPDP:m.i(o),triggerElem:"closest(button)"}),e.x` `,!d&&p?u.B({triggerElem:"closest(button)",target:"closest(button)",eventName:"reply"}):e.A],leadingIcon:a.c({attributes:{className:"icon-comment","aria-hidden":"true"},size:r.I[D]}),screenReaderContent:"Go to comments"});}({viewContext:this.viewContext,commentCount:this.commentCount,permalink:this.permalink,pdpTarget:this.pdpTarget,onClick:this.handleClickCommentsButton,isUserLoggedIn:this.isUserLoggedIn,isPostCommentTapExp:this.isPostCommentTapExp});}renderVoteButton(){const o=u.bY(),i=o?n.a:n.v,s=o?n.b:n.u,r=o?n.c:n.d,a=this.postScore,l="Vote",d={voteType:this.postVoteType||null,appearance:u.aq()?"bordered":"secondary",size:D,attributes:{disabled:this.archived}},p=s({...d,voteCount:a,initialStateText:l,screenReaderContent:"Upvote",onClick:this.handleUpvote}),h=r({...d,screenReaderContent:"Downvote",onClick:this.handleDownvote});return this.isPDP&&performance.mark(t.c5),e.x` ${F({isPDP:this.isPDP})} ${i({attributes:{"data-post-click-location":t.f6.VOTE,className:f},voteCount:a,voteType:this.postVoteType,upvoteButton:p,downvoteButton:h,appearance:d.appearance,size:d.size,initialStateText:l})} `}renderShareButton(){if(this.applyFeedsSimplification)return e.A;const o=e.x` ${this.shareButtonSSR?e.x` `:e.A} `;return this.isCrosspostingV2Enabled&&this.isCrosspostingCoachmarkOpen&&"Subreddit"===this.eligibleCrosspostingSubreddit?.__typename?e.x` ${o} `:e.x` ${o} `}renderExpandoButton(){return this.isDesktopViewport?this._expandoController.renderExpandoButton():""}renderReportButton(){const o="Report";return e.x` ${r.c({appearance:"secondary",attributes:{onclick:()=>{var e,o;t.f(this,(e="post",t.b({source:e,action:"click",noun:"report"}))),this.dispatchEvent((o=this.id,t.c(t.jQ,{thingId:o})))},type:"button",className:f},size:D,children:this.isDesktopViewport?o:"",leadingIcon:d.r({attributes:{className:"icon-report","aria-hidden":"true"},size:r.I[D]}),screenReaderContent:o})} `}renderActionRow(){if(this.isPDP&&this.isPdpSeekerM1LO)return this.renderSeekerPostInfoRow();const t=["shreddit-post-container flex gap-sm flex-row items-center flex-nowrap justify-start"];return this.isPDP?this.isCompactUIExp?t.push("py-xs px-md xs:px-0"):t.push("h-2xl mt-md px-md xs:px-0"):this.isCardView&&!this.promoted&&!this.isCrosspost&&this.isEmbed&&t.push("pt-xs"),e.x` ${this.renderVoteButton()} ${this.renderCommentsButton()} ${function({applyFeedsSimplification:t,awardCount:o,awardId:i,commentCount:s,feedIndex:n,hasBrandedAward:r,hasIconicAward:a,hideAwardIcon:l,iconUrl:d,iconUrls:p,isAwardable:h,isAwardedByUser:u,postId:c,postScore:m,postType:b,subredditId:v}){return!h||t?e.A:e.x`
`}({applyFeedsSimplification:this.applyFeedsSimplification,awardCount:this.awardCount,awardId:this.awardId,commentCount:this.commentCount,feedIndex:this.feedIndex,hasBrandedAward:this.hasBrandedAward,hasIconicAward:this.hasIconicAward,hideAwardIcon:this.hideAwardIcon,iconUrl:this.awardIconUrl,iconUrls:this.awardIconUrls,isAwardable:this.isAwardable,isAwardedByUser:this.isAwardedByUser,postId:this.id,postScore:this.postScore,postType:this.postType,subredditId:this.subredditId})} ${this.renderShareButton()} ${this.isReportingEnabled&&!this.isFeed?this.renderReportButton():""}
`;}renderSeekerPostInfoRow(){return e.x` ${void 0!==this.postScore?e.x` ${e.aB({size:e.I.Small})} ${e.aW({size:e.I.Small})} `:e.A} ${this.postScore&&this.commentCount?e.x`· `:e.A} ${this.commentCount?e.x` ${a.c({size:e.I.Small})} `:e.A}
`}renderMessageBanner(){return e.x` ${this.isLocked?e.x` `:null} ${this.isBanned?e.x` `:null} ${this.showPostRemovalBanner?e.x` `:null} ${this.isContestMode?e.x` `:null} `}trackContentTagClick(t){t.detail.type===s.C.APP&&this.trackWatermarkEvent("v1_badge")}trackWatermarkEvent(e){const o=t.b(v.c({postId:this.id||"",subredditId:this.subredditId||"",blockType:"",pageType:t.x(),action:"click",noun:"watermark",appId:this.appId||"",appInstallationId:this.appInstallationId||"",appVersionNumber:this.appVersionNumber||"",appPublicApiVersion:this.appPublicApiVersion||"",appName:this.appSlug||"",appSlug:this.appSlug||"",userAgent:window.navigator?.userAgent.toLowerCase()||"unknown",watermark:e}));t.f(this,o)}renderPostHeader(){return e.x` ${this.isEligibleForRelatedCommunityRecommendations?e.x` `:e.x``} ${this.renderContentTags()} ${this.shouldInlineGameTag?e.A:this.renderAppPrivacyButton()}
${this.renderPostLinkForMTSEO()} `}renderAppPrivacyButton(){return this.appName?e.x` ${t.Z({appearance:"plain",attributes:{onclick:()=>(this.trackWatermarkEvent("v1_privacy_link"),this._activateFeature({name:t.jR,routeParams:{appSlug:this.appSlug,appOwnerId:this.appOwnerId||"null",postId:this.id,subredditId:this.subredditId},queryParams:{appName:this.appName},renderMode:t.P.Contents})),className:"flex gap-xs z-0 relative"},children:"Privacy",leadingIcon:l.i({size:e.I.ExtraSmall}),size:t.ac.ExtraSmall})} `:e.A;}renderPostLinkForMTSEO(){if(!this.isMTSEOUserPage)return"";if(this.shouldHideOriginalLanguageLink)return"";const o=new RegExp(/[^?]+/),i=this.permalink?.match(o);if(!i||0===i.length)return"";const s=t.bW(i[0],t.jT,t.jS);return e.x` `}renderTitle(){const t=e.x` `;return this.showFullContent||this.isPDP?t:e.x` ${t} ${this.shouldInlineGameTag?this.renderAppPrivacyButton():e.A} `}renderTextBody(){return e.x` `}renderPostMediaContainer(t){return e.x` `}renderFeedFlair(){return this.isPDP?"":e.x`
`}renderPDPFlair(){const t=this.isCompactUIExp?"leading-none":"xs:px-0";return this.isPDP?e.x`
`:""}renderDeletedPost(){return e.x` `;}renderHiddenPost(){return e.x` ${t.Z({attributes:{onclick:this.unhidePost},size:t.ac.Medium,appearance:"secondary",children:"Undo"})}
`;}renderCompactView(){const t="grid grid-cols-[1fr_min-content] grid-rows-[auto_auto_auto_auto_auto] xs:grid-cols-[min-content_1fr] xs:grid-rows-[auto_auto_auto_auto]",o="col-start-1 col-end-3 row-start-1 row-end-2 xs:col-start-1 xs:col-end-3 xs:row-start-1 xs:row-end-2",i="col-start-2 col-end-3 row-start-2 row-end-3 xs:col-start-1 xs:col-end-2 xs:row-start-2 xs:row-end-4",s="col-start-1 col-end-2 row-start-2 row-end-3 xs:col-start-2 xs:col-end-3 xs:row-start-2 xs:row-end-3 overflow-hidden",n="col-start-1 col-end-3 row-start-3 row-end-4 xs:hidden",r="col-start-1 col-end-3 row-start-4 row-end-5 xs:col-start-2 xs:col-end-3 xs:row-start-3 xs:row-end-4",a="col-start-1 col-end-3 row-start-5 row-end-6 xs:col-start-2 xs:col-end-3 xs:row-start-4 xs:row-end-5 overflow-hidden",l="col-start-1 col-end-3 row-start-6 row-end-7 xs:col-start-2 xs:col-end-3 xs:row-start-5 xs:row-end-6";return e.x`
${this.renderExpandoButton()}${this.renderVoteButton()}
${this.renderPostStatsEntryPoint()}
${this.renderPostStatsContainer()} `}renderPostStatsContainer(){return e.x` `}renderPostStatsEntryPoint(){return e.x` `}renderCardViewPostFooter(){return e.x` ${this.renderMessageBanner()} ${this.renderActionRow()} ${this.renderPostStatsEntryPoint()} ${this.renderPostStatsContainer()} `}renderContentTags(){return e.x`this.trackContentTagClick(t)}"> `}renderSlimCardPost(){return e.x` ${this.renderCardViewPostFooter()}
`}renderCardView(){const t=this.isThumbnailSet?"ml-xs xs:ml-sm":void 0;return e.x` ${this.renderPostHeader()} ${this.renderTitle()} ${this.renderPDPFlair()} ${this.isPDP?null:this.renderTextBody()} ${this.renderFeedFlair()}
${this.renderThumbnail()}
${this.renderPostMediaContainer("xs:pt-md")} ${this.isPDP?this.renderTextBody():null} ${this.renderCardViewPostFooter()} `}render(){return this.deleted?this.renderDeletedPost():this.showShortHiddenPostForm()?this.renderHiddenPost():this.isCompactView?this.renderCompactView():this.isSlimCard?this.renderSlimCardPost():this.renderCardView()}handleView(e,o,i){!o&&this.isPDP||m.a6(this.viewContext)&&this.hasBeenViewed||t.f(this,e),this.gallery&&t.f(this,T.a(this,0,i)),this.morePostsCursor&&this.handleLoadMorePosts()}handleConsume(){!this.isPDP&&this.becameVisibleOnScreenTimestamp&&Date.now()-this.becameVisibleOnScreenTimestamp>m.c&&!m.a6(this.viewContext)&&this.trackConsume()}handleClick(e,o){e&&t.f(this,e),o&&this.dispatchEvent(o)}handleShareButtonInteraction(){this.isDesktopViewport?this.handleClick(m.a7(this)):this.handleClick(m.a8(this))}handleClickCommentsButton(e){if(t.f(this,m.w(this)),this.isFeed)return;this.isPostCommentTapExp||E.s("smooth");if((e?.currentTarget?.querySelector("faceplate-number")?.number??0)>0&&!this.isPostCommentTapExp){const t=document.querySelector("shreddit-comments-sort-dropdown")?.querySelector("shreddit-sort-dropdown")?.shadowRoot?.querySelector("faceplate-dropdown-menu")?.querySelector("button");t?.focus()}else{if(!this.isUserLoggedIn&&this.isPostCommentTapExp)return;const t=document.querySelector("comment-body-header comment-composer-host");this.isPostCommentTapExp&&t?.scrollIntoView({behavior:"smooth",block:"center"}),t?.focus()}}handleClickPost(t){const e=m.a9(t,this);this.handleClick(e)}handleCarouselArrowClick(t){t.preventDefault();const e=t;T.h(this,e)}async handleUpdatePostVote(e){const o=this.postScore,i=this.postVoteType;if(void 0!==this.postScore){const t=this._getPostScoreDelta(e);this.postScore=this.postScore+t}this.postVoteType=e===this.postVoteType?void 0:e;try{await this._onUpdatePostVoteType(),this.postVoteType&&this.pubsub.publish(this.postVoteType===b.V.Upvote?t.T.PostUpvoted:t.T.PostDownvoted,{postId:this.id})}catch(s){this.postScore=o,this.postVoteType=i,this.dispatchEvent(t.c("faceplate-alert",{level:t.X.warning,message:s,sourceElement:e,cause:`failed-${e}`}))}}async handleCrosspostingV2Experiment(){const t=await N(this.id);this.eligibleCrosspostingSubreddit=t,this.isCrosspostingCoachmarkOpen=!!t}async handleUpvote(e){const o=this.postVoteType===b.V.Upvote;if(this.isUserLoggedIn)return this.handleClick(o?m.m(this):m.u(this)),await this.handleUpdatePostVote(b.V.Upvote),!o&&this.isCrosspostingV2Enabled&&this.handleCrosspostingV2Experiment(),void(this.isAma&&!o&&this.pubsub.publish(t.T.TriggerAmaRemindMeModal,{postId:this.id}));this.disabled?(this.dispatchEvent(t.c(t.dW.upvoteTry,{thingId:this.id,permalink:this.permalink})),t.f(this,m.aa(this))):this.handleClick(m.u(this),t.c(t.dW.upvote,{thingId:this.id,permalink:this.permalink}))}async handleDownvote(e){if(this.isUserLoggedIn)return this.handleClick(this.postVoteType===b.V.Downvote?m.m(this):m.n(this)),void (await this.handleUpdatePostVote(b.V.Downvote));this.disabled?(this.dispatchEvent(t.c(t.dW.downvoteTry,{thingId:this.id,permalink:this.permalink})),t.f(this,m.aa(this))):this.handleClick(m.n(this),t.c(t.dW.downvote,{thingId:this.id,permalink:this.permalink}))}onBeforeUnload(){this._hasPageUnloaded=!0,this.isPostInViewport&&(this.handleConsume(),this.isPostLeaveEventsEnabled&&t.f(this,m.a1(this)))}handleHovercardOpen(e){if(!(e.target instanceof HTMLElement&&"id"in e.target.dataset))return;const o=e.target.dataset.id;"community-hover-card"===o&&t.f(this,m.ab(this)),"user-hover-card"===o&&t.f(this,m.ac(this))}handleThumbnailSlotChange(t){const e=t.target?.assignedElements();this.isThumbnailSet=e.length>0}observerIsIntersectingCallback(e){this.isNotBrandSafe&&e.target===this&&window.dispatchEvent(t.c(t.gZ,{postId:this.id,isInView:!0})),this.isPostInViewport||(this.isPostInViewport=!0,this.becameVisibleOnScreenTimestamp=Date.now(),this.handleView(m.o(this),!this.isPDP),this.isTranslatable&&this.isTranslationV2Enabled&&C.o.post(this,this),this.hasBeenViewed=!0,m.a6(this.viewContext)&&(this.listingBelowConsumeTimer=setTimeout(this.trackConsume,m.c)))}observerIsNotIntersectingCallback(e){clearTimeout(this.listingBelowConsumeTimer),this.isNotBrandSafe&&e.target===this&&window.dispatchEvent(t.c(t.gZ,{postId:this.id,isInView:!1}));const o=this.isPostInViewport;this.isPostInViewport=!1,o&&(this.handleConsume(),this.isPostLeaveEventsEnabled&&t.f(this,m.a1(this)))}};return t._([t.n({type:Boolean})],K.prototype,"archived",void 0),t._([t.n({type:Boolean})],K.prototype,"deleted",void 0),t._([t.n({type:Boolean,reflect:!0})],K.prototype,"hidden",void 0),t._([t.n({type:String,attribute:"author-id"})],K.prototype,"authorId",void 0),t._([t.n({type:String,attribute:"created-timestamp"})],K.prototype,"createdTimestamp",void 0),t._([t.n({type:String})],K.prototype,"domain",void 0),t._([t.n({type:String,attribute:"content-href"})],K.prototype,"contentHref",void 0),t._([t.n({type:String})],K.prototype,"id",void 0),t._([t.n({type:String,attribute:"user-id"})],K.prototype,"userId",void 0),t._([t.n({type:String,attribute:"app-id"})],K.prototype,"appId",void 0),t._([t.n({type:String,attribute:"app-slug"})],K.prototype,"appSlug",void 0),t._([t.n({type:Boolean})],K.prototype,"game",void 0),t._([t.n({type:String,attribute:"app-installation-id"})],K.prototype,"appInstallationId",void 0),t._([t.n({type:String,attribute:"app-name"})],K.prototype,"appName",void 0),t._([t.n({type:String,attribute:"app-owner-id"})],K.prototype,"appOwnerId",void 0),t._([t.n({type:String,attribute:"app-version-number"})],K.prototype,"appVersionNumber",void 0),t._([t.n({type:String,attribute:"app-public-api-version"})],K.prototype,"appPublicApiVersion",void 0),t._([t.n({type:Boolean,reflect:!0})],K.prototype,"nsfw",void 0),t._([t.n({type:Boolean})],K.prototype,"promoted",void 0),t._([t.n({type:Number})],K.prototype,"score",void 0),t._([t.n({type:Boolean,reflect:!0})],K.prototype,"spoiler",void 0),t._([t.n({type:String,attribute:"subreddit-id"})],K.prototype,"subredditId",void 0),t._([t.n({type:String,attribute:"subreddit-name"})],K.prototype,"subredditName",void 0),t._([t.n({type:Boolean,attribute:"is-subscribed"})],K.prototype,"isSubscribed",void 0),t._([t.n({type:String,attribute:"subreddit-prefixed-name"})],K.prototype,"subredditPrefixedName",void 0),t._([t.n({type:String,attribute:"post-title"})],K.prototype,"postTitle",void 0),t._([t.n({type:String,attribute:"post-type"})],K.prototype,"postType",void 0),t._([t.n({type:String,attribute:"recommendation-source"})],K.prototype,"recommendationSource",void 0),t._([t.n({type:String,attribute:"recommendation-subreddit-id"})],K.prototype,"recommendationSubredditId",void 0),t._([t.n({type:String,attribute:"recommendation-subreddit-name"})],K.prototype,"recommendationSubredditName",void 0),t._([t.n({type:String,attribute:"post-language"})],K.prototype,"postLanguage",void 0),t._([t.n({type:String,attribute:"translation-language"})],K.prototype,"translationLanguage",void 0),t._([t.n({type:Boolean,attribute:"is-translation-on",reflect:!0})],K.prototype,"isTranslationOn",void 0),t._([t.n({type:Number})],K.prototype,"feedIndex",void 0),t._([t.n({type:Boolean,attribute:"stickied"})],K.prototype,"isStickied",void 0),t._([t.n({type:Boolean,attribute:"highlighted"})],K.prototype,"isHighlighted",void 0),t._([t.n({type:Boolean,attribute:"crossposting-v2-enabled"})],K.prototype,"isCrosspostingV2Enabled",void 0),t._([t.n({type:Boolean,attribute:"is-translation-v2-enabled"})],K.prototype,"isTranslationV2Enabled",void 0),t._([t.n({type:Number,attribute:"comment-count"})],K.prototype,"commentCount",void 0),t._([t.n({type:Boolean,attribute:"is-awardable"})],K.prototype,"isAwardable",void 0),t._([t.n({type:Number,attribute:"award-count"})],K.prototype,"awardCount",void 0),t._([t.n({type:String,attribute:"award-id"})],K.prototype,"awardId",void 0),t._([t.n({type:String,attribute:"award-icon-url"})],K.prototype,"awardIconUrl",void 0),t._([t.n({type:Array,attribute:"award-icon-urls"})],K.prototype,"awardIconUrls",void 0),t._([t.n({type:Boolean,attribute:"hide-award-icon"})],K.prototype,"hideAwardIcon",void 0),t._([t.n({type:Boolean,attribute:"is-awarded-by-user"})],K.prototype,"isAwardedByUser",void 0),t._([t.n({type:Boolean,attribute:"has-iconic-award"})],K.prototype,"hasIconicAward",void 0),t._([t.n({type:Boolean,attribute:"has-branded-award"})],K.prototype,"hasBrandedAward",void 0),t._([t.n({type:String})],K.prototype,"permalink",void 0),t._([t.n({type:Boolean})],K.prototype,"gallery",void 0),t._([t.n({type:String,attribute:"view-context"})],K.prototype,"viewContext",void 0),t._([t.n({type:String,attribute:"view-type"})],K.prototype,"viewType",void 0),t._([t.n({type:Boolean,attribute:"is-slim-card"})],K.prototype,"isSlimCard",void 0),t._([t.n({type:Boolean,attribute:"is-desktop-viewport"})],K.prototype,"isDesktopViewport",void 0),t._([t.n({type:Boolean,attribute:"is-reporting-enabled"})],K.prototype,"isReportingEnabled",void 0),t._([t.n({type:Boolean,attribute:"is-link-post"})],K.prototype,"isLinkPost",void 0),t._([t.n({type:Boolean,attribute:"is-ama"})],K.prototype,"isAma",void 0),t._([t.n({type:Boolean,attribute:"is-embed"})],K.prototype,"isEmbed",void 0),t._([t.n({type:Boolean,attribute:"is-not-brand-safe"})],K.prototype,"isNotBrandSafe",void 0),t._([t.n({type:Boolean,attribute:"is-crosspost"})],K.prototype,"isCrosspost",void 0),t._([t.n({type:Boolean,attribute:"is-crosspostable"})],K.prototype,"isCrosspostable",void 0),t._([t.n({type:Boolean,attribute:"is-embeddable"})],K.prototype,"isEmbeddable",void 0),t._([t.n({type:Boolean,attribute:"user-logged-in"})],K.prototype,"isUserLoggedIn",void 0),t._([t.n({type:Boolean,attribute:"disabled"})],K.prototype,"disabled",void 0),t._([t.n({type:String,attribute:"vote-type"})],K.prototype,"voteType",void 0),t._([t.n({type:Boolean,attribute:"show-full-content"})],K.prototype,"showFullContent",void 0),t._([t.n({type:Boolean,attribute:"is-translatable"})],K.prototype,"isTranslatable",void 0),t._([t.n({type:Boolean,attribute:"is-translation-fetched",reflect:!0})],K.prototype,"isTranslationFetched",void 0),t._([t.n({type:Boolean,attribute:"is-post-translated",reflect:!0})],K.prototype,"isPostTranslated",void 0),t._([t.n({type:Boolean,attribute:"is-post-body-translated",reflect:!0})],K.prototype,"isPostBodyTranslated",void 0),t._([t.n({type:Boolean,attribute:"is-mt-seo-user-page",reflect:!0})],K.prototype,"isMTSEOUserPage",void 0),t._([t.n({type:Boolean,attribute:"should-hide-original-language-link"})],K.prototype,"shouldHideOriginalLanguageLink",void 0),t._([t.n({type:Boolean,attribute:"has-mt-seo-translation-interruption"})],K.prototype,"hasMTSEOTranslationInterruption",void 0),t._([t.n({type:String,attribute:"more-posts-cursor"})],K.prototype,"morePostsCursor",void 0),t._([t.n({type:Boolean,attribute:"should-track-post-leave-events"})],K.prototype,"isPostLeaveEventsEnabled",void 0),t._([t.n({type:Boolean,attribute:"locked",reflect:!0})],K.prototype,"isLocked",void 0),t._([t.n({type:Boolean,attribute:"banned",reflect:!0})],K.prototype,"isBanned",void 0),t._([t.n({type:Boolean,attribute:"is-contest-mode",reflect:!0})],K.prototype,"isContestMode",void 0),t._([t.n({type:String,attribute:"pdp-target"})],K.prototype,"pdpTarget",void 0),t._([t.n({type:Boolean,attribute:"is-promoteable-post"})],K.prototype,"isPromoteablePost",void 0),t._([t.n({type:String,attribute:"moderation-verdict"})],K.prototype,"moderationVerdict",void 0),t._([t.n({type:Boolean,attribute:"previous-actions-feature"})],K.prototype,"previousActionsFeature",void 0),t._([t.n({type:String,reflect:!0})],K.prototype,"updateAnimation",void 0),t._([t.n({type:String,attribute:"item-state",reflect:!0})],K.prototype,"itemState",void 0),t._([t.n({type:Boolean,attribute:"are-reports-expandable"})],K.prototype,"areReportsExpandable",void 0),t._([t.n({type:Boolean,attribute:"compact-ui-experiment"})],K.prototype,"isCompactUIExp",void 0),t._([t.n({type:Boolean,attribute:"post-comment-tap-exp"})],K.prototype,"isPostCommentTapExp",void 0),t._([t.n({type:Boolean,attribute:"is-pdp-seeker-m1-lo"})],K.prototype,"isPdpSeekerM1LO",void 0),t._([t.n({type:Boolean,attribute:"share-button-ssr"})],K.prototype,"shareButtonSSR",void 0),t._([t.n({type:Boolean,attribute:"interaction-from-hotkey"})],K.prototype,"interactionFromHotkey",void 0),t._([t.n({type:Boolean,attribute:"apply-feeds-simplification"})],K.prototype,"applyFeedsSimplification",void 0),t._([t.n({type:Boolean,attribute:"inline-game-tag"})],K.prototype,"inlineGameTag",void 0),t._([t.v()],K.prototype,"showPostRemovalBanner",void 0),t._([t.v()],K.prototype,"showExpando",void 0),t._([t.v()],K.prototype,"postVoteType",void 0),t._([t.v()],K.prototype,"postScore",void 0),t._([t.v()],K.prototype,"useShortHiddenPostForm",void 0),t._([t.v()],K.prototype,"isThumbnailSet",void 0),t._([t.v()],K.prototype,"isUpdatingPostBody",void 0),t._([t.v()],K.prototype,"displayPostAnalytics",void 0),t._([t.v()],K.prototype,"isCrosspostingCoachmarkOpen",void 0),t._([t.v()],K.prototype,"eligibleCrosspostingSubreddit",void 0),K=t._([t.e("shreddit-post")],K),{D,get S(){return K},a:f}}));
SML.dm("BWUv70NGv2",[],(async()=>{var t,T,S;return function(t){t.MODERATOR="moderator",t.COMMUNITY_STATUS="community_status"}(t||(t={})),function(t){t.VIEW="view",t.CLICK="click"}(T||(T={})),function(t){t.STATUS_EDIT="status_edit",t.STATUS_CANCEL="status_cancel",t.STATUS_CREATE="status_create",t.STATUS_DELETE="status_delete",t.STATUS_LINK="status_link",t.STATUS_DISPLAY="status_display",t.STATUS_SUB_LINK="subreddit_link"}(S||(S={})),{get A(){return T},get N(){return S},get S(){return t}}}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("BYyjGDBWHg",["CsxDAjmHZE"],(async a=>{const{svg:c}=a.g();return{P:"pagination__change-page",c:a.m(c` `,"0 0 12 12","checkmark-12")}}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");
SML.dm("BaFXWsm32y",["CsxDAjmHZE","C42E8rVVpA"],(async(n,o)=>{const{svg:e}=n.g();return{b:(n,e)=>o.b({source:n,action:"view",noun:"banner"},{action_info:{reason:e}}),e:(n,e)=>o.b({source:n,action:"submit",noun:"email"},{action_info:{success:e}}),i:n.m(e` `,"0 0 20 20","info"),r:()=>o.b({source:o.eZ.ResetPassword,action:"submit",noun:"reset_complete"})}}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("BeSXmWRKRU",["CsxDAjmHZE"],(async a=>{const{svg:n}=a.g();return{c:a.m(n` `,"0 0 20 20","comment"),i:a=>!!a&&(a.indexOf("profileIcon_snoo")>-1||a.indexOf("snoovatar/avatars")>-1||a.endsWith("snoovatar_anonymous.svg"))}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./ZGFmk_MDw6.js",import.meta.url,"ZGFmk_MDw6");SML.di("./DrwVpipAUZ.js",import.meta.url,"DrwVpipAUZ");
SML.dm("Bg8aPoF3z8",["C42E8rVVpA","CsxDAjmHZE","ZGFmk_MDw6","DrwVpipAUZ"],(async(e,t,i,a)=>{let n=class extends t.s{constructor(){super(...arguments),this._windowEvents=new e.E(this,(()=>window)),this.enableEscapeKey=!1,this.handleBackClick=()=>{if(void 0===window.navigation)return void history.back();if(!this.subredditPrefixedName&&!this.postId)return void history.back();const e=window.navigation.currentEntry;if(e&&e.url){const t=e.index,i=new URL(e.url);for(let e=t-1;e>=0;e--){const t=window.navigation.entries()[e];if(t.url){const e=new URL(t.url);if(e.host===i.host&&e.pathname!==i.pathname)return void window.navigation.traverseTo(t.key)}}}window.navigation.navigate(this.destinationUrl)},this.handleEscKey=this._windowEvents.define("keydown",(e=>{if(this.enableEscapeKey&&"Escape"===e.key){if(e.target instanceof Element){const t=null!==e.target.closest('[contenteditable="true"]'),i=null!==e.target.closest("faceplate-hovercard"),a=i&&"dialog"===e.target.getAttribute("aria-haspopup");if(t||i&&!a)return}this.handleBackClick()}}))}get destinationUrl(){return this.mtSeoSubredditLink||a.b(this.subredditPrefixedName)}render(){const a="Back";return t.x` ${e.Z({appearance:"secondary",attributes:{type:"button","aria-label":a,onclick:this.handleBackClick},size:e.ac.Small,screenReaderContent:a,leadingIcon:i.a({size:t.I.Small})})} `}};n.styles=[e.t],e._([e.n({attribute:"subreddit-prefixed-name"})],n.prototype,"subredditPrefixedName",void 0),e._([e.n({type:String,attribute:"mt-seo-subreddit-link"})],n.prototype,"mtSeoSubredditLink",void 0),e._([e.n({attribute:"post-id"})],n.prototype,"postId",void 0),e._([e.n({type:Boolean,attribute:"enable-escape-key"})],n.prototype,"enableEscapeKey",void 0),n=e._([e.e("pdp-back-button")],n)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("Bgu_hwQeA2",["C42E8rVVpA","CsxDAjmHZE"],(async(t,i)=>{t.cU(i.i`#shreddit-media-lightbox .lightboxed-content{display:flex;align-items:center;justify-content:center;width:100%;height:100%}#shreddit-media-lightbox .non-lightboxed-content{display:none}#shreddit-media-lightbox .media-lightbox-img{max-height:none}#shreddit-media-lightbox::part(panel){max-width:100svw;max-height:100svh;width:100svw;height:100svh;border-radius:0}`);let e=class extends i.s{constructor(){super(...arguments),this._isConnected=!1,this._push=t.dn,this._lightboxUrl=void 0,this.pubsub=new t.m(this),this.templateRef=t.U(),this.contentRef=t.U(),this._hideCloseButtonOnIdle=!1,this.disableAnimations=!1,this.isIdle=!1,this.lightboxOpenHandler=({element:t,attributes:i={}})=>{const e=i.permalink??window.location.href;try{const s=e.startsWith("http")?e:`${window.location.origin}${e}`;this._lightboxUrl=new URL(`${s}#lightbox`),this._push(this._lightboxUrl.href,{onForwardNav:()=>this.showModal({element:t,attributes:i}),onBackNav:()=>this.dialog?.hide()})}catch(s){this.showModal({element:t,attributes:i}),window.Sentry?.captureException?.(`shreddit-media-lightbox: Error parsing permalink ${e}`,s)}},this.showModal=({element:i,attributes:e={}})=>{if(this.dialog?.open)return;const{hideCloseButtonOnIdle:s,onAfterClose:o}=e;this._hideCloseButtonOnIdle=s??!1,this._onAfterClose=o,this._originalParent=i,this._originalParentHeight=i.offsetHeight||i.parentElement?.offsetHeight,this.dialog?.showModal(),this.pubsub.publish(t.T.LightboxOpened)},this.onAfterShow=()=>{const t=document.createElement("div");t.style.height=`${this._originalParentHeight}px`,this.contentRef?.value?.replaceChildren(...(this._originalParent?.children || [])),this._originalParent?.appendChild(t),this._startIdleTimer(),this.isIdle=!1},this.lightboxCloseHandler=()=>{this.dialog?.open&&this.dialog?.hide()},this.onDialogHide=()=>{this.pubsub.publish(t.T.LightboxClosed),this.contentRef?.value?.children&&this._originalParent&&(this._originalParent.replaceChildren(...this.contentRef.value.children),this.contentRef.value.innerHTML=""),this._originalParent=void 0,this._hideCloseButtonOnIdle=!1,this._idleTimeout=void 0,this.isIdle=!1;const i=window.navigation?.currentEntry?.url!==this._lightboxUrl?.href;window.navigation?.canGoBack&&!i&&(this._lightboxUrl=void 0,window.navigation.back())},this.onAfterHide=()=>{this._onAfterClose&&(this._onAfterClose(),this._onAfterClose=void 0)},this._startIdleTimer=()=>{this._hideCloseButtonOnIdle&&(this._stopIdleTimer(),this._idleTimeout=window.setTimeout((()=>{this.isIdle=!0}),1500))}}static get styles(){return[t.t]}connectedCallback(){super.connectedCallback();Array.from(document.getElementsByTagName("shreddit-media-lightbox")).some((t=>t._isConnected))||(this._isConnected=!0,this.pubsub.subscribe(t.T.LightboxOpen,this.lightboxOpenHandler,!1),this.pubsub.subscribe(t.T.LightboxClose,this.lightboxCloseHandler,!1))}firstUpdated(){this.dialog&&this.disableAnimations&&function(i){const e={keyframes:[],options:{duration:0}};["dialog.show","dialog.hide","dialog.denyClose","dialog.overlay.show","dialog.overlay.hide"].forEach((s=>{t.fC(i,s,e)}))}(this.dialog)}disconnectedCallback(){super.disconnectedCallback(),this._isConnected&&(this.dialog?.open&&this.dialog?.hide(),this._isConnected=!1)}_stopIdleTimer(){window.clearTimeout(this._idleTimeout),this._idleTimeout=void 0,this.isIdle=!1}render(){if(this._isConnected){const e=i.x`
${t.Z({size:t.ac.Large,appearance:"media",shape:"pill",attributes:{"data-testid":"close-button",className:"absolute top-sm end-sm z-10 duration-300 "+(this.isIdle?"opacity-0 invisible":"opacity-100"),"aria-label":"Close lightbox",onclick:()=>{this.dialog?.hide()}},children:i.c({size:i.I.Medium})})}
`;return i.x` `}return""}};t._([t.n({type:Boolean,attribute:"disable-animations"})],e.prototype,"disableAnimations",void 0),t._([t.v()],e.prototype,"isIdle",void 0),t._([t.Q("rpl-dialog")],e.prototype,"dialog",void 0),e=t._([t.e("shreddit-media-lightbox")],e);let s=class extends i.s{constructor(){super(...arguments),this.pubsub=new t.m(this),this.handleInteraction=i=>{t.i(i)&&this.openLightbox()},this.handleTrigger=({postId:t})=>{t===this.postId&&this.openLightbox()},this.openLightbox=()=>{this.pubsub.publish(t.T.LightboxOpen,{element:this,attributes:{permalink:this.permalink}})}}connectedCallback(){super.connectedCallback(),this.pubsub.subscribe(t.T.TriggerLightboxOpen,this.handleTrigger,!1)}render(){return i.x` `}};s.styles=[i.i`:host{cursor:pointer}`,t.t],t._([t.n({type:String,attribute:"post-id"})],s.prototype,"postId",void 0),t._([t.n({type:String,attribute:"permalink"})],s.prototype,"permalink",void 0),s=t._([t.e("shreddit-media-lightbox-listener")],s)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./BkjgI35gdl.js",import.meta.url,"BkjgI35gdl");SML.di("./BZFHJN-Awe.js",import.meta.url,"BZFHJN-Awe");SML.di("./DdaDf_pDuu.js",import.meta.url,"DdaDf_pDuu");SML.di("./GtN-cJJQ1w.js",import.meta.url,"GtN-cJJQ1w");SML.di("./DTv1TTlJbR.js",import.meta.url,"DTv1TTlJbR");SML.di("./C1Wn8wdQed.js",import.meta.url,"C1Wn8wdQed");SML.di("./DZBIvVodeO.js",import.meta.url,"DZBIvVodeO");SML.di("./BHPKNOzIpV.js",import.meta.url,"BHPKNOzIpV");SML.di("./DO8nehoLsI.js",import.meta.url,"DO8nehoLsI");SML.di("./Bb-MnsKJdV.js",import.meta.url,"Bb-MnsKJdV");SML.di("./C-58MBdf3h.js",import.meta.url,"C-58MBdf3h");SML.di("./_jDTHze3Kl.js",import.meta.url,"_jDTHze3Kl");SML.di("./Dx86bnsEIQ.js",import.meta.url,"Dx86bnsEIQ");SML.di("./CTI0RAQLXe.js",import.meta.url,"CTI0RAQLXe");SML.di("./BFDJQElz9q.js",import.meta.url,"BFDJQElz9q");SML.di("./CsrVq94Zej.js",import.meta.url,"CsrVq94Zej");SML.di("./ATX576QdO9.js",import.meta.url,"ATX576QdO9");SML.di("./Da-UYDWSOS.js",import.meta.url,"Da-UYDWSOS");SML.di("./B01f6V9jnX.js",import.meta.url,"B01f6V9jnX");SML.di("./CKuUwv2_dV.js",import.meta.url,"CKuUwv2_dV");SML.di("./DyL-VOTFZ1.js",import.meta.url,"DyL-VOTFZ1");SML.di("./D54cR_yKh5.js",import.meta.url,"D54cR_yKh5");SML.di("./CPpmjsoDQe.js",import.meta.url,"CPpmjsoDQe");SML.di("./0Z5i5741wq.js",import.meta.url,"0Z5i5741wq");SML.di("./Af5s1GVSm3.js",import.meta.url,"Af5s1GVSm3");SML.di("./C-4AJ2Y78L.js",import.meta.url,"C-4AJ2Y78L");SML.di("./CZU1X6W5t6.js",import.meta.url,"CZU1X6W5t6");SML.di("./5YOkNVVwii.js",import.meta.url,"5YOkNVVwii");SML.di("./cjhvxMuwOm.js",import.meta.url,"cjhvxMuwOm");SML.di("./wDRHyxVKtb.js",import.meta.url,"wDRHyxVKtb");SML.di("./mDMEDMOI5J.js",import.meta.url,"mDMEDMOI5J");
SML.dm("Bj4iUbEjeH",["C42E8rVVpA","CsxDAjmHZE","BkjgI35gdl","BZFHJN-Awe","DdaDf_pDuu","GtN-cJJQ1w","DTv1TTlJbR","C1Wn8wdQed","DZBIvVodeO","BHPKNOzIpV","DO8nehoLsI","Bb-MnsKJdV","C-58MBdf3h","_jDTHze3Kl","Dx86bnsEIQ","CTI0RAQLXe","BFDJQElz9q","CsrVq94Zej","ATX576QdO9","Af5s1GVSm3","cjhvxMuwOm","wDRHyxVKtb","mDMEDMOI5J","Da-UYDWSOS","B01f6V9jnX","CKuUwv2_dV","DyL-VOTFZ1","D54cR_yKh5","CPpmjsoDQe","0Z5i5741wq","C-4AJ2Y78L","CZU1X6W5t6","5YOkNVVwii"],(async(e,t,a,i,o,n,r,s,d,l,h,m,c,u,p,I,k,T,N,R,g,E,A)=>{const C="modQueue",S="modQueueChat",v="overflow",M="inline";let b=class extends t.s{constructor(){super(...arguments),this.location=M,this.viewContext=void 0,this.COACHMARK_LABELS={[C]:"NEW! Chat about items in the queue",[S]:"Jump back in",[v]:"NEW! Chat about content",[M]:"Jump back in"},this.COACHMARK_BODY={[C]:"Share content in the queue directly with your mod team",[S]:"Get back to chat threads from the queue",[v]:"Share content directly with your mod team",[M]:"Get back to chat threads from the content"},this.COACHMARK_POSITION={[C]:g.P.Top,[S]:g.P.Top,[v]:g.P.Left,[M]:g.P.Left},this.LOCAL_STORAGE_KEYS={[C]:e.a1.ShareToModChatCoachMarkMQSeen,[S]:e.a1.ShareToModChatCoachMarkMQChatSeen,[v]:e.a1.ShareToModChatCoachMarkOverflowSeen,[M]:e.a1.ShareToModChatCoachMarkInlineSeen},this._showShareToModChatBanner=!e.a0.getItem(this.getLocalStorageKey()),this.closeCoachmark=()=>{this._showShareToModChatBanner=!1}}getLocalStorageKey(){return this.LOCAL_STORAGE_KEYS[this.location]}connectedCallback(){super.connectedCallback();const t=e.a0.getItem(this.getLocalStorageKey());this.location===v&&this.viewContext&&[k.P.ModQueue,k.P.ModQueueAll].includes(this.viewContext)||t?this._showShareToModChatBanner=!1:(e.a0.setItem(this.getLocalStorageKey(),"true"),this._showShareToModChatBanner=!0)}disconnectedCallback(){super.disconnectedCallback()}render(){return t.x` ${this.COACHMARK_LABELS[this.location]}
${e.Z({attributes:{className:"close-btn",slot:"close-button",onclick:e=>{e.stopPropagation(),this.closeCoachmark()}},appearance:"plainInverted",size:e.ac.Small,leadingIcon:t.c({size:t.I.Small})})} ${this.COACHMARK_BODY[this.location]}
`}};b.styles=[e.t],e._([e.n({type:String,attribute:"location"})],b.prototype,"location",void 0),e._([e.n({type:String,attribute:"view-context"})],b.prototype,"viewContext",void 0),e._([e.v()],b.prototype,"_showShareToModChatBanner",void 0),b=e._([e.e("share-to-mod-chat-coachmark")],b);const D=t.s;class O extends D{constructor(){super(...arguments),this.size=a.L.Medium,this.appearance="content-action",this.viewContext=k.P.CommentsPage,this.feedViewType=e.a6.ModQueueCompactView,this.itemState=T.M.UNMODERATED,this.verdict=void 0,this.isCurrentUserAuthor=!1,this.isDeleted=!1,this.isRemoved=!1,this.isModModeEnabled=!1,this.isAdmin=!1,this.isLocked=!1,this.isStickied=!1,this.isHighlighted=!1,this.isReportingIgnored=!1,this.areHighlightsEnabled=!1,this.hasReports=!1,this.hasRemovalReason=!1,this.hasPostFlair=!1,this.isProfilePost=!1,this.isPromotedPost=!1,this.isSpamFilteredPost=!1,this.isDesktop=!1,this.permalink="",this.isContentLevelModsCommsEnabled=!1,this.modContentDiscussionContext=void 0,this.isFeedNoApproveEnabled=!1,this.focusChatTextareaFn=A.f,this.pubsub=new e.m(this),this.modActionsController=new N.ModActionsController(this,{getThingIdFn:()=>this.thingId||"",getIsProfilePostFn:()=>this.isProfilePost}),this.getListItemClickHandler=e=>()=>(this.dropdownMenu?.close(),e())}get isPost(){return k.j(this.thingId||"")}get shouldAlwaysShowAction(){return!this.isModModeEnabled&&!this.isOnModqueuePage}shouldAlwaysShowApproveAction(){return this.shouldAlwaysShowAction||this.isModVerdictVisible&&this.itemState!==T.M.APPROVED&&this.shouldShowActionInMenu}shouldAlwaysShowRemoveAction(){return this.shouldAlwaysShowAction||this.isModVerdictVisible&&this.itemState!==T.M.REMOVED&&this.shouldShowActionInMenu}get isOnModqueuePage(){return this.viewContext===k.P.ModQueue||this.viewContext===k.P.ModQueueAll}get isApproved(){return this.itemState===T.M.APPROVED}get shouldShowConfirmRemoval(){return T.a(this.itemState,this.isSpamFilteredPost)}get shouldShowActionInMenu(){return!T.b(this.viewContext,this.feedViewType)||"hover-menu"===this.appearance}get isDistinguishable(){return this.isCurrentUserAuthor&&!this.isDeleted}get isStickyable(){return!(this.viewContext===k.P.ProfileFeed||this.viewContext===k.P.ProfileFeed2||this.isDeleted)}get isModVerdictVisible(){return T.h(this.verdict??null)&&!this.hasReports&&this.itemState!==T.M.FILTERED}renderApproveAction(){return this.isFeedNoApproveEnabled&&!this.isOnModqueuePage&&this.itemState===T.M.UNMODERATED||this.shouldAlwaysShowApproveAction()&&T.c(this.itemState)?a.l({leadingIcon:t.C(),label:"Approve",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleApproveContent)}):null;}renderRemoveAction(){return this.isFeedNoApproveEnabled&&!this.isOnModqueuePage&&this.itemState===T.M.UNMODERATED||this.shouldAlwaysShowRemoveAction()&&T.d(this.itemState)?a.l({leadingIcon:t.c(),label:"Remove",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleRemoveContent)}):null;}renderConfirmRemovalAction(){return this.shouldAlwaysShowRemoveAction()&&this.shouldShowConfirmRemoval?a.l({leadingIcon:u.r(),label:"Confirm Removal",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleConfirmRemoval)}):null;}renderSpamAction(){return T.e({moderationState:this.itemState,isSpamFilteredPost:this.isSpamFilteredPost,isRemoved:this.isRemoved,isPromotedPost:this.isPromotedPost})&&this.shouldShowActionInMenu?a.l({leadingIcon:s.s(),label:"Mark as Spam",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleRemoveContentAsSpam)}):null;}renderShareToModChatAction(e){if(!T.f({isPromotedPost:this.isPromotedPost})||!this.shouldShowActionInMenu||!e?.modChatChannel||e?.modContentDiscussion)return null;const i=e?.modContentDiscussion?`${R.g(e.modContentDiscussion.chatChannel?.roomId,e.modContentDiscussion.chatMessage?.id)}/thread`:R.a(e?.modChatChannel?.roomId);return t.x` ${a.l({leadingIcon:p.c(),trailingSlot:t.x` NEW `,label:"Share to mod chat",size:this.size,onClick:async()=>{e.modContentDiscussion||(await this.focusChatTextareaFn())}})} `;}renderIgnoreReportsAction(){return this.isReportingIgnored||!this.hasReports?null:a.l({leadingIcon:s.i(),label:"Ignore reports and approve",size:this.size,onClick:this.getListItemClickHandler((()=>{this.modActionsController.handleIgnoreReports(),this.modActionsController.handleApproveContent()}))});}renderUnignoreReportsAction(){return this.isReportingIgnored?a.l({leadingIcon:s.a(),label:"Unignore reports",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleUnignoreReports)}):null;}renderAddRemovalReasonAction(){return T.s(this.itemState,this.hasRemovalReason,this.isSpamFilteredPost,this.isProfilePost)&&this.shouldShowActionInMenu?a.l({leadingIcon:o.a(),label:"Add Removal Reason",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleAddRemovalReason)}):null;}renderDistinguishAction(){return this.isDistinguishable&&this.distinguishedAs!==e.dI.Moderator?a.l({leadingIcon:r.t(),label:"Show mod label",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleDistinguish)}):null;}renderUndistinguishAction(){return this.isDistinguishable&&this.distinguishedAs===e.dI.Moderator?a.l({leadingIcon:n.t(),label:"Hide mod label",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleUndistinguish)}):null;}renderStickyAction(e){return!this.isStickyable||this.isStickied||!this.shouldShowActionInMenu||this.areHighlightsEnabled||this.isPromotedPost?null:a.l({leadingIcon:c.p(),label:e,size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleSticky)})}renderUnstickyAction(e){return this.isStickyable&&this.isStickied&&this.shouldShowActionInMenu&&!this.areHighlightsEnabled&&!this.isPromotedPost?a.l({leadingIcon:m.p(),label:e,size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleUnsticky)}):null}renderAddToHighlightsAction(){return this.isStickyable&&this.shouldShowActionInMenu&&this.areHighlightsEnabled&&s.H.has(this.viewContext)&&!this.isHighlighted?a.l({leadingIcon:c.p(),label:"Add to highlights",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleUpdateHighlightedPost)}):null;}renderRemoveFromHighlightsAction(){return this.isStickyable&&this.shouldShowActionInMenu&&this.areHighlightsEnabled&&s.H.has(this.viewContext)&&this.isHighlighted?a.l({leadingIcon:m.p(),label:"Remove from highlights",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleRemoveHighlightedPost)}):null;}renderLockAction(e){return this.isLocked||!this.shouldShowActionInMenu?null:a.l({leadingIcon:l.l(),label:e,size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleLock)})}renderUnlockAction(e){return this.isLocked&&this.shouldShowActionInMenu?a.l({leadingIcon:d.l(),label:e,size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleUnlock)}):null}renderEditPostFlairAction(e){return!this.shouldShowActionInMenu||this.isPromotedPost||this.isDeleted?null:a.l({leadingIcon:r.t(),label:e,size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleOpenEditPostFlairModal)})}renderCopyLinkAction(){return"hover-menu"!==this.appearance?null:this.isPost?t.x` `:t.x` `}closeModal(){this.bottomSheetMenu?.close()}openModal(){this.bottomSheetMenu?.showModal()}renderMenuTrigger(){const a={leadingIcon:h.m({size:t.I.Small}),screenReaderContent:"Moderation actions menu",appearance:"secondary",attributes:{type:"button",onclick:()=>{this.openModal()},slot:"trigger"},size:e.ac.Small};return t.x` ${"hover-menu"===this.appearance?e.Z({...a,appearance:"secondary"}):i.c({...a,appearance:"plain"})} ${"Mod actions"} `;}renderMobileActionsMenu(a){return t.x` ${this.renderMenuTrigger()} ${e.Z({attributes:{"aria-label":"Close"},appearance:"secondary",leadingIcon:t.c({size:t.I.Small}),size:e.ac.Small})} ${"Mod actions"} ${a} `;}renderActionsMenu(e){return this.isContentLevelModsCommsEnabled&&!this.modContentDiscussionContext?.modContentDiscussion?t.x` ${this.renderMenuTrigger()} ${e} `:t.x` ${this.renderMenuTrigger()} ${e} `}render(){if(this.viewContext===k.P.AggregateFeed)return t.A;const e=this.renderActions();return 0===e.length||e.every((e=>null===e))?t.x``:this.isDesktop?this.renderActionsMenu(e):this.renderMobileActionsMenu(e)}}return O.styles=[e.t],e._([e.n({type:String,attribute:"thing-id"})],O.prototype,"thingId",void 0),e._([e.n({type:String,attribute:"user-id"})],O.prototype,"userId",void 0),e._([e.n({type:String})],O.prototype,"size",void 0),e._([e.n({type:String})],O.prototype,"appearance",void 0),e._([e.n({type:String,attribute:"view-context"})],O.prototype,"viewContext",void 0),e._([e.n({type:String,attribute:"feed-view-type"})],O.prototype,"feedViewType",void 0),e._([e.n({type:String,attribute:"item-state",reflect:!0})],O.prototype,"itemState",void 0),e._([e.n({type:String,attribute:"distinguished-as"})],O.prototype,"distinguishedAs",void 0),e._([e.n({type:String,attribute:"verdict"})],O.prototype,"verdict",void 0),e._([e.n({type:String,attribute:"verdict-by"})],O.prototype,"verdictBy",void 0),e._([e.n({type:Boolean,attribute:"current-user-author"})],O.prototype,"isCurrentUserAuthor",void 0),e._([e.n({type:Boolean,attribute:"deleted"})],O.prototype,"isDeleted",void 0),e._([e.n({type:Boolean,attribute:"removed"})],O.prototype,"isRemoved",void 0),e._([e.n({type:Boolean,attribute:"mod-mode"})],O.prototype,"isModModeEnabled",void 0),e._([e.n({type:Boolean,attribute:"is-admin"})],O.prototype,"isAdmin",void 0),e._([e.n({type:Boolean,attribute:"locked"})],O.prototype,"isLocked",void 0),e._([e.n({type:Boolean,attribute:"stickied"})],O.prototype,"isStickied",void 0),e._([e.n({type:Boolean,attribute:"highlighted"})],O.prototype,"isHighlighted",void 0),e._([e.n({type:Boolean,attribute:"reporting-ignored"})],O.prototype,"isReportingIgnored",void 0),e._([e.n({type:Boolean,attribute:"highlights-enabled"})],O.prototype,"areHighlightsEnabled",void 0),e._([e.n({type:Boolean,attribute:"has-reports"})],O.prototype,"hasReports",void 0),e._([e.n({type:Boolean,attribute:"has-removal-reason"})],O.prototype,"hasRemovalReason",void 0),e._([e.n({type:Boolean,attribute:"has-post-flair"})],O.prototype,"hasPostFlair",void 0),e._([e.n({type:Boolean,attribute:"is-profile-post"})],O.prototype,"isProfilePost",void 0),e._([e.n({type:Boolean,attribute:"is-promoted-post"})],O.prototype,"isPromotedPost",void 0),e._([e.n({type:Boolean,attribute:"is-spam-filtered-post"})],O.prototype,"isSpamFilteredPost",void 0),e._([e.n({type:Boolean,attribute:"is-desktop"})],O.prototype,"isDesktop",void 0),e._([e.n({type:String,attribute:"permalink"})],O.prototype,"permalink",void 0),e._([e.n({type:Boolean,attribute:"is-content-level-mods-comms-enabled"})],O.prototype,"isContentLevelModsCommsEnabled",void 0),e._([e.n({type:Object,attribute:"mod-content-discussion-context"})],O.prototype,"modContentDiscussionContext",void 0),e._([e.n({type:Boolean,attribute:"is-feed-no-approve-enabled"})],O.prototype,"isFeedNoApproveEnabled",void 0),e._([e.n({attribute:!1})],O.prototype,"focusChatTextareaFn",void 0),e._([e.Q("faceplate-dropdown-menu")],O.prototype,"dropdownMenu",void 0),e._([e.Q("faceplate-bottom-sheet")],O.prototype,"bottomSheetMenu",void 0),{M:O}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./B01f6V9jnX.js",import.meta.url,"B01f6V9jnX");
SML.dm("C1uG4cUoPL",["C42E8rVVpA","CsxDAjmHZE","B01f6V9jnX"],(async(e,i)=>{let t=class extends i.s{constructor(){super(...arguments),this.shouldRenderViewMore=!1,this.isExpanded=!1}_onClickViewMore(){this.isExpanded=!this.isExpanded}_renderViewMoreOrLessButton(){const i=this.isExpanded?"View less":"View all";return e.Z({appearance:"bordered",attributes:{onclick:this._onClickViewMore,className:"mt-xs"},children:i,size:e.ac.Small})}render(){return i.x` ${this.shouldRenderViewMore?this._renderViewMoreOrLessButton():i.A}`}};t.styles=[e.t],e._([e.n({type:Boolean,attribute:"should-render-view-more"})],t.prototype,"shouldRenderViewMore",void 0),e._([e.v()],t.prototype,"isExpanded",void 0),t=e._([e.e("shreddit-profile-trophy-list")],t)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("C2YcjZKws8",["C42E8rVVpA","DUzIBJc2in","CsxDAjmHZE"],(async(t,e,o)=>{let l=class extends o.s{constructor(){super(...arguments),this.clickLocation=t.w.UNKNOWN,this.enableAdPostHydration=!1,this.storageController=null}async connectedCallback(){await super.connectedCallback(),await this.resolveAdStorageControllerDependencies()}async resolveAdStorageControllerDependencies(){if(!this.enableAdPostHydration)return;const{AdStorageController:t}=await SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in").then((function(t){return t.d8}));this.storageController=new t(this)}async disconnectedCallback(){await super.disconnectedCallback()}handleClick(t){this.storageController&&this.enableAdPostHydration&&this.storageController.storeAdDataInStorage();"auxclick"===t.type&&1!==t.button||e.t({el:this,clickLocation:this.clickLocation})}render(){return o.x` `}};l.styles=[t.t],t._([t.n({type:String,attribute:"click-location"})],l.prototype,"clickLocation",void 0),t._([t.n({type:Boolean,attribute:"enable-ad-post-hydration"})],l.prototype,"enableAdPostHydration",void 0),l=t._([t.e("click-location-tracker")],l)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./DdaDf_pDuu.js",import.meta.url,"DdaDf_pDuu");SML.di("./CzSZAwtRKW.js",import.meta.url,"CzSZAwtRKW");SML.di("./CZFRGXDPUQ.js",import.meta.url,"CZFRGXDPUQ");SML.di("./7ymiBBk8xO.js",import.meta.url,"7ymiBBk8xO");SML.di("./CsrVq94Zej.js",import.meta.url,"CsrVq94Zej");SML.di("./BZFHJN-Awe.js",import.meta.url,"BZFHJN-Awe");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");SML.di("./sXKB1kTPf8.js",import.meta.url,"sXKB1kTPf8");SML.di("./BoLhyQBLVt.js",import.meta.url,"BoLhyQBLVt");SML.di("./Cx-a6g3dvo.js",import.meta.url,"Cx-a6g3dvo");
SML.dm("C6IVzmWvzc",["C42E8rVVpA","CsxDAjmHZE","DdaDf_pDuu","CzSZAwtRKW","CZFRGXDPUQ","7ymiBBk8xO","CsrVq94Zej","BZFHJN-Awe","DUzIBJc2in","sXKB1kTPf8","Cx-a6g3dvo","BoLhyQBLVt"],(async(t,e,a,i,s,o,n,r,d,l,h)=>{let c=class extends e.s{constructor(){super(...arguments),this.buttonAppearance="secondary",this.buttonSize=t.ac.Small,this.showFullButtons=!1,this.screeenReaderContent="",this.thingId="",this.smartEscalationsTracking=!1,this.isLargerThanSmallWindow=!0,this._handleModActionClick=e=>{this.dataModAction===s.M.AddRemovalReason&&e.stopPropagation(),this.dataModAction&&(this.dispatchEvent(t.c(this.dataModAction)),e.target&&this.noun&&t.f(e.target,t.b({source:"moderator",action:"click",noun:this.noun})))},this.mediaWatcher=null,this.handleMediaChange=t=>{this.isLargerThanSmallWindow=t.matches},this.renderWithTooltip=()=>e.x` ${this.renderButton()} `,this.renderButton=()=>{const a=d.aq()?r.c:t.Z,i=this.smartEscalationsTracking?e.x` `:"";return e.x`${a({appearance:this.buttonAppearance,attributes:{onclick:this._handleModActionClick,className:"relative",slot:"trigger","aria-label":this.screeenReaderContent},size:this.buttonSize,children:this.showFullButtons&&this.isLargerThanSmallWindow?e.x` ${i} `:"",leadingIcon:this.showFullButtons&&this.isLargerThanSmallWindow?"":e.x` `})} ${i}`}}connectedCallback(){super.connectedCallback(),this.showFullButtons&&(this.mediaWatcher=window.matchMedia("(min-width: 768px)"),this.mediaWatcher.addEventListener("change",this.handleMediaChange))}disconnectedCallback(){super.disconnectedCallback(),this.mediaWatcher?.removeEventListener("change",this.handleMediaChange)}render(){return this.showFullButtons?this.renderButton():this.renderWithTooltip()}};c.styles=[t.t],t._([t.n({type:String,attribute:"data-mod-action"})],c.prototype,"dataModAction",void 0),t._([t.n({type:String,attribute:"event-noun"})],c.prototype,"noun",void 0),t._([t.n({type:String,attribute:"button-appearance"})],c.prototype,"buttonAppearance",void 0),t._([t.n({type:String,attribute:"button-size"})],c.prototype,"buttonSize",void 0),t._([t.n({type:Boolean,attribute:"show-full-buttons"})],c.prototype,"showFullButtons",void 0),t._([t.n({type:String,attribute:"screen-reader-content"})],c.prototype,"screeenReaderContent",void 0),t._([t.n({type:String,attribute:"thing-id"})],c.prototype,"thingId",void 0),t._([t.n({type:Boolean,attribute:"smart-escalations-tracking"})],c.prototype,"smartEscalationsTracking",void 0),t._([t.v()],c.prototype,"isLargerThanSmallWindow",void 0),c=t._([t.e("mod-action-button")],c);let m=class extends e.s{constructor(){super(...arguments),this.iconOnly=!1,this.pubsub=new t.m(this),this.handleCommentUpdate=({commentId:t,action:e,value:a})=>{if(t===this.thingId)switch(e){case i.C.addRemovalReason:this.hasRemovalReason=Boolean(a);break;case i.C.approve:case i.C.approveOptimistic:this.hasRemovalReason=!0,this.isRemoved=!1;break;case i.C.remove:case i.C.removeAsSpam:case i.C.removeOptimistic:case i.C.removeAsSpamOptimistic:case i.C.confirmRemovalOptimistic:this.hasRemovalReason=!1,this.isRemoved=!0}},this.handlePostUpdate=({postId:t,action:e,value:a})=>{if(t===this.thingId)switch(e){case o.a.addRemovalReason:this.hasRemovalReason=Boolean(a);break;case o.a.approve:case o.a.approveOptimistic:this.hasRemovalReason=!0,this.isRemoved=!1;break;case o.a.remove:case o.a.removeAsSpam:case o.a.removeOptimistic:case o.a.removeAsSpamOptimistic:case o.a.confirmRemovalOptimistic:this.isRemoved=!0,this.hasRemovalReason=!1}},this.updateModVerdict=t=>{const e=this.closest('[slot="mod-verdict"]');t&&this.isRemoved?e?.setAttribute("show-removal-reason-cta",""):e?.removeAttribute("show-removal-reason-cta")},this.shouldShowCta=()=>{const t=this.isRemoved?n.M.REMOVED:n.M.UNMODERATED;return n.s(t,!!this.hasRemovalReason,!!this.isContentSpamFilteredPost,this.isProfilePost)}}connectedCallback(){super.connectedCallback();const e=h.g(this);this.resizeObserver=new ResizeObserver((t=>{for(const e of t)e.contentRect.width<500?this.iconOnly=!0:this.iconOnly=!1})),e&&this.resizeObserver.observe(e),this.pubsub.subscribe(t.T.CommentUpdated,this.handleCommentUpdate),this.pubsub.subscribe(t.T.PostUpdated,this.handlePostUpdate),this.updateModVerdict(!this.hasRemovalReason)}disconnectedCallback(){super.disconnectedCallback();const t=h.g(this);t&&this.resizeObserver.unobserve(t),this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("hasRemovalReason")&&this.updateModVerdict(!this.hasRemovalReason)}render(){return this.hasRemovalReason||!this.shouldShowCta()?e.A:e.x` ${a.a({attributes:{"aria-hidden":"true"},size:e.I.Small})} ${this.iconOnly?a.a({attributes:{"aria-hidden":"true"},size:e.I.Small}):"Add removal reason"} `;}};m.styles=[t.t],t._([t.n({type:String,attribute:"thing-id"})],m.prototype,"thingId",void 0),t._([t.n({type:Boolean,attribute:"has-removal-reason"})],m.prototype,"hasRemovalReason",void 0),t._([t.v()],m.prototype,"iconOnly",void 0),t._([t.n({type:Boolean,attribute:"is-removed"})],m.prototype,"isRemoved",void 0),t._([t.n({type:Boolean,attribute:"is-content-spam-filtered-post"})],m.prototype,"isContentSpamFilteredPost",void 0),t._([t.n({type:Boolean,attribute:"is-profile-post"})],m.prototype,"isProfilePost",void 0),m=t._([t.e("responsive-add-removal-reason-cta")],m)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./BaFXWsm32y.js",import.meta.url,"BaFXWsm32y");SML.di("./DnH8baXgu3.js",import.meta.url,"DnH8baXgu3");SML.di("./C-4AJ2Y78L.js",import.meta.url,"C-4AJ2Y78L");SML.di("./Dg2hMEypTN.js",import.meta.url,"Dg2hMEypTN");SML.di("./YtwE4yaaKl.js",import.meta.url,"YtwE4yaaKl");SML.di("./5YOkNVVwii.js",import.meta.url,"5YOkNVVwii");SML.di("./CZU1X6W5t6.js",import.meta.url,"CZU1X6W5t6");SML.di("./cjhvxMuwOm.js",import.meta.url,"cjhvxMuwOm");SML.di("./wDRHyxVKtb.js",import.meta.url,"wDRHyxVKtb");SML.di("./BeSXmWRKRU.js",import.meta.url,"BeSXmWRKRU");SML.di("./CfLoz6YqK2.js",import.meta.url,"CfLoz6YqK2");SML.di("./CndptGkkPK.js",import.meta.url,"CndptGkkPK");SML.di("./DW4Y66xecc.js",import.meta.url,"DW4Y66xecc");
SML.dm("CA5pQQykJW",["C42E8rVVpA","CsxDAjmHZE","BaFXWsm32y","C-4AJ2Y78L","cjhvxMuwOm","wDRHyxVKtb","BeSXmWRKRU","CfLoz6YqK2","CndptGkkPK","DW4Y66xecc","DnH8baXgu3","Dg2hMEypTN","YtwE4yaaKl","5YOkNVVwii","CZU1X6W5t6"],(async(e,a,t,i,n,r,o,s,l,d)=>{const m="dont-notify-tooltip-close",u="removal-reason-input-changed",{svg:c}=a.g(),p=a.m(c` `,"0 0 20 20","ai");class g extends CustomEvent{constructor(e){super(g.eventName,{detail:e,bubbles:!0,composed:!0})}}g.eventName="select-suggested-removal-reason";let h=class extends a.s{constructor(){super(...arguments),this.reasons=[],this.suggestions=[],this.eventContext={}}getReasonNumber(e){const a=this.reasons.findIndex((a=>a.id===e));return a>=0?a+1:0}getSelectedChip(){return this.shadowRoot?.querySelector('rpl-filter-chip[name="removal-reason-suggestion"][selected]')??null}render(){return a.x` ${p({size:a.I.ExtraSmall})} ${"Suggested"}
e.preventDefault()}"> ${t.i({size:a.I.ExtraSmall})} ${"Suggestions based on the content, your rules, and your removal reasons."} e.stopPropagation()}"> ${"Learn more"} ${this.suggestions.map((e=>{const t=this.getReasonNumber(e.id);return a.x` {e.preventDefault(),e.stopPropagation()}}"> {this.dispatchEvent(new g({reasonId:e.id}))}}">${t?`${t}. `:""}${e.title} `}))}
`;}};h.styles=[e.t],e._([e.n({type:Array})],h.prototype,"reasons",void 0),e._([e.n({type:Array})],h.prototype,"suggestions",void 0),e._([e.n({type:Object,attribute:"event-context"})],h.prototype,"eventContext",void 0),e._([e.n()],h.prototype,"value",void 0),h=e._([e.e("removal-reason-suggestions")],h);let v=class extends a.s{constructor(){super(...arguments),this._showCoachmark=!localStorage.getItem(this.getLocalStorageKey()),this.closeCoachmark=e=>{e.stopPropagation(),this._showCoachmark=!1},this.handleLearnMore=e=>{e.stopPropagation(),window.open("https://support.reddithelp.com/hc/articles/15484471320980-Saved-Responses","_blank")}}getLocalStorageKey(){return e.a1.RemovalReasonSuggestionsCoachmarkSeen}connectedCallback(){super.connectedCallback();localStorage.getItem(this.getLocalStorageKey())?this._showCoachmark=!1:(localStorage.setItem(this.getLocalStorageKey(),"true"),this._showCoachmark=!0)}disconnectedCallback(){super.disconnectedCallback()}render(){return a.x` ${"Save time with suggested removal reasons"}
${e.Z({attributes:{className:"close-btn",slot:"close-button",onclick:e=>{e.stopPropagation(),this.closeCoachmark(e)}},appearance:"plainInverted",size:e.ac.Small,leadingIcon:a.c({size:a.I.Small})})} ${"Based on the content, your rules, and your removal reasons, we’ll suggest the most likely removal reasons."}
${e.Z({attributes:{slot:"secondary-button",onclick:this.handleLearnMore},children:"Learn More",appearance:"plainInverted",size:e.ac.Small})} ${e.Z({attributes:{slot:"primary-button",onclick:this.closeCoachmark},children:"Got It",appearance:"plainInverted",size:e.ac.Small})} `;}};v.styles=[e.t],e._([e.v()],v.prototype,"_showCoachmark",void 0),v=e._([e.e("removal-reason-suggestions-coachmark")],v);class k extends l.F{constructor(){super(...arguments),this.isInputDirty=!1,this.hasInvalidMacro=!1,this.required=!1,this.handleSubmit=()=>{this.isInputDirty=!0},this.handleInvalid=e=>{e.preventDefault()}}get value(){const e=this._internals.getFormValue();return e?e.toString():null}set value(e){e!==this.value&&(this._internals.setFormValue(e),this.updateValidity(),this.dispatchEvent(new CustomEvent(u,{detail:{value:e},bubbles:!0})))}connectedCallback(){super.connectedCallback(),d.c(this).then((e=>{e?.addEventListener("faceplate-submit",this.handleSubmit)})),this.addEventListener("invalid",this.handleInvalid),this.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.form?.removeEventListener("faceplate-submit",this.handleSubmit),this.removeEventListener("invalid",this.handleInvalid)}updateValidity(){this.hasInvalidMacro?this._internals.setValidity({valueMissing:!0},this.getInvalidMacroValidationMessage()):this.required&&!this.value?this._internals.setValidity({valueMissing:!0},this.getValueMissingValidationMessage()):this._internals.setValidity(),this.requestUpdate()}getValueMissingValidationMessage(){return""}getInvalidMacroValidationMessage(){return""}renderValidationState(){return this.isInputDirty&&this.validationMessage?a.x`${this.validationMessage} `:null}}e._([e.v()],k.prototype,"isInputDirty",void 0),e._([e.v()],k.prototype,"hasInvalidMacro",void 0),e._([e.n({type:Boolean})],k.prototype,"required",void 0);class N extends CustomEvent{constructor(e){super(N.eventName,{detail:e,bubbles:!0,composed:!0})}}N.eventName="select-removal-reason";let I=class extends k{constructor(){super(...arguments),this.isSitewide=!1,this.selectedRemovalReason=this.value,this.handleSelectSuggestedRemovalReason=e=>{this.selectReasonById(e.detail.reasonId,!1)},this.handleSelect=e=>{const a=e.target;this.selectReasonById(a.value)}}get displayText(){return this.reasons?.find((e=>e.id===this.value))?.title||""}static get styles(){return[e.t,a.i`:host{display:flex;flex-direction:column}`]}getValueMissingValidationMessage(){return "Removal reason is required.";}getInvalidMacroValidationMessage(){return "This removal reason contains an invalid macro. Please update the removal reason and try again.";}getPlatformRuleOption(){return {id:"default-removal-reason",title:"Breaking platform rules",message:""};}selectReasonById(e,a=!0){const t=(this.includePlatformRuleOption?[...(this.reasons || []),this.getPlatformRuleOption()]:this.reasons||[]).find((a=>a.id===e));t&&this.selectedRemovalReason!==t.id&&(this.selectedRemovalReason=t.id,this.value=t.id,this.dispatchEvent(new N({...t,isSitewide:this.isSitewide,trackEvent:a})))}getDropdownPlaceholder(){return this.isSitewide?"Select a platform rule":"Select a removal reason";}setInvalidMacro(e){this.hasInvalidMacro=e,this.isInputDirty=!0,this.updateValidity()}connectedCallback(){super.connectedCallback(),this.addEventListener(g.eventName,this.handleSelectSuggestedRemovalReason)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(g.eventName,this.handleSelectSuggestedRemovalReason)}render(){return a.x` ${super.render()} ${this.reasons?.map(((e,t)=>a.x`${t+1} `))} ${this.includePlatformRuleOption&&a.x` `} ${this.includeAddRemovalReasonOption&&a.x` `} ${this.renderValidationState()} ${this.removalReasonSuggestionsContext?.predictedRemovalSavedResponses&&this.removalReasonSuggestionsContext?.predictedRemovalSavedResponses.length>0?a.x` `:""} `}};e._([e.n({type:Array})],I.prototype,"reasons",void 0),e._([e.n({type:Boolean,attribute:"is-sitewide"})],I.prototype,"isSitewide",void 0),e._([e.n({type:Boolean,attribute:"include-platform-rule-option"})],I.prototype,"includePlatformRuleOption",void 0),e._([e.n({type:Boolean,attribute:"include-add-removal-reason-option"})],I.prototype,"includeAddRemovalReasonOption",void 0),e._([e.n({type:Object,attribute:"removal-reason-suggestions-context"})],I.prototype,"removalReasonSuggestionsContext",void 0),e._([e.v()],I.prototype,"selectedRemovalReason",void 0),I=e._([e.e("removal-reason-input")],I);let b=class extends i.R{constructor(){super(),this.tooltipVisible=!1,this.trigger="manual",this.placement="top",this.appearance="neutral"}connectedCallback(){super.connectedCallback(),this.initializeTooltip(),this.addEventListener(m,this.hideTooltip)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(m,this.hideTooltip)}async initializeTooltip(){e.a0.getItem(e.a1.RemovalReasonDontNotifyDismissed)||setTimeout((()=>this.showTooltip()),750)}showTooltip(){this.show()}hideTooltip(a){a.stopPropagation(),e.a0.setItem(e.a1.RemovalReasonDontNotifyDismissed,"true"),this.hide()}};e._([e.v()],b.prototype,"tooltipVisible",void 0),b=e._([e.e("dont-notify-tooltip")],b);let f=class extends a.s{constructor(){super(...arguments),this.isAIModEnabledForSubreddit=!1}handleClose(){this.dispatchEvent(new CustomEvent(m,{bubbles:!0}))}render(){return a.x` ${"Don't want to notify?"}
${this.isAIModEnabledForSubreddit?"Use removal reasons to train automations and track mod actions without notifying users.":"Use removal reasons to track mod actions without notifying users."}
${e.Z({appearance:"secondary",leadingIcon:a.c({size:a.I.Small}),size:e.ac.Small,screenReaderContent:"Close tooltip",attributes:{type:"button",className:"flex-shrink-0 -mt-xs",onclick:this.handleClose}})}
${e.Z({appearance:"plain",size:e.ac.Small,children:"Okay",attributes:{type:"button",onclick:this.handleClose}})}
`;}};var R;f.styles=[e.t],e._([e.n({type:Boolean,attribute:"is-ai-mod-enabled-for-subreddit"})],f.prototype,"isAIModEnabledForSubreddit",void 0),f=e._([e.e("dont-notify-tooltip-content")],f),function(e){e.Comment="Comment",e.Modmail="Modmail",e.DontNotify="DontNotify"}(R||(R={}));let T=class extends k{constructor(){super(...arguments),this.isModmailAllowed=!1,this.isAIModEnabledForSubreddit=!1}static get styles(){return[e.t,a.i`:host{display:flex;flex-direction:column;gap:var(--spacer-xs)}`]}connectedCallback(){super.connectedCallback(),this.value=R.Comment}getValueMissingValidationMessage(){return "Please select the notification method.";}render(){return a.x` ${this._internals.input} ${"Notify user via"} ${e.Z({appearance:"bordered",children:"Comment",leadingIcon:o.c({size:a.I.Small}),selected:this.value===R.Comment,attributes:{type:"button",onclick:()=>{this.value=R.Comment,this.requestUpdate()}}})} ${this.isModmailAllowed?e.Z({appearance:"bordered",children:"Mod Mail",leadingIcon:s.m({size:a.I.Small}),selected:this.value===R.Modmail,attributes:{type:"button",onclick:()=>{this.value=R.Modmail,this.requestUpdate()}}}):a.A} ${e.Z({appearance:"bordered",children:"Don't Notify",leadingIcon:a.a2({size:a.I.Small}),selected:this.value===R.DontNotify,attributes:{type:"button",onclick:()=>{this.value=R.DontNotify,this.requestUpdate()}}})}
${this.renderValidationState()} `;}};var E;e._([e.n({type:Boolean,attribute:"is-mod-mail-allowed"})],T.prototype,"isModmailAllowed",void 0),e._([e.n({type:Boolean,attribute:"is-ai-mod-enabled-for-subreddit"})],T.prototype,"isAIModEnabledForSubreddit",void 0),T=e._([e.e("removal-reason-notification-method")],T),function(e){e.User="User",e.Mod="Mod"}(E||(E={}));let z=class extends k{static get styles(){return[e.t,a.i`:host{display:flex;flex-direction:column;gap:var(--spacer-xs)}`]}connectedCallback(){super.connectedCallback(),this.value=E.Mod}getValueMissingValidationMessage(){return "Please select the notification sender.";}render(){return a.x` ${this._internals.input} ${"Send message as"} ${e.Z({appearance:"bordered",children:"Mod Team",leadingIcon:a.x` `,selected:this.value===E.Mod&&!this.disabled,attributes:{type:"button",disabled:this.disabled,onclick:()=>{this.value=E.Mod,this.requestUpdate()}}})} ${e.Z({appearance:"bordered",children:this.user,leadingIcon:a.x` `,selected:this.value===E.User&&!this.disabled,attributes:{type:"button",disabled:this.disabled,onclick:()=>{this.value=E.User,this.requestUpdate()}}})}
${this.renderValidationState()} `;}};return e._([e.n()],z.prototype,"user",void 0),z=e._([e.e("removal-reason-notification-sender")],z),{get R(){return T},S:N,get a(){return R},get b(){return I},c:u,get d(){return E}}}));
SML.di("./CZFRGXDPUQ.js",import.meta.url,"CZFRGXDPUQ");SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");
SML.dm("CBvblRTUHw",["CZFRGXDPUQ","C42E8rVVpA"],(async(a,o)=>{var r;!function(a){a.approve="approve",a.remove="remove",a.confirmRemoval="confirm_removal"}(r||(r={}));const t={[a.M.ApproveContent]:r.approve,[a.M.ConfirmRemoval]:r.confirmRemoval,[a.M.RemoveContent]:r.remove};let e=o.C;return{get A(){return r},M:class{async modBulkApprove(a){const{data:r}=await e({operation:o.H.ModBulkApprove,variables:{input:{ids:a}}});return r.modApproveBulk}async modBulkRemove(a,r=!1){const{data:t}=await e({operation:o.H.ModBulkRemove,variables:{input:{ids:a,isSpam:r}}});return t.modRemoveBulk}async modBulkRemoveAsSpam(a){const{data:r}=await e({operation:o.H.ModBulkRemove,variables:{input:{ids:a,isSpam:!0}}});return r.modRemoveBulk}async modBulkIgnore(a){const{data:r}=await e({operation:o.H.ModBulkIgnore,variables:{input:{ids:a}}});return r.modIgnoreBulk}async modBulkLock(a){const{data:r}=await e({operation:o.H.ModBulkLock,variables:{input:{ids:a}}});return r.modLockBulk}async modBulkMarkNSFW(a){const{data:r}=await e({operation:o.H.ModBulkMarkNSFW,variables:{input:{ids:a}}});return r.modMarkNsfwBulk}async modBulkMarkSpoiler(a){const{data:r}=await e({operation:o.H.ModBulkMarkSpoiler,variables:{input:{ids:a}}});return r.modMarkSpoilerBulk}async modBulkUnignore(a){const{data:r}=await e({operation:o.H.ModBulkUnignore,variables:{input:{ids:a}}});return r.modUnignoreBulk}async modBulkUnlock(a){const{data:r}=await e({operation:o.H.ModBulkUnlock,variables:{input:{ids:a}}});return r.modUnlockBulk}async modBulkUnmarkNSFW(a){const{data:r}=await e({operation:o.H.ModBulkUnmarkNSFW,variables:{input:{ids:a}}});return r.modUnmarkNsfwBulk}async modBulkUnmarkSpoiler(a){const{data:r}=await e({operation:o.H.ModBulkUnmarkSpoiler,variables:{input:{ids:a}}});return r.modUnmarkSpoilerBulk}async modBulkUpdatePostFlair(a,r,t,n){const{data:i}=await e({operation:o.H.ModBulkUpdatePostFlair,variables:{input:{postIds:a,cssClassId:r,flairTemplateId:t,text:n}}});return i.modUpdatePostFlairBulk}},S:t}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./CndptGkkPK.js",import.meta.url,"CndptGkkPK");
SML.dm("CCtMKamAzh",["C42E8rVVpA","CsxDAjmHZE","CndptGkkPK"],(async(e,t,i)=>{const a={checkbox:()=>"This checkbox must be on",radio:()=>"This radio must have a selected option"};class n extends i.F{constructor(){super(...arguments),this.required=!1,this.name="",this.initialized=!1,this._events=new e.E(this),this.ariaRole="checkbox",this._checked=!1,this.ellipsis=!1,this._handleClick=this._events.define("click",(e=>{this.disabled||e.defaultPrevented||this.handleInteraction()})),this._handleKeydown=this._events.define("keydown",(e=>{this.disabled||e.defaultPrevented||"Space"===e.code&&(e.stopPropagation(),e.preventDefault(),this.handleInteraction())}))}get checked(){return this._checked}set checked(e){const t=this._checked;e!==t&&(this._internals.setFormValue(e?this.getAttribute("value")||"on":null),this._checked=e,e?this.setAttribute("aria-checked","true"):this.removeAttribute("aria-checked"),this.hasAttribute("required")&&!this.checked?this._internals.setValidity({valueMissing:!0},a[this.ariaRole]()):this._internals.setValidity(),this.requestUpdate("checked",t))}static get styles(){return[super.styles,t.i`:host(:not(faceplate-switch-input)){min-height:var(--size-md)}:host{display:flex;align-items:center;cursor:pointer}label{font:var(--font-14-20-regular);color:var(--color-neutral-content-strong);margin-left:var(--spacer-2xs);cursor:pointer}.icon{border:var(--line-md) solid transparent;height:var(--size-md);font-size:var(--size-md);flex-shrink:0}:host([checked]) .icon,:host([indeterminate]) .icon{display:inline-block;color:var(--color-primary-background)}:host(:hover) .icon{color:var(--color-primary-background-hover)}:host([faceplate-validity=invalid]) .icon{color:var(--color-danger-content);pointer-events:none}:host([aria-disabled=true]) .icon{color:var(--color-neutral-content-disabled);pointer-events:none}:host([ellipsis]) label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([required]) label::after{position:absolute;color:var(--color-danger-content);content:'*'}:host(:focus) .icon{border-color:var(--color-global-focus,transparent);outline:0}:host(:focus){outline:0}:host(:focus:not(:focus-visible)) .icon{border-color:transparent}`]}connectedCallback(){super.connectedCallback(),this.initialized||(this.initialized=!0,this.setAttribute("role",this.ariaRole),this.setAttribute("tabindex","0"))}formDisabledCallback(e){super.formDisabledCallback(e),e?this.removeAttribute("tabindex"):this.setAttribute("tabindex","0")}render(){return t.x` ${super.render()} `}handleInteraction(){const e=new InputEvent("input",{bubbles:!0});this.dispatchEvent(e)}}return e._([e.n({type:Boolean})],n.prototype,"required",void 0),e._([e.n({type:String})],n.prototype,"name",void 0),e._([e.n({type:Boolean,reflect:!0})],n.prototype,"checked",null),e._([e.n({type:Boolean})],n.prototype,"ellipsis",void 0),{C:n}}));
SML.dm("CM4Yt4lwBK",[],(async()=>{var e,n;return function(e){e.READY="ready",e.EMPTY="empty"}(e||(e={})),function(e){e.SUCCESS="success"}(n||(n={})),{get R(){return n},get S(){return e}}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("CTI0RAQLXe",["C42E8rVVpA","CsxDAjmHZE"],(async(r,a)=>{const n={Neutral:"neutral",Success:"success",Warning:"warning",Danger:"danger",Alert:"alert",Plain:"plain",Disabled:"disabled"};class o extends r.R{constructor(){super(...arguments),this.appearance=n.Neutral,this.outline=!1,this._hasContent=!1}render(){return a.x` {this._hasContent=!!r.target.assignedNodes().length}}"> `}}r._([r.n({type:String,reflect:!0})],o.prototype,"appearance",void 0),r._([r.n({type:Boolean})],o.prototype,"outline",void 0),r._([r.v()],o.prototype,"_hasContent",void 0);var e=a.i`${r.Y}:host{border-radius:var(--radius-full);display:inline-flex}.with-content{min-width:inherit;min-height:var(--size-md);display:inline-block}.without-content{width:inherit;height:var(--size-xs)}.container{font-weight:600;display:inline-block;font-size:var(--rem10);text-align:center;padding:0 var(--spacer-2xs);line-height:var(--rem16);min-width:var(--size-xs);min-height:var(--size-xs)}:host([outline]){border:solid var(--line-md) var(--color-neutral-background)}:host([appearance=warning]){background:var(--color-warning-background);color:var(--color-neutral-background)}:host([appearance=alert]){background:var(--color-global-orangered);color:var(--color-primary-onBackground)}:host([appearance=danger]){background:var(--color-danger-background);color:var(--color-primary-onBackground)}:host([appearance=success]){background:var(--color-success-background);color:var(--color-primary-onBackground)}:host([appearance=neutral]){background:var(--color-neutral-content);color:var(--color-neutral-background)}:host([appearance=plain]){background:var(--color-neutral-background);color:var(--color-neutral-content)}:host([appearance=disabled]){background:var(--color-interactive-content-disabled);color:var(--color-neutral-background)}`;let t=class extends o{};return t.styles=e,t=r._([r.e("rpl-badge")],t),{R:n}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./Cj45kFzx5i.js",import.meta.url,"Cj45kFzx5i");
SML.dm("Cc7ygtnSSj",["C42E8rVVpA","DUzIBJc2in","CsxDAjmHZE","Cj45kFzx5i"],(async(t,e,r,E)=>{const s=e.W(r.s);let T=class extends s{constructor(){super(...arguments),this.id="",this.subreddit=""}pageIndexChangedCallback(e){super.pageIndexChangedCallback(e);const r=this.pageIndex>e?E.G.Forward:E.G.Backward;t.f(this,E.g(this,r))}};t._([t.n({type:String})],T.prototype,"id",void 0),t._([t.n({type:String})],T.prototype,"subreddit",void 0),T=t._([t.e("shreddit-gallery-listener")],T)}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("CfLoz6YqK2",["CsxDAjmHZE"],(async a=>{const{svg:c}=a.g();return{m:a.m(c` `,"0 0 20 20","mod-mail",!0)}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./BFDJQElz9q.js",import.meta.url,"BFDJQElz9q");SML.di("./tmkhvHLxT3.js",import.meta.url,"tmkhvHLxT3");
SML.dm("Cj45kFzx5i",["C42E8rVVpA","BFDJQElz9q","tmkhvHLxT3"],(async(i,a,r)=>{var t;!function(i){i.Forward="forward",i.Backward="backward"}(t||(t={}));const e=(r,t,e)=>i.b({source:"gallery",action:"view",noun:"media"},{...a.g(r),gallery:{num_items:e,position:t}}),n=(r,t,e,n)=>i.b({source:"gallery",action:"click",noun:t},{...a.g(r),gallery:{num_items:n,position:e}});return{get G(){return t},a:e,g:n,h:(a,o,m)=>{const d=n(a,o.detail.direction===r.C.FORWARDS?t.Forward:t.Backward,o.detail.prevPositionIndex,o.detail.num_items),s=e(a,o.detail.currPositionIndex,o.detail.num_items);m&&(d.ad_metadata={impression_id:m},s.ad_metadata={impression_id:m}),i.f(a,d),i.f(a,s)}}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./7ymiBBk8xO.js",import.meta.url,"7ymiBBk8xO");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./CZFRGXDPUQ.js",import.meta.url,"CZFRGXDPUQ");
SML.dm("ClL48310I8",["C42E8rVVpA","7ymiBBk8xO","CsxDAjmHZE","CZFRGXDPUQ"],(async(e,t,a)=>{SML.di("./D_F1vtGIq1.js",import.meta.url,"D_F1vtGIq1"),SML.di("./5YOkNVVwii.js",import.meta.url,"5YOkNVVwii"),SML.di("./CZU1X6W5t6.js",import.meta.url,"CZU1X6W5t6");let i=e.C,o=class extends a.s{static get styles(){return[e.t]}constructor(){super(),this.isUserLoggedIn=!1,this.postId="",this.shouldShowPollCoachmark=!1,this.voteRequestPending=!1,this.isHidden=!1,this.pollCoachmarkRef=e.U(),this.handleInput=e=>{this.selectedOptionId=e.target?.value,this._button?.removeAttribute("disabled")},this.handleShowCoachmark=e=>{e.preventDefault(),this.showPollCoachmark()},this.handleCoachmarkButtonClick=e=>{e.target.closest('[data-action="show-poll-coachmark"]')&&(e.stopPropagation(),this.showPollCoachmark())},this.handleVote=async()=>{if(e.f(this,e.b({source:"post",action:"click",noun:"vote"})),this.isUserLoggedIn)try{this.voteRequestPending=!0;const t=await this.makeVoteRequest();this.voteRequestPending=!1,t?.data?.updatePostPollVoteState?.ok?(this.isHidden=!0,await this.reloadPollPost()):this.handleVoteError(e.b8.QueryBadResponse)}catch(t){this.handleVoteError(e.bt(t))}},this.reloadPollPost=async()=>{e.p(e.T.PostUpdated,{postId:this.postId,action:t.a.updateContent,value:!0})},this._button=this.querySelector("button")}connectedCallback(){super.connectedCallback(),this._button?.addEventListener("click",this.handleVote),this.addEventListener("show-poll-coachmark",this.handleShowCoachmark),this.addEventListener("click",this.handleCoachmarkButtonClick,!0),this.shouldShowPollCoachmark&&this.showPollCoachmark()}disconnectedCallback(){super.disconnectedCallback(),this._button?.removeEventListener("click",this.handleVote),this.removeEventListener("show-poll-coachmark",this.handleShowCoachmark),this.removeEventListener("click",this.handleCoachmarkButtonClick,!0)}redirect(e){window.location.href=e}async makeVoteRequest(){return i({operation:e.H.UpdatePostPollVoteState,variables:{input:{postId:this.postId,optionId:this.selectedOptionId}}})}handleVoteError(t){this.voteRequestPending=!1,this.dispatchEvent(e.c("faceplate-alert",{level:e.X.error,message:"Something went wrong",cause:t}))}showPollCoachmark(){const e=this.querySelector("#poll-legend-anchor"),t=this.pollCoachmarkRef.value;t&&e&&(t.anchor=e,t.show())}render(){return this.isHidden?"":a.x` ${this.voteRequestPending?a.x` ${a.U({attributes:{className:"animate-spin"},size:a.I.Medium})}
`:""} ${"Who are core contributors?"}
${"Core contributors have visited or contributed to this community consistently in the past month."}
${e.Z({attributes:{slot:"close-button",id:"close-poll-coachmark-button"},leadingIcon:a.c(),appearance:"plainInverted",size:e.ac.Small})} `;}};return e._([e.aC({context:e.b3}),e.n({attribute:!1})],o.prototype,"isUserLoggedIn",void 0),e._([e.n({type:String,attribute:"post-id"})],o.prototype,"postId",void 0),e._([e.n({attribute:!1})],o.prototype,"selectedOptionId",void 0),e._([e.n({type:Boolean,attribute:"show-poll-coachmark"})],o.prototype,"shouldShowPollCoachmark",void 0),e._([e.v()],o.prototype,"voteRequestPending",void 0),o=e._([e.e("shreddit-post-poll")],o),{get ShredditPostPoll(){return o}}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("CnuhRke8T_",["C42E8rVVpA","CsxDAjmHZE"],(async(t,e)=>{let s=class extends e.s{constructor(){super(...arguments),this.handleInteraction=e=>{t.i(e)&&this.handleAction()}}static get styles(){return e.i`:host{display:contents}`}handleAction(){this.topic&&t.p(this.topic,this.data)}render(){return e.x` `}};t._([t.n({type:String})],s.prototype,"topic",void 0),t._([t.n({type:Object})],s.prototype,"data",void 0),s=t._([t.e("shreddit-pubsub-publisher")],s)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./BFDJQElz9q.js",import.meta.url,"BFDJQElz9q");
SML.dm("CsrVq94Zej",["C42E8rVVpA","BFDJQElz9q"],(async(E,R)=>{const D=R=>R===E.a5.ModApproved,e=R=>R===E.a5.AdminApproved,o=R=>R===E.a5.ModRemoved||R===E.a5.ModSpammed,M=R=>R===E.a5.AdminRemoved||R===E.a5.AdminSpammed;var P;!function(E){E.UNMODERATED="UNMODERATED",E.APPROVED="APPROVED",E.REMOVED="REMOVED",E.SPAM="SPAM",E.REPORTED="REPORTED",E.FILTERED="FILTERED"}(P||(P={}));const d=(E,R)=>(E===P.FILTERED||R)&&E!==P.APPROVED&&E!==P.REMOVED;return{get M(){return P},a:d,b:(D,e)=>(D===R.P.ModQueue||D===R.P.ModQueueAll)&&e===E.a6.ModQueueCompactView,c:E=>[P.REPORTED,P.FILTERED,P.UNMODERATED,P.REMOVED,P.SPAM].includes(E),d:E=>[P.APPROVED,P.UNMODERATED,P.REPORTED].includes(E),e:({moderationState:E,isSpamFilteredPost:R,isRemoved:D,isPromotedPost:e})=>(d(E,R)||!D)&&!e,f:({isPromotedPost:E})=>!E,h:E=>D(E)||e(E)||o(E)||M(E),i:E=>D(E)||e(E),s:(E,R,D,e)=>E===P.REMOVED&&!e&&!R&&!d(E,D)}}));
SML.di("./sXKB1kTPf8.js",import.meta.url,"sXKB1kTPf8");SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CBvblRTUHw.js",import.meta.url,"CBvblRTUHw");SML.di("./CzSZAwtRKW.js",import.meta.url,"CzSZAwtRKW");SML.di("./7ymiBBk8xO.js",import.meta.url,"7ymiBBk8xO");
SML.dm("Cx-a6g3dvo",["sXKB1kTPf8","C42E8rVVpA","CBvblRTUHw","CzSZAwtRKW","7ymiBBk8xO"],(async(t,E,T,a,e)=>({g:function(t){return t.closest("[mod-tools-host]")},p:function(o,n,S){switch(t.i(o)){case E.M.Award:n in T.S&&E.p(E.T.AwardOnContentUpdated,{awardOnContentId:o,action:T.S[n],value:S});break;case E.M.Comment:n in a.S&&E.p(E.T.CommentUpdated,{commentId:o,action:a.S[n],value:S});break;case E.M.Post:(e.P.includes(n)||n in e.S)&&E.p(E.T.PostUpdated,{postId:o,action:e.S[n],value:S});break}}})));
SML.di("./DoAaOvteiR.js",import.meta.url,"DoAaOvteiR");SML.di("./DgG2ki40OR.js",import.meta.url,"DgG2ki40OR");SML.di("./Af5s1GVSm3.js",import.meta.url,"Af5s1GVSm3");SML.di("./C2YcjZKws8.js",import.meta.url,"C2YcjZKws8");SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");
SML.dm("CzzCRZpJB5",["C42E8rVVpA","DoAaOvteiR","DgG2ki40OR","Af5s1GVSm3","C2YcjZKws8","CsxDAjmHZE","DUzIBJc2in"],(async E=>{E.g()&&(SML.di("./BH2LN337BQ.js",import.meta.url,"BH2LN337BQ"),SML.di("./NDWTRoseJq.js",import.meta.url,"NDWTRoseJq"),SML.di("./Ros0S_vo-y.js",import.meta.url,"Ros0S_vo-y"))}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("D9agFBx1qt",["C42E8rVVpA","CsxDAjmHZE"],(async(t,e)=>{let r=class extends e.s{constructor(){super(...arguments),this.source="nav"}static get styles(){return[t.t]}createRenderRoot(){return this}render(){return e.x` `}};t._([t.n({type:String,attribute:"source"})],r.prototype,"source",void 0),r=t._([t.e("advertise-button")],r)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./D9SW9I8HSz.js",import.meta.url,"D9SW9I8HSz");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");SML.di("./cjhvxMuwOm.js",import.meta.url,"cjhvxMuwOm");
SML.dm("DAt93EM4d4",["C42E8rVVpA","D9SW9I8HSz","CsxDAjmHZE","DUzIBJc2in","cjhvxMuwOm"],(async(r,o,a)=>{var e=a.i`${r.Y}:host{--max-width:20rem;--hide-delay:500ms;--show-delay:750ms;display:contents}:host,:host([appearance=neutral]){--rpl-hovercard-background-color:var(--color-neutral-background);--rpl-hovercard-color:var(--color-neutral-content-strong)}:host([appearance=inverted]){--rpl-hovercard-background-color:var(--color-inverted-neutral-background);--rpl-hovercard-color:var(--color-inverted-neutral-content-strong)}.hovercard{--arrow-color:var(--rpl-hovercard-background-color)}.hovercard::part(popup){z-index:var(--rpl-z-index-hovercard,var(--faceplate-hovercard-z-index,1))}.hovercard[placement^=top]::part(popup){transform-origin:bottom}.hovercard[placement^=bottom]::part(popup){transform-origin:top}.hovercard[placement^=left]::part(popup){transform-origin:right}.hovercard[placement^=right]::part(popup){transform-origin:left}.hovercard-body{display:flex;flex-direction:column;width:fit-content;justify-content:flex-start;align-items:flex-start;box-sizing:border-box;border-radius:1rem;box-shadow:var(--elevation-md);z-index:var(--rpl-hovercard-z-index,var(--faceplate-tooltip-z-index,1));font:var(--font-12-16-semibold);background-color:var(--rpl-hovercard-background-color);color:var(--rpl-hovercard-color);padding:8px}`;const t="neutral";let c=class extends o.H{constructor(){super(...arguments),this.appearance=t}};c.styles=e,r._([r.n({type:String,reflect:!0})],c.prototype,"appearance",void 0),c=r._([r.e("rpl-hovercard")],c)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./PaIPteKyLX.js",import.meta.url,"PaIPteKyLX");SML.di("./7ymiBBk8xO.js",import.meta.url,"7ymiBBk8xO");SML.di("./CZFRGXDPUQ.js",import.meta.url,"CZFRGXDPUQ");
SML.dm("DCTgJU864D",["C42E8rVVpA","CsxDAjmHZE","PaIPteKyLX","7ymiBBk8xO","CZFRGXDPUQ"],(async(t,e,s,i)=>{let n=class extends e.s{constructor(){super(),this.postId="",this.spoiler=!1,this.nsfw=!1,this.quarantined=!1,this.game=!1,this.app="",this.onPostUpdateAction=({postId:t,action:e,value:s})=>{if(this.postId===t)switch(e){case i.a.markAsNsfw:this.nsfw=s;break;case i.a.markAsSpoiler:this.spoiler=s}},this.pubsubController=new t.m(this)}connectedCallback(){super.connectedCallback(),this.pubsubController.subscribe(t.T.PostUpdated,this.onPostUpdateAction)}renderContentTag(t){const i=s.c(s.g()[t]);return e.x`${i} `}render(){return this.nsfw||this.spoiler||this.quarantined||this.app?e.x` `:""}};n.styles=[t.t],t._([t.n({type:String,attribute:"post-id"})],n.prototype,"postId",void 0),t._([t.n({type:Boolean,attribute:"spoiler",reflect:!0})],n.prototype,"spoiler",void 0),t._([t.n({type:Boolean,attribute:"nsfw",reflect:!0})],n.prototype,"nsfw",void 0),t._([t.n({type:Boolean,attribute:"quarantined",reflect:!0})],n.prototype,"quarantined",void 0),t._([t.n({type:Boolean})],n.prototype,"game",void 0),t._([t.n({type:String})],n.prototype,"app",void 0),n=t._([t.e("shreddit-content-tags")],n)}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("DCWWud_0J8",["CsxDAjmHZE"],(async a=>{const{svg:h}=a.g();return{s:a.m(h` `,"0 0 20 20","show")}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./BFDJQElz9q.js",import.meta.url,"BFDJQElz9q");
SML.dm("DCzxovqnOb",["C42E8rVVpA","CsxDAjmHZE","BFDJQElz9q"],(async(t,e,i)=>{const s=e.s,o=["allow-forms","allow-orientation-lock","allow-popups","allow-popups-to-escape-sandbox","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation"].join(" ");let r=class extends s{constructor(){super(...arguments),this.postId="",this.limitHeight=!1,this.onMessage=t=>{const{data:e}=t;if(!t.source||t.source!==this.iframe?.contentWindow||"tweet-measured"!==e?.action||i.e(e?.id36)!==this.postId)return;this.iframe.height=`${e?.height}px`,this.limitHeight&&e?.height>550?(this.renderRoot?.querySelector(`#${this.postId}-tweet-overflow`)?.classList.remove("hidden"),this?.style.setProperty("height","550px")):this?.style.setProperty("height",`${e?.height+4}px`),this.renderRoot?.querySelector(`#${this.postId}-tweet-loading-placeholder`)?.remove();const s=document.querySelector(`#${this.postId}-post-media-container`),o=s?.querySelector(`#${this.postId}-aspect-ratio`);if(o){const t=this.offsetHeight/this.offsetWidth;o?.style.setProperty("--aspect-ratio",`${t}`);const e=this.offsetHeight-o.offsetHeight;o?.style.setProperty("height",`${e}px`)}}}static get styles(){return[t.t]}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this.onMessage)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("message",this.onMessage)}onIframeLoad(){this.iframe?.contentWindow?.postMessage("twitter-measure-requested","https://www.redditmedia.com")}render(){const t=`${i.h(this.postId)}?responsive=true&is_nightmode=${matchMedia("(prefers-color-scheme: dark)").matches}`;return e.x`
${this.limitHeight?e.x``:""} `}};t._([t.n({type:String,attribute:"post-id"})],r.prototype,"postId",void 0),t._([t.n({type:Boolean,attribute:"limit-height"})],r.prototype,"limitHeight",void 0),t._([t.Q("iframe")],r.prototype,"iframe",void 0),r=t._([t.e("shreddit-tweet-embed")],r)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CTI0RAQLXe.js",import.meta.url,"CTI0RAQLXe");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("DDlHO7m_JZ",["C42E8rVVpA","CTI0RAQLXe","CsxDAjmHZE"],(async(e,t,a)=>{const s=t=>{if(!e.a0.isAvailable())return!0;return e.a0.getItem(e.a1.DevvitGamesSectionFeaturedGameSlug)!==t};let i=class extends a.s{constructor(){super(...arguments),this.lastUpdated=0,this.inline=!1,this.isBadgeActive=!1,this.featuredGameSlug="",this.badgeAllowed=!1,this.appearance="badge",this._onGameBadgeWrapperClick=()=>{this.isBadgeActive=!1,this.dispatchEvent(e.c("games-section-badge-wrapper-click"))}}willUpdate(e){super.willUpdate(e),e.has("featuredGameSlug")&&(this.isBadgeActive=Boolean(this.featuredGameSlug)&&this.badgeAllowed&&s(this.featuredGameSlug))}render(){const e=this.inline,s="label"===this.appearance;return a.x` ${this.isBadgeActive?s?a.x` ${"NEW"} `:a.x` `:a.A}
`;}};return i.styles=[e.t],e._([e.n({attribute:"last-updated",type:Number})],i.prototype,"lastUpdated",void 0),e._([e.n({type:Boolean})],i.prototype,"inline",void 0),e._([e.n({type:Boolean})],i.prototype,"isBadgeActive",void 0),e._([e.n({attribute:"featured-game-slug",type:String})],i.prototype,"featuredGameSlug",void 0),e._([e.n({type:Boolean})],i.prototype,"badgeAllowed",void 0),e._([e.n({type:String})],i.prototype,"appearance",void 0),i=e._([e.e("games-section-badge-wrapper")],i),{s}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CzSZAwtRKW.js",import.meta.url,"CzSZAwtRKW");SML.di("./CsrVq94Zej.js",import.meta.url,"CsrVq94Zej");SML.di("./Bj4iUbEjeH.js",import.meta.url,"Bj4iUbEjeH");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./DdaDf_pDuu.js",import.meta.url,"DdaDf_pDuu");SML.di("./mDMEDMOI5J.js",import.meta.url,"mDMEDMOI5J");SML.di("./Dx86bnsEIQ.js",import.meta.url,"Dx86bnsEIQ");SML.di("./C1Wn8wdQed.js",import.meta.url,"C1Wn8wdQed");SML.di("./DTv1TTlJbR.js",import.meta.url,"DTv1TTlJbR");SML.di("./DZBIvVodeO.js",import.meta.url,"DZBIvVodeO");SML.di("./BHPKNOzIpV.js",import.meta.url,"BHPKNOzIpV");SML.di("./Bb-MnsKJdV.js",import.meta.url,"Bb-MnsKJdV");SML.di("./C-58MBdf3h.js",import.meta.url,"C-58MBdf3h");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");SML.di("./sXKB1kTPf8.js",import.meta.url,"sXKB1kTPf8");SML.di("./CBvblRTUHw.js",import.meta.url,"CBvblRTUHw");SML.di("./CZFRGXDPUQ.js",import.meta.url,"CZFRGXDPUQ");SML.di("./BFDJQElz9q.js",import.meta.url,"BFDJQElz9q");SML.di("./7ymiBBk8xO.js",import.meta.url,"7ymiBBk8xO");SML.di("./C6IVzmWvzc.js",import.meta.url,"C6IVzmWvzc");SML.di("./CPpmjsoDQe.js",import.meta.url,"CPpmjsoDQe");SML.di("./0Z5i5741wq.js",import.meta.url,"0Z5i5741wq");SML.di("./Af5s1GVSm3.js",import.meta.url,"Af5s1GVSm3");SML.di("./BkjgI35gdl.js",import.meta.url,"BkjgI35gdl");SML.di("./ivRcpmSuMb.js",import.meta.url,"ivRcpmSuMb");SML.di("./BxXMRtW0Ao.js",import.meta.url,"BxXMRtW0Ao");SML.di("./CdpPgPWvJM.js",import.meta.url,"CdpPgPWvJM");
SML.dm("DQBt1i6hG8",["C42E8rVVpA","CzSZAwtRKW","CsrVq94Zej","Bj4iUbEjeH","CsxDAjmHZE","DdaDf_pDuu","mDMEDMOI5J","Dx86bnsEIQ","C1Wn8wdQed","DTv1TTlJbR","DZBIvVodeO","BHPKNOzIpV","Bb-MnsKJdV","C-58MBdf3h","DUzIBJc2in","sXKB1kTPf8","CBvblRTUHw","CZFRGXDPUQ","BFDJQElz9q","7ymiBBk8xO","Af5s1GVSm3","BkjgI35gdl","ivRcpmSuMb","BxXMRtW0Ao","CdpPgPWvJM","C6IVzmWvzc","CPpmjsoDQe","0Z5i5741wq"],(async(e,t,i,a,o,n,s,r,l,d,m,h,c,u,p,k,N,R,I,T,A,g,E,b,S)=>{let v=class extends a.M{constructor(){super(...arguments),this.hasParent=!1,this.pubsub=new e.m(this),this.handleCommentUpdate=({commentId:a,action:o,value:n})=>{if(a===this.thingId)switch(o){case t.C.lock:this.isLocked=Boolean(n);break;case t.C.sticky:this.isStickied=Boolean(n);break;case t.C.distinguishAsMod:this.distinguishedAs=n?e.dI.Moderator:void 0;break;case t.C.distinguishAsAdmin:this.distinguishedAs=n?e.dI.Admin:void 0;break;case t.C.approve:case t.C.approveOptimistic:this.isRemoved=!1,this.hasRemovalReason=!1,this.verdict=e.a5.ModApproved,this.itemState=i.M.APPROVED,this.hasReports=!1;break;case t.C.remove:case t.C.removeAsSpam:case t.C.confirmRemoval:case t.C.removeOptimistic:case t.C.removeAsSpamOptimistic:case t.C.confirmRemovalOptimistic:this.isRemoved=!0,this.verdict=e.a5.ModRemoved,this.itemState=i.M.REMOVED,this.hasReports=!1;break;case t.C.addRemovalReason:this.hasRemovalReason=Boolean(n);break;case t.C.ignoreReports:this.isReportingIgnored=Boolean(n),n&&(this.isRemoved=!1,this.verdict=e.a5.ModApproved,this.itemState=i.M.APPROVED)}}}get isStickyable(){return super.isStickyable&&this.isCurrentUserAuthor&&!this.hasParent}connectedCallback(){super.connectedCallback(),this.pubsub.subscribe(e.T.CommentUpdated,this.handleCommentUpdate)}renderActions(){return [this.renderConfirmRemovalAction(),this.renderApproveAction(),this.renderRemoveAction(),this.isContentLevelModsCommsEnabled?this.renderShareToModChatAction(this.modContentDiscussionContext):null,this.renderSpamAction(),this.renderIgnoreReportsAction(),this.renderUnignoreReportsAction(),this.renderAddRemovalReasonAction(),this.renderDistinguishAction(),this.renderUndistinguishAction(),this.renderStickyAction("Sticky comment"),this.renderUnstickyAction("Unsticky comment"),this.renderLockAction("Lock comment"),this.renderUnlockAction("Unlock comment"),this.renderCopyLinkAction()];}};e._([e.n({type:Boolean,attribute:"has-parent"})],v.prototype,"hasParent",void 0),v=e._([e.e("shreddit-comment-mod-actions-menu")],v);let C=class extends o.s{constructor(){super(...arguments),this.feedViewType=e.a6.ModQueueCompactView,this.viewContext=I.P.CommentsPage,this.itemState=i.M.UNMODERATED,this.hasReports=!1,this.isModMode=!1,this.isRemoved=!1,this.isDeleted=!1,this.isLocked=!1,this.isStickied=!1,this.isHighlighted=!1,this.isCurrentUserAuthor=!1,this.hasParent=!1,this.isIconOnly=!1,this.hasRemovalReason=!1,this.permalink="",this.isDesktopViewport=!1,this.isSpamFilteredPost=!1,this.isProfilePost=!1,this.isPromotedPost=!1,this.hasFlairPermissions=!1,this.areHighlightsEnabled=!1,this.hideInlineActions=!1,this.isSmartEscalations=!1,this.isContentLevelModsCommsEnabled=!1,this.modContentDiscussionContext=void 0,this.isFeedNoApproveEnabled=!1,this.focusChatTextareaFn=s.f,this.moderationState=i.M.UNMODERATED,this.pubsub=new e.m(this),this._handleThingUpdate=e=>{let a="";if("awardOnContentId"in e?a=e.awardOnContentId:"commentId"in e?a=e.commentId:"postId"in e&&(a=e.postId),a!==this.thingId)return;const{value:o}=e;switch(e.action){case T.a.approve:case t.C.approve:case N.A.approve:case t.C.approveOptimistic:this.hasRemovalReason=!1,this.isRemoved=!1,this.moderationState=i.M.APPROVED;break;case T.a.remove:case T.a.removeAsSpam:case T.a.confirmRemoval:case t.C.remove:case t.C.removeAsSpam:case t.C.confirmRemoval:case N.A.remove:case N.A.confirmRemoval:case t.C.removeOptimistic:case t.C.removeAsSpamOptimistic:case t.C.confirmRemovalOptimistic:this.isRemoved=!0,this.moderationState=i.M.REMOVED;break;case T.a.addRemovalReason:case t.C.addRemovalReason:this.hasRemovalReason=!0;break;case T.a.updateHighlightedPost:this.isHighlighted=o;break;case T.a.lock:case t.C.lock:this.isLocked=o;break;case T.a.delete:this.isDeleted=o;break;case T.a.sticky:case t.C.sticky:this.isStickied=o}}}get itemType(){return this.thingId?k.i(this.thingId):null}get isPost(){return this.itemType===e.M.Post}get isCompactView(){return this.feedViewType===e.a6.CompactView}get isOnModqueuePage(){return this.viewContext===I.P.ModQueue||this.viewContext===I.P.ModQueueAll}get isApproved(){return this.moderationState===i.M.APPROVED}get shouldShowConfirmRemoval(){return i.a(this.moderationState,this.isSpamFilteredPost)}get shouldShowActionInline(){return i.b(this.viewContext,this.feedViewType)&&!this.isIconOnly&&!this.hideInlineActions}get isStickyable(){const e=!(this.viewContext===I.P.ProfileFeed||this.viewContext===I.P.ProfileFeed2),t=this.isCurrentUserAuthor&&!this.hasParent;return this.isPost?e:e&&t}get itemTopic(){switch(this.itemType){case e.M.Award:return e.T.AwardOnContentUpdated;case e.M.Comment:return e.T.CommentUpdated;case e.M.Post:return e.T.PostUpdated;default:return null}}connectedCallback(){super.connectedCallback(),this.moderationState=this.itemState,this.itemTopic&&this.pubsub.subscribe(this.itemTopic,this._handleThingUpdate)}getApproveButtonAppearance(){const e=p.aq()?"bordered":"secondary";return this.isCompactView?e:this.shouldShowConfirmRemoval||this.hasReports?"primary":(this.moderationState,i.M.REMOVED,e)}renderApproveAction(){return (this.isModMode||this.isOnModqueuePage)&&i.c(this.moderationState)?this.isFeedNoApproveEnabled&&!this.isOnModqueuePage&&this.moderationState===i.M.UNMODERATED?null:o.x` ${o.C({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${"Approve"} `:null;}renderRemoveAction(){return (this.isModMode||this.isOnModqueuePage)&&i.d(this.moderationState)?this.isFeedNoApproveEnabled&&!this.isOnModqueuePage&&this.moderationState===i.M.UNMODERATED?null:o.x` ${o.c({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${"Remove"} `:null;}renderConfirmRemovalAction(){return (this.isModMode||this.isOnModqueuePage)&&this.shouldShowConfirmRemoval?o.x` ${o.c({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${"Confirm Removal"} `:null;}renderSpamAction(){return i.e({moderationState:this.moderationState,isSpamFilteredPost:this.isSpamFilteredPost,isRemoved:this.isRemoved,isPromotedPost:this.isPromotedPost})&&this.shouldShowActionInline?o.x` ${l.s({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${"Spam"} `:null;}renderShareToModChatAction(){if(!i.f({isPromotedPost:this.isPromotedPost})||!this.isContentLevelModsCommsEnabled||!this.modContentDiscussionContext?.modChatChannel||!this.isOnModqueuePage||this.isOnModqueuePage&&!this.shouldShowActionInline&&!this.modContentDiscussionContext.modContentDiscussion)return null;let e=this.modContentDiscussionContext?.modContentDiscussion?`${A.g(this.modContentDiscussionContext.modContentDiscussion.chatChannel?.roomId,this.modContentDiscussionContext.modContentDiscussion.chatMessage?.id)}/thread`:A.a(this.modContentDiscussionContext?.modChatChannel?.roomId);this.modContentDiscussionContext?.modContentDiscussion||(e+=`?draft=${encodeURIComponent("https://www.reddit.com"+this.permalink)}`);const t=this.modContentDiscussionContext?.modContentDiscussion?R.M.ViewChatThread:R.M.ShareToModChat,a=this.modContentDiscussionContext?.modContentDiscussion?"Open chat thread":"Share to mod chat",n=this.modContentDiscussionContext?.modContentDiscussion?"Open chat thread":"Share to mod chat";return o.x` ${r.c({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${n}
`;}renderFlairAction(){return this.isPost&&this.shouldShowActionInline?o.x` ${d.t({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${"Flair"} `:null;}renderAddRemovalReasonAction(){return (this.isModMode||this.isOnModqueuePage)&&this.itemType!==e.M.Award&&i.s(this.moderationState,this.hasRemovalReason,this.isSpamFilteredPost,this.isProfilePost)?o.x` ${n.a({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${"Add removal reason"} ${this.isIconOnly?o.x`
`:null} `:null;}renderCopyLinkAction(){return this.shouldShowActionInline?this.isPost?o.x` `:o.x` `:null}renderLockAction(){if(!this.shouldShowActionInline||this.isLocked)return null;const e="Lock";return o.x` ${h.l({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${e} `}renderUnlockAction(){if(!this.shouldShowActionInline||!this.isLocked)return null;const e="Unlock";return o.x` ${m.l({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${e} `}renderStickyAction(){if(!this.isStickyable||!this.shouldShowActionInline||this.isStickied||this.areHighlightsEnabled)return null;const e="Sticky";return o.x` ${u.p({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${e} `}renderUnstickyAction(){if(!this.isStickyable||!this.shouldShowActionInline||!this.isStickied||this.areHighlightsEnabled)return null;const e="Unsticky";return o.x` ${c.p({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${e} `}renderAddToHighlightsAction(){if(!this.isStickyable||!this.shouldShowActionInline||!this.areHighlightsEnabled||!l.H.has(this.viewContext)||this.isHighlighted)return null;const e="Add to highlights";return o.x` ${u.p({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${e} `}renderRemoveFromHighlightsAction(){if(!(this.isStickyable&&this.shouldShowActionInline&&this.areHighlightsEnabled&&l.H.has(this.viewContext)&&this.isHighlighted))return null;const e="Remove from highlights";return o.x` ${c.p({attributes:{"aria-hidden":"true"},size:o.I.Small})} ${e} `}render(){return o.x` ${this.renderAddRemovalReasonAction()} ${this.renderApproveAction()} ${this.renderRemoveAction()} ${this.renderConfirmRemovalAction()} ${this.renderShareToModChatAction()} ${this.renderSpamAction()} ${this.renderFlairAction()} ${this.renderLockAction()} ${this.renderUnlockAction()} ${this.renderCopyLinkAction()} ${this.renderStickyAction()} ${this.renderUnstickyAction()} ${this.renderAddToHighlightsAction()} ${this.renderRemoveFromHighlightsAction()} `}};C.styles=[e.t,o.i`:host{display:flex;gap:var(--spacer-xs)}.separator{border-left:1px solid rgb(0,0,0,.1);width:1px;height:32px}`],e._([e.n({type:String,attribute:"thing-id"})],C.prototype,"thingId",void 0),e._([e.n({type:String,attribute:"feed-view-type"})],C.prototype,"feedViewType",void 0),e._([e.n({type:String,attribute:"view-context"})],C.prototype,"viewContext",void 0),e._([e.n({type:String,attribute:"item-state"})],C.prototype,"itemState",void 0),e._([e.n({type:Boolean,attribute:"has-reports"})],C.prototype,"hasReports",void 0),e._([e.n({type:Boolean,attribute:"mod-mode"})],C.prototype,"isModMode",void 0),e._([e.n({type:Boolean,attribute:"removed"})],C.prototype,"isRemoved",void 0),e._([e.n({type:Boolean,attribute:"deleted"})],C.prototype,"isDeleted",void 0),e._([e.n({type:Boolean,attribute:"locked"})],C.prototype,"isLocked",void 0),e._([e.n({type:Boolean,attribute:"stickied"})],C.prototype,"isStickied",void 0),e._([e.n({type:Boolean,attribute:"highlighted"})],C.prototype,"isHighlighted",void 0),e._([e.n({type:Boolean,attribute:"current-user-author"})],C.prototype,"isCurrentUserAuthor",void 0),e._([e.n({type:Boolean,attribute:"has-parent"})],C.prototype,"hasParent",void 0),e._([e.n({type:Boolean,attribute:"icon-only"})],C.prototype,"isIconOnly",void 0),e._([e.n({type:Boolean,attribute:"has-removal-reason"})],C.prototype,"hasRemovalReason",void 0),e._([e.n({type:String,attribute:"permalink"})],C.prototype,"permalink",void 0),e._([e.n({type:Boolean,attribute:"is-desktop-viewport"})],C.prototype,"isDesktopViewport",void 0),e._([e.n({type:Boolean,attribute:"is-spam-filtered-post"})],C.prototype,"isSpamFilteredPost",void 0),e._([e.n({type:Boolean,attribute:"is-profile-post"})],C.prototype,"isProfilePost",void 0),e._([e.n({type:Boolean,attribute:"is-promoted-post"})],C.prototype,"isPromotedPost",void 0),e._([e.n({type:Boolean,attribute:"has-flair-permissions"})],C.prototype,"hasFlairPermissions",void 0),e._([e.n({type:Boolean,attribute:"highlights-enabled"})],C.prototype,"areHighlightsEnabled",void 0),e._([e.n({type:Boolean,attribute:"hide-inline-actions"})],C.prototype,"hideInlineActions",void 0),e._([e.n({type:Boolean,attribute:"smart-escalations"})],C.prototype,"isSmartEscalations",void 0),e._([e.n({type:Boolean,attribute:"is-content-level-mods-comms-enabled"})],C.prototype,"isContentLevelModsCommsEnabled",void 0),e._([e.n({type:Object,attribute:"mod-content-discussion-context"})],C.prototype,"modContentDiscussionContext",void 0),e._([e.n({type:Boolean,attribute:"is-feed-no-approve-enabled"})],C.prototype,"isFeedNoApproveEnabled",void 0),e._([e.n({attribute:!1})],C.prototype,"focusChatTextareaFn",void 0),e._([e.v()],C.prototype,"moderationState",void 0),C=e._([e.e("shreddit-mod-inline-actions")],C);let P=class extends a.M{constructor(){super(...arguments),this.isNsfw=!1,this.isSpoiler=!1,this.pubsub=new e.m(this),this._handlePostUpdate=({postId:t,action:a,value:o})=>{if(t===this.thingId)switch(a){case T.a.lock:this.isLocked=Boolean(o);break;case T.a.sticky:this.isStickied=Boolean(o);break;case T.a.updateHighlightedPost:this.isHighlighted=Boolean(o);break;case T.a.distinguishAsMod:this.distinguishedAs=o?e.dI.Moderator:void 0;break;case T.a.approveOptimistic:case T.a.approve:this.isRemoved=!1,this.hasRemovalReason=!1,this.verdict=e.a5.ModApproved,this.itemState=i.M.APPROVED,this.hasReports=!1,this.requestUpdate();break;case T.a.remove:case T.a.removeAsSpam:case T.a.confirmRemoval:case T.a.removeOptimistic:case T.a.removeAsSpamOptimistic:case T.a.confirmRemovalOptimistic:this.isRemoved=!0,this.verdict=e.a5.ModRemoved,this.itemState=i.M.REMOVED,this.hasReports=!1;break;case T.a.addRemovalReason:this.hasRemovalReason=Boolean(o);break;case T.a.markAsNsfw:this.isNsfw=Boolean(o);break;case T.a.markAsSpoiler:this.isSpoiler=Boolean(o);break;case T.a.ignoreReports:this.isReportingIgnored=Boolean(o),o&&(this.isRemoved=!1,this.verdict=e.a5.ModApproved,this.itemState=i.M.APPROVED)}},this._handlePostFlairUpdate=({postId:e,updatedHtml:t})=>{e===this.thingId&&(this.hasPostFlair=!!t&&t.trim().length>0)}}get isStickyable(){return super.isStickyable}connectedCallback(){super.connectedCallback(),this.pubsub.subscribe(e.T.PostUpdated,this._handlePostUpdate),this.pubsub.subscribe(e.T.PostFlairUpdated,this._handlePostFlairUpdate)}renderMarkAsNsfwAction(){return this.isDeleted||this.isNsfw?null:g.l({leadingIcon:b.n(),label:"Add NSFW tag",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleMarkNsfw)});}renderUnmarkAsNsfwAction(){return this.isDeleted||!this.isNsfw?null:g.l({leadingIcon:o.O(),label:"Remove NSFW tag",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleUnmarkNsfw)});}renderMarkAsSpoilerAction(){return this.isDeleted||this.isSpoiler?null:g.l({leadingIcon:S.c(),label:"Add spoiler tag",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleMarkSpoiler)});}renderUnmarkAsSpoilerAction(){return this.isDeleted||!this.isSpoiler?null:g.l({leadingIcon:o.af(),label:"Remove spoiler tag",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleUnmarkSpoiler)});}renderAdjustCrowdControlAction(){return this.isPromotedPost?null:g.l({leadingIcon:E.c(),label:"Adjust crowd control",size:this.size,onClick:this.getListItemClickHandler(this.modActionsController.handleAdjustCrowdControl)});}renderActions(){return [this.renderConfirmRemovalAction(),this.renderApproveAction(),this.renderRemoveAction(),this.isContentLevelModsCommsEnabled?this.renderShareToModChatAction(this.modContentDiscussionContext):null,this.renderSpamAction(),this.renderIgnoreReportsAction(),this.renderUnignoreReportsAction(),this.renderAddRemovalReasonAction(),this.renderDistinguishAction(),this.renderUndistinguishAction(),this.renderStickyAction("Sticky post"),this.renderUnstickyAction("Unsticky post"),this.renderAddToHighlightsAction(),this.renderRemoveFromHighlightsAction(),this.renderLockAction("Lock comments"),this.renderUnlockAction("Unlock comments"),this.renderEditPostFlairAction(s.a(this.hasPostFlair)),this.renderMarkAsNsfwAction(),this.renderUnmarkAsNsfwAction(),this.renderMarkAsSpoilerAction(),this.renderUnmarkAsSpoilerAction(),this.renderAdjustCrowdControlAction(),this.renderCopyLinkAction()];}};e._([e.n({type:Boolean,attribute:"nsfw"})],P.prototype,"isNsfw",void 0),e._([e.n({type:Boolean,attribute:"spoiler"})],P.prototype,"isSpoiler",void 0),P=e._([e.e("shreddit-post-mod-actions-menu")],P)}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("DQwL-Ar9xx",["CsxDAjmHZE"],(async a=>{const{svg:h}=a.g();return{t:a.m(h` `,"0 0 20 20","translate-off")}}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("DTv1TTlJbR",["CsxDAjmHZE"],(async a=>{const{svg:l}=a.g();return{t:a.m(l` `,"0 0 20 20","tag")}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./fQLegmnZJ0.js",import.meta.url,"fQLegmnZJ0");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");
SML.dm("DXGyf0c85N",["C42E8rVVpA","CsxDAjmHZE","fQLegmnZJ0","DUzIBJc2in"],(async(e,t,i,a)=>{const r=t.s,n=e=>{e.preventDefault()};let o=class extends r{constructor(){super(...arguments),this.isHamburgerMenuIncluded=!1,this.isLoggedIn=!1,this.showAccountManagerModal=!1,this.hamburgerMenuButton=null,this.menuDialog=null,this.loginButton=void 0,this.shredditInteractableElement=null,this.search=null,this.userDrawerButton=null,this.userDrawerMenu=null,this.userDrawerContent=null,this.userDrawerLoginButton=null,this.advertiseButton=null,this.createAnchor=null,this.recapCampaignLink=void 0,this.mScreenMediaQueryList=window.matchMedia?.("(min-width: 1200px)"),this.cachedIsHamburgerMenuShown=!(this.mScreenMediaQueryList?.matches??1),this.events=new e.E(this),this.googleApiController=new i.G(this),this._track=this.events.define("faceplate-track",(e=>{const{source:t,action:i,noun:a}=e.detail;"nav"===t&&"click"===i&&"create_community"===a&&this._closeDialog()})),this.handleMScreenMediaQueryListChange=({matches:e})=>{e&&this.cachedIsHamburgerMenuShown&&this._closeDialog(),this.cachedIsHamburgerMenuShown=!e},this.handleOpenUserDrawer=t=>{t.stopPropagation(),this._closeDialog(),e.f(this,e.bF())},this.handleCloseUserDrawer=t=>{t?.stopPropagation(),e.f(this,e.bG())},this.setupUserDrawer=async()=>{this.userDrawerButton=this.querySelector("#expand-user-drawer-button"),this.userDrawerMenu=this.userDrawerButton?.closest("rpl-dropdown")??null,this.userDrawerContent=this.querySelector("#user-drawer-content")??null},this.focusSearchInput=()=>{this.search?.shadowRoot?.querySelector("faceplate-search-input")?.focus()},this.handleClickHamburgerMenu=async()=>{await this.initializeHamburgerMenuSlottedElements(),this.menuDialog&&(this.menuDialog.open?this._closeDialog():(this._closeUserDrawer(),this.menuDialog.showModal(),e.f(this,e.bB())),e.f(this,e.bC()))},this.handleSearchDropdownOpen=()=>{this._closeUserDrawer(),this._closeDialog()},this.handleAdvertiseButtonClick=async t=>{const{isAdblockEnabled:i}=await e.cm();if(i){const i=e.c("faceplate-alert",{level:e.X.notice,message:"To advertise, disable your ad blocker or add reddit.com as an exception."});t.target?.dispatchEvent(i)}},this.initializeHotkeys=()=>{this.hotkeySubscriberController=new e.cn(this),this.hotkeySubscriberController?.subscribe(e.co.CREATE_POST,this.onHotkeyCreatePost)},this.cleanupHotkeys=()=>{this.hotkeySubscriberController?.unsubscribe(e.co.CREATE_POST,this.onHotkeyCreatePost)},this.onHotkeyCreatePost=()=>{this.createAnchor?.click()}}_closeDialog(){this.menuDialog?.open&&(this.menuDialog.hide(),this.reset(),e.f(this,e.bA()))}_closeUserDrawer(){this.userDrawerMenu?.hidden||this.userDrawerMenu?.hide()}connectedCallback(){super.connectedCallback(),this.initializeHotkeys()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListenersFromSlottedElements(),this.cleanupHotkeys()}addEventListenersToSlottedElements(){this.mScreenMediaQueryList?.addEventListener("change",this.handleMScreenMediaQueryListChange),this.userDrawerMenu?.addEventListener("rpl-dropdown:show",this.handleOpenUserDrawer),this.userDrawerMenu?.addEventListener("rpl-dropdown:hide",this.handleCloseUserDrawer),this.advertiseButton?.addEventListener("click",this.handleAdvertiseButtonClick)}removeEventListenersFromSlottedElements(){this.mScreenMediaQueryList?.removeEventListener("change",this.handleMScreenMediaQueryListChange),this.userDrawerMenu?.removeEventListener("rpl-dropdown:show",this.handleOpenUserDrawer),this.userDrawerMenu?.removeEventListener("rpl-dropdown:hide",this.handleCloseUserDrawer)}async initializeHamburgerMenuSlottedElements(){this.isHamburgerMenuIncluded&&(this.menuDialog||(this.menuDialog=this.shadowRoot?.querySelector("slot[name=reddit-header-hamburger-menu]")?.assignedElements({flatten:!0})?.find((e=>e.matches("rpl-dialog#menu")))??null))}initializeSlottedElements(){!this.loginButton&&this.showAccountManagerModal&&(this.loginButton=this.querySelector("a#login-button"),this.loginButton?.addEventListener("click",n)),!this.userDrawerLoginButton&&this.showAccountManagerModal&&(this.userDrawerLoginButton=this.querySelector("#login-list-item"),this.userDrawerLoginButton?.addEventListener("click",(()=>{this._closeUserDrawer()}))),this.search||(this.search=this.querySelector("reddit-search-large"),this.search?.addEventListener(a.au,this.handleSearchDropdownOpen)),this.userDrawerButton||this.setupUserDrawer(),this.advertiseButton||(this.advertiseButton=this.querySelector("#advertise-button")),this.createAnchor||(this.createAnchor=this.querySelector("#create-post")),!this.recapCampaignLink&&this.loginButton&&(this.recapCampaignLink=this.querySelector("a#recap-entrypoint"),this.recapCampaignLink?.addEventListener("click",n))}reset(){this.menuDialog?.scrollTo(0,0)}static get styles(){return[e.t]}firstUpdated(){this.initialize()}async initialize(){this.hamburgerMenuButton||(this.hamburgerMenuButton=this.querySelector("#navbar-menu-button"),this.hamburgerMenuButton?.addEventListener("click",this.handleClickHamburgerMenu)),this.initializeSlottedElements(),this.addEventListenersToSlottedElements(),this.isLoggedIn&&this.googleApiController.initialize()}render(){return t.x` ${this.isHamburgerMenuIncluded?t.x` `:""} `}};e._([e.n({type:Boolean,attribute:"is-hamburger-menu-included"})],o.prototype,"isHamburgerMenuIncluded",void 0),e._([e.n({type:Boolean,attribute:"is-logged-in"})],o.prototype,"isLoggedIn",void 0),e._([e.n({type:Boolean,attribute:"show-accountmanager-modal"})],o.prototype,"showAccountManagerModal",void 0),o=e._([e.e("reddit-header-large")],o)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./CHpnYscvgU.js",import.meta.url,"CHpnYscvgU");SML.di("./1i4g9fLWHY.js",import.meta.url,"1i4g9fLWHY");SML.di("./CKuUwv2_dV.js",import.meta.url,"CKuUwv2_dV");
SML.dm("DYzo2YMMuI",["C42E8rVVpA","CsxDAjmHZE","CHpnYscvgU","1i4g9fLWHY","CKuUwv2_dV"],(async(t,a,e)=>{const i=a.s,n="translation-intervention-modal",{I18nPostTranslationOverride:s,I18nCommentTranslationOverride:o}=t.T,r=()=>!!t.a0.getItem(t.a1.I18nTranslationInterventionShown),d=()=>t.a0.setItem(t.a1.I18nTranslationInterventionShown,"true");let l=class extends i{constructor(){super(...arguments),this.translationContextValue=t.aD,this.open=!1,this.pubsub=new t.m(this),this.handleTranslationOverride=t=>{t.isContextUpdateEvent||r()||this.open||(this.translationOverrideActive=t.isTranslationActive,this.translationSourceId=t.id,this.show())},this.show=()=>{r()||(this.open=!0,this.modal?.showModal(),d())},this.close=()=>{this.translationOverrideActive=void 0,this.translationSourceId=void 0,this.open&&(this.modal?.close(),this.open=!1,this.dispatchEvent(new CustomEvent("translation-intervention-modal:close",{bubbles:!0,composed:!0})))},this.getThingTelemetryMetadata=()=>({post:"post"===this.mode?{id:this.translationSourceId,translation_state:!!this.translationOverrideActive}:"mtseo-post"===this.mode?{id:this.translationSourceId}:void 0,comment:"comment"===this.mode?{id:this.translationSourceId,translation_state:!!this.translationOverrideActive}:void 0}),this.handleDismiss=()=>{t.f(this,e.f({isImmersiveTranslationsActive:!!this.translationContextValue.isTranslationActive,isImmersiveVisit:this.isImmersiveVisit,...this.getThingTelemetryMetadata()})),this.close()},this.handleClick=a=>{t.f(this,e.g({actionType:a,isImmersiveTranslationsActive:"keep"===a?!!this.translationContextValue.isTranslationActive:!this.translationContextValue.isTranslationActive,isImmersiveVisit:this.isImmersiveVisit,...this.getThingTelemetryMetadata()})),"keep"===a?this.close():this.handleSubmit()},this.handleSubmit=()=>{"mtseo-post"===this.mode&&t.a0.setItem(t.a1.I18nTranslationInterventionShown,"mtseo-disabled");const a=this.translationOverrideActive;this.dispatchContextUpdateEvent(a),this.close()}}connectedCallback(){super.connectedCallback(),r()||("post"===this.mode&&this.pubsub.subscribe(s,this.handleTranslationOverride,!1),"comment"===this.mode&&this.pubsub.subscribe(o,this.handleTranslationOverride,!1))}dispatchContextUpdateEvent(a){const e=new CustomEvent("update-translation-context",{bubbles:!0,composed:!0,detail:{...this.translationContextValue,isTranslationActive:a}});this.dispatchEvent(e),this.pubsub.publish(t.T.I18nPostTranslationOverride,{isTranslationActive:a,id:"",isContextUpdateEvent:!0,pageType:"feed"===this.pageType?"FEED":"PDP"})}render(){const e=this.translationOverrideActive?{body:"It looks like you know another language. Would you like all your content automatically translated?",confirmButton:"Continue Without Translations",cancelButton:"Turn On Translations"}:{body:"It looks like you know another language. Would you like to keep automatic translations turned on?",confirmButton:"Continue With Translations",cancelButton:"Turn off Translations"};return a.x`
${"Update translations on Reddit"} ${t.Z({attributes:{"aria-label":"Close","data-testid":"i18n-modal-close-button",onclick:this.handleDismiss},appearance:"secondary",leadingIcon:a.c({size:a.I.Small}),size:t.ac.Small})}
${e.body} ${t.Z({appearance:"primary",size:t.ac.Large,shape:"pill",attributes:{className:"flex box-border w-full","data-testid":"i18n-modal-confirm-button",onclick:this.handleClick.bind(this,"keep")},children:a.x`${e.confirmButton} `})} ${t.Z({appearance:"secondary",size:t.ac.Large,shape:"pill",attributes:{className:"flex box-border w-full","data-testid":"i18n-modal-cancel-button",onclick:this.handleClick.bind(this,"change")},children:a.x`${e.cancelButton} `})}
`;}};l.styles=[t.t],t._([t.aC({context:t.aE,subscribe:!0}),t.v()],l.prototype,"translationContextValue",void 0),t._([t.n({type:String,attribute:"mode"})],l.prototype,"mode",void 0),t._([t.n({type:Boolean,attribute:"open"})],l.prototype,"open",void 0),t._([t.n({type:String,attribute:"page-type"})],l.prototype,"pageType",void 0),t._([t.n({type:Boolean,attribute:"is-immersive-visit"})],l.prototype,"isImmersiveVisit",void 0),t._([t.v()],l.prototype,"translationOverrideActive",void 0),t._([t.v()],l.prototype,"translationSourceId",void 0),t._([t.Q(`faceplate-modal.${n}`)],l.prototype,"modal",void 0),l=t._([t.e("translation-intervention-modal")],l)}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("DZBIvVodeO",["CsxDAjmHZE"],(async a=>{const{svg:h}=a.g();return{l:a.m(h` `,"0 0 20 20","lock-fill")}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./DQwL-Ar9xx.js",import.meta.url,"DQwL-Ar9xx");SML.di("./DdGGk_VUqP.js",import.meta.url,"DdGGk_VUqP");SML.di("./BG8P3or1N1.js",import.meta.url,"BG8P3or1N1");SML.di("./BFDJQElz9q.js",import.meta.url,"BFDJQElz9q");SML.di("./uOlAvv4IVq.js",import.meta.url,"uOlAvv4IVq");SML.di("./C-4AJ2Y78L.js",import.meta.url,"C-4AJ2Y78L");
SML.dm("DbJ-UWarw3",["C42E8rVVpA","CsxDAjmHZE","DQwL-Ar9xx","DdGGk_VUqP","BG8P3or1N1","BFDJQElz9q","uOlAvv4IVq","C-4AJ2Y78L"],(async(t,a,e,i,s,r,n)=>{let o=class extends a.s{constructor(){super(...arguments),this.isModTranslationIndicatorsEnabled=!1,this.translationContextValue=t.aD,this.pubsub=new t.m(this),this.getIsTranslationActive=()=>{const a=s.i();return(!this.isModTranslationIndicatorsEnabled||this.translationState!==t.bg.DISABLED)&&("boolean"==typeof this.postTranslated?this.postTranslated:a||!!this.translationContextValue?.isTranslationActive)},this.onPostTranslationOverride=t=>{(t.id===this.postId||t.isContextUpdateEvent)&&(this.postTranslated=t.isTranslationActive)},this.handleClick=()=>{if(!this.postId)return;const a=this.getPageTypeForTranslation(t.x()),e=this.getIsTranslationActive();this.pubsub.publish(t.T.I18nPostTranslationOverride,{id:this.postId,isTranslationActive:!e,pageType:a});const i=document.querySelector(`shreddit-post[id*="${this.postId}"]`);t.f(this,r.q({archived:i?.archived,authorId:i?.authorId,createdTimestamp:i?.createdTimestamp,domain:i?.domain,id:this.postId,nsfw:i?.nsfw,promoted:i?.promoted,score:i?.score,spoiler:i?.spoiler,subredditId:i?.subredditId,subredditPrefixedName:i?.subredditPrefixedName,postTitle:i?.postTitle,postType:i?.postType,recommendationSource:i?.recommendationSource,commentCount:i?.commentCount,permalink:i?.permalink,postLanguage:i?.postLanguage,translationLanguage:this.translationLanguage,isPostTranslated:e}))}}connectedCallback(){super.connectedCallback(),this.pubsub.subscribe(t.T.I18nPostTranslationOverride,this.onPostTranslationOverride,!1);const a=s.P.get();this.isPdpBannerSettingEnabled=a?.isPdpBannerSettingEnabled??!0,this.pageType=t.x()}getPageTypeForTranslation(a){return!!a&&[t.ah.PostDetail,t.ah.ModQueue,t.ah.ModQueueAll,t.ah.ModQueuePdp].includes(a)?n.T.Pdp:n.T.Feed}render(){return this.isPdpBannerSettingEnabled&&this.pageType===t.ah.PostDetail?a.A:a.x` ${t.Z({appearance:"plain",attributes:{onclick:this.handleClick,"aria-label":"Toggle post translation"},leadingIcon:this.getIsTranslationActive()?e.t({size:a.I.ExtraSmall,attributes:{"data-testid":"post-translation-status-icon-translated-icon","aria-label":"Post is translated",className:"text-primary-plain"}}):i.t({size:a.I.ExtraSmall,attributes:{"data-testid":"post-translation-status-icon-original-icon","aria-label":"Post is in original language",className:"text-primary-plain"}}),size:t.ac.ExtraSmall})} `;}};o.styles=[t.t],t._([t.n({type:String,attribute:"post-id"})],o.prototype,"postId",void 0),t._([t.n({type:String,attribute:"translation-language"})],o.prototype,"translationLanguage",void 0),t._([t.n({type:String,attribute:"translation-state"})],o.prototype,"translationState",void 0),t._([t.n({type:Boolean,attribute:"is-mod-translation-indicators-enabled"})],o.prototype,"isModTranslationIndicatorsEnabled",void 0),t._([t.aC({context:t.aE,subscribe:!0}),t.v()],o.prototype,"translationContextValue",void 0),t._([t.v()],o.prototype,"postTranslated",void 0),t._([t.v()],o.prototype,"isPdpBannerSettingEnabled",void 0),t._([t.v()],o.prototype,"pageType",void 0),o=t._([t.e("post-translation-status-icon")],o)}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("DdaDf_pDuu",["CsxDAjmHZE"],(async h=>{const{svg:s}=h.g();return{a:h.m(s` `,"0 0 20 20","add")}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./DW4Y66xecc.js",import.meta.url,"DW4Y66xecc");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./B01f6V9jnX.js",import.meta.url,"B01f6V9jnX");SML.di("./Da-UYDWSOS.js",import.meta.url,"Da-UYDWSOS");SML.di("./CndptGkkPK.js",import.meta.url,"CndptGkkPK");SML.di("./BcUlF1uWDA.js",import.meta.url,"BcUlF1uWDA");
SML.dm("Dg2hMEypTN",["C42E8rVVpA","DW4Y66xecc","CsxDAjmHZE","B01f6V9jnX","CndptGkkPK","BcUlF1uWDA","Da-UYDWSOS"],(async(e,t,i,l,a,r)=>{let s=class extends a.F{constructor(){super(...arguments),this.appearance=r.T.SECONDARY,this.label="",this.clearable=!1,this.multiple=!1,this.required=!1,this.prefix=null,this.helperTextLevel=null,this.helperTextPlaceholder="",this.helperTextAriaLive="polite",this.helperTextMessage="",this.readonly=!1,this.inputRef=e.U(),this._selectController=new l.S(this),this.focus=()=>{this.inputRef.value?.focus()},this.syncInputValidation=(e=!1)=>{const t=this.options.map((e=>e.value)),i=this.inputRef?.value?.value,l=this.value||this.arbitrary&&i||!this.arbitrary&&t.includes(i);if(this.required&&!l){const t=this.inputRef?.value?._internals.validationMessage;this.dropdownMenu?.hidden&&t&&(e?this.form?.invalidateFieldWithMessage(this.name,t):this.setCustomValidity(t))}else this.form?.invalidateFieldWithMessage(this.name,"")},this.resetFaceplateDirty=()=>{this.removeAttribute("faceplate-dirty")},this.matchOptionsToInput=e=>{if(this.autocomplete&&!this.multiple){const t=e.currentTarget?.value;this.options.forEach((e=>{const i=e.displayText?.toLowerCase().trim();if(this.onFilterOption?this.onFilterOption?.(t,e):i?.startsWith(t.toLowerCase())){if(!t)return e.removeAttribute("hidden"),void(e.matchedText="");e.hasAttribute("hidden")&&e.removeAttribute("hidden"),e.matchedText=e.displayText?.slice(0,t.length)}else e.setAttribute("hidden","")})),this._selectController.focusedIndex=0}},this.clear=e=>{e.preventDefault(),e.stopPropagation(),this._selectController.selectedOptions.forEach((e=>{e.resetSelection()})),this._selectController.value="",this.inputRef.value&&(this.inputRef.value.value="")},this.handleKeyBindings=e=>{this.readonly||this.multiple?e.preventDefault():"Backspace"!==e.key||this.multiple||(this._selectController.value="")},this.getTextField=()=>i.x` ${this.label} ${i.y({attributes:{"aria-hidden":"true"}})} `}get referenceElement(){return this.inputRef.value}get selectedOptions(){return this._selectController.selectedOptions}get selectedIndex(){return this._selectController.selectedIndex}get value(){return this._selectController.value}set value(e){e!==this.value&&(this._selectController.value=e)}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",this.resetFaceplateDirty),this.addEventListener("keydown",this.handleKeyBindings)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this.resetFaceplateDirty),this.removeEventListener("keydown",this.handleKeyBindings)}async firstUpdated(){super.firstUpdated(),this.setupValidationSync()}async setupValidationSync(){const e=await t.c(this);e&&this.isConnected&&(this.inputRef.value?.hasValidationHelpers||this.inputRef.value?.setFormValidationHelpers(e),this.syncInputValidation(),this.addEventListener(e.validationTrigger,(()=>this.syncInputValidation(!0))),e.addEventListener("faceplate-submit",(()=>this.syncInputValidation(!0))))}static get styles(){return i.i`:host{display:inline-block}:host([disabled]){cursor:not-allowed}faceplate-text-input{flex:1}:host([readonly]){caret-color:transparent}faceplate-menu{height:var(--faceplate-select-menu-height,auto);width:var(--faceplate-select-menu-width,auto);max-height:var(--faceplate-select-menu-max-height,auto);max-width:var(--faceplate-select-menu-max-width,auto);overflow:auto}`}render(){return i.x` ${this.getTextField()} `}};e._([e.n({type:String})],s.prototype,"appearance",void 0),e._([e.n({type:String})],s.prototype,"label",void 0),e._([e.n({type:Boolean})],s.prototype,"clearable",void 0),e._([e.n({type:Boolean})],s.prototype,"multiple",void 0),e._([e.n({type:Boolean})],s.prototype,"required",void 0),e._([e.n({type:String})],s.prototype,"prefix",void 0),e._([e.n({type:String})],s.prototype,"autocomplete",void 0),e._([e.n({type:Boolean})],s.prototype,"arbitrary",void 0),e._([e.n({type:String,reflect:!0,attribute:"helper-text-level"})],s.prototype,"helperTextLevel",void 0),e._([e.n({type:String,attribute:"helper-text-placeholder"})],s.prototype,"helperTextPlaceholder",void 0),e._([e.n({type:String,reflect:!0,attribute:"helper-text-aria-live"})],s.prototype,"helperTextAriaLive",void 0),e._([e.n({type:String,attribute:"helper-text-message"})],s.prototype,"helperTextMessage",void 0),e._([e.n({type:String,attribute:"helper-text-screen-reader-msg"})],s.prototype,"helperTextScreenReaderMsg",void 0),e._([e.n()],s.prototype,"onFilterOption",void 0),e._([e.n({type:Boolean})],s.prototype,"readonly",void 0),e._([e.l()],s.prototype,"options",void 0),e._([e.l({selector:"faceplate-option:not([hidden])"})],s.prototype,"visibleOptions",void 0),e._([e.l()],s.prototype,"triggerSlot",void 0),e._([e.Q("faceplate-dropdown-menu")],s.prototype,"dropdownMenu",void 0),s=e._([e.e("faceplate-select-text-input")],s)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("DgG2ki40OR",["C42E8rVVpA","CsxDAjmHZE"],(async(t,o)=>{let e=class extends o.s{constructor(){super(...arguments),this.isDesktop=!1,this.isLoggedIn=!1,this.isFollowed=!1,this.trackingSource="profile",this.isCompactVariant=!1,this.pubsub=new t.m(this),this.isDisabled=!1,this.onFollowStateChanged=({followed:t,userId:o})=>{this.redditorId===o&&(this.isFollowed=t)},this.toggleLoadingState=()=>{const t=this.querySelector(this.isFollowed?".unfollow-button":".follow-button");if(!t)return;const o=t.querySelector(".loading-icon"),e=t.querySelector(".button-leading-icon")?.parentElement;o?.classList.toggle("hidden"),e?.classList.toggle("hidden"),this.isDesktop&&!this.isCompactVariant||t.querySelector(".button-text")?.classList.toggle("hidden")}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.onClick),this.pubsub.subscribe(t.T.ProfileFollowStateChanged,this.onFollowStateChanged,!1)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.onClick)}async onClick(){if(this.redditorId&&this.isLoggedIn){if(this.isDisabled)return;this.isDisabled=!0,this.toggleLoadingState();const o={input:{accountId:this.redditorId,state:this.isFollowed?t.as.None:t.as.Followed}};try{const e=await t.C({operation:t.H.UpdateProfileFollowState,variables:o});this.toggleLoadingState(),e.data.updateProfileFollowState?.ok&&!e.data.updateProfileFollowState?.errors&&this.pubsub.publish(t.T.ProfileFollowStateChanged,{followed:!this.isFollowed,userId:this.redditorId})}catch(t){window.Sentry?.captureError?.(t),this.toggleLoadingState()}this.isDisabled=!1}}render(){return o.x` `}};e.styles=[t.t],t._([t.n({type:Boolean,attribute:"is-desktop"})],e.prototype,"isDesktop",void 0),t._([t.n({type:Boolean,attribute:"is-logged-in"})],e.prototype,"isLoggedIn",void 0),t._([t.n({type:Boolean,attribute:"is-followed"})],e.prototype,"isFollowed",void 0),t._([t.n({type:String,attribute:"redditor-id"})],e.prototype,"redditorId",void 0),t._([t.n({type:String,attribute:"tracking-source"})],e.prototype,"trackingSource",void 0),t._([t.n({type:Boolean,attribute:"is-compact-variant"})],e.prototype,"isCompactVariant",void 0),e=t._([t.e("follow-button")],e)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("DhAWA1TNhA",["C42E8rVVpA","CsxDAjmHZE"],(async(t,e)=>{var a;let i=a=class extends e.s{constructor(){super(...arguments),this.activationIsEnabled=!1,this.onChatButtonClick=()=>{this.toggleUIState()},this.onChatButtonKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t.at("web_chat_widget_auto_focus_from_header_ks")?this.toggleUIState():this.maximizeAndFocusChat())}}getChatClientHost(){return document.querySelector("reddit-chat-host")}async activateFeature(){try{await t.j({name:t.au})}catch(e){if(!e.message?.endsWith(`${t.au} not found`))throw e}}async setUIState(){if(a.hasInitialized)return;a.hasInitialized=!0;const t=this.initialView;if(!t)return;this.activationIsEnabled&&await this.activateFeature(),await window.customElements.whenDefined("reddit-chat-host");const e=this.getChatClientHost();e&&e.setUIState?.(t)}async toggleUIState(){await this.activateFeature();const t=this.getChatClientHost();t&&t.toggleUIState?.()}async maximizeAndFocusChat(){await this.activateFeature();const t=this.getChatClientHost();t&&(t.setUIState?.("maximized"),t.setFocusOnChatWidget())}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.onChatButtonClick),this.addEventListener("keydown",this.onChatButtonKeyDown),this.setUIState()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.onChatButtonClick),this.removeEventListener("keydown",this.onChatButtonKeyDown)}render(){return e.x` `}};i.hasInitialized=!1,t._([t.n({type:Boolean,attribute:"activation-enabled"})],i.prototype,"activationIsEnabled",void 0),t._([t.n({type:String,attribute:"initial-view"})],i.prototype,"initialView",void 0),i=a=t._([t.e("reddit-chat-header-button")],i)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./C9S3A50Ur_.js",import.meta.url,"C9S3A50Ur_");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./BYyjGDBWHg.js",import.meta.url,"BYyjGDBWHg");
SML.dm("DnH8baXgu3",["C42E8rVVpA","C9S3A50Ur_","CsxDAjmHZE","BYyjGDBWHg"],(async(r,e,o,l)=>{var c,i=o.i`${r.Y}.checkmark-icon,::slotted([slot=leading]){display:inline-flex;margin-inline-end:var(--spacer-xs)}a,button{padding:calc(var(--spacer-xs) - var(--rem1))}:host([appearance=bordered]){--rpl-filter-chip-border-color:var(--color-neutral-border);--rpl-filter-chip-text-color:var(--color-secondary-plain);--rpl-filter-chip-disabled-background-color:var(--color-interactive-content-disabled);--rpl-filter-chip-disabled-text-color:var(--color-interactive-content-disabled);--rpl-filter-chip-disabled-border-color:var(--color-neutral-border-weak);--rpl-filter-chip-selected-background-color:var(--color-secondary-background-selected);--rpl-filter-chip-selected-border-color:var(--color-neutral-border);--rpl-filter-chip-hover-background-color:var(--color-secondary-background-hover)}:host([appearance=media]){--rpl-filter-chip-border-color:var(--color-media-border-weak);--rpl-filter-chip-background-color:var(--color-media-background);--rpl-filter-chip-text-color:var(--color-media-onbackground);--rpl-filter-chip-disabled-text-color:var(--color-media-onbackground-disabled);--rpl-filter-chip-disabled-background-color:var(--color-media-background);--rpl-filter-chip-disabled-border-color:var(--color-media-border-weak);--rpl-filter-chip-hover-background-color:var(--color-media-background-hover);--rpl-filter-chip-selected-background-color:var(--color-media-background-selected);--rpl-filter-chip-selected-border-color:var(--color-media-border-selected)}:host{border:1px solid var(--rpl-filter-chip-border-color);color:var(--rpl-filter-chip-text-color);background:var(--rpl-filter-chip-background-color);border-radius:var(--rem8);font-weight:600}:host(.hover:not([disabled])),:host(:hover:not([disabled])){background:var(--rpl-filter-chip-hover-background-color)}:host([selected]){--rpl-filter-chip-background-color:var(--rpl-filter-chip-selected-background-color);--rpl-filter-chip-border-color:var(--rpl-filter-chip-selected-border-color)}:host([disabled]){--rpl-filter-chip-background-color:var(--rpl-filter-chip-disabled-background-color);--rpl-filter-chip-border-color:var(--rpl-filter-chip-disabled-border-color);--rpl-filter-chip-text-color:var(--rpl-filter-chip-disabled-text-color)}`;!function(r){r.Bordered="bordered",r.Media="media"}(c||(c={}));let a=class extends e.R{constructor(){super(...arguments),this.appearance=c.Bordered}static get styles(){return[e.R.styles,i]}renderLeadingContent(){return this.selected?l.c({size:o.I.Small,attributes:{className:"checkmark-icon"}}):super.renderLeadingContent()}};return r._([r.n({type:String})],a.prototype,"appearance",void 0),a=r._([r.e("rpl-filter-chip")],a),{get R(){return c}}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("DoAaOvteiR",["C42E8rVVpA","CsxDAjmHZE"],(async(t,e)=>{var r;!function(t){t.Error="error",t.Success="success",t.Incomplete="incomplete"}(r||(r={}));const s=a(16);function o(t,e){return t-e/100*t}function a(t){return 2*Math.PI*t}let c=class extends e.s{constructor(){super(...arguments),this.value=0,this.status=r.Incomplete}static get styles(){return e.i`:host{--loader-size-base:var(--rem40);display:inline-block;position:relative}:host([status=incomplete]){color:var(--color-neutral-content,var(--color-tone-1))}:host([status=success]){color:var(--color-success-content,var(--color-alert-positive))}:host([status=error]){color:var(--color-danger-content,var(--color-alert-negative))}svg{height:var(--loader-size,var(--loader-size-base));width:var(--loader-size,var(--loader-size-base));fill:none;stroke-width:8;display:block}.bg{stroke:var(--color-neutral-content-disabled,var(--color-tone-3))}.track{stroke:currentColor;transition:.35s stroke-dashoffset;transform:rotate(-90deg);transform-origin:50% 50%}.icon{position:absolute;inset-inline-start:50%;top:50%;transform:translate(-50%,-50%)}::slotted([slot=error]),::slotted([slot=success]){display:flex}`}render(){const t=this.status===r.Success;return e.x`
`}};t._([t.n({type:Number})],c.prototype,"value",void 0),t._([t.n({type:String,reflect:!0})],c.prototype,"status",void 0),c=t._([t.e("faceplate-progress")],c);var l=Object.freeze({__proto__:null,get FaceplateProgress(){return c},get ProgressState(){return r},calcCircumference:a,calcStokeDashOffset:o});return{get f(){return l}}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("DrM-WGXCsZ",["C42E8rVVpA","CsxDAjmHZE"],(async(t,e)=>{var a;!function(t){t.PLAIN="plain",t.MEDIA="media"}(a||(a={}));const i=12;let r=class extends e.s{constructor(){super(...arguments),this.pages=0,this.pageIndex=0,this.appearance=a.PLAIN,this.animationDuration=0,this.containerLabel="",this.numVisible=2,this.centerIndexPosition=3,this.setTransitionDuration=async()=>{this._dotsContainer&&(await this.updateComplete,this._dotsContainer.style.setProperty("--pagination-transition-duration",`${this.animationDuration}ms`))},this.animateInfiniteCurrentPage=t=>{if(this._currentPageIndicator){const e=[{transform:t?`translateX(${i*this.pages}px)`:"translateX(-12px)",opacity:0},{opacity:0,transform:t?"translateX(-12px)":`translateX(${i*this.pages}px)`},{opacity:1,transform:t?"translateX(0px)":`translateX(${i*(this.pages-1)}px)`}],a={duration:this.animationDuration,fill:"forwards",iterations:1};this.setDotsTrackTransform(!t),this._currentPageIndicator.animate(e,a)}},this.animateCurrentPage=async()=>{this.setDotsTrackTransform(),this.animateCurrentPageNumber()},this.animateCurrentPageNumber=()=>{if(this._currentPageIndicator){const t=[{width:"var(--rem6)"},{width:"var(--rem18)",borderRadius:"4px"},{width:"var(--rem6)",transform:`translateX(${i*this.pageIndex}px)`}],e={duration:this.animationDuration,fill:"forwards",iterations:1};this._currentPageIndicator.animate(t,e)}},this.onSelect=t=>{const e=new CustomEvent("pagination-click",{detail:{pageIndex:t},bubbles:!0,composed:!0});this.dispatchEvent(e)},this.isEdgeDot=t=>{if(this.pages>=6){const e=t===this.pageIndex-3,a=t===this.pageIndex+3;return e||a}return!1},this.getDotButton=a=>{const i=Math.abs(a-this.pageIndex),r=t=>t===this.pageIndex?`(${this.currentPageLabel??"Current Page"})`:"",n=this.getPageLabels?`${this.getPageLabels(a)} ${r(a)}`:`Page ${a+1} ${r(a)}`,o=0===i||1===i;return e.x`{0===t.target.tabIndex&&this.onSelect(a)}}" @keydown="${t=>{"Enter"!==t.key&&"Space"!==t.key||this.onSelect(a)}}"> ${n} `},this.render=()=>{if(0!==this.pages)return e.x` ${this.currentPageIndicator} ${[...Array(this.pages).keys()].map(((t,e)=>this.getDotButton(e)))}
`}}static get styles(){return e.i`:host{display:inline-flex;height:var(--rem16,1rem);width:100%;justify-content:center}:host(:dir(rtl)){transform:scaleX(-1)}:host #dots-container{display:inline-flex;position:relative;height:100%;overflow:hidden;align-items:center;border-radius:var(--rem8,.5rem);padding:0 var(--rem2,.125rem);transition:width ease-in-out var(--pagination-transition-duration)}:host .dots-track-container{position:relative;height:100%;width:100%;display:flex;align-items:center}:host #dots-track{display:flex;position:absolute;inset-inline-start:0;height:var(--rem12,.75rem);overflow:hidden;box-sizing:border-box;font-size:var(--rem10,.625rem);align-items:center;transition:transform ease-in-out var(--pagination-transition-duration)}:host([appearance=media]) #dots-container{background-color:var(--color-media-background)}:host([appearance=media]) .dot{background-color:var(--color-media-onbackground-disabled)}:host .dot:focus-visible{outline:solid 1px var(--color-global-focus)}:host([appearance=media]) #current-page-indicator.number{color:var(--color-media-onbackground)}:host([appearance=media]) #current-page-indicator.dot{background-color:var(--color-media-onbackground)}:host #current-page-indicator{z-index:2;position:absolute}:host #current-page-indicator.number{color:var(--color-neutral-content);display:flex;align-items:center;justify-content:center;transition:transform ease-in-out var(--pagination-transition-duration)}:host #current-page-indicator.dot{background-color:var(--color-neutral-content)}:host .dot{height:var(--rem6,.375rem);width:var(--rem6,.375rem);border-radius:50%;box-sizing:content-box;display:inline-block;margin:calc(var(--rem2,.125rem) + var(--rem1,.0625rem));padding:0;border:none}:host #current-page-indicator.number{height:var(--rem15,.9375rem);width:var(--rem16,1rem);margin:0}:host .dot{background-color:var(--color-neutral-border);background-clip:content-box;transition:all ease-in-out var(--pagination-transition-duration)}:host .dot[tabindex='0']{cursor:pointer}:host .dot:focus{transition:none}:host .dot.edge{transform:scale(.5);flex-shrink:0}`}willUpdate(t){t.has("pageIndex")&&(this.pageIndex<0||this.pageIndex>this.pages-1)&&(this.pageIndex=0)}async updated(t){await this.updateComplete,(t.has("pageIndex")||t.has("pages"))&&this.shrinkOrStretch();const e=t.get("pageIndex")===this.pages-1&&0===this.pageIndex,a=0===t.get("pageIndex")&&this.pageIndex===this.pages-1;e||a?this.animateInfiniteCurrentPage(e):t.has("pageIndex")&&await this.animateCurrentPage(),t.has("animationDuration")&&this.setTransitionDuration()}shrinkOrStretch(){this.pages>=6?0===this.pageIndex||this.pageIndex===this.pages-1?this.numVisible=4:1===this.pageIndex||this.pageIndex===this.pages-2?this.numVisible=5:2===this.pageIndex||this.pageIndex===this.pages-3?this.numVisible=6:this.pageIndex>=3&&this.pageIndex<=this.pages-4&&(this.numVisible=7):this.numVisible=this.pages,this._dotsContainer&&(this._dotsContainer.style.width=`calc(var(--rem12, 0.75rem) * ${this.numVisible})`)}setDotsTrackTransform(t){const e=this.pageIndex-this.centerIndexPosition,a=e>0?e:0;if(this._dotsTrack){const e=`translateX(${i*a*-1}px)`;e!==this._dotsTrack.style.transform?this._dotsTrack.style.transform=e:t&&"translateX(0px)"!==this._dotsTrack.style.transform&&(this._dotsTrack.style.transform="translateX(0px)")}}get currentPageIndicator(){return e.x` `}};return t._([t.n({type:Number})],r.prototype,"pages",void 0),t._([t.n({type:Number,attribute:"page-index"})],r.prototype,"pageIndex",void 0),t._([t.n({type:String})],r.prototype,"appearance",void 0),t._([t.n({type:Number,attribute:"animation-duration"})],r.prototype,"animationDuration",void 0),t._([t.n({type:String,attribute:"current-page-label"})],r.prototype,"currentPageLabel",void 0),t._([t.n()],r.prototype,"getPageLabels",void 0),t._([t.n({type:String,attribute:"container-label"})],r.prototype,"containerLabel",void 0),t._([t.Q("#dots-container")],r.prototype,"_dotsContainer",void 0),t._([t.Q("#dots-track")],r.prototype,"_dotsTrack",void 0),t._([t.Q("#current-page-indicator")],r.prototype,"_currentPageIndicator",void 0),t._([t.aY(".dot")],r.prototype,"_dots",void 0),r=t._([t.e("faceplate-pagination-indicator")],r),{get P(){return a}}}));
SML.di("./9vUF7asw4v.js",import.meta.url,"9vUF7asw4v");SML.di("./Ns-fTnJmu9.js",import.meta.url,"Ns-fTnJmu9");SML.di("./B2OLf9kcBe.js",import.meta.url,"B2OLf9kcBe");SML.di("./DZBIvVodeO.js",import.meta.url,"DZBIvVodeO");SML.di("./BHPKNOzIpV.js",import.meta.url,"BHPKNOzIpV");SML.di("./B5z9hfVW57.js",import.meta.url,"B5z9hfVW57");SML.di("./DCWWud_0J8.js",import.meta.url,"DCWWud_0J8");SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");
SML.dm("DrwVpipAUZ",["9vUF7asw4v","Ns-fTnJmu9","B2OLf9kcBe","DZBIvVodeO","BHPKNOzIpV","B5z9hfVW57","DCWWud_0J8","C42E8rVVpA"],(async(e,a,n,i,t,r,o,s)=>({b:function(e,a){if(!e?.includes("r/"))return"/";let n=[e,a].filter(Boolean).join("/");return n.startsWith("/")||(n=`/${n}`),n.endsWith("/")||(n=`${n}/`),n},g:function({type:l,iconProps:u}){switch(l){case s.cE.Public:return {label:"Public",description:"Anyone can view, post, and comment to this community",icon:n.b(u),iconSelected:a.b(u)};case s.cE.Restricted:return {label:"Restricted",description:"Anyone can view, but only approved users can contribute",icon:o.s(u),iconSelected:r.s(u)};case s.cE.Private:return {label:"Private",description:"Only approved users can view and contribute",icon:t.l(u),iconSelected:i.l(u)};case s.cE.EmployeesOnly:return {label:"Employee-only",description:"Only employees can view and contribute",icon:e.a(u),iconSelected:e.b(u)};default:return null}},s:"subreddit_about"})));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./BFDJQElz9q.js",import.meta.url,"BFDJQElz9q");SML.di("./7ymiBBk8xO.js",import.meta.url,"7ymiBBk8xO");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./CXhXPoA40F.js",import.meta.url,"CXhXPoA40F");
SML.dm("Dx9vhrNXWR",["C42E8rVVpA","BFDJQElz9q","7ymiBBk8xO","CsxDAjmHZE","CXhXPoA40F"],(async(t,e,i,s)=>{let o=window.location,r=class extends s.s{constructor(){super(...arguments),this.postId="",this.viewContext=e.P.AggregateFeed,this.viewType=t.a6.CardView,this.showFullContent=!1,this.isUpdatingPostBody=!1,this.pubsub=new t.m(this),this.onPostUpdateAction=({postId:s,action:o,value:r})=>{if(this.postId===s)switch(o){case i.a.edit:this.editController?.setEditing(r);break;case i.a.updatePostBodyPending:this.isUpdatingPostBody=r;break;case i.a.updateContent:this.dispatchEvent(t.c(e.f,{postId:s})),this.editController?.resetEditing()}},this.revealTruncatedContent=()=>{this.querySelector(`#${this.postId}-overflow-cover`)?.classList?.add(e.C),this.readMoreButton?.classList?.remove(e.x),this.readMoreButton?.classList?.add(e.C);const t=this.querySelector(`#${this.postId}-post-rtjson-content`);t?.classList?.remove(...e.B.split(" "))},this.handleClickReadMore=()=>{this.revealTruncatedContent(),this.dispatchEvent(t.c(e.R,{postId:this.postId}))}}get isPDP(){return e.i(this.viewContext)}get readMoreButton(){return this.querySelector(`#${this.postId}-read-more-button`)}connectedCallback(){this.pubsub.subscribe(t.T.PostUpdated,this.onPostUpdateAction),this.readMoreButton?.addEventListener("click",this.handleClickReadMore),t.g()&&this.initEditTools(),super.connectedCallback()}disconnectedCallback(){this.readMoreButton?.removeEventListener("click",this.handleClickReadMore),super.disconnectedCallback()}checkPostEditMode(){const e=new URLSearchParams(o.search);if(e.get(i.c)){this.pubsub.publish(t.T.PostUpdated,{postId:this.postId,action:i.a.edit,value:!0}),e.delete(i.c);const s=e.toString(),r=o.pathname+(s.length?"?":"")+s;window.history.replaceState({},document.title,r)}}async initEditTools(){const{EditController:t}=await Promise.resolve().then((function(){return d}));this.editController=new t(this,{getPostId:()=>this.postId,getViewContext:()=>this.viewContext});const{PartialUpdateController:e}=await SML.di("./SJdS8OWM4F.js",import.meta.url,"SJdS8OWM4F");this.partialUpdateController=new e(this,{getPostId:()=>this.postId,getViewContext:()=>this.viewContext,getViewType:()=>this.viewType,getSubredditPrefixedName:()=>this.subredditPrefixedName}),this.checkPostEditMode()}handleTextBodySlotChange(t){this.showFullContent||requestAnimationFrame((()=>this.hideContentOverflow()))}hideContentOverflow(){const t=this.querySelector(`#${this.postId}-post-rtjson-content`);if(!t)return;const i=this.querySelector(".post-content")||this.querySelector('div[slot="text-body"]'),s=i?.querySelectorAll("faceplate-img"),o=.2*window.innerHeight,r=(s?.length||0)*o,n=this.getMaxTextBodyHeight(t.clientHeight);t.scrollHeight+r>n&&(this.querySelector(`#${this.postId}-overflow-cover`)?.classList?.remove(e.C),this.readMoreButton?.classList?.remove(e.C),this.readMoreButton?.classList?.add(e.x))}getMaxTextBodyHeight(t){return this.isPDP?Math.max(t,253):208}render(){if(this.isUpdatingPostBody)return s.x` `;if(this.editController?.isEditing)return this.editController?.renderEditor();return s.x` `}};r.styles=[t.t],t._([t.n({type:String,attribute:"post-id"})],r.prototype,"postId",void 0),t._([t.n({type:String,attribute:"view-context"})],r.prototype,"viewContext",void 0),t._([t.n({type:String,attribute:"view-type"})],r.prototype,"viewType",void 0),t._([t.n({type:String,attribute:"subreddit-prefixed-name"})],r.prototype,"subredditPrefixedName",void 0),t._([t.n({type:Boolean,attribute:"show-full-content"})],r.prototype,"showFullContent",void 0),t._([t.v()],r.prototype,"isUpdatingPostBody",void 0),r=t._([t.e("shreddit-post-text-body")],r);const n="fetch-post-edit";var d=Object.freeze({__proto__:null,EditController:class{get postId(){return this.args.getPostId()}get viewContext(){return this.args.getViewContext()}constructor(e,o){this.host=e,this.args=o,this._isEligibleForPartialUpdate=!1,this._renderedPartial=!1,this.isEditing=!1,this.setEditing=t=>{this._isEligibleForPartialUpdate&&(t&&!this._renderedPartial?this.host.dispatchEvent(new CustomEvent(n)):this.host.requestUpdate(),this.isEditing=t)},this.resetEditing=()=>{this.isEditing=!1,this._renderedPartial=!1},this.getAndRenderPostEditPartial=async()=>{t.p(t.T.PostUpdated,{postId:this.postId,action:i.a.updatePostBodyPending,value:!0});const e=`/svc/shreddit/edit-post/${this.postId}`,s=await this._partialRequest.request(e),o=await(s?.text());if(o){const e=(new DOMParser).parseFromString(o,"text/html").querySelector('[slot="post-editor"]');e?.innerHTML&&(t.aK(o,this.host,t.P.Append),this._renderedPartial=!0)}t.p(t.T.PostUpdated,{postId:this.postId,action:i.a.updatePostBodyPending,value:!1})},this.renderEditor=()=>s.x` `,this._partialRequest=new t.aJ(e),e.addController(this)}hostConnected(){this._isEligibleForPartialUpdate=this.viewContext===e.P.CommentsPage,this._isEligibleForPartialUpdate&&this.host.addEventListener(n,this.getAndRenderPostEditPartial)}hostDisconnected(){this._isEligibleForPartialUpdate&&this.host.removeEventListener(n,this.getAndRenderPostEditPartial)}},FetchPostEditEvent:n})}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("GtN-cJJQ1w",["CsxDAjmHZE"],(async l=>{const{svg:t}=l.g();return{t:l.m(t` `,"0 0 20 20","tag-fill")}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("K-jiIg8PaC",["C42E8rVVpA","CsxDAjmHZE"],(async(t,s)=>{const e=s.s,o=new DOMParser;let i=class extends e{constructor(){super(...arguments),this.userId="",this.subredditId="",this.pubsub=new t.m(this),this.onUpdateFlairEvent=({html:t,subredditId:s,userId:e,isEnabled:i})=>{if(this.userId===e&&this.subredditId===s){const s=t&&i,e=s?t:' ',d=o.parseFromString(e,"text/html").body.firstChild;d&&(this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:!0})[0].replaceWith(d),s?this.showHost():this.hideHost())}}}static get styles(){return s.i`:host{--display:flex;display:var(--display);overflow:hidden}`}onSlotChanged(t){const s=t.target?.assignedElements({flatten:!0});s?.some((t=>"SPAN"===t.nodeName&&t.classList.contains("hidden")))&&this.hideHost()}connectedCallback(){super.connectedCallback(),this.pubsub.subscribe(t.T.CommunityAuthorFlairUpdated,this.onUpdateFlairEvent)}hideHost(){(this.shadowRoot?.host).style.setProperty("--display","none")}showHost(){(this.shadowRoot?.host).style.setProperty("--display","flex")}render(){return s.x` `}};t._([t.n()],i.prototype,"userId",void 0),t._([t.n()],i.prototype,"subredditId",void 0),i=t._([t.e("author-flair-event-handler")],i)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");
SML.dm("K26PgUrfyw",["C42E8rVVpA"],(async t=>{const e={next:"nextElementSibling",prev:"previousElementSibling"};var r,s;!function(t){t.FEED="feed",t.COMMENTS_PAGE="comments_page"}(r||(r={})),function(t){t.NEXT="next",t.PREV="prev"}(s||(s={}));return{get P(){return s},a:class{constructor(s,n){this.cache={},this.isPostOrComment=t=>["shreddit-comment","shreddit-post","shreddit-ad-post","shreddit-profile-comment"].includes(t?.tagName.toLowerCase()??""),this.traverse=t=>{const e=this.current;this._current?this.findPostOrComment(t):this._current=this.options.getFirstElement(),this.focusElement(e)},this.focusElement=e=>{if(!this.current||e===this.current)return;const s=document.activeElement;this.current?.onHotkeysFocus?this.current.onHotkeysFocus?.({preventScroll:!0}):this.current.hotkeyController?.onFocus?.({preventScroll:!0}),s===document.activeElement&&t.aU(this.current)?.focus(),this.current.style.scrollMarginTop="var(--shreddit-header-height)";const n=this.isCurrentComment?"start":this.options.type===r.COMMENTS_PAGE?"end":"center";this.current.scrollIntoView({behavior:"instant",block:n})},this.findPostOrComment=t=>{let r=this._current;for(let s=0;r&&s{const{svg:h}=c.g();return{b:c.m(h` `,"0 0 20 20","browser-fill")}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./Cx-a6g3dvo.js",import.meta.url,"Cx-a6g3dvo");SML.di("./CBvblRTUHw.js",import.meta.url,"CBvblRTUHw");SML.di("./CzSZAwtRKW.js",import.meta.url,"CzSZAwtRKW");SML.di("./7ymiBBk8xO.js",import.meta.url,"7ymiBBk8xO");
SML.dm("RW2PMpI7FO",["C42E8rVVpA","CsxDAjmHZE","Cx-a6g3dvo","CBvblRTUHw","CzSZAwtRKW","7ymiBBk8xO"],(async(e,t,i,s,o,r)=>{let a=class extends t.s{constructor(){super(...arguments),this.isEnoughParentWidth=!1,this.removed=!1,this.thingId="",this.shouldIgnoreParentWidth=!1,this.pubsub=new e.m(this),this.minWidthToShowLabel=460,this.onCommentUpdateAction=e=>{if(e.commentId!==this.thingId)return;const{action:t}=e;switch(t){case o.C.approve:case o.C.approveOptimistic:this.removed=!1;break;case o.C.remove:case o.C.removeAsSpam:case o.C.confirmRemoval:case o.C.removeOptimistic:case o.C.removeAsSpamOptimistic:case o.C.confirmRemovalOptimistic:this.removed=!0}},this.onPostUpdateAction=e=>{if(e.postId!==this.thingId)return;const{action:t}=e;switch(t){case r.a.approve:case r.a.approveOptimistic:this.removed=!1;break;case r.a.remove:case r.a.removeAsSpam:case r.a.confirmRemoval:case r.a.removeOptimistic:case r.a.removeAsSpamOptimistic:case r.a.confirmRemovalOptimistic:this.removed=!0}},this.onAwardOnContentUpdateAction=e=>{if(e.awardOnContentId!==this.thingId)return;const{action:t}=e;switch(t){case s.A.approve:this.removed=!1;break;case s.A.remove:case s.A.confirmRemoval:this.removed=!0}}}connectedCallback(){this.initializeResizeObserver(),this.pubsub.subscribe(e.T.PostUpdated,this.onPostUpdateAction),this.pubsub.subscribe(e.T.CommentUpdated,this.onCommentUpdateAction),this.pubsub.subscribe(e.T.AwardOnContentUpdated,this.onAwardOnContentUpdateAction),super.connectedCallback()}disconnectedCallback(){this.resizeObserver?.disconnect(),super.disconnectedCallback()}initializeResizeObserver(){const e=i.g(this);e&&(this.resizeObserver=new ResizeObserver((e=>{for(const t of e){const e=t.contentRect.width>=this.minWidthToShowLabel;e!==this.isEnoughParentWidth&&(this.isEnoughParentWidth=e)}})),this.resizeObserver.observe(e))}render(){return t.x` ${this.removed?t.c({size:t.I.ExtraSmall}):t.C({size:t.I.ExtraSmall})}
${this.shouldShowLabel?t.x` `:""} `}get shouldShowLabel(){return this.shouldIgnoreParentWidth||this.isEnoughParentWidth}};a.styles=[e.t],e._([e.v()],a.prototype,"isEnoughParentWidth",void 0),e._([e.n({type:Boolean,reflect:!0})],a.prototype,"removed",void 0),e._([e.n({type:String,attribute:"thing-id"})],a.prototype,"thingId",void 0),e._([e.n({type:Boolean,attribute:"ignore-parent-width"})],a.prototype,"shouldIgnoreParentWidth",void 0),a=e._([e.e("mod-verdict-indicator-component")],a)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");SML.di("./B-DM_KtOOe.js",import.meta.url,"B-DM_KtOOe");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("Uj_4iRVeQl",["C42E8rVVpA","DUzIBJc2in","B-DM_KtOOe","CsxDAjmHZE"],(async(t,e,n,i)=>{let s=class extends t.R{constructor(){super(...arguments),this.isHovered=!1,this.hoverDelayStart=150,this.hoverDelayEnd=150,this.preventNextAnimations=!1,this.containerElement=null,this.contentsElement=null,this.expandButton=null,this.collapseButton=null,this.gridTransitionPromise=null,this.gridTransitioning=!1,this.trigger="hover",this.interactionController=new e.a1(this,{hoverDelayStart:()=>this.hoverDelayStart,hoverDelayEnd:()=>this.hoverDelayEnd,isInteractedWith:t=>t.isHovered}),this.noAnimate=!1,this.parentGridSelector=".grid-container",this.hotkeysController=new t.cn(this),this.handleSlotChange=t=>{const e=document.getElementById(n.a.ContainerDiv),i=document.getElementById(n.a.ContentsDiv),s=document.getElementById(n.a.ExpandButton),a=document.getElementById(n.a.CollapseButton);i&&this.contentsElement!==i&&(this.contentsElement?.removeEventListener("mouseenter",this.interactionController.handleMouseEnter),i.addEventListener("mouseenter",this.interactionController.handleMouseEnter),this.contentsElement=i,this.isExpanded||(this.contentsVisibility=!1)),e&&this.containerElement!==e&&(this.containerElement=e),a&&a!==this.collapseButton&&(this.collapseButton?.removeEventListener("click",this.toggleState),this.collapseButton=a,a.addEventListener("click",this.toggleState)),s&&s!==this.expandButton&&(this.expandButton?.removeEventListener("click",this.toggleState),this.expandButton?.removeEventListener("keydown",this.handleExpandKeydown),this.expandButton=s,s.addEventListener("click",this.toggleState),s.addEventListener("mouseover",this.handleExpandButtonMouseOver),s.addEventListener("keydown",this.handleExpandKeydown))},this.handleExpandKeydown=async t=>{if("Tab"!==t.key)return;t.preventDefault();const e=document.querySelector("reddit-skip-to-sidebar")?.shadowRoot?.querySelector("a");if(e)return this.emitter.dispatch("focus-delegate",{detail:{el:e}}),e.focus();const n=document.getElementById("shreddit-skip-link");n instanceof HTMLElement&&(this.emitter.dispatch("focus-delegate",{detail:{el:n}}),n.focus())},this.handleExpandButtonMouseOver=t=>{this.isHovered?this.interactionController.handleMouseEnter(t):t.stopImmediatePropagation()},this.toggleStateViaHotkey=()=>{this.toggleState(void 0,{viaHotkey:!0})},this.toggleState=(e,i)=>{const s=document.querySelector(this.parentGridSelector);var a,l;void 0!==this.country&&void 0!==this.expanded&&s&&(this.emitTrackingEvent(this.isExpanded?"collapse":"expand",i),this.expanded=this.isExpanded?n.b.Collapsed:n.b.Expanded,s instanceof HTMLElement&&(this.gridTransitioning=!0,this.gridTransitionPromise=this.preventNextAnimations?r():o(s).then((()=>{this.gridTransitioning=!1})),s.classList.remove(...Object.values(n.c)),s.classList.add(n.c[this.expanded])),a=this.expanded,l=this.country,t.B({name:n.F,value:a,country:l}))}}get isExpanded(){return this.expanded===n.b.Expanded}set contentsVisibility(t){this.contentsElement&&(this.contentsElement.hidden=!t)}emitTrackingEvent(e,n){let i;n?.viaHotkey&&(i={action_info:{trigger_type:t.cO.HOTKEY}});const[s,a,o]={expand:["nav","click","open_community_nav"],collapse:["nav","click","close_community_nav"],hover:["nav","hover","open_community_nav"],unhover:["nav","hover","close_community_nav"]}[e];return t.f(this,{source:s,action:a,noun:o,...i})}async stopAnimations(){const e=[];this.containerElement&&e.push(t.bN(this.containerElement)),this.contentsElement&&e.push(t.bN(this.contentsElement)),await Promise.all(e)}async runAnimations(e,n){if(this.preventNextAnimations)return;const i=[],s=t.bO(this,`flex-left-nav-container.${e}-${n}`),a=t.bO(this,`flex-left-nav-contents.${e}-${n}`);this.containerElement&&i.push(t.bP(this.containerElement,s.keyframes,s.options)),this.contentsElement&&i.push(t.bP(this.contentsElement,a.keyframes,a.options)),await Promise.all(i)}async connectedCallback(){super.connectedCallback(),await this.syncFlexNavStateNoAnimate(),this.isExpanded||this.updateComplete.then((()=>this.contentsVisibility=!1)),this.addEventListener("mouseleave",this.interactionController.handleMouseLeave),this.hotkeysController.subscribe(t.co.OPEN_NAVIGATION,this.toggleStateViaHotkey)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("mouseleave",this.interactionController.handleMouseLeave),this.hotkeysController.unsubscribe(t.co.OPEN_NAVIGATION,this.toggleStateViaHotkey)}willUpdate(t){t.has("expanded")&&this.hasUpdated&&this.handleExpandedStateChanged(),super.willUpdate(t)}updated(){}focusContents(){this.isExpanded?this.collapseButton?.focus():this.expandButton?.focus()}async syncFlexNavStateNoAnimate(){const e=(()=>{const e=t.ad.get(n.F);return n.i(e)?e:null})();null!==e&&this.expanded!==e&&(this.preventAnimationsForUpdate(),this.toggleState(),await this.updateComplete)}async preventAnimationsForUpdate(){this.preventNextAnimations=!0;const t=document.querySelector(this.parentGridSelector);t instanceof HTMLElement&&(t.style.transition="none"),this.setAttribute("skip-animation",""),await Promise.all([this.updateComplete,r()]),this.removeAttribute("skip-animation"),t instanceof HTMLElement&&(t.style.transition=""),this.preventNextAnimations=!1}async handleExpandedStateChanged(){this.emitter.dispatch(this.isExpanded?"expand":"collapse");const t=this.updateComplete,e=(this.isExpanded?this.collapseButton:this.expandButton)?.parentElement,n=(this.isExpanded?this.expandButton:this.collapseButton)?.parentElement;if(a(e)&&(e.disabled=!0),a(n)&&n.hide?.(),t.then((async()=>{this.focusContents()})),await this.stopAnimations(),this.isExpanded&&(this.contentsVisibility=!0),!this.isHovered&&this.containerElement){const t=this.isExpanded?"show":"hide";await this.runAnimations("expand",t)}else this.gridTransitioning&&this.gridTransitionPromise?.then((()=>{this.emitter.dispatch("after-grid-transition"),this.isHovered=!1,this.classList.remove("hovered")}));this.isExpanded||(this.contentsVisibility=!1),a(e)&&(e.disabled=!1),this.emitter.dispatch(this.isExpanded?"after-expand":"after-collapse")}async startInteraction(){this.isExpanded||this.isHovered||this.gridTransitioning||(this.emitTrackingEvent("hover"),this.emitter.dispatch("hover"),await this.stopAnimations(),this.classList.add("hover-started"),this.contentsVisibility=!0,this.isHovered=!0,await this.runAnimations("hover","show"),this.classList.remove("hover-started"),this.classList.add("hovered"),this.emitter.dispatch("after-hover"))}async finishInteraction(){!this.isExpanded&&this.isHovered&&(this.emitTrackingEvent("unhover"),this.emitter.dispatch("unhover"),await this.stopAnimations(),await this.runAnimations("hover","hide"),this.classList.remove("hovered"),this.isHovered=!1,this.contentsVisibility=!1,this.emitter.dispatch("after-unhover"))}render(){return i.x` ${this.isExpanded?i.A:i.x`
`} `}};s.styles=i.i`:host(.hover-started),:host(.hovered){z-index:10!important;border-top:1px solid var(--color-neutral-border)!important}.hoverable-target{position:fixed;top:calc(var(--shreddit-header-height) + 72px);width:calc(var(--flex-nav-closed-size) + 16px);bottom:0;z-index:calc(var(--flex-nav-z-index) + 1)}.hoverable-target.hovered{z-index:calc(var(--flex-nav-z-index) - 1);top:var(--shreddit-header-height);width:calc(var(--flex-nav-expanded-size) + 16px)}`,t._([t.v()],s.prototype,"isHovered",void 0),t._([t.n({type:String,reflect:!0})],s.prototype,"expanded",void 0),t._([t.n({type:String})],s.prototype,"country",void 0),t._([t.n({type:Boolean})],s.prototype,"noAnimate",void 0),t._([t.n({type:String})],s.prototype,"parentGridSelector",void 0),s=t._([t.e("flex-left-nav-container")],s);const a=t=>"rpl-tooltip"===t?.tagName.toLowerCase(),o=(t,e=1200)=>{const n=t=>new Promise((n=>{t.addEventListener("transitionend",n),setTimeout(n,e)}));return Array.isArray(t)?Promise.all(t.map(n)):n(t)},r=()=>new Promise((t=>requestAnimationFrame(t)));return t.bL("flex-left-nav-container.expand-show",{keyframes:[{transform:"translateX(var(--closed-floating-translation))"},{transform:"translateX(var(--open-floating-translation))"}],options:{duration:250,easing:"cubic-bezier(0.65, 0, 0.35, 1)"}}),t.bL("flex-left-nav-container.expand-hide",{keyframes:[{transform:"translateX(var(--open-floating-translation))"},{transform:"translateX(var(--closed-floating-translation))"}],options:{duration:300,easing:"cubic-bezier(0.87, 0, 0.13, 1)"}}),t.bL("flex-left-nav-container.hover-show",{keyframes:[{boxShadow:"var(--left-nav-box-shadow-none)",transform:"translateX(var(--closed-floating-translation))"},{boxShadow:"var(--left-nav-box-shadow-hover)",transform:"translateX(var(--open-floating-translation))"}],options:{duration:250,easing:"cubic-bezier(0.65, 0, 0.35, 1)"}}),t.bL("flex-left-nav-container.hover-hide",{keyframes:[{boxShadow:"var(--left-nav-box-shadow-hover)",transform:"translateX(var(--open-floating-translation))"},{boxShadow:"var(--left-nav-box-shadow-none)",transform:"translateX(var(--closed-floating-translation))"}],options:{duration:300,easing:"cubic-bezier(0.87, 0, 0.13, 1)"}}),t.bL("flex-left-nav-contents.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250,easing:"linear"}}),t.bL("flex-left-nav-contents.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:300,easing:"linear"}}),{get F(){return s}}}));
SML.dm("Yp_OV6CjXa",[],(async()=>{var r,n;return function(r){r.Slot="slot",r.Wrap="wrap"}(r||(r={})),function(r){r.NSFW="nsfw",r.Spoiler="spoiler",r.NsfwAndSpoiler="nsfwAndSpoiler"}(n||(n={})),{get M(){return r},get R(){return n}}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");
SML.dm("YtwE4yaaKl",["C42E8rVVpA","CsxDAjmHZE","DUzIBJc2in"],(async(e,t,s)=>{class i extends(function(e){var t;return(t=class extends e{}).VERSION="unreleased",t}(t.s)){}let l=class extends i{constructor(){super(...arguments),this.selected=!1,this.disabled=!1,this.current=!1,this.emitter=s.l(this),this.trustedUpdate=!1,this.handleSelection=e=>{e.stopPropagation(),this.disabled||this.dispatchSelectRequest(!this.selected)},this.onClick=e=>{this.handleSelection(e)},this.dispatchSelectRequest=(e=this.selected,t)=>{this.emitter.dispatch("select",{bubbles:!0,composed:!0,detail:{option:this,selected:e,allowSingleDeselection:t}})},this.resetSelection=()=>{this.matchedText="",this.removeAttribute("hidden"),this.selected=!1,this.dispatchSelectRequest()},this.visualFocus=e=>{this.current=e}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.onClick),this.addEventListener(this.emitter.eventId("update"),this.onUpdateFromSelect),this.setAttribute("role","option")}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.onClick),this.removeEventListener(this.emitter.eventId("update"),this.onUpdateFromSelect)}updated(e){e.has("selected")&&this.setAttribute("aria-selected",`${this.selected}`),e.has("disabled")&&this.setAttribute("tabindex",this.disabled?"-1":"0"),this.trustedUpdate&&(this.trustedUpdate=!1)}willUpdate(e){e.has("selected")&&!this.trustedUpdate&&this.dispatchSelectRequest(this.selected,!0)}onUpdateFromSelect(e){const{selected:t}=e.detail??{};t!==this.selected&&(this.selected=t,this.trustedUpdate=!0)}static get styles(){return t.i`:host{color:var(--color-secondary-plain);cursor:pointer;display:flex;align-items:center;gap:var(--spacer-xs);padding:var(--spacer-xs);min-width:var(--select-width, 'auto');box-sizing:border-box;outline-offset:-1px}:host([hidden]){display:none}:host(:hover){background:var(--color-neutral-background-strong-hover)}:host([selected]){background:var(--color-neutral-background-selected)}:host([current]){outline:1px auto var(--color-global-focus)}:host([disabled]){color:var(--color-interactive-content-disabled);pointer-events:none}slot[name=leading]{width:var(--size-xl);height:var(--size-xl);align-items:center}::slotted([slot=leading]){display:inline-flex}slot:not([name]){display:inline-block;width:100%;line-height:var(--rem20)}.matched-text{font-weight:700}`}render(){const e=this.matchedText?.length||0;return t.x` ${this.matchedText} ${this.displayText?.slice(e)} ${this.selected?t.z():t.A} `}};e._([e.n({type:Boolean})],l.prototype,"selected",void 0),e._([e.n({type:Boolean})],l.prototype,"disabled",void 0),e._([e.n({type:String})],l.prototype,"value",void 0),e._([e.n({type:String,attribute:"matched-text",reflect:!0})],l.prototype,"matchedText",void 0),e._([e.n({type:String,attribute:"display-text"})],l.prototype,"displayText",void 0),e._([e.n({type:Boolean,reflect:!0})],l.prototype,"current",void 0),e._([e.av({flatten:!0})],l.prototype,"defaultSlot",void 0),l=e._([e.e("faceplate-option")],l)}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("ZGFmk_MDw6",["CsxDAjmHZE"],(async a=>{const{svg:l}=a.g();return{a:a.m(l` `,"0 0 20 20","arrow-back",!0)}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("b0pYJs2muf",["C42E8rVVpA","CsxDAjmHZE"],(async(t,s)=>{const e=new DOMParser;let i=class extends s.s{constructor(){super(...arguments),this.postId="",this.flairClass="",this.pubsub=new t.m(this),this.onPostFlairChange=t=>{t.postId===this.postId&&this.renderUpdatedFlair(t.updatedHtml)}}connectedCallback(){super.connectedCallback(),requestAnimationFrame((()=>{this.pubsub.subscribe(t.T.PostFlairUpdated,this.onPostFlairChange)}))}renderUpdatedFlair(t){const s=this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:!0})[0];if(!t&&s)return void s.remove();const i=e.parseFromString(t,"text/html").body.firstChild;if(i){if(this.flairClass&&i instanceof HTMLElement){const t=this.flairClass.split(" ").filter((t=>!!t));i.classList.add(...t)}s?s.replaceWith(i):this.appendChild(i)}}render(){return s.x` `}};i.styles=[t.t],t._([t.n({type:String,attribute:"post-id"})],i.prototype,"postId",void 0),t._([t.n({type:String,attribute:"flair-class"})],i.prototype,"flairClass",void 0),i=t._([t.e("shreddit-post-flair")],i)}));
SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("clzw02fdiy",["CsxDAjmHZE"],(async l=>{const{svg:h}=l.g();return{r:l.m(h` `,"0 0 20 20","report")}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");
SML.dm("fQLegmnZJ0",["C42E8rVVpA"],(async e=>{const t=new WeakMap;function i(e){const i=document.querySelector(e);if(!i)return Promise.reject(`lazy script "${e}" cannot be found`);const s=t.get(i);if(s)return s;if(!i.nonce)return Promise.reject('loadLazyScriptWithNonce should only be used to load scripts with "nonce"s');const n=i?.getAttribute("data-src");if(!n)return Promise.reject('loadLazyScriptWithNonce expects a script tag with a "data-src" attribute');const o=document.querySelector(`script[src="${n}"]`);if(o)return Promise.resolve(o);const r=new Promise(((e,t)=>{const s=document.createElement("script");s.nonce=i.nonce,s.onload=function(){e(s)},s.onerror=function(e){t(e?.toString())},s.src=n,s.dataset.lazy="true",document.body.appendChild(s)}));return t.set(i,r),r}var s;class n{constructor(e,t){this.host=e,this.uxTypes=t,this.host.addController(this)}static initialize(){return this.initializePromise||(this.initializePromise=this._initialize()),this.initializePromise}static async _initialize(){try{await i(`script#${e.aW}`)}catch(e){return void window.Sentry?.captureException?.(e)}try{window.google.accounts.id.initialize({client_id:CLIENT_CONFIG.GOOGLE_SSO_CLIENT_ID,callback:this.onGoogleCredentialResponse,itp_support:!0,auto_select:!0,cancel_on_tap_outside:!1,use_fedcm_for_prompt:!0})}catch(e){window.Sentry?.captureException?.(e)}}static registerListener(e,t){for(const i of e){const e=this.listenersByUX[i];e.includes(t)||e.push(t)}}static deregisterListener(e,t){for(const i of e){const e=this.listenersByUX[i],s=e.indexOf(t);s>-1&&e.splice(s,1)}}static parseCredentialResponse(e){const t=e?.credential;if(!t)throw new Error("No credential in response");try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join(""));return JSON.parse(i)}catch(e){throw new Error("Error decoding and parsing JWT")}}initialize(){return this.uxTypes&&this.host.onGoogleCredentialResponse&&s.registerListener(this.uxTypes,this.host.onGoogleCredentialResponse),s.initialize()}hostDisconnected(){this.uxTypes&&this.host.onGoogleCredentialResponse&&s.deregisterListener(this.uxTypes,this.host.onGoogleCredentialResponse)}}return s=n,n.ButtonUX=["btn","btn_confirm","btn_add_session","btn_confirm_add_session","fedcm_button"],n.OneTapUX=["auto","user","user_1tap","user_2tap","fedcm_auto","fedcm","itp"],n.listenersByUX=[...s.ButtonUX,...s.OneTapUX].reduce(((e,t)=>(e[t]=[],e)),{}),n.onGoogleCredentialResponse=e=>{const t=s.listenersByUX[e.select_by];if(t)for(const i of t)i(e)},{G:n,l:i}}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");
SML.dm("fVikWTzQ_v",["C42E8rVVpA","CsxDAjmHZE"],(async(e,t)=>{let i=class extends t.s{constructor(){super(...arguments),this._imageElem=null,this._traceCompleted=!1,this._imageStartTiming=0,this._imageLoadedTiming=0,this._imageReadyTiming=0,this._observer=new e.bu,this._hasBeenInView=!1,this.placement="image_post",this.isPromoted=!1,this.onEnter=()=>{this._hasBeenInView=!0,this._imageStartTiming||(this._imageStartTiming=Date.now()),this.applyListeners(),this._timeoutTimer||(this._timeoutTimer=setTimeout((()=>{this._imageElem?.complete&&this._imageElem?.naturalWidth||this.sendImageMetric("download_fail")}),6e4))},this.onLeave=()=>{if(this._traceCompleted||!this._hasBeenInView||!this._imageStartTiming)return;const e=Date.now()-this._imageStartTiming>=150;!this._imageReadyTiming&&e&&this.sendImageMetric("exit_before_visible")},this.onLoad=()=>{this._imageLoadedTiming=Date.now(),this.poll()},this.onError=()=>{this.sendImageMetric("download_fail")},this.checkStatus=e=>{if(e.naturalWidth&&!this._imageReadyTiming)return this._imageLoadedTiming||(this._imageLoadedTiming=Date.now()),this._imageReadyTiming=Date.now(),this.sendImageMetric(),!0;e.complete&&!this._imageLoadedTiming&&(this._imageLoadedTiming=Date.now(),this.poll());const t=Date.now()-this._imageLoadedTiming;return this._pollVisibleInterval&&t>1e4&&this.sendImageMetric("download_fail"),!1}}connectedCallback(){if(super.connectedCallback(),this._traceCompleted)return;if(this._imageElem=this.previousElementSibling,!this._imageElem.tagName.includes("IMG"))throw new Error(" must be immediately after the observed in the DOM");this.checkStatus(this._imageElem)||(this._observer.observe(this._imageElem),this._imageElem.addEventListener("faceplate-enter",this.onEnter),this._imageElem.addEventListener("faceplate-leave",this.onLeave))}disconnectedCallback(){super.disconnectedCallback(),this._observer.unobserve(this._imageElem),this._imageElem?.removeEventListener("faceplate-enter",this.onEnter),this._imageElem?.removeEventListener("faceplate-leave",this.onLeave),this.cleanup()}applyListeners(){if(!this._imageElem)return;this.checkStatus(this._imageElem)||(this._imageElem.addEventListener("load",this.onLoad,{once:!0}),this._imageElem.addEventListener("error",this.onError,{once:!0}))}cleanup(){clearInterval(this._pollVisibleInterval),clearTimeout(this._timeoutTimer),this._imageElem?.removeEventListener("load",this.onLoad),this._imageElem?.removeEventListener("error",this.onError),this._imageStartTiming=0,this._imageLoadedTiming=0,this._imageReadyTiming=0}poll(){!this._pollVisibleInterval&&this._hasBeenInView&&(this._pollVisibleInterval=setInterval((()=>{this.checkStatus(this._imageElem)}),25))}sendImageMetric(t=void 0){const i=this._getFeedPostInfo(),s=this._getGalleryInfo();let a,n;i&&({position:n,...a}=i),this.isPromoted&&(a||(a={}),a.promoted=!0,a.type=this.promotedPostType);const o=this._imageStartTiming||this._imageLoadedTiming||this._imageReadyTiming||Date.now(),m=this._imageReadyTiming||Date.now(),r={source:"image",action:"trace",noun:"performance",client_timestamp:Date.now(),image_trace:{get_image_start_timestamp:o,image_ready_timestamp:m,view_visibile_timestamp:o},media:{width:this._imageElem?.naturalWidth,height:this._imageElem?.naturalHeight,url:this._imageElem?.src,placement:this.placement},action_info:{position:n,reason:t,page_type:e.x()}};a&&(r.post=a),s&&(r.gallery=s),this._sendEvent(r),this.cleanup(),"exit_before_visible"!==t&&(this._traceCompleted=!0)}_getFeedPostInfo(){const t=this.closest("shreddit-post, shreddit-ad-post");if(t)return{id:t.id,promoted:t.nodeName.includes("AD"),nsfw:t.nsfw,view_type:t.viewType===e.a6.CompactView?"classic":"card",position:t.feedIndex}}_getGalleryInfo(){if(!this.closest("gallery-carousel"))return;const e=this.closest("li")?.getAttribute("slot");return e?{position:Number(e.split("-")[1])-1}:void 0}_sendEvent(t){e.f(this,t)}createRenderRoot(){return this}};e._([e.n()],i.prototype,"placement",void 0),e._([e.n({type:Boolean,attribute:"is-promoted"})],i.prototype,"isPromoted",void 0),e._([e.n({type:String,attribute:"promoted-post-type"})],i.prototype,"promotedPostType",void 0),i=e._([e.e("image-observer")],i)}));
SML.di("./C42E8rVVpA.js",import.meta.url,"C42E8rVVpA");SML.di("./CsxDAjmHZE.js",import.meta.url,"CsxDAjmHZE");SML.di("./BtqmVQuPYp.js",import.meta.url,"BtqmVQuPYp");SML.di("./DUzIBJc2in.js",import.meta.url,"DUzIBJc2in");SML.di("./B-LM1r1oJd.js",import.meta.url,"B-LM1r1oJd");SML.di("./DrM-WGXCsZ.js",import.meta.url,"DrM-WGXCsZ");
SML.dm("tmkhvHLxT3",["C42E8rVVpA","CsxDAjmHZE","BtqmVQuPYp","DUzIBJc2in","B-LM1r1oJd","DrM-WGXCsZ"],(async(t,i,e,s,n,a)=>{let o=class extends i.s{constructor(){super(...arguments),this.appearance=a.P.PLAIN,this.autoplay=0,this.pages=0,this.pageIndex=0,this.isAnimationFinished=!1,this._currentAnimation=null,this.handleAutoplayInterruption=async t=>{this.cancelAnimation(t)},this.cancelAnimation=async t=>{const i=await this._autoplayPillContainer;if(i){const{children:e}=i;if(e[t]?.firstElementChild){const i=e[t]?.firstElementChild?.getAnimations().map((t=>(t.cancel(),t.ready)));i&&await Promise.all(i)}}},this.resetAnimations=async()=>{const t=await this._autoplayPillContainer;if(t){const{children:i}=t;for(let t=0;t{this.isAnimationFinished=!1;try{await this.updateComplete,this._currentAnimation?.cancel();const t=[{backgroundColor:"var(--color-neutral-border-medium)",width:0,height:"var(--rem4)"},{backgroundColor:"var(--color-neutral-border-medium)",width:"100%",height:"var(--rem4)"}],i={duration:this.autoplay,fill:"forwards",iterations:1},{children:e}=await this._autoplayPillContainer,s=e?.[this.pageIndex]?.firstElementChild;this._currentAnimation=s?.animate(t,i),await(this._currentAnimation?.finished),this.isAnimationFinished=!0}catch(t){t instanceof DOMException&&"AbortError"===t.name||console.error(t)}},this.pauseAnimation=()=>{this._currentAnimation?.pause()},this.resumeAnimation=()=>{this._currentAnimation?.play()},this.render=()=>{if(0!==this.pages)return i.x` `}}static get styles(){return i.i`:host{display:block;box-sizing:border-box}.pagination-container{display:flex;justify-content:center}.track.in-view{height:var(--rem4,.25rem);border-radius:var(--rem2,.125rem)}.autoplayPill,.track{height:var(--rem2,.125rem);display:inline-block;border-radius:var(--rem2,.0625);width:100%}.autoplayPill{position:absolute}.track{background-color:var(--color-neutral-border);flex:1;margin:0 var(--rem2,.125rem);display:inline-block;position:relative}#autoplay-pill-container{display:flex;width:100%;align-items:center}.autoplayPill.viewed{background-color:var(--color-neutral-border-medium)}.pagination-controls.autoplay{width:90%}.pagination-controls.media.autoplay{position:absolute;bottom:var(--rem12,.75rem);z-index:2}.pagination-controls{display:flex;align-items:center;justify-content:center}.pagination-controls.plain .current-page-indicator{color:var(--color-media-onbackground)}.pagination-controls.media .current-page-indicator{color:var(--color-neutral-content)}`}updated(t){t.has("pageIndex")&&!this.isAnimationFinished&&this.handleAutoplayInterruption(t.get("pageIndex"))}};var r,l,h,d,c;t._([t.n({type:String,attribute:"appearance"})],o.prototype,"appearance",void 0),t._([t.n({type:Number})],o.prototype,"autoplay",void 0),t._([t.n({type:Number})],o.prototype,"pages",void 0),t._([t.n({type:Number,attribute:"page-index"})],o.prototype,"pageIndex",void 0),t._([t.v()],o.prototype,"isAnimationFinished",void 0),t._([t.dX("#autoplay-pill-container")],o.prototype,"_autoplayPillContainer",void 0),o=t._([t.e("faceplate-carousel-pagination")],o),function(t){t.OUTSIDE="outside",t.INSIDE="inside",t.OFF="off"}(r||(r={})),function(t){t.NEXT="next",t.BOTH="both",t.OFF="off"}(l||(l={})),function(t){t.INSIDE="inside",t.OUTSIDE="outside",t.OFF="off"}(h||(h={})),function(t){t.FORWARDS="forwards",t.BACKWARDS="backwards"}(d||(d={})),function(t){t.LEFT="left",t.CENTER="center",t.OFF="off"}(c||(c={}));let u=class extends i.s{constructor(){super(...arguments),this.navPlacement=h.OUTSIDE,this.paginationPlacement=r.OUTSIDE,this.autoplay="default",this.advanceAnimation=!1,this.numVisible=1,this.infinite=!1,this.inset=l.OFF,this.startIndex=0,this._pageIndex=0,this.pageCount=0,this.isCarouselInitialized=!1,this.hasBeenInteractedWith=!1,this._childCount=0,this._autoplayTimeoutId=null,this._isInsetBothAllowed=!1,this._lowerBoundOffset=0,this._upperBoundOffset=0,this._prevButtonHidden=!1,this._isNextButtonHidden=!1,this._gap=0,this._gapTotal=0,this._autoplayPaginationRef=t.U(),this._carouselListRef=t.U(),this._gesture=null,this.firstRender=!0,this.autoplayInProgress=!1,this.hidePrevButton=!1,this.hideNextButton=!1,this.emitter=s.l(this),this._animationStartTime=0,this._animationRemainingTime=0,this.generateAriaLiveMsg=({pageIndex:t,numVisible:i,pageCount:e})=>{const s=t*i+1;return i>1?`Items ${s} through ${s+i-1} of ${e}`:`Item ${s} of ${e}`},this.updated=async t=>{(t.has("numVisible")||t.has("infinite")||t.has("inset")||t.has("autoplay")||t.has("navPlacement")||t.has("paginationPlacement")||t.has("pageWidth"))&&((t.has("inset")||t.has("navPlacement"))&&(this.cachedDimensions=null),this.firstRender||this.resetAndInitialize()),(t.has("_pageIndex")||t.has("infinite"))&&this.toggleDisabledProgressButtons()},this.resetAndInitialize=()=>{this.resetCarousel(),this.initializeCarousel()},this.initializeResize=()=>{this.resizeObserver&&this.resizeObserver.disconnect(),this.resizeObserver=new ResizeObserver((async()=>{if(!this.firstRender){this.cachedDimensions=null,await new Promise((t=>requestAnimationFrame(t)));const t=this.getCarouselDimensions();t&&await this.showFirstChild(t.width)}})),this.resizeObserver.observe(this)},this.intersectionCallback=t=>{t.forEach((t=>{t.target.style.visibility=t.isIntersecting?"visible":"hidden"}));const i=new CustomEvent("__TEST-ONLY_carousel-intersection");this.dispatchEvent(i)},this.initializeIntersectionObserver=()=>{if(this._intersectionObserver=new IntersectionObserver(this.intersectionCallback,{root:this._carouselListRef?.value}),this.carouselSlot.children)for(const t of Array.from(this.carouselSlot.children))this._intersectionObserver.observe(t)},this.onPaginationClick=t=>{this.goToPage(t.detail.pageIndex,!0)},this.initializeCarousel=()=>{if(this.isCarouselInitialized)return;const{children:t}=this.carouselSlot;this.setChildAndPageCount(t),this.handleAutoPlay(),this._isInsetBothAllowed=this._childCount>=3&&(this.inset===l.BOTH||this.alignment===c.CENTER),this.infinite&&this.cloneBoundElements({children:t});if(this.navPlacement===h.INSIDE&&this.paginationPlacement===r.INSIDE||!this.firstRender){const t=this.getCarouselDimensions();t&&this.showFirstChild(t.width)}this.firstRender=!1,this.isCarouselInitialized=!0,this.initListMutationObserver(),this.initializeVisibility(),this.initializeIntersectionObserver(),this.toggleDisabledProgressButtons(),this._paginationCounter?.[0]&&(this._paginationCounter[0].style.visibility=this.pageCount<=5?"hidden":"visible");const i=new CustomEvent("__TEST-ONLY_carousel-initialized");this.dispatchEvent(i)},this.showFirstChild=async t=>{!this.hasBeenInteractedWith&&this.startIndex&&(this._pageIndex=this.startIndex),await this.setChildDimensions(t),this.goToPage(this.pageIndex,!1);const i=new CustomEvent("__TEST-ONLY_carousel-children-ready",{bubbles:!0});this.dispatchEvent(i)},this.handleAutoPlay=async()=>{"off"===this.autoplay||isNaN(this._autoplaySpeed)||(this.autoplayInProgress&&this.clearAnimationTimeout(),this.autoplayInProgress=!0,(this.infinite||this._pageIndex{await this.slideForwards(),this.handleAutoPlay()}),this._autoplaySpeed)))},this.cachedDimensions=null,this.getCarouselDimensions=()=>{if(this.cachedDimensions)return this.cachedDimensions;const t=this._carouselListRef.value?.getBoundingClientRect();if(t){const{width:i}=t;return this.cachedDimensions={width:i,height:t.height},this.cachedDimensions}},this.calcChildWidth=t=>{if(this.pageWidth)return"string"==typeof this.pageWidth&&this.pageWidth.endsWith("%")?t*(parseInt(this.pageWidth)/100):this.pageWidth;let i=0;this._gapTotal=this._gap*(this.numVisible-1)||0,this.inset!==l.OFF&&(i=48*(this.inset===l.NEXT?1:2),this._gapTotal=this._gap*(this.inset===l.NEXT?this.numVisible:this.numVisible+1));return(t-this._gapTotal-i)/this.numVisible},this.setChildDimensions=async t=>{this._gap=parseInt(getComputedStyle(this.carouselSlot).getPropertyValue("gap"))||0;for(const i of Array.from(this.carouselSlot.children)){const{width:e}=i.getBoundingClientRect(),s=i;if(s.style.boxSizing="border-box",t){const i=this.calcChildWidth(t);i!==e&&(s.style.width="number"==typeof i?`${i}px`:i)}"100%"!==s.style.height&&(s.style.height="100%"),"hidden"!==s.style.overflow&&(s.style.overflow="hidden")}},this.prepareNextSlideVisibility=t=>{const i=this.carouselSlot.children.length;for(let e=t;e{this.prepareNextSlideVisibility(i);let e="";const s=this.insetWidth(t);if(this._isInsetBothAllowed)switch(i){case 0:e="0px";break;case this.pageCount-1:e=this.isRTL?`calc(-1 * ${t.offsetLeft}px)`:`calc(-1 * (${t.offsetLeft}px - ${2*s}px - ${this._gap*this.numGaps}px))`;break;default:e=`calc(-1 * (${t.offsetLeft}px - ${s}px - ${this._gap}px))`}else{const i=getComputedStyle(this.carouselSlot),s=parseInt(i.paddingLeft||"0"),n=parseInt(i.paddingRight||"0"),a=this.carouselSlot.scrollWidth-(this.carouselSlot.clientWidth-n),o=t.offsetLeft===s?0:t.offsetLeft;e=-Math.min(o,a)+"px"}return this.carouselSlot.style.transform=`translateX(${e})`,await Promise.all(this.carouselSlot.getAnimations().map((t=>t.finished))).catch((t=>{t instanceof DOMException&&"AbortError"===t.name||console.error(t)}))},this.slideCarousel=async({isWithinBounds:t,direction:i,requestedIndex:e,allowAnimations:s,onSuccessfulSlide:n})=>{const{children:a}=this.carouselSlot,o=a.length,r=Math.max(1,Math.min(this.numVisible,o));let l=!1;if(this.firstRender||(this.carouselSlot.style.transitionDuration=`${s?this.animationDuration:0}ms`),t){let t=e*r+this._lowerBoundOffset;if(t+r>o){const i=e-1,s=t+r-o;t=Math.max(0,i*r+(r-s))}await this.handleTranslateXWithOffset({element:a[t],startIndex:t}),l=!0}else this.infinite&&(await this.handleInfiniteSlide({children:a,direction:i}),l=!0);l&&(this.hasBeenInteractedWith||(this.hasBeenInteractedWith=!0),n?.());const h=new CustomEvent("faceplate-carousel:slide",{detail:{prevPositionIndex:this._pageIndex,currPositionIndex:e,direction:i,num_items:this._childCount},bubbles:!0});this.dispatchEvent(h)},this.cloneBoundElements=({children:t})=>{let i=0;const e=this._childCount-1,s=this._isInsetBothAllowed?1:0;for(let i=0;i{this.carouselSlot.style.transitionDuration="0s";let e=this._isInsetBothAllowed?1:0;i===d.BACKWARDS&&(e=t.length-this._upperBoundOffset),await this.handleTranslateXWithOffset({element:t[e],startIndex:e}),this.carouselSlot.style.transitionDuration=`${this.animationDuration}ms`;const s=i===d.BACKWARDS?e-this.numVisible:e+this.numVisible;await this.handleTranslateXWithOffset({element:t[s],startIndex:s})},this.setNavButtonVisibility=({type:t,hidden:i})=>{this.navPlacement!==h.OFF&&("next"===t?(this.hideNextButton=i,this._isNextButtonHidden=i):(this.hidePrevButton=i,this._prevButtonHidden=i))},this.toggleDisabledProgressButtons=()=>{if(!this.infinite){const t=0===this.pageIndex,i=this.pageIndex===Math.ceil(this._childCount/this.numVisible)-1,e=0===this._childCount;this.setNavButtonVisibility({type:"previous",hidden:e||t}),this.setNavButtonVisibility({type:"next",hidden:e||i})}},this.resetCarousel=()=>{this.resetChildren(),this.cancelAutoPlay(),this.resetDisabledProgressButtons(),this._pageIndex=0,this.pageCount=0,this.isCarouselInitialized=!1,this._isInsetBothAllowed=!1,this._lowerBoundOffset=0,this._upperBoundOffset=0;const t=new CustomEvent("__TEST-ONLY_carousel-reset");this.dispatchEvent(t)},this.resetChildren=()=>{const{children:t}=this.carouselSlot;let i=0;const e=t.length;for(let s=0;s{"number"==typeof this._autoplayTimeoutId&&(window.clearTimeout(this._autoplayTimeoutId),this.autoplayInProgress=!1,t&&t())},this.cancelAutoPlay=()=>{this.clearAnimationTimeout(this._autoplayPaginationRef?.value?.resetAnimations)},this.onListItemKeydown=t=>{"ArrowLeft"===t.key?this.slideBackwards(t):"ArrowRight"===t.key&&this.slideForwards(t)},this.goToPage=(t,i)=>{if(t<0||t>=this.pageCount)return;let e=d.BACKWARDS;t>this._pageIndex&&(e=d.FORWARDS),this._pageIndex=t,this.slideCarousel({isWithinBounds:!0,direction:e,requestedIndex:t,allowAnimations:i})},this.swipeForwards=t=>{this.slideForwards(t),this.dispatchSwipeEvent(d.FORWARDS)},this.swipeBackwards=t=>{this.slideBackwards(t),this.dispatchSwipeEvent(d.BACKWARDS)},this.onInterruptedAutoplay=async t=>{await t(),this.handleAutoPlay()},this.slideHelper=async({navButtonDisabled:t,slide:i,e})=>{t||(this._autoplayTimeoutId&&e?this.onInterruptedAutoplay(i):await i())},this.slideForwards=async t=>{const i=this._pageIndex+1,e=i{this._pageIndex=e?i:0,this.slideCarousel({isWithinBounds:e,direction:d.FORWARDS,requestedIndex:i,allowAnimations:!0})},e:t})},this.onKeyDown=(t,i)=>{"Enter"!==t.key&&"Space"!==t.key||(t.preventDefault(),i(t))},this.slideBackwards=async t=>{const i=this._pageIndex-1,e=i>=0;await this.slideHelper({navButtonDisabled:this._prevButtonHidden,slide:async()=>{this._pageIndex=e?i:this.pageCount-1,this.slideCarousel({isWithinBounds:e,direction:d.BACKWARDS,requestedIndex:i,allowAnimations:!0})},e:t})},this.onListItemFocusIn=()=>{this.autoplay&&"off"!==this.autoplay&&(this._animationRemainingTime=this._autoplaySpeed-(Date.now()-this._animationStartTime),this.clearAnimationTimeout(),this.autoplayInProgress=!1,this._autoplayPaginationRef?.value?.pauseAnimation())},this.onListItemBlur=()=>{this.autoplay&&"off"!==this.autoplay&&(this._autoplayPaginationRef?.value?.resumeAnimation(),setTimeout((async()=>{await this.slideForwards(),this.handleAutoPlay()}),this._animationRemainingTime))}}static get styles(){return i.i`:host{display:flex;position:relative;width:inherit;isolation:isolate;--carousel-gap:var(--spacer-xs, 0.5rem);--carousel-padding:0;--carousel-margin:0}.carousel-container{display:flex;height:auto;align-items:center;position:relative;width:100%}::slotted(:not([slot])){height:100%;display:grid;grid-auto-flow:column;transition:transform;transition-timing-function:ease-out;margin:var(--carousel-margin)!important;padding:var(--carousel-padding)!important;list-style:none;position:relative;gap:var(--carousel-gap)}::slotted([slot=nextButton]),::slotted([slot=prevButton]){display:inline-block}.content-nav-buttons{display:inline-block;position:relative;z-index:2}.content-nav-buttons.hide{visibility:hidden}.content-nav-buttons.start{position:absolute;inset-inline-start:var(--spacer-sm,.75rem)}.content-nav-buttons.outside.end{padding:0 var(--spacer-sm,.75rem)}.content-nav-buttons.inside{position:absolute;top:50%;transform:translateY(-50%)}.content-nav-buttons.inside.start{inset-inline-start:var(--spacer-xs,.5rem)}.content-nav-buttons.inside.end{inset-inline-end:var(--spacer-xs,.5rem)}#carousel-window{position:relative;overflow:hidden;contain:content;display:flex;flex-direction:column;height:100%;flex:1}#carousel-list{height:100%;overflow:hidden;position:relative}:host([pagination-placement=outside]) #pagination-container{padding-top:var(--spacer-xs,.5rem)}:host(:not([nav-placement])) #carousel-window,:host([nav-placement=outside]) #carousel-window{margin-inline-start:var(--rem56,3.5rem)}:host([pagination-placement=inside]) #pagination-container{position:absolute;bottom:var(--rem16,1rem);inset-inline:0;margin:0 auto;width:fit-content}.carousel-actions{position:absolute;inset-inline-end:var(--rem12,.5rem);display:inline-flex;align-items:center;gap:var(--rem12,.75rem)}.carousel-actions.top{top:var(--rem12,.5rem)}.carousel-actions.bottom{bottom:var(--rem16,.1rem)}.hidden{visibility:hidden}.visible{visibility:visible;transition:visibility ease-in}`}get pageIndex(){return this._pageIndex}get isRTL(){try{return this.matches(":dir(rtl)")}catch{return"rtl"===getComputedStyle(this).direction}}get carouselSlot(){return this._children.reduce(((t,i)=>i.assignedSlot&&"UL"===i.nodeName?i:t),document.createElement("ul"))}connectedCallback(){if(super.connectedCallback(),this._gesture=new e.T(this,{mouseSupport:!1}),this._gesture.on("swipeleft",this.isRTL?this.swipeBackwards:this.swipeForwards),this._gesture.on("swiperight",this.isRTL?this.swipeForwards:this.swipeBackwards),this.initializeResize(),this.isCarouselInitialized){const t=this._pageIndex;this.resetAndInitialize(),this._pageIndex!==t&&this.goToPage(t,!1)}}disconnectedCallback(){super.disconnectedCallback(),this._gesture?.destroy(),this.resizeObserver?.disconnect(),this._listMutationObserver?.disconnect(),this._intersectionObserver?.disconnect()}firstUpdated(){this.initializeCarousel()}async handleChildRemoval(){const{children:t}=this.carouselSlot;this.setChildAndPageCount(t),this._firstViewableIndex>this._childCount-1&&this.slideBackwards(),this._childCount||this.toggleDisabledProgressButtons();const i=new CustomEvent("__TEST-ONLY_carousel-children-reset");this.dispatchEvent(i)}get _firstViewableIndex(){return this.infinite?this.pageIndex*this.numVisible+this._lowerBoundOffset:this.pageIndex*this.numVisible}initListMutationObserver(){this._listMutationObserver&&this._listMutationObserver.disconnect(),this._listMutationObserver=new MutationObserver((t=>{for(const i of t)"childList"===i.type&&this.isCarouselInitialized&&(i.removedNodes.length>0?this.handleChildRemoval():i.addedNodes.length>0&&this.handleChildrenAddition())})),this.carouselSlot&&this._listMutationObserver.observe(this.carouselSlot,{childList:!0})}setChildAndPageCount(t){this._childCount=t.length,this.pageCount=Math.ceil(this._childCount/this.numVisible)}async handleChildrenAddition(){const t=this._childCount,{children:i}=this.carouselSlot;this.setChildAndPageCount(i);const e=this.getCarouselDimensions();e&&await this.setChildDimensions(e.width),this._childCount>t&&this.toggleDisabledProgressButtons()}get _autoplaySpeed(){switch(this.autoplay){case"off":return 0;case"default":return 5e3;default:return parseInt(this.autoplay)}}get animationDuration(){return this.advanceAnimation&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches?250:0}get numInsets(){return this.inset===l.BOTH||this.alignment===c.CENTER?2:this.inset===l.NEXT||this.alignment===c.LEFT?1:0}get numGaps(){return this.numVisible+this.numInsets-1}insetWidth(t){const i=this.getCarouselDimensions();if(i){return(i.width-t.getBoundingClientRect().width*this.numVisible-this._gap*this.numGaps)/this.numInsets}return 0}resetDisabledProgressButtons(){this.setNavButtonVisibility({type:"next",hidden:!1}),this.setNavButtonVisibility({type:"previous",hidden:!1})}initializeVisibility(){for(const t of Array.from(this.carouselSlot.children))t.dataset.fpUiCarouselMarker||(t.style.visibility="hidden")}dispatchSwipeEvent(t){const i=new CustomEvent("faceplate-carousel:swipe",{detail:{currPositionIndex:this._pageIndex,direction:t},bubbles:!0});this.dispatchEvent(i)}render(){return i.x` this.onKeyDown(t,this.slideBackwards)}"> this.onKeyDown(t,this.slideForwards)}"> ${this.currentAriaLiveMsg??this.generateAriaLiveMsg({pageIndex:this.pageIndex,pageCount:this.pageCount,numVisible:this.numVisible})} `}};return u.navButton=({placement:e,progress:s,ariaLabel:n})=>{const a=s===d.FORWARDS?"Next Page":"Previous Page";return t.Z({appearance:e===h.INSIDE?"media":"secondary",size:t.ac.Small,leadingIcon:s===d.FORWARDS?i.aa({size:i.h.Small}):i.ab({size:i.h.Small}),attributes:{"aria-label":n??a}})},u.closeButton=({attributes:e})=>t.Z({appearance:"media",size:t.ac.Small,leadingIcon:i.ac({size:i.h.Small}),attributes:e}),u.addButton=({children:e,attributes:s})=>t.Z({appearance:"media",size:t.ac.Small,leadingIcon:i.ad({size:i.h.Small}),attributes:s,children:e}),u.paginationCounter=({attributes:t,pageIndex:i,pageCount:e})=>n.b({appearance:n.B.MEDIA,content:`${i+1} / ${e}`,attributes:t}),t._([t.n({type:String,attribute:"nav-placement",reflect:!0})],u.prototype,"navPlacement",void 0),t._([t.n({type:String,attribute:"pagination-placement",reflect:!0})],u.prototype,"paginationPlacement",void 0),t._([t.n({type:String})],u.prototype,"autoplay",void 0),t._([t.n({type:Boolean,attribute:"advance-animation"})],u.prototype,"advanceAnimation",void 0),t._([t.n({type:Number,attribute:"num-visible"})],u.prototype,"numVisible",void 0),t._([t.n({type:Boolean})],u.prototype,"infinite",void 0),t._([t.n({type:String})],u.prototype,"inset",void 0),t._([t.n({type:String,attribute:"pagination-counter-label"})],u.prototype,"paginationCounterLabel",void 0),t._([t.n({type:Number,attribute:"start-index"})],u.prototype,"startIndex",void 0),t._([t.n()],u.prototype,"getPageLabels",void 0),t._([t.n({type:String,attribute:"current-page-label"})],u.prototype,"currentPageLabel",void 0),t._([t.n({type:String,attribute:"current-aria-live-msg"})],u.prototype,"currentAriaLiveMsg",void 0),t._([t.n({type:String,attribute:"pagination-container-label"})],u.prototype,"paginationContainerLabel",void 0),t._([t.n({type:String,attribute:"page-width"})],u.prototype,"pageWidth",void 0),t._([t.n({type:String})],u.prototype,"alignment",void 0),t._([t.v()],u.prototype,"_pageIndex",void 0),t._([t.v()],u.prototype,"pageCount",void 0),t._([t.v()],u.prototype,"isCarouselInitialized",void 0),t._([t.v()],u.prototype,"hasBeenInteractedWith",void 0),t._([t.av({flatten:!0})],u.prototype,"_children",void 0),t._([t.av({slot:"paginationCounter",flatten:!0})],u.prototype,"_paginationCounter",void 0),t._([t.v()],u.prototype,"firstRender",void 0),t._([t.v()],u.prototype,"autoplayInProgress",void 0),t._([t.v()],u.prototype,"hidePrevButton",void 0),t._([t.v()],u.prototype,"hideNextButton",void 0),u=t._([t.e("faceplate-carousel")],u),{get C(){return d},get F(){return u},get I(){return l},get N(){return h},get P(){return r}}}));
SML.dm("uOlAvv4IVq",[],(async()=>{var e;return function(e){e.Feed="FEED",e.Pdp="PDP"}(e||(e={})),{get T(){return e}}}));