Loading
Showing the first 250,000 characters. Open raw for the full source.
function(e,t,a){a.d(t,{x:()=>g0}),a(321073);var n,l,i,s,r=a(477900),o=a(582128),d=a(17928),c=a(314116),u=a(270003),m=a(193249),h=a(532446),x=a(821609),p=a(834730),g=a(364522),v=a(611677),j=a(691885),f=a(95477),b=a(404778),y=a(77729),E=a(952818),C=a(905552),S=a(999926),_=a(157257),N=a(507868),A=a(738935),k=a(614584),D=a(423341),I=a(574206),T=a(564973),R=a(227628),w=a(468550),O=a(196765);let M=(0,O.v)(()=>({enabled:!1,pending:null,lastResult:null}));function L(e){M.setState({enabled:e})}function P(e){M.setState({pending:e})}function U(e){M.setState({lastResult:e})}var G=a(781710),B=a(696016),F=a(264572).Buffer;function $(){let e=M(e=>e.enabled),t=M(e=>e.pending),a=M(e=>e.lastResult),n=o.useCallback(async(e,t,a,n)=>{let l=S.Ay.getMediaEngine();if(null==l.setClipsPerfMonitoring)return U("setClipsPerfMonitoring unsupported in this build"),null;P(n);try{let n=await l.setClipsPerfMonitoring(e,t,a);return L(n.enabled),n}catch(e){return U(`${n} failed: ${e instanceof Error?e.message:String(e)}`),null}finally{P(null)}},[]),l=o.useCallback(async t=>{L(t);let a=await n(t,!1,!1,t?"enable":"disable");null!=a?U(`recorder ${a.enabled?"enabled":"disabled"}`):L(e)},[n,e]),i=o.useCallback(async()=>{let t=await n(e,!0,!1,"save");if(null==t)return;if(""===t.html)return void U("save: server returned empty html");let a=`clips-perf-${new Date().toISOString().replace(/[:.]/g,"-")}.html`;try{let e=F.from(t.html,"utf8"),n=await y.A.fileManager.saveWithDialog2(e,a);if(null!=n&&!0===n.canceledByUser)return void U("save: canceled");U(`saved ${t.eventCount} events (${t.html.length} bytes)`)}catch(e){U(`save failed: ${e instanceof Error?e.message:String(e)}`)}},[n,e]),s=o.useCallback(async()=>{let t=await n(e,!1,!0,"clear");null!=t&&U(`cleared ${t.eventCount} events`)},[n,e]);return(0,r.jsxs)(u.n,{label:"Clips v3 Performance",children:[(0,r.jsx)(m.d,{label:"Record Clips v3 performance",description:"Toggles the in-process perf recorder inside discord_clips.exe.",checked:e,disabled:null!=t,onChange:l}),(0,r.jsxs)(h.M,{children:[(0,r.jsx)(x.$,{text:"Save as file...",disabled:null!=t,onClick:i}),(0,r.jsx)(x.$,{text:"Clear recording",variant:"secondary",disabled:null!=t,onClick:s})]}),(null!=t||null!=a)&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:null!=t?`working: ${t}...`:a})]})}let V=[{label:"Laughter Model",flag:B.pZ.LAUGHTER},{label:"Shouting Model",flag:B.pZ.SHOUTING},{label:"Events",flag:B.pZ.GAME_EVENTS}];function W(){let e=(0,d.bG)([N.A],()=>N.A.isStaffBypassDisabled()),t=(0,d.bG)([N.A],()=>N.A.isStaffBypassActive()),a=(0,d.bG)([N.A],()=>N.A.hasLoadedCapabilities()),n=(0,d.bG)([N.A],()=>N.A.getGameCapabilities().size),l=(0,d.bG)([E.Ay],()=>E.Ay.getVisibleGame()),i=l?.id,s=(0,d.bG)([N.A],()=>N.A.getCapabilities(i),[i]),o=(0,d.bG)([N.A],()=>null!=i&&N.A.getGameCapabilities().has(i),[i]),c=(0,d.bG)([N.A],()=>N.A.isGameAllowed(i),[i]);return(0,r.jsxs)(u.n,{label:"Autoclipping Game Capabilities",children:[(0,r.jsx)(m.d,{label:"Ignore staff bypass",description:"Staff normally get autoclipping for every game. Turn this on to be treated as a regular user, so autoclipping follows the server capabilities map. Resets to off each time Discord launches.",checked:e,onChange:k.jE}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["capabilities: ",a?`loaded, ${n} game(s)`:"not loaded yet"]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["staff bypass active: ",String(t)]}),null==l?(0,r.jsx)(p.E,{variant:"text-md/normal",children:"no visible game running"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(p.E,{variant:"text-md/normal",children:[l.name," (",l.id,")"]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["autoclipping: ",c?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["in capabilities map: ",o?"Yes":"No"," (bitmask ",s,")"]}),V.map(e=>{let{label:t,flag:a}=e;return(0,r.jsxs)(p.E,{variant:"text-md/normal",children:[t,": ",(s&a)!=0?"Yes":"No"]},t)}),!o&&c&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:'This game isn\'t in the map \u2014 autoclipping is on via the staff bypass, so every capability above reads No. Turn on "Ignore staff bypass" to see what a regular user gets.'})]}),(0,r.jsx)(x.$,{text:"refetch capabilities",variant:"secondary",disabled:null==i,onClick:()=>{null!=i&&T.b.refetchMany([i])}})]})}function z(e,t){let a=new I.k(e);for(let e of t)a.recordSavedClip(e);return a.end(),a}function H(){let e=(0,R.MZ)(e=>e.isOpen),t=(0,w.sY)(e=>e.isOpen),[a,n]=o.useState(3),l=o.useCallback(e=>{let t=Object.values(A.Ay.getClips()),a=t.find(e=>null!=e.applicationId);if(a?.applicationId==null)return;let n=a.applicationId,l=t.filter(e=>e.applicationId===n).slice(0,e);A.Ay.devSetLastClipsSession(z(n,l)),(0,w.M8)(n)},[]),i=o.useCallback(e=>{e?l(a):(0,w.kF)()},[l,a]),s=o.useCallback(()=>{let e=Object.values(A.Ay.getClips()),t=(0,C.A)(E.Ay,_.A),a=(t?.id!=null?e.find(e=>e.applicationId===t.id):void 0)??e.find(e=>null!=e.applicationId);if(a?.applicationId==null)return;let n=a.applicationId,l=e.filter(e=>e.applicationId===n).slice(0,10);A.Ay.devSetLastClipsSession(z(n,l)),(0,R.w9)()},[]),S=o.useCallback(e=>{e?s():(0,R.yj)()},[s]),N=o.useCallback(e=>{n(e),t&&l(e)},[l,t]),[I,T]=o.useState(B.rb.KILL),[O,M]=o.useState(1),[L,P]=o.useState(""),U=(0,d.bG)([A.Ay],()=>A.Ay.isAutoStashEnabled()),F=o.useCallback(e=>{e?(0,c.A)({title:"Stash all gaming sessions?",subtitle:"Every gaming session will be stashed to your Desktop (inside the `decider_stash` folder) when it ends. This setting is not persistent \u2014 it resets to off each time Discord launches.",confirmText:"Enable",variant:"primary",onConfirm:()=>{k.mN(!0)}}):k.mN(!1)},[]),[V,H]=o.useState([]),[K,Y]=o.useState(void 0),q=o.useCallback(e=>{H(e),Y(t=>null!=t&&e.includes(t)?t:e[0])},[]),J=o.useCallback(async()=>{let e=y.A.clips.debugListStashedClipDeciderSessions;null!=e&&q(await e())},[q]);o.useEffect(()=>{let e=!0,t=y.A.clips.debugListStashedClipDeciderSessions;if(null!=t)return t().then(t=>{e&&q(t)}),()=>{e=!1}},[q]);let Q=(0,d.bG)([A.Ay],()=>A.Ay.getState().clipsSettings.enableAutoclipping),X=(0,d.bG)([A.Ay],()=>A.Ay.getEnableAutoclipping());return(0,r.jsx)(g.Ip,{children:(0,r.jsxs)(v.l,{children:[(0,r.jsx)(u.n,{label:"Send Test Signals",children:(0,r.jsxs)(h.M,{children:[(0,r.jsx)(x.$,{text:"Manual",onClick:()=>k.Ts({type:B.Gy.MANUAL})}),(0,r.jsx)(x.$,{text:"Distributed",onClick:()=>k.Ts({type:B.Gy.DISTRIBUTED,remoteTriggerUserId:"123",remoteTriggerClipId:"456"})}),(0,r.jsx)(x.$,{text:"Shouting",onClick:()=>k.Ts({type:B.Gy.SHOUTING,userId:"123",confidence:1})}),(0,r.jsx)(x.$,{text:"Laughter",onClick:()=>D.A.debugCreateRankableLaughterClip()})]})}),(0,r.jsxs)(u.n,{label:"Game Event Creator",children:[(0,r.jsxs)(h.M,{children:[(0,r.jsx)(j.l,{label:"Event Type",value:I,onSelectionChange:e=>T(e),options:[{id:"kill",label:"Kill",value:B.rb.KILL},{id:"multikill",label:"Multikill",value:B.rb.MULTIKILL},{id:"death",label:"Death",value:B.rb.DEATH},{id:"assist",label:"Assist",value:B.rb.ASSIST},{id:"item",label:"Item",value:B.rb.ITEM},{id:"victory",label:"Victory",value:B.rb.VICTORY},{id:"defeat",label:"Defeat",value:B.rb.DEFEAT},{id:"level_up",label:"Level Up",value:B.rb.LEVEL_UP},{id:"treasure",label:"Treasure",value:B.rb.TREASURE},{id:"objective_kill",label:"Objective Kill",value:B.rb.OBJECTIVE_KILL}],selectionMode:"single",fullWidth:!0}),(0,r.jsx)(j.l,{label:"Importance",value:O,onSelectionChange:M,options:[{id:"low",label:"Low",value:0},{id:"medium",label:"Medium",value:.5},{id:"high",label:"High",value:1}],selectionMode:"single",fullWidth:!0})]}),(0,r.jsx)(f.k,{label:"Description (optional)",value:L,onChange:P,placeholder:"e.g., Killed enemy ADC in bot lane"}),(0,r.jsx)(x.$,{text:"Create Game Event",onClick:()=>{k.Ts({type:B.Gy.GAME_EVENT,eventType:I,importance:O,description:L})}}),(0,r.jsx)(m.d,{label:"Auto-stash decider data",description:"Stashes every gaming session to your Desktop when it ends. Resets to off on each Discord launch.",checked:U,onChange:F}),(0,r.jsx)(j.l,{label:"Stash session (re-run ranking)",value:K,onSelectionChange:e=>Y(e),options:V.map(e=>({id:e,label:e,value:e})),placeholder:0===V.length?"No stashed sessions":"Most recent",disabled:0===V.length,selectionMode:"single",fullWidth:!0}),(0,r.jsxs)(h.M,{children:[(0,r.jsx)(x.$,{text:"re-run ranking",onClick:()=>{D.i.debugRerunRanking(K).catch(e=>{B.nx.error("re-run ranking failed",e)})}}),(0,r.jsx)(x.$,{text:"run automontage",onClick:()=>{D.i.debugRunAutoMontage(K).catch(e=>{B.nx.error("run automontage failed",e)})}}),(0,r.jsx)(x.$,{text:"refresh sessions",variant:"secondary",onClick:()=>{J()}})]})]}),(0,r.jsx)(u.n,{label:"Clip Metadata Tool",children:(0,r.jsx)(G.A,{})}),(0,r.jsx)(b.c,{}),(0,r.jsx)($,{}),(0,r.jsx)(b.c,{}),(0,r.jsx)(W,{}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(u.n,{label:"Reminder UI",children:[(0,r.jsx)(m.d,{label:"Clips Quick Bar",description:"Force-show the inline quick bar above the account panel. Fabricates a session (up to 10 clips) from your recent clips so it can be tested without capturing a real game session.",checked:e,onChange:S}),(0,r.jsx)(m.d,{label:"Clips Reminder",description:"Force-show the post-session ClipsReminder panel. Fabricates a session from your most recent clips (and game) so it can be tested without capturing a real game session.",checked:t,onChange:i}),(0,r.jsx)(j.l,{label:"Clip count",value:a,onSelectionChange:N,options:[{id:"1",label:"1 clip",value:1},{id:"2",label:"2 clips",value:2},{id:"3",label:"3 clips",value:3}],selectionMode:"single",fullWidth:!0}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(u.n,{label:"Clips Settings",children:[(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["autoclippingEnabled (internal): ",String(Q)]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["autoclippingEnabled (exposed): ",String(X)]}),(0,r.jsx)(x.$,{text:"unset autoclipping default",onClick:()=>{k.uL(void 0,!1)}})]})]})]})})}var K=a(503698),Y=a.n(K),q=a(939249),J=a(683071),Q=a(297264),X=a(538064),Z=a(265059),ee=a(869146);a(323874),a(14289),a(35956);var et=a(789645),ea=a(589158),en=a(65593),el=a(377980),ei=a(581298),es=a(393284),er=a(287809),eo=a(901139),ed=a(641886),ec=a(780898),eu=a(652215),em=a(75709),eh=a(427262);function ex(e){let{nameplate:t}=e,a=(0,d.bG)([er.default],()=>er.default.getCurrentUser()),n=eh.Ay.useName(a)??"";return(0,r.jsx)(em.g,{username:n,selfMute:!1,selfDeaf:!1,serverMute:!1,serverDeaf:!1,suppress:!1,speaking:!1,playingSoundboard:!1,streaming:!1,status:eu.clD.ONLINE,currentUser:a,activities:[],applicationStream:void 0,userTag:"",speakingWhileMuted:!1,occluded:!1,dismissibleContents:{avatar:[],settings:[]},isOrbchievementsEnabled:!1,awaitingRemote:!1,nameplate:t,voiceChannel:null,isQuestBarEmpty:!0,isListenAlongVisible:!1})}var ep=a(736653),eg=a(653523),ev=a(475601);function ej(e){let{selected:t,onSelect:a}=e,n=(0,ep.Ay)();return(0,r.jsxs)("div",{className:ev.N,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Preselected Gradient"}),(0,r.jsx)("div",{className:ev.Z,children:ed.Z6.map(e=>{let l=n!==eu.NJ8.LIGHT?e.darkBackground:e.lightBackground,i=t===e.name;return(0,r.jsx)(eg.S4,{onSelect:()=>a(e),style:{background:l},name:e.name,isSelected:i},e.name)})})]})}var ef=a(834058),eb=a(95701),ey=a(331884);function eE(e){let{selected:t,nameplate:a}=e,n=(0,ey.i)(),l=new eb.cq({id:"0",type:eu.rbe.DM,name:"self",guild_id:"0",recipients:[n.id]});return(0,r.jsx)(ef.th,{selected:t,channel:l,user:n,nameplate:a})}var eC=a(698638),eS=a(52940);function e_(){let[e,t]=(0,o.useState)(!1),[a,n]=(0,o.useState)(!1),[l,i]=(0,o.useState)(null),{node:s}=(0,ei.Ay)(es.k,""),d=(0,eo.Ay)(e=>e.toolsCache),{setToolsCache:c,removeToolsCache:u}=(0,eo.DE)(),{setImgCache:m}=(0,eo.TW)(),h=(0,o.useCallback)(e=>{let t=d[e];null!=t?i({previewToolKey:t.url,palette:t.palette,skuId:"0"}):i(t=>null==t?{previewToolKey:e,palette:ed.Wj,skuId:"0"}:{...t,previewToolKey:e})},[d]),g=(0,o.useCallback)(e=>{i(t=>null==t?null:{...t,palette:e})},[]),v=(0,o.useCallback)(e=>{u(e)},[u]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:eS.ne,children:[(0,r.jsxs)("div",{className:eS.gO,children:[(0,r.jsx)(x.$,{size:"sm",onClick:()=>{n(!1),t(e=>!e)},variant:"secondary",text:"Toggle Themes"}),(0,r.jsx)(x.$,{size:"sm",onClick:()=>{t(!1),n(e=>!e)},variant:"secondary",text:"Toggle Gradients"})]}),(0,r.jsxs)("div",{className:eS.uQ,children:[e&&(0,r.jsx)(el.A,{node:s}),a&&(0,r.jsx)(ej,{selected:l?.palette?.name,onSelect:e=>{l?.previewToolKey!=null&&c(l.previewToolKey,l.previewToolKey,e),g(e)}})]})]}),(0,r.jsxs)("div",{className:eS.iW,children:[(0,r.jsx)(eN,{nameplate:l},l?.palette?.name),(0,r.jsxs)("div",{className:eS.Uo,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Drag background image to screen"}),(0,r.jsx)(en.A,{title:"upload image",description:"upload the background",icons:eC.xi,onDrop:async e=>{let t=URL.createObjectURL(e[0]),a=e[0],n=await a.arrayBuffer();m(t,t,(0,ec.nI)(n)),c(t,t,ed.Wj)}}),(0,r.jsx)("div",{className:eS.is,children:Object.values(d).map(e=>{let{url:t}=e;return(0,r.jsx)(eA,{src:t,onSetStatic:h,removeAsset:v},t)})}),(0,r.jsx)(eD,{label:"gradient override",onChange:e=>g({name:ed.AK,darkBackground:e,lightBackground:e})}),(0,r.jsx)(ek,{label:"set",onClick:()=>{}})]})]})]})}function eN(e){let{nameplate:t}=e,[a,n]=(0,o.useState)(320),l=(0,o.useRef)(null),i=(0,o.useRef)(null),s=(0,o.useRef)(null),d=(0,o.useRef)(document),c=(0,o.useCallback)(e=>{if(null!=l.current){let t=l.current.getBoundingClientRect();n(Math.max(264,Math.min(432,e.clientX-t.left)))}},[]),u=(0,o.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=e.currentTarget.ownerDocument;function a(e){e.preventDefault(),c(e)}function n(){null!=i.current&&(t.removeEventListener("mousemove",i.current),i.current=null),null!=s.current&&(t.removeEventListener("mouseup",s.current),s.current=null)}d.current=t,i.current=a,s.current=n,t.addEventListener("mousemove",a),t.addEventListener("mouseup",n)},[c]);return(0,o.useEffect)(()=>()=>{null!=i.current&&(d.current.removeEventListener("mousemove",i.current),i.current=null),null!=s.current&&(d.current.removeEventListener("mouseup",s.current),s.current=null)},[]),(0,r.jsx)(g.Ip,{className:eS.Fp,orientation:"horizontal",children:(0,r.jsxs)("div",{ref:l,className:eS.ey,style:{width:`${a}px`},children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Memberlist"}),(0,r.jsx)(eI,{nameplate:t}),(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"DMs"}),(0,r.jsx)(eT,{nameplate:t}),(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"RTC"}),(0,r.jsx)(eR,{nameplate:t}),(0,r.jsx)("div",{className:eS.Di,onMouseDown:u})]})})}function eA(e){let{src:t,onSetStatic:a,removeAsset:n}=e;return(0,r.jsxs)("div",{className:eS.xO,children:[(0,r.jsx)(q.D,{onClick:()=>n(t),className:eS.yV,children:(0,r.jsx)(et.P,{size:"custom",width:16,height:16,name:"x"})}),(0,r.jsx)("img",{className:eS.Ez,src:t,alt:""}),(0,r.jsx)("div",{className:eS.Lu,children:(0,r.jsx)(x.$,{onClick:()=>a(t),size:"sm",variant:"secondary",text:"set nameplate"})})]})}function ek(e){let{label:t,onClick:a}=e;return(0,r.jsxs)("div",{className:eS.Uu,children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"coming soon"}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:t,disabled:!0,onClick:a})]})}function eD(e){let{label:t,onChange:a}=e;return(0,r.jsxs)("div",{className:eS.Im,children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",children:t}),(0,r.jsx)("input",{onChange:e=>{a(e.target.value)},className:eS.QL,placeholder:"#000000"})]})}function eI(e){let{nameplate:t}=e,a=(0,d.bG)([er.default],()=>er.default.getCurrentUser());return(0,r.jsx)("div",{className:eS.VH,children:(0,r.jsxs)("div",{className:eS.H1,children:[(0,r.jsx)(p.E,{className:eS.Pf,variant:"text-sm/semibold",children:"DEFAULT"}),(0,r.jsx)(ea.A,{nameplate:t,user:a,currentUser:a}),(0,r.jsx)(p.E,{className:eS.Pf,variant:"text-sm/semibold",children:"FOCUSED"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(ea.A,{nameplate:t,selected:!0,user:a,currentUser:a}),(0,r.jsx)(ea.A,{selected:!0,user:a,currentUser:a})]})]})})}function eT(e){let{nameplate:t}=e;return(0,r.jsx)("div",{className:eS.VH,children:(0,r.jsxs)("div",{className:eS.H1,children:[(0,r.jsx)(p.E,{className:eS.Pf,variant:"text-sm/semibold",children:"DEFAULT"}),(0,r.jsx)(eE,{nameplate:t}),(0,r.jsx)(p.E,{className:eS.Pf,variant:"text-sm/semibold",children:"FOCUSED"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(eE,{selected:!0,nameplate:t}),(0,r.jsx)(eE,{selected:!0})]})]})})}function eR(e){let{nameplate:t}=e;return(0,r.jsx)("div",{className:eS.VH,children:(0,r.jsx)("div",{className:eS.X2,children:(0,r.jsx)(ex,{nameplate:t})})})}a(508300);var ew=a(132500),eO=a(157559),eM=a(780777),eL=a(993408),eP=a(579151),eU=a(559474),eG=a(816866),eB=a(87558),eF=a(575593),e$=a(631903),eV=a(224640),eW=a(408278),ez=a(972213),eH=a(43990),eK=a(192308),eY=a(661531),eq=a(231723),eJ=a(900686),eQ=a(986687),eX=a(802384),eZ=a(435558),e0=a.n(eZ),e1=a(855915),e2=a(480335);let e3=e=>{let{profileEffect:t}=e,a=o.useMemo(()=>(0,eZ.cloneDeep)(t),[t]),n=o.useMemo(()=>t.effects.some(e=>null!=e.randomizedSources&&e.randomizedSources.length>0),[t.effects]),l=o.useMemo(()=>{if(n){var e;let n=1===(e=a.effects.reduce((e,t)=>{let a=1+(t.randomizedSources??[]).length;return a>1?1===e?a:Math.min(a,e):e},1))?-1:Math.floor(Math.random()*e);n>0&&t.effects.forEach((e,t)=>{null!=e.randomizedSources&&e.randomizedSources.length>0&&(a.effects[t].src=e.randomizedSources[n-1].src)})}return a},[t.effects,a,n]),i="debug",{layerData:s}=(0,e1.A)({skuId:i,layers:l.effects});return(0,r.jsx)(e2.p,{profileEffect:l,skuId:i,layerData:s})};var e6=a(586886),e8=a(778765);let e5="https://cdn.discordapp.com/assets/content/ad2a252a6866e1ecb3bab521e2baaabbf13ab2d1ecaa8af67862c53c91f76761.png",e4={[eB.qH.THUMBNAIL]:null,[eB.qH.STATIC]:null,[eB.qH.REDUCED_MOTION]:null},e7="debug",e9="reduced-motion-preview-modal";function te(e){let{transitionState:t,onClose:a,frameSrc:n,theme:l}=e;return(0,r.jsx)(eV.d,{transitionState:t,size:"md",onClose:a,maxHeight:"viewport",children:(0,r.jsxs)("div",{className:e6.Xd,children:[(0,r.jsx)("div",{className:e6.y6,children:(0,r.jsx)(eW.K,{"aria-label":"Close",onClick:a,icon:ez.XLargeIcon,variant:"overlay-secondary",size:"sm"})}),(0,r.jsxs)("div",{className:e6.rU,children:[(0,r.jsx)(eH.N,{theme:l,children:e=>(0,r.jsx)("img",{src:e5,alt:"",className:Y()(e6.aM,e),"aria-hidden":!0})}),null!=n&&""!==n&&(0,r.jsx)("img",{src:n,className:e6.SD,alt:"Reduced motion preview"})]})]})})}function tt(e){let{type:t,frame:a,theme:n,onClear:l}=e,i=t===eB.qH.REDUCED_MOTION,s=i?e5:e8.A,o=(0,r.jsx)(eH.N,{theme:n,children:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:s,alt:"",className:Y()(e6.aM,e),"aria-hidden":!0}),a?.src!=null&&""!==a.src&&(0,r.jsx)("img",{src:a.src,className:Y()(e6.SD,e),alt:""})]})});return(0,r.jsxs)("div",{className:e6.pK,children:[(0,r.jsx)(Q.D,{variant:"heading-sm/bold",children:t}),i?(0,r.jsx)(q.D,{className:Y()(e6.zd,e6.eB),onClick:function(){(0,eK.hasModalOpen)(e9)?(0,eK.closeModal)(e9):(0,eK.openModalLazy)(()=>Promise.resolve(e=>(0,r.jsx)(te,{...e,frameSrc:a?.src??null,theme:n})),{modalKey:e9,onCloseRequest:()=>(0,eK.closeModal)(e9)})},children:o}):(0,r.jsx)("div",{className:e6.zd,children:o}),null!=a&&(0,r.jsx)(x.$,{variant:"critical-secondary",size:"sm",text:"Clear",onClick:l})]})}let ta=e=>{let{profileEffect:t}=e,{upsertProfileEffect:a}=(0,eG.wu)(),n=(0,d.bG)([er.default],()=>er.default.getCurrentUser()),[l,i]=o.useState(!0),s=o.useRef({}),[c,u]=o.useState(!1),[m,h]=o.useState(!1),[g,v]=o.useState(8),[j,f]=o.useState([]),[b,y]=o.useState(e4),E=o.useRef([]),[C,S]=o.useState(t.name),_=C.toLowerCase().replace(/\s+/g,"_"),N=o.useMemo(()=>({type:eF.R.PROFILE_EFFECT,skuId:e7,title:e7,description:e7,accessibilityLabel:e7,reducedMotionSrc:"",thumbnailPreviewSrc:"",effects:j,animationType:e$.l.ANIMATION_TYPE_UNSPECIFIED}),[j]),A=c?eY.A.themes.DARK:eY.A.themes.LIGHT;function k(e){let t=e.currentTarget.files;return null==t?null:t[0]}function D(e,t){let a=k(t);null!=a&&(0,eB.Mz)(a,t=>{y(n=>({...n,[e]:(0,eB.GT)(t,a)}))})}o.useEffect(()=>{let e=t.effects;e.length>0&&f(e.map(e=>({...e,name:e.name??(0,eB.XG)(e.src),randomizedSources:e.randomizedSources?.map(e=>({...e,filename:e.filename??(0,eB.XG)(e.src)}))})))},[t.effects]),o.useEffect(()=>{let e=t.stillFrames;null!=e&&Object.entries(e).forEach(e=>{let[t,a]=e;if(null!=a){if(""!==a.src&&null!=a.src&&(""===a.base64||null==a.base64))y(e=>({...e,[t]:a}));else if(""!==a.base64&&null!=a.base64){let e=(0,eB.fB)(a.base64);a.src=e,E.current.push(e),y(e=>({...e,[t]:a}))}}})},[t.stillFrames]);let I={profileEffect:t,upsertProfileEffect:a},T=o.useRef(I);return(o.useEffect(()=>{T.current=I}),o.useEffect(()=>{let{profileEffect:e,upsertProfileEffect:t}=T.current;e.readonly||t({skuId:e.skuId,name:C,effects:j,stillFrames:b})},[j,b,C]),o.useEffect(()=>()=>{E.current.forEach(e=>{URL.revokeObjectURL(e)}),E.current=[]},[]),null==n)?(0,r.jsx)("div",{}):(0,r.jsxs)("div",{className:e6.zr,children:[(0,r.jsxs)("div",{style:{display:"none"},children:[(0,r.jsx)(eM.A,{ref:e=>{s.current.animated=e},onChange:function(e){let t=k(e);null!=t&&(0,eB.Mz)(t,async e=>{let a=await (0,eB.Ay)(e,t,j.length);f(e=>[...e,a])})},multiple:!1}),(0,r.jsx)(eM.A,{ref:e=>{s.current.thumbnail=e},onChange:e=>D(eB.qH.THUMBNAIL,e),multiple:!1}),(0,r.jsx)(eM.A,{ref:e=>{s.current.static=e},onChange:e=>D(eB.qH.STATIC,e),multiple:!1}),(0,r.jsx)(eM.A,{ref:e=>{s.current.reducedMotion=e},onChange:e=>D(eB.qH.REDUCED_MOTION,e),multiple:!1})]}),(0,r.jsxs)("div",{className:e6.Vg,children:[(0,r.jsxs)("div",{className:Y()(e6.nM,e6.uW),children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Profile Effect Name"}),(0,r.jsx)("input",{type:"text",value:C,className:e6.hF,onChange:e=>{S(e.target.value)}})]}),(0,r.jsxs)("div",{className:e6.nM,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Dark Theme"}),(0,r.jsx)("input",{type:"checkbox",checked:c,className:e6.OO,onChange:()=>{u(!c)}}),(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Show User Profile"}),(0,r.jsx)("input",{type:"checkbox",checked:m,className:e6.OO,onChange:()=>{h(!m)}})]}),(0,r.jsxs)("div",{className:e6.nM,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Border Radius"}),(0,r.jsx)("input",{type:"range",min:4,max:24,step:2,value:g,onChange:e=>v(+e.target.value)}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:[g,"px"]})]}),(0,r.jsxs)("div",{className:Y()(e6.nz,e6.VH),style:{borderRadius:g},children:[m?(0,r.jsx)("div",{className:e6.jq,children:(0,r.jsx)(eX.A,{user:n,currentUser:n,transitionState:eq.ip.ENTERED,onClose:()=>{},themeContainerClassName:e6.JB})}):(0,r.jsx)(eH.N,{theme:A,children:e=>(0,r.jsx)("div",{className:Y()(e6.aM,e),children:(0,r.jsx)("img",{src:e8.A,alt:"",width:400})})}),l&&(0,r.jsx)("div",{className:e6.KJ,children:(0,r.jsx)(e3,{profileEffect:N})})]}),(0,r.jsx)("div",{children:m&&(0,r.jsxs)("div",{className:Y()(e6.f5,e6.VH),style:{borderRadius:g},children:[(0,r.jsx)(eQ.A,{user:n,pendingAvatar:void 0,pendingProfileEffect:null,hideProfileFrame:!0,canUsePremiumCustomization:!0,isTryItOut:!0}),(0,r.jsx)(e3,{profileEffect:N})]})}),(0,r.jsxs)("div",{className:e6.nz,children:[(0,r.jsxs)("div",{className:e6.nM,children:[(0,r.jsx)(x.$,{variant:"active",text:"Upload Animated Layer",onClick:()=>s.current.animated?.activateUploadDialogue()}),(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Make sure to upload the bottommost layer first!"})]}),(0,r.jsxs)("div",{className:e6.nM,children:[(0,r.jsx)(x.$,{variant:"active",text:"Upload thumbnail.png",onClick:()=>s.current.thumbnail?.activateUploadDialogue()}),(0,r.jsx)(x.$,{variant:"active",text:"Upload static.png",onClick:()=>s.current.static?.activateUploadDialogue()}),(0,r.jsx)(x.$,{variant:"active",text:"Upload reduced_motion.png",onClick:()=>s.current.reducedMotion?.activateUploadDialogue()})]}),(0,r.jsx)("div",{className:e6.q6,children:(0,r.jsx)("div",{className:e6.nM,children:(0,r.jsx)(x.$,{variant:"primary",text:"Replay Animation",onClick:()=>{i(!1),setTimeout(()=>i(!0),100)}})})}),(0,r.jsxs)("div",{className:Y()(e6.q6,e6.XA),children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Please download both configs for the drop package!"}),(0,r.jsx)(p.E,{variant:"text-sm/bold",color:"text-feedback-critical",children:"WARNING: The full config is really big :0"}),(0,r.jsxs)("div",{className:e6.nM,children:[(0,r.jsx)(eJ.A,{fileContents:()=>(0,eB.rs)(j),contentType:"text/plain",fileName:`${_}_timing_config.txt`,children:(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Download Timing Config"})}),(0,r.jsx)(eJ.A,{fileContents:function(){return JSON.stringify({...t,name:C,readonly:!1,effects:j,stillFrames:b})},contentType:"text/plain",fileName:`${_}_config.txt`,children:(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Download Full Config"})})]})]}),(0,r.jsxs)("div",{className:e6.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-lg/bold",children:"Still Frames"}),(0,r.jsx)("div",{className:e6.mv,children:Object.entries(b).map(e=>{let[t,a]=e;return(0,r.jsx)(tt,{type:t,frame:a,theme:A,onClear:()=>{y(e=>({...e,[t]:null}))}},t)})})]}),j.some(e=>(e.randomizedSources??[]).length>0)&&(0,r.jsxs)("div",{className:Y()(e6.uW,e6.l7),children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:"Rules of Randomized Effects"}),(0,r.jsxs)("ol",{children:[(0,r.jsx)("li",{children:"When an effect has randomization, all layers with random options must have the same number of options."}),(0,r.jsx)("li",{children:"The duration for the random options of a layer must be the same"}),(0,r.jsx)("li",{children:"If multiple layers have randomization, the same option will be used for all layers. (For example, the second option will be used for ALL layers)"}),(0,r.jsx)("li",{children:'Click "Replay Animation" to "reroll" the randomization'})]})]})]}),(0,r.jsxs)("div",{className:Y()(e6.Vg,e6.ZF),children:[(0,r.jsx)("div",{className:e6.cD,children:(0,r.jsx)(x.$,{variant:"critical-secondary",text:"Clear Assets",onClick:function(){f([]),y(e4)}})}),j.map((e,t)=>(0,r.jsxs)("div",{className:e6.ec,children:[(0,r.jsxs)("div",{className:e6.D1,children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:e.name}),(0,r.jsx)("img",{src:e.src,className:e6.oq,alt:""}),null!=e.randomizedSources&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:"Alternatives"}),e.randomizedSources.map((e,t)=>(0,r.jsxs)("div",{children:[null!=e.filename&&(0,r.jsx)(Q.D,{variant:"heading-sm/semibold",children:e.filename}),(0,r.jsx)("img",{src:e.src,className:e6.oq,alt:""})]},e.filename??`randomized-${t}`))]})]}),(0,r.jsxs)("div",{className:Y()(e6.Vg,e6.uW),children:[(0,r.jsxs)("div",{className:e6.nz,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:"Start"}),(0,r.jsx)("input",{type:"number",value:e.start,className:e6.hF,onChange:e=>{f(a=>{let n=[...a],l=a[t];return l.start=+e.target.value,n[t]=l,n})},contentEditable:!0})]}),(0,r.jsxs)("div",{className:e6.nz,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:"Duration"}),(0,r.jsx)("input",{type:"number",value:e.duration,className:e6.hF,onChange:e=>{f(a=>{let n=[...a],l=a[t];return l.duration=+e.target.value,n[t]=l,n})},contentEditable:!0})]})]}),(0,r.jsxs)("div",{className:Y()(e6.Vg,e6.uW),children:[(0,r.jsxs)("div",{className:e6.nz,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:"Loop"}),(0,r.jsx)("input",{type:"checkbox",checked:e.loop,className:e6.OO,onChange:e=>{f(a=>{let n=[...a],l=a[t];return l.loop=e.target.checked,n[t]=l,n})}})]}),(0,r.jsx)("div",{className:e6.nz,children:e.loop&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:"Loop Delay"}),(0,r.jsx)("input",{type:"number",value:e.loopDelay,className:e6.hF,onChange:e=>{f(a=>{let n=[...a],l=a[t];return l.loopDelay=+e.target.value,n[t]=l,n})},contentEditable:!0})]})})]}),(0,r.jsx)("div",{style:{display:"none"},children:(0,r.jsx)(eM.A,{ref:e=>{s.current[`randomized-${t}`]=e},onChange:e=>{let a;null!=(a=k(e))&&(0,eB.Mz)(a,e=>{f(n=>{let l=[...n],i=n[t];if(null==i)return n;let s={...i};return null==s.randomizedSources&&(s.randomizedSources=[]),s.randomizedSources.push({src:e,filename:a.name}),l[t]=s,l})})},multiple:!1})}),(0,r.jsxs)("div",{className:Y()(e6.nM,e6._N),children:[(0,r.jsx)(x.$,{variant:"secondary",text:"Add Alternative",onClick:()=>s.current[`randomized-${t}`]?.activateUploadDialogue()}),(0,r.jsx)(x.$,{variant:"critical-secondary",text:"Remove Layer",onClick:()=>{f(t=>t.filter(t=>t!==e))}})]})]},t))]})]})]})},tn="Make sure you're only uploading text files!";function tl(e){let{profileEffect:t,onClick:a}=e,{deleteProfileEffect:n}=(0,eG.wu)();return(0,r.jsxs)(q.D,{className:e6.B0,onClick:a,children:[(0,r.jsx)("div",{className:e6.yV,style:{backgroundImage:`url(${t.effects?.[0]?.base64})`}}),(0,r.jsxs)("div",{className:e6.eL,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:t.name}),(0,r.jsx)(x.$,{variant:"critical-secondary",text:"Delete",onClick:e=>{e.preventDefault(),e.stopPropagation(),n(t.skuId)}})]})]})}function ti(){let{profileEffects:e,upsertProfileEffect:t,clearAll:a}=(0,eG.wu)(),[n,l]=o.useState(),i=o.useRef(null),{categories:s}=(0,eP.A)(),d=o.useMemo(()=>(0,eL.Wj)(s),[s]),[c,u]=o.useState(""),m=o.useMemo(()=>""===c?d:d.filter(e=>{let t=c.toLowerCase(),a=e.title?.toLowerCase()??"",n=e.description?.toLowerCase()??"";return a.includes(t)||n.includes(t)}),[c,d]),h=o.useCallback((e,a)=>{if(null==a||!e.type.startsWith("text/"))return(0,eU.Ni)(tn);let[n,l]=a.split(",");if(!n.includes("text/plain"))return(0,eU.Ni)(tn);let i=JSON.parse(atob(l));i.skuId=(0,ew.A)(),t(i),(0,eU.GF)("Profile Effect (maybe??) imported!")},[t]),g=o.useCallback(e=>{e.currentTarget?.files==null?(0,eU.Ni)("Error uploading file. Try again!"):(0,eU.KE)(e.currentTarget.files,h,eU.Ni)},[h]);return(0,r.jsxs)("div",{className:e6.zr,children:[null==n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:e6.nz,children:[(0,r.jsxs)("div",{className:Y()(e6.uW,e6.nM),children:[(0,r.jsx)(Q.D,{variant:"heading-xl/bold",children:"Custom Profile Effects"}),(0,r.jsx)(x.$,{variant:"critical-secondary",text:"Clear All",onClick:async()=>{await eO.A.confirm({title:"Clear All Profile Effects",body:"Are you sure you want to clear all profile effects? This cannot be undone.",confirmText:"Clear All",confirmVariant:"critical-primary"})&&(a(),(0,eU.GF)("All profile effects cleared!"))}})]}),(0,r.jsx)("div",{className:e6.Iv,children:Object.values(e).map(e=>(0,r.jsx)(tl,{profileEffect:e,onClick:()=>l(e)},e.skuId))})]}),(0,r.jsxs)("div",{className:Y()(e6.nM,e6._N,e6.uW),children:[(0,r.jsxs)("div",{className:e6.au,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-overlay-light",children:"Import Shared Config"}),(0,r.jsx)(eM.A,{ref:i,onChange:g,multiple:!1})]}),(0,r.jsx)(x.$,{variant:"primary",text:"Create New Effect",onClick:function(){t({skuId:(0,ew.A)(),name:"New Profile Effect",effects:[]})}})]}),(0,r.jsx)("hr",{}),(0,r.jsxs)("div",{className:e6.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-xl/bold",children:"All Effects"}),(0,r.jsx)(f.k,{value:c,onChange:e=>{u(e)}}),(0,r.jsx)("div",{className:e6.xm,children:m.map(e=>(0,r.jsx)(q.D,{className:e6.S5,style:{backgroundImage:`url(${e.thumbnailPreviewSrc})`},onClick:()=>{let t={[eB.qH.THUMBNAIL]:null!=e.thumbnailPreviewSrc&&""!==e.thumbnailPreviewSrc?{src:e.thumbnailPreviewSrc,name:"thumbnail.png",base64:""}:null,[eB.qH.STATIC]:null!=e.staticFrameSrc&&""!==e.staticFrameSrc?{src:e.staticFrameSrc,name:"static.png",base64:""}:null,[eB.qH.REDUCED_MOTION]:null!=e.reducedMotionSrc&&""!==e.reducedMotionSrc?{src:e.reducedMotionSrc,name:"reduced_motion.png",base64:""}:null};l({skuId:e.skuId,name:e.title,effects:e.effects,stillFrames:t,readonly:!0})},children:(0,r.jsx)("div",{className:e6.Hd,children:(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-overlay-light",children:e.title})})},e.skuId))})]})]}),null!=n&&(0,r.jsx)(ta,{profileEffect:n})]})}var ts=a(935399),tr=a(462887),to=a(289873),td=a(478016),tc=a(788026),tu=a(7584),tm=a(619499),th=a(207803),tx=a(84540),tp=a(836602),tg=a(999291),tv=a(903209),tj=a(841702),tf=a(892118),tb=a(744808),ty=a(965452),tE=a(626768),tC=a(464896);function tS(){let e=(0,ep.Ay)();return(0,r.jsxs)("div",{className:ty.z3,children:[(0,r.jsx)("img",{src:(0,tr.M)(e)?tE:tC,alt:""}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"No frames found on your account. You must be granted test profile frame entitlements to use this tool."})]})}function t_(){let e=(0,d.bG)([er.default],()=>er.default.getCurrentUser()),t=(0,tg.Ay)(e?.id);o.useEffect(()=>{e?.id!=null&&(0,tv.A)(e.id)},[e?.id]);let{purchases:a,isFetching:n}=(0,tj.b5)(),l=o.useMemo(()=>(0,eL.MG)(a,new Map),[a]),[{pendingProfileFrame:i},s]=(0,d.yK)([tp.A],()=>[tp.A.getPendingChanges(),tp.A.showNotice()]),c=void 0===i?t?.profileFrame:i,u=null!=c?a.get(c.skuId):void 0,m=(0,tf.s)(u?.items[0])?u.items[0]:void 0;return(0,ts.l0)(th.RE),(0,r.jsxs)("div",{className:ty.kL,children:[(0,r.jsxs)(Q.D,{variant:"heading-xl/bold",children:[(0,r.jsx)(tc.A,{emojiName:tu.Ay.getByName("frame_with_picture")?.surrogates,className:ty.Zg}),"Profile Frames!"]}),0===l.length&&n&&(0,r.jsx)(to.y,{}),0===l.length&&!n&&(0,r.jsx)(tS,{}),l.length>0&&(0,r.jsxs)("div",{className:ty.MK,children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Select a frame to preview. Save to apply the frame to your main profile."}),(0,r.jsxs)("ul",{className:ty.p_,children:[(0,r.jsx)("li",{children:(0,r.jsx)(x.$,{text:"None",variant:"secondary",fullWidth:!0,icon:null==c?td.U:void 0,disabled:null==c,onClick:()=>(0,tx.p)({profileFrame:null})})},"none"),l.map(e=>{let t=a.get(e.skuId);return null==t?null:(0,r.jsx)("li",{children:(0,r.jsx)(x.$,{text:t.name,variant:"secondary",fullWidth:!0,icon:c?.skuId===e.skuId?td.U:void 0,disabled:c?.skuId===e.skuId,onClick:()=>(0,tx.p)({profileFrame:e})})},e.skuId)})]}),s&&(0,r.jsx)(tm.A,{}),(0,r.jsxs)("div",{className:ty.VH,children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Preview:"}),(0,r.jsxs)("div",{className:ty.ME,children:[(0,r.jsx)("img",{src:e8.A,alt:""}),null!=m&&(0,r.jsx)(tb.A,{frame:m,isPreview:!0})]})]})]})]})}var tN=a(702841),tA=a(793574),tk=a(354328),tD=a(4227),tI=a(682301),tT=a(905276),tR=a(61750),tw=a(73153),tO=a(499454),tM=a(202541);let tL="devtools-collectibles-gift";async function tP(e){let{skuId:t,sender:a}=e,n={code:tL,user:{id:a.id},sku_id:t,uses:0,max_uses:1,expires_at:null,redeemed:!1,application_id:eu.FYj,gift_style:tM.o2.STANDARD_BOX};await tw.h.dispatch({type:"GIFT_CODE_RESOLVE_SUCCESS",giftCode:n}),(0,tO.h)({processedCode:tL})}var tU=a(80101);let tG=/^\d{17,20}$/,tB=e=>{let[t,a]=o.useState(0);return o.useLayoutEffect(()=>{let e=tD.A.getPurchase;return tD.A.getPurchase=e=>void 0,tD.A.emitChange(),a(1),()=>{tD.A.getPurchase=e,tD.A.emitChange()}},[]),(0,r.jsx)("div",{className:tU.Do,children:(0,r.jsx)(tT.A,{...e},t)})},tF=function(){let e=(0,tN.bG)([er.default],()=>er.default.getCurrentUser());(0,tj.b5)();let t=(0,tk.A)("shop_include_unpublished"),[a,n]=o.useState(""),l=a.trim(),i=tG.test(l),{product:s,category:d,state:c}=(0,tI.IK)(l,{shouldFetchProduct:i,seedCategoryStore:!0,includeUnpublished:t}),u="loading"!==c;return null==e?(0,r.jsx)(p.E,{variant:"text-md/normal",children:"No user found"}):(0,r.jsxs)("div",{className:tU.kL,children:[(0,r.jsxs)("div",{className:tU.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-lg/semibold",children:"Product Configuration"}),(0,r.jsxs)("div",{className:tU.qp,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",className:tU.NB,children:"Primary Product SKU ID"}),(0,r.jsx)(f.k,{value:a,onChange:n,placeholder:"Enter product SKU ID"}),!u&&i&&(0,r.jsx)(p.E,{variant:"text-sm/normal",className:tU.KQ,children:"Loading products..."}),u&&i&&null==s&&(0,r.jsx)(p.E,{variant:"text-sm/normal",className:tU.kc,children:"Product not found"}),null!=s&&(0,r.jsxs)(p.E,{variant:"text-sm/normal",className:tU.xT,children:["Found: ",s.name]})]})]}),(0,r.jsxs)("div",{className:tU.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-lg/semibold",children:"Product Preview"}),null!=s&&null!=d?(0,r.jsxs)("div",{className:tU.i1,children:[(0,r.jsx)(tB,{skuId:s.skuId}),(0,r.jsx)(x.$,{variant:"primary",onClick:function(){null!=s&&null!=e&&(0,tR.A)({product:s,analyticsLocations:[tA.A.COLLECTIBLES_SHOP_CARD]})},text:"Show Collectibles Collected Modal"}),(0,r.jsx)(x.$,{variant:"primary",onClick:function(){null!=s&&null!=e&&tP({skuId:s.skuId,sender:e})},text:"Show Gift Accept Modal"})]}):(0,r.jsx)("div",{className:tU.qf,children:(0,r.jsx)(p.E,{variant:"text-md/normal",className:tU.X2,children:"Enter a valid product SKU ID to see the preview"})})]})]})};var t$=a(646695);let tV={profile_effects:1,nameplates:2,profile_frames:3,product_preview:4};function tW(e){let{setTab:t}=e,n=(0,d.bG)([ee.A],()=>ee.A.getWindowOpen(eu.MLl.DEVTOOLS_POPOUT));return(0,r.jsxs)("div",{className:t$.Qs,children:[(0,r.jsx)(q.D,{onClick:()=>{t(1)},children:(0,r.jsx)("div",{className:Y()(t$.vK,t$.Dg),children:(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-overlay-light",children:"Profile Effects"})})}),(0,r.jsx)(q.D,{onClick:()=>{t(2)},children:(0,r.jsx)("div",{className:Y()(t$.vK,t$.st),children:(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-overlay-light",children:"Nameplates"})})}),(0,r.jsx)(q.D,{onClick:()=>{t(3)},children:(0,r.jsx)("div",{className:Y()(t$.vK,t$.BW),children:(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-overlay-light",children:"Profile Frames"})})}),(0,r.jsx)(q.D,{onClick:()=>{t(4)},children:(0,r.jsx)("div",{className:Y()(t$.vK,t$.IP),children:(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-overlay-light",children:"Products"})})}),!n&&(0,r.jsx)("div",{style:{marginTop:16},children:(0,r.jsx)(J.w,{type:"warning",title:"Not enough space?",message:"You can pop out the DevTools to see the full layout.",action:{text:"Popout DevTools",onClick:()=>Promise.all([a.e("868577"),a.e("253209")]).then(a.bind(a,902592)).then(e=>{let{openDevToolsPopout:t}=e;return t()})},role:"none"})})]})}let tz=function(){let[e,t]=o.useState(()=>{let e=Z.A.lastOpenSubTabId;return null!=e&&e in tV?tV[e]:0});return o.useEffect(()=>{null!=Z.A.lastOpenSubTabId&&(0,X.Jt)({lastOpenSubTabId:null})},[]),(0,r.jsxs)(g.Ip,{className:t$.iE,children:[(0,r.jsxs)("div",{className:t$.C$,children:[(0,r.jsx)(Q.D,{variant:"heading-xxl/medium",children:"Collectibles DevTools"}),0!==e&&(0,r.jsx)(x.$,{variant:"primary",onClick:()=>t(0),text:"Back"})]}),function(){switch(e){case 1:return(0,r.jsx)(ti,{});case 2:return(0,r.jsx)(e_,{});case 3:return(0,r.jsx)(t_,{});case 4:return(0,r.jsx)(tF,{});default:return(0,r.jsx)(tW,{setTab:t})}}()]})};var tH=a(681154),tK=a(306264),tY=a(506774),tq=a(331322),tJ=a(587895),tQ=a(429913),tX=a(475825),tZ=a(730441);function t0(e){let{columns:t,data:a,className:n,rowClassName:l,onClickRow:i,selectedRowKey:s,rowHeight:d=40}=e,c=o.useMemo(()=>t.map(e=>({renderHeader:()=>(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:e.key}),...e})),[t]),u=0===a.length?[1]:[a.length];return(0,r.jsx)("div",{className:tZ.CZ,children:(0,r.jsx)(tX.OZ,{className:n,innerClassName:tZ.tp,sections:u,sectionHeight:40,renderSection:e=>{let{section:t}=e,n=tZ.ZR;return(0,r.jsx)("div",{className:n,children:c.map(e=>{let n=e.cellClassName,l={width:`calc(${e.cellWidth??"1fr"} - 16px)`};return(0,r.jsx)("div",{className:n,style:l,children:e.renderHeader?.(e,a)},`dev-tools-th-${t}-${e.key}`)})},`dev-tools-header-${t}`)},rowHeight:d,renderRow:e=>{let{rowIndex:t}=e,n=a[t];if(null==n)return null;let o=n.key,u=Y()(tZ.jD,{[tZ.wD]:o===s,rowClassName:l});return(0,r.jsx)(q.D,{className:u,onClick:()=>i?.(n),children:c.map(e=>{let a=e.cellClassName,l={width:`calc(${e.cellWidth??"1fr"} - 16px)`,height:`calc(${d}px - 16px)`};return(0,r.jsx)("div",{className:a,style:l,children:e.render?.(n,void 0,t)},`dev-tools-td-${t}-${e.key}`)})},`dev-tools-tr-${t}`)}})})}var t1=a(409626),t2=a(692969),t3=a(760751),t6=a(403362),t8=a(435738),t5=a(99753),t4=a(402860),t7=a(574520),t9=a(808323),ae=a(583846),at=a(424994),aa=a(14570);function an(e){let{id:t}=e,a=(0,d.bG)([er.default],()=>er.default.getUser(t));return null==a?null:(0,r.jsx)(q.D,{className:aa._,onClick:function(){(0,t4.openUserProfileModal)({sourceAnalyticsLocations:[tA.A.DEV_TOOLS],userId:t})},children:(0,r.jsx)(p.E,{variant:"text-md/semibold",children:a.username})})}function al(){let e=(0,d.bG)([t5.A],()=>t5.A.getFeed(at.X1.GLOBAL_FEED)),t=(0,d.bG)([t5.A],()=>t5.A.getFilters()),a=(0,d.cf)([t7.A],()=>{let t={};for(let a of e?.entries??[])t[(0,t7.$)(a.content)]=t7.A.canRenderContent(a.content);return t},[e]),n=(0,d.bG)([t8.A],()=>t8.A.getImpressionCappedItemIds());if(null==t)return null;let l=e?.entries?.flatMap(e=>{let{content:l}=e;if(!(0,t9.l)(t,l))return[];let i=a[(0,t7.$)(l)];return(0,r.jsxs)("li",{className:aa.p,children:[(0,r.jsx)(an,{type:l.author_type,id:l.author_id}),!i&&(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Expired or no matching presence"}),(0,ae.I5)(l)&&(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Expired at ",l.expires_at]}),n.has(l.id)&&(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Impression capped"})]},l.id)});return(0,r.jsxs)("div",{children:[(0,r.jsx)(Q.D,{variant:"heading-md/semibold",children:"Selected Content"}),null!=l?(0,r.jsx)("ul",{children:l}):(0,r.jsx)("div",{children:"(none?)"})]})}var ai=a(576470),as=a(693879);function ar(){let e=(0,d.bG)([t5.A],()=>t5.A.getFeed(at.X1.GLOBAL_FEED)?.refresh_stale_inbox_after_ms!=null),{loading:t,nextFetchDate:a}=(0,d.cf)([t5.A],()=>t5.A.getFeedState(at.X1.GLOBAL_FEED)??{loading:!1}),n=(0,d.bG)([t5.A],()=>t5.A.getLastFeedFetchDate(at.X1.GLOBAL_FEED));return(0,r.jsxs)("div",{children:[t?(0,r.jsx)(p.E,{variant:"text-md/normal",children:"(fetching)"}):(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Next fetch: ",null!=a?(0,r.jsx)(ai.A,{deadline:a}):e?"(awaiting push)":"(unscheduled)"]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Last fetch:"," ",null!=n?(0,r.jsx)(as.z,{inline:!0,entry:{start:n.getTime()}}):"(never)"]})]})}var ao=a(225418);let ad=[{key:"type",cellClassName:Y()(ao.Hn,ao.T$),render(e){let{type:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/semibold",children:tH.ContentInventoryEntryType[t]})}},{key:"count",cellClassName:Y()(ao.Hn,ao.MX),render(e){let{entries:t}=e;return(0,r.jsx)("div",{children:(0,r.jsx)(p.E,{variant:"text-md/normal",children:t.length})})}},{key:"only?",cellClassName:ao.Hn,render(e){let{type:t}=e;return(0,r.jsx)(ac,{type:t})}}];function ac(e){let{type:t}=e,a=(0,d.bG)([t5.A],()=>t5.A.getFilters()),n=a?.types?.has(t)??!1;return(0,r.jsx)(m.d,{checked:n,onChange:function(){n?tw.h.dispatch({type:"CONTENT_INVENTORY_SET_FILTERS",filters:void 0}):tw.h.dispatch({type:"CONTENT_INVENTORY_SET_FILTERS",filters:{types:new Set([t])}})}})}function au(){var e;let t,a=(0,d.bG)([t5.A],()=>t5.A.getFeed(at.X1.GLOBAL_FEED)),n=(0,d.bG)([t5.A],()=>t5.A.getDebugImpressionCappingDisabled()),l=(0,d.bG)([t8.A],()=>t8.A.getDebugFastImpressionCappingEnabled()),i=(e=a?.entries?.map(e=>e.content),Object.keys(t=e0().groupBy(e,e=>e.content_type)).map(e=>{let a=t[e];return{key:`${e}`,type:a[0].content_type,entries:a}})),s=(0,d.bG)([t5.A],()=>t5.A.getFeedState(at.X1.GLOBAL_FEED)?.loading===!0),[c,u]=o.useState(""),m=(0,d.bG)([t3.A,tJ.A],()=>parseInt(c)>0?c:t3.A.searchGamesByName(c)[0]??tJ.A.getApplicationByName(c)?.id,[c]),h=(0,t2.A)({applicationId:m,location:"DevToolsContentInventory",source:t1.GameProfileSources.DevTools}),v=Object.entries(tY.w.get("GameProfileModal")??{}).filter(e=>{let[t,a]=e;return a}).map(e=>{let[t]=e;return t}),j=(0,tQ.A)(v).filter(t6.Vq);return(0,r.jsx)("div",{className:tZ.nd,children:(0,r.jsxs)(g.Ip,{className:ao.Qs,children:[(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:"Inventory"}),i.length>0&&(0,r.jsx)(t0,{columns:ad,data:i}),(0,r.jsx)(ar,{}),(0,r.jsx)(x.$,{variant:"primary",text:"Refresh Now",fullWidth:!0,onClick:function(){tw.h.dispatch({type:"CONTENT_INVENTORY_MANUAL_REFRESH",feedId:at.X1.GLOBAL_FEED,feature:tK.M.INBOX})},loading:s})]}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:"Impression Capping"}),(0,r.jsx)(x.$,{variant:"primary",text:"Clear Impressions",fullWidth:!0,onClick:function(){tw.h.dispatch({type:"CONTENT_INVENTORY_DEBUG_CLEAR_IMPRESSIONS"})}}),(0,r.jsx)(x.$,{variant:"primary",text:"Log Impressions",fullWidth:!0,onClick:function(){tw.h.dispatch({type:"CONTENT_INVENTORY_DEBUG_LOG_IMPRESSIONS"})}}),(0,r.jsx)(x.$,{variant:"primary",text:n?"Enable Impression Capping":"Disable Impression Capping",fullWidth:!0,onClick:function(){tw.h.dispatch({type:"CONTENT_INVENTORY_DEBUG_TOGGLE_IMPRESSION_CAPPING"})}}),(0,r.jsx)(x.$,{variant:"primary",text:l?"Disable Fast Impression Capping":"Enable Fast Impression Capping",fullWidth:!0,onClick:function(){tw.h.dispatch({type:"CONTENT_INVENTORY_DEBUG_TOGGLE_FAST_IMPRESSION_CAPPING"})}})]}),!1,(0,r.jsx)(al,{}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:"Game Profile"}),(0,r.jsx)(f.k,{placeholder:"App ID or full name",onChange:e=>(0===e.length||e.length>=18)&&u(e),onKeyDown:e=>{"Enter"===e.key&&(c===e.currentTarget.value?h?.(e):u(e.currentTarget.value))},error:c.length>0&&null==h?`No game profile for ${m??c+" - try by id"}.`:void 0,helperText:null!=h?"Game profile found":void 0}),(0,r.jsx)("ul",{children:j.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(am,{application:e})},`follow-game-${e.id}`))})]})]})})}function am(e){let{application:t}=e,a=(0,t2.A)({applicationId:t.id,location:"DevToolsContentInventory",source:t1.GameProfileSources.DevTools});return(0,r.jsx)(q.D,{onClick:a,children:(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:t.name})})}var ah=a(267355),ax=a(233741),ap=a(222506),ag=a(567249),av=a(188321),aj=a(25202);function af(e){let{label:t,value:a}=e;return(0,r.jsxs)(tq.B,{direction:"horizontal",gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-muted",children:t}),(0,r.jsx)(p.E,{variant:"text-md/medium",children:a})]})}function ab(e){return e?"yes":"no"}function ay(e){return e>0?`${e} fps`:"uncapped"}function aE(){let e=(0,d.cf)([av.A,ax.A,ap.A,ag.A],()=>({storedEnabledChoice:av.A.getStoredEnabledChoice(),hasRunningGame:av.A.hasRunningGame,isThrottling:av.A.isThrottling,frameRate:(0,aj.A)(),overlayFrameRate:(0,aj.j)(),isOverlayOpen:(0,ah.D)(),isDiscordFocused:av.A.isDiscordFocused,isDiscordHovered:av.A.isDiscordHovered})),t=e.isThrottling?null:!1===e.storedEnabledChoice?"Turned off in Settings > System > Game Mode.":e.hasRunningGame?e.isDiscordFocused?"Relaxed: levers lift while Discord is focused.":e.isDiscordHovered?"Relaxed: levers lift while the cursor is over Discord.":"The 2026-08-game-mode experiment is off for this account.":"No non-launcher game is running.";return(0,r.jsxs)(tq.B,{gap:32,padding:12,fullWidth:!1,children:[(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:"Status"}),(0,r.jsx)(af,{label:"Throttling",value:ab(e.isThrottling)}),(0,r.jsx)(af,{label:"Running game detected",value:ab(e.hasRunningGame)}),(0,r.jsx)(af,{label:"Discord focused",value:ab(e.isDiscordFocused)}),(0,r.jsx)(af,{label:"Discord hovered",value:ab(e.isDiscordHovered)}),null!=t&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:t}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Set a debug running game from the Detected Games tab to simulate a game."})]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:"Applied Levers"}),(0,r.jsx)(af,{label:"Frame rate cap",value:ay(e.frameRate)}),(0,r.jsx)(af,{label:"Overlay frame rate cap",value:ay(e.overlayFrameRate)}),(0,r.jsx)(af,{label:"Reduce motion",value:ab(e.isThrottling)}),(0,r.jsx)(af,{label:"Pause animated media",value:ab(e.isThrottling)}),(0,r.jsx)(af,{label:"Overlay open",value:ab(e.isOverlayOpen)}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Levers key off Throttling, except the frame rate caps: the main cap also lifts while the overlay is open, and the overlay cap holds whenever game mode is active, ignoring focus and hover. Values live in GameModeConstants.tsx."})]})]})}var aC=a(890497),aS=a(769015),a_=a(311043),aN=a(454908),aA=a(282435);function ak(e){return aA.jN.get(e)??0}function aD(e){let{gameId:t}=e,{data:a,isLoading:n}=(0,aN.I)(t),l=(0,d.bG)([a_.A],()=>a_.A.hasNoData(t),[t]);return n||null==a&&!l?(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Loading\u2026"}):null==a?(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:["No game found for ID ",t]}):(0,r.jsxs)(tq.B,{direction:"horizontal",gap:8,align:"center",children:[(0,r.jsx)(aS.A,{game:a,size:aS.M.SMALL}),(0,r.jsxs)(tq.B,{gap:0,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:a.name}),(0,r.jsx)(p.E,{variant:"text-xxs/normal",color:"text-muted",children:a.id})]})]})}function aI(){let[e,t]=o.useState(null),[a,n]=o.useState(""),l=(0,d.bG)([t3.A],()=>t3.A.games),i=o.useMemo(()=>l.filter(e=>null!=e.name&&""!==e.name).map(e=>({id:e.id,value:e.id,label:e.name})).sort((e,t)=>ak(t.value)-ak(e.value)),[l]),s=o.useMemo(()=>({baseSort:(e,t)=>ak(t.item.value)-ak(e.item.value),keys:["label"]}),[]),c=o.useCallback(e=>{t(e),null!=e&&n("")},[]),u=o.useCallback(e=>{n(e),e.trim().length>0&&t(null)},[]),m=a.trim(),h=m.length>0?m:e??void 0,g=(0,t2.A)({gameId:h,location:"DevToolsGameProfile",source:t1.GameProfileSources.DevTools});return(0,r.jsx)("div",{className:tZ.nd,children:(0,r.jsxs)(tq.B,{gap:32,padding:12,fullWidth:!1,children:[(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:"Game Profile"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Search for a game by name, or paste a game ID, then open its profile."})]}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(Q.D,{variant:"heading-sm/bold",children:"Search"}),(0,r.jsx)(aC.Z,{label:"Search games",hideLabel:!0,placeholder:"Search for a game\u2026",options:i,value:m.length>0?void 0:e??void 0,onSelectionChange:c,selectionMode:"single",clearable:!0,matchSorterOptions:s})]}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(Q.D,{variant:"heading-sm/bold",children:"Game ID"}),(0,r.jsx)(f.k,{label:"Game ID",hideLabel:!0,placeholder:"Paste a game ID",value:a,onChange:u}),m.length>0&&(0,r.jsx)(aD,{gameId:m})]}),(0,r.jsx)(x.$,{variant:"primary",text:"Open Game Profile",fullWidth:!0,disabled:null==g,onClick:g??void 0})]})})}var aT=a(923477),aR=a(750672);function aw(){let e=(0,aT.O)(e=>e.requestHighlightFirstCard);return(0,r.jsxs)("div",{className:Y()(tZ.nd,aR.k),children:[(0,r.jsx)(Q.D,{variant:"heading-lg/normal",children:"Game Server Hosting"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:'Replays the post-purchase scroll + highlight on the first card in the "Your game servers" list, exactly like clicking "View game server" after checkout. Open the Game Servers shop tab (/shop?tab=game-servers) with at least one owned server first.'}),(0,r.jsx)(x.$,{variant:"secondary",text:"Run post-purchase highlight (first card)",onClick:e})]})}var aO=a(554146),aM=a(594061),aL=a(617617),aP=a(355898),aU=a(644103),aG=a(574560),aB=a(434265);let aF=[aO.M.GAME_ACCOUNT_LINK_RECURRING_UPSELL,aO.M.APP_WIDGET_V2_PROFILE_UPSELL_COACHMARK,aO.M.APP_WIDGET_V2_PROFILE_UPSELL_SUGGESTED].map(e=>({id:String(e),label:aO.M[e],value:e})),a$={"global-cooldown":"global cooldown","per-game-cooldown":"per-game cooldown",disabled:"disabled"};function aV(){let[e,t]=o.useState("dismissals"),[a,n]=o.useState(aO.M.GAME_ACCOUNT_LINK_RECURRING_UPSELL),l=(0,d.bG)([aL.A],()=>aL.A.settings.userContent?.recurringDismissibleContentStates[a]??null),i=(0,d.bG)([aG.A],()=>aG.A.getAllGameUpsellDismissals(a)),s=o.useMemo(()=>Object.keys(i??{}),[i]),c=(0,tQ.A)(s),[u,m]=o.useState(""),[h,g]=o.useState([]);o.useEffect(()=>(0,aU.Y)(e=>{g(t=>[e,...t].slice(0,100))}),[]);let v=o.useMemo(()=>{let e=new Set;for(let t of h)for(let a of t.applicationIds)e.add(a);return[...e]},[h]),y=(0,tQ.A)(v),E=o.useMemo(()=>Object.fromEntries(v.map((e,t)=>[e,y[t]])),[v,y]),C=l?.lastDismissedAtMs!=null&&"0"!==l.lastDismissedAtMs?new Date(Number(l.lastDismissedAtMs)).toLocaleString():"Never";return(0,r.jsxs)("div",{className:aB.nd,children:[(0,r.jsxs)("div",{className:aB.$H,children:[(0,r.jsx)(q.D,{className:Y()(aB.V3,{[aB.u7]:"dismissals"===e}),onClick:()=>t("dismissals"),children:"Dismissals"}),(0,r.jsxs)(q.D,{className:Y()(aB.V3,{[aB.u7]:"call-log"===e}),onClick:()=>t("call-log"),children:["Call Log ",h.length>0?`(${h.length})`:""]})]}),"dismissals"===e?(0,r.jsxs)("div",{className:aB.Lj,children:[(0,r.jsx)("div",{className:aB.uW,children:(0,r.jsx)(j.l,{label:"Dismissible Content",value:a,onSelectionChange:e=>n(e),options:aF,selectionMode:"single",fullWidth:!0})}),(0,r.jsxs)("div",{className:aB.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:"Global DCF State"}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:["Last dismissed: ",C]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:["Times dismissed: ",l?.numTimesDismissed??0]}),(0,r.jsx)(x.$,{variant:"secondary",text:"Reset Global DCF State",onClick:()=>(0,aM._N)(a)})]}),(0,r.jsxs)("div",{className:aB.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:"Mark as Dismissed"}),(0,r.jsx)(f.k,{label:"Game ID",value:u,onChange:e=>m(e),placeholder:"Enter Game ID"}),(0,r.jsx)(x.$,{variant:"secondary",text:"Mark as Dismissed",disabled:""===u.trim(),onClick:()=>{(0,aP.M)([u.trim()],a),m("")}})]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)("div",{className:Y()(aB.uW,aB.LY),children:[(0,r.jsxs)(Q.D,{variant:"heading-md/bold",children:["Per-Game Dismissals (",s.length,")"]}),0===s.length?(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"No dismissal data for this content type."}):(0,r.jsxs)(r.Fragment,{children:[s.map((e,t)=>{let n=c[t],l=i?.[e];if(null==l)return null;let s=n?.getIconURL(32);return(0,r.jsxs)("div",{className:aB.Nr,children:[(0,r.jsxs)("div",{className:aB.MY,children:[null!=s&&(0,r.jsx)("img",{src:s,alt:"",className:aB.Z2}),(0,r.jsxs)("div",{className:aB.qi,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:n?.name??"Unknown App"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:e})]}),(0,r.jsx)(x.$,{variant:"secondary",text:"Clear",onClick:()=>(0,aP.e)(e,a)})]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Last dismissed: ",new Date(l.dismissedAt).toLocaleString()]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Times dismissed: ",l.timesDismissed]})]},e)}),(0,r.jsx)(x.$,{variant:"critical-primary",text:"Clear All",onClick:()=>{for(let e of s)(0,aP.e)(e,a)}})]})]})]}):(0,r.jsx)("div",{className:aB.Lj,children:(0,r.jsxs)("div",{className:aB.uW,children:[(0,r.jsxs)("div",{className:aB.aq,children:[(0,r.jsxs)(Q.D,{variant:"heading-md/bold",children:["Hook Calls (",h.length,")"]}),(0,r.jsx)(x.$,{variant:"secondary",text:"Clear",onClick:()=>g([])})]}),0===h.length?(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"No calls recorded yet. Hook calls to useShouldShowGameUpsellForMultipleGames will appear here."}):h.map((e,t)=>(0,r.jsxs)("div",{className:aB.Nr,children:[(0,r.jsxs)("div",{className:aB.O9,children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:new Date(e.timestamp).toLocaleTimeString()}),e.disabled&&(0,r.jsx)("span",{className:aB.t7,children:"(disabled)"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:aO.M[e.dismissibleContent]})]}),0===e.applicationIds.length?(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:"No apps"}):e.applicationIds.map(t=>{let a=E[t],n=a?.getIconURL(20),l=e.eligibleToShow.includes(t),i=e.excludedReasons[t];return(0,r.jsxs)("div",{className:aB.Ss,children:[null!=n&&(0,r.jsx)("img",{src:n,alt:"",className:aB.rb}),(0,r.jsx)("span",{className:aB.Jd,children:a?.name??t}),l?(0,r.jsx)("span",{className:aB.OK,children:"eligible"}):null!=i?(0,r.jsx)("span",{className:aB.t7,children:a$[i]}):null]},t)})]},t))]})})]})}var aW=a(696986),az=a(47167),aH=a(734057),aK=a(994500),aY=a(310031),aq=a(394953),aJ=a(618216);let aQ=[{key:"channelName",cellClassName:Y()(aJ.Hn,aJ.HA),render(e){let{channelName:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/normal",children:t})}},{key:"channelId",cellClassName:Y()(aJ.Hn,aJ.Zm),render(e){let{channelId:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/normal",children:t})}}],aX=[{key:"channelName",cellClassName:Y()(aJ.Hn,aJ.HA),render(e){let{channelName:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/normal",children:t})}},{key:"loadState",cellClassName:Y()(aJ.Hn,aJ.C7),render(e){let{loadState:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/normal",children:t})}},{key:"channelId",cellClassName:Y()(aJ.Hn,aJ.Zm),render(e){let{channelId:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/normal",children:t})}}];function aZ(){let{unreadRecentMentionsCount:e,unreadChannelIds:t}=(0,aq.U4)(),{isLoading:a,hasLoadedEver:n,hasPreloaded:l,hasMoreToLoad:i,isLoadingComplete:s}=(0,tN.cf)([aY.A],()=>({isLoading:aY.A.isLoading,hasLoadedEver:aY.A.hasLoadedEver,hasPreloaded:aY.A.hasPreloaded,hasMoreToLoad:aY.A.hasMoreToLoad,isLoadingComplete:aY.A.isLoadingComplete})),o=(0,tN.bG)([aY.A],()=>aY.A.currentRequestAnalyticsPayload),d=(0,tN.cf)([aY.A],()=>aY.A.getChannelInfoMap()),c=(0,tN.cf)([aH.A],()=>{let e={};return Object.entries(d).forEach(t=>{let[a]=t,n=aH.A.getChannel(a);e[a]=n??null}),e}),u=(0,tN.cf)([aH.A],()=>t.reduce((e,t)=>{let a=aH.A.getChannel(t);return e[t]=a??null,e},{})),h=(0,tN.bG)([aY.A],()=>aY.A.getInboxMessages()),x=(0,tN.bG)([aY.A],()=>aY.A.getDevOverrides().navOnClick);return(0,r.jsx)("div",{className:tZ.nd,children:(0,r.jsxs)(g.Ip,{className:aJ.Qs,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(Q.D,{variant:"heading-lg/semibold",children:"Inbox"}),(0,r.jsxs)("div",{children:["Inbox Message Count: ",h.length]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Q.D,{variant:"heading-lg/semibold",children:"Dev Overrides"}),(0,r.jsx)("div",{style:{display:"flex",alignItems:"center",marginTop:8},children:(0,r.jsx)(m.d,{label:"Nav On Click",checked:!!x,onChange:e=>{tw.h.dispatch({type:"NOTIFICATIONS_INBOX_SET_DEV_OVERRIDES",navOnClick:e})}})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Q.D,{variant:"heading-lg/semibold",children:"Unreads and Badging"}),(0,r.jsx)(aW.h,{size:8}),(0,r.jsxs)("div",{children:["Unread Recent Mentions Count: ",e]}),(0,r.jsxs)("div",{children:["Unread Channel Count: ",t.length]}),(0,r.jsx)(t0,{columns:aQ,data:Object.entries(u).map(e=>{let[t,a]=e;return{key:t,channelId:t,channelName:null!=a?(0,az.m1)(a,er.default,aK.A):""}})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Q.D,{variant:"heading-lg/semibold",children:"Store State"}),(0,r.jsxs)("div",{children:["Is Loading: ",a?"\u2705":"\u274C"]}),(0,r.jsxs)("div",{children:["Has Preloaded: ",l?"\u2705":"\u274C"]}),(0,r.jsxs)("div",{children:["Has Loaded Ever: ",n?"\u2705":"\u274C"]}),(0,r.jsxs)("div",{children:["Has More To Load: ",i?"\u2705":"\u274C"]}),(0,r.jsxs)("div",{children:["Is Loading Complete: ",s?"\u2705":"\u274C"]}),(0,r.jsxs)("div",{children:["Last Loading Trigger: ",o?.loadingTrigger]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Q.D,{variant:"heading-lg/semibold",children:"Channel Info Map"}),(0,r.jsxs)("div",{children:["Total Channels: ",Object.keys(d).length]}),(0,r.jsx)(t0,{columns:aX,data:Object.entries(d).map(e=>{let t,[a,n]=e;return{key:a,channelId:a,channelName:null!=(t=c[a])?(0,az.m1)(t,er.default,aK.A):"",loadState:n.loadState}})})]})]})})}var a0=a(976860),a1=a(427495),a2=a(786800);let a3=function(){return(0,r.jsxs)("div",{className:a2.k,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-feedback-info",style:{marginBottom:"8px"},children:"Click the button below to clear your Minor Reward Capping History."}),(0,r.jsx)(x.$,{onClick:()=>{(0,a1.Ov)(),(0,a0.pX)(eu.BVt.QUEST_HOME)},text:"Clear History"}),(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-feedback-info",children:"Your may have to refresh your client after being redirected to the Quest Home in order to see these changes."})]})};var a6=a(271866),a8=a(868511),a5=a(147964),a4=a(713913),a7=a(13981),a9=a(760716),ne=a(115093),nt=a(970628);let na=window.GLOBAL_ENV.RELEASE_CHANNEL===ne.B.STAGING?"1438571444891025408":"1346069614634864772";function nn(){let e=(0,a9.i)(e=>e.overrideApplicationId),t=(0,a9.i)(e=>e.setOverrideApplicationId),a=null!=e,n=(0,a9.i)(e=>e.overrideNitroEligibilityForSocialLayerStorefront),l=(0,a9.i)(e=>e.setOverrideNitroEligibilityForSocialLayerStorefront),i=(0,a9.i)(e=>e.isNitroEligibleForSocialLayerStorefront),s=(0,a9.i)(e=>e.setIsNitroEligibleForSocialLayerStorefront),[c,u]=o.useState(na),[h,p]=o.useState(eu.FYj),g=o.useCallback(e=>{e?t(c):t(null)},[c,t]),v=o.useCallback(e=>{u(e),a&&t(e)},[a,t]),j=(0,a9.i)(e=>e.showSelfActivity),b=(0,a9.i)(e=>e.setShowSelfActivity),y=(0,a9.i)(e=>e.recommendationApplicationIds),E=(0,a9.i)(e=>e.setRecommendationApplicationIds),C=o.useCallback(e=>{e?E(h):E(null)},[h,E]),S=(0,d.bG)([a5.A],()=>null!=a5.A.testModeApplicationId),_=o.useCallback(e=>{e?(0,eK.openModal)(e=>(0,r.jsx)(a8.A,{...e})):a6.cL()},[]),N=(0,t2.A)({location:"DevToolsSlayerStorefrontPanel",applicationId:c,source:t1.GameProfileSources.Embed,trackEntryPointImpression:!0}),A=o.useCallback(e=>{N?.(e)},[N]),k=o.useCallback(()=>{(0,a0.pX)(eu.BVt.COLLECTIBLES_SHOP_GAME_SHOP(c))},[c]);return(0,r.jsx)("div",{className:Y()(tZ.nd,nt.n),children:(0,r.jsxs)("div",{className:nt.k,children:[(0,r.jsx)(f.k,{label:"Application ID",value:c,onChange:v}),(0,r.jsx)(Q.D,{variant:"heading-lg/normal",children:"Activity Override"}),(0,r.jsx)(m.d,{label:"Override activity application ID",checked:a,onChange:g}),(0,r.jsx)(m.d,{label:"Show own voice activity (bypass self check)",checked:j,onChange:b}),(0,r.jsx)(m.d,{label:"Enable application test mode",checked:S,onChange:_}),(0,r.jsx)(x.$,{text:"Open Game Profile Modal",onClick:A}),(0,r.jsx)(x.$,{text:"Navigate to App Game Shop",onClick:k}),(0,r.jsx)(Q.D,{variant:"heading-lg/normal",children:"Game Exit Promo"}),Object.values(a4.U3).map(e=>(0,r.jsx)(x.$,{text:"Preview",onClick:()=>{(0,a7.ik)({type:"replaced"}),(0,a7.sC)(e.id,{isPreview:!0})}},e.id)),(0,r.jsx)(Q.D,{variant:"heading-lg/normal",children:"Wishlists"}),(0,r.jsx)(f.k,{label:"Recommendation application IDs",value:h,onChange:p,disabled:null==y}),(0,r.jsx)(m.d,{label:"Enable recommendation application IDs override",checked:null!=y,onChange:C}),(0,r.jsx)(m.d,{label:"Override nitro eligibility for social layer storefront",checked:n,onChange:l}),(0,r.jsx)(m.d,{label:"Is nitro eligible for social layer storefront",checked:i,onChange:s})]})})}var nl=a(540999),ni=a(723702),ns=a(865116);a(79455),a(772958);var nr=a(58736);a(558179),a(21574);var no=a(231545),nd=a(761929),nc=a(180808);function nu(e){let{resizableNode:t,minHeight:a,onResize:n}=e,l=(0,nd.A)({minDimension:a,resizableDomNodeRef:t,onElementResize:n,orientation:nd.R.VERTICAL_TOP,usePointerEvents:!0});return(0,r.jsx)("div",{onPointerDown:l,className:nc.Di})}function nm(e){let{children:t,className:a,initialHeight:n,minHeight:l}=e,i=o.useRef(null),[s,d]=o.useState(n);return(0,r.jsxs)("div",{ref:i,className:nc.kL,style:{minHeight:l,height:s},children:[(0,r.jsx)(nu,{resizableNode:i,minHeight:l,onResize:d}),(0,r.jsx)("div",{className:Y()(nc.KZ,a),children:t})]})}var nh=a(231643),nx=a(362688);a(140346),nx.fu.NONE,nx.fu.NONE;var np=a(825484),ng=a(688810),nv=a(975460),nj=a(206828),nf=a(487431),nb=a(712440),ny=a(733110),nE=a(134861),nC=a(71393),nS=a(967198),n_=a(942370),nN=a(105292),nA=a(673051),nk=a(681135);function nD(){var e;let t,a,n=o.useRef(null),{analyticsLocations:l}=(0,ng.Ay)(tA.A.DEV_TOOLS),[i,s]=o.useState(""),c=(0,d.bG)([nS.A],()=>nS.A.getGuildId()),u=(0,d.bG)([nC.A],()=>nC.A.getGuild(c)),m=u?.gameApplicationIds??[],h=(0,tQ.A)(m).filter(e=>null!=e),g=(0,d.bG)([E.Ay,_.A],()=>(0,C.A)(E.Ay,_.A)),v=(0,tQ.h)(i),j=(0,nv.g)(v),y=(0,d.yK)([tJ.A],()=>v?.linkedGames?.map(e=>tJ.A.getApplication(e.id)).filter(e=>null!=e)??[]),S=(0,nj.RD)(v,{allowedFlows:[n_._.RPC],debug:!0}),N=(0,nj.RD)(v,{allowedFlows:[n_._.WEB],debug:!0}),A=(0,d.bG)([nE.A],()=>null!=j&&nE.A.isConnected(j.id)),k=(0,nj.RD)(v,{debug:!0}),{canDeauthorize:D,deauthorize:I}=(e=k.connectionApp?.id,t=(0,d.bG)([ny.default],()=>ny.default.getNewestTokenForApplication(e)),a=o.useCallback(()=>{null!=t&&nb.A.delete(t.id)},[t]),{canDeauthorize:null!=t,deauthorize:a});return(0,r.jsxs)("div",{ref:n,className:Y()(tZ.nd,nk.nd),children:[(0,r.jsxs)("div",{className:nk.kL,children:[(0,r.jsx)(Q.D,{variant:"heading-lg/normal",children:"Application"}),(0,r.jsx)(f.k,{label:"Application ID",value:i,onChange:s}),null!=g&&null!=g.id?(0,r.jsx)(x.$,{onClick:()=>s(g.id),variant:"primary",text:`Use detected game: ${g.name} (${g.id})`}):null,null!=u?h.length>0?(0,r.jsxs)("div",{className:nk.Mc,children:[(0,r.jsxs)(p.E,{variant:"text-sm/semibold",color:"text-subtle",children:[u.name," (",u.id,") \xb7 Official games"]}),(0,r.jsx)(np.e,{size:"sm",wrap:!0,children:h.map(e=>(0,r.jsx)(x.$,{onClick:()=>s(e.id),variant:i===e.id?"primary":"secondary",text:`${e.name} (${e.id})`},e.id))})]}):(0,r.jsxs)(p.E,{variant:"text-md/normal",color:"text-subtle",children:[u.name," (",u.id,") \xb7 No official games"]}):(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-subtle",children:"No guild selected"}),(0,r.jsx)(b.c,{}),(0,r.jsxs)("div",{className:nk.J3,children:[(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Application Name: ",null!=v?v.name:"N/A"]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Linked Games:"," ",y.length>0?y.map(e=>(0,nv.t)(v)?.id===e.id?`${e.name}*`:e.name).join(", "):"N/A"]})]})]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)("div",{className:nk.kL,children:[(0,r.jsx)(Q.D,{variant:"heading-lg/normal",children:"Authorization status"}),(0,r.jsx)(nf.VT,{flow:n_._.RPC,showGlobalFlowToggle:!0,overallStatus:S.debug.isSubscribedToAuthorizeRequest?nf.nW.OVERALL_GOOD:A?nf.nW.WARN:nf.nW.OVERALL_BAD,name:nN.intl.string(nA.default.AGLx00),steps:[{status:A?nf.nW.GOOD:nf.nW.BAD,text:nN.intl.string(nA.default.kxF9br),description:A?null:nN.intl.string(nA.default.PFxxJa),learnMoreLink:A?null:"https://discord.com/developers/docs/discord-social-sdk/how-to/debug-log"},{status:S.debug.isSubscribedToAuthorizeRequest?nf.nW.GOOD:A?nf.nW.WARN:nf.nW.BAD,text:nN.intl.string(nA.default.S94dzs),description:S.debug.isSubscribedToAuthorizeRequest||!A?null:nN.intl.string(nA.default.aTULMB),learnMoreLink:S.debug.isSubscribedToAuthorizeRequest||!A?null:"https://discord.com/developers/docs/discord-social-sdk/how-to/debug-log"}],isChosen:k.chosenFlow===n_._.RPC}),(0,r.jsx)(nf.VT,{flow:n_._.WEB,showGlobalFlowToggle:!0,overallStatus:N.debug.hasConnectionEntrypointUrl?nf.nW.OVERALL_GOOD:nf.nW.OVERALL_BAD,name:nN.intl.string(nA.default.K3ObrU),steps:[{status:N.debug.hasConnectionEntrypointUrl?nf.nW.GOOD:nf.nW.BAD,text:nN.intl.string(nA.default["8a7IrV"]),description:N.debug.hasConnectionEntrypointUrl?nN.intl.formatToPlainString(nA.default["9iLeL2"],{url:N.connectionApp?.connectionEntrypointUrl}):null}],isChosen:k.chosenFlow===n_._.WEB}),(0,r.jsx)(nf.Sy,{status:k.hasAlreadyLinked?nf.nW.OVERALL_GOOD:nf.nW.OVERALL_BAD,text:nN.intl.string(nN.t["Vu/zmQ"])}),0===k.debug.validFlows.length&&(0,r.jsx)(p.E,{style:{minWidth:0,overflow:"hidden"},variant:"text-md/medium",children:nN.intl.string(nA.default.eg0mNa)}),(0,r.jsx)(x.$,{disabled:!k.canStartAuthorization,fullWidth:!0,onClick:()=>k.startAuthorization({analyticsLocations:l}),variant:"primary",text:"Start Authorization"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:"This will start whichever authorization flow is available. RPC authorization takes precedence over web."}),(0,r.jsxs)(np.e,{fullWidth:!0,children:[(0,r.jsx)(x.$,{disabled:!S.canStartAuthorization,onClick:()=>S.startAuthorization({analyticsLocations:l}),variant:"secondary",text:"Start In-App Authorization"}),(0,r.jsx)(x.$,{disabled:!N.canStartAuthorization,onClick:()=>N.startAuthorization({analyticsLocations:l}),variant:"secondary",text:"Start Web Authorization"})]}),(0,r.jsx)(x.$,{disabled:!D,fullWidth:!0,onClick:I,variant:"critical-primary",text:"Deauthorize"})]}),v?.applicationAccountLinkBenefitConfig!=null&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.c,{}),(0,r.jsxs)("div",{className:nk.kL,children:[(0,r.jsx)(Q.D,{variant:"heading-lg/normal",children:"Benefit configuration"}),(0,r.jsx)("div",{className:nk.Nr,children:(0,r.jsxs)("div",{className:nk.Tc,children:[null!=v.applicationAccountLinkBenefitConfig.reward_image&&(0,r.jsx)("img",{src:v.applicationAccountLinkBenefitConfig.reward_image,alt:"Reward",className:nk.L8}),(0,r.jsx)(p.E,{variant:"text-md/semibold",children:v.applicationAccountLinkBenefitConfig.reward_name??"Unnamed Reward"})]})})]})]})]})}var nI=a(427358),nT=a(584454),nR=a(175452);function nw(){let e=(0,d.bG)([nI.A],()=>nI.A.getDevToolsOverride()),t=(0,d.bG)([er.default],()=>null!=e?er.default.getUser(e.otherUserId)??null:null,[e]),[a,n]=o.useState(t?.username??""),[l,i]=o.useState(e?.communicationProbability??1),[s,c]=o.useState(e?.vcProbability??1),u=a.trim(),m=(0,d.bG)([er.default],()=>u.length>0?er.default.findByTag(u)??null:null,[u]),h=u.length>0&&null==m,g=null!=m&&null!=l&&null!=s;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(tq.B,{gap:8,padding:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:"User Affinity Override"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:"Injects a temporary affinity entry for the given user, resets on reload or logout."}),(0,r.jsx)(f.k,{label:"Target username",value:a,onChange:n,placeholder:"pomelo_name",error:h?"No local user matches that username.":void 0}),(0,r.jsxs)(tq.B,{gap:8,direction:"horizontal",align:"end",children:[(0,r.jsx)(nT.Q,{label:"Comm. affinity",mode:"decimal",min:0,max:1,step:.1,value:l,onChange:i}),(0,r.jsx)(nT.Q,{label:"Voice affinity",mode:"decimal",min:0,max:1,step:.1,value:s,onChange:c}),(0,r.jsxs)(np.e,{children:[(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:null==e?"Apply":"Update",onClick:function(){g&&null!=m&&null!=l&&null!=s&&(0,nR.C)({userId:m.id,communicationProbability:l,vcProbability:s})},disabled:!g}),(0,r.jsx)(x.$,{variant:"critical-secondary",size:"sm",text:"Clear",onClick:function(){(0,nR.C)(null),n(""),i(1),c(1)},disabled:null==e})]})]}),null!=e&&(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-feedback-positive",children:["Active: user ",t?.username??"unknown"]})]}),(0,r.jsx)(b.c,{})]})}var nO=a(541660);function nM(e){let{title:t,sortKey:a,activeSortKey:n,sortDir:l,onClick:i}=e,s=n===a?"desc"===l?" \u25BC":" \u25B2":"";return(0,r.jsx)(q.D,{className:nO.K8,onClick:()=>i(a),children:(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:t+s})})}function nL(){let[e,t]=o.useState("affinity"),[a,n]=o.useState("desc"),l=o.useCallback(a=>{e===a?n(e=>"asc"===e?"desc":"asc"):(t(a),n("username"===a?"asc":"desc"))},[e]),i=(0,d.yK)([nI.A,er.default],()=>nI.A.getUserAffinities().map(e=>{let{otherUserId:t,communicationProbability:a,vcProbability:n,isFriend:l}=e;return{user:er.default.getUser(t),affinity:a,vcProbability:n,isFriend:l,key:t}})),s=o.useMemo(()=>[...i].sort((t,n)=>{let l;if("username"===e){let e=t.user?.username??t.key,a=n.user?.username??n.key;l=e.localeCompare(a)}else l=t[e]-n[e];return"desc"===a?-l:l}),[i,e,a]),c=o.useMemo(()=>[{key:"user",cellClassName:nO.iL,renderHeader:()=>(0,r.jsx)(nM,{title:"USER",sortKey:"username",activeSortKey:e,sortDir:a,onClick:l}),render(e){let{user:t,key:a}=e;return t?.username??a}},{key:"affinity",renderHeader:()=>(0,r.jsx)(nM,{title:"COMMUNICATION AFFINITY",sortKey:"affinity",activeSortKey:e,sortDir:a,onClick:l}),cellClassName:nO.nz,render(e){let{affinity:t}=e;return t.toFixed(5)}},{key:"vcProbability",renderHeader:()=>(0,r.jsx)(nM,{title:"VOICE AFFINITY",sortKey:"vcProbability",activeSortKey:e,sortDir:a,onClick:l}),cellClassName:nO.nz,render(e){let{vcProbability:t}=e;return t.toFixed(5)}},{key:"isFriend",renderHeader:()=>(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"IS FRIEND"}),cellClassName:nO.nz,render(e){let{isFriend:t}=e;return t.toString()}}],[e,a,l]);return(0,r.jsxs)("div",{className:nO.nd,children:[(0,r.jsx)(nw,{}),i.length>0&&(0,r.jsx)(t0,{columns:c,rowClassName:nO.nM,data:s})]})}var nP=a(536637),nU=a.n(nP),nG=a(862482),nB=a(624479),nF=a(555704),n$=a(285796),nV=a(241326),nW=a(683438),nz=a(297413),nH=a(379078),nK=a(704554),nY=a(957565),nq=a(58703),nJ=a(80703),nQ=a(280450);let nX=0,nZ=[],n0=0,n1=[],n2=!1;class n3 extends d.Ay.Store{static displayName="AnalyticsLogStore";initialize(){this.waitFor(nQ.default,nl.A)}get loggedEvents(){return nZ}get loggedEventsVersion(){return n0}get loggedTriggers(){return n1}get trackTriggers(){return n2}}let n6=new n3(tw.h,{TRACK:function(e){let{event:t,properties:a,fingerprint:n}=e;nl.A.isDeveloper&&(nZ.push({key:(nX++).toString(),event:t,properties:a,fingerprint:null!=n?(0,nJ.d)(n):nQ.default.getId(),timestamp:new Date}),n0++,nZ.length>500&&(nZ=nZ.slice(-Math.floor(250))))},TRACK_TRIGGER:function(e){let{experimentId:t,descriptor:a,exposureType:n,excluded:l,location:i,previouslyTracked:s}=e;!nl.A.isDeveloper||n2&&(n1=[...n1,{key:(0,ew.A)(),experimentId:t,descriptor:a,exposureType:n,excluded:l,location:i,previouslyTracked:s,timestamp:new Date}]).length>500&&n1.shift()},SET_TRACK_TRIGGERS:function(e){let{enabled:t}=e;n2=t},ANALYTICS_LOG_CLEAR:function(){nZ=[],n0++,n1=[]}});var n8=a(658675);function n5(e){let{className:t,children:a}=e;return(0,r.jsx)("dl",{className:Y()(tZ.qo,t),children:a})}function n4(e){let{name:t,children:a,copyValue:n}=e,[l,i]=o.useState(!1);return o.useEffect(()=>{if(l){let e=setTimeout(()=>i(!1),1e3);return()=>clearTimeout(e)}},[l]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("dt",{className:tZ.Bz,children:t}),(0,r.jsxs)("dd",{className:tZ.Nw,children:[a,null!=n?(0,r.jsx)(q.D,{tag:"span",className:tZ.nH,onClick:()=>(0,nY.C)(n,()=>i(!0)),children:l?(0,r.jsx)(td.U,{color:"currentColor",size:"sm"}):(0,r.jsx)(nB.CopyIcon,{color:"currentColor",size:"sm"})}):null]})]})}function n7(e){let{value:t}=e;return(0,r.jsx)(n8.P,{checked:t})}var n9=a(412966);let le=[{key:"Event",cellClassName:n9.Hz,render(e){let{event:t}=e;return t}},{key:"Location",cellClassName:n9.QN,render(e){let{properties:t}=e;return null==t.location?null:t.location}}];function lt(e){let{children:t}=e;return(0,r.jsx)(g.Ip,{orientation:"auto",className:n9._D,children:(0,r.jsx)("dl",{children:t})})}function la(e){let{name:t,children:a,copyValue:n}=e,[l,i]=o.useState(!1);return o.useEffect(()=>{if(l){let e=setTimeout(()=>i(!1),1e3);return()=>clearTimeout(e)}},[l]),(0,r.jsxs)("div",{className:n9.fY,children:[(0,r.jsx)("dt",{className:n9.m2,children:t}),(0,r.jsx)("dd",{children:a}),(0,r.jsx)(q.D,{tag:"span",className:n9.nH,onClick:()=>(0,nY.C)(JSON.stringify(n),()=>i(!0)),children:l?(0,r.jsx)(td.U,{color:"currentColor",size:"sm"}):(0,r.jsx)(nB.CopyIcon,{color:"currentColor",size:"sm"})})]})}let ln=new Set(["client_performance_cpu","client_performance_memory"]),ll=[{id:"details",name:"Details",group:nx.fu.NONE,render:e=>{let{loggedEvent:{event:t,properties:a,timestamp:n,fingerprint:l},onClose:i,filteredEvents:s}=e,o=er.default.getUser(l),d=nU()(n);return(0,r.jsxs)("div",{className:n9.sw,"data-mtctest-ignore":"true",children:[(0,r.jsxs)(nr.Ay,{className:Y()(tZ.jr,n9.nZ),children:[(0,r.jsx)(nr.Ay.Icon,{icon:nF.U,tooltip:t}),(0,r.jsxs)(nr.Ay.Title,{wrapperClassName:n9.qd,children:[t,(0,r.jsx)(q.D,{tag:"span",className:n9.KE,onClick:()=>(0,nY.C)(t),children:(0,r.jsx)(nB.CopyIcon,{color:"currentColor",size:"sm"})})]}),(0,r.jsx)(nr.Ay.Icon,{icon:nB.CopyIcon,tooltip:"Copy all properties",onClick:()=>{(0,nY.C)(JSON.stringify({event:t,timestamp:n,fingerprint:l,user:o?.id,...a},(e,t)=>void 0===t?null:t,2))}}),(0,r.jsx)(nr.Ay.Icon,{icon:n$.a,tooltip:"Close",onClick:i})]}),(0,r.jsxs)(n5,{className:n9.ZK,children:[(0,r.jsx)(n4,{name:"Timestamp (local)",copyValue:n.toISOString(),children:(0,r.jsxs)("time",{dateTime:n.toISOString(),title:(0,nq.i$)(d,"LLLL"),children:["(",nU().locale(),") ",(0,nq.mk)(d)]})}),null!=o&&(0,r.jsx)(n4,{name:"User",copyValue:o.id,children:(0,r.jsx)(nz.A,{user:o})}),(0,r.jsx)(n4,{name:"Fingerprint",copyValue:l,children:(0,r.jsx)("code",{children:l})})]}),(0,r.jsx)(lt,{children:Object.entries(a).map(e=>{let[a,n]=e,l=ln.has(a)?function(e,t,a){let n=e.filter(e=>e.event===t);if(0===n.length)return{average:null,count:0};let l=null,i=0;for(let e of n){let t=e.properties[a];"number"==typeof t&&(i+=1,null==l?l=t:l+=t)}return{average:null!==l?l/n.length:null,count:i}}(s,t,a):null;return(0,r.jsxs)("div",{children:[(0,r.jsx)(la,{name:`${a}:`,copyValue:{[a]:n||null},children:null!=n?(0,r.jsx)("code",{children:JSON.stringify(n)}):(0,r.jsx)("code",{className:n9.HO,children:"null"})},a),null!==l&&null!==l.average&&(0,r.jsx)(la,{name:`${a}_avg:`,copyValue:{[a]:n||null},children:(0,r.jsxs)("code",{children:[l.average.toFixed(3)," (",l.count,")"]})},`${a}_avg`)]},`${a}_container`)})})]})}}],li={events:{label:"Events",filter:e=>Object.entries(li).filter(e=>{let[t]=e;return"events"!==t}).map(t=>{let[a,{filter:n}]=t;return!n(e)}).every(e=>e)},experiments:{label:"Experiments",filter:e=>["experiment_user_triggered","experiment_guild_triggered"].includes(e.event)},impressions:{label:"Impressions",filter:e=>e.event.startsWith("impression_")},networkActions:{label:"Network",filter:e=>e.event.startsWith("network_action")}},ls={searchType:nH.n.REGEX,searchStringGenerator:e=>{let{event:t,properties:a}=e;return null!=a.location?[t,a.location]:t},throttleMs:100};function lr(){let e=o.useRef(null),[t,a]=o.useState(""),n=(0,d.bG)([n6],()=>n6.loggedEventsVersion),[l,i]=o.useState(()=>Object.keys(li)),[s,c]=o.useState(n6.loggedEvents),u=o.useCallback(e=>{c(e)},[]);(0,nK.RT)(t,n6.loggedEvents,u,ls,[n]);let m=s.filter(e=>{for(let t of l)if(li[t].filter(e))return!0;return!1}),[h,x]=o.useState(void 0),p=m.find(e=>e.key===h),{TabBar:g,renderSelectedTab:v}=(0,nh.A)({tabs:ll},[]);return(0,r.jsxs)("div",{ref:e,className:Y()(tZ.nd,n9.nd),children:[(0,r.jsxs)("div",{className:n9.rh,children:[(0,r.jsx)(nG.$n,{className:n9.Q$,look:nG.$n.Looks.BLANK,size:nG.$n.Sizes.ICON,onClick:X.eY,children:(0,r.jsx)("span",{title:nN.intl.string(nN.t.VkKicb),children:(0,r.jsx)(nV.TrashIcon,{size:"md",color:"currentColor","aria-label":nN.intl.string(nN.t.VkKicb)})})}),(0,r.jsx)("div",{className:n9.Bi}),(0,r.jsx)("div",{className:n9.uW,children:Object.entries(li).map(e=>{let[t,a]=e;return(0,r.jsx)(q.D,{className:Y()(n9.pb,l.includes(t)&&n9.bx),onClick:()=>{i(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},children:a.label},t)})})]}),(0,r.jsx)("div",{className:n9.rh,children:(0,r.jsx)(nW.I,{size:"sm",query:t,onChange:a,onClear:()=>a(""),placeholder:"Search by event name"})}),(0,r.jsx)(t0,{columns:le,data:m,selectedRowKey:h,onClickRow:e=>x(e.key)}),null!=p&&(0,r.jsxs)(nm,{className:n9.rf,minHeight:100,initialHeight:null!=e.current?e.current.clientHeight/2:300,children:[(0,r.jsx)(g,{}),v({loggedEvent:p,onClose:()=>x(void 0),filteredEvents:m})]})]})}var lo=a(382483),ld=a(385113),lc=a(317672);function lu(e){let{config:t}=e,a=Object.entries(t.surfaces??{});return(0,r.jsxs)(tq.B,{gap:8,padding:8,className:lc.lt,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",color:"text-strong",children:t.display_name}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Config ID: ",t.config_id]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["App ID: ",t.application_id]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Status: ",t.status]}),null!=t.updated_at&&(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Updated: ",t.updated_at]}),null!=t.published_at&&(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Published: ",t.published_at]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(p.E,{variant:"text-xs/semibold",color:"text-strong",children:["Surfaces (",a.length,")"]}),0===a.length?(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:"No surfaces configured"}):a.map(e=>{let[t,a]=e;return(0,r.jsxs)(tq.B,{gap:4,padding:4,className:lc.YL,children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",color:"text-default",children:t}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Layout: ",a.layout]})]},t)})]})}function lm(e){let{config:t,isSelected:a,onSelect:n}=e;return(0,r.jsxs)(tq.B,{direction:"horizontal",align:"center",gap:8,padding:8,className:a?lc.FM:lc.gt,children:[(0,r.jsx)(q.D,{className:lc.Av,onClick:n,children:(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-sm/medium",color:"text-strong",children:t.display_name}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:[t.config_id," \xb7 ",t.application_id]})]})}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Refetch",onClick:()=>(0,lo.un)(t.application_id,{force:!0})})]})}function lh(){let e=(0,d.bG)([ld.A],()=>ld.A.getFeaturedFetchState());return(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsxs)(tq.B,{direction:"horizontal",gap:8,align:"center",children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",color:"text-strong",children:"Featured Configs"}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["(",e,")"]})]}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Force Refetch",onClick:()=>(0,lo.Wq)({force:!0})})]})}function lx(){let e=(0,d.bG)([ld.A],()=>ld.A.getDeveloperFetchState());return(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsxs)(tq.B,{direction:"horizontal",gap:8,align:"center",children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",color:"text-strong",children:"Developer Configs"}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["(",e,")"]})]}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Force Refetch",onClick:()=>(0,lo.i$)({force:!0})})]})}function lp(){let[e,t]=o.useState(""),a=(0,d.bG)([ld.A],()=>e.length>0?ld.A.getFetchState(e):null),n=(0,d.bG)([ld.A],()=>e.length>0?ld.A.getConfigs(e):null);return(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",color:"text-strong",children:"Fetch by Application ID"}),(0,r.jsx)(f.k,{placeholder:"Application ID",value:e,onChange:e=>t(e)}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Fetch",disabled:0===e.length,onClick:()=>(0,lo.un)(e,{force:!0})}),null!=a&&(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Status: ",a]}),null!=n&&n.length>0&&(0,r.jsx)(tq.B,{gap:4,children:n.map(e=>(0,r.jsx)(lu,{config:e},e.config_id))})]})}function lg(e){let{configs:t,selectedConfigId:a,onSelectConfig:n}=e,l=(0,d.bG)([ld.A],()=>ld.A.getFeaturedFetchState());return(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsxs)(p.E,{variant:"text-md/semibold",color:"text-strong",children:["All Loaded Configs (",t.length,")"]}),l===ld.e.FETCHING&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Loading..."}),t.map(e=>(0,r.jsx)(lm,{config:e,isSelected:a===e.config_id,onSelect:()=>n(a===e.config_id?null:e.config_id)},e.config_id))]})}function lv(e){let{config:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.c,{}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",color:"text-strong",children:"Config Details"}),(0,r.jsx)(lu,{config:t})]})]})}function lj(){let[e,t]=o.useState(null),a=Object.values((0,d.bG)([ld.A],()=>ld.A.getAllConfigsByApplication())).flat(),n=null!=e?a.find(t=>t.config_id===e):null;return(0,r.jsx)(g.Ar,{children:(0,r.jsxs)(tq.B,{gap:16,padding:8,className:lc.zr,children:[(0,r.jsx)(Q.D,{variant:"heading-lg/semibold",color:"text-strong",children:"Application Widget Configs"}),(0,r.jsx)(x.$,{size:"sm",variant:"critical-secondary",text:"Reset store",onClick:()=>tw.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_DEBUG_RESET"})}),(0,r.jsx)(lh,{}),(0,r.jsx)(b.c,{}),(0,r.jsx)(lx,{}),(0,r.jsx)(b.c,{}),(0,r.jsx)(lp,{}),(0,r.jsx)(b.c,{}),(0,r.jsx)(lg,{configs:a,selectedConfigId:e,onSelectConfig:t}),null!=n&&(0,r.jsx)(lv,{config:n})]})})}var lf=a(513520),lb=a(130100),ly=a(468747);let lE=[{key:"Channel",cellClassName:ly._w,render(e){let{channelName:t}=e;return t}},{key:"score",renderHeader:()=>(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"SCORE"}),cellClassName:ly.t6,render(e){let{score:t}=e;return t.toFixed(5)}}];function lC(){o.useEffect(()=>{(0,lf.I)()},[]);let e=(0,d.yK)([lb.A,aH.A],()=>lb.A.getChannelAffinities().map(e=>{let{channelId:t,score:a}=e;return{key:t,channelName:aH.A.getChannel(t)?.name??t,score:a}}).sort((e,t)=>t.score-e.score));return 0===e.length?null:(0,r.jsx)(t0,{className:tZ.nd,columns:lE,rowClassName:ly.nM,data:e})}function lS(){return(0,r.jsxs)(p.E,{variant:"text-lg/normal",children:["Under Construction"," ",(0,r.jsx)("span",{role:"img","aria-label":"Construction",children:"\uD83D\uDEA7"})]})}var l_=a(105565),lN=a(47899),lA=a(333714);function lk(e){switch(e){case l_.r.DC_DISMISSED:return"DISMISS:";case l_.r.DC_SHOWN:return"SHOW:";case l_.r.DC_SHOW_REQUEST:return"REQUEST TO SHOW:";default:return"UNKNOWN TYPE:"}}let lD=[{key:"events",render(e){let{event:t,dismissibleContent:a}=e;return`${t} ${aO.M[a]}`}}],lI=[{key:"candidates",render(e){let{dismissibleContent:t}=e;return`${aO.M[t]}`}}];function lT(){let e=(0,d.bG)([l_.A],()=>l_.A.getDCFEvents()),t=(0,lN.Ay)(e=>e.candidates),a=(0,lN.Ay)(e=>e.lastWinnerTime),n=0!==a?nU()(a).fromNow():"n/a",l=(0,lN.Ay)(e=>0===e.lastWinnerTime?null:e.recentlyShown[0]),i=e.map(e=>{let{eventType:t,dismissibleContent:a}=e;return{key:lk(t)+a.toString(),event:lk(t),dismissibleContent:a}}),s=Array.from(t.keys()).map(e=>({key:e.toString(),dismissibleContent:e}));return(0,r.jsxs)("div",{className:lA.KE,children:[(0,r.jsxs)("div",{className:lA.pq,children:["Last winner time: ",n]}),(0,r.jsx)("br",{}),(0,r.jsxs)("div",{className:lA.pq,children:["Last winner: ",null!=l?aO.M[l]:"None"]}),(0,r.jsx)("br",{}),(0,r.jsx)("div",{className:lA.uI,children:(0,r.jsx)(t0,{className:lA.Th,columns:lI,data:s})}),(0,r.jsx)("br",{}),(0,r.jsx)(t0,{columns:lD,data:i})]})}var lR=a(689175),lw=a(541689),lO=a(199773);function lM(){let e=(0,o.useCallback)(e=>{let t=new Set(lL());t.delete(e);let a=Array.from(t).slice(0,4);a.unshift(e),tY.w.set("RecentDismissibleOverrides",a)},[]);return[lL(),e]}function lL(){return tY.w.get("RecentDismissibleOverrides")??[]}a(667532);var lP=a(662546),lU=a(643278),lG=a(256787),lB=a(20439);let lF=o.memo(function(e){let{className:t,content:a,onChange:n}=e,l=aO.M[a],{isDismissed:i,handleToggleDismissState:s}=(0,lB.A)(l),[d,c]=o.useState(!1),u=o.useCallback(()=>{n?.(a),s()},[n,s,a]),h=o.useCallback(e=>{e.preventDefault(),c(!0),navigator.clipboard.writeText(a.toLowerCase())},[a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(tq.B,{className:t,direction:"horizontal",align:"center",children:[(0,r.jsx)(eW.K,{size:"sm",variant:"icon-only",icon:d?lP.O:lU.ClipboardListIcon,onClick:h,"aria-label":d?"Copied":"Copy"}),(0,r.jsx)(m.d,{label:`${a.toLowerCase()} (${aO.M[a]})`,description:(0,lG.Zm)(l)?function(e){let t=aL.A.settings.userContent?.recurringDismissibleContentStates?.[e];if(null==t)return null;let a=[],{lastDismissedVersion:n,lastDismissedAtMs:l,lastDismissedObjectId:i}=t;if(void 0!==n&&0!==n&&a.push(`last_dismissed_version: ${n}`),void 0!==l){let e=Number(l),t=Number.isNaN(e)?"n/a":new Date(e).toLocaleString();a.push(`last_dismissed_at: ${t}`)}return(void 0!==i&&"0"!==i&&a.push(`last_dismissed_object_id: ${i}`),0===a.length)?null:a.join(", ")}(l):null,checked:i,onChange:u})]}),(0,r.jsx)(b.c,{})]})});function l$(e){let{items:t,onChange:a}=e,[n,l]=lM(),i=(0,o.useCallback)(e=>{l(e),a?.(e)},[l,a]);return(0,r.jsx)(tq.B,{gap:16,children:t.filter(e=>isNaN(Number(e))).map(e=>(0,r.jsx)(lF,{content:e,onChange:i},e))})}function lV(e){let{searchQuery:t=""}=e,a=(0,lN.Ay)(e=>e.recentlyShown),[n,l]=lM(),i=n.filter(e=>e.toLowerCase().includes(t.toLowerCase())).filter(e=>!a.includes(aO.M[e])).slice(0,3);return 0===i.length?null:(0,r.jsx)(u.n,{label:"Recent Overrides",children:(0,r.jsx)(l$,{items:i})})}function lW(e){let{searchQuery:t=""}=e,a=(0,lN.Ay)(e=>e.recentlyShown).map(e=>aO.M[e]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).slice(0,3);return 0===a.length?null:(0,r.jsx)(u.n,{label:"Recently Shown",children:(0,r.jsx)(l$,{items:a})})}var lz=a(607734);function lH(){let{dailyCapReached:e,dailyCapOverridden:t,newUserMinAgeRequiredOverridden:a,upsellBackoffOverridden:n}=(0,d.cf)([lO.A],()=>({dailyCapReached:lO.A.hasUserHitDCCap(),dailyCapOverridden:lO.A.dailyCapOverridden,newUserMinAgeRequiredOverridden:lO.A.newUserMinAgeRequiredOverridden,upsellBackoffOverridden:lO.A.upsellBackoffOverridden})),[l,i]=o.useState(""),[s,c]=o.useState(20),h=o.useMemo(()=>Object.keys(aO.M).filter(e=>e.toLowerCase().includes(l.toLowerCase())).reverse(),[l]),g=o.useCallback(e=>{let t=e.currentTarget;t.scrollHeight-t.scrollTop<=t.clientHeight+100&&s<h.length&&c(e=>e+100)},[s,h.length]);return(0,r.jsx)(lR.Ch,{onScroll:g,children:(0,r.jsxs)("div",{className:lz.KE,children:[(0,r.jsxs)(u.n,{label:"Dismissible Content Overrides",children:[(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(x.$,{variant:"primary",text:"Reset Daily Cap",onClick:()=>(0,lw.Ab)()}),(0,r.jsx)(x.$,{variant:"primary",text:"Undismiss All DCs",onClick:()=>(0,aM.nT)()}),(0,r.jsx)(x.$,{variant:"primary",text:"Dismiss All DCs",onClick:()=>(0,aM.D1)()}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:`Daily Cap Reached: ${e?"Yes":"No"}`})]}),(0,r.jsx)(m.d,{label:"Override Dismissible Content Daily Cap",checked:t,onChange:lw.SE}),(0,r.jsx)(m.d,{label:"Override Minimum User Account Age Requirement",checked:a,onChange:lw.U$}),(0,r.jsx)(m.d,{label:"Override 60-Minute Backoff Between DC Displays",checked:n,onChange:lw.M1})]}),(0,r.jsx)(lW,{}),(0,r.jsx)(lV,{}),(0,r.jsxs)(u.n,{label:"All Dismissible Contents",children:[(0,r.jsx)(nW.I,{query:l,onChange:i,onClear:()=>i("")}),(0,r.jsx)(l$,{items:h.slice(0,s)})]})]})})}var lK=a(276086),lY=a(154323),lq=a(504565);function lJ(){let e=(0,d.bG)([lY.A],()=>lY.A.allWithDescriptions(),[],d.My),t=o.useMemo(()=>e.map(e=>{let[t,a,n]=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.d,{label:n,description:t,checked:a,onChange:e=>(0,lK.L)(t,e)},t),(0,r.jsx)(b.c,{gap:16})]})}),[e]);return(0,r.jsxs)("div",{className:lq.kL,children:[(0,r.jsx)("div",{"data-button-hoisted-classname-wrapper":!0,className:lq.x6,children:(0,r.jsx)(x.$,{variant:"primary",text:"Clear all",onClick:lK.$,fullWidth:!0})}),(0,r.jsx)("div",{className:lq.vu,children:t})]})}var lQ=a(106839);function lX(){let e=(0,d.bG)([t3.A],()=>t3.A.detectableGamesEtag),t=(0,d.bG)([t3.A],()=>t3.A.lastFetched),a=(0,d.bG)([t3.A],()=>t3.A.games.length);return(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(Q.D,{variant:"heading-sm/bold",children:"Cache Status"}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:[(0,r.jsx)("strong",{children:"Total games:"})," ",a]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:[(0,r.jsx)("strong",{children:"ETag:"})," ",""===e?"(empty)":(0,r.jsx)("span",{className:lQ.ti,children:e})]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:[(0,r.jsx)("strong",{children:"Last fetched:"})," ",null==t?"never":new Date(t).toLocaleString()]})]})}function lZ(e){let{game:t}=e,{data:a}=(0,aN.I)(t.id),n=null!=a&&a.name!==t.name;return(0,r.jsxs)(tq.B,{gap:12,className:lQ.f_,children:[(0,r.jsxs)(tq.B,{direction:"horizontal",gap:12,align:"center",children:[(0,r.jsx)(aS.A,{game:a,size:aS.M.LARGE}),(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(Q.D,{variant:"heading-lg/bold",children:t.name}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:t.id})]})]}),(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"GameStore"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:null==a?"No record fetched. The icon above comes from here, not from the detectable payload, so it is blank.":`name: ${a.name}`}),n&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:"Differs from the detectable name above."})]}),(0,r.jsxs)(tq.B,{gap:4,className:lQ.Uq,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"DetectableGameStore"}),(0,r.jsx)("pre",{className:lQ.aY,children:JSON.stringify(t,null,2)})]})]})}function l0(){let[e,t]=o.useState(null),[a,n]=o.useState(""),l=(0,d.bG)([t3.A],()=>t3.A.games),i=o.useMemo(()=>l.filter(e=>null!=e.name&&""!==e.name).map(e=>({id:e.id,value:e.id,label:e.name})),[l]),s=o.useCallback(e=>{t(e),null!=e&&n("")},[]),c=o.useCallback(e=>{n(e),e.trim().length>0&&t(null)},[]),u=a.trim(),m=u.length>0?u:e??void 0,h=(0,d.bG)([t3.A],()=>null!=m?t3.A.getDetectableGame(m)??null:null,[m]);return(0,r.jsx)("div",{className:Y()(tZ.nd,lQ.kL),children:(0,r.jsxs)(tq.B,{gap:16,padding:12,className:lQ.rf,children:[(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:"Detectable Cache"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Inspect the local detectable games cache. Use this to verify whether a SKU or executable change has propagated to your client."})]}),(0,r.jsx)(lX,{}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(Q.D,{variant:"heading-sm/bold",children:"Search"}),(0,r.jsx)(aC.Z,{label:"Search games",hideLabel:!0,placeholder:"Search for a game\u2026",options:i,value:u.length>0?void 0:e??void 0,onSelectionChange:s,selectionMode:"single",clearable:!0})]}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(Q.D,{variant:"heading-sm/bold",children:"Game ID"}),(0,r.jsx)(f.k,{label:"Game ID",hideLabel:!0,placeholder:"Paste a game ID",value:a,onChange:c})]}),null!=m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.c,{}),null!=h?(0,r.jsx)(lZ,{game:h}):(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:["No entry in cache for ID ",m,"."]})]})]})})}var l1=a(858899),l2=a(123292),l3=a(452295),l6=a(56562);let l8=[{label:"Wuthering Waves",value:"1247227126416146462"},{label:"Marvel Rivals",value:"1314395942253756416"},{label:"VALORANT",value:"700136079562375258"},{label:"League of Legends",value:"1402418696126992445"},{label:"World of Warcraft",value:"356875762940379136"}];function l5(e){let{runningGame:t,isDebugGame:a}=e,{data:n}=(0,aN.I)(t.id);return(0,r.jsxs)(tq.B,{direction:"horizontal",gap:8,children:[null!=n&&(0,r.jsx)(aS.A,{game:n}),(0,r.jsxs)(tq.B,{justify:"center",gap:0,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:n?.name}),a&&(0,r.jsx)(p.E,{variant:"text-xxs/normal",children:"Debug"})]})]})}function l4(){let e=(0,d.bG)([E.Ay],()=>E.Ay.getRunningGames()),t=(0,d.bG)([E.Ay],()=>E.Ay.getDebugRunningGame()),[a,n]=(0,o.useState)(t?.id??""),l=(0,o.useMemo)(()=>l8.map(e=>{let{label:t,value:a}=e;return{label:t,value:a,id:a}}),[]);function i(e){if(null==e||""===e)return void(0,l3.x)(null);let t=t3.A.getDetectableGame(e),a=t?.executables[0],n=t?.thirdPartySkus[0]?.distributor;if(null==t||null==a)return(0,l1.P0)({text:"Invalid Game ID",variant:"critical"});(0,l3.x)({id:t.id,name:t.name,exeName:a.name,exePath:"",lastFocused:Date.now()/1e3,pid:-1,pidPath:[],hidden:!1,elevated:!1,processName:a.name,distributor:n,windowHandle:void 0,fullscreenType:l6.aI.UNKNOWN,cmdLine:"",nativeProcessObserverId:-1})}return(0,r.jsxs)(tq.B,{gap:32,padding:12,fullWidth:!1,children:[(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:"Running Games"}),e.length>0&&(0,r.jsx)("div",{children:e.map(e=>(0,r.jsx)(l5,{runningGame:e,isDebugGame:t?.id===e.id},e.id))})]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:"Set Debug Running Game"}),(0,r.jsx)(f.k,{label:"Custom Game ID",value:a,onChange:n}),(0,r.jsx)(aC.Z,{label:"Pick a Preset Game",options:l,value:t?.id??"",onSelectionChange:function(e){i(e)},selectionMode:"single",clearable:!0}),(0,r.jsxs)(tq.B,{direction:"horizontal",gap:16,justify:"end",align:"end",children:[null!=t&&(0,r.jsx)(l2.Q,{variant:"secondary",text:"Clear",onClick:()=>i(null)}),(0,r.jsx)(x.$,{variant:"primary",text:"Detect Game",onClick:()=>i(a)})]})]})]})}var l7=a(636537),l9=a(240248),ie=a(974009);function it(){let[e,t]=o.useState(!1),[a,n]=o.useState(null),[l,i]=o.useState(null),s=o.useCallback(async()=>{try{t(!0),n(null),i(null);let e=await l7.Bo.put({url:"/users/@me/developer-portal/onboarding",body:{completed:!1},rejectWithError:!0});n(`${e.status}: ${e.text}`)}catch(e){i(e instanceof Error?e.message:String(e))}finally{t(!1)}},[]);return(0,r.jsxs)(tq.B,{direction:"vertical",gap:4,children:[(0,r.jsx)(x.$,{variant:"primary",onClick:s,text:"Reset Onboarding",disabled:e,fullWidth:!0}),!(0,l9.uJ)(a)&&(0,r.jsx)(p.E,{variant:"text-md/normal",color:"status-positive",children:a}),!(0,l9.uJ)(l)&&(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-feedback-critical",children:l})]})}function ia(){return(0,r.jsx)("div",{className:ie.n,children:(0,r.jsx)(tq.B,{direction:"vertical",gap:16,children:(0,r.jsx)(it,{})})})}a(172879);var il=a(64015),ii=a.n(il),is=a(874804),ir=a(866665),io=a(782134),id=a(113494),ic=a(603349),iu=a(108715);function im(e){return parseFloat(e.toFixed(3))}let ih=[{key:"Store",cellClassName:iu.lA,render(e){let{trace:t}=e;return t.name}},{key:"Time",cellClassName:iu.i7,render(e){let{trace:t}=e;return`${im(t.time)} ms`}}];function ix(e){let{actionLog:t}=e,a=o.useMemo(()=>t.traces.map(e=>({key:e.name,trace:e})),[t]);return(0,r.jsx)(g.Ip,{children:(0,r.jsx)(t0,{columns:ih,data:a})})}let ip=[{id:"action",name:"Action",group:nx.fu.NONE,render(e){let{actionLog:t}=e,a=nU()(t.createdAt);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n5,{className:iu.mP,children:[(0,r.jsx)(n4,{name:"Created at",children:(0,r.jsx)("time",{dateTime:t.createdAt?.toISOString(),title:(0,nq.i$)(a,"LLLL"),children:(0,nq.mk)(a)})}),(0,r.jsxs)(n4,{name:"Total Time",children:[im(t.totalTime)," ms"]})]}),(0,r.jsx)(g.Ip,{className:iu.Dx,children:(0,r.jsx)(no.A,{data:t.action})})]})}},{id:"traces",name:"Store Handlers",group:nx.fu.NONE,render(e){let{actionLog:t}=e;return(0,r.jsx)(ix,{actionLog:t})}}];function ig(e){let{actionLog:t,initialHeight:a}=e,n=o.useMemo(()=>t.error?[...ip,{id:"error",name:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ic.A,{className:iu.ik}),"Error"]}),group:nx.fu.NONE,render(e){let{actionLog:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:Y()(iu.u4,tZ.KE),children:(0,r.jsx)("div",{className:tZ.R5,children:(0,r.jsx)(nG.$n,{className:tZ.Q$,size:nG.$n.Sizes.MIN,onClick:()=>console.error(t.error),children:"Log to Console"})})}),(0,r.jsx)(g.Ip,{className:iu.Dx,children:(0,r.jsx)(no.A,{data:t.error})})]})}}]:ip,[t]),{TabBar:l,renderSelectedTab:i}=(0,nh.A)({tabs:n},[n]);return(0,r.jsxs)(nm,{className:iu.rf,minHeight:100,initialHeight:a,children:[(0,r.jsx)(l,{}),(0,r.jsxs)(nr.Ay,{className:Y()(tZ.jr,iu.nZ),children:[(0,r.jsx)(nr.Ay.Icon,{icon:is.K,tooltip:t.name}),(0,r.jsx)(nr.Ay.Title,{wrapperClassName:Y()(tZ.qd,tZ.ZE),className:tZ.Pz,children:t.name}),(0,r.jsx)(nr.Ay.Icon,{icon:nB.CopyIcon,tooltip:"Copy event data",onClick:()=>{var e;let a=JSON.stringify(Object.keys(e=t.action).reduce((t,a)=>{var n;return t[a]=(n=e[a],eu.AKn.test(n)?"REDACTED":n),t},{}),null,2);(0,nY.C)(a,()=>(0,l1.P0)({text:"Copied action log data to clipboard",variant:"success"}))}})]}),i({actionLog:t})]})}let iv=[{key:"Action",cellClassName:iu.lA,render(e){let{actionLog:t}=e;return(0,r.jsxs)(r.Fragment,{children:[t.error&&(0,r.jsx)(ic.A,{className:iu.ik}),t.name]})}},{key:"Total Time",cellClassName:iu.i7,render(e){let{actionLog:t}=e;return`${im(t.totalTime)} ms`}},{key:"Timestamp",cellClassName:iu.i7,render(e){let{actionLog:t}=e;return nU()(t.createdAt).format("HH:mm:ss.SSS")}}],ij={searchType:nH.n.REGEX,searchStringGenerator:e=>{let{actionLog:t}=e;return t.name},throttleMs:100};function ib(){let e=o.useRef(null),[t,a]=o.useState(""),n=function(e){let[t,a]=o.useState(e.logs);return o.useEffect(()=>{let t=ii()(()=>{a([...e.logs])},500);return e.on("log",t),()=>{e.off("log",t)}},[e]),t}(tw.h.actionLogger),l=o.useMemo(()=>n.map(e=>({key:e.id.toString(),actionLog:e})).toReversed(),[n]),[i,s]=o.useState(l),[d,c]=o.useState(l),[u,m]=o.useState(!1),[h,x]=o.useState(),p=o.useCallback(e=>{c(e)},[]);(0,nK.RT)(t,u?i:l,p,ij);let g=o.useCallback(e=>{s(l),m(e)},[l]),v=t.trim().length>0,j=o.useMemo(()=>v?d:u?i:l,[l,d,v,u,i]),f=u?"Enable Event Tracking":"Pause Event Tracking";return(0,r.jsxs)("div",{ref:e,className:Y()(tZ.nd,iu.nd),children:[(0,r.jsxs)("div",{className:iu.KE,children:[(0,r.jsx)(ir.m,{text:f,children:(0,r.jsx)(eW.K,{size:"sm",variant:u?"primary":"active",icon:u?io.PlayIcon:id.PauseIcon,"aria-label":f,onClick:()=>g(!u)})}),(0,r.jsx)(nW.I,{size:"sm",query:t,onChange:a,onClear:()=>a(""),placeholder:"Search by action name"})]}),(0,r.jsx)(t0,{columns:iv,data:j,selectedRowKey:h?.id.toString(),onClickRow:e=>x(e.actionLog)}),null!=h&&(0,r.jsx)(ig,{actionLog:h,initialHeight:null!=e.current?e.current.clientHeight/2:300})]})}var iy=a(936388),iE=a(269248);function iC(){let e=o.useRef(null);return(0,r.jsx)("div",{ref:e,className:Y()(tZ.nd,iE.n),children:(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Reset Uploaded Key Versions Cache",onClick:iy.A.clearUploadedKeyVersions})})}var iS=a(409181),i_=a(881520),iN=a(670455),iA=a(932661);let ik=[{id:"seconds",label:"second(s)",value:1e3},{id:"minutes",label:"minute(s)",value:6e4},{id:"hours",label:"hour(s)",value:36e5},{id:"days",label:"day(s)",value:864e5}];function iD(){let[e,t]=o.useState(null),[a,n]=o.useState(0),[l,i]=o.useState(1e3),[s,c]=o.useState(0),m=(0,d.bG)([i_.A],()=>null===e?null:i_.A.getFeedbackConfig(iN.MW[e])??iS.u[iN.MW[e]]),h=Object.entries(iN.MW),g=h.slice(h.length/2).map(e=>{let[t]=e;return{id:t,label:t,value:t}}),v=o.useMemo(()=>null!=e&&s>=0&&s<=100&&a>=0,[e,s,a]);return(0,r.jsx)("div",{className:iA.kL,children:(0,r.jsxs)(tq.B,{gap:32,children:[(0,r.jsx)(j.l,{label:"Feedback Survey",options:g,value:e,onSelectionChange:t,placeholder:"Select Feedback Survey",selectionMode:"single",fullWidth:!0}),(0,r.jsxs)(u.n,{label:"Override Survey Cooldown",children:[null!=m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Current cooldown"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:`${m.cooldown/1e3} second(s) or`}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:`${m.cooldown/6e4} minute(s) or`}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:`${m.cooldown/36e5} hour(s) or`}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:`${m.cooldown/864e5} day(s)`})]}),(0,r.jsxs)(tq.B,{direction:"horizontal",align:"end",children:[(0,r.jsx)(f.k,{label:"Override cooldown",min:0,value:a.toString(),type:"number",placeholder:"Duration length",onChange:e=>n(parseFloat(e))}),(0,r.jsx)(j.l,{label:"Override cooldown duration type",hideLabel:!0,options:ik,value:l,onSelectionChange:i,selectionMode:"single",fullWidth:!0})]})]}),(0,r.jsx)(b.c,{}),(0,r.jsx)(u.n,{label:"Override Survey Chance",children:(0,r.jsx)(f.k,{label:"Override chance",description:null!=m?`Current chance: ${100*m.chance}%`:void 0,helperText:"As a percentage",min:0,max:100,value:s.toString(),type:"number",onChange:e=>c(parseFloat(e))})}),(0,r.jsxs)(np.e,{children:[(0,r.jsx)(x.$,{variant:"critical-primary",text:"Clear Override",onClick:()=>void(null!=m&&tw.h.dispatch({type:"FEEDBACK_OVERRIDE_CLEAR",feedbackType:m.feedbackType})),disabled:!v}),(0,r.jsx)(x.$,{variant:"primary",text:"Update",onClick:()=>void(null!=m&&tw.h.dispatch({type:"FEEDBACK_OVERRIDE_SET",feedbackType:m.feedbackType,cooldown:a*l,chance:s/100})),disabled:!v})]}),null==e&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:"Error: need to select a survey"}),!(a>=0)&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:"Error: cooldown needs to be a number greater than 0"}),!(s>=0&&s<=100)&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:"Error: chance needs to be a number between 0 and 100"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Clear override resets a feedback survey to its default values"})]})})}var iI=a(447732),iT=a(931093),iR=a(334279),iw=a(663417),iO=a(147925),iM=a(557009);async function iL(){return(await l7.Bo.get({url:eu.Rsh.ENTITLEMENTS_FOR_APPLICATION(tM.tv),oldFormErrors:!0,query:{exclude_consumed:!0,exclude_ended:!0},rejectWithError:!0})).body.map(e=>iM.A.createFromServer(e))}async function iP(e){await l7.Bo.post({url:"/debug/entitlements/fractional-premium",body:{count:1,sku_id:e},rejectWithError:!1})}async function iU(e){let t="/debug/entitlements/fractional-premium";null!=e&&(t=`${t}/${e}`),await l7.Bo.del({url:t,rejectWithError:!0})}async function iG(){await l7.Bo.post({url:"/debug/entitlements/fulfillment",rejectWithError:!1})}function iB(){let[e,t]=o.useState([]),[a,n]=o.useState(!1),l=(0,o.useCallback)(async()=>{try{n(!0);let e=await iL();t(e)}finally{n(!1)}},[]),i=(0,o.useCallback)(async e=>{await iP(e),await l()},[l]);return{grantFractionalPremium:i,deleteFractionalPremium:(0,o.useCallback)(async e=>{await iU(e),await l()},[l]),triggerNextEntitlementFulfillment:(0,o.useCallback)(async()=>{await iG(),await l()},[l]),refreshEntitlementList:l,entitlements:e,loading:a}}var iF=a(267577),i$=a(370109);let iV={[iI.G.QUEST_REWARD]:"Quest Reward",[iI.G.DEVELOPER_GIFT]:"Developer Gift",[iI.G.INVOICE]:"Invoice",[iI.G.REVERSE_TRIAL]:"Reverse Trial",[iI.G.FRACTIONAL_PREMIUM_GIVEBACK]:"Giveback",[iI.G.SUBSCRIPTION]:"Subscription",[iI.G.SUBSCRIPTION_MEMBER]:"Subscription Member"};function iW(e){let t,{entitlement:a,active:n,onDelete:l}=e;function i(e){return null!=e?(0,nq.i$)(e,"LLL"):"---"}return(0,r.jsxs)("div",{className:Y()(iF.Nr,n?i$.C1:""),children:[(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["ID: ",a.id," "]}),!n&&(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["SKU: ",iz.find(e=>e.value===a.skuId)?.label]}),null!=a.startsAt&&null!=a.endsAt&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Start: ",i(a.startsAt)," "]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["End: ",i(a.endsAt)," "]})]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Entitlement source type: ",null!=(t=a.sourceType)&&t in iV?iV[t]:`Unknown source type ${t}`]}),n&&null!=l&&(0,r.jsx)(nG.$n,{className:iF.RW,size:nG.$n.Sizes.TINY,color:nG.$n.Colors.RED,look:nG.$n.Looks.OUTLINED,onClick:l,children:"Delete"})]})}let iz=[{id:"1h",label:"1 hour",value:iR.j.PREMIUM_TIER_2_1_HOUR},{id:"1d",label:"1 day",value:iR.j.PREMIUM_TIER_2_1_DAY},{id:"3d",label:"3 days",value:iR.j.PREMIUM_TIER_2_3_DAY}];function iH(){let[e,t]=o.useState(!1),[a,n]=o.useState(iR.j.PREMIUM_TIER_2_1_HOUR),[l,i]=o.useState([]),[s,d]=o.useState([]),{refreshEntitlementList:c,grantFractionalPremium:u,deleteFractionalPremium:m,triggerNextEntitlementFulfillment:h,entitlements:v,loading:f}=iB();return o.useEffect(()=>{c()},[c]),o.useEffect(()=>{i(v.filter(e=>null!=e.endsAt&&e.endsAt>new Date&&e.type===iT.z.FRACTIONAL_REDEMPTION)),d(v.filter(e=>Object.values(iR.j).includes(e.skuId)&&null==e.startsAt))},[v]),(0,r.jsx)(g.Ip,{className:tZ.nd,children:(0,r.jsxs)("div",{className:i$.l$,children:[(0,r.jsxs)("div",{className:i$.dL,children:[(0,r.jsx)(p.E,{style:{marginBottom:"8px"},variant:"text-lg/bold",children:"Manage Fractional Nitro"}),(0,r.jsxs)(q.D,{onClick:()=>t(!e),className:iF.As,children:[(0,r.jsx)("div",{children:(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Info"})}),(0,r.jsx)(iO.A,{direction:e?iO.A.Directions.UP:iO.A.Directions.DOWN})]})]}),e&&(0,r.jsxs)("div",{style:{margin:"8px 0"},children:[(0,r.jsx)(p.E,{variant:"text-md/normal",style:{fontStyle:"italic"},color:"text-muted",children:"Subscriptions paused by Fractional Nitro do not automatically resume in local or staging environments. Subscription has to be resumed manually via Admin."}),(0,r.jsx)("br",{}),(0,r.jsx)(p.E,{variant:"text-md/normal",style:{fontStyle:"italic"},color:"text-muted",children:"Entitlement fulfillment tasks do not run automatically in local environments. This task is required to handle the scheduled unfulfillment of Fractional Nitro after it's time has elapsed."})]}),(0,r.jsxs)("section",{style:{marginBottom:"8px"},className:Y()([iF.uW,i$.Uo]),children:[(0,r.jsx)(j.l,{label:"Fractional Premium SKU",value:a,options:iz,onSelectionChange:n,selectionMode:"single",fullWidth:!0}),(0,r.jsx)(x.$,{variant:"primary",text:"Grant Fractional Nitro",onClick:()=>u(a)})]}),(0,r.jsxs)("section",{className:iF.uW,children:[(0,r.jsxs)("div",{style:{flexWrap:"wrap"},className:i$.dL,children:[(0,r.jsx)(p.E,{style:{marginBottom:"8px"},variant:"text-lg/semibold",children:"Entitlements"}),(0,r.jsxs)("div",{className:iF.GC,children:[(0,r.jsx)(nG.$n,{disabled:f,size:nG.$n.Sizes.TINY,color:nG.$n.Colors.PRIMARY,look:nG.$n.Looks.OUTLINED,onClick:()=>h(),children:"Run fulfillment"}),(0,r.jsx)(nG.$n,{disabled:f,size:nG.$n.Sizes.TINY,color:nG.$n.Colors.RED,look:nG.$n.Looks.OUTLINED,onClick:()=>m(),children:"Delete all"}),(0,r.jsx)(nG.$n,{disabled:f,look:nG.$n.Looks.BLANK,size:nG.$n.Sizes.ICON,onClick:c,children:(0,r.jsx)("span",{title:"Refresh",children:(0,r.jsx)(iw.RefreshIcon,{size:"xs",color:"currentColor"})})})]})]}),l.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)(p.E,{style:{marginTop:"15px"},variant:"text-md/bold",children:"Active premium"}),(0,r.jsx)("div",{children:l.map(e=>(0,r.jsx)(iW,{entitlement:e,active:!0,onDelete:()=>m(e.id)},e.id))})]}),s.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)(p.E,{style:{marginTop:"15px"},variant:"text-md/bold",children:"Unconsumed Fractional Premium"}),(0,r.jsx)("div",{children:s.map(e=>(0,r.jsx)(iW,{entitlement:e},e.id))})]})]})]})})}var iK=a(832604),iY=a(264572).Buffer;let iq=/[^a-zA-Z0-9_.-]+/g;function iJ(e){let{runningGame:t}=e,a=(0,iK.A)(t.pid,void 0),[n,l]=(0,o.useState)(!1),i=t.name??t.exeName??"",s=null!=a&&!n;async function d(){if(null!=a){l(!0);try{let e,t=await y.A.fileManager.saveWithDialog2(iY.from(a.slice(a.indexOf(",")+1),"base64"),(e=i.trim().replace(iq,"_"),`${e.length>0?e:"icon"}.png`),void 0);null==t||t.canceledByUser||(0,l1.P0)({text:`Saved icon to ${t.directory}`,variant:"success"})}catch{(0,l1.P0)({text:"Failed to save icon",variant:"critical"})}finally{l(!1)}}}return(0,r.jsxs)(tq.B,{direction:"horizontal",align:"center",justify:"space-between",gap:12,children:[(0,r.jsxs)(tq.B,{direction:"horizontal",align:"center",gap:12,fullWidth:!1,children:[null!=a?(0,r.jsx)("img",{src:a,alt:i,width:48,height:48}):(0,r.jsx)(p.E,{variant:"text-xxs/normal",color:"text-muted",children:"no icon"}),(0,r.jsxs)(tq.B,{direction:"vertical",gap:0,fullWidth:!1,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:i}),(0,r.jsxs)(p.E,{variant:"text-xxs/normal",color:"text-muted",children:[t.id??"(no id)"," \xb7 ",t.distributor??"unknown",":",t.sku??"\u2014"]}),(0,r.jsx)(p.E,{variant:"text-xxs/normal",color:"text-muted",children:t.exePath})]})]}),(0,r.jsx)(x.$,{variant:"primary",text:"Save Icon",onClick:d,disabled:!s})]})}function iQ(){let e=(0,d.bG)([E.Ay],()=>E.Ay.getRunningGames());return(0,r.jsxs)(tq.B,{gap:16,padding:12,fullWidth:!1,children:[(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(Q.D,{variant:"heading-md/bold",children:"Game Icon Extractor"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Save a running game's locally-detected icon as a PNG."})]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(tq.B,{gap:12,children:[(0,r.jsx)(Q.D,{variant:"heading-sm/bold",children:"Running Games"}),0===e.length?(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"No games detected. Launch a game first."}):e.map(e=>(0,r.jsx)(iJ,{runningGame:e},`${e.pid}-${e.exePath}`))]})]})}var iX=a(390544),iZ=a(498480),i0=a(475669),i1=a(486223);function i2(){let e=(0,d.bG)([nS.A],()=>nS.A.getGuildId()),t=(0,d.bG)([nC.A],()=>nC.A.getGuild(e)?.name),a=(0,d.bG)([i0.A],()=>i0.A.getStateForGuild(e)?.instances),n=o.useMemo(()=>Object.values(a??{})[0],[a]),l=o.useCallback(t=>{null!=n&&null!=e&&tw.h.dispatch({type:"GAME_SERVER_UPDATE_INSTANCE_SUCCESS",guildId:e,instance:{...n,status:t}})},[n,e]),i=o.useMemo(()=>Object.values(iX.M).map(e=>(0,r.jsx)(x.$,{variant:"primary",text:e,onClick:()=>{l(e)}},e)),[l]),s=o.useCallback(()=>{null!=n&&null!=e&&tw.h.dispatch({type:"GAME_SERVER_UPDATE_INSTANCE_SUCCESS",guildId:e,instance:{...n,serverIP:void 0,port:void 0,gameServerPanelUrl:void 0}})},[n,e]);return null==e?null:(0,r.jsxs)(g.Ip,{className:i1.kL,children:[(0,r.jsx)("div",{className:i1.uW,children:(0,r.jsx)(Q.D,{variant:"heading-md/normal",children:`Current guild: ${t}`})}),(0,r.jsxs)("div",{className:i1.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",children:`Set server state for first server: ${n?.name}`}),(0,r.jsx)("div",{className:i1.UD,children:i}),(0,r.jsx)(p.E,{variant:"eyebrow",children:"Remove Server Info"}),(0,r.jsx)("div",{className:i1.UD,children:(0,r.jsx)(x.$,{variant:"primary",text:"Remove IP Address & Game Server Panel URL",onClick:s})}),(0,r.jsx)(p.E,{variant:"eyebrow",children:"Reset server"}),(0,r.jsx)(x.$,{variant:"primary",text:"Reset",onClick:()=>{(0,iZ.cq)(e)}})]})]})}function i3(e,t){let a="boolean"==typeof t?t:!ns.Ay.get(e);tw.h.dispatch({type:"DEV_TOOLS_DEV_SETTING_SET",toggle:e,value:a})}var i6=a(257446);function i8(e){let{devSettingsCategory:t}=e,a=(0,d.bG)([ns.Ay],()=>ns.Ay.allByCategory(t),[t],d.My),n=o.useMemo(()=>a.map(e=>{let[t,a,{label:n}]=e;return(0,r.jsx)(m.d,{label:n,description:t,checked:a,onChange:e=>i3(t,e)},t)}),[a]);return(0,r.jsx)("div",{className:Y()(tZ.nd,i6.n),children:n})}var i5=a(950305),i4=a(231483),i7=a(597770),i9=a(433492),se=a(695458),st=a(796140),sa=a(268791),sn=a(836480),sl=a(855473),si=a(626258),ss=a(420854),sr=a(373846),so=a(657044),sd=a(141060),sc=a(608599),su=a(685761),sm=a(157225),sh=a(362704),sx=a(625903),sp=a(628284),sg=a(320448),sv=a(562708),sj=a(830215),sf=a(662502),sb=a(889227),sy=a(499785),sE=a(315069);class sC extends sE.A{id;summary;userIds;password;constructor(e){super(),this.id=e.pool_id,this.summary=e.summary,this.userIds=e.user_ids}static fromServer(e){return new sC(e)}setPassword(e){return this.password=e,this}}let sS={pools:null,users:null};function s_(e){null==sS.users&&(sS.users=new Map),sS.users.set(e.id,new sb.A(e))}class sN extends d.Ay.PersistedStore{static displayName="GeneratedTestUsersStore";static persistKey="GeneratedTestUsersStore";initialize(e){null!=e&&(null!=e.pools&&(sS.pools=new Map(Object.entries(e.pools))),null!=e.users&&(sS.users=new Map(Object.entries(e.users))))}getState(){return{pools:null!=sS.pools?Object.fromEntries(sS.pools):null,users:null!=sS.users?Object.fromEntries(sS.users):null}}getUsersForPool(e){return Array.from(sS.users?.values()??[]).filter(t=>sS.pools?.get(e)?.userIds.includes(t.id))}getPool(e){return sS.pools?.get(e)??null}getUser(e){return sS.users?.get(e)??null}getPools(){return null===sS.pools?null:Array.from(sS.pools.values())}}let sA=new sN(tw.h,{GENERATED_POOL_BY_ID_FETCH_SUCCESS:function(e){let{pool:t,users:a}=e;null==sS.pools&&(sS.pools=new Map),sS.pools.set(t.id,t),a.forEach(s_)},GENERATED_POOL_REMOVE_FROM_LIST:function(e){let{poolId:t}=e,a=sS.pools?.get(t);if(null==a)return!1;a.userIds.length>0&&a.userIds.forEach(e=>{sS.users?.delete(e)}),sS.pools?.delete(t)}});var sk=a(835002);async function sD(e,t){return await sy.A.get({url:eu.Rsh.GENERATED_POOL_BY_ID(e),trackedActionData:{event:sv.NetworkActionNames.USER_LOGIN},rejectWithError:!1}).then(e=>{let{ok:a,body:n}=e;if(!a)return void sf.A.showFailedToast(sk.OB.GENERIC_ERROR);let{generated_pool:l,users:i}=n;tw.h.dispatch({type:"GENERATED_POOL_BY_ID_FETCH_SUCCESS",pool:sC.fromServer(l).setPassword(t),users:i.map(e=>new sb.A(e))})}).catch(()=>(sf.A.showFailedToast(sk.OB.GENERIC_ERROR),null))}var sI=a(844330),sT=a(157416);let sR=[i5.UserIcon,i4.ShieldIcon,i7.GiftIcon,i9.K,se.m,st.c,sa.$,sn.CompassIcon,sl.Z,si.A,ss.E,sr.C,so._,sd.i,sc.L,su.f,sm.N,sh.Y,sx.SettingsIcon],sw=["text-default","text-feedback-positive","text-feedback-warning","text-feedback-info","text-feedback-critical"];function sO(){let[e,t]=o.useState(""),[a,n]=o.useState(""),[l,i]=o.useState(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("form",{onSubmit:async l=>{l.preventDefault(),i(!0);try{await sD(e,a),t(""),n("")}finally{i(!1)}},children:(0,r.jsxs)(tq.B,{direction:"vertical",align:"center",gap:8,children:[(0,r.jsxs)(tq.B,{direction:"horizontal",align:"center",gap:4,children:[(0,r.jsx)(f.k,{fullWidth:!0,value:e,onChange:t,placeholder:"Pool ID",disabled:l}),(0,r.jsx)(f.k,{type:"password",fullWidth:!0,value:a,onChange:n,placeholder:"Password",disabled:l})]}),(0,r.jsxs)(tq.B,{direction:"horizontal",align:"center",gap:4,children:[(0,r.jsx)(x.$,{type:"button",size:"md",fullWidth:!0,variant:"secondary",text:"Clear",onClick:()=>{t(""),n("")},disabled:0===e.length||0===a.length||l}),(0,r.jsx)(x.$,{type:"submit",size:"md",fullWidth:!0,variant:"primary",text:"Add Pool",disabled:0===e.length||0===a.length||l,loading:l})]})]})}),(0,r.jsx)(b.c,{gap:4})]})}function sM(e){let{pool:t}=e,{id:a,summary:n}=t,l=sA.getUsersForPool(a),i=(0,d.bG)([nQ.default],()=>nQ.default.getId()),s=sR[Number(a)%sR.length],c=sw[Number(a)%sw.length],u=o.useCallback(()=>{tw.h.dispatch({type:"GENERATED_POOL_REMOVE_FROM_LIST",poolId:a})},[a]);return(0,r.jsx)(tq.B,{direction:"horizontal",align:"start",justify:"space-between",children:(0,r.jsx)(sI.A,{icon:(0,r.jsx)(p.E,{variant:"text-md/medium",color:c,className:sT.td,children:(0,r.jsx)(s,{size:"custom",width:24,height:24,color:"currentColor"})}),title:n,className:sT.JC,subtitle:`${l.length} users`,children:(0,r.jsxs)(tq.B,{direction:"vertical",gap:4,padding:{left:24,right:8,bottom:16},fullWidth:!1,children:[l.map((e,a)=>(0,r.jsxs)(o.Fragment,{children:[0!==a&&(0,r.jsx)(b.c,{gap:4}),(0,r.jsx)(q.D,{onClick:a=>{a.stopPropagation(),function(e,t){let a=sA.getUser(t);if(null==a)throw Error("User not found");let n=sA.getPool(e)?.password;if(null==n)throw Error("Pool password not found");if(null==a.email)throw Error("User email not found");sj.A.login({login:a.email,password:n,isMultiAccount:!0,source:"generated_test_user"}).catch(()=>(sf.A.showFailedToast(sk.OB.GENERIC_ERROR),null))}(t.id,e.id)},"aria-disabled":i===e.id,className:Y()(sT.vk,{[sT.Pe]:i===e.id}),children:(0,r.jsxs)(tq.B,{direction:"horizontal",align:"center",justify:"space-between",gap:8,padding:{right:8},fullWidth:!1,children:[(0,r.jsxs)(tq.B,{direction:"horizontal",align:"center",gap:8,fullWidth:!1,className:Y()({[sT.WP]:i===e.id}),children:[(0,r.jsx)(i5.UserIcon,{size:"custom",width:20,height:20,color:"currentColor"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-default",children:e.username}),(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",className:sT.c1,children:e.email})]})]}),i===e.id?(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-positive",children:(0,r.jsx)(sp.y,{size:"sm",color:"currentColor"})}):(0,r.jsx)(sg._,{size:"sm",color:"currentColor"})]},e.id)},e.id)]},e.id)),(0,r.jsx)("div",{className:sT.UD,children:(0,r.jsx)(x.$,{icon:nV.TrashIcon,text:"",size:"sm",variant:"secondary",onClick:u})})]})})})}function sL(){let e=(0,d.yK)([sA],()=>sA.getPools()??[]);return(0,r.jsxs)(tq.B,{padding:16,gap:16,fullWidth:!1,className:sT.kL,children:[(0,r.jsx)(sO,{}),(0,r.jsx)(g.Ip,{className:sT.Ik,children:e?.map(e=>(0,r.jsx)(sM,{pool:e},e.id))})]})}var sP=a(582306),sU=a(507104),sG=a(846466);function sB(e){let t=new Date(e);return t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})+" "+t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})}function sF(e,t){return null!=t?`/users/@me/gift-intents/dismissals/${e}/${t}`:`/users/@me/gift-intents/dismissals/${e}`}let s$=tM.np.FRIEND_ANNIVERSARY;function sV(e){return 403===e?.status?"Forbidden (403). This account is likely not in the backend-persistence experiment; clearing also requires a staff account.":e instanceof Error?e.message:String(e)}function sW(){let e=(0,d.bG)([sU.Ay],()=>sU.Ay.getDevToolTotalFriendAnniversaries()),t=(0,d.bG)([sU.Ay],()=>sU.Ay.getDevToolCurrentDate()),a=(0,d.bG)([sU.Ay],()=>sU.Ay.getMessageGiftIntentLastShownMap()),n=(0,d.bG)([sU.Ay],()=>sU.Ay.getHighestAffinityFriendAnniversaries()),l=(0,d.bG)([sU.Ay],()=>sU.Ay.getHighAffinityFriendAnniversaries()),i=(0,d.bG)([er.default],()=>er.default.getCurrentUser()?.isStaff()??!1),s=(0,d.bG)([aK.A],()=>aK.A.getFriendIDs().filter(e=>!aK.A.isIgnored(e)&&null!=aK.A.getSince(e)).length),c=(0,d.bG)([aL.A],()=>{let e=Number(aL.A.settings.userContent?.lastGiftIntentDismissedAtMs??"0");return Number.isNaN(e)||0===e?null:e}),[u,m]=o.useState([]),[h,v]=o.useState(null),[f,b]=o.useState(!1),[y,E]=o.useState(!1),[C,S]=o.useState(!1),[_,N]=o.useState(void 0),A=o.useCallback(async()=>{E(!0);try{let{body:e}=await l7.Bo.get({url:"/users/@me/gift-intent-dismissals",rejectWithError:!0});m(e.dismissals??[]),v(null),b(!1)}catch(t){let e=t.status;v(sV(t)),b(403===e),403===e&&m([])}finally{E(!1)}},[]);async function k(e){S(!0);try{await e(),v(null),await A()}catch(e){v(sV(e))}finally{S(!1)}}o.useEffect(()=>{A()},[A,c]);let D=u.filter(e=>e.intent_type===s$),I=new Map(D.map(e=>[e.target_id,Number(e.dismissed_at_ms)])),T=Array.from(new Set([...Object.keys(a),...I.keys()])),R=Array.from(new Set([...n,...l])),w=R.map(e=>({id:e,value:e,label:er.default.getUser(e)?.username??`Unknown User (${e})`})),O=y||C;function M(e){tw.h.dispatch({type:"DEV_TOOLS_SET_FRIEND_ANNIVERSARY_COUNT",total:e})}function L(e){let t=nI.A.getUserAffinity(e);return t?.dmProbability!=null?`${(100*t.dmProbability).toFixed(3)}%`:"N/A"}return(0,r.jsx)(g.Ip,{className:tZ.nd,children:(0,r.jsxs)("div",{className:sG.l$,children:[(0,r.jsx)(p.E,{className:sG.Iv,variant:"text-lg/bold",children:"Friend Anniversary"}),(0,r.jsx)("div",{className:sG.Pm,children:(0,r.jsxs)(tq.B,{gap:8,direction:"horizontal",style:{flex:1},children:[(0,r.jsx)(j.l,{label:"Number of anniversaries to generate",selectionMode:"single",options:[{id:"none",label:"None",value:null},{id:"1",label:"1",value:1},{id:"2",label:"2",value:2},{id:"3",label:"3",value:3},{id:"4",label:"4",value:4},{id:"5",label:"5",value:5},{id:"10",label:"10",value:10},{id:"25",label:"25",value:25}],value:e,onSelectionChange:e=>{M(e)}}),(0,r.jsx)(x.$,{size:"sm",variant:"secondary",text:"Re-randomize",disabled:null==e,onClick:function(){tw.h.dispatch({type:"DEV_TOOLS_RESAMPLE_FRIEND_ANNIVERSARIES"})}}),(0,r.jsx)(x.$,{size:"sm",variant:"secondary",text:"Clear",onClick:()=>{M(null)}})]})}),null!=e&&(0,r.jsx)("div",{className:sG.Pm,children:(0,r.jsxs)(tq.B,{gap:8,children:[0===s?(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-feedback-warning",children:"No friends with an anniversary date, so no anniversaries can be generated."}):(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Generated ",R.length," of ",e," requested",R.length<e?` (only ${s} friend${1===s?"":"s"} with an anniversary date).`:"."]}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:"Affinity is the percent chance that User A will DM or GDM User B in the next 7 days."}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:"The devtool automatically assigns users as high affinity regardless of actual affinity for testing."}),n.length>0&&(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"Highest Affinity Friend Anniversaries:"}),n.map(e=>{let t=er.default.getUser(e),a=t?.username??`Unknown User (${e})`;return(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:[a," (",L(e),")"]},e)})]}),l.length>0&&(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"High Affinity Friend Anniversaries:"}),l.map(e=>{let t=er.default.getUser(e),a=t?.username??`Unknown User (${e})`;return(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:[a," (",L(e),")"]},e)})]})]})}),(0,r.jsx)("div",{className:sG.Pm,children:(0,r.jsxs)(tq.B,{gap:8,direction:"horizontal",children:[(0,r.jsx)(sP.J,{label:"Override current date used for cooldowns",value:null!=t?nU()(t):void 0,onSelect:function(e){let t=nU()(),a=e.clone().hours(t.hours()).minutes(t.minutes()).seconds(t.seconds()).milliseconds(t.milliseconds());tw.h.dispatch({type:"DEV_TOOLS_SET_CURRENT_DATE",date:a.valueOf()})}}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Clear",onClick:function(){tw.h.dispatch({type:"DEV_TOOLS_RESET_CURRENT_DATE"})}})]})}),(0,r.jsxs)("div",{className:sG.Pm,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Reset gift message cooldown (per-user, 14d)"}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Reset",onClick:function(){tw.h.dispatch({type:"DEV_TOOLS_GIFT_MESSAGE_COOLDOWN_RESET"})}})]}),(0,r.jsxs)("div",{className:sG.Pm,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Clear last seen friend anniversaries in All Friends"}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Clear",onClick:function(){tw.h.dispatch({type:"DEV_TOOLS_FRIENDS_LIST_GIFT_INTENTS_SHOWN_RESET"})}})]}),(0,r.jsx)("div",{className:sG.Pm,children:(0,r.jsxs)(tq.B,{gap:12,fullWidth:!0,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:"Backend dismissal sync"}),(0,r.jsxs)(tq.B,{gap:4,children:[f&&(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-feedback-warning",children:"This account is not in the backend-persistence experiment, so nothing here will persist to the server."}),!i&&(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-feedback-warning",children:"Clearing server dismissals requires a staff account."}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Server last recorded a dismissal:"," ",null!=c?sB(c):"never"]})]}),(0,r.jsxs)(tq.B,{gap:8,direction:"horizontal",align:"end",children:[(0,r.jsx)(x.$,{size:"sm",variant:"secondary",text:"Refresh",onClick:()=>{A()},disabled:O}),(0,r.jsx)(x.$,{size:"sm",variant:"primary",text:"Clear all",onClick:function(){k(()=>l7.Bo.del({url:sF(s$),rejectWithError:!0}))},disabled:O||!i||f||0===D.length})]}),(0,r.jsxs)(tq.B,{gap:8,direction:"horizontal",align:"end",children:[(0,r.jsx)(j.l,{label:"Dismiss a generated anniversary on the server",selectionMode:"single",options:w,value:_,onSelectionChange:e=>{N(e)}}),(0,r.jsx)(x.$,{size:"sm",variant:"secondary",text:"Dismiss on server",onClick:function(){null!=_&&k(()=>l7.Bo.post({url:"/users/@me/gift-intents/dismiss",body:{intent_type:s$,target_id:_},rejectWithError:!0}))},disabled:O||f||null==_})]}),0===w.length&&(0,r.jsx)(p.E,{variant:"text-xs/normal",children:"Generate friend anniversaries above to pick a target to dismiss."}),null!=h&&(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-feedback-critical",children:h}),y&&(0,r.jsx)(p.E,{variant:"text-xs/normal",children:"Loading..."}),!y&&0===T.length&&(0,r.jsx)(p.E,{variant:"text-xs/normal",children:"No dismissals recorded locally or on the server."}),!y&&T.length>0&&(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"Local vs. server (per friend):"}),T.map(e=>{let t=er.default.getUser(e),n=t?.username??`Unknown User (${e})`,l=a[e],s=I.get(e);return(0,r.jsxs)(tq.B,{gap:8,direction:"horizontal",justify:"space-between",align:"center",children:[(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:[n,": local ",null!=l?sB(l):"none",", server"," ",null!=s?sB(s):"none"]}),null!=s&&(0,r.jsx)(x.$,{size:"sm",variant:"secondary",text:"Clear",onClick:()=>{k(()=>l7.Bo.del({url:sF(s$,e),rejectWithError:!0}))},disabled:O||!i||f})]},e)})]})]})})]})})}var sz=a(432816),sH=a(28863),sK=a(517461),sY=a(214947),sq=a(403581),sJ=a(34188);let sQ=["ILLO_BLUE","ILLO_GREEN","ILLO_PINK","ILLO_ORANGE","ILLO_PURPLE","ILLO_YELLOW","BLUE_NEW","GREEN_NEW","NEUTRAL","ORANGE_NEW","RED_NEW","TEAL_NEW","YELLOW_NEW"];var sX=a(277583);let sZ=[0,.5,1],s0=["Center","Inner ring","Outer ring"],s1=sZ.length,s2="ILLO_BLUE",s3="ILLO_BLUE_40",s6=Array.from({length:s1},()=>s3),s8=Array.from({length:s1},()=>s2),s5=["1","0.5","0"],s4=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i,s7=[{label:"Light",value:eu.NJ8.LIGHT,id:eu.NJ8.LIGHT},{label:"Ash",value:eu.NJ8.ASH,id:eu.NJ8.ASH},{label:"Dark",value:eu.NJ8.DARK,id:eu.NJ8.DARK},{label:"Onyx",value:eu.NJ8.ONYX,id:eu.NJ8.ONYX}],s9={[eu.NJ8.ASH]:eu.NJ8.DARK,[eu.NJ8.ONYX]:eu.NJ8.DARK,[eu.NJ8.LIGHT]:eu.NJ8.DARK},re={[eu.NJ8.LIGHT]:"light",[eu.NJ8.ASH]:"ash",[eu.NJ8.DARK]:"dark",[eu.NJ8.ONYX]:"onyx"},rt=[{id:"friends",icon:sY.$,text:"Friends"},{id:"nitro",icon:sq.t,text:"Nitro Home",nitroHoverGradient:!0},{id:"shop",icon:sJ.U,text:"Shop",useCustomGradient:!0}],ra=sQ.map(e=>({label:e,value:e,id:e})),rn=Object.fromEntries(sQ.map(e=>[e,Object.keys(eY.A.unsafe_rawColors).filter(t=>String(t).startsWith(e+"_")).sort((e,t)=>parseInt(String(e).split("_").pop()??"0",10)-parseInt(String(t).split("_").pop()??"0",10)).map(e=>{let t=String(e).split("_").pop()??e,[a,n,l]=eY.A.unsafe_rawColors[e].resolve().rgba(),i=(.299*a+.587*n+.114*l)/255>.5?eY.A.unsafe_rawColors.OPACITY_BLACK_28:eY.A.unsafe_rawColors.OPACITY_WHITE_28,s=(0,r.jsx)("span",{className:sX.oP,style:{background:`rgb(${a}, ${n}, ${l})`,border:`1px solid ${i.css}`}});return{label:t,value:e,id:String(e),leading:s}})]));var rl=a(306327);function ri(e,t,a){return e.map((e,n)=>n===t?a:e)}function rs(e,t){let[a,n,l,i]=eY.A.unsafe_rawColors[e].resolve().rgba({opacity:t});return{r:a,g:n,b:l,a:i}}function rr(e,t){let a=eY.A.unsafe_rawColors[e].resolve();return null!=t?a.hex({opacity:t}):a.hex()}function ro(e){let{yaml:t,label:a}=e,n=o.useCallback(()=>{navigator.clipboard.writeText(t)},[t]);return(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsxs)(tq.B,{direction:"horizontal",gap:8,align:"center",justify:"space-between",children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:a}),(0,r.jsx)(eW.K,{icon:nB.CopyIcon,"aria-label":`Copy ${a} YAML`,onClick:n,variant:"secondary",size:"sm"})]}),(0,r.jsx)("pre",{className:sX.RP,children:t})]})}function rd(e){let{allResolvedStops:t}=e,a=o.useMemo(()=>s0.map((e,a)=>{let n;return n=s7.map(e=>{let n,l,{value:i}=e,s=re[i],r=t[i];return` ${s}:
color: ${-1===(l=(n=String(r.colors[a]).toLowerCase()).lastIndexOf("_"))?n.replace(/_/g,"-"):n.slice(0,l).replace(/_/g,"-")+"."+n.slice(l+1)}
opacity: ${r.opacities[a]}`}).join("\n"),`type: background
colors:
${n}
gradient-colors:
color-mix: false
codegen:
web: true
mobile: false`}),[t]);return(0,r.jsxs)(tq.B,{gap:16,children:[(0,r.jsx)(Q.D,{variant:"heading-sm/semibold",children:"Token YAML"}),s0.map((e,t)=>(0,r.jsx)(ro,{yaml:a[t],label:e},e))]})}function rc(e,t,a){let{r:n,g:l,b:i,a:s}=function(e,t){if(t<=e[0].position){let t=e[0];return{r:t.r,g:t.g,b:t.b,a:t.opacity}}for(let a=0;a<e.length-1;a++){let n=e[a],l=e[a+1];if(t<=l.position){if(l.position===n.position)return{r:n.r,g:n.g,b:n.b,a:n.opacity};let e=(t-n.position)/(l.position-n.position);return{r:n.r+(l.r-n.r)*e,g:n.g+(l.g-n.g)*e,b:n.b+(l.b-n.b)*e,a:n.opacity+(l.opacity-n.opacity)*e}}}let a=e[e.length-1];return{r:a.r,g:a.g,b:a.b,a:a.opacity}}(t,a),r=.5*s;return new rl.A("srgb",[(e.r*(1-r)+n*r)/255,(e.g*(1-r)+l*r)/255,(e.b*(1-r)+i*r)/255])}function ru(e,t,a){var n;let l=a.map(e=>{let[t,a,n]=eY.A.unsafe_rawColors[e.color].resolve().rgba();return{r:t,g:a,b:n,opacity:e.opacity,position:e.position}}),i=1/0;for(let a of l)(n=e.contrast(rc(t,l,a.position),"WCAG21"))<i&&(i=n);for(let a=0;a<l.length-1;a++){let{contrast:n}=function(e,t,a,n,l){let i=1/0,s=n;for(let r=0;r<=100;r++){let o=n+r/100*(l-n),d=a.contrast(rc(e,t,o),"WCAG21");d<i&&(i=d,s=o)}return{contrast:i,position:s}}(t,l,e,l[a].position,l[a+1].position);n<i&&(i=n)}return Math.round(100*i)/100}function rm(e){let[t,a,n]=eY.A.colors.TEXT_DEFAULT.resolve(e).rgba(),[l,i,s]=eY.A.colors.BACKGROUND_BASE_LOWEST.resolve(e).rgba(),[r,o,d,c]=eY.A.colors.INTERACTIVE_BACKGROUND_HOVER.resolve(e).rgba();return{text:new rl.A("srgb",[t/255,a/255,n/255]),background:{r:l*(1-c)+r*c,g:i*(1-c)+o*c,b:s*(1-c)+d*c}}}function rh(){return{colors:Array.from({length:s1},()=>void 0),scales:Array.from({length:s1},()=>void 0),opacities:Array.from({length:s1},()=>void 0)}}function rx(){return{[eu.NJ8.LIGHT]:rh(),[eu.NJ8.ASH]:{colors:[...s6],scales:[...s8],opacities:[...s5]},[eu.NJ8.DARK]:rh(),[eu.NJ8.ONYX]:rh()}}function rp(){let e=(0,sz.G9)(),[t,a]=o.useState(eu.NJ8.DARK),[n,l]=(0,sK.V)("DevToolsGradientContrastPanel_themeStops",rx()),i=n??rx(),[s,d]=o.useState(["","",""]),[c,u]=o.useState([null,null,null]),[m,h]=o.useState(null),{images:v,renderPickers:j}=function(){let[e,t]=o.useState(null),a=o.useRef(null),n=o.useCallback(e=>{let a=e.target.files?.[0];if(null==a)return;let n=new FileReader;n.onload=()=>t({src:n.result,name:a.name}),n.readAsDataURL(a),e.target.value=""},[]),l=o.useCallback(()=>(0,r.jsxs)(tq.B,{direction:"horizontal",gap:8,align:"center",children:[(0,r.jsx)("input",{ref:a,type:"file",accept:"image/jpeg,image/png,image/gif,image/webp,image/avif",onChange:n,style:{display:"none"}}),null!=e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",children:e.name}),(0,r.jsx)(l2.Q,{text:"Remove",variant:"critical",textVariant:"text-sm/medium",onClick:()=>t(null)})]}):(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Upload button hover image",onClick:()=>a.current?.click()})]}),[e,n]);return{images:{buttonBackground:e},renderPickers:l}}(),b=o.useMemo(()=>Object.fromEntries(s7.map(e=>{let{value:t}=e;return[t,function(e,t){let a=[],n=[],l=[];for(let i=0;i<s1;i++){let s,r,o,d=t;for(;null!=d;){let t=e[d];if(s??=t.colors[i],r??=t.scales[i],o??=t.opacities[i],null!=s&&null!=r&&null!=o)break;d=s9[d]}a.push(s??s6[i]),n.push(r??s8[i]),l.push(o??s5[i])}return{colors:a,scales:n,opacities:l}}(i,t)]})),[i]),y=b[t],E=o.useCallback(e=>{l({...i,[t]:e(i[t])})},[t,l,i]),C=o.useMemo(()=>rm({theme:t,saturation:1}),[t]),S=o.useMemo(()=>{let e=[];for(let t=0;t<s1;t++){let a=parseFloat(y.opacities[t]);if(isNaN(a)||a<0||a>1)return null;e.push({color:y.colors[t],opacity:a,position:sZ[t]})}return e},[y]),_=o.useMemo(()=>{if(null==S)return null;let{text:e,background:t}=C;return s0.map((a,n)=>rn[y.scales[n]].map(a=>{let l=ru(e,t,ri(S,n,{...S[n],color:a.value}));return{...a,trailing:`(${l}:1)`}}))},[S,C,y.scales]),N=o.useMemo(()=>{try{return s7.map(e=>{let{value:t,label:a}=e,n=b[t],l=[];for(let e=0;e<s1;e++){let i=parseFloat(n.opacities[e]);if(isNaN(i)||i<0||i>1)return{theme:t,label:a,result:null};l.push({color:n.colors[e],opacity:i,position:sZ[e]})}return{theme:t,label:a,result:function(e,t){let a,{text:n,background:l}=rm(t),i=ru(n,l,e),s=i>=4.5;if(!s)for(let t=0;t<e.length;t++){let i=function(e){let t=String(e).match(/^(.+)_\d+$/);if(null==t)return null;let a=t[1];return sQ.includes(a)?a:null}(e[t].color);if(null==i)continue;let s=parseInt(String(e[t].color).split("_").pop()??"0",10),r=1/0;for(let{value:o}of rn[i]){if(o===e[t].color)continue;let i=ru(n,l,ri(e,t,{...e[t],color:o}));if(i>=4.5){let e=Math.abs(parseInt(String(o).split("_").pop()??"0",10)-s);e<r&&(r=e,a={stopIndex:t,suggestedColor:o,resultingMinContrast:i})}}}return{passes:s,minContrastRatio:i,suggestion:a}}(l,{theme:t,saturation:1})}})}catch{return null}},[b]);return(0,r.jsx)(g.Ar,{className:sX.XG,children:(0,r.jsxs)(tq.B,{gap:24,padding:8,className:sX.zr,children:[(0,r.jsx)(Q.D,{variant:"heading-lg/medium",children:"Tab Hover Gradient Token Generator & Contrast Checker"}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Checks that tab hover gradients pass WCAG AA (4.5:1) contrast against the text in the tab, accounting for opacities and hover states."}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Pick colors for each gradient stop (center, inner ring, outer ring) per theme. Each color in the dropdown will show the minimum contrast ratio for the gradient if the color were selected. Dark-family themes inherit: values set on Dark cascade to Darker and Onyx unless overridden."}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Use the hex field to paste in a hex color \u2014 it will snap to the closest allowed token and show the deltaE distance."}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:["Copy the generated YAML at the bottom to create your token definitions to be used by the"," ",(0,r.jsx)(sH.Anchor,{href:"https://design.discord.tools/foundations/color/token-pipeline",children:"token pipeline"}),"."]})]}),(0,r.jsx)(aC.Z,{selectionMode:"single",label:"Theme",value:t,onSelectionChange:e=>a(e),closeOnSelect:!0,options:s7}),(0,r.jsxs)(tq.B,{gap:16,children:[(0,r.jsx)(Q.D,{variant:"heading-sm/semibold",children:"Gradient Stops"}),(0,r.jsx)("div",{className:sX.G9,children:s0.map((e,t)=>{let a=""!==s[t];return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsxs)(tq.B,{gap:0,className:sX.hi,children:[(0,r.jsx)(p.E,{variant:"text-md/medium",children:e}),(0,r.jsx)(l2.Q,{variant:"secondary",textVariant:"text-xs/normal",text:`(${rr(y.colors[t],parseFloat(y.opacities[t]))})`,onClick:()=>navigator.clipboard.writeText(rr(y.colors[t],parseFloat(y.opacities[t])))})]}),(0,r.jsx)(aC.Z,{selectionMode:"single",label:"Scale",disabled:a,value:y.scales[t],onSelectionChange:e=>{let a=rn[e][0]?.value;E(n=>({...n,scales:ri(n.scales,t,e),colors:null!=a?ri(n.colors,t,a):n.colors}))},closeOnSelect:!0,options:ra}),(0,r.jsx)(aC.Z,{selectionMode:"single",label:"Value",disabled:a,value:y.colors[t],onSelectionChange:e=>E(a=>({...a,colors:ri(a.colors,t,e)})),closeOnSelect:!0,options:_?.[t]??rn[y.scales[t]]}),(0,r.jsx)(f.k,{label:"Opacity",name:`opacity-${t}`,value:y.opacities[t],onChange:e=>E(a=>({...a,opacities:ri(a.opacities,t,e)})),placeholder:"0\u20131"}),(0,r.jsx)(f.k,{label:`Hex${a&&null!=c[t]?` (dE: ${c[t]})`:""}`,name:`hex-${t}`,value:s[t],onChange:e=>{d(a=>ri(a,t,e));let a=function(e){if(!s4.test(e))return null;try{return new rl.A(e.startsWith("#")?e:`#${e}`)}catch{return null}}(e);if(null!=a){let e=function(e){let t=s3,a=s2,n=1/0;for(let l of sQ)for(let i of rn[l]){let s=e.deltaE(function(e){let[t,a,n]=eY.A.unsafe_rawColors[e].resolve().rgba();return new rl.A("srgb",[t/255,a/255,n/255])}(i.value),"2000");s<n&&(n=s,t=i.value,a=l)}return{color:t,scale:a,deltaE:Math.round(100*n)/100}}(a);u(a=>ri(a,t,e.deltaE)),E(a=>({...a,scales:ri(a.scales,t,e.scale),colors:ri(a.colors,t,e.color)}))}else u(e=>ri(e,t,null))},placeholder:"#hex"})]},t)})})]}),j(),(0,r.jsx)(Q.D,{variant:"heading-sm/semibold",children:"Preview"}),(0,r.jsx)(sz.GE,{value:{...e,theme:t},children:(0,r.jsx)(eH.N,{theme:t,children:e=>(0,r.jsx)("div",{className:e,children:(0,r.jsx)(tq.B,{gap:16,children:(0,r.jsx)("ul",{className:sX.$8,style:{background:eY.A.colors.BACKGROUND_BASE_LOWEST.css},children:rt.map((e,t)=>(0,r.jsx)(ef.z9,{route:"",selected:m===e.id,onClick:()=>h(e.id),icon:e.icon,text:e.text,showHoverGradient:!0,nitroHoverGradient:"nitroHoverGradient"in e,role:"listitem",tabIndex:0,onFocus:()=>{},..."useCustomGradient"in e&&{hoverGradientStart:rs(y.colors[0],parseFloat(y.opacities[0])),hoverGradientMiddle:rs(y.colors[1],parseFloat(y.opacities[1])),hoverGradientEnd:rs(y.colors[2],parseFloat(y.opacities[2]))},...{"data-list-item-id":`devtools-preview-${t}`},children:"useCustomGradient"in e&&v.buttonBackground?.src!=null&&(0,r.jsx)("div",{style:{position:"absolute",height:"100%",bottom:0,insetInlineEnd:0,pointerEvents:"none",borderRadius:"inherit"},children:(0,r.jsx)("img",{src:v.buttonBackground.src,alt:"","aria-hidden":!0,style:{height:"100%",maxWidth:"100%",objectFit:"cover",objectPosition:"bottom right",borderRadius:"inherit"}})})},e.id))})})})})}),null!=N&&(0,r.jsxs)(tq.B,{gap:16,children:[(0,r.jsx)(Q.D,{variant:"heading-sm/semibold",children:"Results"}),N.map(e=>{let{theme:t,label:a,result:n}=e;return null!=n?(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:a}),(0,r.jsx)(J.w,{type:n.passes?"success":"critical",message:`${n.passes?"\u2713 Passes":"\u2717 Fails"} WCAG AA \u{2014} Min contrast: ${n.minContrastRatio} : 1`,role:"status"}),!n.passes&&null!=n.suggestion&&(0,r.jsxs)(tq.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Suggestion:"}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:[s0[n.suggestion.stopIndex],": ",(0,r.jsx)("strong",{children:n.suggestion.suggestedColor})," \u2192"," ",n.suggestion.resultingMinContrast," : 1"]})]}),!n.passes&&null==n.suggestion&&(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"No single swap from the same color scale would fix the contrast ratio."})]},t):null})]}),(0,r.jsx)(rd,{allResolvedStops:b})]})})}var rg=a(820739),rv=a(230135),rj=a(45780),rf=a(868652),rb=a(859241);let ry=[aO.M.GUILD_POWERUP_PERKS_COACHMARK,aO.M.GUILD_POWERUPS_OVERVIEW_SIDEBAR_COACHMARK,aO.M.GUILD_POWERUP_NOTIFICATION,aO.M.GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK,aO.M.GUILD_POWERUP_NEW_PERK_AVAILABLE_BADGE],rE=[aO.V.GUILD_POWERUP_LEVEL_1_COACHMARK,aO.V.GUILD_POWERUP_LEVEL_2_COACHMARK,aO.V.GUILD_POWERUP_LEVEL_3_COACHMARK,aO.V.GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK,aO.V.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK],rC=[aO.V.ADOPT_CLAN_IDENTITY_NOTICE];function rS(e){switch(e){case aO.V.GUILD_POWERUP_LEVEL_1_COACHMARK:return"GUILD_POWERUP_LEVEL_1_COACHMARK";case aO.V.GUILD_POWERUP_LEVEL_2_COACHMARK:return"GUILD_POWERUP_LEVEL_2_COACHMARK";case aO.V.GUILD_POWERUP_LEVEL_3_COACHMARK:return"GUILD_POWERUP_LEVEL_3_COACHMARK";case aO.V.GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK:return"GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK";case aO.V.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK:return"GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK";case aO.V.ADOPT_CLAN_IDENTITY_NOTICE:return"ADOPT_CLAN_IDENTITY_NOTICE";default:return String(e)}}var r_=a(374336);async function rN(e,t,a){await l7.Bo.patch({url:eu.Rsh.APPLIED_BOOST_MODIFY_END_DATE,body:{applied_boost_ids:t.map(e=>e.id),ends_at:a?null:nU()().add(1,"day")},rejectWithError:!0}),(0,rg.VU)(e),(0,rf.Xd)(e,!0)}async function rA(e){await l7.Bo.post({url:eu.Rsh.SEND_POWERUPS_SYSTEM_MESSAGE(e),rejectWithError:!0})}function rk(){let e=(0,d.bG)([nS.A],()=>nS.A.getGuildId()),t=(0,d.bG)([nC.A],()=>nC.A.getGuild(e)?.name),a=(0,d.yK)([aL.A],()=>[...rE,...rC].filter(t=>null!=e&&(0,rj.zs)(t,e))),n=(0,d.yK)([rb.A],()=>null!=e?rb.A.getAppliedGuildBoostsForGuild(e)??[]:[]);if(null!=e)return(0,r.jsxs)(g.Ip,{className:r_.kL,children:[(0,r.jsx)("div",{className:r_.uW,children:(0,r.jsx)(Q.D,{variant:"heading-md/normal",children:`Current guild: ${t}`})}),(0,r.jsxs)("div",{className:r_.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",className:r_.wx,children:"Reset Notification Indicators"}),(0,r.jsx)(x.$,{variant:"primary",text:"Reset",onClick:()=>{(0,rf.qM)()}})]}),(0,r.jsxs)("div",{className:r_.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",className:r_.wx,children:"Reset Progress Bar State"}),(0,r.jsx)(x.$,{variant:"primary",text:"Reset",onClick:rv.O})]}),(0,r.jsxs)("div",{className:r_.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",children:"Set Warning State"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(x.$,{variant:"primary",text:"Set Half Boosts expiring in 1 day",onClick:()=>{rN(e,n.slice(Math.floor(n.length/2)),!1)}}),(0,r.jsx)(x.$,{variant:"primary",text:"Reset End Date",onClick:()=>{rN(e,n,!0)}})]})]}),(0,r.jsxs)("div",{className:r_.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",className:r_.wx,children:"Reset User Level DCs"}),(0,r.jsx)(tq.B,{gap:16,children:ry.map(e=>(0,r.jsx)(lF,{className:r_.z6,content:aO.M[e]},aO.M[e]))})]}),(0,r.jsx)("div",{className:r_.uW,children:(0,r.jsx)(u.n,{label:"Reset Guild Level DCs",children:rE.map(t=>(0,r.jsx)(m.d,{label:rS(t),checked:a.includes(t),onChange:a=>{a?(0,rj._$)(t,e,!1):((0,aM._N)(aO.M.GUILD_POWERUP_NOTIFICATION),(0,rj.hk)(t,e))}},t))})}),(0,r.jsx)("div",{className:r_.uW,children:(0,r.jsx)(u.n,{label:"Reset Server Tag Guild Level DCs",children:rC.map(t=>(0,r.jsx)(m.d,{label:rS(t),checked:a.includes(t),onChange:a=>{a?(0,rj._$)(t,e,!1):((0,aM._N)(aO.M.GUILD_POWERUP_NOTIFICATION),(0,rj.hk)(t,e))}},t))})}),(0,r.jsxs)("div",{className:r_.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",className:r_.wx,children:"Send Powerups System Message"}),(0,r.jsx)(x.$,{variant:"primary",text:"Send System Message",onClick:()=>{rA(e)}})]}),(0,r.jsx)(x.$,{variant:"primary",text:"Reset GameServer ToS",onClick:()=>{(0,iZ.Wp)(!1)}})]})}var rD=a(450510),rI=a(648048);function rT(e){let{hotspotLocation:t}=e,[a,n]=(0,d.yK)([rD.HP],()=>[rD.HP.hasHotspot(t,!0),rD.HP.getHotspotOverride(t)]);return(0,r.jsx)(j.l,{label:t,errorMessage:a?"Inactive":void 0,successMessage:a?"Active":void 0,value:n,options:[{id:"none",value:void 0,label:"No Override"},{id:"active",value:!0,label:"Force Active"},{id:"inactive",value:!1,label:"Force Inactive"}],onSelectionChange:e=>null!=e?(0,rD.Kl)(t,e):(0,rD.LF)(t),selectionMode:"single",fullWidth:!0})}function rR(){return(0,r.jsx)(g.Ip,{className:tZ.nd,children:(0,r.jsx)(u.n,{label:"Hotspots",description:"All the 'hotspots' in app, and their current status. Use the select menu to override them on or off.",className:rI.IN,children:(0,r.jsx)(tq.B,{gap:20,children:Object.keys(rD._2).sort((e,t)=>e.localeCompare(t)).map(e=>(0,r.jsx)(rT,{hotspotLocation:e},e))})})})}var rw=a(632296),rO=a(855522),rM=a(37646),rL=a(773669);function rP(){let e=(0,d.bG)([rL.default],()=>rL.default.locale),[t,a]=o.useState(),n=(0,rw.runtimeHashMessageKey)(t??""),l=o.useMemo(()=>nN.t[n],[n]);return(0,r.jsxs)("div",{children:[(0,r.jsxs)(nr.Ay,{children:[(0,r.jsx)(nr.Ay.Icon,{icon:rM.U,tooltip:"Locale"}),(0,r.jsx)(nr.Ay.Title,{children:"Locale"})]}),(0,r.jsxs)(n5,{children:[(0,r.jsx)(n4,{name:"Active System",children:"@discord/intl"}),(0,r.jsx)(n4,{name:"App",children:e}),(0,r.jsx)(n4,{name:"System",children:nN.systemLocale}),(0,r.jsx)(n4,{name:"@discord/intl",children:nN.intl.currentLocale}),(0,r.jsx)(n4,{name:"common i18n",children:rO.A.getLocale()}),(0,r.jsx)(n4,{name:"Moment",children:nU().locale()})]}),(0,r.jsxs)(nr.Ay,{children:[(0,r.jsx)(nr.Ay.Icon,{icon:rM.U,tooltip:"Messages"}),(0,r.jsx)(nr.Ay.Title,{children:"New System Messages"})]}),(0,r.jsx)(n5,{children:(0,r.jsx)(n4,{name:"Unique Rendered Main Messages",children:Object.keys(nN.t).length})}),(0,r.jsx)("div",{style:{margin:16},children:(0,r.jsx)(f.k,{onChange:function(e){a(e)},name:"Message name",placeholder:"Find a message"})}),(0,r.jsxs)(n5,{children:[(0,r.jsx)(n4,{name:"Hashed key",children:n}),(0,r.jsx)(n4,{name:"Exists?",children:null!=l?"yes":"no"})]}),(0,r.jsx)(no.A,{data:l?.(e)})]})}var rU=a(434404);function rG(){let{node:e}=(0,ei.Ay)(rU.F,"");return(0,r.jsx)(g.Ip,{className:tZ.nd,children:(0,r.jsx)("div",{style:{padding:"var(--space-8)"},children:(0,r.jsx)(el.A,{node:e},e.key)})})}var rB=a(361158),rF=a(80556),r$=a(219503),rV=a(665095),rW=a(87404);function rz(){return(0,r.jsx)(g.Ip,{className:tZ.nd,children:(0,r.jsxs)("div",{className:i$.l$,children:[(0,r.jsxs)("section",{className:i$.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-md/semibold",children:"Verification Layer"}),(0,r.jsx)("div",{className:i$.bd,children:(0,r.jsx)(x.$,{variant:"primary",text:"Open Verification Layer",onClick:function(){(0,rB.B8)(()=>(0,r.jsx)(rV.A,{}),{layerKey:rW._s,Layer:rF.Ay})}})})]}),(0,r.jsxs)("section",{className:i$.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-md/semibold",children:"Safety Flow"}),(0,r.jsx)("div",{className:i$.bd,children:(0,r.jsx)(x.$,{variant:"primary",text:"Open Safety Flow",onClick:function(){(0,rB.B8)(e=>{let{closeLayer:t}=e;return(0,r.jsx)(r$.A,{onClose:t})},{layerKey:rW._s,Layer:rF.Ay})}})})]}),(0,r.jsxs)("section",{className:i$.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-md/semibold",children:"Layer Controls"}),(0,r.jsx)("div",{className:i$.bd,children:(0,r.jsx)(x.$,{variant:"primary",text:"Close All Layers",onClick:function(){rB.xr.setState({fullScreenLayers:[]})}})})]})]})})}a(393431),a(532706),a(42231),a(232424),a(949626),a(767709),a(65162);var rH=a(687813),rK=a(604121);let rY={"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Navigation_Messages_Opt.lottie":()=>a.e("136508").then(a.t.bind(a,655671,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Navigation_Notifications_Opt.lottie":()=>a.e("405252").then(a.t.bind(a,323823,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Navigation_Servers_CombinedEE.lottie":()=>a.e("565154").then(a.t.bind(a,670649,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Navigation_Servers_Opt.lottie":()=>a.e("277248").then(a.t.bind(a,342787,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Navigation_You_Opt.lottie":()=>a.e("393401").then(a.t.bind(a,959328,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Requests_Messages.lottie":()=>a.e("748614").then(a.t.bind(a,713893,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Activities.lottie":()=>a.e("32431").then(a.t.bind(a,857778,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/AppsIcon.lottie":()=>a.e("337415").then(a.t.bind(a,996858,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Camera.lottie":()=>a.e("475913").then(a.t.bind(a,999344,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Deafen.lottie":()=>a.e("61309").then(a.t.bind(a,433356,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/EndCall.lottie":()=>a.e("727847").then(a.t.bind(a,72922,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/GIF.lottie":()=>a.e("932886").then(a.t.bind(a,456309,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Gift.lottie":()=>a.e("243734").then(a.t.bind(a,733813,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Microphone.lottie":()=>a.e("926620").then(a.t.bind(a,890007,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/OrbsEarnSpend.lottie":()=>a.e("492568").then(a.t.bind(a,149707,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/OrbsEarnSpendLightTheme.lottie":()=>a.e("282715").then(a.t.bind(a,147734,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Screenshare.lottie":()=>a.e("829721").then(a.t.bind(a,218048,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Settings.lottie":()=>a.e("494483").then(a.t.bind(a,155806,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Soundboard.lottie":()=>a.e("350115").then(a.t.bind(a,535662,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Sticker.lottie":()=>a.e("897473").then(a.t.bind(a,956248,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Waveform.lottie":()=>a.e("665373").then(a.t.bind(a,914028,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge01.lottie":()=>a.e("875199").then(a.t.bind(a,904066,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge02.lottie":()=>a.e("633900").then(a.t.bind(a,185319,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge03.lottie":()=>a.e("665405").then(a.t.bind(a,743372,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge06.lottie":()=>a.e("227648").then(a.t.bind(a,195011,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge09.lottie":()=>a.e("729095").then(a.t.bind(a,619578,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge12.lottie":()=>a.e("994131").then(a.t.bind(a,676574,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge15.lottie":()=>a.e("765404").then(a.t.bind(a,384407,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge18.lottie":()=>a.e("911817").then(a.t.bind(a,110320,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge24.lottie":()=>a.e("284996").then(a.t.bind(a,248476,17)),"discord_common/js/shared/animations/app/gifts/seasonal/box/box-action.lottiejson":()=>a.e("719534").then(a.t.bind(a,87037,19)),"discord_common/js/shared/animations/app/gifts/seasonal/box/box-idle.lottiejson":()=>a.e("812250").then(a.t.bind(a,553998,19)),"discord_common/js/shared/animations/app/gifts/seasonal/box/box-loop.lottiejson":()=>a.e("58526").then(a.t.bind(a,138157,19)),"discord_common/js/shared/animations/app/gifts/seasonal/cake/cake-action.lottiejson":()=>a.e("964376").then(a.t.bind(a,37259,19)),"discord_common/js/shared/animations/app/gifts/seasonal/cake/cake-idle.lottiejson":()=>a.e("730800").then(a.t.bind(a,683891,19)),"discord_common/js/shared/animations/app/gifts/seasonal/cake/cake-loop.lottiejson":()=>a.e("852436").then(a.t.bind(a,45887,19)),"discord_common/js/shared/animations/app/gifts/seasonal/chest/chest-action.lottiejson":()=>a.e("403086").then(a.t.bind(a,118301,19)),"discord_common/js/shared/animations/app/gifts/seasonal/chest/chest-idle.lottiejson":()=>a.e("437690").then(a.t.bind(a,733057,19)),"discord_common/js/shared/animations/app/gifts/seasonal/chest/chest-loop.lottiejson":()=>a.e("582078").then(a.t.bind(a,553101,19)),"discord_common/js/shared/animations/app/gifts/seasonal/coffee/coffee-action.lottiejson":()=>a.e("751992").then(a.t.bind(a,558251,19)),"discord_common/js/shared/animations/app/gifts/seasonal/coffee/coffee-idle.lottiejson":()=>a.e("264400").then(a.t.bind(a,94995,19)),"discord_common/js/shared/animations/app/gifts/seasonal/coffee/coffee-loop.lottiejson":()=>a.e("239476").then(a.t.bind(a,367327,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/gift_icon/seasonal-gifting-wumpus-action.lottiejson":()=>a.e("827568").then(a.t.bind(a,579571,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/gift_icon/seasonal-gifting-wumpus-loop.lottiejson":()=>a.e("525676").then(a.t.bind(a,322151,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/seasonal_wumpus/seasonal-wumpus-action.lottiejson":()=>a.e("710803").then(a.t.bind(a,27870,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/seasonal_wumpus/seasonal-wumpus-idle.lottiejson":()=>a.e("410191").then(a.t.bind(a,837074,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/seasonal_wumpus/seasonal-wumpus-loop.lottiejson":()=>a.e("761223").then(a.t.bind(a,547450,19)),"discord_common/js/shared/animations/app/gifts/seasonal/nitroween/halloween-action.lottiejson":()=>a.e("969842").then(a.t.bind(a,809865,19)),"discord_common/js/shared/animations/app/gifts/seasonal/nitroween/halloween-idle.lottiejson":()=>a.e("699166").then(a.t.bind(a,334829,19)),"discord_common/js/shared/animations/app/gifts/standard/box/box-action.lottiejson":()=>a.e("698287").then(a.t.bind(a,380082,19)),"discord_common/js/shared/animations/app/gifts/standard/box/box-idle.lottiejson":()=>a.e("212427").then(a.t.bind(a,676614,19)),"discord_common/js/shared/animations/app/gifts/standard/box/box-loop.lottiejson":()=>a.e("831939").then(a.t.bind(a,900110,19)),"discord_common/js/shared/animations/app/gifts/standard/cake/cake-action.lottiejson":()=>a.e("371305").then(a.t.bind(a,629456,19)),"discord_common/js/shared/animations/app/gifts/standard/cake/cake-idle.lottiejson":()=>a.e("170625").then(a.t.bind(a,254424,19)),"discord_common/js/shared/animations/app/gifts/standard/cake/cake-loop.lottiejson":()=>a.e("233449").then(a.t.bind(a,690576,19)),"discord_common/js/shared/animations/app/gifts/standard/chest/chest-action.lottiejson":()=>a.e("346791").then(a.t.bind(a,690842,19)),"discord_common/js/shared/animations/app/gifts/standard/chest/chest-idle.lottiejson":()=>a.e("828115").then(a.t.bind(a,755678,19)),"discord_common/js/shared/animations/app/gifts/standard/chest/chest-loop.lottiejson":()=>a.e("408891").then(a.t.bind(a,778422,19)),"discord_common/js/shared/animations/app/gifts/standard/coffee/coffee-action.lottiejson":()=>a.e("958009").then(a.t.bind(a,433504,19)),"discord_common/js/shared/animations/app/gifts/standard/coffee/coffee-idle.lottiejson":()=>a.e("702897").then(a.t.bind(a,976584,19)),"discord_common/js/shared/animations/app/gifts/standard/coffee/coffee-loop.lottiejson":()=>a.e("252793").then(a.t.bind(a,858464,19)),"discord_app/images/burst_reactions/BurstReaction_Anime_v01_Lottie.lottiejson":()=>a.e("674149").then(a.t.bind(a,965892,19)),"discord_app/images/burst_reactions/BurstReaction_Arcade_v01.lottiejson":()=>a.e("517087").then(a.t.bind(a,44194,19)),"discord_app/images/burst_reactions/BurstReaction_BlackHoles_v01.lottiejson":()=>a.e("4289").then(a.t.bind(a,141208,19)),"discord_app/images/burst_reactions/BurstReaction_BlastOff_v04.lottiejson":()=>a.e("277339").then(a.t.bind(a,420054,19)),"discord_app/images/burst_reactions/BurstReaction_Crystal_v04.lottiejson":()=>a.e("366414").then(a.t.bind(a,33565,19)),"discord_app/images/burst_reactions/BurstReaction_Fireworks_v03.lottiejson":()=>a.e("331165").then(a.t.bind(a,414956,19)),"discord_app/images/burst_reactions/BurstReaction_Fusion_v03.lottiejson":()=>a.e("158541").then(a.t.bind(a,221340,19)),"discord_app/images/burst_reactions/BurstReaction_Pop_v04.lottiejson":()=>a.e("910169").then(a.t.bind(a,710208,19)),"discord_app/images/burst_reactions/BurstReaction_PowerUp_v05.lottiejson":()=>a.e("276601").then(a.t.bind(a,333984,19)),"discord_app/images/burst_reactions/BurstReaction_Puzzle_v01_Lottie.lottiejson":()=>a.e("484163").then(a.t.bind(a,211342,19)),"discord_app/images/burst_reactions/BurstReaction_Spotlight_v01_Lottie.lottiejson":()=>a.e("252029").then(a.t.bind(a,714316,19)),"discord_app/images/burst_reactions/BurstReaction_StarBlast_v03.lottiejson":()=>a.e("623997").then(a.t.bind(a,851404,19)),"discord_app/images/burst_reactions/BurstReaction_Tube_v01_Lottie.lottiejson":()=>a.e("667133").then(a.t.bind(a,821644,19)),"discord_app/images/burst_reactions/BurstReaction_UFO_v01_Lottie.lottiejson":()=>a.e("684765").then(a.t.bind(a,51244,19)),"discord_app/images/burst_reactions/BurstReaction_Whirlwind_v01_Lottie.lottiejson":()=>a.e("235583").then(a.t.bind(a,668994,19)),"discord_app/images/burst_reactions/mobile/fullscreen/SuperReactions_Mobile_Send_Spotlight_v1.lottiejson":()=>a.e("47862").then(a.t.bind(a,911573,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Anime_v1.lottiejson":()=>a.e("946711").then(a.t.bind(a,23434,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Arcade_v1.lottiejson":()=>a.e("751153").then(a.t.bind(a,743496,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_BlackHoles_v1.lottiejson":()=>a.e("32803").then(a.t.bind(a,252462,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_BlastOff_v1.lottiejson":()=>a.e("819842").then(a.t.bind(a,341529,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Crystal_v1.lottiejson":()=>a.e("585529").then(a.t.bind(a,762464,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Fireworks_v1.lottiejson":()=>a.e("697197").then(a.t.bind(a,47036,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Fusion_v1.lottiejson":()=>a.e("192933").then(a.t.bind(a,279172,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Pop_v1.lottiejson":()=>a.e("905560").then(a.t.bind(a,824888,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_PowerUp_v1.lottiejson":()=>a.e("863011").then(a.t.bind(a,432302,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Puzzle_v1.lottiejson":()=>a.e("369845").then(a.t.bind(a,854420,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Spotlight_v1.lottiejson":()=>a.e("888607").then(a.t.bind(a,997730,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_StarBlast_v2.lottiejson":()=>a.e("696874").then(a.t.bind(a,281073,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Tube_v1.lottiejson":()=>a.e("894147").then(a.t.bind(a,192718,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_UFO_v2.lottiejson":()=>a.e("84992").then(a.t.bind(a,513667,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Whirlwind_v1.lottiejson":()=>a.e("349693").then(a.t.bind(a,754124,19)),"discord_app/modules/guild_member_verification/images/islandMiddleAnimation.lottiejson":()=>a.e("739900").then(a.t.bind(a,144759,19)),"discord_app/modules/premium/web/animations/guild_sidebar_premium_entrypoint_dt.json":()=>a.e("515048").then(a.t.bind(a,366043,19)),"discord_app/modules/premium/web/animations/guild_sidebar_premium_entrypoint_lt.json":()=>a.e("612512").then(a.t.bind(a,789091,19)),"discord_common/js/shared/animations/app/activities/AppsIconWordlePromo.lottiejson":()=>a.e("173550").then(a.t.bind(a,527613,19)),"discord_common/js/shared/animations/app/nearby/nearby.lottiejson":()=>a.e("293780").then(a.t.bind(a,957439,19)),"discord_common/js/shared/animations/app/premium_guild_subscribe/dark.lottiejson":()=>a.e("245470").then(a.t.bind(a,622637,19)),"discord_common/js/shared/animations/app/premium_guild_subscribe/light.lottiejson":()=>a.e("23478").then(a.t.bind(a,262037,19)),"discord_common/js/shared/animations/app/premium_guild_subscription_system_message_easter_egg/index.lottiejson":()=>a.e("698150").then(a.t.bind(a,633343,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/hd_streaming.lottiejson":()=>a.e("520795").then(a.t.bind(a,551574,19)),"discord_common/js/shared/animations/app/premium-payment-tier-2/index.lottiejson":()=>a.e("869421").then(a.t.bind(a,548375,19)),"discord_app/images/burst_reactions/BurstReaction_Bubbles_v03.lottiejson":()=>a.e("91770").then(a.t.bind(a,95553,19)),"discord_app/images/burst_reactions/BurstReaction_Portal_v03.lottiejson":()=>a.e("196515").then(a.t.bind(a,178862,19)),"discord_app/images/burst_reactions/BurstReaction_Slime_v02.lottiejson":()=>a.e("109302").then(a.t.bind(a,16341,19)),"discord_app/images/burst_reactions/mobile/fullscreen/SuperReactions_Mobile_Send_Slime_v1.lottiejson":()=>a.e("247554").then(a.t.bind(a,748761,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Bubbles_v2.lottiejson":()=>a.e("807739").then(a.t.bind(a,106870,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Portal_v1.lottiejson":()=>a.e("979067").then(a.t.bind(a,458486,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Slime_v2.lottiejson":()=>a.e("924584").then(a.t.bind(a,388059,19)),"discord_app/modules/app_launcher/native/images/onboarding_glow.lottiejson":()=>a.e("507985").then(a.t.bind(a,9640,19)),"discord_app/modules/global_discovery_apps/discovering-dabatouille-animation.lottiejson":()=>a.e("995947").then(a.t.bind(a,604902,19)),"discord_app/modules/guild_boosting/animations/animated_guild_icon.lottiejson":()=>a.e("24645").then(a.t.bind(a,624420,19)),"discord_app/modules/guild_member_verification/images/wavingHandLottieAnimation.lottiejson":()=>a.e("515423").then(a.t.bind(a,155147,19)),"discord_app/modules/guild_onboarding/native/animations/landing.lottiejson":()=>a.e("124093").then(a.t.bind(a,280780,19)),"discord_app/modules/guild_onboarding/web/animations/balloon-dog.lottiejson":()=>a.e("225961").then(a.t.bind(a,739408,19)),"discord_app/modules/guild_onboarding/web/animations/bubble-island-02.lottiejson":()=>a.e("187356").then(a.t.bind(a,194199,19)),"discord_app/modules/guild_onboarding/web/animations/grilling-island-02.lottiejson":()=>a.e("556026").then(a.t.bind(a,113473,19)),"discord_app/modules/guild_onboarding/web/animations/main-island-02.lottiejson":()=>a.e("416301").then(a.t.bind(a,694268,19)),"discord_app/modules/guild_onboarding/web/animations/waffle-island-02.lottiejson":()=>a.e("722191").then(a.t.bind(a,896018,19)),"discord_app/modules/poggermode/images/enable_animation.lottiejson":()=>a.e("504660").then(a.t.bind(a,662336,19)),"discord_app/modules/premium/powerups/web/images/server_boost_highlight.json":()=>a.e("867807").then(a.t.bind(a,217762,19)),"discord_app/modules/quests/images/confetti.lottiejson":()=>a.e("40119").then(a.t.bind(a,718698,19)),"discord_app/modules/quests/web/images/quest_bar_background.json":()=>a.e("837316").then(a.t.bind(a,599279,19)),"discord_app/modules/quests/web/images/quest_bar_sparkle.json":()=>a.e("897536").then(a.t.bind(a,478979,19)),"discord_app/modules/self_mod/inappropriate_conversation/images/vibing_wumpus.lottiejson":()=>a.e("114823").then(a.t.bind(a,718074,19)),"discord_common/js/shared/animations/app/everyone_popout/dark.lottiejson":()=>a.e("480467").then(a.t.bind(a,661022,19)),"discord_common/js/shared/animations/app/everyone_popout/light.lottiejson":()=>a.e("892705").then(a.t.bind(a,111992,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/coachmark/seasonal-gifting-coachmark.lottiejson":()=>a.e("561250").then(a.t.bind(a,762361,19)),"discord_common/js/shared/animations/app/playstation/playstation_connecting.lottiejson":()=>a.e("435066").then(a.t.bind(a,844512,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/emoji.lottiejson":()=>a.e("717124").then(a.t.bind(a,616175,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/interstitial_wheel_dark.lottiejson":()=>a.e("394675").then(a.t.bind(a,735678,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/interstitial_wheel_light.lottiejson":()=>a.e("278465").then(a.t.bind(a,247704,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/profile_customization.lottiejson":()=>a.e("762807").then(a.t.bind(a,202282,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/unlock.lottiejson":()=>a.e("131838").then(a.t.bind(a,650125,19)),"discord_common/js/shared/animations/app/premium_marketing/index.lottiejson":()=>a.e("406954").then(a.t.bind(a,964529,19)),"discord_common/js/shared/animations/app/premium_payment_guild/index.lottiejson":()=>a.e("945870").then(a.t.bind(a,738503,19)),"discord_common/js/shared/animations/app/premium-activated-tier-1/premium-activated-tier-1.lottiejson":()=>a.e("505642").then(a.t.bind(a,242993,19)),"discord_common/js/shared/animations/app/premium-payment-tier-0/index.lottiejson":()=>a.e("678503").then(a.t.bind(a,635489,19)),"discord_common/js/shared/animations/app/premium-payment-tier-1/index.lottiejson":()=>a.e("119898").then(a.t.bind(a,262546,19)),"discord_common/js/shared/animations/app/xbox/voice_connect.lottiejson":()=>a.e("40348").then(a.t.bind(a,971799,19)),"discord_common/js/shared/animations/app/xbox/xbox_connecting.lottiejson":()=>a.e("876121").then(a.t.bind(a,709376,19))};function rq(e){let{default:t}=e;return fetch(t).then(e=>e.arrayBuffer()).then(e=>new Promise((t,a)=>{let n=new Uint8Array(e);rH.$1(n,(e,n)=>{null!=e&&a(e);let l=Object.keys(n).reduce((e,t)=>({...e,[t]:JSON.parse(rH.strFromU8(n[t]))}),{}),i=l["manifest.json"];t(l[`animations/${i.animations[0].id}.json`])})}))}function rJ(){let[e,t]=o.useState(void 0),[a,n]=o.useState(400),[l,i]=o.useState(400);return(0,r.jsx)("div",{style:{margin:24},children:(0,r.jsxs)(tq.B,{gap:24,children:[(0,r.jsx)(aC.Z,{options:Object.keys(rY).map(e=>({id:e,label:e,value:e})),value:e,onSelectionChange:t,selectionMode:"single"}),(0,r.jsxs)(tq.B,{gap:8,direction:"horizontal",children:[(0,r.jsx)(f.k,{value:a.toString(),onChange:e=>n(Number(e)),label:"Width"}),(0,r.jsx)(f.k,{value:l.toString(),onChange:e=>i(Number(e)),label:"Height"})]}),(0,r.jsx)(x.$,{size:"sm",disabled:null==e,onClick:async()=>{if(null==e)return;let t=rY[e],a=new Blob([JSON.stringify(e.endsWith(".lottie")?await t().then(rq).then(e0().cloneDeep):await t().then(e=>e0().cloneDeep(e.default)))],{type:"application/json"}),n=URL.createObjectURL(a),l=document.createElement("a");l.href=n,l.download=`${e.split("/").pop()}.json`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(n)},text:"Download"}),null!=e&&(0,r.jsx)("div",{style:{width:a,height:l},children:(0,r.jsx)(rK.a,{importData:()=>{let t=rY[e];return e.endsWith(".lottie")?t().then(rq).then(e0().cloneDeep):t().then(e=>e0().cloneDeep(e.default))}},e)})]})})}var rQ=a(442433),rX=a(395671);let rZ={ClipsContextMenu:async()=>{let{default:e}=await a.e("344751").then(a.bind(a,575538));return t=>(0,r.jsx)(e,{...t})},ActivityPopoutHeaderOverflowMenu:async()=>{let{default:e}=await Promise.all([a.e("202622"),a.e("477233"),a.e("832986")]).then(a.bind(a,728033)),t=new rX.kJ({id:"123456789",name:"Test Activity",icon:null,description:"A test activity for devtools",type:1,coverImage:void 0,primarySkuId:void 0,bot:void 0,splash:void 0,thirdPartySkus:[],isMonetized:!1,isVerified:!1,roleConnectionsVerificationUrl:void 0,parentId:void 0,connectionEntrypointUrl:void 0});return()=>(0,r.jsx)(e,{application:t,channelId:"987654321",onClose:rQ.Z_})},GuildChannelListContextMenu:async()=>{let{default:e}=await Promise.all([a.e("309004"),a.e("419690"),a.e("845322"),a.e("110758")]).then(a.bind(a,455557)),t=Object.values(nC.A.getGuilds())[0];return null==t?()=>null:a=>(0,r.jsx)(e,{...a,guild:t})},GuildContextMenu:async()=>{let{default:e}=await Promise.all([a.e("876364"),a.e("321735"),a.e("996907"),a.e("8159"),a.e("361922"),a.e("403032"),a.e("231541"),a.e("301850"),a.e("936875"),a.e("862179"),a.e("722784"),a.e("906470"),a.e("774550"),a.e("923981"),a.e("331696"),a.e("806391"),a.e("817298"),a.e("707551"),a.e("424216"),a.e("840100"),a.e("742258"),a.e("173896"),a.e("57358"),a.e("722765"),a.e("156912"),a.e("754596"),a.e("191601"),a.e("232000"),a.e("21486"),a.e("304419"),a.e("45268"),a.e("617281"),a.e("733199"),a.e("804510"),a.e("655327"),a.e("335532"),a.e("138545"),a.e("536490"),a.e("771137"),a.e("403655"),a.e("212037"),a.e("577154"),a.e("877730"),a.e("611899"),a.e("527552"),a.e("769266"),a.e("487873"),a.e("765626"),a.e("683302"),a.e("660608"),a.e("744554"),a.e("118203"),a.e("331212"),a.e("638259"),a.e("635958"),a.e("683621"),a.e("711162"),a.e("275179"),a.e("289789"),a.e("116125"),a.e("977412"),a.e("19385"),a.e("692811"),a.e("122218"),a.e("947802"),a.e("449145"),a.e("309004"),a.e("430997"),a.e("728136"),a.e("343116"),a.e("216084"),a.e("387634"),a.e("273669"),a.e("284819"),a.e("466147"),a.e("50342"),a.e("256373"),a.e("161058"),a.e("409391"),a.e("479971"),a.e("810262"),a.e("202622"),a.e("346313"),a.e("463726"),a.e("553203"),a.e("115368"),a.e("343233"),a.e("756684"),a.e("736621"),a.e("419690"),a.e("583827"),a.e("806354"),a.e("359702"),a.e("708364"),a.e("452823"),a.e("556967"),a.e("647011"),a.e("269178"),a.e("553584"),a.e("466913"),a.e("583518"),a.e("752695"),a.e("71719"),a.e("893767"),a.e("213848"),a.e("588307"),a.e("514878"),a.e("676376"),a.e("361347"),a.e("842935"),a.e("73091"),a.e("37786"),a.e("886692"),a.e("637038"),a.e("916373"),a.e("528038"),a.e("518480"),a.e("925172"),a.e("167275"),a.e("8458"),a.e("11810"),a.e("591977"),a.e("890152"),a.e("174337"),a.e("646570"),a.e("287973"),a.e("314863"),a.e("623386"),a.e("375428"),a.e("384951"),a.e("560165"),a.e("712390"),a.e("71167"),a.e("113446"),a.e("161309"),a.e("694529"),a.e("303807"),a.e("143330"),a.e("995210"),a.e("649019"),a.e("991984"),a.e("966016"),a.e("838336"),a.e("317699"),a.e("257032"),a.e("772238"),a.e("845322"),a.e("945651"),a.e("218489"),a.e("114748"),a.e("426386"),a.e("204665"),a.e("652191"),a.e("8422"),a.e("639855"),a.e("214530"),a.e("269786"),a.e("149409"),a.e("928246"),a.e("632607"),a.e("935277")]).then(a.bind(a,237600)),t=Object.values(nC.A.getGuilds())[0];return null==t?()=>null:a=>(0,r.jsx)(e,{...a,guild:t})},GuildFolderContextMenu:async()=>{let{default:e}=await Promise.all([a.e("114748"),a.e("906240")]).then(a.bind(a,595139));return t=>(0,r.jsx)(e,{...t,folderId:1,folderColor:void 0,folderName:void 0,unread:!1})},DeveloperContextMenu:async()=>{let{default:e}=await a.e("715687").then(a.bind(a,646938));return t=>(0,r.jsx)(e,{...t,id:"123456789",label:"Copy Test ID"})},UserSettingsMenu:async()=>{let{default:e}=await Promise.all([a.e("594045"),a.e("926132"),a.e("44491")]).then(a.bind(a,907206));return t=>(0,r.jsx)(e,{...t,onClose:rQ.Z_})},ExpressionPickerContextMenu:async()=>{let{default:e}=await a.e("446132").then(a.bind(a,233503));return t=>(0,r.jsx)(e,{...t})},ForumTagContextMenu:async()=>{let{default:e}=await a.e("432612").then(a.bind(a,960015)),t={id:"123456789",name:"Test Forum Tag"};return()=>(0,r.jsx)(e,{tag:t})},GuildRoleConnectionsModalContextMenu:async()=>{let{default:e}=await a.e("868001").then(a.bind(a,699896));return t=>(0,r.jsx)(e,{...t,roleId:"123456789",onLeaveRole:()=>{console.log("Leave role clicked"),(0,rQ.Z_)()}})},StaffOnlyEntryDebugMenu:async()=>{let{default:e}=await Promise.all([a.e("886456"),a.e("789346")]).then(a.bind(a,949881)),{ContentInventoryEntryType:t}=await Promise.resolve().then(a.bind(a,681154)),{ContentInventoryAuthorType:n}=await Promise.resolve().then(a.bind(a,6161)),l=er.default.getCurrentUser(),i={id:"mock-entry-123",author_id:l?.id??"123456789",author_type:n.USER,content_type:t.PLAYED_GAME,participants:[],traits:[],extra:{type:"played_game_extra",game_name:"Test Game",application_id:"123456789"}};return()=>(0,r.jsx)(e,{entry:i,requestId:"mock-request-123"})},AddQuestionsContextMenu:async()=>{let{AddQuestionsContextMenu:e}=await Promise.all([a.e("289789"),a.e("722765"),a.e("11810"),a.e("838336"),a.e("269786")]).then(a.bind(a,892921)),t=Object.values(nC.A.getGuilds())[0];return null==t?()=>null:a=>(0,r.jsx)(e,{...a,addFormField:e=>{console.log("Add form field:",e),(0,rQ.Z_)()},guild:t,allowTerms:!0})},ChannelListThreadContextMenu:async()=>{let{default:e}=await Promise.all([a.e("926132"),a.e("955557"),a.e("947502"),a.e("343266"),a.e("965789"),a.e("412255"),a.e("63340"),a.e("697367"),a.e("703869"),a.e("51212"),a.e("584615")]).then(a.bind(a,612826)),t=nC.A.getGuilds(),n=null;for(let e of Object.values(t)){for(let t of Object.values(aH.A.getMutableGuildChannelsForGuild(e.id))){let e=aH.A.getAllThreadsForParent(t.id);if(e.length>0){n=e[0];break}}if(null!=n)break}return null==n?(console.log("No thread channel found for ChannelListThreadContextMenu"),()=>null):t=>(0,r.jsx)(e,{...t,channel:n})},MembersTableSortContextMenu:async()=>{let{default:e}=await Promise.all([a.e("73091"),a.e("945651")]).then(a.bind(a,779662)),t=Object.values(nC.A.getGuilds())[0];return null==t?()=>null:()=>(0,r.jsx)(e,{guildId:t.id,onClose:rQ.Z_})},MembersTableJoinTypeContextMenu:async()=>{let{default:e}=await Promise.all([a.e("118203"),a.e("71719"),a.e("514878"),a.e("966016"),a.e("945651")]).then(a.bind(a,316173)),t=Object.values(nC.A.getGuilds())[0];return null==t?()=>null:()=>(0,r.jsx)(e,{guildId:t.id,onClose:rQ.Z_})}},r0={GuildShopSortOptions:o.lazy(async()=>{let{default:e}=await Promise.all([a.e("583518"),a.e("255197"),a.e("250974")]).then(a.bind(a,324269)),{default:t}=await a.e("255197").then(a.bind(a,558060));return{default:()=>(0,r.jsx)(t,{defaultSortOption:void 0,children:(0,r.jsx)(e,{})})}})};function r1(){let e=o.useMemo(()=>Object.keys(rZ).map(e=>({label:e,value:e,id:e})).sort((e,t)=>e.label.localeCompare(t.label)),[]),t=o.useMemo(()=>Object.keys(r0).map(e=>({label:e,value:e,id:e})).sort((e,t)=>e.label.localeCompare(t.label)),[]),[a,n]=o.useState(null),[l,i]=o.useState(null),s=o.useCallback(e=>{null!=a&&(0,rQ.L3)(e,rZ[a])},[a]),d=null!=l?r0[l]:null;return(0,r.jsx)(g.Ip,{className:tZ.nd,children:(0,r.jsxs)(tq.B,{className:i$.l$,gap:16,children:[(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"eyebrow",children:"Context Menus"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Select a menu and click Open to trigger it as a context menu at the button position."})]}),(0,r.jsxs)(tq.B,{direction:"horizontal",gap:8,align:"end",children:[(0,r.jsx)(aC.Z,{label:"Open a Context Menu",placeholder:"Select a menu",options:e,value:a,onSelectionChange:n,selectionMode:"single"}),(0,r.jsx)(x.$,{variant:"primary",text:"Open",disabled:null==a,onClick:s})]}),(0,r.jsxs)(tq.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"eyebrow",children:"Popout Menus"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Select a popout menu to render it. Click the rendered button to open the popout."})]}),(0,r.jsx)(tq.B,{direction:"horizontal",gap:8,align:"end",children:(0,r.jsx)(aC.Z,{label:"Render a Popout Menu",placeholder:"Select a popout",options:t,value:l,onSelectionChange:i,selectionMode:"single"})}),null!=d&&(0,r.jsx)(o.Suspense,{fallback:(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Loading..."}),children:(0,r.jsx)(d,{})})]})})}var r2=a(253506),r3=a(665260),r6=a(97808),r8=a(778712),r5=a(308528),r4=a(148494),r7=a(571694),r9=a(963852),oe=a(704844),ot=a(309010),oa=a(645959),on=a(716371),ol=a(32946);let oi=[{id:"USER_JOIN",value:eu.lAJ.USER_JOIN,label:"User Join"},{id:"CHANNEL_PINNED_MESSAGE",value:eu.lAJ.CHANNEL_PINNED_MESSAGE,label:"Channel Pinned Message"},{id:"GUILD_BOOST",value:eu.lAJ.GUILD_BOOST,label:"Guild Boost"},{id:"GUILD_BOOST_TIER_1",value:eu.lAJ.GUILD_BOOST_TIER_1,label:"Guild Boost Tier 1"},{id:"GUILD_BOOST_TIER_2",value:eu.lAJ.GUILD_BOOST_TIER_2,label:"Guild Boost Tier 2"},{id:"GUILD_BOOST_TIER_3",value:eu.lAJ.GUILD_BOOST_TIER_3,label:"Guild Boost Tier 3"},{id:"THREAD_CREATED",value:eu.lAJ.THREAD_CREATED,label:"Thread Created"},{id:"CHANNEL_FOLLOW_ADD",value:eu.lAJ.CHANNEL_FOLLOW_ADD,label:"Channel Follow Add"},{id:"STAGE_START",value:eu.lAJ.STAGE_START,label:"Stage Start"},{id:"STAGE_END",value:eu.lAJ.STAGE_END,label:"Stage End"},{id:"STAGE_SPEAKER",value:eu.lAJ.STAGE_SPEAKER,label:"Stage Speaker"},{id:"STAGE_RAISE_HAND",value:eu.lAJ.STAGE_RAISE_HAND,label:"Stage Raise Hand"},{id:"STAGE_TOPIC",value:eu.lAJ.STAGE_TOPIC,label:"Stage Topic"},{id:"VOICE_SESSION",value:eu.lAJ.VOICE_SESSION,label:"Voice Session"},{id:"FRIEND_REQUEST_ACCEPTED",value:eu.lAJ.FRIEND_REQUEST_ACCEPTED,label:"Friend Request Accepted"},{id:"GUILD_DISCOVERY_DISQUALIFIED",value:eu.lAJ.GUILD_DISCOVERY_DISQUALIFIED,label:"Discovery Disqualified"},{id:"GUILD_DISCOVERY_REQUALIFIED",value:eu.lAJ.GUILD_DISCOVERY_REQUALIFIED,label:"Discovery Requalified"},{id:"GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING",value:eu.lAJ.GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING,label:"Discovery Grace Initial Warning"},{id:"GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING",value:eu.lAJ.GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING,label:"Discovery Grace Final Warning"},{id:"RECIPIENT_ADD",value:eu.lAJ.RECIPIENT_ADD,label:"Recipient Add"},{id:"RECIPIENT_REMOVE",value:eu.lAJ.RECIPIENT_REMOVE,label:"Recipient Remove"},{id:"CALL",value:eu.lAJ.CALL,label:"Call"}];function os(){let[e,t]=o.useState(eu.lAJ.USER_JOIN),a=(0,d.bG)([ot.Ay],()=>ot.Ay.getChannelId(),[]),n=o.useCallback(()=>{if(null==a||null==e)return;let t=(0,r9.Ay)({channelId:a,content:"",type:e,state:eu.cmJ.SENT});r4.A.receiveMessage(a,t,!1)},[a,e]),l=o.useCallback(()=>{if(null!=a)for(let{value:e}of oi){let t=(0,r9.Ay)({channelId:a,content:"",type:e,state:eu.cmJ.SENT});r4.A.receiveMessage(a,t,!1)}},[a]);return(0,r.jsxs)("div",{className:ol.gs,children:[(0,r.jsx)(aC.Z,{label:"Inject System Message",selectionMode:"single",options:oi,placeholder:"Select type",value:e,onSelectionChange:t}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Inject",onClick:n,disabled:null==a||null==e}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Inject All",onClick:l,disabled:null==a})]})}function or(){let e=(0,d.yK)([oa.A],()=>oa.A.getSortedChannels()[1]),[t,a]=o.useState(e.length>0?e[0].channelId:void 0),{selectedChannel:n,options:l}=(0,d.cf)([aH.A,er.default,aK.A],()=>({selectedChannel:aH.A.getChannel(t),options:e.map(e=>{let t=aH.A.getChannel(e.channelId);return{id:e.channelId,value:e.channelId,label:null!=t?(0,az.m1)(t,er.default,aK.A):e.channelId,leading:null!=t?(0,r.jsx)(r6.eu,{src:(0,r7.Y)(t),"aria-hidden":!0,size:r8._3.SIZE_16}):void 0}})})),i=o.useCallback(()=>{if(null==n||!n.isPrivate())return;let e=(0,r3.PQ)(n.recipientFlags??0,r2.o.DISMISSED_IN_GAME_MESSAGE_NUX);oe.A.updatePrivateChannelRecipientFlags(n.id,e)},[n]),s=!!n?.isPrivate()&&(0,r3.Lt)(n.recipientFlags??0,r2.o.DISMISSED_IN_GAME_MESSAGE_NUX);return(0,r.jsxs)("div",{className:ol.gs,children:[(0,r.jsx)(aC.Z,{label:"In-Game NUX Message for DMs",selectionMode:"single",options:l,placeholder:"Select DM",value:t,onSelectionChange:a}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:s?"Clear NUX Flag":"Set NUX Flag",onClick:i,disabled:null==t})]})}function oo(){let e=o.useCallback(()=>{r5.A.openPrivateChannel({recipientIds:[on.K]})},[]);return(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Open System DM",onClick:e})}function od(){let e=(0,d.bG)([ns.Ay],()=>ns.Ay.allByCategory(ns.xW.MESSAGING),[],d.My).map(e=>{let[t,a,{label:n}]=e;return(0,r.jsx)(m.d,{label:n,description:t,checked:a,onChange:e=>i3(t,e)},t)});return(0,r.jsxs)("div",{className:Y()(tZ.nd,ol.nd),children:[e,(0,r.jsx)("div",{className:ol.yF}),(0,r.jsx)(os,{}),(0,r.jsx)("div",{className:ol.yF}),(0,r.jsx)(or,{}),(0,r.jsx)("div",{className:ol.yF}),(0,r.jsx)(oo,{})]})}var oc=a(205693),ou=a(772707),om=a(150934),oh=a(306537),ox=a(598653),op=a(166403),og=a(625494),ov=a(204925),oj=a(325278);let of={EmailEnterModal:async()=>{let{default:e}=await a.e("429232").then(a.bind(a,180275));return t=>(0,r.jsx)(e,{...t,headerText:nN.intl.string(nN.t.ZLRYGU),confirmButtonText:nN.intl.string(nN.t.PDTjLN),confirmButtonVariant:"primary"})},EmailPincodeModal:async()=>{let{default:e}=await a.e("919840").then(a.bind(a,79779));return t=>(0,r.jsx)(e,{...t,headerText:nN.intl.string(nN.t.H3Q7U8),onFormSubmit:()=>{},onResend:()=>{},onSuccess:()=>{},confirmButtonText:nN.intl.string(nN.t["13ofGu"]),impression:{impressionName:sv.ImpressionNames.URF_CONFIRM_EMAIL_CODE}})},AgeVerificationRetryModal:async()=>{let{default:e}=await Promise.all([a.e("469663"),a.e("518467")]).then(a.bind(a,297102));return t=>(0,r.jsx)(e,{...t,entryPoint:oh.q1.DEV_TOOLS_AGE_VERIFICATION_RETRY_MODAL})},AgeAssuranceGatePrompt:async()=>{let{default:e}=await a.e("922337").then(a.bind(a,361016));return t=>(0,r.jsx)(e,{...t,source:ov.w_.NSFW_SERVER})},DateOfBirthGatePrompt:async()=>{let{default:e}=await Promise.all([a.e("533651"),a.e("682758"),a.e("280022"),a.e("991007")]).then(a.bind(a,189282));return t=>(0,r.jsx)(e,{...t,source:ov.w_.NSFW_SERVER})},ExistingUserAgeGateUnderage:async()=>{let{default:e}=await a.e("280959").then(a.bind(a,784578));return t=>(0,r.jsx)(e,{...t})},NewUserAgeGate:async()=>{let{default:e}=await Promise.all([a.e("533651"),a.e("682758"),a.e("319623"),a.e("280022"),a.e("401143")]).then(a.bind(a,284778));return t=>(0,r.jsx)(e,{...t})},NUFModal:async()=>{let{default:e}=await Promise.all([a.e("188406"),a.e("538288"),a.e("122326"),a.e("533651"),a.e("944492"),a.e("419580"),a.e("197804"),a.e("756856"),a.e("682758"),a.e("999574"),a.e("280022"),a.e("250475"),a.e("993265"),a.e("258118")]).then(a.bind(a,111185));return t=>(0,r.jsx)(e,{...t,onSlideChange:()=>{}})},ClaimAccountModal:async()=>{let{default:e}=await Promise.all([a.e("213042"),a.e("319623"),a.e("121007")]).then(a.bind(a,110744));return t=>(0,r.jsx)(e,{claimRequired:!0,...t})},AutomatedUnderageAppealModal:async()=>{let{default:e}=await Promise.all([a.e("51194"),a.e("909018")]).then(a.bind(a,466702));return t=>(0,r.jsx)(e,{...t,classificationId:"123"})},AutomodRaidResolveModal:async()=>{let{default:e}=await Promise.all([a.e("513221"),a.e("273669"),a.e("307133")]).then(a.bind(a,580812));return t=>(0,r.jsx)(e,{...t,guildId:"123",messageId:null})},AutomodUserProfileQuarantineAlert:async()=>{let{default:e}=await a.e("452343").then(a.bind(a,725034));return t=>(0,r.jsx)(e,{...t,guildId:"123"})},PhoneVerificationModal:async()=>{let{default:e}=await Promise.all([a.e("590275"),a.e("766806"),a.e("989545"),a.e("311493")]).then(a.bind(a,914724));return t=>(0,r.jsx)(e,{error:null,working:!1,validPhone:!1,...t})},VoiceSettingsModal:async()=>{let{default:e}=await a.e("796531").then(a.bind(a,880510));return t=>(0,r.jsx)(e,{...t,mediaEngineContext:oc.x.DEFAULT,subtitle:"Devtools subtitle"})},DynamicGraphicDemo:async()=>{let{DynamicGraphicComponent:e}=await Promise.resolve().then(a.bind(a,116833));return t=>(0,r.jsx)(ou.k,{...t,title:"Dynamic Graphics Demo",subtitle:"This modal demonstrates the dynamic graphics system",graphic:{type:"dynamic",component:e.DEMO,aspectRatio:"6/4",props:{text:"Dynamic Content Loaded!"}},actions:[{variant:"primary",text:"Close",onClick:t.onClose}],children:(0,r.jsx)("div",{children:"This modal showcases the new dynamic graphics system where components can be loaded dynamically based on enum values, providing type safety while maintaining runtime flexibility."})})},OverlayDisabledSurveyModal:async()=>{let{default:e}=await Promise.all([a.e("914052"),a.e("82318")]).then(a.bind(a,387101)),{OverlayToggledClientSettingType:t}=await Promise.resolve().then(a.bind(a,918825));return a=>(0,r.jsx)(e,{...a,clientSettingType:t.LEGACY_GAME,gameId:"123456789"})},PremiumSubscriptionPauseModal:async()=>{let{PremiumSubscriptionPauseModalSelect:e}=await Promise.all([a.e("489361"),a.e("80347")]).then(a.bind(a,318998)),{CancellationContext:t}=await Promise.resolve().then(a.bind(a,916974)),{PremiumTypes:n}=await Promise.resolve().then(a.bind(a,202541)),l={id:"test-subscription-id",userId:"test-user-id",status:1,currency:"usd",currentPeriodStart:new Date,currentPeriodEnd:new Date(Date.now()+2592e6),items:[{id:"test-item-id",planId:"511651880837840896",quantity:1}],paymentSourceId:"test-payment-source",renewalMutations:null,hasActiveTrial:!1};function i(a){let{ref:i,...s}=a,[d,c]=o.useState(null),{onClose:u,transitionState:m}=s,h=o.useMemo(()=>({setStep:()=>{},premiumType:n.TIER_2,onClose:u,transitionState:m,premiumSubscription:l,analyticsLocations:[],analyticsLocation:void 0,confettiCanvas:null,churnUserDiscountOffer:null,isFetchingChurnDiscountOffer:!1,fullPrice:"$9.99",discountedPrice:void 0,planId:"511651880837840896",paymentsBlocked:!1,renewalInvoice:null,renewalInvoiceDetails:null,handleCancellation:async()=>{},applyOffer:async()=>{},pauseDuration:d,setPauseDuration:c}),[u,m,d]);return(0,r.jsx)(t.Provider,{value:h,children:(0,r.jsx)(e,{})})}return i.displayName="PremiumSubscriptionPauseModalWrapper",e=>(0,r.jsx)(i,{...e})},NewMemberActionModal:async()=>{let{default:e}=await Promise.all([a.e("266281"),a.e("287973"),a.e("652191"),a.e("813949"),a.e("354569")]).then(a.bind(a,251632)),{NewMemberActionTypes:t}=await Promise.resolve().then(a.bind(a,374084)),n={channelId:"123456789",title:"Welcome to the server!",description:"Say hello in the welcome channel",actionType:t.CHAT,emoji:null,icon:null};return t=>(0,r.jsx)(e,{...t,guildId:"123456789",action:n,onSave:(e,t,a)=>{console.log("NewMemberActionModal onSave:",{action:e,iconData:t,shouldSaveIcon:a})},onDelete:()=>{console.log("NewMemberActionModal onDelete")}})},PlayStationModal:async()=>{let{default:e}=await Promise.all([a.e("187880"),a.e("465694"),a.e("398816")]).then(a.bind(a,855170)),t=await Promise.resolve().then(a.bind(a,643501)),{createChannelRecord:n}=await Promise.resolve().then(a.bind(a,95701)),l=n({id:"123456789",name:"test-voice-channel",type:2,guild_id:"987654321",position:0,permissionOverwrites:{},parent_id:void 0,nsfw:!1,topic:void 0,lastMessageId:void 0,bitrate:64e3,userLimit:0,rateLimitPerUser:0,icon:null,ownerId:null,application_id:null,lastPinTimestamp:null,rtcRegion:null,videoQualityMode:null,messageCount:0,memberCount:0,threadMetadata:void 0,member:void 0,defaultAutoArchiveDuration:void 0,flags:0,totalMessageSent:0,availableTags:[],appliedTags:[],defaultReactionEmoji:null,defaultThreadRateLimitPerUser:0,defaultSortOrder:null,defaultForumLayout:0}),i={"device-1":{id:"device-1",name:"PS5 - Living Room",platform:"playstation"},"device-2":{id:"device-2",name:"PS5 - Bedroom",platform:"playstation"},"device-3":{id:"device-3",name:"PS4 - Office",platform:"playstation"}},s=a=>{let n=t.default.getDevicesForPlatform,s=t.default.getFetchingDevices,o=t.default.getLastSelectedDeviceByPlatform,d=t.default.getAwaitingRemoteSessionInfo;t.default.getDevicesForPlatform=e=>e===eu.fg2.PLAYSTATION?i:n.call(t.default,e),t.default.getFetchingDevices=e=>e!==eu.fg2.PLAYSTATION&&s.call(t.default,e),t.default.getLastSelectedDeviceByPlatform=e=>e===eu.fg2.PLAYSTATION?"device-1":o.call(t.default,e),t.default.getAwaitingRemoteSessionInfo=()=>null;let c=a.onClose;return a.onClose=async()=>{t.default.getDevicesForPlatform=n,t.default.getFetchingDevices=s,t.default.getLastSelectedDeviceByPlatform=o,t.default.getAwaitingRemoteSessionInfo=d,await c()},(0,r.jsx)(e,{...a,channel:l,platform:eu.fg2.PLAYSTATION})};return s.displayName="PlayStationModalWrapper",s},GameDetectionReportModal:async()=>{let{default:e}=await Promise.all([a.e("568035"),a.e("627495")]).then(a.bind(a,651930));return t=>(0,r.jsx)(e,{...t,detected:{applicationId:"123456789",name:"Test Game"}})},AppealIngestionModal:async()=>{let{default:e}=await Promise.all([a.e("726464"),a.e("292030"),a.e("51471")]).then(a.bind(a,550560));return t=>(0,r.jsx)(e,{...t,classificationId:"123456789"})},CreateTagModal:async()=>{let{default:e}=await Promise.all([a.e("143172"),a.e("347326")]).then(a.bind(a,950989));return t=>(0,r.jsx)(e,{...t,channelId:"123456789",guildId:"987654321"})},CreateTagModalEdit:async()=>{let{default:e}=await Promise.all([a.e("143172"),a.e("347326")]).then(a.bind(a,950989)),t={id:"tag-123",name:"Bug Report",emojiId:"123456789",emojiName:"\uD83D\uDC1B",moderated:!0};return a=>(0,r.jsx)(e,{...a,channelId:"123456789",guildId:"987654321",tag:t})},ConfirmModal:async()=>{let{ConfirmModal:e}=await Promise.all([a.e("304823"),a.e("223976"),a.e("977260")]).then(a.bind(a,397927));return t=>(0,r.jsx)(e,{...t,title:"Confirm Action",subtitle:"Are you sure you want to perform this action? This action cannot be undone.",confirmText:"Confirm",onConfirm:()=>console.log("ConfirmModal: Confirmed"),onCancel:()=>console.log("ConfirmModal: Cancelled")})},AlertModal:async()=>{let{Alert:e}=await Promise.all([a.e("844331"),a.e("21553")]).then(a.bind(a,381512));return t=>(0,r.jsx)(e,{...t,title:"Alert",body:"This is an alert message with a single action.",confirmText:"OK",onConfirm:()=>console.log("AlertModal: Confirmed")})},AlertModalWithCancel:async()=>{let{Alert:e}=await Promise.all([a.e("844331"),a.e("21553")]).then(a.bind(a,381512));return t=>(0,r.jsx)(e,{...t,title:"Confirm Action",body:"Are you sure you want to proceed with this action?",confirmText:"Yes",cancelText:"No",onConfirm:()=>console.log("AlertModalWithCancel: Confirmed"),onCancel:()=>console.log("AlertModalWithCancel: Cancelled")})},AlertModalWithSecondary:async()=>{let{Alert:e}=await Promise.all([a.e("844331"),a.e("21553")]).then(a.bind(a,381512));return t=>(0,r.jsx)(e,{...t,title:"Settings Change",body:"This will change your account settings.",confirmText:"Apply",cancelText:"Cancel",secondaryConfirmText:"Don't show this again",onConfirm:()=>console.log("AlertModalWithSecondary: Confirmed"),onCancel:()=>console.log("AlertModalWithSecondary: Cancelled"),onConfirmSecondary:()=>console.log("AlertModalWithSecondary: Secondary action confirmed")})},GuildDisableCommunicationModal:async()=>{let{Button:e,Text:t,Heading:n,Checkbox:l,ButtonGroup:i}=await Promise.all([a.e("304823"),a.e("223976"),a.e("977260")]).then(a.bind(a,397927)),{DisableCommunicationDuration:s,getFriendlyDurationString:o}=await Promise.resolve().then(a.bind(a,200700)),d=await Promise.resolve().then(a.t.bind(a,582128,19)),c="TestUser";function u(a){let[u,m]=d.useState(s.DURATION_60_SEC),[h,x]=d.useState(""),[p,g]=d.useState(!1),[v,j]=d.useState(!1),f=[{value:s.DURATION_60_SEC,label:o(s.DURATION_60_SEC)},{value:s.DURATION_5_MIN,label:o(s.DURATION_5_MIN)},{value:s.DURATION_10_MIN,label:o(s.DURATION_10_MIN)},{value:s.DURATION_1_HOUR,label:o(s.DURATION_1_HOUR)},{value:s.DURATION_1_DAY,label:o(s.DURATION_1_DAY)},{value:s.DURATION_1_WEEK,label:o(s.DURATION_1_WEEK)}],b=d.useCallback(async()=>{g(!0),console.log("GuildDisableCommunicationModal: Timing out user",{user:c,duration:o(u),reason:null!=h?h:"No reason provided",resolveFlag:v}),await new Promise(e=>setTimeout(e,1e3)),g(!1),a.onClose()},[u,h,v,a]);return(0,r.jsxs)("div",{style:{padding:"20px",maxWidth:"500px"},children:[(0,r.jsxs)(n,{variant:"heading-lg/semibold",className:"mb-2",children:["Disable Communication for ",c,"#","0001"]}),(0,r.jsx)(t,{variant:"text-sm/normal",className:"mb-4",color:"text-subtle",children:"This will temporarily disable the user's ability to communicate in this server."}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)(n,{variant:"heading-sm/semibold",className:"mb-2",children:"Duration"}),(0,r.jsx)(i,{children:f.map(t=>(0,r.jsx)(e,{variant:u===t.value?"primary":"secondary",size:"sm",text:t.label,onClick:()=>m(t.value)},t.value))})]}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)(n,{variant:"heading-sm/semibold",className:"mb-2",children:"Reason (Optional)"}),(0,r.jsx)("textarea",{value:h,onChange:e=>x(e.target.value),placeholder:"Enter reason for timeout...",style:{width:"100%",minHeight:"80px",padding:"8px",border:"1px solid var(--border-subtle)",borderRadius:"4px",backgroundColor:"var(--background-base-low)",color:"var(--text-strong)",resize:"vertical"}})]}),(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(l,{checked:v,onChange:j,label:"Resolve associated mod report"})}),(0,r.jsxs)("div",{style:{display:"flex",gap:"8px",justifyContent:"flex-end"},children:[(0,r.jsx)(e,{variant:"secondary",text:"Cancel",onClick:a.onClose}),(0,r.jsx)(e,{variant:"primary",text:"Timeout User",onClick:b,disabled:p})]})]})}return e=>(0,r.jsx)(u,{...e})},GuildPowerupDeactivateModal:async()=>{let{Button:e,Text:t,Heading:n,Checkbox:l}=await Promise.all([a.e("304823"),a.e("223976"),a.e("977260")]).then(a.bind(a,397927)),i=await Promise.resolve().then(a.t.bind(a,582128,19)),s="Level 3 Server Boost",o=200,d=60,c=8;function u(a){let[u,m]=i.useState(!1),[h,x]=i.useState(!1),p=i.useCallback(async()=>{x(!0),console.log("GuildPowerupDeactivateModal: Deactivating powerup",{powerup:s,guildId:"123456789"}),await new Promise(e=>setTimeout(e,2e3)),x(!1),a.onClose()},[a]);return(0,r.jsxs)("div",{style:{padding:"20px",maxWidth:"500px"},children:[(0,r.jsxs)(n,{variant:"heading-lg/semibold",className:"mb-2",children:["Deactivate ",s]}),(0,r.jsxs)(t,{variant:"text-sm/normal",className:"mb-4",color:"text-subtle",children:["This will remove the ",s," from your server and disable all associated features."]}),(0,r.jsxs)("div",{className:"mb-4",style:{backgroundColor:"var(--background-base-lower)",padding:"16px",borderRadius:"8px",border:"1px solid var(--border-subtle)"},children:[(0,r.jsx)(n,{variant:"heading-sm/semibold",className:"mb-2",children:"Current Features"}),(0,r.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px"},children:[(0,r.jsxs)(t,{variant:"text-sm/normal",color:"text-subtle",children:["\u2022 ",o," emoji slots"]}),(0,r.jsxs)(t,{variant:"text-sm/normal",color:"text-subtle",children:["\u2022 ",d," sticker slots"]}),(0,r.jsxs)(t,{variant:"text-sm/normal",color:"text-subtle",children:["\u2022 ",c," sound slots"]}),(0,r.jsx)(t,{variant:"text-sm/normal",color:"text-subtle",children:"\u2022 Custom server banner"})]})]}),(0,r.jsxs)("div",{className:"mb-4",style:{backgroundColor:"var(--background-danger)",padding:"16px",borderRadius:"8px",border:"1px solid var(--border-feedback-critical)"},children:[(0,r.jsxs)(t,{variant:"eyebrow",color:"text-feedback-critical",className:"mb-2",children:[(0,r.jsx)("span",{role:"img","aria-label":"Warning",children:"\u26A0\uFE0F"})," ","Warning"]}),(0,r.jsx)(t,{variant:"text-sm/medium",color:"text-feedback-critical",children:"Deactivating this powerup will immediately remove all Level 3 features from your server. Members will lose access to custom emojis, stickers, and other premium features. This action cannot be undone."})]}),(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(l,{checked:u,onChange:m,label:"I understand that deactivating this powerup will remove all Level 3 features from my server",labelType:"secondary"})}),(0,r.jsxs)("div",{style:{display:"flex",gap:"8px",justifyContent:"flex-end"},children:[(0,r.jsx)(e,{variant:"secondary",text:"Cancel",onClick:a.onClose}),(0,r.jsx)(e,{variant:"critical-primary",text:"Deactivate Level",onClick:p,disabled:!u,loading:h})]})]})}return e=>(0,r.jsx)(u,{...e})},DataHarvestModal:async()=>{let{default:e}=await a.e("292063").then(a.bind(a,970018));return t=>(0,r.jsx)(e,{modalProps:t,onConfirm:e=>{console.log("DataHarvestModal: Requesting data export for:",e),setTimeout(()=>{console.log("DataHarvestModal: Data export request submitted successfully")},1e3)}})},EnableCommunityModal:async()=>{let{default:e}=await Promise.all([a.e("443159"),a.e("553203"),a.e("82721"),a.e("452823"),a.e("674832")]).then(a.bind(a,709779));return t=>(0,r.jsx)(e,{...t,onClose:async()=>{console.log("EnableCommunityModal: Closed"),await t.onClose()}})},DeprivateModal:async()=>{let e=(await Promise.all([a.e("315273"),a.e("254857")]).then(a.bind(a,147696))).default;return t=>(0,r.jsx)(e,{...t,guildId:"123456789012345678",startingChannelId:"987654321098765432"})},CameraPreviewModal:async()=>{let{default:e}=await Promise.all([a.e("650100"),a.e("410534")]).then(a.bind(a,308229));return t=>(0,r.jsx)(e,{...t,videoEnabled:!1,onEnable:()=>console.log("Camera enabled")})},CameraPreviewModalWithVideo:async()=>{let{default:e}=await Promise.all([a.e("650100"),a.e("410534")]).then(a.bind(a,308229));return t=>(0,r.jsx)(e,{...t,videoEnabled:!0,onEnable:()=>console.log("Camera enabled")})},ModeratorReportResolveConfirmModal:async()=>{let{default:e}=await Promise.resolve().then(a.bind(a,390897));return t=>(0,r.jsx)(e,{...t,handleResolveFlag:()=>console.log("ModeratorReportResolveConfirmModal: Flag resolved")})},SelectFriendsModal:async()=>{let{default:e,SelectFriendsModalScreens:t}=await Promise.resolve().then(a.bind(a,303682));return a=>{let{onClose:n,...l}=a;return(0,r.jsx)(e,{onClose:async()=>{console.log("SelectFriendsModal: Closed"),await n()},startingScreen:t.SELECT_FRIENDS,...l})}},SelectFriendsModalReminder:async()=>{let{default:e,SelectFriendsModalScreens:t}=await Promise.resolve().then(a.bind(a,303682));return a=>{let{onClose:n,...l}=a;return(0,r.jsx)(e,{onClose:async()=>{console.log("SelectFriendsModalReminder: Closed"),await n()},startingScreen:t.REMINDER,...l})}},FavoritesGuildAddChannelModal:async()=>{let{default:e}=await Promise.all([a.e("866475"),a.e("257472"),a.e("850979"),a.e("236946"),a.e("692639"),a.e("890480"),a.e("440963"),a.e("766031"),a.e("394317"),a.e("79362"),a.e("276340")]).then(a.bind(a,826271));return t=>(0,r.jsx)(e,{...t,parentId:null,source:"devtools"})},ActivityShareMomentModal:async()=>{let{default:e}=await Promise.all([a.e("866475"),a.e("257472"),a.e("58243"),a.e("236946"),a.e("692639"),a.e("890480"),a.e("440963"),a.e("766031"),a.e("394317"),a.e("521743")]).then(a.bind(a,190930));return t=>(0,r.jsx)(e,{...t,applicationId:"123456789",mediaUrl:"https://picsum.photos/400/300.jpg"})},CallUserConfirmationModal:async()=>{let{default:e}=await a.e("19106").then(a.bind(a,502054));return t=>(0,r.jsx)(e,{...t,onSubmit:()=>{console.log("CallUserConfirmationModal: Call confirmed"),t.onClose()}})},OptInReorderAttemptModal:async()=>{let{default:e}=await Promise.all([a.e("57729"),a.e("697585"),a.e("24848")]).then(a.bind(a,354643));return t=>(0,r.jsx)(e,{...t,onClose:()=>(console.log("OptInReorderAttemptModal: Modal closed"),t.onClose())})},GuildAntiRaidReportModal:async()=>{let{default:e}=await Promise.all([a.e("273669"),a.e("364499")]).then(a.bind(a,296222));return t=>(0,r.jsx)(e,{...t,guildId:"123456789",onClose:()=>(console.log("GuildAntiRaidReportModal: Modal closed"),t.onClose())})},ConsentCheckBoxModal:async()=>{let{ConfirmModal:e}=await Promise.all([a.e("304823"),a.e("223976"),a.e("977260")]).then(a.bind(a,397927)),{Text:t,Heading:n}=await Promise.all([a.e("304823"),a.e("223976"),a.e("977260")]).then(a.bind(a,397927)),l=await Promise.resolve().then(a.t.bind(a,582128,19));function i(a){let[i,s]=l.useState(!1),[o,d]=l.useState(!1);return(0,r.jsx)(e,{...a,title:"Consent CheckBox Examples",confirmText:"Close",cancelText:"",onConfirm:()=>(console.log("ConsentCheckBoxModal: Modal closed"),a.onClose()),onCancel:()=>{},children:(0,r.jsxs)("div",{style:{padding:"20px",display:"flex",flexDirection:"column",gap:"20px"},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(n,{variant:"heading-md/semibold",style:{marginBottom:"12px"},children:"Terms of Service Consent"}),(0,r.jsx)(om.S,{label:"I agree to Discord's Terms of Service and Privacy Policy",checked:i,onChange:e=>s(e),labelType:"secondary"}),(0,r.jsxs)(t,{variant:"text-sm/normal",color:"text-subtle",style:{marginTop:"8px"},children:["Consent status: ",i?"Agreed":"Not agreed"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(n,{variant:"heading-md/semibold",style:{marginBottom:"12px"},children:"Promotional Email Consent"}),(0,r.jsx)(om.S,{label:"I would like to receive promotional emails from Discord about new features, events, and other updates.",checked:o,onChange:e=>d(e),labelType:"secondary"}),(0,r.jsxs)(t,{variant:"text-sm/normal",color:"text-subtle",style:{marginTop:"8px"},children:["Promo consent status: ",o?"Opted in":"Not opted in"]})]})]})})}return i.displayName="ConsentCheckBoxModalContent",e=>(0,r.jsx)(i,{...e})},GuildRaidLockdownFeedbackModal:async()=>{let{default:e}=await Promise.all([a.e("660608"),a.e("346313")]).then(a.bind(a,336496));return t=>(0,r.jsx)(e,{...t,guildId:"123456789",onClose:()=>(console.log("GuildRaidLockdownFeedbackModal: Modal closed"),t.onClose())})},GuildVerificationLevelModal:async()=>{let{default:e}=await Promise.all([a.e("955424"),a.e("623386"),a.e("78618"),a.e("149409"),a.e("970232")]).then(a.bind(a,313003)),{dangerouslyConstructGuildRecordFromUntypedObject:t}=await Promise.resolve().then(a.bind(a,149790)),n=t({id:"123456789",name:"Test Server",description:"A test server for development",ownerId:"987654321",icon:null,splash:null,banner:null,homeHeader:null,features:[],preferredLocale:"en-US",afkChannelId:null,afkTimeout:300,systemChannelId:null,verificationLevel:2,joinedAt:new Date,defaultMessageNotifications:0,mfaLevel:0,application_id:null,explicitContentFilter:0,vanityURLCode:null,premiumTier:0,premiumSubscriberCount:0,premiumProgressBarEnabled:!1,systemChannelFlags:0,discoverySplash:null,rulesChannelId:null,safetyAlertsChannelId:null,publicUpdatesChannelId:null,maxStageVideoChannelUsers:10,maxVideoChannelUsers:25,maxMembers:5e5,nsfwLevel:0,ownerConfiguredContentLevel:null,hubType:null,latestOnboardingQuestionId:null,profile:null,premiumFeatures:null,moderatorReporting:null});return t=>(0,r.jsx)(e,{...t,guild:n})},GuildVerificationLevelModalCommunity:async()=>{let{default:e}=await Promise.all([a.e("955424"),a.e("623386"),a.e("78618"),a.e("149409"),a.e("970232")]).then(a.bind(a,313003)),{dangerouslyConstructGuildRecordFromUntypedObject:t}=await Promise.resolve().then(a.bind(a,149790)),{GuildFeatures:n}=await Promise.resolve().then(a.bind(a,652215)),l=t({id:"123456789",name:"Test Community Server",description:"A test community server for development",ownerId:"987654321",icon:null,splash:null,banner:null,homeHeader:null,features:[n.COMMUNITY],preferredLocale:"en-US",afkChannelId:null,afkTimeout:300,systemChannelId:null,verificationLevel:3,joinedAt:new Date,defaultMessageNotifications:0,mfaLevel:0,application_id:null,explicitContentFilter:0,vanityURLCode:null,premiumTier:0,premiumSubscriberCount:0,premiumProgressBarEnabled:!1,systemChannelFlags:0,discoverySplash:null,rulesChannelId:null,safetyAlertsChannelId:null,publicUpdatesChannelId:null,maxStageVideoChannelUsers:10,maxVideoChannelUsers:25,maxMembers:5e5,nsfwLevel:0,ownerConfiguredContentLevel:null,hubType:null,latestOnboardingQuestionId:null,profile:null,premiumFeatures:null,moderatorReporting:null});return t=>(0,r.jsx)(e,{...t,guild:l})},EmojiAddModal:async()=>{let{EmojiAddModal:e}=await Promise.all([a.e("225560"),a.e("990410")]).then(a.bind(a,126033));return t=>(0,r.jsx)(e,{...t,guildId:"123456789",initialTierEmojiIds:new Set(["emoji1"]),onSubmit:e=>{console.log("EmojiAddModal: Selected emojis:",Array.from(e))},transitionToManageEmoji:()=>{console.log("EmojiAddModal: Transition to manage emoji clicked")},onClose:()=>(console.log("EmojiAddModal: Modal closed"),t.onClose())})},StreamFullModal:async()=>{let{default:e}=await a.e("425894").then(a.bind(a,166789));return t=>(0,r.jsx)(e,{...t})},VoiceCallFeedback:async()=>{let{default:e}=await Promise.all([a.e("36781"),a.e("713710"),a.e("587852"),a.e("155925"),a.e("137381"),a.e("259375"),a.e("64054")]).then(a.bind(a,47893)),t={channel_id:"123456789",channel_type:eu.rbe.GUILD_VOICE,guild_id:"987654321",rtc_connection_id:"devtools-rtc-connection",duration:6e4,voice_state_count:2,video_stream_count:0,video_enabled:!1,media_session_id:"devtools-media-session",duration_muted_ms:0,output_audio_route_type:null};return a=>(0,r.jsx)(e,{...a,analyticsData:t})},StreamFeedback:async()=>{let{default:e}=await Promise.all([a.e("36781"),a.e("713710"),a.e("587852"),a.e("155925"),a.e("137381"),a.e("259375"),a.e("617171"),a.e("862767")]).then(a.bind(a,218738)),t={ownerId:"987654321",guildId:"123456789",channelId:"123456789",streamType:oj.U4.GUILD},n={id:"123456789",name:"Test Game"},l={rtc_connection_id:"devtools-rtc-connection",media_session_id:"devtools-media-session",duration:6e4,stream_region:"us-west",max_viewers:3,avg_bitrate:2500,avg_fps:60,avg_resolution:1080,inbound_bitrate_estimate_percentile99:3e3,parent_media_session_id:null};return a=>(0,r.jsx)(e,{...a,isStreamer:!1,stream:t,streamApplication:n,analyticsData:l})},FamilyCenterAcceptLinkModal:async()=>{let e=er.default.getUser("12345"),t=er.default.getUser("67890");if(void 0===e||void 0===t)return()=>null;let{default:n}=await Promise.all([a.e("916131"),a.e("155738"),a.e("331385")]).then(a.bind(a,58144));return a=>(0,r.jsx)(n,{...a,currentUser:t,otherUser:e})},FamilyCenterDeclineLinkModal:async()=>{let e=er.default.getUser("12345"),t=er.default.getUser("67890");if(void 0===e||void 0===t)return()=>null;let{default:n}=await Promise.all([a.e("916131"),a.e("155738"),a.e("384811")]).then(a.bind(a,389094));return a=>(0,r.jsx)(n,{...a,currentUser:t,otherUser:e})},FamilyCenterCancelLinkModal:async()=>{let e=er.default.getUser("12345"),t=er.default.getUser("67890");if(void 0===e||void 0===t)return()=>null;let{default:n}=await Promise.all([a.e("916131"),a.e("155738"),a.e("817219")]).then(a.bind(a,187278));return a=>(0,r.jsx)(n,{...a,currentUser:e,otherUser:t})},FamilyCenterDisconnectLinkModal:async()=>{let e=er.default.getUser("12345"),t=er.default.getUser("67890");if(void 0===e||void 0===t)return()=>null;let{default:n}=await Promise.all([a.e("321855"),a.e("943139")]).then(a.bind(a,179950));return a=>(0,r.jsx)(n,{...a,currentUser:e,otherUser:t})},FamilyCenterQRCodeModal:async()=>{let{default:e}=await Promise.all([a.e("683023"),a.e("272875")]).then(a.bind(a,320742));return t=>(0,r.jsx)(e,{...t})},PremiumGroupFriendsSelectorModal:async()=>{let{default:e}=await Promise.all([a.e("634508"),a.e("485579")]).then(a.bind(a,785606)),t=op.A.getPremiumGroupSubscription();return null==t?()=>null:a=>(0,r.jsx)(e,{...a,subscription:t})},PremiumGroupAcceptInviteModal:async()=>{let{default:e}=await Promise.all([a.e("56498"),a.e("399910")]).then(a.bind(a,826181));return t=>(0,r.jsx)(e,{...t,premiumGroupSubscriptionId:"1234567890",premiumGroupInviteId:"1234567890",isExistingSub:!1,premiumGroupPrimaryName:"Test User"})},QuarantineModeInfoModal:async()=>{let{default:e}=await a.e("474575").then(a.bind(a,218642));return t=>(0,r.jsx)(e,{...t})},CaptchaTestModal:async()=>{let{default:e}=await a.e("417724").then(a.bind(a,563255));return t=>(0,r.jsx)(e,{...t})},PasswordConfirm:async()=>{let{default:e}=await Promise.resolve().then(a.bind(a,662758));return t=>(0,r.jsx)(e,{...t,title:"Confirm Password",actionText:"Submit",handleSubmit:async e=>{console.log("PasswordConfirm: Password submitted:",e),await new Promise(e=>setTimeout(e,1e3))}})},BlockedDomainModal:async()=>{let{default:e}=await Promise.all([a.e("364956"),a.e("420577"),a.e("335681"),a.e("520723")]).then(a.bind(a,667934));return t=>(0,r.jsx)(e,{...t,url:"https://example-phishing-site.com/malicious-page"})},DmSettingsUpsellModal:async()=>{let{default:e}=await Promise.all([a.e("494150"),a.e("962684")]).then(a.bind(a,228855)),t=Object.keys(nC.A.getGuilds())[0];return a=>(0,r.jsx)(e,{...a,guildId:t})},UrgentMessageModal:async()=>{let{default:e}=await Promise.all([a.e("689913"),a.e("136724")]).then(a.bind(a,531519));return t=>(0,r.jsx)(e,{...t})},UserAgreementsModal:async()=>{let{default:e}=await Promise.all([a.e("50726"),a.e("482911"),a.e("922220")]).then(a.bind(a,639719));return t=>(0,r.jsx)(e,{...t})},DisableRiskyPermsModal:async()=>{let{default:e}=await Promise.all([a.e("796057"),a.e("553203"),a.e("452823"),a.e("971905")]).then(a.bind(a,868952)),t=Object.values(nC.A.getGuilds())[0];return null==t?()=>null:a=>(0,r.jsx)(e,{...a,guild:t})},OtherFriendRequestsModal:async()=>{let{default:e}=await Promise.all([a.e("827776"),a.e("979862"),a.e("791370"),a.e("548018"),a.e("773152"),a.e("625281")]).then(a.bind(a,516259));return t=>(0,r.jsx)(e,{...t})},AcceptInviteModal:async()=>{let{default:e}=await Promise.all([a.e("487834"),a.e("807432"),a.e("601495"),a.e("807265"),a.e("549106"),a.e("901352"),a.e("579023"),a.e("248672")]).then(a.bind(a,777307));return t=>(0,r.jsx)(e,{...t})},PremiumGroupSubscribeModal:async()=>{let{default:e}=await Promise.all([a.e("499709"),a.e("569595")]).then(a.bind(a,526710));return t=>(0,r.jsx)(e,{...t})},NewUserOnboarding:async()=>{let{default:e}=await Promise.all([a.e("188406"),a.e("538288"),a.e("122326"),a.e("533651"),a.e("260634"),a.e("194399"),a.e("419580"),a.e("82721"),a.e("197804"),a.e("756856"),a.e("319623"),a.e("999574"),a.e("457794"),a.e("908768")]).then(a.bind(a,189411));return t=>(0,r.jsx)(e,{...t})}};function ob(){let e=o.useMemo(()=>Object.keys(of).map(e=>({label:e,value:e,id:e})).sort((e,t)=>e.label.localeCompare(t.label)),[]),[t,a]=o.useState(null);return(0,r.jsx)(g.Ip,{className:tZ.nd,children:(0,r.jsxs)("div",{className:i$.l$,children:[(0,r.jsx)("section",{className:i$.uW,children:(0,r.jsxs)(tq.B,{direction:"horizontal",gap:8,align:"end",children:[(0,r.jsx)(aC.Z,{label:"Open a Modal",placeholder:"Select a modal",options:e,value:t,onSelectionChange:a,selectionMode:"single"}),(0,r.jsx)(x.$,{variant:"primary",text:"Open",disabled:null==t,onClick:()=>null!=t&&(0,eK.openModalLazy)(of[t])})]})}),(0,r.jsxs)("section",{className:i$.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-md/semibold",children:"Wow moment"}),(0,r.jsx)("div",{className:i$.bd,children:(0,r.jsx)(x.$,{variant:"primary",text:"Open",onClick:function(){(0,ox.o)(!0),og._.dispatch(eu.jej.PREMIUM_SUBSCRIPTION_CREATED)}})})]})]})})}var oy=a(933832),oE=a(472229),oC=a(10392),oS=a(669316),o_=a(959165),oN=a(354670),oA=a(24482);async function ok(){try{let{body:e}=await l7.Bo.get({url:eu.Rsh.USER_OFFER_IDS,rejectWithError:!0});return e}catch(e){return[]}}async function oD(){try{let{body:e}=await l7.Bo.get({url:eu.Rsh.USER_OFFERS,rejectWithError:!0});return{trial:e.trial.map(o_.A.createFromServer),discount:e.discount.map(oS.A.createFromServer)}}catch(e){return{trial:[],discount:[]}}}async function oI(e,t){try{await l7.Bo.post({url:eu.Rsh.CREATE_USER_OFFER(e,t),rejectWithError:!0})}catch{}finally{await (0,oC._D)()}}async function oT(e,t){try{await l7.Bo.del({url:eu.Rsh.UPDATE_USER_OFFER(e,t),rejectWithError:!0})}catch{}finally{await (0,oC._D)()}}async function oR(){try{await l7.Bo.del({url:eu.Rsh.USER_OFFERS,rejectWithError:!0})}catch{}finally{await oN.A.forceReset(),await (0,oC._D)()}}async function ow(e){await l7.Bo.post({url:eu.Rsh.CREATE_REVERSE_TRIAL,body:{ends_at:e},rejectWithError:!0})}function oO(e){let{acked:t,expired:a,inStore:n,onClick:l,secondaryBadge:i}=e,s="Created";return a?s="Expired":t?s="Acked":n&&(s="Active"),(0,r.jsxs)("div",{className:i$.fC,children:[(0,r.jsx)(q.D,{onClick:l,className:Y()(i$.qS,i$.vk,{[i$.vu]:n,[i$.R1]:t,[i$._7]:a}),children:(0,r.jsxs)(p.E,{variant:"eyebrow",color:t?void 0:"text-overlay-light",children:[s,n?" *":""]})}),null!=i&&i.active&&(0,r.jsx)("div",{className:Y()(i$.qS,i$.k3),children:(0,r.jsx)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:i.label})})]})}function oM(e){let{offer:t,offerOptions:a,forceRefetch:n,inStore:l=!1}=e,[i,s]=o.useState(!1),[d,c]=o.useState(!1),[u,m]=o.useState(!1),[h,x]=o.useState(!1);o.useEffect(()=>{u&&x(!0);let e=setTimeout(()=>{x(!1)},500);return()=>{clearTimeout(e)}},[u]);let{id:g,expiresAt:v,trialId:j,subscriptionTrial:f,referrer:b}=t,y=a.find(e=>{let{value:t}=e;return t===j})?.label??"Unknown";null!=b&&(y=`${y} from @${b.username}`);let E=null!=v,C=t.hasExpired,S=t.isRedeemed,_=f?.skuId===tM.pe.TIER_0;async function N(){m(!0),E?await A({expiresAt:null}):await (0,oC.u1)(t),n(),m(!1)}async function A(e){m(!0);try{await l7.Bo.patch({url:eu.Rsh.UPDATE_USER_OFFER(g,"trial"),body:{..."expiresAt"in e&&{expires_at:e.expiresAt},..."referrerId"in e&&{referrer_id:e.referrerId}},rejectWithError:!0})}finally{n(),m(!1)}}return o.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!1)},3e3);return()=>{clearTimeout(e)}}if(d){let e=setTimeout(()=>{c(!1)},3e3);return()=>{clearTimeout(e)}}},[i,d]),(0,r.jsxs)("div",{className:Y()(i$.Nr,_?i$.Qf:i$.C1),children:[(0,r.jsx)("div",{className:Y()(i$.nM,i$.S7),children:(0,r.jsx)(Q.D,{variant:"heading-lg/semibold",color:"text-overlay-light",children:y})}),(0,r.jsxs)(q.D,{className:Y()(i$.nM,i$.QB),onClick:()=>{(0,nY.C)(g,()=>s(!0))},children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:["Offer: ",g]}),i?(0,r.jsx)(oy.CheckmarkLargeIcon,{size:"md",color:"currentColor",className:i$.Kk}):(0,r.jsx)(nB.CopyIcon,{size:"xs",color:"currentColor",className:i$.Kk})]}),(0,r.jsxs)(q.D,{className:Y()(i$.nM,i$.QB),onClick:()=>{(0,nY.C)(j,()=>c(!0))},children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:["Trial: ",j]}),d?(0,r.jsx)(oy.CheckmarkLargeIcon,{size:"md",color:"currentColor",className:i$.Kk}):(0,r.jsx)(nB.CopyIcon,{size:"xs",color:"currentColor",className:i$.Kk})]}),(0,r.jsx)("div",{className:i$.nM,children:(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:["Trial Length:"," ",(0,oA.re)({intervalType:f?.interval??tM.WT.MONTH,intervalCount:f?.intervalCount??1,capitalize:!1})]})}),(0,r.jsxs)("div",{className:i$.nM,children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:["Expires (",(0,oE.A)(),"):"]}),(0,r.jsx)("input",{type:"datetime-local",value:(0,nq.Xm)(v?.toISOString()),onChange:e=>{A({expiresAt:""!==e.target.value?new Date(e.target.value).toISOString():null})}})]}),(0,r.jsxs)("div",{className:i$.nM,children:[(0,r.jsx)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:"Referrer ID:"}),(0,r.jsx)("input",{type:"text",value:b?.id??"",onChange:e=>A({referrerId:e.target.value})})]}),(0,r.jsx)(oO,{acked:E,expired:C,inStore:l,onClick:N,secondaryBadge:{active:S,label:"Redeemed"}}),(0,r.jsx)(q.D,{onClick:async()=>{m(!0),await oT(g,"trial"),n(),m(!1)},children:(0,r.jsx)(nV.TrashIcon,{size:"md",color:"currentColor",className:Y()(i$.Kk,i$.IT)})}),(0,r.jsx)("div",{className:Y()(i$.g4,{[i$.VP]:u||h}),children:(0,r.jsx)(to.y,{})})]})}function oL(e){let{offer:t,offerOptions:a,forceRefetch:n,inStore:l=!1}=e,[i,s]=o.useState(!1),[d,c]=o.useState(!1),[u,m]=o.useState(!1),[h,x]=o.useState(!1);o.useEffect(()=>{u&&x(!0);let e=setTimeout(()=>{x(!1)},500);return()=>{clearTimeout(e)}},[u]);let{id:g,expiresAt:v,discountId:j,discount:f}=t,b=a.find(e=>{let{value:t}=e;return t===j})?.label??"Unknown",y=null!=v,E=t.hasExpired(),C=t.isApplied();async function S(){m(!0),y?await _({expiresAt:null}):await (0,oC.u1)(void 0,t),n(),m(!1)}async function _(e){let{expiresAt:t}=e;m(!0);try{await l7.Bo.patch({url:eu.Rsh.UPDATE_USER_OFFER(g,"discount"),body:{expires_at:t},rejectWithError:!0})}finally{n(),m(!1)}}return o.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!1)},3e3);return()=>{clearTimeout(e)}}if(d){let e=setTimeout(()=>{c(!1)},3e3);return()=>{clearTimeout(e)}}},[i,d]),(0,r.jsxs)("div",{className:Y()(i$.Nr,i$.id),children:[(0,r.jsx)("div",{className:Y()(i$.nM,i$.S7),children:(0,r.jsx)(Q.D,{variant:"heading-lg/semibold",color:"text-default",children:b})}),(0,r.jsxs)(q.D,{className:Y()(i$.nM,i$.QB),onClick:()=>{(0,nY.C)(g,()=>s(!0))},children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-default",children:["Offer: ",g]}),i?(0,r.jsx)(oy.CheckmarkLargeIcon,{size:"md",color:"currentColor",className:Y()(i$.Kk,i$.mK)}):(0,r.jsx)(nB.CopyIcon,{size:"xs",color:"currentColor",className:i$.Kk})]}),(0,r.jsxs)(q.D,{className:Y()(i$.nM,i$.QB),onClick:()=>{(0,nY.C)(j,()=>c(!0))},children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-default",children:["Discount: ",j]}),d?(0,r.jsx)(oy.CheckmarkLargeIcon,{size:"md",color:"currentColor",className:Y()(i$.Kk,i$.mK)}):(0,r.jsx)(nB.CopyIcon,{size:"xs",color:"currentColor",className:i$.Kk})]}),f?.amount!=null&&(0,r.jsx)("div",{children:(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-default",children:[f.amount,"% off"]})}),(0,r.jsxs)("div",{className:i$.nM,children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:["Expires (",(0,oE.A)(),"):"]}),(0,r.jsx)("input",{type:"datetime-local",value:(0,nq.Xm)(v?.toISOString()),onChange:e=>_({expiresAt:""!==e.target.value?new Date(e.target.value).toISOString():null})})]}),(0,r.jsx)(oO,{acked:y,expired:E,inStore:l,onClick:S,secondaryBadge:{active:C,label:"Applied"}}),(0,r.jsx)(q.D,{className:i$.aR,onClick:async()=>{m(!0),await oT(g,"discount"),n(),m(!1)},children:(0,r.jsx)(nV.TrashIcon,{size:"md",color:"currentColor",className:Y()(i$.Kk,i$.fy)})}),(0,r.jsx)("div",{className:Y()(i$.g4,{[i$.VP]:u||h}),children:(0,r.jsx)(to.y,{})})]})}function oP(){let[e,t]=o.useState([]),[a,n]=o.useState([]),[l,i]=o.useState(),[s,c]=o.useState(),[u,m]=o.useState(!0),{discountOffers:h,trialOffers:v}=(0,d.cf)([oN.A],()=>({discountOffers:Object.values(oN.A.getState().userDiscountOffers).sort((e,t)=>e.id.localeCompare(t.id)),trialOffers:Object.values(oN.A.getState().userTrialOffers).sort((e,t)=>e.id.localeCompare(t.id))})),[f,b]=o.useState([]),[y,E]=o.useState([]),[C,S]=o.useState(10080),[_,N]=o.useState([]),A=o.useMemo(()=>new Set([...v,...h].map(e=>e.id)),[v,h]),k=o.useMemo(()=>[...v,...f.filter(e=>!A.has(e.id))],[v,f,A]),D=o.useMemo(()=>[...h,...y.filter(e=>!A.has(e.id))],[h,y,A]),{entitlements:I,deleteFractionalPremium:T,refreshEntitlementList:R}=iB();async function w(){null!=l&&(await oI(l,"trial"),m(!0))}async function O(){null!=s&&(await oI(s,"discount"),m(!0))}async function M(){await oR(),m(!0)}async function L(){let e=new Date(Date.now()+60*C*1e3).toISOString();await ow(e),R()}return o.useEffect(()=>{R()},[R]),o.useEffect(()=>{N(I.filter(e=>e.sourceType===iI.G.REVERSE_TRIAL&&null!=e.endsAt&&e.endsAt>new Date))},[I]),o.useEffect(()=>{(0===e.length||0===a.length||u)&&ok().then(e=>{let a=Object.keys(e.trial).map(t=>({label:t,value:e.trial[t]})),r=Object.keys(e.discount).map(t=>({label:t,value:e.discount[t]}));t(a),n(r),null==l&&i(a[0].value),null==s&&c(r[0].value)})},[e,a,l,s,u]),o.useEffect(()=>{u&&(m(!1),oN.A.forceReset(),(0,oC._D)(),oD().then(e=>{b(e.trial.sort((e,t)=>e.id.localeCompare(t.id))),E(e.discount.sort((e,t)=>e.id.localeCompare(t.id)))}))},[u]),(0,r.jsx)(g.Ip,{className:tZ.nd,children:(0,r.jsxs)("div",{className:i$.l$,children:[(0,r.jsxs)("section",{className:i$.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-md/semibold",children:"Utils"}),(0,r.jsxs)("div",{className:i$.Uo,children:[(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Clear all User Offers",onClick:M}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Clear Mobile Trials DismissibleContent",onClick:()=>(0,aM.xB)(aO.M.PREMIUM_MOBILE_TRIAL_USER_SETTINGS_AVATAR_BADGE)}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Clear Offer Nagbar DismissibleContent",onClick:()=>(0,aM._N)(aO.M.NAGBAR_NOTICE_OFFER_EXPIRING)}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Refresh DevTools",onClick:()=>m(!0)})]})]}),(0,r.jsx)("section",{className:i$.uW,children:(0,r.jsxs)("div",{className:i$.bd,children:[(0,r.jsx)(j.l,{label:"Create a Trial Offer",options:e,formatOption:e=>{let{label:t,value:a}=e;return{label:t,value:a,id:a}},value:l,placeholder:"Trial Type",onSelectionChange:i,selectionMode:"single",fullWidth:!0}),(0,r.jsx)(x.$,{variant:"primary",text:"Create",onClick:w})]})}),(0,r.jsx)("section",{className:i$.uW,children:(0,r.jsxs)("div",{className:i$.bd,children:[(0,r.jsx)(j.l,{label:"Create a Discount Offer",options:a,formatOption:e=>{let{label:t,value:a}=e;return{label:t,value:a,id:a}},value:s,placeholder:"Discount Type",onSelectionChange:c,selectionMode:"single",fullWidth:!0}),(0,r.jsx)(x.$,{variant:"primary",text:"Create",onClick:O})]})}),k.length>0&&(0,r.jsxs)("section",{className:i$.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-md/semibold",children:"Existing Trial Offers"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"* indicates the offer is currently in UserOfferStore."}),k.map(t=>(0,r.jsx)(oM,{offer:t,offerOptions:e,forceRefetch:()=>m(!0),inStore:A.has(t.id)},t.id))]}),D.length>0&&(0,r.jsxs)("section",{className:i$.uW,children:[(0,r.jsx)(Q.D,{variant:"heading-md/semibold",children:"Existing Discount Offers"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"* indicates the offer is currently in UserOfferStore."}),D.map(e=>(0,r.jsx)(oL,{offer:e,offerOptions:a,forceRefetch:()=>m(!0),inStore:A.has(e.id)},e.id))]}),(0,r.jsx)("section",{className:i$.uW,children:(0,r.jsxs)("div",{className:i$.bd,children:[(0,r.jsx)(j.l,{label:"Create a Reverse Trial Entitlement",options:[{id:"5min",label:"5 minutes",value:5},{id:"1hour",label:"1 hour",value:60},{id:"1day",label:"1 day",value:1440},{id:"1week",label:"1 week",value:10080}],value:C,placeholder:"Reverse Trial Length",onSelectionChange:S,selectionMode:"single",fullWidth:!0}),(0,r.jsx)(x.$,{variant:"primary",text:"Create",onClick:L})]})}),_.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)(p.E,{style:{marginTop:"15px"},variant:"text-md/bold",children:"Active reverse trial"}),(0,r.jsx)("div",{children:_.map(e=>(0,r.jsx)(iW,{entitlement:e,active:!0,onDelete:()=>T(e.id)},e.id))})]})]})})}var oU=a(872162),oG=a(26279),oB=a(628577);let oF={[oG.Re.UNSPECIFIED]:"Unspecified",[oG.Re.DRAFT]:"Draft",[oG.Re.SIGNED]:"Signed",[oG.Re.DISCARDED]:"Discarded",[oG.Re.SIGNING_IN_PROGRESS]:"Signing In Progress",[oG.Re.SIGNING_FAILED]:"Signing Failed"},o$={[oG.BM.UNSPECIFIED]:"Unspecified",[oG.BM.ONE_TIME]:"One Time",[oG.BM.SUBSCRIPTION]:"Subscription"};function oV(){let[e,t]=o.useState(null),[a,n]=o.useState(!0),[l,i]=o.useState(null),s=o.useCallback(async()=>{n(!0),i(null);try{let e=await l7.Bo.get({url:`${eu.Rsh.ORDER_LIST}?limit=5`,rejectWithError:!0});t(e.body??[])}catch(e){i(e instanceof Error?e.message:"Failed to fetch orders")}finally{n(!1)}},[]);o.useEffect(()=>{s()},[s]);let[d,c]=o.useState(!1),[u,m]=o.useState(null),[h,v]=o.useState(()=>{let e=ot.Ay.getChannelId();return null!=e?e:""}),j=o.useCallback(async()=>{c(!0),m(null);try{let e=h.trim(),t=await l7.Bo.post({url:eu.Rsh.DEBUG_TEMPORAL_INFRA_PROOF_OF_CONCEPT,body:""!==e?{channel_id:e}:{},rejectWithError:!0}),a=null!=t.body?t.body.run_id:"unknown";m(`Started workflow run ${a}`)}catch(e){m(e instanceof Error?e.message:"Failed to start workflow")}finally{c(!1)}},[h]);return(0,r.jsx)(g.Ip,{className:tZ.nd,children:(0,r.jsxs)("div",{className:i$.l$,children:[(0,r.jsxs)("div",{className:i$.dL,style:{marginBottom:"16px"},children:[(0,r.jsxs)(p.E,{variant:"text-lg/bold",children:["Orders (last ",5,")"]}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Refresh",onClick:s,loading:a})]}),null!=l&&(0,r.jsx)(J.w,{type:"critical",message:l,role:"alert"}),!a&&null!=e&&0===e.length&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"No orders found."}),null!=e&&e.map(e=>(0,r.jsx)(oW,{order:e},e.id)),(0,r.jsxs)(tq.B,{direction:"vertical",gap:8,style:{marginTop:"16px"},children:[(0,r.jsx)(f.k,{fullWidth:!0,value:h,onChange:v,placeholder:"Channel ID (blank to skip the message)"}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Run Temporal Infra Proof of Concept",onClick:j,loading:d}),null!=u&&(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:u})]})]})})}function oW(e){let{order:t}=e,[a,n]=o.useState(!1),[l,i]=o.useState(!1),s=oF[t.status]??`Unknown (${t.status})`,d=[{id:"status",label:`Status: ${s}`,isDisabled:!1},{id:"revision",label:`Revision: ${t.revision}`,isDisabled:!1},{id:"created",label:`Created: ${new Date(t.created_at).toLocaleString()}`,isDisabled:!1}],c=o.useCallback(()=>{navigator.clipboard.writeText(t.id),i(!0),setTimeout(()=>i(!1),2e3)},[t.id]);return(0,r.jsxs)("div",{className:i$.Nr,children:[(0,r.jsxs)(tq.B,{direction:"horizontal",gap:8,align:"center",style:{marginBottom:"4px"},children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:t.id}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:l?"Copied!":"Copy ID",onClick:c})]}),(0,r.jsx)(oU.C,{items:d,label:"Order information",layout:"inline"}),(0,r.jsxs)(tq.B,{direction:"vertical",gap:4,style:{marginTop:"8px"},children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Line Items"}),0===t.order_line_items.length?(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:"No line items"}):t.order_line_items.map(e=>(0,r.jsxs)(tq.B,{direction:"horizontal",gap:12,children:[(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["SKU: ",e.sku_id]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Qty: ",e.quantity]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Type: ",o$[e.purchase_type]??`Unknown (${e.purchase_type})`]}),null!=e.subscription_plan_id&&(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Plan: ",e.subscription_plan_id]})]},e.id))]}),null!=t.billing_facet&&(0,r.jsxs)("div",{className:oB.VK,style:{marginTop:"8px"},children:[(0,r.jsxs)(q.D,{onClick:()=>n(e=>!e),className:oB.Eh,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Billing Facet"}),(0,r.jsx)(iO.A,{direction:a?iO.A.Directions.UP:iO.A.Directions.DOWN})]}),a&&(0,r.jsxs)("ul",{className:oB.j3,children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"payment_gateway"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:String(t.billing_facet.payment_gateway)})]}),null!=t.billing_facet.payment_source_id&&(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"payment_source_id"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.payment_source_id})]}),null!=t.billing_facet.currency&&(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"selected currency"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.currency})]}),null!=t.billing_facet.invoice_preview&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"currency"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.invoice_preview.currency})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"subtotal"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.invoice_preview.subtotal})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"tax"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.invoice_preview.tax})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"total"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.invoice_preview.total})]}),t.billing_facet.invoice_preview.line_items.length>0&&(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"invoice line items"}),(0,r.jsx)(tq.B,{direction:"vertical",gap:4,style:{marginTop:"4px"},children:t.billing_facet.invoice_preview.line_items.map(e=>(0,r.jsxs)(tq.B,{direction:"horizontal",gap:12,children:[(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["ref: ",e.ref_order_line_item_id]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["unit: ",e.unit_price]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["qty: ",e.quantity]})]},e.ref_order_line_item_id))})]})]})]})]})]})}var oz=a(935462),oH=a(103557),oK=a(93688),oY=a(717400),oq=a(676955),oJ=a(31300),oQ=a(500060),oX=a(391973),oZ=a(684013),o0=a(765671),o1=a(235986),o2=a(742589),o3=a(41984),o6=a(181435),o8=a(435736),o5=a(661886),o4=a(296027),o7=a(515183),o9=a(127242),de=a(869014),dt=a(528772),da=a(32584),dn=a(532624),dl=a(773371),di=a(927813),ds=a(996439),dr=a(350535),dd=a(9302),dc=a(644434),du=a(998798);let dm={[eu.uss.CLICK_ZONE_DEBUG]:e=>({type:eu.uss.CLICK_ZONE_DEBUG,id:(0,ew.A)(),layoutId:e,anchor:{top:.35,right:.35},size:{width:100,height:100},...da.A.getWidgetDefaultSettings(eu.uss.CLICK_ZONE_DEBUG),pinned:!0}),[eu.uss.PERFORMANCE_DEBUG]:e=>({type:eu.uss.PERFORMANCE_DEBUG,id:(0,ew.A)(),layoutId:e,anchor:{top:.1,right:.1},size:{fixed:!1,width:"auto",height:"auto"},...da.A.getWidgetDefaultSettings(eu.uss.PERFORMANCE_DEBUG),pinned:!0})},dh={};function dx(e){let{id:t}=e,[a,n]=o.useState(!1);return o.useEffect(()=>{let e;return a&&(e=setTimeout(()=>{n(!1)},1e3)),()=>{null!=e&&clearTimeout(e)}},[a]),(0,r.jsxs)(nG.$n,{look:nG.$n.Looks.LINK,color:nG.$n.Colors.LINK,size:nG.$n.Sizes.MIN,onClick:function(){(0,nY.C)(t,()=>n(!0))},className:du.DT,children:["Game Id: ",t," ",a?nN.intl.string(nN.t.t5VZ88):null]})}let dp=o.memo(function(e){let{trackedGame:t}=e,a=(0,d.bG)([E.Ay],()=>E.Ay.getGameOrTransformedSubgameForPID(t.pid)),n=(0,d.bG)([_.A],()=>_.A.getGameForPID(t.pid)),{data:l}=(0,aN.I)(n?.id),i=(0,d.bG)([E.Ay],()=>null==a?null:E.Ay.getGameOverlayStatus(a));return(0,r.jsxs)("div",{className:du.st,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-strong",children:t.gameName}),(0,r.jsx)(p.E,{variant:"text-sm/bold",color:"text-subtle",children:t.pid}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:a?.exeName}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["isLauncher: ",a?.isLauncher?"Yes":"No"]}),null!=t.gameId&&(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-strong",children:(0,r.jsx)(dx,{id:t.gameId})}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["fullscreenType: ",(0,o7.wR)(t.fullscreenType)]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["state: ",t.state]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["successfullyShown: ",t.successfullyShown?"Yes":"No"]}),(0,r.jsxs)("div",{className:du.st,children:[(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["source: ",t.source]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["legacyEnabled: ",t.legacyEnabled?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["oopEnabled: ",t.oopEnabled?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["overlayMethod: ",(0,o7.gK)(t.overlayMethod)]})]}),null!=i&&(0,r.jsxs)("div",{className:du.st,children:[(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["raw source: ",i.source]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["raw enabledLegacy: ",i.enabledLegacy?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["raw enabledOOP: ",i.enabledOOP?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["raw overlayMethod: ",(0,o7.gK)(i.overlayMethod)]})]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["hidden: ",a?.hidden?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["hook: ",l?.hook?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["overlay: ",l?.overlay?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["overlayCompatibilityHook: ",l?.overlayCompatibilityHook?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["supportsOutOfProcessOverlay: ",l?.supportsOutOfProcessOverlay?"Yes":"No"]})]})}),dg=o.memo(function(e){let{pid:t}=e,a=(0,d.cf)([dl.default],()=>dl.default.getOverlayPIDStatuses()),n=(0,d.cf)([o4.default],()=>o4.default.getTrackedGames()),l=(0,d.bG)([dl.default],()=>dl.default.isInputLocked(t),[t]),i=(0,d.bG)([dl.default],()=>dl.default.DEV_isInputLockedV3(t),[t]),s=(0,d.bG)([dl.default],()=>dl.default.DEV_isInputLocked(t),[t]),o=(0,d.bG)([dl.default],()=>dl.default.isReady(t),[t]);return(0,r.jsxs)("div",{className:du.st,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",color:"text-strong",children:`${t}`}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["Screen Type Resolution: ",function(e){let t=n[e]?.timer;if(null==t||null==t.screenTypeResolutionTimestamp)return"...";let a=t.screenTypeResolutionTimestamp-t.startTrackingTimestamp;return`${a.toFixed(2)}ms`}(t)]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["Window Creation: ",function(e){let t=n[e]?.timer;if(null==t||null==t.moduleTrackingTimestamp||null==t.screenTypeResolutionTimestamp)return"...";let a=t.moduleTrackingTimestamp-t.screenTypeResolutionTimestamp;return`${a.toFixed(2)}ms`}(t)]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["Rendering: ",function(e){let t=n[e]?.timer;if(null==t||null==t.overlayRenderingTimestamp||null==t.moduleTrackingTimestamp)return"...";let a=t.overlayRenderingTimestamp-t.moduleTrackingTimestamp;return`${a.toFixed(2)}ms`}(t)]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-strong",children:["Bridge Status: ",a.get(Number(t))]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-strong",children:["isInputLocked: ",l]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-strong",children:["isInputLockedV3: ",i]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-strong",children:["isInputLockedV2: ",s]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-strong",children:["isReady: ",o]})]})});function dv(e){var t;let a=(t=Object.values((0,d.yK)([da.A],()=>da.A.getWidgetsForLayout(dc.GJ))),t.find(t=>t.type===e));return[a,function(){if(null!=a)(0,oX.uv)(a.id);else{let t=dm[e];if(null==t)return;let a=t(dc.GJ);(0,oX.jn)(a)}}]}function dj(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?`${e.toFixed(2)}ms`:(0,nq.i$)(nU()(e),"h:mm:ss.SSS")}let df=o.memo(function(e){let{pid:t,...a}=e,n=(0,d.bG)([o4.default],()=>{if(null==t)return"Unknown";let e=o4.default.getTrackedGameByPid(t)?.gameName;return null!=e?(dh[t]=e,e):dh[t]??"Unknown"},[t]);return(0,r.jsx)(p.E,{...a,variant:"text-md/semibold",color:"text-strong",children:n})});function db(){let e=(0,d.bG)([o9.A],()=>o9.A.hasRenderDebugMode(o3.x7.TrackFocusPIDs)),t=(0,d.yK)([o4.default],()=>o4.default.getDevToolsFocusedPidsWithTimestamp());return(0,r.jsxs)("div",{className:du.st,children:[(0,r.jsxs)("div",{className:du.Iv,children:[(0,r.jsx)(m.d,{checked:e,onChange:()=>void oZ.A.setRenderDebugMode(!o9.A.hasRenderDebugMode(o3.x7.TrackFocusPIDs),o3.x7.TrackFocusPIDs),label:"Track Focus Pids"}),(0,r.jsx)(q.D,{className:du.LL,onClick:()=>oZ.A.clearTrackedPids(),children:(0,r.jsx)(nV.TrashIcon,{size:"md",color:"currentColor"})})]}),(0,r.jsxs)(g.Ip,{className:Y()(du.st,du.XG),children:[0===t.length&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-default",children:"No recent focused pids"}),[...t].reverse().map(e=>{let[t,a,n]=e;return(0,r.jsx)(o.Fragment,{children:(0,r.jsx)(ir.m,{position:"left",text:n===o3.su.TRACK_FOCUS?"Tracked Focus Event":"Clear Focus Event",children:(0,r.jsx)("div",{children:(0,r.jsxs)(p.E,{variant:"text-sm/medium",color:n===o3.su.TRACK_FOCUS?"text-default":"text-feedback-critical",children:[(0,r.jsx)(df,{pid:a,tag:"span"})," - ",a?.toString()??"null"," @ ",dj(t)]})})})},`${a}-${t}`)})]})]})}let dy=o.memo(function(e){let{pid:t}=e,a=(0,d.bG)([o4.default,E.Ay],()=>{if(null==t)return null;let e=o4.default.getTrackedGameByPid(t)?.fullscreenType;if(null!=e)return e;let a=E.Ay.getGameOrTransformedSubgameForPID(t);return a?.fullscreenType??l6.aI.UNKNOWN},[t]);return(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",tag:"span",children:["Original Screen Type: ",null!=a?(0,o7.wR)(a):"Unknown"]})}),dE=o.memo(function(){let e=(0,d.cf)([o4.default],()=>o4.default.getTrackedGames()),[t,a]=o.useState({}),n=o.useRef(null);return o.useEffect(()=>(n.current=setInterval(async()=>{let e=E.Ay.getRunningGames(),t=[],n=Date.now();for(let a of e)t.push((0,o7.E1)(a.pid,0).then(e=>[a.pid,e,n]));let l=await Promise.all(t);a(e=>l.reduce((e,t)=>{let[a,n,l]=t;if(null==n||null==a)return e;let i=e[a]??[],s=i[i.length-1]?.screenType;return(0===i.length||s!==n)&&(e[a]=[...i,{pid:a,screenType:n,timestamp:l}]),e},{...e}))},+di.A.Millis.SECOND),()=>clearInterval(n.current)),[]),(0,r.jsx)(ir.m,{position:"left",text:"The most recent screen types we've logged, indexed by pid",children:(0,r.jsx)("div",{children:(0,r.jsxs)(g.Ip,{className:Y()(du.st,du.XG),children:[0===Object.keys(e).length&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-default",children:"No recent screen types"}),Object.values(e).map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)(df,{tag:"div",pid:e.pid}),(0,r.jsx)(dy,{pid:e.pid}),null!=t[e.pid]&&[...t[e.pid]].reverse().map(t=>{let{screenType:a,timestamp:n}=t;return(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-default",children:`${a}:${(0,o7.wR)(a)} @ ${dj(n)}`},`${e.pid}-${a}-${n}`)})]},e.pid))]})})})}),dC=o.memo(function(){let e=(0,d.cf)([o4.default],()=>o4.default.getTrackedGames()),t=(0,dd.getPID)(),a=(0,d.bG)([o4.default],()=>o4.default.isOverlayOOPEnabledForPid(t),[t]),[n,l]=(0,d.yK)([dt.A],()=>[dt.A.enabled,dt.A.keepOpen]),i=(0,d.bG)([dl.default],()=>dl.default.getFocusedPID()),s=(0,d.bG)([dl.default],()=>dl.default.isFocusedPidOutOfProcess());return(0,r.jsxs)("div",{className:du.st,children:[0===Object.keys(e).length&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-default",children:"No tracked game times"}),Object.values(e).map(e=>(0,r.jsx)(dg,{pid:e.pid},e.pid)),(0,r.jsxs)("div",{children:[(0,r.jsxs)(p.E,{variant:"text-sm/medium",color:"text-strong",children:["focusedPID: ",i?.toString()??"null"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["isFocusedPidOutOfProcess: ",s?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/medium",color:"text-strong",children:["processPid: ",t?.toString()??"unknown"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["isOOPEnabledForPid: ",a?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["SoundboardOverlay.enabled: ",n?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["SoundboardOverlay.keepOpen: ",l?"Yes":"No"]})]})]})}),dS=[{mode:o3.x7.ClickZones,label:"Click Zone Debug Mode",tooltip:"Enables a red border around click zones to help with debugging."},{mode:o3.x7.WidgetAreas,label:"Render Debug Mode",tooltip:"Enables a border around any widgets that are rendered on screen that are pinned (even if they are hidden). Blue = pinned widgets, Gray = unpinned widgets"},{mode:o3.x7.WindowContainer,label:"Window Container Debug Mode",tooltip:"Enables a border the overlay window"},{mode:o3.x7.DisabledGPUBoost,label:"Disable GPU Boost",tooltip:"Disables GPU Boost, which can help with performance when games compete for GPU resources."},{mode:o3.x7.ForceGPUBoost,label:"Force GPU Boost",tooltip:"Forces GPU Boost, which can help with performance when games compete for GPU resources."},{mode:o3.x7.OverlayRafManagerForceEnabled,label:"Overlay SmartRAF",tooltip:"Creates a widget that has a clickzone inside of it, which will show/hide every few seconds."},{mode:o3.x7.LegacyOverlayLogging,label:"Legacy Overlay Logging",tooltip:"Enables legacy overlay logging, which will forward all legacy logging to the main apps console."}],d_=o.memo(function(){let[e,t]=dv(eu.uss.CLICK_ZONE_DEBUG),[a,n]=dv(eu.uss.PERFORMANCE_DEBUG),l=(0,d.bG)([o9.A],()=>o9.A.getRenderDebugModes()),[i,s]=o.useState({});return o.useEffect(()=>{let e=setInterval(()=>{s({})},200);return()=>clearInterval(e)},[]),(0,r.jsx)("div",{className:du.st,children:dS.map(i=>{let s=i.mode===o3.x7.OverlayRafManagerForceEnabled?`${i.label} (${de.A.getLastRAFCallbackReason()})`:i.label;function d(){return i.mode===o3.x7.ClickZones?null!=e:i.mode===o3.x7.WidgetAreas?null!=a:l.has(i.mode)}return(0,r.jsx)(o.Fragment,{children:(0,r.jsx)(m.d,{checked:d(),onChange:function(){var e;let a=d();i.mode===o3.x7.ClickZones&&t(),i.mode===o3.x7.WidgetAreas&&n(),e=i.mode,oZ.A.setRenderDebugMode(!a,e)},label:s,description:i.tooltip})},i.mode)})})}),dN=o.memo(function(){let e=(0,d.cf)([o4.default],()=>o4.default.getTrackedGames()),t=(0,d.bG)([E.Ay],()=>E.Ay.getRunningGames()).filter(t=>null==e[t.pid]);return(0,r.jsxs)(r.Fragment,{children:[t.length>0&&(0,r.jsx)(ir.m,{position:"left",text:"Games that are running but not tracked by the overlay",children:(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:du.st,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-feedback-critical",children:"Untracked Running Games"}),t.map(e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:`${e.pid} - ${e.name} (${e.exeName})`},e.pid),(0,r.jsx)(dy,{pid:e.pid})]}))]})})}),(0,r.jsx)(ir.m,{position:"left",text:"The current running games process information",children:(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:du.st,children:[0===Object.keys(e).length&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-default",children:"No running games"}),Object.values(e).map(e=>(0,r.jsx)(dp,{trackedGame:e},e.pid))]})})})]})}),dA=o.memo(function(){let e=(0,d.bG)([o4.default],()=>o4.default.getForcedRenderMode()),[t,a]=o.useState(e),n=[{label:o3.V6.UNSET,value:o3.V6.UNSET,id:o3.V6.UNSET},{label:o3.V6.IN_PROCESS_V2,value:o3.V6.IN_PROCESS_V2,id:o3.V6.IN_PROCESS_V2},{label:o3.V6.OUT_OF_PROCESS_V3,value:o3.V6.OUT_OF_PROCESS_V3,id:o3.V6.OUT_OF_PROCESS_V3},{label:o3.V6.OUT_OF_PROCESS_V3_LIMITED_INTERACTION,value:o3.V6.OUT_OF_PROCESS_V3_LIMITED_INTERACTION,id:o3.V6.OUT_OF_PROCESS_V3_LIMITED_INTERACTION}].map(t=>({...t,label:`${t.label} ${e===t.value?"(current)":""}`}));return(0,r.jsx)(j.l,{label:"Override the overlay render mode",value:t,options:n,onSelectionChange:function(e){a(e),oZ.A.forceRenderMode(e)},selectionMode:"single",fullWidth:!0})});function dk(e){let{modalProps:t,onClose:a}=e,[n,l]=o.useState(null);function i(){a(null)}return(0,r.jsxs)(oz.EO,{size:oz.rI.LARGE,"aria-label":"Breadcrumb Import",...t,transitionState:t.transitionState,parentComponent:"BreadcrumbImportPanel",children:[(0,r.jsxs)(oz.rQ,{align:o1.A.Align.CENTER,justify:o1.A.Justify.BETWEEN,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-feedback-critical",children:"Breadcrumb Import"}),(0,r.jsx)(oz.s_,{onClick:i})]}),(0,r.jsx)(oz.$m,{children:(0,r.jsx)("div",{className:du.st,children:(0,r.jsx)(oH.f,{label:"Paste JSON Here",onChange:l,value:n??"",rows:12})})}),(0,r.jsx)(oz.jl,{children:(0,r.jsxs)(np.e,{direction:"horizontal-reverse",children:[(0,r.jsx)(x.$,{variant:"primary",text:"Import",onClick:function(){a(n)}}),(0,r.jsx)(x.$,{variant:"secondary",text:"Clear",onClick:i})]})})]})}let dD={native:{label:"Native",filter:e=>e.type===o6.ON.NativeLegacy||e.type===o6.ON.NativeOOP},render:{label:"Render",filter:e=>e.type===o6.ON.Renderer},flux:{label:"Flux",filter:e=>e.type===o6.ON.Flux},client:{label:"Client",filter:e=>e.type===o6.ON.OOPModule||e.type===o6.ON.LegacyModule}};function dI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o6.QJ.Info;if(t===o6.QJ.Error)return"var(--text-feedback-critical)";switch(e){case o6.ON.NativeLegacy:return"var(--yellow-500)";case o6.ON.NativeOOP:return"var(--green-500)";case o6.ON.Flux:return"var(--brand-400)";case o6.ON.Renderer:return"var(--brand-500)";case o6.ON.LegacyModule:return"var(--yellow-300)";case o6.ON.OOPModule:return"var(--green-300)";default:return"var(--gray-400)"}}let dT=[{key:"type",cellClassName:du.SZ,renderHeader:()=>null,render(e){let{type:t,logType:a}=e,n=dR(t);return(0,r.jsx)("div",{className:du.g$,style:{color:dI(t,a)},children:(0,r.jsx)(n,{color:"currentColor",size:"sm"})})}},{key:"Name",cellClassName:du.Cm,render(e){let{name:t,type:a,logType:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.E,{variant:"text-md/normal",color:function(e){switch(e){case o6.QJ.Info:return"text-strong";case o6.QJ.Warning:return"text-feedback-warning";case o6.QJ.Error:return"text-feedback-critical";default:return"text-subtle"}}(n),children:t}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["(",a,")"]})]})}},{key:"Timestamp",cellClassName:du.DK,render(e){let{timestamp:t}=e;return(0,nq.i$)(nU()(t),"h:mm:ss.SSS")}}];function dR(e){switch(e){case o6.ON.NativeLegacy:return oK.W;case o6.ON.NativeOOP:return oY.q;case o6.ON.Renderer:case o6.ON.Flux:return oq.v;case o6.ON.LegacyModule:return oJ.k;case o6.ON.OOPModule:return oQ.o;default:return oJ.k}}function dw(e){return JSON.stringify(e,(e,t)=>void 0===t?null:t,2)}let dO=["__webpack_require__","fn"],dM=["web.js","web.js.map"],dL=[{id:"details",name:"Details",group:nx.fu.NONE,render:e=>{let{breadcrumb:t,onClose:a}=e,{name:n,type:l,logType:i,nativeId:s,stack:o,data:d,timestamp:c,pid:u}=t,m=nU()(c),h=dR(l);return(0,r.jsxs)(g.Ar,{className:du.bW,children:[(0,r.jsxs)(o2.A,{className:Y()(tZ.jr,du.nZ),children:[(0,r.jsx)("div",{style:{color:dI(l,i)},className:du.nr,children:(0,r.jsx)(h,{color:"currentColor",size:"sm"})}),(0,r.jsxs)(o2.A.Title,{wrapperClassName:du.qd,children:[n," (",l,")",(0,r.jsx)(q.D,{tag:"span",className:du.KE,onClick:()=>(0,nY.C)(n),children:(0,r.jsx)(nB.CopyIcon,{color:"currentColor",size:"sm"})})]}),(0,r.jsx)(o2.A.Icon,{icon:nB.CopyIcon,tooltip:"Copy all properties",onClick:()=>{(0,nY.C)(dw(t))}}),(0,r.jsx)(o2.A.Icon,{icon:n$.a,tooltip:"Close",onClick:a})]}),(0,r.jsxs)(n5,{className:du.ZK,children:[(0,r.jsx)(n4,{name:"Timestamp",copyValue:m.toISOString(),children:(0,r.jsx)("time",{dateTime:m.toISOString(),title:(0,nq.i$)(m,"LLLL"),children:(0,nq.i$)(m,"L h:mm:ss.SSS")})}),(0,r.jsx)(n4,{name:"Log Type",copyValue:i,children:(0,r.jsx)("code",{children:i})}),(0,r.jsx)(n4,{name:"PID",copyValue:u?.toString()??"null",children:(0,r.jsx)("code",{children:u?.toString()??"null"})}),(0,r.jsx)(n4,{name:"Native ID",copyValue:s?.toString()??"null",children:(0,r.jsx)("code",{children:s?.toString()??"null"})}),(0,r.jsx)(n4,{name:"Data",copyValue:dw(d),children:(0,r.jsx)("code",{children:dw(d)})}),null!=o&&(0,r.jsx)(n4,{name:"Stack Trace",copyValue:o,children:(0,r.jsx)("code",{children:o.split("\n").map((e,t)=>{let a=e.match(/at (.*) \((.*):(\d+):(\d+)\)/);if(null!=a){let[,e,n,l,i]=a,s=n.split(/[\\/]/).pop();return dO.includes(e.trim())?null:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:du.e0,children:e.trim()}),!dM.includes(s??"")&&(0,r.jsxs)(r.Fragment,{children:[" (",(0,r.jsxs)("span",{className:du.lz,title:n,children:[s,":",l,":",i]}),")"]})]},t)}return(0,r.jsx)("div",{children:e},t)})})})]})]})}}],dP={searchType:nH.n.REGEX,searchStringGenerator:e=>{let{name:t,type:a,stack:n,data:l}=e,i=[t,a,JSON.stringify(l)];return null!=n&&i.push(n),i},throttleMs:100};function dU(){let{ref:e,height:t}=(0,o0.Ay)(),a=(0,d.bG)([o9.A],()=>o9.A.isModuleLoggingEnabled()),[n,l]=o.useState(a),[i,s]=o.useState(!1),[c,u]=o.useState(null),[m,h]=o.useState(Object.keys(dD)),[x,g]=(0,d.bG)([o9.A],()=>o9.A.getOverlayLoggingBreadcrumbs(),[],ds.D),[v,j]=o.useState(null),f=v??x,b=null!=v?-1:g;o.useEffect(()=>{0!==b&&(i?u(f.reduce((e,t)=>"game_tracking_starting"===t.name?Math.max(e,t.timestamp):e,0)):u(null))},[i,f,b]);let[y,E]=o.useState(""),C=o.useMemo(()=>0===b?[]:f.filter(e=>{if(i&&null!=c&&e.timestamp<c)return!1;for(let t of m){let{filter:a}=dD[t];if(a(e))return!0}return!1}),[f,m,c,i,b]),[S,_]=o.useState(C),[N,A]=o.useState(null),k=o.useMemo(()=>f.find(e=>e.key===N),[f,N]),D=o.useCallback(e=>{_(e)},[]),{renderSelectedTab:I}=(0,nh.A)({tabs:dL},[]);(0,nK.RT)(y,C,D,dP,[f]);let T=o.useCallback(e=>{l(e),oZ.A.setModuleLogging(e)},[]),[R,w]=o.useState(!1),O=o.useRef(null),M=o.useCallback(()=>{(0,nY.C)(JSON.stringify(C)),w(!0)},[C]);o.useEffect(()=>{if(R)return O.current=setTimeout(()=>{w(!1)},4e3),()=>{null!=O.current&&clearTimeout(O.current)}},[R]);let L=o.useCallback(e=>{j(null!=e?JSON.parse(e):null)},[]),P=o.useCallback(e=>{if(e)return j(null);(0,eK.openModal)(e=>(0,r.jsx)(dk,{modalProps:e,onClose:t=>{L(t),e.onClose()}}),{modalKey:"breadcrumb-import-panel"},eq.SY)},[L]);return(0,r.jsxs)("div",{ref:e,className:du.rh,children:[(0,r.jsxs)("div",{className:du.st,children:[(0,r.jsxs)("div",{className:Y()(du._V,du.XQ),children:[(0,r.jsx)("div",{title:"Toggles the Polling of Native",className:du.iR,children:(0,r.jsx)(om.S,{label:"Poll Native",checked:n,onChange:e=>T(e)})}),(0,r.jsx)("div",{title:"Only show breadcrumbs for active games",className:du.iR,children:(0,r.jsx)(om.S,{label:"Only Active Games",checked:i,onChange:e=>s(e)})}),(0,r.jsxs)(q.D,{className:du.ny,onClick:M,children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:R?"Copied":"Copy All"}),R?(0,r.jsx)(oy.CheckmarkLargeIcon,{size:"sm",color:eY.A.unsafe_rawColors.GREEN_330.css}):(0,r.jsx)(nB.CopyIcon,{color:"currentColor",size:"sm"})]}),(0,r.jsx)(q.D,{className:du.ny,onClick:()=>P(null!=v),children:(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"currentColor",children:null!=v?"Clear":"Import"})})]}),(0,r.jsx)("div",{className:Y()(du._V,du.XQ),children:Object.entries(dD).map(e=>{let[t,a]=e;return(0,r.jsx)(q.D,{className:Y()(du.pb,m.includes(t)&&du.bx),onClick:()=>{h(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},children:(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"currentColor",children:a.label})},t)})}),(0,r.jsx)("div",{className:du._V,children:(0,r.jsx)(nW.I,{query:y,onChange:E,onClear:()=>E(""),placeholder:"Regex search by breadcrumb name and data"})})]}),(0,r.jsx)("div",{className:Y()(du.st,du.CZ),children:(0,r.jsx)(t0,{columns:dT,data:S,selectedRowKey:N??void 0,onClickRow:e=>A(e.key)})}),null!=k&&(0,r.jsx)(nm,{className:Y()(du.st,du.rf),minHeight:100,initialHeight:null!=t?t/3:300,children:I({breadcrumb:k,onClose:()=>A(null)})})]})}let dG=o.memo(function(){let e=(0,d.bG)([o5.A],()=>o5.A.getPopoutInitializationStages());return(0,r.jsxs)("div",{className:du.st,children:[(0,r.jsx)("div",{className:du.Iv,children:(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-strong",children:"Popout Initialization Stages"})}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:(0,r.jsx)("pre",{children:JSON.stringify(e,void 0,2)})})]})}),dB=o.memo(function(){let e=(0,d.bG)([o9.A],()=>o9.A.isStateDebuggingEnabled()),t=(0,d.bG)([o9.A],()=>o9.A.getDebuggingState());return o.useEffect(()=>(oZ.A.setStateDebugging(!0),()=>{oZ.A.setStateDebugging(!1)}),[]),(0,r.jsxs)("div",{className:du.st,children:[(0,r.jsx)("div",{