mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
2 lines
55 KiB
JavaScript
Executable File
2 lines
55 KiB
JavaScript
Executable File
"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[983],{12163:(e,s,t)=>{t.d(s,{DebugWindowContents:()=>wa});var n=t(30758),a=t(97500),r=t.n(a),l=t(34361),i=t(84099),o=t(24700),c=t(70903),d=t(81987),u=(t(98263),t(24755)),h=t(31322),m=t(24538),p=t(92050),x=t(76792),g=t(13094),v=t(43830),j=t(60354),f=t(5681),y=t(41363),b=t(62683);const N=(0,y.h)();window.abba={get:async function(e,s){const t=new f.EW((0,b.X)()),n=(await t.getValues(f.kM.fromPartial({}))).pairs;let a={},r="";if(n.abbaOverrides?r=n.abbaOverrides:n.abbaoverrides&&(r=n.abbaoverrides),r)try{a=JSON.parse(r)}catch(e){console.error(`error parsing value=${r}, error=${e}`)}if(Object.prototype.hasOwnProperty.call(a,e))return console.warn(`Abba: Override for ${e} : ${a[e]}`),void setTimeout((()=>s(null,a[e])),0);N.post("sp://abba/v1/flags",{flags:[e]}).then((t=>{const{flags:n=[]}=t,a=n[0]&&n[0].featureName===e&&n[0].cell;s(null,a||null)})).catch((e=>{s(e)}))},getAll:function(e){console.warn("Abba:getAll should only be used by TA tests for logging purposes."),N.get("sp://abba/v1/all_flags").then((s=>{const{flags:t=[]}=s,n=t.reduce(((e,s)=>(e[s.featureName]=s.cell,e)),{});e(null,JSON.stringify(n,null,2))})).catch((s=>{e(s)}))},getRequestedFlagNames:function(e){N.get("sp://abba/v1/requested_flag_names").then((s=>{e(null,JSON.stringify(s.sort(),null,2))})).catch((s=>{e(s)}))}};var w=t(48013),C=t(99629);const S=function(){const[e,s]=(0,n.useState)();return{streamMocks:e,getStreamMocks:(0,n.useCallback)((async()=>C.DB.getMocksList().then((e=>{s(e.body.test_cases.filter((e=>"billboard"!==e.group&&"lyrics-overlay"!==e.group&&"mobile-launch"!==e.group&&"sponsoredplaylist"!==e.group&&"marquee"!==e.group)))}))),[])}},k="rh7v8PDNC0ke2OkkyRhk",A="Kh0jtEAjRK83Z5A_IZRx";var E=t(86070);const I=()=>{const[e,s]=(0,n.useState)(60),[t,a]=(0,n.useState)(""),[r,l]=(0,n.useState)(""),[i,o]=(0,n.useState)(""),[c,d]=(0,n.useState)({message:"",status:"success"}),[f,y]=(0,n.useState)(!1),{streamMocks:b,getStreamMocks:N}=S(),I=({message:e,isError:s})=>{d({message:e,status:s?"error":"success"}),y(!0),setTimeout((()=>y(!1)),5e3)},O=(0,n.useCallback)((e=>{C.DB.clearSlot(e).then((()=>{I({message:`${e} cleared`,isError:!1})}))}),[]);return(0,n.useEffect)((()=>{N().then((()=>{I({message:"Stream mocks fetched",isError:!1})})).catch((()=>{I({message:"Stream mocks fetch failed",isError:!0})}))}),[N]),(0,E.jsxs)("div",{className:k,children:[(0,E.jsx)(u.qb,{colorSet:"error"===c.status?"negative":"brightAccent",showSnackbar:f,children:c.message}),(0,E.jsx)(h.Z,{as:"h1",variant:"forte",paddingBottom:"24px",children:"Ad Debug Tools"}),(0,E.jsx)(h.Z,{as:"h2",variant:"alto",paddingBottom:"8px",children:"Increase Stream Time"}),(0,E.jsxs)(m.g,{label:"Click a tag or enter a number in seconds",children:[(0,E.jsx)("div",{className:A,children:(0,E.jsxs)(p.I,{mode:"action",layout:"single-line","aria-label":"Stream time presets",children:[(0,E.jsx)(x.v,{onClick:()=>s(60),children:"1 min"}),(0,E.jsx)(x.v,{onClick:()=>s(1200),children:"20 mins"}),(0,E.jsx)(x.v,{onClick:()=>s(3600),children:"1 hour"})]})}),(0,E.jsx)("div",{className:A,children:(0,E.jsx)(g.Z,{onChange:e=>s(e.currentTarget.value),placeholder:"seconds",value:e,type:"number",min:0})}),(0,E.jsx)(v.$,{size:"small",onClick:()=>{C.DB.increaseStreamTime(e).then((()=>{I({message:`${e} seconds of stream time added`,isError:!1})})).catch((e=>{I({message:`Error increasing stream time: ${e}`,isError:!0})}))},children:"ADD STREAM TIME"})]}),(0,E.jsx)(h.Z,{as:"h2",variant:"alto",paddingBottom:"8px",children:"Fetch stream ad from Ad Mocker"}),(0,E.jsxs)(m.g,{label:"Calls overrideAdServerEndpoint with /mock/ad",children:[(0,E.jsx)("div",{className:A,children:(0,E.jsxs)(j.F,{value:i,onChange:e=>{o(e.currentTarget.value)},children:[(0,E.jsx)("option",{disabled:!0,value:"",children:"Choose a mock"}),b?.map((e=>(0,E.jsxs)("option",{value:e.name,children:[e.name," (",e.group,")"]},e.name)))]})}),(0,E.jsx)(v.$,{size:"small",onClick:()=>{const e=(0,w.o)(i,"test");C.DB.overrideAdServerEndpoint("stream",e).then((()=>{I({message:`stream mock url set to ${e}`,isError:!1})})).catch((e=>{I({message:`Error setting mock url: ${e}`,isError:!0})}))},children:"Override stream endpoint"})]}),(0,E.jsx)(h.Z,{as:"h2",variant:"alto",paddingBottom:"8px",children:"Override Country"}),(0,E.jsxs)(m.g,{label:"Calls testingClient.requestOverride with country key",children:[(0,E.jsx)("div",{className:A,children:(0,E.jsxs)(j.F,{value:r,onChange:e=>{l(e.currentTarget.value)},children:[(0,E.jsx)("option",{disabled:!0,value:"",children:"Choose a country"}),(0,E.jsx)("option",{value:"AU",children:"Australia"}),(0,E.jsx)("option",{value:"BR",children:"Brasil"}),(0,E.jsx)("option",{value:"JP",children:"Japan"}),(0,E.jsx)("option",{value:"SE",children:"Sweden"}),(0,E.jsx)("option",{value:"UK",children:"United Kingdom"}),(0,E.jsx)("option",{value:"US",children:"USA"}),(0,E.jsx)("option",{value:"NZ",children:"New Zealand"}),(0,E.jsx)("option",{value:"",children:"Clear"})]})}),(0,E.jsx)(v.$,{size:"small",onClick:()=>{C.DB.overrideCountry(r).then((e=>{0===e.status?I({message:`${r} override successful`,isError:!1}):I({message:`Error overriding country: ${e.status}`,isError:!0})}))},children:"OVERRIDE COUNTRY"})]}),(0,E.jsx)(h.Z,{as:"h2",variant:"alto",paddingBottom:"8px",children:"Clear Slot"}),(0,E.jsxs)(m.g,{label:"Calls slotsClient.clearAllAds for the selected slot",children:[(0,E.jsx)("div",{className:A,children:(0,E.jsxs)(j.F,{value:t,onChange:e=>{a(e.currentTarget.value)},children:[(0,E.jsx)("option",{disabled:!0,value:"",children:"Choose a slot"}),(0,E.jsx)("option",{value:"leaderboard",children:"leaderboard"}),(0,E.jsx)("option",{value:"sponsored-playlist",children:"sponsored playlist"}),(0,E.jsx)("option",{value:"billboard",children:"billboard"}),(0,E.jsx)("option",{value:"hpto",children:"hpto"}),(0,E.jsx)("option",{value:"stream",children:"stream"})]})}),(0,E.jsx)(v.$,{size:"small",onClick:()=>{""!==t?O(t):I({message:"Please select a slot",isError:!0})},children:"CLEAR SLOT"})]}),(0,E.jsx)(h.Z,{as:"h2",variant:"alto",paddingBottom:"8px",children:"Trigger Stream Slot"}),(0,E.jsx)(m.g,{label:"Calls slotsClient.createSlot, adds 20 mins, puts targeting in focus",children:(0,E.jsx)(v.$,{size:"small",onClick:()=>{C.DB.queueVideoAd().then((e=>{const s=e[0];s.error?I({message:`Error queuing video ad: ${s?.error}`,isError:!0}):I({message:"Video queued in stream slot",isError:!1})}))},children:"Queue Video Ad"})})]})};var O=t(56223),R=t(50379),P=t(94526),T=t(90058),_=t(9524),D=t(62473),L=t(31323),M=t(22400),F=t(65203);const U={tableContainer:"TgLcw_ZdaHvESkPEgYLQ",collapsed:"zNGegc8KwsTw3SQKHf_u",tableTitle:"qMSX_Pybr996fZcayagh",tableToggle:"YS6d6BNlR28mEtkxH07w",table:"vDxH9w6xk7bHMabZsuhj",tableHead:"sEU19oMM1YAICdZY23E5",rowHeader:"Cw3H6ooohrEJbRFy9cdg",rowName:"W0HCTspPvFScLWQ9QyJq",rowValue:"WM3ogL7MpxKR0Ym_n9qw",rowActions:"DQhZfpOIasfYMfhSltgB",propertyDescription:"iTrSMSnZF2Sr2pAGcj21",rowAction:"gQCLM4Et4LueQCIi2zW9",rowControl:"f9VIhAIG3YgquVQZqHZ5"},V=({title:e,titleExtra:s,rows:t,cols:a,canCollapse:l=!1,isCollapsedInitially:i=!1,renderHead:o=!1,renderRow:c})=>{const[d,u]=(0,n.useState)(!!l&&i);return(0,E.jsxs)(_.K,{className:r()(U.tableContainer,{[U.collapsed]:d}),children:[e?(0,E.jsxs)("div",{className:U.tableTitle,onClick:()=>{l&&u(!d)},children:[l?(0,E.jsx)("button",{className:U.tableToggle,children:d?(0,E.jsx)(D.V,{size:"small"}):(0,E.jsx)(L.r,{size:"small"})}):null,(0,E.jsx)("h3",{children:e}),s]}):null,(0,E.jsxs)(M.X,{className:U.table,children:[(0,E.jsx)("colgroup",{children:a.map(((e,s)=>(0,E.jsx)("col",{width:e.width,className:e.className},s)))}),o?(0,E.jsx)("thead",{children:(0,E.jsx)("tr",{children:a.map(((e,s)=>(0,E.jsx)(F.M,{className:U.tableHead,children:e.name},s)))})}):null,(0,E.jsx)("tbody",{children:Array.isArray(t)?t.map((e=>c?c(e,a):null)):t})]})]})};var B=t(60656);function z(){const e=(0,B.ox)();return(0,n.useMemo)((()=>e?new e.Function("value","if (value) { navigator.clipboard.writeText(value) }"):()=>{}),[e])}var H=t(99744),J=t(71817);const $="YMcjds_NcAi4cEbmH8CQ",W="gh0JfRJ_O4dLCEdAjNVw",Y="Txtj4xKE3LxMG2u23BIV",K="qJy0FbUBMTQ6CejUVLKy",Z="C58BICAHtIsDaVKzFpyb",q="SdB9m1NLh7FZ1mMfQsAR",G="SxRUmP6Y0IRW1aJijfU5",Q="BWvIH314t4_hcIDb2onA",X="ayzSMCWwex0kqdHjRr3Y",ee=[{language:"en",uri:"spotify:audio:5XyzIK6QVSJan5pJqJCWpb"},{language:"fr-CA",uri:"spotify:audio:6aWVwxZKVFSyvipbS6mMBs"}],se=new Intl.DisplayNames(["en"],{type:"language"}),te=({language:e,uri:s})=>{const t=(0,H.z)(),n=z();return(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:e}),(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:se.of(e)}),(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:s}),(0,E.jsxs)(R.n,{className:U.rowActions,children:[(0,E.jsx)("button",{className:U.rowAction,onClick:()=>{t.play({uri:"spotify:internal:fileplayback",pages:[{items:[{type:J.c.UNKNOWN,uri:s,uid:s,provider:"context",metadata:{title:"Spotify",image_url:"https://spotify-tap.spotifycdn.com/npv/quickstart-pivot-artwork-300.jpg",image_small_url:"https://spotify-tap.spotifycdn.com/npv/quickstart-pivot-artwork-64.jpg",image_large_url:"https://spotify-tap.spotifycdn.com/npv/quickstart-pivot-artwork-640.jpg",image_xlarge_url:"https://spotify-tap.spotifycdn.com/npv/quickstart-pivot-artwork-640.jpg","actions.advancing_past_track":"stop"}}]}],restrictions:{disallowPausingReasons:["narration"],disallowResumingReasons:["narration"],disallowSeekingReasons:["narration"],disallowSkippingPreviousReasons:["narration"],disallowSkippingNextReasons:["narration"],disallowTogglingRepeatContextReasons:["narration"],disallowTogglingRepeatTrackReasons:["narration"],disallowTogglingShuffleReasons:["narration"],disallowAddToQueueReasons:["narration"],disallowSetQueueReasons:["narration"],disallowSettingPlaybackSpeedReasons:["narration"]}},{referrerIdentifier:"PlayerStub_UnknownReferrer",featureIdentifier:"debug"},{skipTo:{index:0}})},children:(0,E.jsx)(P.A,{size:"small"})}),(0,E.jsx)("button",{className:U.rowAction,onClick:()=>{n(s)},children:(0,E.jsx)(T._,{size:"small"})})]})]})},ne=()=>(0,E.jsx)(V,{title:"Consumption Cap Audio Disclaimer",rows:ee,cols:[],renderRow:e=>(0,E.jsx)(te,{...e},e.uri),canCollapse:!0}),ae=()=>(0,E.jsx)("div",{className:$,children:(0,E.jsx)(ne,{})});var re=t(9326);const le="UX08Irxg3ssZhLQNj40b",ie=()=>{const e=z(),s=(0,re.Y)(),t=s.token?.accessToken??"Not authorized",n=new Date(s.token?.accessTokenExpirationTimestampMs??0);return(0,E.jsx)("div",{className:le,children:(0,E.jsx)(V,{title:"Authorization",rows:[{name:"Token",value:t},{name:"Expires At",value:n.toLocaleString()},{name:"Retry Attempt",value:s.retryAttempt?.toString()??"N/A"},{name:"Retry At",value:s.retryAt?.toLocaleString()??"N/A"}],cols:[{width:"30%"},{},{width:"16px"}],renderRow:({name:s,value:t})=>(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:s}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:t}),(0,E.jsx)(R.n,{className:U.rowActions,children:(0,E.jsx)("button",{className:U.rowAction,onClick:()=>e(t),children:(0,E.jsx)(T._,{size:"small"})})})]})})})};var oe=t(14403);const ce="A83S2dzV013Y19VLxbRT",de=({name:e,value:s})=>{const t=z();return(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:e}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:s}),(0,E.jsx)(R.n,{className:U.rowActions,children:(0,E.jsx)("button",{className:U.rowAction,onClick:()=>t(s),children:(0,E.jsx)(T._,{size:"small"})})})]})},ue=({device:e})=>(0,E.jsx)(V,{title:e.name,rows:[{name:"Device",value:e?.name},{name:"Identifier",value:e.id},{name:"Type",value:e.type},{name:"Group",value:e.isGroup.toString()},{name:"Local",value:e.isLocal.toString()},{name:"Active",value:e.isActive.toString()},{name:"Connecting",value:e.isConnecting.toString()},{name:"Disabled",value:e.isDisabled.toString()},{name:"Volume",value:e.volume.toString()},{name:"HiFi",value:e.losslessSupport.deviceSupported.toString()}],cols:[{name:"Property",width:"30%"},{name:"Value"},{name:"Actions",width:"16px"}],renderRow:e=>(0,E.jsx)(de,{...e}),canCollapse:!0,isCollapsedInitially:!0}),he=()=>{const{connectionStatus:e,devices:s}=(0,oe.v)((e=>({connectionStatus:e.connectionStatus,devices:e.devices})));return(0,E.jsxs)("div",{className:ce,children:[(0,E.jsx)(V,{title:"Connect",rows:(0,E.jsx)(de,{name:"Status",value:e}),cols:[{name:"Property",width:"30%"},{name:"Value"},{name:"Actions",width:"16px"}]}),s.map((e=>(0,E.jsx)(ue,{device:e},e.id)))]})};var me=t(12783),pe=t(49217),xe=t(35381),ge=t(38145),ve=t(29917),je=t(89796),fe=t(81272),ye=t(6570),be=t(5260),Ne=t(66144),we=t(260),Ce=t(69270),Se=t(99576),ke=t(60386),Ae=t(58406),Ee=t(62412),Ie=t(43178);const Oe=({view:e,className:s})=>{const t=(0,n.useCallback)((s=>{(0,Ce.TS)(e,s.nativeEvent,"search-panel")&&s.preventDefault()}),[e]),a=(0,n.useCallback)((s=>{e.dispatch({effects:be.Ri.of(new be.L0({search:s}))})}),[e]),r=(0,n.useCallback)((()=>{(0,be.jO)(e)}),[e]),l=(0,n.useRef)(null);return(0,n.useEffect)((()=>{e.dispatch({effects:be.Ri.of(new be.L0({search:""}))}),l.current?.select()}),[e]),(0,E.jsx)("div",{className:s,children:(0,E.jsx)(Ae.E,{iconLeading:(0,E.jsx)(Ee.C,{}),iconTrailing:(0,E.jsx)(Ie.M,{onClick:()=>r()}),children:(0,E.jsx)(g.Z,{ref:l,onKeyDown:e=>t(e),onChange:e=>a(e.currentTarget.value)})})})};var Re=t(28891);function Pe(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Te(e,s,t=[]){let n=0;for(const a of Object.getOwnPropertyNames(e))s(e,a,t)?n++:Pe(e[a])&&(n+=Te(e[a],s,[a,...t]));return n}function _e(e,s){return void 0===e[s]&&(e[s]={},!0)}function De(e,s){return!(!Array.isArray(e[s])||0!==e[s].length)&&(e[s]=[{}],!0)}function Le(e,s){return!(!Array.isArray(e[s])||1!==e[s].length||!Pe(e[s][0])||0!==Object.getOwnPropertyNames(e[s][0]).length)&&(e[s]=[],!0)}function Me(e,s){return!(!Pe(e[s])||0!==Object.getOwnPropertyNames(e[s]).length)&&(e[s]=void 0,!0)}function Fe(e,s,t){return!(!t.some((e=>/policy/i.test(e)))||!1!==e[s])&&(delete e[s],!0)}function Ue(e,s,t={}){let n=0;do{n=Te(s=e.fromPartial(s),_e),n+=Te(s,De)}while(n>0);return Te(s,Me),Te(s,Le),!0===t.cleanPolicies&&Te(s,Fe),s}const Ve=["spotify:artist:5INjqkS1o8h1imAzPqGZBb","spotify:album:79dL7FLiJFOO0EoehUHQBv","spotify:track:6K4t31amVTZDgR3sKmwUJJ","spotify:show:1OLcQdw2PFDPG1jo3s0wbp","spotify:episode:0VpyIy8Srg5IKQdRAbDDH1"],Be=Object.values(Re.UH).filter((e=>"string"==typeof e)).map((e=>({name:e,value:(0,Re.SP)(e)})));function ze(e,s){let t=0;const n=[];if(s.type.is("["))s.parent();else if(s.type.is("Property")){if(!s.firstChild())return[];n.unshift(e.sliceDoc(s.from+1,s.to-1)),s.parent()}for(;s.parent()&&!s.type.is("JsonText");){if(s.type.is("Array"))n.unshift("[]");else if(s.type.is("Property")){if(!s.firstChild())break;n.unshift(e.sliceDoc(s.from+1,s.to-1)),s.parent()}if(++t>1e4)break}return n}function He(e,s){for(const t of s)if("[]"===t){if(!Array.isArray(e)||0===e.length)return null;e=e[0]}else Object.hasOwn(e,t)&&(e=e[t]);return e}function Je(e={}){return(0,ge.yU)({activateOnTyping:!1,override:[s=>{const t=(0,fe.mv)(s.state).cursorAt(s.pos,-1);if(t.type.is("{")||t.type.is("Object")){const n=ze(s.state,t),a=function(e,s){return Object.getOwnPropertyNames(He(e,s))}(e,n);return{from:s.pos,options:a.map((e=>({type:"text",label:e,apply:`"${e}"`})))}}if(t.type.is("[")||t.type.is("Array")){const n=ze(s.state,t),a=He(e,n);return Array.isArray(a)&&Pe(a[0])?{from:s.pos,options:[{type:"text",label:"{ ... }",apply:JSON.stringify(a[0]),boost:1},{type:"text",label:"{}",boost:0}]}:/extension/i.test(n[n.length-1])?{from:s.pos,options:Be.map((({name:e,value:s})=>({type:"constant",label:e,apply:`${s}`})))}:{from:s.pos,options:Ve.map((e=>({type:"text",label:`"${e}"`})))}}if(t.type.is("Property")){const n=ze(s.state,t),a=function(e,s){const t=He(e,s);return void 0===t?"null":Array.isArray(t)?"array":typeof t}(e,n),r=[];if("boolean"===a)r.push({type:"keyword",label:"true",boost:1}),r.push({type:"keyword",label:"false",boost:0});else if("null"===a)r.push({type:"keyword",label:"null",boost:1}),r.push({label:"{}",apply:"{}",boost:0});else if("string"===a){r.push({label:'""'});for(const e of Ve)r.push({label:`"${e}"`})}else if("number"===a)if(/extension/i.test(n[n.length-1]))for(const{name:e,value:s}of Be)r.push({type:"constant",label:e,apply:`${s}`});else r.push({label:"0",apply:"0"}),r.push({label:"10",apply:"10"}),r.push({label:"100",apply:"100"});else"object"===a?r.push({label:"{}",apply:"{}"}):"array"===a&&r.push({label:"[]",apply:"[]"});return{from:s.pos,options:r}}return null}]})}const $e=[we.bM,(0,fe.y9)(we.kS),(0,Ce.$K)(),(0,Ce.dz)(),(0,Ce.Wu)(),(0,Ce.VH)(),Ne.$t.allowMultipleSelections.of(!0),Ce.w4.of([...ve.pw,...ve.cL,...ge.OO,...be.Eo,ve.Yc]),(0,be.$P)({top:!0,createPanel:e=>{const s=e.dom.ownerDocument.createElement("div");return(0,Se.H)(s).render((0,E.jsx)(ke.ID,{target:e.dom.ownerDocument.head,children:(0,E.jsx)(Oe,{view:e})})),{dom:s,top:!0}}}),(0,fe.Lv)(),(0,je.Pq)()],We=[...$e,(0,ve.b6)(),(0,ye.bu)((0,je.cp)()),(0,fe.WD)(),(0,fe.SG)(),(0,ge.wm)()],Ye=[...$e,Ne.$t.readOnly.of(!0)],Ke=new Ne.xx,Ze=({readOnly:e=!1,onChange:s,onDiagnostics:t,editorRef:a,className:r})=>{const l=(0,n.useRef)(null);return(0,n.useEffect)((()=>{const n=new Ce.Lz({parent:l.current,extensions:[...e?Ye:We,Ke.of(Je({})),Ce.Lz.updateListener.of((e=>{e.docChanged&&s?.(e.state.doc.toString());for(const s of e.transactions)for(const e of s.effects)e.is(ye._k)&&t?.(e.value)}))]});return void 0!==a&&(a.current=n),()=>{n.destroy()}}),[e,s,t,a]),(0,E.jsx)("div",{className:r,ref:l})};function qe({readOnly:e,className:s,onChange:t,onDiagnostics:a}){const r=(0,n.useRef)(),l=(0,n.useRef)(t),i=(0,n.useRef)(a);l.current=t,i.current=a;const o=(0,n.useCallback)((()=>{const e=r.current;return void 0!==e?e.state.doc.toString():null}),[]),c=(0,n.useCallback)((e=>{const s=r.current;void 0!==s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:e}})}),[]),d=(0,n.useCallback)((e=>{const s=r.current;void 0!==s&&s.dispatch({effects:Ke.reconfigure(Je(e))})}),[]),u=(0,n.useCallback)((e=>{l?.current?.(e)}),[]),h=(0,n.useCallback)((e=>{i?.current?.(e)}),[]);return{Editor:(0,E.jsx)(Ze,{editorRef:r,readOnly:e,className:s,onChange:u,onDiagnostics:h}),getContent:o,setContent:c,setReference:d}}var Ge=t(87960),Qe=t(31202),Xe=t(75751),es=t(78543),ss=t(92124),ts=t(49875),ns=t(44305),as=t(51210),rs=t(11928),ls=t(23976),is=t(45786),os=t(82124),cs=t(95166),ds=t(95547),us=t(42061),hs=t(77773),ms=t(14142),ps=t(38848),xs=t(49100),gs=t(99030),vs=t(87172),js=t(1275),fs=t(92759),ys=t(33598),bs=t(63321),Ns=t(67599),ws=t(2919),Cs=t(89276),Ss=t(92204),ks=t(28050),As=t(66147),Es=t(83140),Is=t(91493),Os=t(50822),Rs=t(544),Ps=t(501);const Ts=[Ge.B,Qe.ve,Xe.Pc,es.BM,rs.CJ,rs.NB,rs.uC,rs.RI,rs.UF,rs.FY,rs.B3,rs.Dt,rs.s,rs.Xk,rs.Yl,ss.r,ts.pt,ns.MI,as.di,ls.BO,is.Pm,os.Ww,cs._w,ds.rM,ds.A5,ds.qM,us.hN,hs.NI,ms.lb,ps.xo,xs.IU,f.EW,gs.oW,vs.Gy,js.LN,fs.HG,Ps._4,ys.Ag,bs._,Ns.y9,ws.A,Cs.xV,Ss.hA,ks.NH,Re.sp,As.GD,Es.to1,Es.hm7,Es.hb0,Es.Bl$,Es.ZxE,Os.aA,Rs.FZ,Is.zW];function _s(e){return JSON.parse(e,((e,s)=>null===s?void 0:s))}function Ds(e){return JSON.stringify(e,((e,s)=>void 0===s?null:"bigint"==typeof s?s.toString():s),2)}function Ls(){const{serviceMap:e,serviceNames:s}=(0,n.useMemo)((()=>{const e=function(e){return Ts.sort(((e,s)=>e.SERVICE_ID.localeCompare(s.SERVICE_ID))).reduce(((s,t)=>(s[t.SERVICE_ID]={methods:t.METHODS,client:new t(e)},s)),{})}((0,b.X)());return{serviceMap:e,serviceNames:Object.keys(e)}}),[]),[t,a]=(0,n.useState)(s[0]),r=e[t].methods,l=e[t].client,i=Object.keys(r),[o,c]=(0,n.useState)(i[0]),d=r[o].requestType,u=r[o].isStreaming,h=l[o],m=(0,n.useCallback)(((s,t)=>{const n=s??Object.keys(e)[0],r=e[n].methods,l=t??Object.keys(r)[0];a(n),c(l)}),[e,a,c]),p=(0,n.useMemo)((()=>Ds(Ue(d,{},{cleanPolicies:!0}))),[d]),x=(0,n.useMemo)((()=>Ue(d,{})),[d]),g=(0,n.useCallback)((e=>{try{return Ds(Ue(d,_s(e),{cleanPolicies:!0}))}catch(s){return e}}),[d]),v=(0,n.useCallback)((async(e,s)=>{const t=d.fromPartial(_s(e));if(u)return h.call(l,t,(e=>{s(Ds(e))}));const n=await h.call(l,t);return s(Ds(n)),null}),[l,u,d,h]);return{services:s,methods:i,service:t,method:o,client:l,message:d,call:v,jsonReference:x,jsonString:p,prettify:g,update:m}}const Ms="k0haAXLr7hf1SVRhhDf_",Fs="JzYBuC4I28TFE0vRsOB2",Us="Jifrv_M5FQ_4004rxNlX",Vs="ai8gaZdopia8aUEGYxks",Bs="sSRpW8Sztpp8r_xEe6yQ",zs="xoLDWOSxKz7zqi5PkIS1",Hs="GuzyU8s8JXVn4PKEcz1o",Js=()=>{const{services:e,methods:s,service:t,method:a,call:r,jsonReference:l,jsonString:i,prettify:o,update:c}=Ls(),d=(0,n.useRef)(null),[u,h]=(0,n.useState)(!1),[m,p]=(0,n.useState)([]),x=m.length>0,{Editor:g,setContent:v,getContent:j,setReference:f}=qe({className:Hs,onDiagnostics:e=>p(e)}),{Editor:y,setContent:b}=qe({className:Hs,readOnly:!0}),N=(0,n.useCallback)((()=>{null!==d.current&&(d.current.cancel(),d.current=null,h(!1))}),[h]),w=(0,n.useCallback)((async()=>{N();const e=await r(j()??"{}",(e=>{b(e)}));null!==e&&(d.current=e,h(!0))}),[r,N,j,b]),C=(0,n.useCallback)((async()=>{const e=o(j()??"{}");v(e)}),[o,j,v]);(0,n.useEffect)((()=>{f(l),v(i),b(""),N()}),[f,l,v,i,b,N]);const S=[{label:"Core",options:e.filter((e=>-1===e.indexOf("desktop"))).map((e=>({label:e,value:e})))},{label:"Desktop",options:e.filter((e=>-1!==e.indexOf("desktop"))).map((e=>({label:e,value:e})))}],k=s.map((e=>({label:e,value:e})));return(0,E.jsxs)("div",{className:Ms,children:[(0,E.jsxs)("div",{className:Fs,children:[(0,E.jsx)(me.E,{as:"p",variant:"bodyMedium",children:"Endpoint"}),(0,E.jsx)(xe.Ay,{value:{label:t,value:t},options:S,onChange:e=>{c(e?.value??void 0)},styles:{menuList:s=>({...s,minHeight:`min(60vh, ${50*e.length}px)`})}}),(0,E.jsx)(xe.Ay,{value:{label:a,value:a},options:k,onChange:e=>c(t,e?.value??void 0),styles:{menuList:e=>({...e,minHeight:`min(60vh, ${50*s.length}px)`})}})]}),(0,E.jsxs)("div",{className:Us,children:[(0,E.jsxs)("div",{className:Bs,children:[(0,E.jsx)(me.E,{as:"p",variant:"bodyMedium",children:"Request"}),(0,E.jsx)(pe.n,{className:zs,size:"small",disabled:x,onClick:C,children:"Prettify"}),(0,E.jsx)(pe.n,{className:zs,size:"small",disabled:x,onClick:u?N:w,children:u?"Cancel":"Send"})]}),g]}),(0,E.jsxs)("div",{className:Vs,children:[(0,E.jsx)("div",{className:Bs,children:(0,E.jsx)(me.E,{as:"p",variant:"bodyMedium",children:"Response"})}),y]})]})};var $s=t(16059);const Ws={ranges:[{name:"Basic Latin (ASCII)",start:"U+0000",end:"U+007F"},{name:"Latin-1 Supplement",start:"U+0080",end:"U+00FF"},{name:"Latin Extended-A",start:"U+0100",end:"U+017F"},{name:"Latin Extended-B",start:"U+0180",end:"U+024F"},{name:"Greek and Coptic",start:"U+0370",end:"U+03FF"},{name:"Cyrillic",start:"U+0400",end:"U+04FF"},{name:"Armenian",start:"U+0530",end:"U+058F"},{name:"Hebrew",start:"U+0590",end:"U+05FF"},{name:"Arabic",start:"U+0600",end:"U+06FF"},{name:"Devanagari",start:"U+0900",end:"U+097F"},{name:"General Punctuation",start:"U+2000",end:"U+206F"}]},Ys={},Ks=()=>{const e=(0,n.useRef)(null),s=(0,n.useRef)(null),t=(0,n.useRef)(null),a=(0,n.useRef)(null),r=(0,n.useCallback)((()=>{const e=t.current?.getBoundingClientRect().width,s=(0,$s.L)(t.current.textContent,20,400);a.current.textContent=`Real width: ${e}px, Estimated width: ${s}px`}),[]),l=(0,n.useCallback)((()=>{Ws.ranges.forEach((s=>{const t=parseInt(s.start.slice(2),16),n=parseInt(s.end.slice(2),16);for(let s=t;s<=n;s++){const t=String.fromCharCode(s),n=document.createElement("span");n.style.display="inline",n.style.fontSize="20px",n.style.fontWeight="400",n.textContent=t,e.current?.appendChild(n);const a=n.getBoundingClientRect().width,r=Math.floor(a/20*100);Ys[s]=r}})),s.current.textContent=JSON.stringify(Ys)}),[]);return(0,n.useEffect)((()=>{r()}),[r]),(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("h2",{children:"Change the text below if the map is working correctly"}),(0,E.jsx)("div",{children:(0,E.jsx)("span",{contentEditable:!0,style:{fontSize:"20px",fontWeight:400,background:"#fff",border:"1px solid blue",margin:"16px 0",padding:"0px"},ref:t,onInput:r,children:"Lorem ipsum dolor sit amet."})}),(0,E.jsx)("pre",{ref:a})]}),(0,E.jsx)("hr",{}),(0,E.jsx)("h2",{children:"JSON font map output"}),(0,E.jsx)("div",{children:(0,E.jsx)("textarea",{style:{width:"100%",height:"200px"},ref:s})}),(0,E.jsx)("hr",{}),(0,E.jsx)("h2",{children:"Rendering Area"}),(0,E.jsx)("div",{children:(0,E.jsx)("button",{onClick:l,children:"Render chars"})}),(0,E.jsx)("div",{style:{width:"100%",maxWidth:"100%",border:"1px solid red"},ref:e})]})};var Zs=t(71306),qs=t(7143),Gs=t(84997),Qs=t(3052),Xs=t(72973),et=t(92024),st=t(42425),tt=t(57735),nt=t(88784);var at=t(92838),rt=t(64592);var lt=t(2435),it=t(80913);const ot=({size:e,ranges:s})=>{if(0===s.length)return(0,E.jsx)("div",{className:Y,children:(0,E.jsx)("div",{className:K})});const t=`linear-gradient(90deg, ${s.map((s=>{const t=100*s.fromByte/e,n=100*s.toByte/e;return`transparent ${t}%, ${Zs.pfM} ${t}%, ${Zs.pfM} ${n}%, transparent ${n}%`})).join(", ")})`;return(0,E.jsx)("div",{className:Y,children:(0,E.jsx)("div",{className:K,style:{background:t}})})},ct=({item:e,file:s})=>{const t=(0,H.z)(),n=z(),a=(function(e){let s,t,n=0;if(0===e.length)return n;for(s=0;s<e.length;s++)t=e.charCodeAt(s),n=(n<<5)-n+t,n|=0;return n}(`${s.format}${s.bitrate}${s.formatEnum}`)+180)%360;return(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:(0,E.jsxs)("div",{className:Z,style:{background:`linear-gradient(180deg, hsl(${a}, 60%, 30%), hsl(${a}, 40%, 70%))`},children:[(0,E.jsx)("span",{className:q,children:s.format}),(0,E.jsx)("span",{className:G,children:dt(s)})]})}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,children:(0,E.jsxs)("div",{className:W,children:[s.fileId,(0,E.jsx)(ot,{size:s.byteSize,ranges:s.byteRanges})]})}),(0,E.jsxs)(R.n,{className:U.rowActions,children:[(0,E.jsx)("button",{className:U.rowAction,onClick:()=>{t.play({uri:"spotify:internal:fileplayback",pages:[{items:[{...e,provider:"context",metadata:{"media.manifest":JSON.stringify({id:s.fileId,bitrate:s.bitrate,format:s.formatEnum,encryption:"aes"})}}]}]},{referrerIdentifier:"PlayerStub_UnknownReferrer",featureIdentifier:"debug"})},children:(0,E.jsx)(P.A,{size:"small"})}),(0,E.jsx)("button",{className:U.rowAction,onClick:()=>{n(s.fileId)},children:(0,E.jsx)(T._,{size:"small"})})]})]})};function dt(e){switch(e.formatEnum){case 16:return"16-bit";case 22:return"24-bit";default:return ut(e.bitrate,1e3,"k")}}function ut(e=void 0,s=1,t=""){if(void 0!==e&&-1!==e)return"string"==typeof e&&(e=Number.parseInt(e,10)),`${(Number(e)/s).toLocaleString("en",{maximumFractionDigits:10})}${t}`}function ht(e=void 0){return!0===e?"Yes":"No"}function mt(e=void 0){if(void 0!==e)return(0,it.f)(Number(e))}const pt=({name:e,value:s})=>{const t=z();return(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:e}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:s}),(0,E.jsx)(R.n,{className:U.rowActions,children:(0,E.jsx)("button",{className:U.rowAction,onClick:()=>t(s),children:(0,E.jsx)(T._,{size:"small"})})})]})},xt=({terminalType:e,transportType:s,isDefaultDevice:t})=>{const n=t?"essentialPositive":"essentialBase",a=[];switch(e){case ys.FI.TERMINAL_TYPE_SPEAKERS:a.push((0,E.jsx)(qs.r,{semanticColor:n,size:"small"}));break;case ys.FI.TERMINAL_TYPE_HEADPHONES:a.push((0,E.jsx)(Gs.r,{semanticColor:n,size:"small"}));break;case ys.FI.TERMINAL_TYPE_DISPLAY_DEVICE:a.push((0,E.jsx)(Qs.I,{semanticColor:n,size:"small"}))}switch(s){case ys.Yg.TRANSPORT_TYPE_BUILT_IN:case ys.Yg.TRANSPORT_TYPE_VIRTUAL:break;case ys.Yg.TRANSPORT_TYPE_USB:a.push((0,E.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",style:{position:"relative",top:"3px",width:16,height:16,fill:(0,Xs.oj)(n)},children:(0,E.jsx)("path",{d:"m7.792.312-1.533 2.3A.25.25 0 0 0 6.467 3H7.5v7.319a2.5 2.5 0 0 0-.515-.298L5.909 9.56A1.5 1.5 0 0 1 5 8.18v-.266a1.5 1.5 0 1 0-1 0v.266a2.5 2.5 0 0 0 1.515 2.298l1.076.461a1.5 1.5 0 0 1 .888 1.129 2.001 2.001 0 1 0 1.021-.006v-.902a1.5 1.5 0 0 1 .756-1.303l1.484-.848A2.5 2.5 0 0 0 11.995 7h.755a.25.25 0 0 0 .25-.25v-2.5a.25.25 0 0 0-.25-.25h-2.5a.25.25 0 0 0-.25.25v2.5c0 .138.112.25.25.25h.741a1.5 1.5 0 0 1-.747 1.142L8.76 8.99a2.584 2.584 0 0 0-.26.17V3h1.033a.25.25 0 0 0 .208-.389L8.208.312a.25.25 0 0 0-.416 0Z"})}));break;case ys.Yg.TRANSPORT_TYPE_BLUETOOTH:a.push((0,E.jsx)(et.C,{semanticColor:n,size:"small"}));break;case ys.Yg.TRANSPORT_TYPE_DISPLAY_DEVICE:a.push((0,E.jsx)(Qs.I,{semanticColor:n,size:"small"}))}return 0===a.length&&a.push((0,E.jsx)(st.N,{semanticColor:n,size:"small"})),(0,E.jsx)(E.Fragment,{children:a})},gt=({name:e,id:s,isDefaultDevice:t,terminalType:n,terminalTypeRaw:a,transportType:r,transportTypeRaw:l})=>{const i=z();return(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsxs)(R.n,{className:U.rowName,highlight:!0,children:[(0,E.jsx)(xt,{terminalType:n,transportType:r,isDefaultDevice:t})," ",e]}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,children:s}),(0,E.jsx)(R.n,{className:U.rowValue,children:a}),(0,E.jsx)(R.n,{className:U.rowValue,children:l}),(0,E.jsx)(R.n,{className:U.rowActions,children:(0,E.jsx)("button",{className:U.rowAction,onClick:()=>i(s),children:(0,E.jsx)(T._,{size:"small"})})})]})},vt=()=>{const e=(0,lt.o)((e=>e?.item??null)),s=function(){const[e,s]=(0,n.useState)(null),t=(0,nt.p)();return(0,n.useEffect)((()=>{let e=!0;return t.getPlaybackInfo().then((t=>{e&&s(t)})),()=>{e=!1}}),[t]),(0,rt.F)(at._.INFO,(({data:e})=>{s(e)})),e}(),t=function(e=null,s=null){const[t,a]=(0,n.useState)(null),r=(0,nt.p)();return(0,n.useEffect)((()=>{let t=!0,n=null;if(null===e)a(null);else{const l=async()=>{const s=await r.getFiles(e);t&&a(s)};l(),null!==s&&(n=window.setInterval(l,s))}return()=>{t=!1,null!==n&&window.clearInterval(n)}}),[r,e,s]),t}(e?.uri,500),a=(0,H.z)(),[r,l]=(0,n.useState)([]);return(0,n.useEffect)((()=>{const e=(0,b.X)(),s=new ys.Ag(e).getAudioOutputDevices({},(e=>{l(e.devices.sort(((e,s)=>e.isDefaultDevice?-1:s.isDefaultDevice?1:e.name.localeCompare(s.name))))}));return()=>{s.cancel()}}),[]),null===e?(0,E.jsx)("div",{className:$,children:"Nothing is currently playing."}):(0,E.jsxs)("div",{className:$,children:[(0,E.jsxs)("div",{className:Q,children:[(0,E.jsx)(me.E,{variant:"bodySmallBold",children:"Forced shuffle"}),(0,E.jsx)(tt.l,{id:"forced-shuffe",value:a.getForcedShuffle(),onSelected:e=>{a.setForcedShuffle(e)}})]}),(0,E.jsx)("div",{children:(0,E.jsx)("button",{className:X,onClick:()=>{a.play({uri:"invalid_context_uri"},{referrerIdentifier:"PlayerStub_UnknownReferrer",featureIdentifier:"debug"})},children:(0,E.jsx)("span",{children:"Clear context"})})}),(0,E.jsx)(V,{title:"Devices",rows:r,cols:[{name:"Name",width:"30%"},{name:"ID"},{name:"Terminal"},{name:"Transport"},{name:"Actions",width:"16px"}],renderRow:e=>(0,E.jsx)(gt,{...e}),canCollapse:!0}),(0,E.jsx)(V,{title:"Details",rows:[{name:"url"===s?.fileType?"URL":"File ID",value:s?.fileId},{name:"Type",value:s?.fileType},{name:"Codec",value:s?.codecName},{name:"Bitrate",value:ut(s?.fileBitrate,1e3,"k")},{name:"Strategy",value:s?.strategy},{name:"Target Bitrate",value:ut(s?.targetBitrate,1e3,"k")},{name:"Advisted Bitrate",value:ut(s?.advisedBitrate,1e3,"k")},{name:"Target File Available",value:ht(s?.targetFileAvailable)},{name:"Duration (hh:mm)",value:mt(s?.lengthMs)},{name:"Duration (ms)",value:ut(s?.lengthMs,1," ms")},{name:"Speed",value:ut(s?.playbackSpeed)},{name:"Gain Adjustment",value:ut(s?.gainAdjustment)},{name:"Loudness",value:s?.hasLoudness?ut(s?.loudness):void 0}],cols:[{name:"Property",width:"30%"},{name:"Value"},{name:"Actions",width:"16px"}],renderRow:e=>(0,E.jsx)(pt,{...e}),canCollapse:!0}),(0,E.jsx)(V,{title:"Files",rows:t??[],cols:[{name:"Property",width:"30%"},{name:"Value"},{name:"Actions",width:"16px"}],renderRow:s=>(0,E.jsx)(ct,{item:e,file:s},s.fileId),canCollapse:!0,isCollapsedInitially:!0})]})},jt="wNixUJkDt8ib6LarXls_",ft=()=>{const e=(0,lt.o)((e=>e)),s=JSON.stringify(e,null,2),{Editor:t,setContent:a}=qe({readOnly:!0});return(0,n.useEffect)((()=>{a(s)}),[s,a]),(0,E.jsx)("div",{className:jt,children:t})};var yt=t(74303);const bt="cD9jN2lI075m3UkqXSlQ",Nt=()=>{const{data:e}=(0,yt.k)(),s=Object.keys(e).sort().reduce(((s,t)=>(s[t]=e[t],s)),{}),t=JSON.stringify(s,null,2),{Editor:a,setContent:r}=qe({readOnly:!0});return(0,n.useEffect)((()=>{r(t)}),[t,r]),(0,E.jsx)("div",{className:bt,children:a})};var wt=t(89306),Ct=t(64343),St=t(46243),kt=t(4614),At=t(59228);function Et(e,s){const t=(0,At.x)();(0,n.useEffect)((()=>t.getEvents().addListener(e,s)),[e,s,t])}var It=t(97277);const Ot="Gc_xi0GmVaC4DyViocdz",Rt="uliJIthMaP5kUx2IpElY",Pt="h0NXdJlkjupX8nTYlhhc",Tt=({name:e,value:s})=>{const t=z();return(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:e}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:s}),(0,E.jsx)(R.n,{className:U.rowActions,children:(0,E.jsx)("button",{className:U.rowAction,onClick:()=>t(s),children:(0,E.jsx)(T._,{size:"small"})})})]})},_t=()=>{const e=(()=>{const e=(0,At.x)(),[s,t]=(0,n.useState)(e.getSubscriptions()),a=(0,n.useCallback)((()=>{t(e.getSubscriptions())}),[e,t]);return Et(kt.K.SUBSCRIBE,a),Et(kt.K.CANCEL,a),Et(kt.K.REFRESH,a),s})(),s=z(),t=Object.entries((a=e=>`${e.ident}${e.isPrefix?"*":""}`,e.reduce(((e,s)=>{const t=a(s);return(e[t]=e[t]||[]).push(s),e}),{})));var a;return(0,E.jsx)(V,{title:"Subscriptions",rows:t,cols:[{name:"Ident"},{name:"Actions",width:"16px"}],renderRow:([e,t])=>(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsxs)(R.n,{className:U.rowValue,truncate:!0,children:[e," (",t.length,")"]}),(0,E.jsx)(R.n,{className:U.rowActions,children:(0,E.jsx)("button",{className:U.rowAction,onClick:()=>s(e),children:(0,E.jsx)(T._,{size:"small"})})})]},e),canCollapse:!0})};function Dt(e){if(e.ident.endsWith("/json"))return!0;if(0===e.payloads.length)return!1;const s=(0,It.dI)(e.payloads[0]);return s.length>0&&"{"===s[0]}const Lt=({message:e})=>{const[s,t]=(0,n.useState)(!1),{Editor:a,setContent:r}=qe({readOnly:!0});return(0,n.useEffect)((()=>{if(0!==e.payloads.length)if(Dt(e)){const s=JSON.parse((0,It.dI)(e.payloads[0]));r(JSON.stringify(s,void 0,2))}else{const s=(0,It.U5)(e.payloads[0]);r(JSON.stringify(s,void 0,2))}}),[e,r]),(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,children:new Date(e.timestamp).toLocaleString()}),(0,E.jsx)(R.n,{className:U.rowName,children:e.ident}),(0,E.jsxs)(R.n,{className:U.rowName,children:[(0,E.jsx)("button",{className:U.rowAction,onClick:()=>t(!s),children:(0,E.jsx)(wt.W,{size:"small"})}),(0,E.jsx)(St.M,{isOpen:s,className:Pt,onRequestClose:()=>t(!1),shouldCloseOnEsc:!0,shouldCloseOnBackdropClick:!0,animated:!0,children:a})]})]})},Mt=()=>{const e=(0,At.x)(),[s,t]=(0,n.useState)(0),[a,r]=(0,n.useState)(!0);Et(kt.K.MESSAGE,(()=>{t(s+1)}));const l=a?e.getMessages().filter(Dt):e.getMessages();return(0,E.jsx)(V,{title:"Messages",titleExtra:(0,E.jsxs)("div",{className:Rt,children:[(0,E.jsx)(Ct.c,{id:"json-only",size:"small",checked:a,onChange:()=>r(!a)}),(0,E.jsx)(me.E,{as:"label",htmlFor:"json-only",variant:"marginal",children:"JSON only"})]}),rows:l,cols:[{name:"Time",width:"200px"},{name:"Ident"},{name:"Payload",width:"16px"}],renderRow:(e,s)=>(0,E.jsx)(Lt,{message:e},`${s}-${e.ident}-${e.timestamp}`),canCollapse:!0})},Ft=()=>{const e=(()=>{const e=(0,At.x)(),[s,t]=(0,n.useState)(null);(0,n.useEffect)((()=>{e.getConnectionId().then((e=>t(e)))}),[e,t]);const a=(0,n.useCallback)((e=>t(e.data.connectionId)),[t]);return Et(kt.K.CONNECTION,a),s})();return(0,E.jsxs)("div",{className:Ot,children:[(0,E.jsx)(V,{title:"PubSub",rows:(0,E.jsx)(Tt,{name:"Connection ID",value:e??"-"}),cols:[{name:"Property",width:"30%"},{name:"Value"},{name:"Actions",width:"16px"}]}),(0,E.jsx)(_t,{}),(0,E.jsx)(Mt,{})]})};var Ut=t(8159),Vt=t(74765),Bt=t(28835),zt=t(25763),Ht=t(26694),Jt=t(53129),$t=t(15549),Wt=t(25639),Yt=t(65916),Kt=t(45874),Zt=t(84640);const qt=36e5;var Gt=t(41944),Qt=t(90126),Xt=t(41286),en=t(51396);const sn="CPh1NBIPIZdD7S5EeAJw",tn="ImIlB71ObQKbFW5YUTmT",nn="TzXFebu8XWPbINPiP4rs",an="MigGXxVYX9Yi6_lGrDwe",rn="oyMDrjEp_otdJzIKn5YC",ln=({property:e,value:s,onOverride:t,isOverridden:n})=>{if("int"===e.type||"internal"===e.type)throw Error("Invalid property type for dropdown!");const a="bool"===e.type?["true","false"]:e.values;return(0,E.jsx)(j.F,{id:`${e.name}-dropdown`,value:(s??e.default).toString(),onChange:s=>{var n;t(e.name,(n=s.currentTarget.value,"bool"===e.type?"true"===n:n))},className:r()({[an]:n}),children:a.map((e=>(0,E.jsx)("option",{value:e,children:e},e)))})},on=({property:e,value:s,onOverride:t,isOverridden:a})=>{if("int"!==e.type)throw Error("Invalid property type for dropdown!");const[l,i]=(0,n.useState)(s??e.default),o=(0,Ut.YQ)((s=>{t(e.name,s)}),500);return(0,E.jsx)(g.Z,{type:"number",min:e.lower,max:e.upper,value:l,onChange:e=>{i(e.currentTarget.value),o(Number.parseInt(e.currentTarget.value,10))},className:r()({[an]:a})})},cn=({property:e,localValue:s,remoteValue:t,experimentUrl:n,isRemoteUserSpecificOverride:a,onOverride:r,filter:l})=>{const i=s!==t,o=e.default.toString(),c=t?.toString();let d=(n||o!==c?c:null)??null;return d&&n&&(d=(0,E.jsxs)("a",{href:n,target:"_blank",className:rn,children:[c,a&&(0,E.jsx)(Vt.o,{size:"small"})]}),a&&(d=(0,E.jsx)(Jt.Zp,{label:"This value comes from a user-specific override in the linked experiment.",children:d}))),(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsxs)(R.n,{className:U.rowName,title:e.name,highlight:!0,children:[(0,E.jsx)("a",{href:`https://sites.spotify.net/s/hyperlink?path=property-experiments&property=${e.name}`,rel:"noopener noreferrer",target:"_blank",children:l?(0,E.jsx)(Ht.M,{searchWords:[l??""],textToHighlight:e.name}):e.name}),(0,E.jsx)("div",{className:U.propertyDescription,children:e.description})]}),(0,E.jsx)(R.n,{className:U.rowValue,children:o}),(0,E.jsx)(R.n,{className:U.rowValue,children:d}),(0,E.jsx)(R.n,{className:U.rowValue,children:"bool"===e.type||"enum"===e.type?(0,E.jsx)(ln,{property:e,value:s,onOverride:r,isOverridden:i}):"int"===e.type?(0,E.jsx)(on,{property:e,value:s,onOverride:r,isOverridden:i}):null})]})},dn="debugPanelRemoteConfigLastChangedAtByPropertyName",un=({properties:e,localConfiguration:s,remoteConfiguration:t,setOverrides:a,clearOverrides:r})=>{const{filter:l}=(0,n.useContext)($t.g),i=(0,en.q)(),o=()=>{const e=i.getItem(dn);return e instanceof Qt.m||e instanceof Xt.Y?{}:e},c=(e,s)=>{a(Bt.Vk.fromJSON({[e]:s})),i.setItem(dn,{...o(),[e]:Date.now()})},d=(0,n.useRef)(o()),u=e.sort(((e,s)=>(d.current[s.name]??0)-(d.current[e.name]??0)||e.name.localeCompare(s.name))),h=function(){const e=(0,Kt.d)(),s=(0,yt.k)(),t=(0,Yt.C)()?.username,a=(0,n.useMemo)((()=>Bt.mA.getPropertySetId({clientId:e.remote_config_client_id},(0,Bt.v6)(),[])),[e.remote_config_client_id]),r=(0,n.useMemo)((()=>{if(!e||!s.data||!t)return null;const n="web-player"===e.remote_config_client_id||"1"===s.data.employee;return{data:{platform:"WEB",clientId:e.remote_config_client_id,country:s.data.country,propertySetKey:a,clientVersion:e.event_sender_context_information?.client_version_string??"",installationId:e.event_sender_context_information?.installation_id??"",oauthClientId:e.event_sender_context_information?.client_id??"",employee:n,catalogue:s.data.catalogue,originPlatform:e.app_platform,originVersion:e.os_version??"",userName:t}}}),[t,e,s.data,a]),{data:l}=(0,Wt.I)({queryKey:["traceback-config"],queryFn:()=>(0,Zt.V)().request("https://remote-configuration-resolver.spotify.net/debug/traceback-config",{method:"POST",responseType:"json",headers:{"content-type":"application/json"},payload:JSON.stringify(r)}).then((e=>{const s=e.body;return Object.fromEntries(s.data.map((e=>[e.name,e])))})),staleTime:5e3,gcTime:qt,refetchInterval:qt,refetchOnWindowFocus:!1,enabled:!!r});return l??{}}();return(0,E.jsxs)("div",{className:tn,children:[(0,E.jsxs)("div",{className:nn,children:[(0,E.jsx)(pe.n,{size:"small",onClick:()=>{r(),i.clearItem(dn)},children:"Clear local overrides"}),(0,E.jsx)(zt.S,{placeholder:"Find",alwaysExpanded:!0})]}),(0,E.jsx)(_.K,{children:(0,E.jsxs)(M.X,{children:[(0,E.jsxs)("colgroup",{children:[(0,E.jsx)("col",{width:"30%"}),(0,E.jsx)("col",{}),(0,E.jsx)("col",{})]}),(0,E.jsxs)("tbody",{children:[(0,E.jsxs)(O.H,{children:[(0,E.jsx)(F.M,{className:U.rowHeader,children:"Name"}),(0,E.jsx)(F.M,{className:U.rowHeader,children:"Default"}),(0,E.jsx)(F.M,{className:U.rowHeader,children:"Remote"}),(0,E.jsx)(F.M,{className:U.rowHeader,children:"Local"})]}),u.filter((e=>-1!==e.name.toLowerCase().indexOf(l.toLowerCase()))).map((e=>(0,E.jsx)(cn,{property:e,localValue:s.getValue(e.name),remoteValue:t.getValue(e.name),experimentUrl:h?.[e.name]?.experimentRef?.experimentUrl,isRemoteUserSpecificOverride:h?.[e.name]?.isOverride??!1,onOverride:c,filter:l},e.name)))]})]})})]})},hn=()=>{const e=[...(0,Bt.v6)()],{localConfiguration:s,remoteConfiguration:t,setOverrides:n,clearOverrides:a}=(0,Gt.g)();return(0,E.jsx)("div",{className:sn,children:(0,E.jsx)($t.s,{uri:"spotify:internal:debug:remote-config-properties",children:(0,E.jsx)(un,{properties:e,localConfiguration:s,remoteConfiguration:t,setOverrides:n,clearOverrides:a})})})};var mn=t(9183),pn=t(61544);const xn="wTIZy4hwIIwMdmqm93rW",gn="g2bLOY5W1sbuXtffHyDY",vn=()=>{const e=(0,mn.zy)(),s=(0,mn.Zp)(),t=e=>{const t=(0,pn.o_)(e);t&&s(t.toURLPath(!0),{state:{preventMoveFocus:!0}})},n=(0,pn.o_)(e.pathname);return(0,E.jsxs)("div",{className:xn,children:[(0,E.jsxs)("form",{onSubmit:e=>{e.preventDefault();const s=new FormData(e.target).get("navigateTo").toString(),n=new URL(s,"https://open.spotify.com");n.hostname&&n.pathname?t(n.pathname):t(s)},className:gn,children:[(0,E.jsx)("label",{htmlFor:"navigate-input",children:"Navigate to"}),(0,E.jsx)(me.E,{variant:"bodySmall",as:"input",style:{color:Zs.Ql9},name:"navigateTo",id:"navigate-input",type:"text",placeholder:"ex. /search/nirvana",onKeyDown:e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.stopPropagation()}})]}),(0,E.jsx)("h2",{children:"Current location:"}),(0,E.jsxs)("ul",{children:[(0,E.jsxs)("li",{children:["Location: ",e.pathname]}),e.search&&(0,E.jsxs)("li",{children:["Search params: ?",e.search]}),e.hash&&(0,E.jsxs)("li",{children:["Hash params: #",e.hash]}),n?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("li",{children:["URL: ",n.toURL()]}),(0,E.jsxs)("li",{children:["URI: ",n.toURI()]})]}):(0,E.jsx)("li",{children:"Not parseable as a Spotify URI!"}),(0,E.jsxs)("li",{children:["Location state: ",(0,E.jsx)("pre",{children:JSON.stringify(e.state,null,2)})]})]})]})};var jn=t(26700),fn=t(13506),yn=t(19159);const bn=()=>{const{localConfiguration:e,setOverrides:s}=(0,Gt.g)();return(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:"React-Query Cache Persistence"}),(0,E.jsx)(R.n,{className:U.rowValue,align:"right",children:(0,E.jsx)(jn.X,{checked:e.getValue(yn.QMQ),onChange:e=>{s(Bt.Vk.fromJSON({enableReactQueryPersistence:Boolean(e.target.checked)}))},children:"Enabled"})}),(0,E.jsx)(R.n,{className:U.rowValue,align:"right",children:(0,E.jsx)(v.$,{size:"small",onClick:()=>{(0,fn.k)()},children:"Clear cache"})})]})},Nn=()=>(0,E.jsx)("div",{className:$,children:(0,E.jsx)(V,{title:"Development options",rows:(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(bn,{})}),cols:[],canCollapse:!0})});var wn=t(87112),Cn=t(90119),Sn=t(19933),kn=t(5050),An=t(41978),En=t(21953),In=t(59820),On=t(90751),Rn=t(61074),Pn=t(13874),Tn=t(42047),_n=function(e){return e.IPL="IN_PERSON",e.RGS="REMOTE",e}(_n||{});var Dn=t(30171),Ln=t(88483);function Mn({obj:e}){return(0,E.jsx)(M.X,{children:(0,E.jsx)("tbody",{children:Object.entries(e).map((e=>(0,E.jsx)(Fn,{name:e[0],value:e[1]},e[0])))})})}function Fn({name:e,value:s}){const t=z();let n;return"string"==typeof s||"number"==typeof s?n=s:"boolean"==typeof s?n=(0,E.jsx)(jn.X,{defaultChecked:s,isActive:!1,onClick:e=>{e.preventDefault()}}):"object"==typeof s&&null!==s&&(n=(0,E.jsx)(Mn,{obj:s})),(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:e}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:n}),(0,E.jsx)(R.n,{className:U.rowActions,children:(0,E.jsx)("button",{className:U.rowAction,onClick:()=>{void 0!==s&&t("object"==typeof s?JSON.stringify(s):s.toString())},children:(0,E.jsx)(T._,{size:"small"})})})]})}var Un=t(47158),Vn=t(12804),Bn=t(75235),zn=t(61314);const Hn=[{title:"Debugging Info",Component:()=>{const e=(0,zn.M)(),s=(0,Vn.C)(),t=(0,Un.y)(),{currentSession:n}=(0,Tn.D)(),[a]=(0,Bn.x)("dismissStartJamButtonFromQueue",!1),[r]=(0,Bn.x)("dismissStartJamButtonFromFriendFeed",!1);return(0,E.jsx)(_.K,{children:(0,E.jsxs)(M.X,{children:[(0,E.jsxs)("colgroup",{children:[(0,E.jsx)("col",{width:"30%"}),(0,E.jsx)("col",{}),(0,E.jsx)("col",{width:"16px"})]}),(0,E.jsxs)("tbody",{children:[(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:"useIsSocialConnectAPIEnabled"}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:e})]}),(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:"useJamExperience()"}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:s})]}),(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:"Is current Jam active?"}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:n?.active.toString()??"null"})]}),(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:"useCanCreateJam()"}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:t.toString()})]}),(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:"Jam banner dismissed from queue"}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:a.toString()})]}),(0,E.jsxs)(O.H,{hover:!0,children:[(0,E.jsx)(R.n,{className:U.rowName,highlight:!0,children:"Jam banner dismissed from friend feed"}),(0,E.jsx)(R.n,{className:U.rowValue,truncate:!0,align:"right",children:r.toString()})]})]})]})})}},{title:"Current Session",Component:()=>{const{currentSession:e,refreshCurrentSession:s}=(0,Tn.D)();return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Dn.H,{iconOnly:Ln.H,onClick:()=>{s()}}),(0,E.jsx)(_.K,{children:e&&(0,E.jsxs)(M.X,{children:[(0,E.jsxs)("colgroup",{children:[(0,E.jsx)("col",{width:"30%"}),(0,E.jsx)("col",{}),(0,E.jsx)("col",{width:"16px"})]}),(0,E.jsx)("tbody",{children:Object.entries(e).map((e=>(0,E.jsx)(Fn,{name:e[0],value:e[1]},e[0])))})]})})]})}},{title:"Create New Session",Component:()=>{const{createSession:e}=(0,Tn.D)(),[s,t]=(0,n.useState)(null),[a,r]=(0,n.useState)(_n.IPL),l=(0,An.wA)();return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{children:"Create a new session as your current user (does nothing if you already have a session)"}),(0,E.jsxs)("div",{className:U.rowControl,children:[(0,E.jsxs)(Rn.C,{id:"sessionTypeDropdown",value:a,onSelect:e=>{switch(e){case _n.IPL:r(_n.IPL);break;case _n.RGS:r(_n.RGS);break;default:r(_n.IPL)}},children:[(0,E.jsx)("option",{value:_n.IPL,children:_n.IPL},_n.IPL),(0,E.jsx)("option",{value:_n.RGS,children:_n.RGS},_n.RGS)]}),(0,E.jsx)(v.$,{onClick:async s=>{s.preventDefault();const n=await e();t(n)},children:"Create"})]}),(0,E.jsx)(pe.n,{onClick:()=>{l((0,On.A9)(Pn.EL.INVITE))},style:{marginTop:En.WG},children:"Open invitation modal"}),null!==s&&(0,E.jsx)(In.h,{value:JSON.stringify(s,null,2),readOnly:!0})]})}},{title:"Leave Current Session",Component:()=>{const{leaveSession:e,currentSession:s}=(0,Tn.D)(),[t,a]=(0,n.useState)(null);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:U.rowName,children:"Leave your current session"}),(0,E.jsxs)("div",{className:U.rowControl,children:[(0,E.jsx)(g.Z,{value:s?.sessionId??"",readOnly:!0}),(0,E.jsx)(v.$,{onClick:async t=>{if(t.preventDefault(),!s)return;const n=await e();a(n)},children:"Leave"})]}),null!==t&&(0,E.jsx)(In.h,{value:JSON.stringify(t,null,2),readOnly:!0})]})}},{title:"Delete Current Session",Component:()=>{const{currentSession:e,deleteSession:s}=(0,Tn.D)(),[t,a]=(0,n.useState)(null);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:U.rowName,children:"Delete your current session"}),(0,E.jsxs)("div",{className:U.rowControl,children:[(0,E.jsx)(g.Z,{value:e?.sessionId??"",readOnly:!0}),(0,E.jsx)(v.$,{onClick:async t=>{if(t.preventDefault(),!e)return;const n=await s();a(n)},children:"Delete"})]}),null!==t&&(0,E.jsx)(In.h,{value:JSON.stringify(t,null,2),readOnly:!0})]})}},{title:"Join Session as Guest",Component:()=>{const[e,s]=(0,n.useState)(""),t=(0,An.wA)(),a=(0,mn.Zp)();return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:U.rowName,children:"Join somebody else's session (paste join token or join URI)"}),(0,E.jsxs)("div",{className:U.rowControl,children:[(0,E.jsx)(g.Z,{value:e,onChange:e=>s(e.currentTarget.value)}),(0,E.jsx)(v.$,{onClick:async s=>{s.preventDefault();const n=(0,pn.o_)(e);n&&(0,pn.cr)(n)?a(n.toURLPath(!0)):t((0,On.A9)(Pn.EL.JOIN,e))},children:"Join"})]})]})}}],Jn=()=>{const[e,s]=(0,n.useState)(-1);return(0,E.jsxs)("div",{className:xn,children:[(0,E.jsx)("h1",{children:"Social Connect!"}),(0,E.jsx)(wn.n,{children:Hn.map(((t,n)=>(0,E.jsxs)(Cn.A,{children:[(0,E.jsx)(Sn.J,{className:U.rowHeader,onClick:t=>{t.preventDefault(),s(n===e?-1:n)},isExpanded:n===e,children:t.title}),(0,E.jsx)(kn.u,{isExpanded:n===e,children:t.Component&&(0,E.jsx)(t.Component,{})})]},`${n}-item`)))})]})};var $n=t(5100);const Wn="rqY5xQzTYB0T5O0XyDdn",Yn="jDgWpAIXmxJKgp8GtVWk",Kn=()=>{const{value:e,setValue:s,clearStoredKeyValue:t,clearSessionStorage:n}=(0,$n.useSessionStorage)("eligibility"),{value:a,setValue:r,clearStoredKeyValue:l}=(0,$n.useSessionStorage)("datetime");return(0,E.jsxs)("div",{className:Wn,children:[(0,E.jsx)("h1",{children:"Premium Page Debug"}),(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{children:"Override Eligiiblity"}),(0,E.jsxs)("select",{className:Yn,value:e,onChange:e=>s(e.target.value),children:[(0,E.jsx)("option",{}),(0,E.jsx)("option",{value:"INTRO_ELIGIBLE",children:"INTRO_ELIGIBLE"}),(0,E.jsx)("option",{value:"NON_INTRO_ELIGIBLE",children:"NON_INTRO_ELIGIBLE"}),(0,E.jsx)("option",{value:"WINBACK",children:"WINBACK"})]}),(0,E.jsx)(v.$,{className:Wn,size:"small",onClick:()=>t("eligibility"),children:"Remove Eligiblity Override"})]}),(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{children:"Override Date"}),(0,E.jsx)("input",{className:Yn,type:"datetime-local",value:a,onChange:e=>r(e.target.value)}),(0,E.jsx)(v.$,{size:"small",onClick:()=>l("datetime"),children:"Remove Date/Time Override"})]}),(0,E.jsx)(v.$,{size:"small",onClick:n,children:"Remove All Overrides"})]})};var Zn=t(31419),qn=t(15742);t(8385);const Gn=new qn.l("lookupDebug","query","0fab353b496c3f53088f1e0d87893c3e03dbb3ae6929799bd2963fffa25a7993",null);var Qn=t(5492),Xn=t(65551),ea=t(69916),sa=t(22253);const ta="coy21BK2YBTFtmDx4TNO",na="qqllJKnB60UvRvOwb8a2";function aa(e){return Boolean(e)}function ra(e){return(0,Qn.yr)(e)}const la=()=>{const{request:e}=(0,n.useContext)(ea.j),[s,t]=(0,Bn.x)(Xn.P,[]),[a,r]=(0,n.useState)(""),l=async()=>{if(!function(e){const s=(0,pn.o_)(e);return!(!s||(0,pn.Z0)(s)||s?.id===pn.NQ.COLLECTION||!(!s||(0,pn._T)(s)||(0,pn.ec)(s)||(0,pn.gH)(s)||(0,pn.AP)(s)||(0,pn.U_)(s)||(0,pn.WB)(s)||(0,pn.nu)(s)))}(a))return;const n=await(0,sa.c)(e,Gn,{uris:[a]}),r=n?.data?.lookup.map(ra).filter(aa)||[];t(r.concat(s))};return(0,E.jsxs)("div",{className:ta,children:[(0,E.jsx)("h1",{children:"Home"}),(0,E.jsxs)("div",{children:[(0,E.jsx)("h2",{children:"Shortcuts override"}),(0,E.jsxs)(m.g,{label:"Entity URI to add",labelFor:"shortcut_to_add",children:[(0,E.jsx)(g.Z,{id:"shortcut_to_add",type:"text",placeholder:"spotify:episode:123123",value:a,onChange:e=>r(e.currentTarget.value)}),(0,E.jsxs)(Zn.N,{children:["Right now we only allow: Artist, Album, Audiobook, Podcast, Track, User, Playlist, Episode and Chapter.",(0,E.jsx)("br",{})," For more info check the HomeV2ShortcutsShelf logic."]})]}),(0,E.jsx)(v.$,{size:"small",className:na,disabled:0===a.length,onClick:()=>{l()},children:"Add to Shortcuts"}),(0,E.jsx)(v.$,{size:"small",className:na,onClick:()=>{t([])},children:"Clear all overrides"})]})]})};var ia=t(74404);const oa="WAiWdE4pBSCiS9bz5mI7",ca="WU9QRIfJrSPefs8V7QI0",da="pb99Xy2ZbO0AVWK2BIvI",ua="G_PJW1iqB1P56Y5QBCja",ha=[{label:"Production",value:"prod"},{label:"Development",value:"dev"}],ma=()=>{const e=(0,An.wA)(),s=(0,An.d4)((e=>e.inAppMessaging.env)),t=(0,An.d4)((e=>e.inAppMessaging.message)),[a,r]=(0,n.useState)(""),[l,i]=(0,n.useState)(""),[o,c]=(0,n.useState)(!1);(0,n.useEffect)((()=>{t&&o&&c(!1)}),[t,o]);const d=!t&&o;return(0,E.jsx)("div",{className:oa,children:(0,E.jsxs)("div",{className:ca,children:[(0,E.jsx)("div",{children:(0,E.jsx)("label",{htmlFor:"desktop.settings.inAppMessagingEnv",children:"Mode (endpoint):"})}),(0,E.jsx)(Rn.C,{dir:"auto",value:s,id:"desktop.settings.inAppMessagingEnv",onSelect:function(s){"prod"!==s&&"dev"!==s||e((0,ia.$h)(s))},children:ha.map((({label:e,value:s})=>(0,E.jsx)("option",{value:s,children:e},s)))}),(0,E.jsx)("div",{children:(0,E.jsx)("label",{htmlFor:"desktop.settings.inAppMessagingCreativeId",children:"Creative Id:"})}),(0,E.jsx)("div",{children:(0,E.jsx)("input",{className:da,placeholder:"(eg. 12123434)",id:"desktop.settings.inAppMessagingCreativeId",name:"Creative Id",type:"text",value:a,onChange:function(e){r(e.target.value),c(!1)}})}),(0,E.jsx)("div",{children:(0,E.jsx)("label",{htmlFor:"desktop.settings.inAppMessagingAppUri",children:"URI for Dynamic Content (optional):"})}),(0,E.jsx)("div",{children:(0,E.jsx)("input",{className:da,placeholder:"(eg. spotify:artist:123)",id:"desktop.settings.inAppMessagingAppUri",name:"App Uri",type:"text",value:l,onChange:function(e){i(e.target.value),c(!1)}})}),(0,E.jsx)("div",{}),(0,E.jsx)("div",{}),(0,E.jsx)("div",{children:(0,E.jsx)(v.$,{colorSet:"invertedLight",onClick:function(s){s.preventDefault(),e((0,ia.yR)(a,l)),c(!1),window.setTimeout((()=>{c(!0)}),1e3)},children:"Get Preview"})}),d&&(0,E.jsx)("div",{className:ua,children:"No Messsage found"})]})})};var pa=t(2983),xa=t(62943),ga=t(7353);const va="CWbF6pzynkRv3fi29lB1",ja="HJW0XXBdaYKM50QJ957Z",fa="ELSpUVm2MXGkQ_0rlJaj",ya="BEbSBX8wHpFESTzhAAUs",ba="debugWindowActiveTabGroup",Na="debugWindowActiveTabIndex",wa=()=>{const e=(0,nt.p)().getCapabilities().canGetFiles,s=(0,zn.M)(),t=(0,B.ZY)(),a=(0,d.NC)(xa.rW);(0,n.useEffect)((()=>{t&&(t.title="Spotify Debug Window")}),[t]);const u=(0,n.useMemo)((()=>Object.fromEntries(Object.entries({Authorization:[{label:"Access Token",Panel:ie},{label:"Product State",Panel:Nt}],Playback:[{label:"Player",Panel:ft},e?{label:"Playback",Panel:vt}:null,{label:"Connect",Panel:he},s?{label:"Social Connect",Panel:Jn}:null].filter(ga.P),"Data Fetching":[{label:"Esperanto",Panel:Js},{label:"PubSub",Panel:Ft},null].filter(ga.P),UI:[{label:"Routing",Panel:vn},null].filter(ga.P),Content:[{label:"Audiobooks",Panel:ae}],Other:[{label:"Settings",Panel:Nn},{label:"Remote Config",Panel:hn},{label:"Ads",Panel:I},{label:"In-App Messaging",Panel:ma},{label:"Your DJ",Panel:pa.fW},{label:"Home",Panel:la},{label:"Premium Page",Panel:Kn},{label:"Font Width Estimation",Panel:Ks}].filter(ga.P)}).filter((([e,s])=>s.length>0)))),[e,s]),h=Object.keys(u),m=(0,en.q)(),p=m.getItem(ba),x="string"==typeof p&&p in u?p:h[0],[g,v]=(0,n.useState)(x),j=m.getItem(Na),f="number"==typeof j&&j in u[g]?j:0,[y,b]=(0,n.useState)(f),N=u[g][y].Panel;return(0,E.jsx)("div",{className:r()("encore-dark-theme","encore-layout-themes",{"circular-sp-vietnamese":a}),children:(0,E.jsxs)("div",{className:va,children:[(0,E.jsx)(l.V,{className:ja,children:(0,E.jsx)(i.r,{flexMobile:!0,children:h.map((e=>(0,E.jsxs)(n.Fragment,{children:[(0,E.jsx)(o.D,{children:e}),u[e].map(((s,t)=>(0,E.jsx)(c.a,{active:g===e&&y===t,label:s.label,onClick:()=>{v(e),m.setItem(ba,e),b(t),m.setItem(Na,t)},className:fa,children:s.label},s.label)))]},e)))})}),(0,E.jsx)("div",{className:ya,children:(0,E.jsx)(N,{})})]})})}},65916:(e,s,t)=>{t.d(s,{C:()=>r});var n=t(41978),a=t(71817);const r=()=>{const e=(0,n.d4)((e=>e.session?.user));return e?{type:a.c.USER,uri:e.uri,username:e.id,displayName:e.display_name??null,images:e.images.map((({url:e,width:s,height:t})=>({url:e,width:s||void 0,height:t||void 0})))}:null}},45874:(e,s,t)=>{t.d(s,{d:()=>r});var n=t(30758),a=t(10034);const r=()=>(0,n.useContext)(a.D)},59228:(e,s,t)=>{t.d(s,{x:()=>r});var n=t(48839),a=t(60102);function r(){return(0,a.N)(n.b)}}}]);
|
|
//# sourceMappingURL=xpui-debug-window-contents.js.map
|