2 lines
21 KiB
JavaScript
Executable File
2 lines
21 KiB
JavaScript
Executable File
"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[5320],{83279:(e,n,s)=>{s.d(n,{DebugWindowContents:()=>Jn});var t=s(59496),l=s(36028),a=s(32333),i=s(14722),r=s(98252),o=s(1634),c=s(73229),d=s(44007),u=s(10427);const h=(0,d.v)();window.abba={get:async function(e,n){const s=new c.ProductStateClient((0,u.G)()),t=(await s.getValues(c.GetValuesRequest.fromPartial({}))).pairs;let l={},a="";if(t.abbaOverrides?a=t.abbaOverrides:t.abbaoverrides&&(a=t.abbaoverrides),a)try{l=JSON.parse(a)}catch(e){console.error(`error parsing value=${a}, error=${e}`)}if(Object.prototype.hasOwnProperty.call(l,e))return console.warn(`Abba: Override for ${e} : ${l[e]}`),void setTimeout((()=>n(null,l[e])),0);h.post("sp://abba/v1/flags",{flags:[e]}).then((s=>{const{flags:t=[]}=s,l=t[0]&&t[0].featureName===e&&t[0].cell;n(null,l||null)})).catch((e=>{n(e)}))},getAll:function(e){console.warn("Abba:getAll should only be used by TA tests for logging purposes."),h.get("sp://abba/v1/all_flags").then((n=>{const{flags:s=[]}=n,t=s.reduce(((e,n)=>(e[n.featureName]=n.cell,e)),{});e(null,JSON.stringify(t,null,2))})).catch((n=>{e(n)}))},getRequestedFlagNames:function(e){h.get("sp://abba/v1/requested_flag_names").then((n=>{e(null,JSON.stringify(n.sort(),null,2))})).catch((n=>{e(n)}))}};var x=s(50538);const j="rh7v8PDNC0ke2OkkyRhk",m="L6pjHHt_x4tfksfQ4Pem",v="H0jIvFjLqNoS1jwvMR82",p="UZcGKrwobJ2tS5Ka06pD";var g=s(4637);const f=()=>{const[e,n]=(0,t.useState)(60),[s,l]=(0,t.useState)("stream"),[a,i]=(0,t.useState)("");return(0,g.jsxs)("div",{className:j,children:[(0,g.jsxs)("div",{className:m,children:[(0,g.jsx)("p",{children:"Stream time (in seconds)"}),(0,g.jsx)("input",{className:v,type:"text",value:e,onChange:e=>{const s=e.target.value;n(parseInt(s,10))}}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.increaseStreamTime(e)},children:"Add time"}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.increaseStreamTime(1200)},children:"Add 20 minutes"})]}),(0,g.jsxs)("div",{className:m,children:[(0,g.jsx)("p",{children:"Override Country"}),(0,g.jsxs)("select",{value:a,onBlur:()=>{},onChange:e=>{i(e.target.value)},children:[(0,g.jsx)("option",{value:"US",children:"USA"}),(0,g.jsx)("option",{value:"UK",children:"United Kingdom"}),(0,g.jsx)("option",{value:"JP",children:"Japan"}),(0,g.jsx)("option",{value:"BR",children:"Brasil"}),(0,g.jsx)("option",{value:"AU",children:"Australia"}),(0,g.jsx)("option",{value:"SE",children:"Sweden"}),(0,g.jsx)("option",{value:"",children:"Clear Override"})]}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.overrideCountry(a)},children:"Override"})]}),(0,g.jsxs)("div",{className:m,children:[(0,g.jsx)("p",{children:"Clear ad in slot"}),(0,g.jsxs)("select",{value:s,onBlur:()=>{},onChange:e=>{l(e.target.value)},children:[(0,g.jsx)("option",{value:"stream",children:"STREAM"}),(0,g.jsx)("option",{value:"billboard",children:"BILLBOARD OVERLAY"}),(0,g.jsx)("option",{value:"promotedsong",children:"PROMOTED SONG"}),(0,g.jsx)("option",{value:"hpto",children:"HPTO"}),(0,g.jsx)("option",{value:"leaderboard",children:"LEADERBOARD"})]}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.clearSlot(s)},children:"Clear slot"}),(0,g.jsx)("p",{children:"Trigger ad in slot"}),(0,g.jsxs)("select",{value:s,onBlur:()=>{},onChange:e=>{l(e.target.value)},children:[(0,g.jsx)("option",{value:"stream",children:"STREAM"}),(0,g.jsx)("option",{value:"billboard",children:"BILLBOARD OVERLAY"}),(0,g.jsx)("option",{value:"promotedsong",children:"PROMOTED SONG"}),(0,g.jsx)("option",{value:"hpto",children:"HPTO"}),(0,g.jsx)("option",{value:"leaderboard",children:"LEADERBOARD"})]}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.triggerSlot(s)},children:"Trigger slot"})]}),(0,g.jsx)("button",{className:p,onClick:()=>{x.N.queueVideoAd()},children:"Queue Video Ad"})]})};var b=s(61740),y=s(79475),N=s(70786),S=s(31070);const O="scaF2wOGtuiU5UBKJrGa",w="PjVBb0nlrIUasTrrFgCx",C="MjtdwpkzFFhhmzeyzOy2",A="uVClWczmJLRR5jfAENGP",k=[{label:"Production",value:"prod"},{label:"Development",value:"dev"}],I=()=>{const e=(0,b.I0)(),n=(0,b.v9)((e=>e.inAppMessaging.env)),s=(0,b.v9)((e=>e.inAppMessaging.message)),[l,a]=(0,t.useState)(""),[i,r]=(0,t.useState)(""),[o,c]=(0,t.useState)(!1);(0,t.useEffect)((()=>{s&&o&&c(!1)}),[s,o]);const d=!s&&o;return(0,g.jsx)("div",{className:O,children:(0,g.jsxs)("div",{className:w,children:[(0,g.jsx)("div",{children:(0,g.jsx)("label",{htmlFor:"desktop.settings.inAppMessagingEnv",children:"Mode (endpoint):"})}),(0,g.jsx)(N.v,{dir:"auto",value:n,id:"desktop.settings.inAppMessagingEnv",onSelect:function(n){"prod"!==n&&"dev"!==n||e((0,S.q1)(n))},children:k.map((({label:e,value:n})=>(0,g.jsx)("option",{value:n,children:e},n)))}),(0,g.jsx)("div",{children:(0,g.jsx)("label",{htmlFor:"desktop.settings.inAppMessagingCreativeId",children:"Creative Id:"})}),(0,g.jsx)("div",{children:(0,g.jsx)("input",{className:C,placeholder:"(eg. 12123434)",id:"desktop.settings.inAppMessagingCreativeId",name:"Creative Id",type:"text",value:l,onChange:function(e){a(e.target.value),c(!1)}})}),(0,g.jsx)("div",{children:(0,g.jsx)("label",{htmlFor:"desktop.settings.inAppMessagingAppUri",children:"URI for Dynamic Content (optional):"})}),(0,g.jsx)("div",{children:(0,g.jsx)("input",{className:C,placeholder:"(eg. spotify:artist:123)",id:"desktop.settings.inAppMessagingAppUri",name:"App Uri",type:"text",value:i,onChange:function(e){r(e.target.value),c(!1)}})}),(0,g.jsx)("div",{}),(0,g.jsx)("div",{}),(0,g.jsx)("div",{children:(0,g.jsx)(y.D,{colorSet:"invertedLight",onClick:function(n){n.preventDefault(),e((0,S.XJ)(l,i)),c(!1),window.setTimeout((()=>{c(!0)}),1e3)},children:"Get Preview"})}),d&&(0,g.jsx)("div",{className:A,children:"No Messsage found"})]})})};var R=s(95019),P=s(29514),E=s(28418),T=s(28356),D=s(30468),B=s(37230),L=s(76669),U=s(48415),J=s(84334),M=s(30009);const F="mHtMWLOMN_lZh6Eq1lBe",_="Ryr6R2suLwNRYud_tuXs",z="CB4s_xlu5db24RNOdk9e",q="rXwi6WM3vPDuyj9fQLw_",V="rqhyBEi1217s5l9KD42B",W=({name:e,value:n})=>(0,g.jsxs)(T.S,{hover:!0,children:[(0,g.jsx)(D.p,{className:_,highlight:!0,children:e}),(0,g.jsx)(D.p,{className:z,truncate:!0,align:"right",children:n}),(0,g.jsx)(D.p,{className:q,children:(0,g.jsx)("button",{className:V,onClick:()=>{void 0!==n&&(0,M.v)(n)},children:(0,g.jsx)(B.c,{iconSize:16})})})]}),K=()=>{const e=(0,J.p)(),n=e.token?.accessToken??"Not authorized",s=new Date(e.token?.accessTokenExpirationTimestampMs??0);return(0,g.jsx)("div",{className:F,children:(0,g.jsx)(L.x,{children:(0,g.jsxs)(U.i,{children:[(0,g.jsxs)("colgroup",{children:[(0,g.jsx)("col",{width:"30%"}),(0,g.jsx)("col",{}),(0,g.jsx)("col",{width:"16px"})]}),(0,g.jsxs)("tbody",{children:[(0,g.jsx)(W,{name:"Token",value:n}),(0,g.jsx)(W,{name:"Expires At",value:s.toLocaleString()}),(0,g.jsx)(W,{name:"Retry Attempt",value:e.retryAttempt?.toString()??"N/A"}),(0,g.jsx)(W,{name:"Retry At",value:e.retryAt?.toLocaleString()??"N/A"})]})]})})})};var $=s(83682);const H="WT_NZ6JEU_dK03UPUjQm",G="qiIwEYs34R1jRXwb_sZ8",Q="x_Ve8I65cAL4jZHbutKP",Y="y_1aE6JElOnrFrvmgpUO",Z="rOqbwjYwx0AIWTfoYOQe",X="w0xpmm3i0WhHooXZt9xC",ee=({name:e,value:n})=>(0,g.jsxs)(T.S,{hover:!0,children:[(0,g.jsx)(D.p,{className:G,highlight:!0,children:e}),(0,g.jsx)(D.p,{className:Q,truncate:!0,align:"right",children:n}),(0,g.jsx)(D.p,{className:Y,children:(0,g.jsx)("button",{className:Z,onClick:()=>{void 0!==n&&(0,M.v)(n)},children:(0,g.jsx)(B.c,{iconSize:16})})})]}),ne=({device:e})=>(0,g.jsxs)(L.x,{children:[(0,g.jsx)("h3",{className:X,children:e.name}),(0,g.jsxs)(U.i,{children:[(0,g.jsxs)("colgroup",{children:[(0,g.jsx)("col",{width:"30%"}),(0,g.jsx)("col",{}),(0,g.jsx)("col",{width:"16px"})]}),(0,g.jsxs)("tbody",{children:[(0,g.jsx)(ee,{name:"Device",value:e?.name}),(0,g.jsx)(ee,{name:"Identifier",value:e.id}),(0,g.jsx)(ee,{name:"Type",value:e.type}),(0,g.jsx)(ee,{name:"Group",value:e.isGroup.toString()}),(0,g.jsx)(ee,{name:"Local",value:e.isLocal.toString()}),(0,g.jsx)(ee,{name:"Active",value:e.isActive.toString()}),(0,g.jsx)(ee,{name:"Connecting",value:e.isConnecting.toString()}),(0,g.jsx)(ee,{name:"Disabled",value:e.isDisabled.toString()}),(0,g.jsx)(ee,{name:"Volume",value:e.volume.toString()}),(0,g.jsx)(ee,{name:"HiFi",value:e.hifiSupport.deviceSupported.toString()})]})]})]}),se=()=>{const e=(0,$.O)(),n=e.devices;return(0,g.jsxs)("div",{className:H,children:[(0,g.jsx)(L.x,{children:(0,g.jsxs)(U.i,{children:[(0,g.jsxs)("colgroup",{children:[(0,g.jsx)("col",{width:"30%"}),(0,g.jsx)("col",{}),(0,g.jsx)("col",{width:"16px"})]}),(0,g.jsx)("tbody",{children:(0,g.jsx)(ee,{name:"Status",value:e.connectionStatus})})]})}),n.map((e=>(0,g.jsx)(ne,{device:e},e.id)))]})};var te=s(66494),le=s(49264),ae=s(13889),ie=s(10260),re=s(67188),oe=s(52249),ce=s(88225),de=s(74583),ue=s(95758),he=s(31715),xe=s(96154),je=s(79221),me=s(60259),ve=s(95375),pe=s(56162),ge=s(71500),fe=s(63082),be=s(98718),ye=s(44079),Ne=s(33782),Se=s(85989);const Oe="gbcTqus4yhTHlzm2IETQ",we="QoWcMe7qZMDKemQfS8Qu",Ce="ZeUVhdgF8ZRjvUCTdmLr",Ae="mJkwncrS8jYg4iIg1f7y";const ke=[ae.nW,te.Ul,le.M$,ie.gw,oe._X,de.No,ue.PodcastPaywallsClient,he.PrefsClient,je.ShowServiceClient,me.KQ,Ne.R3,Se.Dx,xe.HB,ce.BK,c.ProductStateClient,ve.Pn,re.ListenLaterServiceClient,ye.ev],Ie="debug-esperanto-requests";const Re=()=>{const[e]=(0,t.useState)((()=>{const e=(0,u.G)();return ke.reduce(((n,s)=>(n[s.SERVICE_ID]={calls:s.DECODERS,client:new s(e)},n)),{})})),n=Object.keys(e),[s,l]=(0,t.useState)(n[0]),a=e[s].calls,i=Object.keys(a),[r,o]=(0,t.useState)(i[0]),[c,d]=(0,t.useState)(null),[h,x]=(0,t.useState)(""),[j,m]=(0,t.useState)(""),v=(0,P.um)(),p=(0,t.useCallback)(((n,s)=>{const t=n??Object.keys(e)[0],a=e[t].calls,i=s??Object.keys(a)[0];l(t),o(i);const r=function(e,n,s){const t=e.getItem(Ie);if("string"!=typeof t)return null;const l=JSON.parse(t);return l[n]?.[s]??null}(v,t,i);x(null!==r?r:JSON.stringify(a[i].request(new Uint8Array),((e,n)=>void 0===n?null:n),2))}),[v,e]);return(0,t.useEffect)((()=>{p()}),[p]),(0,t.useEffect)((()=>{!function(e,n,s,t){const l=e.getItem(Ie),a="string"==typeof l?JSON.parse(l):{};Object.hasOwn(a,n)||(a[n]={}),a[n][s]=t,e.setItem(Ie,JSON.stringify(a))}(v,s,r,h)}),[v,s,r,h]),(0,g.jsxs)("div",{className:Oe,children:[(0,g.jsxs)("div",{className:we,children:[(0,g.jsx)(pe.D,{as:"p",variant:"ballad",children:"Endpoint"}),(0,g.jsx)(ge.i,{id:"service-dropdown",value:s,onChange:e=>{p(e.currentTarget.value)},children:n.map((e=>(0,g.jsx)("option",{value:e,children:e},e)))}),(0,g.jsx)(ge.i,{id:"call-dropdown",value:r,onChange:e=>{p(s,e.currentTarget.value)},children:i.map((e=>(0,g.jsx)("option",{value:e,children:e},e)))})]}),(0,g.jsxs)("div",{className:Ce,children:[(0,g.jsx)(pe.D,{as:"p",variant:"ballad",children:"Request"}),(0,g.jsx)(fe.P,{buttonSize:"sm",onClick:()=>{try{const e=JSON.parse(h,((e,n)=>null===n?void 0:n)),n=JSON.stringify(e,((e,n)=>void 0===n?null:n),2);x(`${n}\n`)}catch(e){}},children:"Prettify"}),(0,g.jsx)(fe.P,{buttonSize:"sm",onClick:async()=>{if(c)return c.cancel(),void d(null);const n=e[s].client;var t;const l=n[(t=r).charAt(0).toLowerCase()+t.slice(1)];if(1===l.length){const e=await l.call(n,JSON.parse(h,((e,n)=>null===n?void 0:n)));m(JSON.stringify(e,void 0,2))}else 2===l.length&&d(l.call(n,JSON.parse(h,((e,n)=>null===n?void 0:n)),(e=>{m(JSON.stringify(e,void 0,2))})))},children:null!==c?"Cancel":"Send"}),(0,g.jsx)(be.B,{value:h,onChange:e=>{x(e.currentTarget.value)}})]}),(0,g.jsxs)("div",{className:Ae,children:[(0,g.jsx)(pe.D,{as:"p",variant:"ballad",children:"Response"}),(0,g.jsx)(be.B,{value:j,readOnly:!0})]})]})};s(9407),s(90154);var Pe=s(90762);var Ee=s(58706),Te=s(31538),De=s(3442);var Be=s(74824),Le=s(90773);var Ue=s(37409),Je=s(99948),Me=s(27509);const Fe="bFE0oGWgZ40KJHjcBj12",_e="nAeIvCNG4jVwkKxAEqwm",ze="KG4I4Zh3DDzaN0XwzddI",qe="tiUNZpj0HxFf5EOWSiCA",Ve="eymcN9Ndbrbe5jR7URP_",We="nzbIAA5MqUSD0hIKUuHg",Ke="hksYFxAm48XqAEbpcukQ",$e="UnO1u4VJB0B6pTtqWh1n",He="xlSWVFMQmYmRK34yiPOA",Ge="oKgZ0g8at59jN8nf8Bee",Qe="Nodut0kqaRIc93iGqbbP",Ye="dUIum8rPR6Msq9wot5ky",Ze="QHO5pYBkfWBn6qyAh9dp";const Xe=({size:e,ranges:n})=>{if(0===n.length)return(0,g.jsx)("div",{className:Ke,children:(0,g.jsx)("div",{className:$e})});const s=`linear-gradient(90deg, ${n.map((n=>{const s=100*n.fromByte/e,t=100*n.toByte/e;return`transparent ${s}%, ${Ee.$_Y.azure135} ${s}%, ${Ee.$_Y.azure135} ${t}%, transparent ${t}%`})).join(", ")})`;return(0,g.jsx)("div",{className:Ke,children:(0,g.jsx)("div",{className:$e,style:{background:s}})})},en=({item:e,file:n})=>{const s=(0,Ue.g)(),t=(function(e){let n,s,t=0;if(0===e.length)return t;for(n=0;n<e.length;n++)s=e.charCodeAt(n),t=(t<<5)-t+s,t|=0;return t}(`${n.format}${n.bitrate}`)+180)%360;return(0,g.jsxs)(T.S,{hover:!0,children:[(0,g.jsx)(D.p,{className:_e,highlight:!0,children:(0,g.jsxs)("div",{className:He,style:{background:`linear-gradient(180deg, hsl(${t}, 60%, 30%), hsl(${t}, 40%, 70%))`},children:[(0,g.jsx)("span",{className:Ge,children:n.format}),(0,g.jsx)("span",{className:Qe,children:nn(n.bitrate,1e3,"k")})]})}),(0,g.jsx)(D.p,{className:ze,truncate:!0,children:(0,g.jsxs)("div",{className:We,children:[n.fileId,(0,g.jsx)(Xe,{size:n.byteSize,ranges:n.byteRanges})]})}),(0,g.jsxs)(D.p,{className:qe,children:[(0,g.jsx)("button",{className:Ve,onClick:()=>{s.play({uri:"spotify:internal:fileplayback",pages:[{items:[{...e,provider:"context",metadata:{"media.manifest":JSON.stringify({id:n.fileId,bitrate:n.bitrate,format:n.formatEnum,encryption:"aes"})}}]}]},{referrerIdentifier:"PlayerStub_UnknownReferrer",featureIdentifier:"debug"})},children:(0,g.jsx)(Te.J,{iconSize:16})}),(0,g.jsx)("button",{className:Ve,onClick:()=>{(0,M.v)(n.fileId)},children:(0,g.jsx)(B.c,{iconSize:16})})]})]})};function nn(e=undefined,n=1,s=""){if(void 0!==e&&-1!==e)return"string"==typeof e&&(e=Number.parseInt(e,10)),`${(e/n).toLocaleString("en",{maximumFractionDigits:10})}${s}`}function sn(e=undefined){return!0===e?"Yes":"No"}function tn(e=undefined){if(void 0!==e)return(0,Me.m)(parseInt(e,10))}const ln=({name:e,value:n})=>(0,g.jsxs)(T.S,{hover:!0,children:[(0,g.jsx)(D.p,{className:_e,highlight:!0,children:e}),(0,g.jsx)(D.p,{className:ze,truncate:!0,align:"right",children:n}),(0,g.jsx)(D.p,{className:qe,children:(0,g.jsx)("button",{className:Ve,onClick:()=>{void 0!==n&&(0,M.v)(n)},children:(0,g.jsx)(B.c,{iconSize:16})})})]}),an=()=>{const e=(0,Je.Y)((e=>e?.item??null)),n=function(){const[e,n]=(0,t.useState)(null),s=(0,De.f)();return(0,t.useEffect)((()=>{let e=!0;return s.getPlaybackInfo().then((s=>{e&&n(s)})),()=>{e=!1}}),[s]),(0,Le._)(Be.r.INFO,(({data:e})=>{n(e)})),e}(),s=function(e=null,n=null){const[s,l]=(0,t.useState)(null),a=(0,De.f)();return(0,t.useEffect)((()=>{let s=!0,t=null;if(null===e)l(null);else{const i=async()=>{const n=await a.getFiles(e);s&&l(n)};i(),null!==n&&(t=window.setInterval(i,n))}return()=>{s=!1,null!==t&&window.clearInterval(t)}}),[a,e,n]),s}(e?.uri,500),l=(0,Ue.g)();return null===e?(0,g.jsx)("div",{className:Fe,children:"Nothing is currently playing."}):(0,g.jsxs)("div",{className:Fe,children:[(0,g.jsxs)("div",{className:Ye,children:[(0,g.jsx)(pe.D,{variant:"violaBold",children:"Forced shuffle"}),(0,g.jsx)(Pe.Z,{id:"forced-shuffe",value:l.getForcedShuffle(),onSelected:e=>{l.setForcedShuffle(e)}})]}),(0,g.jsx)("div",{children:(0,g.jsx)("button",{className:Ze,onClick:()=>{l.play({uri:"invalid_context_uri"},{referrerIdentifier:"PlayerStub_UnknownReferrer",featureIdentifier:"debug"})},children:(0,g.jsx)("span",{children:"Clear context"})})}),(0,g.jsx)(L.x,{children:(0,g.jsxs)(U.i,{children:[(0,g.jsxs)("colgroup",{children:[(0,g.jsx)("col",{width:"30%"}),(0,g.jsx)("col",{}),(0,g.jsx)("col",{width:"16px"})]}),(0,g.jsxs)("tbody",{children:[(0,g.jsx)(ln,{name:"url"===n?.fileType?"URL":"File ID",value:n?.fileId}),(0,g.jsx)(ln,{name:"Type",value:n?.fileType}),(0,g.jsx)(ln,{name:"url"===n?.fileType?"URL":"File ID",value:n?.fileId}),(0,g.jsx)(ln,{name:"Codec",value:n?.codecName}),(0,g.jsx)(ln,{name:"Bitrate",value:nn(n?.fileBitrate,1e3,"k")}),(0,g.jsx)(ln,{name:"Strategy",value:n?.strategy}),(0,g.jsx)(ln,{name:"Target Bitrate",value:nn(n?.targetBitrate,1e3,"k")}),(0,g.jsx)(ln,{name:"Advisted Bitrate",value:nn(n?.advisedBitrate,1e3,"k")}),(0,g.jsx)(ln,{name:"Target File Available",value:sn(n?.targetFileAvailable)}),(0,g.jsx)(ln,{name:"Duration (hh:mm)",value:tn(n?.lengthMs)}),(0,g.jsx)(ln,{name:"Duration (ms)",value:nn(n?.lengthMs,1," ms")}),(0,g.jsx)(ln,{name:"Speed",value:nn(n?.playbackSpeed)}),(0,g.jsx)(ln,{name:"Gain Adjustment",value:nn(n?.gainAdjustment)}),(0,g.jsx)(ln,{name:"Loudness",value:n?.hasLoudness?nn(n?.loudness):void 0})]})]})}),(0,g.jsx)(L.x,{children:(0,g.jsxs)(U.i,{children:[(0,g.jsxs)("colgroup",{children:[(0,g.jsx)("col",{width:"72px"}),(0,g.jsx)("col",{}),(0,g.jsx)("col",{width:"32px"})]}),(0,g.jsx)("tbody",{children:s?.map((n=>(0,g.jsx)(en,{item:e,file:n},n.fileId)))})]})})]})};s(89934);var rn=s(84875),on=s.n(rn),cn=s(85830),dn=s(18569),un=s(36098),hn=s(16320),xn=s(17761),jn=s(95012),mn=s(50954),vn=s(24256),pn=s(7813),gn=s(66806);const fn="HnpguQ3rtX44hdThdwy9",bn="oJJkROlUPmT5lEqzx1cZ",yn="dQkRirl4qynBunRI_kR2",Nn="RqhApI3LSHoimdyl53SQ",Sn="y1gsL5scUuLOArVrFYRl",On="Ni7focuLC626smvmOnLP",wn="W5wjtyjHTJPGX5j7_WOp",Cn=({property:e,value:n,onOverride:s,isOverridden:t})=>{if("int"===e.type||"internal"===e.type)throw Error("Invalid property type for dropdown!");const l="bool"===e.type?["true","false"]:e.values;return(0,g.jsx)(ge.i,{id:`${e.name}-dropdown`,value:(n??e.default).toString(),onChange:n=>{var t;s(e.name,(t=n.currentTarget.value,"bool"===e.type?"true"===t:t))},className:on()({[wn]:t}),children:l.map((e=>(0,g.jsx)("option",{value:e,children:e},e)))})},An=({property:e,value:n,onOverride:s,isOverridden:l})=>{if("int"!==e.type)throw Error("Invalid property type for dropdown!");const[a,i]=(0,t.useState)(n??e.default),r=(0,cn.y1)((n=>{s(e.name,n)}),500);return(0,g.jsx)(dn.y,{type:"number",min:e.lower,max:e.upper,value:a,onChange:e=>{i(e.currentTarget.value),r(Number.parseInt(e.currentTarget.value,10))},className:on()({[wn]:l})})},kn=({property:e,localValue:n,remoteValue:s,onOverride:t,filter:l})=>{const a=n!==s;return(0,g.jsxs)(T.S,{hover:!0,children:[(0,g.jsx)(D.p,{className:yn,title:e.name,highlight:!0,children:l?(0,g.jsx)(pn.o,{searchWords:[l??""],textToHighlight:e.name}):e.name}),(0,g.jsx)(D.p,{className:Nn,children:e.default.toString()}),(0,g.jsx)(D.p,{className:Nn,children:s?.toString()??null}),(0,g.jsx)(D.p,{className:Nn,children:"bool"===e.type||"enum"===e.type?(0,g.jsx)(Cn,{property:e,value:n,onOverride:t,isOverridden:a}):"int"===e.type?(0,g.jsx)(An,{property:e,value:n,onOverride:t,isOverridden:a}):null})]})},In="debugPanelRemoteConfigLastChangedAtByPropertyName",Rn=({properties:e,localConfiguration:n,remoteConfiguration:s,setOverrides:l,clearOverrides:a})=>{const{filter:i}=(0,t.useContext)(gn.fo),r=(0,P.um)(),o=()=>{const e=r.getItem(In);return e instanceof jn.d||e instanceof mn.y?{}:e},c=(e,n)=>{l(hn.VK.fromJSON({[e]:n})),r.setItem(In,{...o(),[e]:Date.now()})},d=(0,t.useRef)(o()),u=e.sort(((e,n)=>(d.current[n.name]??0)-(d.current[e.name]??0)||e.name.localeCompare(n.name)));return(0,g.jsxs)("div",{className:Sn,children:[(0,g.jsxs)("div",{className:On,children:[(0,g.jsx)(fe.P,{buttonSize:"sm",onClick:()=>{a(),r.clearItem(In)},children:"Clear local overrides"}),(0,g.jsx)(vn.K,{placeholder:"Find",alwaysExpanded:!0})]}),(0,g.jsx)(L.x,{children:(0,g.jsxs)(U.i,{children:[(0,g.jsxs)("colgroup",{children:[(0,g.jsx)("col",{width:"30%"}),(0,g.jsx)("col",{}),(0,g.jsx)("col",{})]}),(0,g.jsxs)("tbody",{children:[(0,g.jsxs)(T.S,{children:[(0,g.jsx)(un.x,{className:bn,children:"Name"}),(0,g.jsx)(un.x,{className:bn,children:"Default"}),(0,g.jsx)(un.x,{className:bn,children:"Remote"}),(0,g.jsx)(un.x,{className:bn,children:"Local"})]}),u.filter((e=>-1!==e.name.toLowerCase().indexOf(i.toLowerCase()))).map((e=>(0,g.jsx)(kn,{property:e,localValue:n.getValue(e.name),remoteValue:s.getValue(e.name),onOverride:c,filter:i},e.name)))]})]})})]})},Pn=()=>{const e=[...(0,hn.y6)()],{localConfiguration:n,remoteConfiguration:s,setOverrides:t,clearOverrides:l}=(0,xn.j)();return(0,g.jsx)("div",{className:fn,children:(0,g.jsx)(gn.hz,{uri:"spotify:internal:debug:remote-config-properties",children:(0,g.jsx)(Rn,{properties:e,localConfiguration:n,remoteConfiguration:s,setOverrides:t,clearOverrides:l})})})},En="wjncHEmBUc7V8RZYdENw",Tn="uyHngn_fJez61BsFl3tA",Dn="J2KhtXbDovVMDOMzv1Jy",Bn="h5nLocSUS3w2NB53IdWQ",Ln="debugWindowActiveTabGroup",Un="debugWindowActiveTabIndex",Jn=()=>{const e=(0,De.f)().getCapabilities().canGetFiles,n=(0,o.wW)(),s=(0,o.wW)(),c=(0,R.ky)();(0,t.useEffect)((()=>{c&&(c.title="Spotify Debug Window")}),[c]);const d=(0,t.useMemo)((()=>Object.fromEntries(Object.entries({Page:[null].filter(E.K),Authorization:[{label:"Access Token",Panel:K}],Playback:[e?{label:"Playback",Panel:an}:null,{label:"Connect",Panel:se}].filter(E.K),"Data Fetching":[n?{label:"Esperanto",Panel:Re}:null,null].filter(E.K),Other:[{label:"Remote Config",Panel:Pn},s?{label:"Ads",Panel:f}:null,{label:"In-App Messaging",Panel:I}].filter(E.K)}).filter((([e,n])=>n.length>0)))),[e,n,s]),u=Object.keys(d),h=(0,P.um)(),x=h.getItem(Ln),j="string"==typeof x&&x in d?x:u[0],[m,v]=(0,t.useState)(j),p=h.getItem(Un),b="number"==typeof p&&p in d[m]?p:0,[y,N]=(0,t.useState)(b),S=d[m][y].Panel;return(0,g.jsx)("div",{className:"encore-dark-theme",children:(0,g.jsxs)("div",{className:En,children:[(0,g.jsx)(l.W,{className:Tn,children:(0,g.jsx)(a.b,{flexMobile:!0,children:u.map((e=>(0,g.jsxs)(t.Fragment,{children:[(0,g.jsx)(i.W,{children:e}),d[e].map(((n,s)=>(0,g.jsx)(r._,{active:m===e&&y===s,label:n.label,onClick:()=>{v(e),h.setItem(Ln,e),N(s),h.setItem(Un,s)},className:Dn,children:n.label},n.label)))]},e)))})}),(0,g.jsx)("div",{className:Bn,children:(0,g.jsx)(S,{})})]})})}}}]);
|
|
//# sourceMappingURL=xpui-debug-window-contents.js.map
|