// ChrisTeng97/spicy-lyrics — standalone fork build; generated by npm run build:fork. (async()=>{const o=(e,t=0)=>new Promise((a,c)=>{const n=setInterval(()=>{if(e())return clearInterval(n),a();if(++t>1e3)return clearInterval(n),c(new Error("Timeout"))},50)});try{const e=window.Spicetify;e.Events?.platformLoaded?.on&&await new Promise(t=>e.Events.platformLoaded.on(t)),e.Events?.webpackLoaded?.on&&await new Promise(t=>e.Events.webpackLoaded.on(t)),await o(()=>e?.React&&e?.ReactJSX&&e?.ReactDOM&&e?.Platform&&e?.Player),console.info("%c[spicylyrics:extension] %cv6.4.70 %cinitialized","color: #1DB954; font-weight: bold","color: #888","color: unset"),(async function(){var ES=Object.create;var ud=Object.defineProperty;var TS=Object.getOwnPropertyDescriptor;var PS=Object.getOwnPropertyNames;var jS=Object.getPrototypeOf,MS=Object.prototype.hasOwnProperty;var sn=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports),_S=(a,e)=>{for(var t in e)ud(a,t,{get:e[t],enumerable:!0})},BS=(a,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of PS(e))!MS.call(a,n)&&n!==t&&ud(a,n,{get:()=>e[n],enumerable:!(i=TS(e,n))||i.enumerable});return a};var R=(a,e,t)=>(t=a!=null?ES(jS(a)):{},BS(e||!a||!a.__esModule?ud(t,"default",{value:a,enumerable:!0}):t,a));var Zy=sn((V_,Jy)=>{Jy.exports=[{name:"Abkhaz",local:"\u0410\u04A7\u0441\u0443\u0430",1:"ab",2:"abk","2T":"abk","2B":"abk",3:"abk"},{name:"Afar",local:"Afaraf",1:"aa",2:"aar","2T":"aar","2B":"aar",3:"aar"},{name:"Afrikaans",local:"Afrikaans",1:"af",2:"afr","2T":"afr","2B":"afr",3:"afr"},{name:"Akan",local:"Akan",1:"ak",2:"aka","2T":"aka","2B":"aka",3:"aka"},{name:"Albanian",local:"Shqip",1:"sq",2:"sqi","2T":"sqi","2B":"alb",3:"sqi"},{name:"Amharic",local:"\u12A0\u121B\u122D\u129B",1:"am",2:"amh","2T":"amh","2B":"amh",3:"amh"},{name:"Arabic",local:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",1:"ar",2:"ara","2T":"ara","2B":"ara",3:"ara"},{name:"Aragonese",local:"Aragon\xE9s",1:"an",2:"arg","2T":"arg","2B":"arg",3:"arg"},{name:"Armenian",local:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",1:"hy",2:"hye","2T":"hye","2B":"arm",3:"hye"},{name:"Assamese",local:"\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE",1:"as",2:"asm","2T":"asm","2B":"asm",3:"asm"},{name:"Avaric",local:"\u0410\u0432\u0430\u0440",1:"av",2:"ava","2T":"ava","2B":"ava",3:"ava"},{name:"Avestan",local:"avesta",1:"ae",2:"ave","2T":"ave","2B":"ave",3:"ave"},{name:"Aymara",local:"Aymar",1:"ay",2:"aym","2T":"aym","2B":"aym",3:"aym"},{name:"Azerbaijani",local:"Az\u0259rbaycanca",1:"az",2:"aze","2T":"aze","2B":"aze",3:"aze"},{name:"Bambara",local:"Bamanankan",1:"bm",2:"bam","2T":"bam","2B":"bam",3:"bam"},{name:"Bashkir",local:"\u0411\u0430\u0448\u04A1\u043E\u0440\u0442\u0441\u0430",1:"ba",2:"bak","2T":"bak","2B":"bak",3:"bak"},{name:"Basque",local:"Euskara",1:"eu",2:"eus","2T":"eus","2B":"baq",3:"eus"},{name:"Belarusian",local:"\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F",1:"be",2:"bel","2T":"bel","2B":"bel",3:"bel"},{name:"Bengali",local:"\u09AC\u09BE\u0982\u09B2\u09BE",1:"bn",2:"ben","2T":"ben","2B":"ben",3:"ben"},{name:"Bihari",local:"\u092D\u094B\u091C\u092A\u0941\u0930\u0940",1:"bh",2:"bih","2T":"bih","2B":"bih",3:"bih"},{name:"Bislama",local:"Bislama",1:"bi",2:"bis","2T":"bis","2B":"bis",3:"bis"},{name:"Bosnian",local:"Bosanski",1:"bs",2:"bos","2T":"bos","2B":"bos",3:"bos"},{name:"Breton",local:"Brezhoneg",1:"br",2:"bre","2T":"bre","2B":"bre",3:"bre"},{name:"Bulgarian",local:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438",1:"bg",2:"bul","2T":"bul","2B":"bul",3:"bul"},{name:"Burmese",local:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C",1:"my",2:"mya","2T":"mya","2B":"bur",3:"mya"},{name:"Catalan",local:"Catal\xE0",1:"ca",2:"cat","2T":"cat","2B":"cat",3:"cat"},{name:"Chamorro",local:"Chamoru",1:"ch",2:"cha","2T":"cha","2B":"cha",3:"cha"},{name:"Chechen",local:"\u041D\u043E\u0445\u0447\u0438\u0439\u043D",1:"ce",2:"che","2T":"che","2B":"che",3:"che"},{name:"Chichewa",local:"Chichewa",1:"ny",2:"nya","2T":"nya","2B":"nya",3:"nya"},{name:"Chinese",local:"\u4E2D\u6587",1:"zh",2:"zho","2T":"zho","2B":"chi",3:"zho"},{name:"Chuvash",local:"\u0427\u04D1\u0432\u0430\u0448\u043B\u0430",1:"cv",2:"chv","2T":"chv","2B":"chv",3:"chv"},{name:"Cornish",local:"Kernewek",1:"kw",2:"cor","2T":"cor","2B":"cor",3:"cor"},{name:"Corsican",local:"Corsu",1:"co",2:"cos","2T":"cos","2B":"cos",3:"cos"},{name:"Cree",local:"\u14C0\u1426\u1403\u152D\u140D\u140F\u1423",1:"cr",2:"cre","2T":"cre","2B":"cre",3:"cre"},{name:"Croatian",local:"Hrvatski",1:"hr",2:"hrv","2T":"hrv","2B":"hrv",3:"hrv"},{name:"Czech",local:"\u010Ce\u0161tina",1:"cs",2:"ces","2T":"ces","2B":"cze",3:"ces"},{name:"Danish",local:"Dansk",1:"da",2:"dan","2T":"dan","2B":"dan",3:"dan"},{name:"Divehi",local:"Divehi",1:"dv",2:"div","2T":"div","2B":"div",3:"div"},{name:"Dutch",local:"Nederlands",1:"nl",2:"nld","2T":"nld","2B":"dut",3:"nld"},{name:"Dzongkha",local:"\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41",1:"dz",2:"dzo","2T":"dzo","2B":"dzo",3:"dzo"},{name:"English",local:"English",1:"en",2:"eng","2T":"eng","2B":"eng",3:"eng"},{name:"Esperanto",local:"Esperanto",1:"eo",2:"epo","2T":"epo","2B":"epo",3:"epo"},{name:"Estonian",local:"Eesti",1:"et",2:"est","2T":"est","2B":"est",3:"est"},{name:"Ewe",local:"E\u028Begbe",1:"ee",2:"ewe","2T":"ewe","2B":"ewe",3:"ewe"},{name:"Faroese",local:"F\xF8royskt",1:"fo",2:"fao","2T":"fao","2B":"fao",3:"fao"},{name:"Fijian",local:"Na Vosa Vaka-Viti",1:"fj",2:"fij","2T":"fij","2B":"fij",3:"fij"},{name:"Finnish",local:"Suomi",1:"fi",2:"fin","2T":"fin","2B":"fin",3:"fin"},{name:"French",local:"Fran\xE7ais",1:"fr",2:"fra","2T":"fra","2B":"fre",3:"fra"},{name:"Fula",local:"Fulfulde",1:"ff",2:"ful","2T":"ful","2B":"ful",3:"ful"},{name:"Galician",local:"Galego",1:"gl",2:"glg","2T":"glg","2B":"glg",3:"glg"},{name:"Georgian",local:"\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8",1:"ka",2:"kat","2T":"kat","2B":"geo",3:"kat"},{name:"German",local:"Deutsch",1:"de",2:"deu","2T":"deu","2B":"ger",3:"deu"},{name:"Greek",local:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC",1:"el",2:"ell","2T":"ell","2B":"gre",3:"ell"},{name:"Guaran\xED",local:"Ava\xF1e'\u1EBD",1:"gn",2:"grn","2T":"grn","2B":"grn",3:"grn"},{name:"Gujarati",local:"\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0",1:"gu",2:"guj","2T":"guj","2B":"guj",3:"guj"},{name:"Haitian",local:"Krey\xF2l Ayisyen",1:"ht",2:"hat","2T":"hat","2B":"hat",3:"hat"},{name:"Hausa",local:"\u0647\u064E\u0648\u064F\u0633\u064E",1:"ha",2:"hau","2T":"hau","2B":"hau",3:"hau"},{name:"Hebrew",local:"\u05E2\u05D1\u05E8\u05D9\u05EA",1:"he",2:"heb","2T":"heb","2B":"heb",3:"heb"},{name:"Herero",local:"Otjiherero",1:"hz",2:"her","2T":"her","2B":"her",3:"her"},{name:"Hindi",local:"\u0939\u093F\u0928\u094D\u0926\u0940",1:"hi",2:"hin","2T":"hin","2B":"hin",3:"hin"},{name:"Hiri Motu",local:"Hiri Motu",1:"ho",2:"hmo","2T":"hmo","2B":"hmo",3:"hmo"},{name:"Hungarian",local:"Magyar",1:"hu",2:"hun","2T":"hun","2B":"hun",3:"hun"},{name:"Interlingua",local:"Interlingua",1:"ia",2:"ina","2T":"ina","2B":"ina",3:"ina"},{name:"Indonesian",local:"Bahasa Indonesia",1:"id",2:"ind","2T":"ind","2B":"ind",3:"ind"},{name:"Interlingue",local:"Interlingue",1:"ie",2:"ile","2T":"ile","2B":"ile",3:"ile"},{name:"Irish",local:"Gaeilge",1:"ga",2:"gle","2T":"gle","2B":"gle",3:"gle"},{name:"Igbo",local:"Igbo",1:"ig",2:"ibo","2T":"ibo","2B":"ibo",3:"ibo"},{name:"Inupiaq",local:"I\xF1upiak",1:"ik",2:"ipk","2T":"ipk","2B":"ipk",3:"ipk"},{name:"Ido",local:"Ido",1:"io",2:"ido","2T":"ido","2B":"ido",3:"ido"},{name:"Icelandic",local:"\xCDslenska",1:"is",2:"isl","2T":"isl","2B":"ice",3:"isl"},{name:"Italian",local:"Italiano",1:"it",2:"ita","2T":"ita","2B":"ita",3:"ita"},{name:"Inuktitut",local:"\u1403\u14C4\u1483\u144E\u1450\u1466",1:"iu",2:"iku","2T":"iku","2B":"iku",3:"iku"},{name:"Japanese",local:"\u65E5\u672C\u8A9E",1:"ja",2:"jpn","2T":"jpn","2B":"jpn",3:"jpn"},{name:"Javanese",local:"Basa Jawa",1:"jv",2:"jav","2T":"jav","2B":"jav",3:"jav"},{name:"Kalaallisut",local:"Kalaallisut",1:"kl",2:"kal","2T":"kal","2B":"kal",3:"kal"},{name:"Kannada",local:"\u0C95\u0CA8\u0CCD\u0CA8\u0CA1",1:"kn",2:"kan","2T":"kan","2B":"kan",3:"kan"},{name:"Kanuri",local:"Kanuri",1:"kr",2:"kau","2T":"kau","2B":"kau",3:"kau"},{name:"Kashmiri",local:"\u0643\u0634\u0645\u064A\u0631\u064A",1:"ks",2:"kas","2T":"kas","2B":"kas",3:"kas"},{name:"Kazakh",local:"\u049A\u0430\u0437\u0430\u049B\u0448\u0430",1:"kk",2:"kaz","2T":"kaz","2B":"kaz",3:"kaz"},{name:"Khmer",local:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A",1:"km",2:"khm","2T":"khm","2B":"khm",3:"khm"},{name:"Kikuyu",local:"G\u0129k\u0169y\u0169",1:"ki",2:"kik","2T":"kik","2B":"kik",3:"kik"},{name:"Kinyarwanda",local:"Kinyarwanda",1:"rw",2:"kin","2T":"kin","2B":"kin",3:"kin"},{name:"Kyrgyz",local:"\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430",1:"ky",2:"kir","2T":"kir","2B":"kir",3:"kir"},{name:"Komi",local:"\u041A\u043E\u043C\u0438",1:"kv",2:"kom","2T":"kom","2B":"kom",3:"kom"},{name:"Kongo",local:"Kongo",1:"kg",2:"kon","2T":"kon","2B":"kon",3:"kon"},{name:"Korean",local:"\uD55C\uAD6D\uC5B4",1:"ko",2:"kor","2T":"kor","2B":"kor",3:"kor"},{name:"Kurdish",local:"Kurd\xEE",1:"ku",2:"kur","2T":"kur","2B":"kur",3:"kur"},{name:"Kwanyama",local:"Kuanyama",1:"kj",2:"kua","2T":"kua","2B":"kua",3:"kua"},{name:"Latin",local:"Latina",1:"la",2:"lat","2T":"lat","2B":"lat",3:"lat"},{name:"Luxembourgish",local:"L\xEBtzebuergesch",1:"lb",2:"ltz","2T":"ltz","2B":"ltz",3:"ltz"},{name:"Ganda",local:"Luganda",1:"lg",2:"lug","2T":"lug","2B":"lug",3:"lug"},{name:"Limburgish",local:"Limburgs",1:"li",2:"lim","2T":"lim","2B":"lim",3:"lim"},{name:"Lingala",local:"Ling\xE1la",1:"ln",2:"lin","2T":"lin","2B":"lin",3:"lin"},{name:"Lao",local:"\u0E9E\u0EB2\u0EAA\u0EB2\u0EA5\u0EB2\u0EA7",1:"lo",2:"lao","2T":"lao","2B":"lao",3:"lao"},{name:"Lithuanian",local:"Lietuvi\u0173",1:"lt",2:"lit","2T":"lit","2B":"lit",3:"lit"},{name:"Luba-Katanga",local:"Tshiluba",1:"lu",2:"lub","2T":"lub","2B":"lub",3:"lub"},{name:"Latvian",local:"Latvie\u0161u",1:"lv",2:"lav","2T":"lav","2B":"lav",3:"lav"},{name:"Manx",local:"Gaelg",1:"gv",2:"glv","2T":"glv","2B":"glv",3:"glv"},{name:"Macedonian",local:"\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438",1:"mk",2:"mkd","2T":"mkd","2B":"mac",3:"mkd"},{name:"Malagasy",local:"Malagasy",1:"mg",2:"mlg","2T":"mlg","2B":"mlg",3:"mlg"},{name:"Malay",local:"Bahasa Melayu",1:"ms",2:"msa","2T":"msa","2B":"may",3:"msa"},{name:"Malayalam",local:"\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02",1:"ml",2:"mal","2T":"mal","2B":"mal",3:"mal"},{name:"Maltese",local:"Malti",1:"mt",2:"mlt","2T":"mlt","2B":"mlt",3:"mlt"},{name:"M\u0101ori",local:"M\u0101ori",1:"mi",2:"mri","2T":"mri","2B":"mao",3:"mri"},{name:"Marathi",local:"\u092E\u0930\u093E\u0920\u0940",1:"mr",2:"mar","2T":"mar","2B":"mar",3:"mar"},{name:"Marshallese",local:"Kajin M\u0327aje\u013C",1:"mh",2:"mah","2T":"mah","2B":"mah",3:"mah"},{name:"Mongolian",local:"\u041C\u043E\u043D\u0433\u043E\u043B",1:"mn",2:"mon","2T":"mon","2B":"mon",3:"mon"},{name:"Nauru",local:"Dorerin Naoero",1:"na",2:"nau","2T":"nau","2B":"nau",3:"nau"},{name:"Navajo",local:"Din\xE9 Bizaad",1:"nv",2:"nav","2T":"nav","2B":"nav",3:"nav"},{name:"Northern Ndebele",local:"isiNdebele",1:"nd",2:"nde","2T":"nde","2B":"nde",3:"nde"},{name:"Nepali",local:"\u0928\u0947\u092A\u093E\u0932\u0940",1:"ne",2:"nep","2T":"nep","2B":"nep",3:"nep"},{name:"Ndonga",local:"Owambo",1:"ng",2:"ndo","2T":"ndo","2B":"ndo",3:"ndo"},{name:"Norwegian Bokm\xE5l",local:"Norsk (Bokm\xE5l)",1:"nb",2:"nob","2T":"nob","2B":"nob",3:"nob"},{name:"Norwegian Nynorsk",local:"Norsk (Nynorsk)",1:"nn",2:"nno","2T":"nno","2B":"nno",3:"nno"},{name:"Norwegian",local:"Norsk",1:"no",2:"nor","2T":"nor","2B":"nor",3:"nor"},{name:"Nuosu",local:"\uA188\uA320\uA4BF Nuosuhxop",1:"ii",2:"iii","2T":"iii","2B":"iii",3:"iii"},{name:"Southern Ndebele",local:"isiNdebele",1:"nr",2:"nbl","2T":"nbl","2B":"nbl",3:"nbl"},{name:"Occitan",local:"Occitan",1:"oc",2:"oci","2T":"oci","2B":"oci",3:"oci"},{name:"Ojibwe",local:"\u140A\u14C2\u1511\u14C8\u142F\u14A7\u140E\u14D0",1:"oj",2:"oji","2T":"oji","2B":"oji",3:"oji"},{name:"Old Church Slavonic",local:"\u0421\u043B\u043E\u0432\u0463\u0301\u043D\u044C\u0441\u043A\u044A",1:"cu",2:"chu","2T":"chu","2B":"chu",3:"chu"},{name:"Oromo",local:"Afaan Oromoo",1:"om",2:"orm","2T":"orm","2B":"orm",3:"orm"},{name:"Oriya",local:"\u0B13\u0B21\u0B3F\u0B3C\u0B06",1:"or",2:"ori","2T":"ori","2B":"ori",3:"ori"},{name:"Ossetian",local:"\u0418\u0440\u043E\u043D \xE6\u0432\u0437\u0430\u0433",1:"os",2:"oss","2T":"oss","2B":"oss",3:"oss"},{name:"Panjabi",local:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40",1:"pa",2:"pan","2T":"pan","2B":"pan",3:"pan"},{name:"P\u0101li",local:"\u092A\u093E\u0934\u093F",1:"pi",2:"pli","2T":"pli","2B":"pli",3:"pli"},{name:"Persian",local:"\u0641\u0627\u0631\u0633\u06CC",1:"fa",2:"fas","2T":"fas","2B":"per",3:"fas"},{name:"Polish",local:"Polski",1:"pl",2:"pol","2T":"pol","2B":"pol",3:"pol"},{name:"Pashto",local:"\u067E\u069A\u062A\u0648",1:"ps",2:"pus","2T":"pus","2B":"pus",3:"pus"},{name:"Portuguese",local:"Portugu\xEAs",1:"pt",2:"por","2T":"por","2B":"por",3:"por"},{name:"Quechua",local:"Runa Simi",1:"qu",2:"que","2T":"que","2B":"que",3:"que"},{name:"Romansh",local:"Rumantsch",1:"rm",2:"roh","2T":"roh","2B":"roh",3:"roh"},{name:"Kirundi",local:"Kirundi",1:"rn",2:"run","2T":"run","2B":"run",3:"run"},{name:"Romanian",local:"Rom\xE2n\u0103",1:"ro",2:"ron","2T":"ron","2B":"rum",3:"ron"},{name:"Russian",local:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",1:"ru",2:"rus","2T":"rus","2B":"rus",3:"rus"},{name:"Sanskrit",local:"\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D",1:"sa",2:"san","2T":"san","2B":"san",3:"san"},{name:"Sardinian",local:"Sardu",1:"sc",2:"srd","2T":"srd","2B":"srd",3:"srd"},{name:"Sindhi",local:"\u0633\u0646\u068C\u064A\u200E",1:"sd",2:"snd","2T":"snd","2B":"snd",3:"snd"},{name:"Northern Sami",local:"S\xE1megiella",1:"se",2:"sme","2T":"sme","2B":"sme",3:"sme"},{name:"Samoan",local:"Gagana S\u0101moa",1:"sm",2:"smo","2T":"smo","2B":"smo",3:"smo"},{name:"Sango",local:"S\xE4ng\xF6",1:"sg",2:"sag","2T":"sag","2B":"sag",3:"sag"},{name:"Serbian",local:"\u0421\u0440\u043F\u0441\u043A\u0438",1:"sr",2:"srp","2T":"srp","2B":"srp",3:"srp"},{name:"Gaelic",local:"G\xE0idhlig",1:"gd",2:"gla","2T":"gla","2B":"gla",3:"gla"},{name:"Shona",local:"ChiShona",1:"sn",2:"sna","2T":"sna","2B":"sna",3:"sna"},{name:"Sinhala",local:"\u0DC3\u0DD2\u0D82\u0DC4\u0DBD",1:"si",2:"sin","2T":"sin","2B":"sin",3:"sin"},{name:"Slovak",local:"Sloven\u010Dina",1:"sk",2:"slk","2T":"slk","2B":"slo",3:"slk"},{name:"Slovene",local:"Sloven\u0161\u010Dina",1:"sl",2:"slv","2T":"slv","2B":"slv",3:"slv"},{name:"Somali",local:"Soomaaliga",1:"so",2:"som","2T":"som","2B":"som",3:"som"},{name:"Southern Sotho",local:"Sesotho",1:"st",2:"sot","2T":"sot","2B":"sot",3:"sot"},{name:"Spanish",local:"Espa\xF1ol",1:"es",2:"spa","2T":"spa","2B":"spa",3:"spa"},{name:"Sundanese",local:"Basa Sunda",1:"su",2:"sun","2T":"sun","2B":"sun",3:"sun"},{name:"Swahili",local:"Kiswahili",1:"sw",2:"swa","2T":"swa","2B":"swa",3:"swa"},{name:"Swati",local:"SiSwati",1:"ss",2:"ssw","2T":"ssw","2B":"ssw",3:"ssw"},{name:"Swedish",local:"Svenska",1:"sv",2:"swe","2T":"swe","2B":"swe",3:"swe"},{name:"Tamil",local:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD",1:"ta",2:"tam","2T":"tam","2B":"tam",3:"tam"},{name:"Telugu",local:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",1:"te",2:"tel","2T":"tel","2B":"tel",3:"tel"},{name:"Tajik",local:"\u0422\u043E\u04B7\u0438\u043A\u04E3",1:"tg",2:"tgk","2T":"tgk","2B":"tgk",3:"tgk"},{name:"Thai",local:"\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22",1:"th",2:"tha","2T":"tha","2B":"tha",3:"tha"},{name:"Tigrinya",local:"\u1275\u130D\u122D\u129B",1:"ti",2:"tir","2T":"tir","2B":"tir",3:"tir"},{name:"Tibetan Standard",local:"\u0F56\u0F7C\u0F51\u0F0B\u0F61\u0F72\u0F42",1:"bo",2:"bod","2T":"bod","2B":"tib",3:"bod"},{name:"Turkmen",local:"T\xFCrkmen\xE7e",1:"tk",2:"tuk","2T":"tuk","2B":"tuk",3:"tuk"},{name:"Tagalog",local:"Tagalog",1:"tl",2:"tgl","2T":"tgl","2B":"tgl",3:"tgl"},{name:"Tswana",local:"Setswana",1:"tn",2:"tsn","2T":"tsn","2B":"tsn",3:"tsn"},{name:"Tonga",local:"faka Tonga",1:"to",2:"ton","2T":"ton","2B":"ton",3:"ton"},{name:"Turkish",local:"T\xFCrk\xE7e",1:"tr",2:"tur","2T":"tur","2B":"tur",3:"tur"},{name:"Tsonga",local:"Xitsonga",1:"ts",2:"tso","2T":"tso","2B":"tso",3:"tso"},{name:"Tatar",local:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",1:"tt",2:"tat","2T":"tat","2B":"tat",3:"tat"},{name:"Twi",local:"Twi",1:"tw",2:"twi","2T":"twi","2B":"twi",3:"twi"},{name:"Tahitian",local:"Reo M\u0101\u2019ohi",1:"ty",2:"tah","2T":"tah","2B":"tah",3:"tah"},{name:"Uyghur",local:"\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u0647",1:"ug",2:"uig","2T":"uig","2B":"uig",3:"uig"},{name:"Ukrainian",local:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",1:"uk",2:"ukr","2T":"ukr","2B":"ukr",3:"ukr"},{name:"Urdu",local:"\u0627\u0631\u062F\u0648",1:"ur",2:"urd","2T":"urd","2B":"urd",3:"urd"},{name:"Uzbek",local:"O\u2018zbek",1:"uz",2:"uzb","2T":"uzb","2B":"uzb",3:"uzb"},{name:"Venda",local:"Tshiven\u1E13a",1:"ve",2:"ven","2T":"ven","2B":"ven",3:"ven"},{name:"Vietnamese",local:"Ti\u1EBFng Vi\u1EC7t",1:"vi",2:"vie","2T":"vie","2B":"vie",3:"vie"},{name:"Volap\xFCk",local:"Volap\xFCk",1:"vo",2:"vol","2T":"vol","2B":"vol",3:"vol"},{name:"Walloon",local:"Walon",1:"wa",2:"wln","2T":"wln","2B":"wln",3:"wln"},{name:"Welsh",local:"Cymraeg",1:"cy",2:"cym","2T":"cym","2B":"wel",3:"cym"},{name:"Wolof",local:"Wolof",1:"wo",2:"wol","2T":"wol","2B":"wol",3:"wol"},{name:"Western Frisian",local:"Frysk",1:"fy",2:"fry","2T":"fry","2B":"fry",3:"fry"},{name:"Xhosa",local:"isiXhosa",1:"xh",2:"xho","2T":"xho","2B":"xho",3:"xho"},{name:"Yiddish",local:"\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9",1:"yi",2:"yid","2T":"yid","2B":"yid",3:"yid"},{name:"Yoruba",local:"Yor\xF9b\xE1",1:"yo",2:"yor","2T":"yor","2B":"yor",3:"yor"},{name:"Zhuang",local:"Cuengh",1:"za",2:"zha","2T":"zha","2B":"zha",3:"zha"},{name:"Zulu",local:"isiZulu",1:"zu",2:"zul","2T":"zul","2B":"zul",3:"zul"}]});var tg=sn((D_,ag)=>{var Vo=Zy(),oL={all:rL,has:sL,codes:lL,names:cL,where:Qy};ag.exports=oL;function rL(){return Vo}function sL(a,e){return Qy(a,e)!==void 0}function lL(a){if(uL(a))return eg(Vo,function(t){return t[a]})}function cL(a){return eg(Vo,function(t){return a?t.local:t.name})}function Qy(a,e){for(var t=0;t{Ef.exports=class{constructor(e,t){this.xs=e,this.ys=t,this.ks=this.getNaturalKs(new Float64Array(this.xs.length))}getNaturalKs(e){let t=this.xs.length-1,i=f2(t+1,t+2);for(let n=1;n=e&&n!==i?i=n:i=t;return t+1}at(e){let t=this.getIndexBefore(e),i=(e-this.xs[t-1])/(this.xs[t]-this.xs[t-1]),n=this.ks[t-1]*(this.xs[t]-this.xs[t-1])-(this.ys[t]-this.ys[t-1]),o=-this.ks[t]*(this.xs[t]-this.xs[t-1])+(this.ys[t]-this.ys[t-1]);return(1-i)*this.ys[t-1]+i*this.ys[t]+i*(1-i)*(n*(1-i)+o*i)}};function g2(a,e){let t=a.length,i=0,n=0;for(;is&&(r=l,s=u)}if(a[r][n]===0)n++;else{k2(a,i,r);for(let l=i+1;l=0;r--){var o=0;a[r][r]&&(o=a[r][t]/a[r][r]),e[r]=o;for(let s=r-1;s>=0;s--)a[s][t]-=a[s][r]*o,a[s][r]=0}return e}function f2(a,e){let t=[];for(let i=0;i{kb.exports=Spicetify.React});var Yn=sn((CN,mw)=>{mw.exports=Spicetify.ReactDOM});var Kn=sn((EN,pw)=>{pw.exports=Spicetify.ReactDOM});var Y=sn((ON,xw)=>{xw.exports=Spicetify.ReactJSX});var Wh="spicy-lyrics",jl="6.4.70",Ml="https://github.com/ChrisTeng97/spicy-lyrics";var Za=[],ki=0,_l=4,Yr=globalThis.nanostoresGlobal||={epoch:0},aa=a=>{let e=[],t={get(){return t.lc||t.listen(()=>{})(),t.value},init:a,lc:0,listen(i){return t.lc=e.push(i),()=>{for(let o=ki+_l;o(a.events=a.events||{},a.events[t+zl]||(a.events[t+zl]=i(n=>{a.events[t].reduceRight((o,r)=>(r(o),o),{shared:{},...n})})),a.events[t]=a.events[t]||[],a.events[t].push(e),()=>{let n=a.events[t],o=n.indexOf(e);n.splice(o,1),n.length||(delete a.events[t],a.events[t+zl](),delete a.events[t+zl])});var NS=1e3,$h=(a,e)=>AS(a,i=>{let n=e(i);n&&a.events[Bl].push(n)},zS,i=>{let n=a.listen;a.listen=(...r)=>(!a.lc&&!a.active&&(a.active=!0,i()),n(...r));let o=a.off;return a.events[Bl]=[],a.off=()=>{o(),setTimeout(()=>{if(a.active&&!a.lc){a.active=!1;for(let r of a.events[Bl])r();a.events[Bl]=[]}},NS)},()=>{a.listen=n,a.off=o}});var RS=(a,e,t)=>{Array.isArray(a)||(a=[a]);let i,n,o=()=>{if(n===Yr.epoch)return;n=Yr.epoch;let d=a.map(c=>c.get());if(!i||d.some((c,p)=>c!==i[p])){i=d;let c=e(...d);c&&c.then&&c.t?c.then(p=>{i===d&&r.set(p)}):(r.set(c),n=Yr.epoch)}},r=aa(void 0),s=r.get;r.get=()=>(o(),s());let l,u=t?()=>{clearTimeout(l),l=setTimeout(o)}:o;return $h(r,()=>{let d=a.map(c=>c.listen(u));return o(),()=>{for(let c of d)c()}}),r},dd=(a,e)=>RS(a,e);function md(a,e,t){let i=new Set(e).add(void 0);return a.listen((n,o,r)=>{i.has(r)&&t(n,o,r)})}var so="SL:settings";function IS(){let a=Spicetify.LocalStorage.get(so);if(a==null)return{};try{return JSON.parse(a)}catch{return{}}}function pd(a){Spicetify.LocalStorage.set(so,JSON.stringify(a))}function qS(a){let e={"skip-spicy-font":"skipSpicyFont",show_npv_dynamic_bg:"showNpvDynamicBg","experiment:duetLinePadding":"duetLinePadding",staticBackgroundBlur:"backgroundBlur"},t=!1;for(let[i,n]of Object.entries(e))i in a&&(a[n]=a[i],delete a[i],t=!0);if("staticBackgroundMode"in a){let i={off:"dynamic",auto:"artist",artistHeader:"artist",coverArt:"cover",color:"color"};a.backgroundStyle??=i[a.staticBackgroundMode]??"dynamic",delete a.staticBackgroundMode,t=!0}return"simpleLyricsModeRenderingType"in a&&(delete a.simpleLyricsModeRenderingType,t=!0),t&&pd(a),a}var bi=qS(IS());function be(a,e){let t=aa(bi[a]!==void 0?bi[a]:e);return t.listen(i=>{bi[a]=i,pd(bi)}),t}var mt=be("settingsLanguage","auto"),Kr=["dynamic","artist","cover","color","none"],qa=be("backgroundStyle","dynamic"),ln=be("backgroundBlur",0),J=be("simpleLyricsMode",!1),pt=be("minimalLyricsMode",!1),cn=be("joinSplitWords",!1),lo=be("lineHoverBackground",!0),co=be("duetLinePadding",!0),uo=be("creditsFollowLastLine",!1),mo=be("skipSpicyFont",!1),po=be("showNpvDynamicBg",!0),wi=be("disableNpvLyrics",!1),ho=be("hideNpvLyricsWhenUnavailable",!0),yo=be("showNoLyricsNotice",!0),Xr=be("removeSpotifyLyricsButton",!1),go=be("lockedMediaBox",!1),fo=(()=>{let a=bi.popupLyricsAllowed!==void 0?bi.popupLyricsAllowed:!0,e=aa(a);return e.listen(t=>{bi.popupLyricsAllowed=t,pd(bi)}),e})(),un=be("viewControlsPosition","Top"),hd=be("ttmlMakerMode",!0),yd=be("ttmlUploadMode","persistent"),vi=be("developerMode",!1),dn=be("timelineOutsideMediaContent",!0),ht=be("showVolumeSlider",!0),ko=be("playbackOffset",0),Jr=be("seekFadeCompensation",!0),bo=be("scrollLeadEnabled",!1),Zr=be("scrollLeadMs",250),Ut=be("smoothScrolling",!1),mn=be("animationFpsCapEnabled",!1),wo=be("animationFpsCap",60),Wt=aa(window._spicy_lyrics_metadata?.LoadedVersion??jl),ha=aa("None"),ya=aa(!1),ze=aa(!1),ge=aa("");var Yh=new Set,gd=new Set,fd=a=>JSON.parse(JSON.stringify(a)),kd=a=>typeof a=="object"&&a!==null&&!Array.isArray(a),Kh=(a,e,t)=>{for(let i of Object.keys(e)){let n=e[i],o=`${t}.${i}`;if(!(i in a)){a[i]=fd(n);continue}let r=a[i],s=kd(n),l=kd(r);if(s&&l){Kh(r,n,o);continue}if(typeof n!=typeof r)throw new Error(`Template Type mismatch at ${o}`)}},VS=a=>{let e=new Date,{Duration:t,Unit:i}=a;switch(i){case"Seconds":return e.getTime()+t*1e3;case"Minutes":return e.getTime()+t*6e4;case"Hours":return e.getTime()+t*36e5;case"Days":return e.getTime()+t*864e5;case"Weeks":return e.getTime()+t*7*864e5;case"Months":return e.setMonth(e.getMonth()+t),e.getTime()}};function vo(a,e,t,i){if(Yh.has(a))throw new Error(`InstantStore "${a}" has already been retrieved`);Yh.add(a);let n;if(i)n=fd(t);else{let s=localStorage.getItem(a),l=null;if(s!==null)try{l=JSON.parse(s)}catch{l=null}if(n=fd(t),l!==null&&l.Version===e&&kd(l.Items))try{Kh(l.Items,t,`${a}.Items`),n=l.Items}catch(u){console.warn(`InstantStore "${a}": stored data is malformed, resetting`,u)}}let o={Version:e,Items:n};return Object.freeze({Items:n,SaveChanges:()=>{localStorage.setItem(a,JSON.stringify(o))}})}function pn(a,e,t,i){if(gd.has(a))throw new Error(`ExpireStore "${a}" has already been retrieved`);gd.add(a);let n=u=>`/${u}`;return Object.freeze({GetItem:async u=>{if(i)return;let c=await(await caches.open(a)).match(n(u));if(!c)return;let p=await c.json();if(p.CacheVersion===e&&!(p.ExpiresAt{let c={ExpiresAt:VS(t),CacheVersion:e,Content:d};try{await(await caches.open(a)).put(n(u),new Response(JSON.stringify(c),{headers:{"Content-Type":"application/json"}}))}catch(p){console.warn(`ExpireStore "${a}": failed to write item "${u}"`,p)}return d},RemoveItem:async u=>{try{await(await caches.open(a)).delete(n(u))||console.warn(`ExpireStore "${a}": item "${u}" not found on remove`)}catch(d){throw console.warn(`ExpireStore "${a}": error removing item "${u}"`,d),d}},Destroy:async()=>{try{await caches.delete(a)||console.warn(`ExpireStore "${a}": cache not found on destroy`),gd.delete(a)}catch(u){throw console.warn(`ExpireStore "${a}": error destroying`,u),u}}})}var So={timeout:0,interval:1,raf:2},DS=(a,e)=>[So.timeout,window.setTimeout(a,e),{cancelled:!1}],FS=(a,e)=>[So.interval,window.setInterval(a,e),{cancelled:!1}],OS=a=>[So.raf,requestAnimationFrame(a),{cancelled:!1}],HS=a=>{let e=Array.isArray(a[0])?a:[a];for(let t of e){let[i,n,o]=t;o.cancelled||(o.cancelled=!0,i===So.timeout?window.clearTimeout(n):i===So.interval?window.clearInterval(n):i===So.raf&&cancelAnimationFrame(n))}},GS=a=>Array.isArray(a)&&a.length===3&&typeof a[0]=="number"&&typeof a[1]=="number"&&typeof a[2]=="object",US={Timeout:DS,Interval:FS,OnPreRender:OS,Cancel:HS,IsScheduled:GS},Si=US;function WS(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let e=Math.random()*16|0;return(a==="x"?e:e&3|8).toString(16)})}function Al(a){typeof a=="function"?a():a instanceof MutationObserver||a instanceof ResizeObserver?a.disconnect():a instanceof Element?a.remove():Si.IsScheduled(a)?Si.Cancel(a):typeof a=="object"&&a!==null&&"Destroy"in a&&typeof a.Destroy=="function"?a.Destroy():console.warn("[Maid] Unknown item type \u2014 cannot clean:",a)}var qe=class{_items=new Map;_destroyed=!1;Give(e,t){let i=t??WS();return this._destroyed?(Al(e),e):(this._items.has(i)&&Al(this._items.get(i)),this._items.set(i,e),e)}GiveItems(...e){for(let t of e)this.Give(t);return e}Get(e){return this._items.get(e)}Has(e){return this._items.has(e)}Clean(e){let t=this._items.get(e);t!==void 0&&(this._items.delete(e),Al(t))}CleanUp(){for(let e of this._items.values())Al(e);this._items.clear()}Destroy(){this.CleanUp(),this._destroyed=!0}IsDestroyed(){return this._destroyed}};var bd=class{maid;isEnabled=!1;prefix;constructor(e){this.maid=new qe,this.prefix=`[${Wh}]${e?` (${e})`:""}`,this.isEnabled=vi.get(),this.maid.Give(vi.subscribe(t=>{this.isEnabled=t}))}getPrefixArgs(){return[`%c${this.prefix}`,"color: #c9c9c9;"]}info(...e){if(this.maid.IsDestroyed()||!this.isEnabled)return;let[t,i]=this.getPrefixArgs();console.info(t,i,...e)}warn(...e){if(this.maid.IsDestroyed())return;let[t,i]=this.getPrefixArgs();console.warn(t,i,...e)}error(...e){if(this.maid.IsDestroyed())return;let[t,i]=this.getPrefixArgs();console.error(t,i,...e)}debug(...e){if(this.maid.IsDestroyed()||!this.isEnabled)return;let[t,i]=this.getPrefixArgs();console.debug(t,i,...e)}destroy(){this.maid.IsDestroyed()||this.maid.Destroy()}},ee=bd;var $S="https://api.spicylyrics.org/bp/svc",YS="https://api.spicylyrics.org/bp/init",KS=new Set(["config"]),XS=.8,hn=null,wd=null;function Sd(){return{"SpicyLyrics-Version":window._spicy_lyrics_metadata?.LoadedVersion??jl}}function JS(a){return`${$S}?selector=${encodeURIComponent(a)}`}async function ZS(a){let e=await fetch(`${YS}?_=${Date.now()}`,{signal:AbortSignal.timeout(a),cache:"no-store",headers:Sd()});if(!e.ok)return e;let t=await e.json().catch(()=>null);return typeof t?.token!="string"||typeof t.expiresIn!="number"||!(t.expiresIn>0)?new Response(null,{status:502,statusText:"Malformed edge token"}):(hn={value:t.token,refreshAt:performance.now()+t.expiresIn*1e3*XS},hn)}function QS(a,e){return e.aborted?Promise.reject(e.reason):new Promise((t,i)=>{let n=()=>i(e.reason);e.addEventListener("abort",n,{once:!0}),a.then(t,i).finally(()=>e.removeEventListener("abort",n))})}function Xh(a,e){return hn&&performance.now(){wd=null}),QS(wd,e))}async function Jh(a,e){try{return await Xh(a,e)}catch(t){if(e.aborted||t?.name!=="TimeoutError")throw t;return Xh(a,e)}}function vd(a,e,t){return fetch(JS(a),{signal:e,cache:"no-store",headers:t?{...Sd(),Authorization:`Bearer ${t}`}:Sd()})}async function Nl(a,{timeoutMs:e}){let t=AbortSignal.timeout(e);if(KS.has(a))return vd(a,t);let i=await Jh(e,t);if(i instanceof Response)return i;let n=await vd(a,t,i.value);if(n.status!==401)return n;hn===i&&(hn=null);let o=await Jh(e,t);return o instanceof Response?o:vd(a,t,o.value)}var yt=new ee("Remote Config"),Ld={query:{requestTimeoutMs:15e3},breaker:{tripStatuses:[403,408,425,429,500,502,503,504],failureThreshold:2,ladderMs:[3e4,3e4,3e4,6e4,12e4,12e4,12e4,12e4,12e4,12e4,12e4,12e4,3e5],ladderJitterRatio:.5,openUntilSanityMs:27e5,ladderDecayMs:36e5,probeMinIntervalMs:3e4,probeStaleAfterMs:6e4},lyricsQueue:{baseDelayMs:2e3,maxDelayMs:1e4,backoffFactor:1.5},lyricsFetch:{rapidSwitchWindowMs:1e3,rapidSwitchBackoffMs:400,loaderRevealDelayMs:2e3,safetyNetRefetchDelayMs:1e3},cache:{lyricsTtlDays:3,artistVisualsTtlDays:3,audioAnalysisTtlMonths:1,audioAnalysisNotFoundTtlHours:24,canvasMediaCacheSize:4},canvas:{loadTimeoutMs:2e4,retryDelaysMs:[3e3,1e4,3e4]},updates:{checkIntervalMs:12e4,checkJitterRatio:.2,firstCheckDelayMs:1e3,latestVersionTimeoutMs:15e3},session:{pingJitterRatio:.2,refreshJitterRatio:.1,backoffBaseMs:5e3,backoffMaxMs:6e4,createJitterRatio:.3,recreateJitterRatio:.3,recoverSpreadMs:45e3,pingFailureMaxMs:18e5,pingFailureJitterRatio:.2,refreshFailureBaseMs:6e4,refreshFailureMaxMs:9e5,refreshFailureJitterRatio:.2},token:{expiryMarginMs:6e4,renewCooldownMs:1e4,renewTimeoutMs:1e4,sourceTimeoutMs:4e3,resolveTimeoutMs:2e4},audioAnalysis:{timeoutMs:15e3},experimentsSync:{timeoutMs:5e3,intervalMs:6e4},remoteConfig:{timeoutMs:5e3,intervalMs:15e3}},e1=2147483647,Lo=1e3,a1=[["experimentsSync","intervalMs"],["updates","checkIntervalMs"]],t1=new Set(["breaker.ladderMs"]),Qr=a=>typeof a=="object"&&a!==null&&!Array.isArray(a);function ey(a){if(!(typeof a!="number"||!Number.isFinite(a)||a<0))return Math.min(a,e1)}function i1(a,e){if(!Array.isArray(a)||e&&a.length===0)return;let t=[];for(let i of a){let n=ey(i);if(n===void 0)return;t.push(n)}return t}var Va=a=>JSON.stringify(a)??String(a);function xo(a,e){let t=Qr(a)?a:{},i={};for(let o of Object.keys(t))Object.hasOwn(Ld,o)||e?.push(`${o}: unknown group, ignored`);for(let o of Object.keys(Ld)){let r=Ld[o],s=Qr(t[o])?t[o]:{},l={};Qr(t[o])||e?.push(`${o}: group missing, using defaults`);for(let u of Object.keys(s))Object.hasOwn(r,u)||e?.push(`${o}.${u}: unknown key, ignored`);for(let u of Object.keys(r)){let d=r[u],c=s[u],p=Array.isArray(d)?i1(c,t1.has(`${o}.${u}`)):ey(c);l[u]=p??(Array.isArray(d)?[...d]:d),Qr(t[o])&&(Object.hasOwn(s,u)?p===void 0?e?.push(`${o}.${u}: invalid ${Va(c)}, using default ${Va(d)}`):Va(p)!==Va(c)&&e?.push(`${o}.${u}: ${Va(c)} capped to ${Va(p)} (setTimeout limit)`):e?.push(`${o}.${u}: missing, using default ${Va(d)}`))}i[o]=l}let n=i;for(let o of["timeoutMs","intervalMs"])n.remoteConfig[o]>=Lo||(e?.push(`remoteConfig.${o}: ${n.remoteConfig[o]} raised to ${Lo} (keeps config fetches working)`),n.remoteConfig[o]=Lo);for(let[o,r]of a1){let s=n[o];s[r]>=Lo||(e?.push(`${o}.${r}: ${s[r]} raised to ${Lo} (would poll back-to-back)`),s[r]=Lo)}return n}function ay(a,e){let t=[];for(let i of Object.keys(e)){let n=a[i],o=e[i];for(let r of Object.keys(o))Va(n[r])!==Va(o[r])&&t.push(`${i}.${r}: ${Va(n[r])} \u2192 ${Va(o[r])}`)}return t}var Rl=vo("SpicyLyrics_RemoteConfig_g1",1,{payload:{}}),Li=xo(Rl.Items.payload),Zh=JSON.stringify(Li);{let a=ay(xo({}),Li);a.length?yt.info(`Starting on last session's config, ${a.length} value(s) off default: ${a.join(` `)}`):yt.debug("Starting on the default config")}var Td=new Set;function ue(){return Li}function ty(a){return Td.add(a),()=>Td.delete(a)}var xd=null,ql=!1,Cd="";function Ed(a,e){if(ql){yt.debug(`Fetch (${a}) still failing, keeping the current config`,e);return}ql=!0,yt.warn(`Fetch (${a}) failed, keeping the current config until it recovers`,e)}function n1(a){let e=a.join(` `);e!==Cd&&(a.length?yt.warn(`Payload has ${a.length} problem(s), affected keys don't apply as served: ${a.join(` `)}`):Cd&&yt.info("Payload problems resolved, every key is applied as served"),Cd=e)}function Il(a="manual"){return xd??=(async()=>{try{let e=await Nl("config",{timeoutMs:Li.remoteConfig.timeoutMs});if(!e.ok){Ed(a,`HTTP ${e.status}`);return}let t=await e.json();if(!Qr(t)){Ed(a,`payload is not an object: ${Va(t).slice(0,200)}`);return}ql&&(ql=!1,yt.info(`Fetch (${a}) succeeded again`));let i=[],n=xo(t,i),o=JSON.stringify(n);if(n1(i),JSON.stringify(Rl.Items.payload)!==JSON.stringify(t)&&(Rl.Items.payload=t,Rl.SaveChanges()),o===Zh){yt.debug(`Fetch (${a}): unchanged`);return}let r=ay(Li,n);yt.info(`Config changed (${a}), ${r.length} value(s): ${r.join(` `)}`),Li=n,Zh=o;for(let s of Td)try{s(n)}catch(l){yt.error("Change listener failed",l)}}catch(e){Ed(a,e)}finally{xd=null}})(),xd}var Qh=!1;function iy(){if(Qh)return;Qh=!0;let a=async e=>{try{await Il(e)}finally{setTimeout(()=>{a("interval")},Li.remoteConfig.intervalMs)}};a("boot"),window.addEventListener("focus",()=>{Il("focus")}),window.addEventListener("online",()=>{Il("online")})}var ny={get:()=>Li,refresh:()=>Il("manual"),sanitize:a=>xo(a),check:a=>{let e=[];return xo(a,e),e},defaults:()=>xo({})};var o1=[{id:"neteaseFallback",label:"NetEase Missing Lyrics",description:"Only search NetEase Cloud Music when Spicy Lyrics reports no lyrics. Save matched lyrics locally for reuse.",default:!0},{id:"lyricSharing",label:"Lyric Sharing",description:"Select lyric lines to copy as text or export as an image with an animated cover background.",default:!0,rebuildsNowBar:!0},{id:"newProgressBarStyling",label:"New SliderBar Styling",description:"New glass-like style for the SliderBar. Disable to revert back to the original one.",default:!0,pageClass:"Exp_NewProgressBar"},{id:"lyricsSkeleton",label:"Lyrics Loading Skeleton",description:'Shows placeholder lines and a small "Loading Lyrics" label while lyrics fetch and render, instead of the blurred spinner. Disable to bring the spinner back.',default:!0,pageClass:"Exp_LyricsSkeleton"},{id:"canvasImmersive",label:"Canvas Stage",description:"When a song has a Spotify Canvas, it fills the Now Bar side of the screen in place of the album cover, and its colors drive the page background. Only applies with the dynamic background. Disable to keep the cover and the animated cover background.",default:!0},{id:"npvCanvasBackground",label:"Canvas NPV Background",description:"When a song has a Spotify Canvas, the Now Playing View's dynamic background is drawn from the Canvas video playing there, frame for frame, instead of the album cover. Disable to keep the cover.",default:!0},{id:"popupDock",label:"Popup Player Dock",description:"Popup lyrics fill the whole window, with the player docked along the bottom like the Canvas Stage: title and artist at rest, the timeline and controls rising in when you move the mouse. Disable to bring back the cover header and the controls over the enlarged cover.",default:!0,pageClass:"Exp_PopupDock"},{id:"refinedBackground",label:"Refined Background",description:"Background changes crossfade in place, including switching styles in Settings, and Cover Colors use the cover's deeper tones, changing with the song instead of a second later. Image backgrounds keep their edges instead of being cropped. Disable to bring back the sliding image transition and the brighter Cover Colors.",default:!0,pageClass:"Exp_RefinedBackground"},{id:"refreshedSimpleLyrics",label:"Refreshed Simple Lyrics Mode",description:"In Simple Lyrics Mode, the sung part of a line fades in behind one soft edge that runs on from word to word without stopping, words float up as they're sung with the next already rising before the last has settled, the part still to come stays a little brighter, and the letters of a short held word swell, spread apart, lift and glow one after another, then ease back, stronger the longer the word is held. Lines sit further apart and follow the song in a ripple, each catching up a moment after the one above it. Interlude dots fill in one by one while the group slowly breathes. Its scrolling takes over from Smooth Scrolling while it's on. Disable to bring back the previous Simple Lyrics look.",default:!1,pageClass:"Exp_RefreshedSimpleLyrics"},{id:"refinedCredits",label:"Refined Credits",description:"The credits under the lyrics become quiet type close under the last line, with no box: the songwriters, then the lyrics source beneath. Community lyrics say so on that second line, with the people who made and uploaded them linked by name. In synced lyrics the credits stay dim until the last line has been sung. Disable to bring back the previous credit lines.",default:!0,pageClass:"Exp_RefinedCredits"},{id:"scrubPreview",label:"Scrub Preview",description:"Hovering or dragging the progress bar shows the time a click would seek to, and the volume bar shows the level it would set. Disable to hide these previews.",default:!0,pageClass:"Exp_ScrubPreview"},{id:"backgroundLinePop",label:"Background Vocal Pop-Out",description:"Background vocal lines stay tucked away under their line until it's sung, then slide out from beneath it while the lines below make room, and tuck back in once both are done. Only applies in Simple Lyrics Mode with Refreshed Simple Lyrics Mode on. Disable to keep every background vocal line on screen at all times.",default:!1,pageClass:"Exp_BackgroundLinePop"},{id:"keepOverlappingLines",label:"Keep Overlapping Lines",description:"In Minimal Lyrics Mode, a line that ends while one above it is still being sung (overlapping lines, background vocals) stays on screen, dimmed, instead of fading out early. Disable to fade every sung line out as soon as it ends.",default:!0,pageClass:"Exp_KeepOverlappingLines"},{id:"lineOnlyLyrics",label:"Line-only Lyrics",description:"Highlight each active line all at once, without word-by-word fill, bounce or letter effects. Keep automatic scrolling and duet alignment. Disable to restore word-synced effects.",default:!1,pageClass:"Exp_LineOnlyLyrics"},{id:"clearLyrics",label:"Clear Lyrics",description:"Keep inactive lyrics sharp by removing distance-based blur. Active lines remain brighter. Disable to restore the original blur.",default:!1,pageClass:"Exp_ClearLyrics"},{id:"noLyricsGlow",label:"Disable Lyrics Glow",description:"Remove text glow from highlighted lyrics and word effects. Keep active-line brightness, inactive-line blur and background effects. Disable to restore the original glow.",default:!1,pageClass:"Exp_NoLyricsGlow"}],yn=o1,xi=aa({});function jd(a,e){let t=e[a.id];return t?{...a,...t}:a}function Co(a){let e=yn.find(t=>t.id===a);if(!e)throw new Error(`Unknown experiment "${a}"`);return jd(e,xi.get())}function Dl(){let a=xi.get();return yn.map(e=>jd(e,a))}function sy(){return Dl().filter(a=>!a.hidden)}var ly=new Map(yn.map(a=>[a.id,be(`experiment:${a.id}`,void 0)])),Md=new Map(yn.map(a=>[a.id,dd([ly.get(a.id),xi],(e,t)=>{let i=jd(a,t);return i.forceState??e??i.default})]));function r1(a){return Co(a).forceState}function $t(a){let e=Md.get(a);if(!e)throw new Error(`Unknown experiment "${a}"`);return e}function de(a){return Md.get(a)?.get()??!1}function cy(a,e){r1(a)===void 0&&ly.get(a)?.set(e)}var oy=new Set(yn.flatMap(a=>a.pageClass?[a.pageClass]:[]));function Fl(a){let e=new Set;for(let t of Dl())t.pageClass&&(oy.add(t.pageClass),de(t.id)&&e.add(t.pageClass));for(let t of oy)a.classList.toggle(t,e.has(t))}function Ci(a){for(let e of yn)Md.get(e.id)?.listen(()=>a(Co(e.id)))}function uy(a){xi.listen(()=>a())}var s1={label:"string",description:"string",default:"boolean",pageClass:"string",rebuildsNowBar:"boolean",forceState:"boolean",hidden:"boolean"},l1=new Set(yn.map(a=>a.id));function c1(a){let e={};if(!Array.isArray(a))return e;for(let t of a){if(!t||typeof t!="object")continue;let i=t.id;if(typeof i!="string"||!l1.has(i))continue;let n={};for(let[o,r]of Object.entries(s1)){if(!Object.hasOwn(t,o))continue;let s=t[o];typeof s===r&&(n[o]=s)}Object.keys(n).length&&(e[i]=n)}return e}var Pd=null,Vl=aa(!1);function _d(){return Pd??=(async()=>{Vl.set(!0);try{let a=await Nl("experimentsState",{timeoutMs:ue().experimentsSync.timeoutMs});if(!a.ok)return;let e=c1(await a.json());JSON.stringify(e)!==JSON.stringify(xi.get())&&xi.set(e)}catch(a){console.warn("Experiments state refresh failed",a)}finally{Pd=null,Vl.set(!1)}})(),Pd}var ry=!1;function dy(){if(ry)return;ry=!0;let a=async()=>{try{await _d()}finally{setTimeout(a,ue().experimentsSync.intervalMs)}};a()}var Ei=new Map,u1=32;async function es(a){if(!a)throw new Error("SpicyLyrics: BlobURLMaker: url Missing");let e=Ei.get(a);if(e)return Ei.delete(a),Ei.set(a,e),e;try{let t=await fetch(a);if(!t.ok)return null;let i=await t.blob(),n=Ei.get(a);if(n)return n;let o=URL.createObjectURL(i);if(Ei.set(a,o),Ei.size>u1){let[r,s]=Ei.entries().next().value;Ei.delete(r),URL.revokeObjectURL(s)}return o}catch(t){throw console.error("Error fetching and converting to blob URL:",t),t}}var Eo=new Map,d1=1,m1=(a,e)=>{Eo.has(a)||Eo.set(a,new Map);let t=d1++,i=Eo.get(a);return i&&i.set(t,e),t},p1=a=>{for(let[e,t]of Eo)if(t.has(a))return t.delete(a),t.size===0&&Eo.delete(e),!0;return!1},h1=(a,...e)=>{let t=Eo.get(a);if(t)for(let i of t.values())i(...e)},y1={listen:m1,unListen:p1,evoke:h1},my=y1;window._spicy_lyrics={};var Bd=window._spicy_lyrics,g1={Scope:Bd,Event:my,NonLocalTimeOffset:0,Saves:{},SetScope:(a,e)=>{let t=a.split("."),i=Bd;for(let n=0;n{let t=a.split("."),i=Bd;for(let n of t){if(i==null)return e;i=i[n]}return i===void 0?e:i}},z=g1;function Je(a,e){let t=Spicetify.Tippy?.(a,e);return t?.popper?.classList.add("SpicyLyrics_Tooltip"),t}var Hl=null,To=null,Ti=null,py=null,ga=null,Ol=null,Ad=[.05,.1,.15,.75],as=C?.IsPlaying?Ad.length:0,f1=100,k1=500,b1=300,w1=1e3,v1=500,S1=3;function hy(a){let e=C.GetDuration(),t=Math.max(0,a);return e>0&&(t=Math.min(t,e)),t}function zd(a,e){let t=C.GetId()??null,i=hy(a),n=Date.now();if(!To||To.TrackId!==t||!e)return To={TrackId:t,Position:i,UpdatedAt:n},i;let o=Math.max(0,n-To.UpdatedAt),r=To.Position+o,s=i-r;if(Math.abs(s)>k1)r=i;else{let l=1-Math.exp(-o/b1);r+=s*l}return r=hy(r),To={TrackId:t,Position:r,UpdatedAt:n},r}var Gl=()=>{try{let a=Spicetify.Platform,e=Date.now(),t=a.PlaybackAPI._isLocal,i=C.GetUri()??null;(t?a.PlayerAPI._contextPlayer.getPositionState({}).then(({position:s})=>{let l=e+(Date.now()-e)/2,u=Number(s),d=Spicetify.Player.isPlaying(),c=C.GetUri()??null,p=a.PlayerAPI._state,m=p?d?p.positionAsOfTimestamp+(l-p.timestamp):p.positionAsOfTimestamp:Number.NaN,y=!1;if(Number.isFinite(m)){if(Ol?.WasPlaying&&d){let g=Ol.Position+(l-Ol.ReadAt);y=Math.abs(m-g)>w1}Ol={Position:m,ReadAt:l,WasPlaying:d}}let h=py!==u;if(py=u,d){let g=h;ga?(ga.ConsecutiveChanges=g?ga.ConsecutiveChanges+1:0,g&&(ga.LastChangeAt=l)):ga={LastChangeAt:l,ConsecutiveChanges:g?1:0,UsingState:!1};let b=l-ga.LastChangeAt>v1;ga.UsingState&&ga.ConsecutiveChanges>=S1?ga.UsingState=!1:b&&(ga.UsingState=!0)}else ga&&(ga.LastChangeAt=l,ga.ConsecutiveChanges=0);if(ga?.UsingState&&d&&Number.isFinite(m))return Ti={Position:m,SampledAt:l,TrackUri:c},{StartedSyncAt:l,Position:m};let k=Ti!==null&&d&&(Ti.TrackUri!==c||y);return(!Ti||Ti.Position!==u||!d||k)&&(Ti={Position:u,SampledAt:l,TrackUri:c}),{StartedSyncAt:Ti.SampledAt,Position:Ti.Position}}):(as>0?a.PlayerAPI._contextPlayer.resume({}):Promise.resolve()).then(()=>{as=Math.max(0,as-1);let s=a.PlayerAPI._state,l=Spicetify.Player.isPlaying()?s.positionAsOfTimestamp+(Date.now()-s.timestamp):s.positionAsOfTimestamp;return{StartedSyncAt:e,Position:l}})).then(s=>{(C.GetUri()??null)===i&&(Hl={...s,TrackUri:i})}).catch(s=>{console.error("Sync Position: Poll failed, More Details:",s)}).then(()=>{let s=t||as===0?.016666666666666666:Ad[Ad.length-as];setTimeout(Gl,s*1e3)})}catch(a){console.error("Sync Position: Fail, More Details:",a),setTimeout(Gl,1e3)}};function ts(){if(C.GetContentType()!=="track")return Spicetify.Player.getProgress();if(!Hl)return console.error("Synced Position: Unavailable"),C?._DEPRECATED_?.GetTrackPosition?(console.warn("Synced Position: Skip, Using DEPRECATED Version"),C._DEPRECATED_.GetTrackPosition()):(console.warn("Synced Position: Skip, Returning 0"),0);if(Hl.TrackUri!==(C.GetUri()??null)){let r=Spicetify.Player.isPlaying();return zd(Spicetify.Player.getProgress()-ko.get(),r)}let{StartedSyncAt:a,Position:e}=Hl,i=Date.now()-a,n=ko.get();if(!Spicetify.Player.isPlaying())return zd(e-n,!1);let o=e+i;return zd(o+f1-n,!0)}function yy(){if(!Spicetify?.Player?.origin?._state)return console.error("Spicetify Player state is not available."),0;let a=Spicetify.Player.origin._state,e=a.positionAsOfTimestamp,t=a.timestamp,i=a.isPaused;if(e==null||t==null)return console.error("Playback state is incomplete."),null;let n=Date.now();return i?e:e+(n-t)}var L1=()=>Spicetify?.Player?.data?.item?.type?Spicetify.Player.data.item.type:"unknown",gn="https://images.spikerko.org/SongPlaceholderFull.png",C={IsPlaying:!1,_DEPRECATED_:{GetTrackPosition:yy},GetPosition:ts,GetContentType:L1,GetMediaType:()=>Spicetify?.Player?.data?.item?.mediaType,GetDuration:()=>Spicetify?.Player?.data?.item?.duration?.milliseconds?Spicetify.Player.data.item.duration.milliseconds:0,Seek:a=>{Spicetify?.Player?.origin?.seekTo(a)},GetCover:a=>{let e=Spicetify?.Player?.data?.item;if(!e)return gn;let t=e.images??e.show?.images;return t?.length>0?t.find(n=>n.label===a)?.url??gn:gn},GetCoverFrom:(a,e)=>e&&e.length>0?e?.find(i=>i.label===a)?.url??gn:gn,GetName:()=>Spicetify?.Player?.data?.item?.name,GetShowName:()=>Spicetify?.Player?.data?.item?.show?.name,GetAlbumName:()=>Spicetify?.Player?.data?.item?.metadata?.album_title,GetId:()=>Spicetify?.Player?.data?.item?.uri?.split(":")[2],GetArtists:()=>Spicetify?.Player?.data?.item?.artists,GetUri:()=>Spicetify?.Player?.data?.item?.uri??Spicetify?.Player?.data?.track?.uri,Pause:Spicetify?.Player?.pause,Play:Spicetify?.Player?.play,TogglePlayState:Spicetify?.Player?.togglePlay,Skip:{Next:Spicetify?.Player?.next,Prev:Spicetify?.Player?.back},LoopType:"none",ShuffleType:"none",IsDJ:()=>{let a=Spicetify?.Player?.data;return a?a.item?.provider?.startsWith("narration")||a.restrictions?.disallowSeekingReasons?.length>0&&a.restrictions?.disallowSeekingReasons[0]?.includes("narration")||a.item?.type==="unknown":!1},IsLiked:()=>Spicetify?.Player?.getHeart(),ToggleLike:async()=>{let a=[C.GetUri()];C.IsLiked()?await Spicetify.Platform.LibraryAPI.remove({uris:a}):await Spicetify.Platform.LibraryAPI.add({uris:a})},Playbar:(()=>{let a,e=new Set,t=new Set(["main-nowPlayingBar-lyricsButton","vVsHwFW9rx4CZOne"]),i=new Set(["ZfsMQKTLl695iPvUo3GK","Tjk9xHexUrsjejB5PBbF","OJsKOflU3SmUHnQ5_QKE"]);class n{element;iconElement;_label;_icon;_onClick;_disabled;_active;tippy;constructor(h,k,g=()=>{},b=!1,f=!1,v=!0){this.element=document.createElement("button"),this.element.classList.add("main-genericButton-button","SpicyLyrics_PlaybarButton"),this.iconElement=document.createElement("span"),this.iconElement.classList.add("Wrapper-sm-only","Wrapper-small-only"),this.element.appendChild(this.iconElement),this.icon=k,this.onClick=g,this.disabled=b,this.active=f,u(this.element),this.tippy=Je(this.element,{content:h,...Spicetify.TippyProps}),this.label=h,v&&this.register()}get label(){return this._label}set label(h){this._label=h,this.tippy?this.tippy.setContent(h):this.element.setAttribute("title",h)}get icon(){return this._icon}set icon(h){let k=h;k&&Spicetify.SVGIcons&&Spicetify.SVGIcons[k]&&(k=`${Spicetify.SVGIcons[k]}`),this._icon=k,this.iconElement.innerHTML=k}get onClick(){return this._onClick}set onClick(h){this._onClick=h,this.element.onclick=()=>this._onClick(this)}get disabled(){return this._disabled}set disabled(h){this._disabled=h,this.element.disabled=h,this.element.classList.toggle("disabled",h)}set active(h){this._active=h,this.element.classList.toggle("main-genericButton-buttonActive",h),this.element.classList.toggle("ZfsMQKTLl695iPvUo3GK",h),this.element.classList.toggle("Tjk9xHexUrsjejB5PBbF",h),this.element.classList.toggle("OJsKOflU3SmUHnQ5_QKE",h),this.element.classList.toggle("main-genericButton-buttonActiveDot",h)}get active(){return this._active}register(){e.add(this.element),s()}deregister(){e.delete(this.element),this.element.remove()}}let o='[data-testid="now-playing-bar"], .Root__now-playing-bar, .main-nowPlayingBar-right, .main-nowPlayingBar-extraControls, button[data-testid="lyrics-button"], button[data-testid="pip-toggle-button"], button[data-testid="fullscreen-mode-button"]';function r(){return document.querySelector('[data-testid="now-playing-bar"], .Root__now-playing-bar')?.querySelector('button[data-testid="lyrics-button"], button[data-testid="pip-toggle-button"], button[data-testid="fullscreen-mode-button"]')?.parentElement??document.querySelector(".main-nowPlayingBar-right > div, .main-nowPlayingBar-extraControls")}function s(){if(a=r(),!!a){for(let y of e)u(y);[...e].some(y=>y.parentElement!==a)&&a.prepend(...e),z.Event.evoke("playbar:controls",a)}}new MutationObserver(y=>{y.some(h=>h.target===a||[...h.addedNodes,...h.removedNodes].some(k=>k instanceof Element&&(k===a||a!==null&&k.contains(a)||k.matches(o)||k.querySelector(o))))&&s()}).observe(document.documentElement,{childList:!0,subtree:!0}),s();function u(y){let h=r(),k=null;for(let g of['button[data-testid="fullscreen-mode-button"]','button[data-testid="pip-toggle-button"]','button[data-testid="lyrics-button"]',".main-genericButton-button:not(.SpicyLyrics_PlaybarButton)"])if(k=h?.querySelector(g)??null,k)break;if(k)for(let g of Array.from(k.classList))g.startsWith("main-genericButton")||i.has(g)||t.has(g)||y.classList.add(g)}let d=new Set,c;class p{element;_label;_icon;_onClick;_disabled;_active;tippy;constructor(h,k,g=()=>{},b=!1,f=!1,v=!0){this.element=document.createElement("button"),this.element.className="main-addButton-button control-button control-button-heart",this.icon=k,this.onClick=g,this.disabled=b,this.active=f,this.tippy=Je(this.element,{content:h,...Spicetify.TippyProps}),this.label=h,v&&this.register()}get label(){return this._label}set label(h){this._label=h,this.tippy?this.tippy.setContent(h):this.element.setAttribute("title",h)}get icon(){return this._icon}set icon(h){let k=h;k&&Spicetify.SVGIcons&&Spicetify.SVGIcons[k]&&(k=`${Spicetify.SVGIcons[k]}`),this._icon=k,this.element.innerHTML=k}get onClick(){return this._onClick}set onClick(h){this._onClick=h,this.element.onclick=()=>this._onClick(this)}get disabled(){return this._disabled}set disabled(h){this._disabled=h,this.element.disabled=h,this.element.classList.toggle("main-addButton-disabled",h),this.element.ariaDisabled=h}set active(h){this._active=h,this.element.classList.toggle("main-addButton-active",h),this.element.ariaChecked=h}get active(){return this._active}register(){d.add(this.element),c?.append(this.element)}deregister(){d.delete(this.element),this.element.remove()}}function m(){if(c=document.querySelector(".main-nowPlayingWidget-nowPlaying")??document.querySelector(".nH2R2U626Rdlv05YEt09"),!c){setTimeout(m,300);return}c.append(...Array.from(d))}return(function y(){let h=document.querySelector(".main-nowPlayingBar-left")??document.querySelector(".Xaz3TDhhjakUcSaES5TR")??document.querySelector(".qqAX5M23YurntqVJ_8Dt")??document.querySelector(".main-nowPlayingWidget-actionButtonWrapper")??document.querySelector(".main-nowPlayingWidget-nowPlaying > div:last-of-type");if(!h){setTimeout(y,300);return}m(),new MutationObserver(g=>{for(let b of g)b.removedNodes.length>0&&(c=null,m())}).observe(h,{childList:!0})})(),{Button:n,Widget:p,GetControls:r}})()};var x1=pn("SpicyLyrics_ArtistVisuals",3,{Unit:"Days",get Duration(){return ue().cache.artistVisualsTtlDays}}),gy=x1;function Ul(a){if(!a)return C.GetCover("xlarge")??void 0;let e=typeof a=="object"?a[0]?.url:JSON.parse(a)[0]?.url;return e?`spotify:image:${e.substring(e.lastIndexOf("/")+1)}`:C.GetCover("xlarge")??void 0}var Wl=new Map;async function Nd(a,e){if(!e)throw new Error("Invalid Song Id");if(!a)throw new Error("Invalid Song Artist");if(!e||!a)throw new Error("Invalid URIs");let t=await Po.CacheStore.GetItem(a);if(t&&t.Result)return Ul(t.Result);return i();async function i(){if(Wl.has(a))return Wl.get(a);let n=(async()=>{try{let o=await Spicetify.GraphQL.Request(Spicetify.GraphQL.Definitions.queryNpvArtist,{artistUri:`spotify:artist:${a}`,trackUri:`spotify:track:${e}`,enableRelatedVideos:!1,enableRelatedAudioTracks:!1});if(o.errors)throw new Error(`Failed to fetch visuals: ${status}`);{let r=o?.data?.artistUnion?.headerImage?.data?.sources;return await Po.CacheStore.SetItem(a,{Result:r??""}),Ul(r??"")}}finally{Wl.delete(a)}})();return Wl.set(a,n),n}}var C1={CacheStore:gy,ApplyContent:Nd},Po=C1;var E1={lyrics:{api:{url:"https://api.spicylyrics.org"}}},fy=E1;var ky=globalThis.Spicetify,Bo,Rd,wy=new Promise(a=>{let e=()=>{if(Bo=ky.Platform,Rd=ky.CosmosAsync,!Bo||!Rd){requestAnimationFrame(()=>setTimeout(e,0));return}a()};e()}),Pi,is,_o,T1=()=>ue().token.expiryMarginMs;function Mo(a){return!a?.accessToken||a.accessToken===_o?!1:typeof a.expiresAtTime!="number"||!Number.isFinite(a.expiresAtTime)?!0:a.expiresAtTime-Date.now()>T1()}function jo(a){return Pi=a,_o&&_o!==a.accessToken&&(_o=void 0),a.accessToken}function vy(){try{let a=Bo?.AuthorizationAPI;if(typeof a?.getState!="function")return;let e=a.getState(),t=e?.token;return!t?.accessToken||e.isAuthorized===!1?void 0:{accessToken:t.accessToken,expiresAtTime:t.accessTokenExpirationTimestampMs,tokenType:"Bearer"}}catch(a){console.warn("AuthorizationAPI.getState() failed, falling back",a);return}}function P1(){let a;try{a=Bo?.Registry?.resolve(Symbol.for("TokenProvider"))}catch{}return a??=Bo?.AuthorizationAPI?._tokenProvider,typeof a?.getToken=="function"?a:void 0}function Sy(a){if(a?.accessToken)return{accessToken:a.accessToken,expiresAtTime:a.accessTokenExpirationTimestampMs,tokenType:"Bearer"}}var zo=Symbol("timed out");function Id(a,e){let t,i=new Promise(n=>{t=setTimeout(()=>n(zo),e)});return Promise.race([a,i]).finally(()=>clearTimeout(t))}async function j1(a){try{let e=await Id(a.getToken(),ue().token.sourceTimeoutMs);return e===zo?(console.warn("TokenProvider.getToken() timed out"),zo):Sy(e)}catch(e){console.warn("TokenProvider.getToken() failed",e);return}}var ns,by=0;function M1(a){if(ns)return ns;if(typeof a._client?.getToken!="function"||Date.now()-by{try{return await a._client.getToken({renew:!0}),Sy(await a.getToken({forceRefresh:!0}))}catch(i){console.warn("Token renew failed",i);return}})(),t=Id(e,ue().token.renewTimeoutMs).then(i=>{if(i!==zo)return i;console.warn("Token renew timed out")}).finally(()=>{ns===t&&(ns=void 0)});return ns=t,t}async function _1(){try{let e=await Id(Rd.get("sp://oauth/v2/token"),ue().token.sourceTimeoutMs);if(e===zo)console.warn("sp://oauth/v2/token timed out, falling back to Platform.Session");else if(e?.accessToken)return{accessToken:e.accessToken,expiresAtTime:e.expiresAtTime,tokenType:"Bearer"}}catch(e){console.warn("sp://oauth/v2/token failed, falling back to Platform.Session",e)}let a=Bo?.Session;if(!a?.accessToken){console.warn("Failed to find SpotifyPlatform.Session for fetching token");return}return{accessToken:a.accessToken,expiresAtTime:a.accessTokenExpirationTimestampMs,tokenType:"Bearer"}}async function B1(){await wy;let a=vy();if(a&&Mo(a))return jo(a);let e=P1(),t;if(e){let o=await j1(e);if(o!==zo){if(t=o,t&&Mo(t))return jo(t);let r=await M1(e);if(r&&Mo(r))return jo(r);t=r??t}}let i=await _1();if(i&&Mo(i))return jo(i);let n=t??i??a;if(n?.accessToken)return _o=void 0,jo(n);throw new Error("Unable to obtain a Spotify access token")}var z1=()=>{let a=vy();if(a&&Mo(a))return Promise.resolve(jo(a));if(Pi&&Mo(Pi))return Promise.resolve(Pi.accessToken);if(Pi=void 0,is)return is;let e,t=new Promise((n,o)=>{e=setTimeout(()=>o(new Error("Timed out obtaining a Spotify access token")),ue().token.resolveTimeoutMs)}),i=Promise.race([B1(),t]).finally(()=>{clearTimeout(e),is===i&&(is=void 0)});return is=i,i};function A1(a){let e=a??Pi?.accessToken;e&&(_o=e,Pi?.accessToken===e&&(Pi=void 0))}var N1={OnSpotifyReady:wy,GetSpotifyAccessToken:z1,InvalidateSpotifyAccessToken:A1,get SpotifyVersion(){return Spicetify.Platform.version.split(".").map(a=>Number.parseInt(a,10))}},la=N1;var fn=[],ji={Navigate:a=>{Spicetify.Platform.History.push(a)},GoBack:()=>{fn.length>1?Spicetify.Platform.History.goBack():ji.Navigate({pathname:"/"})},GoBackFrom:a=>{Spicetify.Platform.History.location?.pathname===a&&ji.GoBack()},GetPreviousLocation:()=>fn.length>1?fn[fn.length-2]:null,RecordNavigation:a=>{ji.PushToHistory(a),z.Event.evoke("session:navigation",a)},FilterOutTheSameLocation:a=>{fn=fn.filter(t=>t.pathname!==a.pathname&&t.search!==a?.search&&t.hash!==a?.hash)},PushToHistory:a=>{fn.push(a)},SpicyLyrics:{ParseVersion:a=>{let e=a.match(/(\d+)\.(\d+)\.(\d+)/);if(e!==null)return{Text:e[0],Major:parseInt(e[1]),Minor:parseInt(e[2]),Patch:parseInt(e[3])}},GetCurrentVersion:()=>ji.SpicyLyrics.ParseVersion(Wt.get()),GetLatestVersion:async()=>{},IsOutdated:async()=>{let a=await ji.SpicyLyrics.GetLatestVersion(),e=ji.SpicyLyrics.GetCurrentVersion();return ji.SpicyLyrics.IsBehind(e,a)},IsBehind:(a,e)=>e===void 0||a===void 0?!1:e.Major>a.Major||e.Minor>a.Minor||e.Patch>a.Patch}},ke=ji;var Ly=a=>Math.min(Math.max(a,0),2147483647);function Da(a,e){return Ly(a*(1-e+Math.random()*e*2))}function xy(a){return Ly(Math.random()*a)}var gt=new ee("Query Breaker"),Yt=()=>ue().breaker,R1={openUntil:0,ladderIndex:0,lastTripAt:0,lastProbeAt:0},kn=vo("SpicyLyrics_QueryBreaker_g1",1,R1),me=kn.Items,Qa=class extends Error{retryAfterMs;constructor(e){super(`Request suppressed; retry in ~${Math.round(e/1e3)}s`),this.name="ServiceUnavailableError",this.retryAfterMs=e}},os=0,rs=!1,qd=0,I1=0,Ao=0,No=0;function Cy(a){return rs?a-qd>Yt().probeStaleAfterMs?(gt.warn("Probe never settled, releasing the slot"),rs=!1,Ao=0,!1):!0:!1}function Py(a){if(a.kind!=="normal"){if(a.probeToken!==Ao)return gt.info("Superseded probe settled, ignoring its outcome"),!1;rs=!1,Ao=0}return a.gen!==No?(gt.info("Lease predates a breaker transition, ignoring its outcome"),!1):!0}function q1(){let a=Date.now(),e=!1;me.openUntil-a>Yt().openUntilSanityMs&&(gt.warn("openUntil beyond sanity bound, resetting",me.openUntil),me.openUntil=0,me.ladderIndex=0,me.lastTripAt=0,e=!0),me.lastTripAt>a&&(me.lastTripAt=0,e=!0),me.lastProbeAt>a&&(me.lastProbeAt=0,e=!0),me.ladderIndex>0&&a-me.lastTripAt>Yt().ladderDecayMs&&(gt.info("Ladder decayed back to its first rung"),me.ladderIndex=0,e=!0),e&&kn.SaveChanges()}q1();ty(({breaker:a})=>{let e=Date.now();me.openUntil-e<=a.openUntilSanityMs||(me.openUntil=e+a.openUntilSanityMs,kn.SaveChanges(),gt.info("Open window capped by a new sanity bound"))});function $l(a){return Yt().tripStatuses.includes(a)}function Yl(){return Math.max(0,me.openUntil-Date.now())}function Vd(){return Yl()>0}function jy(a){let e=Date.now();if(e=Yt().failureThreshold&&Ty(e)}}function Ty(a){let e=Date.now(),{ladderMs:t,ladderJitterRatio:i,openUntilSanityMs:n}=Yt(),o=t[Math.min(me.ladderIndex,t.length-1)],r=Math.min(a??Da(o,i),n);me.openUntil=e+r,me.lastTripAt=e,me.ladderIndex=Math.min(me.ladderIndex+1,t.length-1),No+=1,os=0,kn.SaveChanges(),gt.warn(`Breaker open for ${Math.round(r/1e3)}s`,{ladderIndex:me.ladderIndex,fromHeader:a!==void 0})}function _y(a){if(!a)return;let e=Number(a);if(Number.isFinite(e)&&e>0)return e*1e3;let t=Date.parse(a);if(Number.isNaN(t))return;let i=t-Date.now();return i>0?i:void 0}var By={state:()=>({...me,open:Vd(),retryAfterMs:Yl()}),reset:()=>{me.openUntil=0,me.ladderIndex=0,me.lastTripAt=0,me.lastProbeAt=0,os=0,rs=!1,qd=0,Ao=0,No+=1,kn.SaveChanges(),gt.info("Breaker manually reset")}};var ft=new ee("API Query"),Ro=class extends Error{status;retryAfterMs;constructor(e,t){super(`Request failed with status ${e}`),this.name="QueryHttpError",this.status=e,this.retryAfterMs=t}},Io=class extends Error{constructor(e){super("Request failed before a response could be read"),this.name="QueryNetworkError",this.cause=e}};async function qo(a,e={},t={}){let i=fy.lyrics.api.url,n=ke.SpicyLyrics.GetCurrentVersion(),o=jy(t.probe===!0);ft.info("Sending API query request",{queries:a,host:i,clientVersion:n?.Text,headers:e});let r=new AbortController,s=setTimeout(()=>r.abort(),ue().query.requestTimeoutMs);try{let l;try{l=await fetch(`${i}/query`,{method:"POST",signal:r.signal,headers:{"X-mode":"2","Content-Type":"application/json","SpicyLyrics-Version":n?.Text??"",...e},body:JSON.stringify({queries:a,client:{version:n?.Text??"unknown"}})})}catch(c){throw Dd(o),new Io(c)}if(ft.info("Received response",{status:l.status}),$l(l.status)){let c=_y(l.headers.get("Retry-After"));throw Dd(o,c),ft.error(`Request refused with status ${l.status}`),new Ro(l.status,c)}if(My(o),!l.ok)throw ft.error(`Request failed with status ${l.status}`),new Ro(l.status);let u;try{u=await l.json()}catch(c){throw r.signal.aborted?new Io(c):c}ft.debug("Response data",u);let d=new Map;for(let c of u.queries)d.set(c.operationId,c.result),ft.debug("Query result set",{operationId:c.operationId,result:c.result});return{get(c){ft.debug("Attempting to retrieve query result for operationId",c);let p=d.get(c);return p?ft.debug("Query result retrieved for operationId",c,p):ft.warn("Query result not found for operationId",c,Array.from(d.keys())),p}}}catch(l){throw ft.error("Query error",l),l}finally{clearTimeout(s)}}var fa={iso9:{\u0410:"A",\u0430:"a",\u04D2:"\xC4",\u04D3:"\xE4",\u04D2\u0304:"\u1EA0\u0308",\u04D3\u0304:"\u1EA1\u0308",\u04D0:"\u0102",\u04D1:"\u0103",\u0410\u0304:"\u0100",\u0430\u0304:"\u0101",\u04D4:"\xC6",\u04D5:"\xE6",\u0410\u0301:"\xC1",\u0430\u0301:"\xE1",\u0410\u030A:"\xC5",\u0430\u030A:"\xE5",\u0411:"B",\u0431:"b",\u0412:"V",\u0432:"v",\u0413:"G",\u0433:"g",\u0490:"G\u0300",\u0491:"g\u0300",\u0403:"\u01F4",\u0453:"\u01F5",\u0492:"\u0120",\u0493:"\u0121",\u0494:"\u011E",\u0495:"\u011F",\u04BA:"\u1E24",\u04BB:"\u1E25",\u0414:"D",\u0434:"d",\u0402:"\u0110",\u0452:"\u0111",\u0415:"E",\u0435:"e",\u04D6:"\u0114",\u04D7:"\u0115",\u0401:"\xCB",\u0451:"\xEB",\u0404:"\xCA",\u0454:"\xEA",\u0416:"\u017D",\u0436:"\u017E",\u0496:"\u017D\u0327",\u0497:"\u017E\u0327",\u04DC:"Z\u0304",\u04DD:"z\u0304",\u04C1:"Z\u0306",\u04C2:"z\u0306",\u0417:"Z",\u0437:"z",\u04DE:"Z\u0308",\u04DF:"z\u0308",\u04E0:"\u0179",\u04E1:"\u017A",\u0405:"\u1E90",\u0455:"\u1E91",\u0418:"I",\u0438:"i",\u04E2:"\u012A",\u04E3:"\u012B",\u0418\u0301:"\xCD",\u0438\u0301:"\xED",\u04E4:"\xCE",\u04E5:"\xEE",\u0419:"J",\u0439:"j",\u0406:"\xCC",\u0456:"\xEC",\u0407:"\xCF",\u0457:"\xEF",\u0406\u0304:"\u01CF",\u0456\u0304:"\u01D0",\u0408:"J\u030C",\u0458:"\u01F0",\u0408\u0335:"J\u0301",\u0458\u0335:"j\u0301",\u041A:"K",\u043A:"k",\u040C:"\u1E30",\u045C:"\u1E31",\u04C3:"\u1E32",\u04C4:"\u1E33",\u049C:"K\u0302",\u049D:"k\u0302",\u04A0:"\u01E8",\u04A1:"\u01E9",\u049E:"K\u0304",\u049F:"k\u0304",\u049A:"\u0136",\u049B:"\u0137",\u041A\u0328:"K\u0300",\u043A\u0328:"k\u0300","\u051A":"Q","\u051B":"q",\u041B:"L",\u043B:"l",\u0409:"L\u0302",\u0459:"l\u0302","\u0520":"\u013B","\u0521":"\u013C",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u040A:"N\u0302",\u045A:"n\u0302",\u04A2:"\u0145",\u04A3:"\u0146","\u04C9":"\u1E46","\u04CA":"\u1E47",\u04A4:"\u1E44",\u04A5:"\u1E45","\u050A":"\u01F8","\u050B":"\u01F9","\u0522":"\u0143","\u0523":"\u0144",\u04C7:"\u0147",\u04C8:"\u0148",\u041D\u0304:"N\u0304",\u043D\u0304:"n\u0304",\u041E:"O",\u043E:"o",\u04E6:"\xD6",\u04E7:"\xF6",\u04E8:"\xD4",\u04E9:"\xF4",\u04EA:"\u0150",\u04EB:"\u0151",\u04E6\u0304:"\u1ECC\u0308",\u043E\u0304\u0308:"\u1ECD\u0308",\u04A8:"\xD2",\u04A9:"\xF2",\u041E\u0301:"\xD3",\u043E\u0301:"\xF3",\u041E\u0304:"\u014C",\u043E\u0304:"\u014D",\u0152:"\u0152",\u0153:"\u0153",\u041F:"P",\u043F:"p",\u04A6:"\u1E54",\u04A7:"\u1E55","\u0524":"P\u0300","\u0525":"p\u0300",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u04AA:"\u015E",\u04AB:"\u015F",\u0421\u0300:"S\u0300",\u0441\u0300:"s\u0300",\u0422:"T",\u0442:"t",\u040B:"\u0106",\u045B:"\u0107","\u050E":"T\u0300","\u050F":"t\u0300",\u0422\u030C:"\u0164",\u0442\u030C:"\u0165",\u04AC:"\u0162",\u04AD:"\u0163",\u0423:"U",\u0443:"u",\u04F0:"\xDC",\u04F1:"\xFC",\u04EE:"\u016A",\u04EF:"\u016B",\u040E:"\u016C",\u045E:"\u016D",\u04F2:"\u0170",\u04F3:"\u0171",\u0423\u0301:"\xDA",\u0443\u0301:"\xFA",\u04F0\u0304:"\u1EE4\u0308",\u04F1\u0304:"\u1EE5\u0308",\u04AE:"\xD9",\u04AF:"\xF9",\u04B0:"U\u0307",\u04B1:"u\u0307","\u051C":"W","\u051D":"w",\u0424:"F",\u0444:"f",\u0425:"H",\u0445:"h",\u04B2:"\u1E28",\u04B3:"\u1E29",\u0426:"C",\u0446:"c",\u04B4:"C\u0304",\u04B5:"c\u0304",\u040F:"D\u0302",\u045F:"d\u0302",\u0427:"\u010C",\u0447:"\u010D",\u04B6:"\xC7",\u04B7:"\xE7",\u04CB:"C\u0323",\u04CC:"c\u0323",\u04F4:"C\u0308",\u04F5:"c\u0308",\u04B8:"\u0108",\u04B9:"\u0109",\u0427\u0300:"C\u0300",\u0447\u0300:"c\u0300",\u04BC:"C\u0306",\u04BD:"c\u0306",\u04BE:"C\u0328\u0306",\u04BF:"c\u0328\u0306",\u0428:"\u0160",\u0448:"\u0161",\u0429:"\u015C",\u0449:"\u015D",\u042A:"\u02BA",\u044A:"\u02BA",\u042B:"Y",\u044B:"y",\u04F8:"\u0178",\u04F9:"\xFF",\u042B\u0304:"\u0232",\u044B\u0304:"\u0233",\u042C:"\u02B9",\u044C:"\u02B9",\u042D:"\xC8",\u044D:"\xE8",\u04D8:"A\u030B",\u04D9:"a\u030B",\u04DA:"\xC0",\u04DB:"\xE0",\u042E:"\xDB",\u044E:"\xFB",\u042E\u0304:"\xDB\u0304",\u044E\u0304:"\xFB\u0304",\u042F:"\xC2",\u044F:"\xE2",\u0462:"\u011A",\u0463:"\u011B",\u046A:"\u01CD",\u046B:"\u01CE",\u0472:"F\u0300",\u0473:"f\u0300",\u0474:"\u1EF2",\u0475:"\u1EF3",\u04C0:"\u2021"},alalc:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",\u0412:"V",\u0432:"v",\u0413:"G",\u0433:"g",\u0414:"D",\u0434:"d",\u0415:"E",\u0435:"e",\u0401:"\xCB",\u0451:"\xEB",\u0416:"Zh",\u0436:"zh",\u0417:"Z",\u0437:"z",\u0418:"I",\u0438:"i",\u0419:"\u012C",\u0439:"\u012D",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u041E:"O",\u043E:"o",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0422:"T",\u0442:"t",\u0423:"U",\u0443:"u",\u0424:"F",\u0444:"f",\u0425:"Kh",\u0445:"kh",\u0426:"T\u0361S",\u0446:"t\u0361s",\u0427:"Ch",\u0447:"ch",\u0428:"Sh",\u0448:"sh",\u0429:"Shh",\u0449:"shh",\u042A:"\u02BA",\u044A:"\u02BA",\u042B:"Y",\u044B:"y",\u042C:"\u02B9",\u044C:"\u02B9",\u042D:"\u0116",\u044D:"\u0117",\u042E:"I\u0361U",\u044E:"i\u0361u",\u042F:"I\u0361A",\u044F:"i\u0361a",\u0406:"\u0406\u0304",\u0456:"\u012B",\u0462:"I\u0361E",\u0463:"i\u0361e",\u0472:"\u1E1E",\u0473:"\u1E1F",\u0474:"\u1E8E",\u0475:"\u1E8F"},azerbaijani:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",\u0412:"V",\u0432:"v",\u0413:"Q",\u0433:"q",\u0492:"\u011E",\u0493:"\u011F",\u0414:"D",\u0434:"d",\u0415:"Ye",\u0435:"ye",\u04D8:"\u018F",\u04D9:"\u0259",\u0416:"J",\u0436:"j",\u0417:"Z",\u0437:"z",\u0418:"\u0130",\u0438:"i",\u0419:"Y",\u0439:"y",\u041A:"K",\u043A:"k",\u049C:"G",\u049D:"g",\u041B:"L",\u043B:"l",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u041E:"O",\u043E:"o",\u04E8:"\xD6",\u04E9:"\xF6",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0422:"T",\u0442:"t",\u0423:"U",\u0443:"u",\u04AE:"\xDC",\u04AF:"\xFC",\u0424:"F",\u0444:"f",\u0425:"X",\u0445:"x",\u04BA:"H",\u04BB:"h",\u0427:"\xC7",\u0447:"\xE7",\u04B8:"C",\u04B9:"c",\u0428:"\u015E",\u0448:"\u015F",\u042B:"I",\u044B:"\u0131",\u042D:"E",\u044D:"e",\u042E:"Yu",\u044E:"yu",\u042F:"Ya",\u044F:"ja"},bulgarian:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",\u0412:"V",\u0432:"v",\u0413:"G",\u0433:"g",\u0414:"D",\u0434:"d",\u0415:"E",\u0435:"e",\u0416:"Zh",\u0436:"zh",\u0417:"Z",\u0437:"z",\u0418:"I",\u0438:"i",\u040D:"I",\u045D:"i",\u0419:"Y",\u0439:"y",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u041E:"O",\u043E:"o",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0422:"T",\u0442:"t",\u0423:"U",\u0443:"u",\u0424:"F",\u0444:"f",\u0425:"H",\u0445:"h",\u0426:"Ts",\u0446:"ts",\u0427:"Ch",\u0447:"ch",\u0428:"Sh",\u0448:"sh",\u0429:"Sht",\u0449:"sht",\u042A:"A",\u044A:"a",\u042C:"Y",\u044C:"y",\u042E:"Yu",\u044E:"yu",\u042F:"Ya",\u044F:"ya"},kazakh:{\u0410:"A",\u0430:"a",\u04D8:"\xC4",\u04D9:"\xE4",\u0411:"B",\u0431:"b",\u0414:"D",\u0434:"d",\u0415:"E",\u0435:"e",\u0424:"F",\u0444:"f",\u0413:"G",\u0433:"g",\u0492:"\u011E",\u0493:"\u011F",\u0425:"H",\u0445:"h",\u04BA:"H",\u04BB:"h",I:"I",\u0131:"i",\u0130:"I",\u0456:"\u0131",\u0416:"J",\u0436:"j",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u04A2:"\xD1",\u04A3:"\xF1",\u041E:"O",\u043E:"o",\u04E8:"\xD6",\u04E9:"\xF6",\u041F:"P",\u043F:"p",\u049A:"Q",\u049B:"q",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0428:"\u015E",\u0448:"\u015F",\u0422:"T",\u0442:"t",\u0423:"U",\u0443:"u",\u04B0:"\u016A",\u04B1:"\u016B",\u04AE:"\xDC",\u04AF:"\xFC",\u0412:"V",\u0432:"v",\u042B:"Y",\u044B:"y",\u0417:"Z",\u0437:"z"},macedonian:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",\u0412:"V",\u0432:"v",\u0413:"G",\u0433:"g",\u0414:"D",\u0434:"d",\u0403:"Gj",\u0453:"gj",\u0415:"E",\u0435:"e",\u0416:"Zh",\u0436:"zh",\u0417:"Z",\u0437:"z",\u0405:"Dz",\u0455:"dz",\u0418:"I",\u0438:"i",\u0408:"J",\u0458:"j",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u0409:"Lj",\u0459:"lj",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u040A:"Nj",\u045A:"nj",\u041E:"O",\u043E:"o",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0422:"T",\u0442:"t",\u040C:"Kj",\u045C:"kj",\u0423:"U",\u0443:"u",\u0424:"F",\u0444:"f",\u0425:"H",\u0445:"h",\u0426:"C",\u0446:"c",\u0427:"Ch",\u0447:"ch",\u040F:"Dzh",\u045F:"dzh",\u0428:"Sh",\u0448:"sh"},mongolian:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",\u0412:"V",\u0432:"v",\u0413:"G",\u0433:"g",\u0414:"D",\u0434:"d",\u0415:"Ye",\u0435:"ye",\u0401:"Yo",\u0451:"yo",\u0416:"J",\u0436:"j",\u0417:"Z",\u0437:"z",\u0418:"I",\u0438:"i",\u0419:"I",\u0439:"i",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u041E:"O",\u043E:"o",\u04E8:"\xD6",\u04E9:"\xF6",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0422:"T",\u0442:"t",\u0423:"U",\u0443:"u",\u04AE:"\xDC",\u04AF:"\xFC",\u0424:"F",\u0444:"f",\u0425:"Kh",\u0445:"kh",\u0426:"Ts",\u0446:"ts",\u0427:"Ch",\u0447:"ch",\u0428:"Sh",\u0448:"sh",\u0429:"Sh",\u0449:"sh",\u042A:"I",\u044A:"i",\u042B:"Y",\u044B:"y",\u042C:"I",\u044C:"i",\u042D:"E",\u044D:"e",\u042E:"Yu",\u044E:"yu",\u042F:"Ya",\u044F:"ya"},montenegrin:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",\u0412:"V",\u0432:"v",\u0413:"G",\u0433:"g",\u0414:"D",\u0434:"d",\u0402:"\u0110",\u0452:"\u0111",\u0415:"E",\u0435:"e",\u0416:"\u017D",\u0436:"\u017E",\u0417:"Z",\u0437:"z",\u0417\u0301:"\u0179",\u0437\u0301:"\u017A",\u0418:"I",\u0438:"i",\u0408:"J",\u0458:"j",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u0409:"Lj",\u0459:"lj",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u040A:"Nj",\u045A:"nj",\u041E:"O",\u043E:"o",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0421\u0301:"\u015A",\u0441\u0301:"\u015B",\u0422:"T",\u0442:"t",\u040B:"\u0106",\u045B:"\u0107",\u0423:"U",\u0443:"u",\u0424:"F",\u0444:"f",\u0425:"H",\u0445:"h",\u0426:"C",\u0446:"c",\u0427:"\u010C",\u0447:"\u010D",\u040F:"D\u017E",\u045F:"d\u017E",\u0428:"\u0160",\u0448:"\u0161"},russian:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",\u0412:"V",\u0432:"v",\u0413:"G",\u0433:"g",\u0414:"D",\u0434:"d",\u0415:"E",\u0435:"e",\u0401:"Yo",\u0451:"yo",\u0416:"Zh",\u0436:"zh",\u0417:"Z",\u0437:"z",\u0418:"I",\u0438:"i",\u0419:"J",\u0439:"j",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u041E:"O",\u043E:"o",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0422:"T",\u0442:"t",\u0423:"U",\u0443:"u",\u0424:"F",\u0444:"f",\u0425:"X",\u0445:"x",\u0426:"Cz",\u0446:"cz",\u0427:"Ch",\u0447:"ch",\u0428:"Sh",\u0448:"sh",\u0429:"Shh",\u0449:"shh",\u042A:"\u02BA",\u044A:"\u02BA",\u042B:"Y",\u044B:"y",\u042C:"\u02B9",\u044C:"\u02B9",\u042D:"E",\u044D:"e",\u042E:"Yu",\u044E:"yu",\u042F:"Ya",\u044F:"ya"},serbian:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",\u0412:"V",\u0432:"v",\u0413:"G",\u0433:"g",\u0414:"D",\u0434:"d",\u0402:"\u0110",\u0452:"\u0111",\u0415:"E",\u0435:"e",\u0416:"\u017D",\u0436:"\u017E",\u0417:"Z",\u0437:"z",\u0418:"I",\u0438:"i",\u0408:"J",\u0458:"j",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u0409:"Lj",\u0459:"lj",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u040A:"Nj",\u045A:"nj",\u041E:"O",\u043E:"o",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0422:"T",\u0442:"t",\u040B:"\u0106",\u045B:"\u0107",\u0423:"U",\u0443:"u",\u0424:"F",\u0444:"f",\u0425:"H",\u0445:"h",\u0426:"C",\u0446:"c",\u0427:"\u010C",\u0447:"\u010D",\u040F:"D\u017E",\u045F:"d\u017E",\u0428:"\u0160",\u0448:"\u0161"},turkmen:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",\u0412:"W",\u0432:"w",\u0413:"G",\u0433:"g",\u0414:"D",\u0434:"d",\u0415:"E",\u0435:"e",\u0401:"\xDDo",\u0451:"\xFDo",\u0416:"\u017D",\u0436:"\u017E",\u0496:"J",\u0497:"j",\u0417:"Z",\u0437:"z",\u0418:"I",\u0438:"i",\u0419:"\xDD",\u0439:"\xFD",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u04A2:"\u0147",\u04A3:"\u0148",\u041E:"O",\u043E:"o",\u04E8:"\xD6",\u04E9:"\xF6",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0422:"T",\u0442:"t",\u0423:"U",\u0443:"u",\u04AE:"\xDC",\u04AF:"\xFC",\u0424:"F",\u0444:"f",\u0425:"H",\u0445:"h",\u0426:"S",\u0446:"s",\u0427:"\xC7",\u0447:"\xE7",\u0428:"\u015E",\u0448:"\u015F",\u0429:"\u015E\xE7",\u0449:"\u015F\xE7",\u042A:"",\u044A:"",\u042B:"Y",\u044B:"y",\u042C:"",\u044C:"",\u042D:"E",\u044D:"e",\u042E:"\xDDu",\u044E:"\xFDu",\u04D8:"\xC4",\u04D9:"\xE4",\u042F:"\xDDa",\u044F:"\xFDa"},ukrainian:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",\u0412:"V",\u0432:"v",\u0413:"H",\u0433:"h",\u0490:"G",\u0491:"g",\u0414:"D",\u0434:"d",\u0415:"E",\u0435:"e",\u0404:"Ie",\u0454:"ie",\u0416:"Zh",\u0436:"zh",\u0417:"Z",\u0437:"z",\u0418:"Y",\u0438:"y",\u0406:"I",\u0456:"i",\u0407:"I",\u0457:"i",\u0419:"I",\u0439:"i",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u041E:"O",\u043E:"o",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0422:"T",\u0442:"t",\u0423:"U",\u0443:"u",\u0424:"F",\u0444:"f",\u0425:"Kh",\u0445:"kh",\u0426:"Ts",\u0446:"ts",\u0427:"Ch",\u0447:"ch",\u0428:"Sh",\u0448:"sh",\u0429:"Shh",\u0449:"shh",\u042E:"Iu",\u044E:"iu",\u042F:"Ia",\u044F:"ia"},uzbek:{\u0410:"A",\u0430:"a",\u0411:"B",\u0431:"b",B:"V",\u0432:"v",\u0413:"G",\u0433:"g",\u0414:"D",\u0434:"d",\u0415:"E",\u0435:"e",\u0401:"Yo",\u0451:"yo",\u0416:"J",\u0436:"j",\u0417:"Z",\u0437:"z",\u0418:"I",\u0438:"i",\u0419:"Y",\u0439:"y",\u041A:"K",\u043A:"k",\u041B:"L",\u043B:"l",\u041C:"M",\u043C:"m",\u041D:"N",\u043D:"n",\u041E:"O",\u043E:"o",\u041F:"P",\u043F:"p",\u0420:"R",\u0440:"r",\u0421:"S",\u0441:"s",\u0422:"T",\u0442:"t",\u0423:"U",\u0443:"u",\u0424:"F",\u0444:"f",\u0425:"X",\u0445:"x",\u0426:"S",\u0446:"s",\u0427:"C",\u0447:"c",\u0428:"\u015E",\u0448:"\u015F",\u042A:"\u02BC",\u044A:"\u02BC",\u042C:"",\u044C:"",\u042D:"E",\u044D:"e",\u042E:"Yu",\u044E:"yu",\u042F:"Ya",\u044F:"ya",\u040E:"\xD5",\u045E:"\xF5",\u049A:"Q",\u049B:"q",\u0492:"\u011E",\u0493:"\u011F",\u04B2:"H",\u04B3:"h"}};function Fd(a,e){let t="";e==="bul"&&(a=a.replace(/ия(?=$|[\s.,])/gi,"ia")),e==="ukr"&&(a=a.replace(/(?t&&(t=o,i=n)}return[i,t]}function Q1(a,e){let t=a.match(e);return(t?t.length:0)/a.length||0}function eL(a,e,t,i){e=tL(e,t,i);let n=[],o;if(e)for(o in e)Xl.call(e,o)&&n.push([o,aL(a,e[o])]);return n.length===0?Od():n.sort(iL)}function aL(a,e){let t=0,i=-1;for(;++i="\u3040"&&a<="\u309F"},bn=function(a){return a=a[0],a>="\u30A0"&&a<="\u30FF"},cs=function(a){return ls(a)||bn(a)},Kt=function(a){return a=a[0],a>="\u4E00"&&a<="\u9FCF"||a>="\uF900"&&a<="\uFAFF"||a>="\u3400"&&a<="\u4DBF"},Hd=function(a){return cs(a)||Kt(a)},Gd=function(a){for(let e=0;ee>"\u30A0"&&e<"\u30F7"?String.fromCharCode(e.charCodeAt(0)+-96):e).join("")},Mi=function(a){return[...a].map(e=>e>"\u3040"&&e<"\u3097"?String.fromCharCode(e.charCodeAt(0)+96):e).join("")},us=function(a,e){e=e||ka.HEPBURN;let t={nippon:{"\uFF11":"1","\uFF12":"2","\uFF13":"3","\uFF14":"4","\uFF15":"5","\uFF16":"6","\uFF17":"7","\uFF18":"8","\uFF19":"9","\uFF10":"0","\uFF01":"!","\u201C":'"',"\u201D":'"',"\uFF03":"#","\uFF04":"$","\uFF05":"%","\uFF06":"&","\u2019":"'","\uFF08":"(","\uFF09":")","\uFF1D":"=","\uFF5E":"~","\uFF5C":"|","\uFF20":"@","\u2018":"`","\uFF0B":"+","\uFF0A":"*","\uFF1B":";","\uFF1A":":","\uFF1C":"<","\uFF1E":">","\u3001":",","\u3002":".","\uFF0F":"/","\uFF1F":"?","\uFF3F":"_","\u30FB":"\uFF65","\u300C":'"',"\u300D":'"',"\uFF5B":"{","\uFF5D":"}","\uFFE5":"\\","\uFF3E":"^",\u3042:"a",\u3044:"i",\u3046:"u",\u3048:"e",\u304A:"o",\u30A2:"a",\u30A4:"i",\u30A6:"u",\u30A8:"e",\u30AA:"o",\u304B:"ka",\u304D:"ki",\u304F:"ku",\u3051:"ke",\u3053:"ko",\u30AB:"ka",\u30AD:"ki",\u30AF:"ku",\u30B1:"ke",\u30B3:"ko",\u3055:"sa",\u3057:"si",\u3059:"su",\u305B:"se",\u305D:"so",\u30B5:"sa",\u30B7:"si",\u30B9:"su",\u30BB:"se",\u30BD:"so",\u305F:"ta",\u3061:"ti",\u3064:"tu",\u3066:"te",\u3068:"to",\u30BF:"ta",\u30C1:"ti",\u30C4:"tu",\u30C6:"te",\u30C8:"to",\u306A:"na",\u306B:"ni",\u306C:"nu",\u306D:"ne",\u306E:"no",\u30CA:"na",\u30CB:"ni",\u30CC:"nu",\u30CD:"ne",\u30CE:"no",\u306F:"ha",\u3072:"hi",\u3075:"hu",\u3078:"he",\u307B:"ho",\u30CF:"ha",\u30D2:"hi",\u30D5:"hu",\u30D8:"he",\u30DB:"ho",\u307E:"ma",\u307F:"mi",\u3080:"mu",\u3081:"me",\u3082:"mo",\u30DE:"ma",\u30DF:"mi",\u30E0:"mu",\u30E1:"me",\u30E2:"mo",\u3084:"ya",\u3086:"yu",\u3088:"yo",\u30E4:"ya",\u30E6:"yu",\u30E8:"yo",\u3089:"ra",\u308A:"ri",\u308B:"ru",\u308C:"re",\u308D:"ro",\u30E9:"ra",\u30EA:"ri",\u30EB:"ru",\u30EC:"re",\u30ED:"ro",\u308F:"wa",\u3090:"wi",\u3091:"we",\u3092:"wo",\u30EF:"wa",\u30F0:"wi",\u30F1:"we",\u30F2:"wo",\u304C:"ga",\u304E:"gi",\u3050:"gu",\u3052:"ge",\u3054:"go",\u30AC:"ga",\u30AE:"gi",\u30B0:"gu",\u30B2:"ge",\u30B4:"go",\u3056:"za",\u3058:"zi",\u305A:"zu",\u305C:"ze",\u305E:"zo",\u30B6:"za",\u30B8:"zi",\u30BA:"zu",\u30BC:"ze",\u30BE:"zo",\u3060:"da",\u3062:"di",\u3065:"du",\u3067:"de",\u3069:"do",\u30C0:"da",\u30C2:"di",\u30C5:"du",\u30C7:"de",\u30C9:"do",\u3070:"ba",\u3073:"bi",\u3076:"bu",\u3079:"be",\u307C:"bo",\u30D0:"ba",\u30D3:"bi",\u30D6:"bu",\u30D9:"be",\u30DC:"bo",\u3071:"pa",\u3074:"pi",\u3077:"pu",\u307A:"pe",\u307D:"po",\u30D1:"pa",\u30D4:"pi",\u30D7:"pu",\u30DA:"pe",\u30DD:"po",\u304D\u3083:"kya",\u304D\u3085:"kyu",\u304D\u3087:"kyo",\u3057\u3083:"sya",\u3057\u3085:"syu",\u3057\u3087:"syo",\u3061\u3083:"tya",\u3061\u3085:"tyu",\u3061\u3087:"tyo",\u306B\u3083:"nya",\u306B\u3085:"nyu",\u306B\u3087:"nyo",\u3072\u3083:"hya",\u3072\u3085:"hyu",\u3072\u3087:"hyo",\u307F\u3083:"mya",\u307F\u3085:"myu",\u307F\u3087:"myo",\u308A\u3083:"rya",\u308A\u3085:"ryu",\u308A\u3087:"ryo",\u30AD\u30E3:"kya",\u30AD\u30E5:"kyu",\u30AD\u30E7:"kyo",\u30B7\u30E3:"sya",\u30B7\u30E5:"syu",\u30B7\u30E7:"syo",\u30C1\u30E3:"tya",\u30C1\u30E5:"tyu",\u30C1\u30E7:"tyo",\u30CB\u30E3:"nya",\u30CB\u30E5:"nyu",\u30CB\u30E7:"nyo",\u30D2\u30E3:"hya",\u30D2\u30E5:"hyu",\u30D2\u30E7:"hyo",\u30DF\u30E3:"mya",\u30DF\u30E5:"myu",\u30DF\u30E7:"myo",\u30EA\u30E3:"rya",\u30EA\u30E5:"ryu",\u30EA\u30E7:"ryo",\u304E\u3083:"gya",\u304E\u3085:"gyu",\u304E\u3087:"gyo",\u3058\u3083:"zya",\u3058\u3085:"zyu",\u3058\u3087:"zyo",\u3062\u3083:"dya",\u3062\u3085:"dyu",\u3062\u3087:"dyo",\u3073\u3083:"bya",\u3073\u3085:"byu",\u3073\u3087:"byo",\u3074\u3083:"pya",\u3074\u3085:"pyu",\u3074\u3087:"pyo",\u304F\u308E:"kwa",\u3050\u308E:"gwa",\u30AE\u30E3:"gya",\u30AE\u30E5:"gyu",\u30AE\u30E7:"gyo",\u30B8\u30E3:"zya",\u30B8\u30E5:"zyu",\u30B8\u30E7:"zyo",\u30C2\u30E3:"dya",\u30C2\u30E5:"dyu",\u30C2\u30E7:"dyo",\u30D3\u30E3:"bya",\u30D3\u30E5:"byu",\u30D3\u30E7:"byo",\u30D4\u30E3:"pya",\u30D4\u30E5:"pyu",\u30D4\u30E7:"pyo",\u30AF\u30EE:"kwa",\u30B0\u30EE:"gwa",\u3041:"a",\u3043:"i",\u3045:"u",\u3047:"e",\u3049:"o",\u3083:"ya",\u3085:"yu",\u3087:"yo",\u308E:"wa",\u30A1:"a",\u30A3:"i",\u30A5:"u",\u30A7:"e",\u30A9:"o",\u30E3:"ya",\u30E5:"yu",\u30E7:"yo",\u30EE:"wa",\u30F5:"ka",\u30F6:"ke",\u3093:"n",\u30F3:"n","\u3000":" ",\u3044\u3047:"ye",\u304D\u3047:"kye",\u304F\u3043:"kwi",\u304F\u3047:"kwe",\u304F\u3049:"kwo",\u3050\u3043:"gwi",\u3050\u3047:"gwe",\u3050\u3049:"gwo",\u30A4\u30A7:"ye",\u30AD\u30A7:"kya",\u30AF\u30A3:"kwi",\u30AF\u30A7:"kwe",\u30AF\u30A9:"kwo",\u30B0\u30A3:"gwi",\u30B0\u30A7:"gwe",\u30B0\u30A9:"gwo",\u3057\u3047:"sye",\u3058\u3047:"zye",\u3059\u3043:"swi",\u305A\u3043:"zwi",\u3061\u3047:"tye",\u3064\u3041:"twa",\u3064\u3043:"twi",\u3064\u3047:"twe",\u3064\u3049:"two",\u306B\u3047:"nye",\u3072\u3047:"hye",\u3075\u3041:"hwa",\u3075\u3043:"hwi",\u3075\u3047:"hwe",\u3075\u3049:"hwo",\u3075\u3085:"hwyu",\u3075\u3087:"hwyo",\u30B7\u30A7:"sye",\u30B8\u30A7:"zye",\u30B9\u30A3:"swi",\u30BA\u30A3:"zwi",\u30C1\u30A7:"tye",\u30C4\u30A1:"twa",\u30C4\u30A3:"twi",\u30C4\u30A7:"twe",\u30C4\u30A9:"two",\u30CB\u30A7:"nye",\u30D2\u30A7:"hye",\u30D5\u30A1:"hwa",\u30D5\u30A3:"hwi",\u30D5\u30A7:"hwe",\u30D5\u30A9:"hwo",\u30D5\u30E5:"hwyu",\u30D5\u30E7:"hwyo"},passport:{"\uFF11":"1","\uFF12":"2","\uFF13":"3","\uFF14":"4","\uFF15":"5","\uFF16":"6","\uFF17":"7","\uFF18":"8","\uFF19":"9","\uFF10":"0","\uFF01":"!","\u201C":'"',"\u201D":'"',"\uFF03":"#","\uFF04":"$","\uFF05":"%","\uFF06":"&","\u2019":"'","\uFF08":"(","\uFF09":")","\uFF1D":"=","\uFF5E":"~","\uFF5C":"|","\uFF20":"@","\u2018":"`","\uFF0B":"+","\uFF0A":"*","\uFF1B":";","\uFF1A":":","\uFF1C":"<","\uFF1E":">","\u3001":",","\u3002":".","\uFF0F":"/","\uFF1F":"?","\uFF3F":"_","\u30FB":"\uFF65","\u300C":'"',"\u300D":'"',"\uFF5B":"{","\uFF5D":"}","\uFFE5":"\\","\uFF3E":"^",\u3042:"a",\u3044:"i",\u3046:"u",\u3048:"e",\u304A:"o",\u30A2:"a",\u30A4:"i",\u30A6:"u",\u30A8:"e",\u30AA:"o",\u304B:"ka",\u304D:"ki",\u304F:"ku",\u3051:"ke",\u3053:"ko",\u30AB:"ka",\u30AD:"ki",\u30AF:"ku",\u30B1:"ke",\u30B3:"ko",\u3055:"sa",\u3057:"shi",\u3059:"su",\u305B:"se",\u305D:"so",\u30B5:"sa",\u30B7:"shi",\u30B9:"su",\u30BB:"se",\u30BD:"so",\u305F:"ta",\u3061:"chi",\u3064:"tsu",\u3066:"te",\u3068:"to",\u30BF:"ta",\u30C1:"chi",\u30C4:"tsu",\u30C6:"te",\u30C8:"to",\u306A:"na",\u306B:"ni",\u306C:"nu",\u306D:"ne",\u306E:"no",\u30CA:"na",\u30CB:"ni",\u30CC:"nu",\u30CD:"ne",\u30CE:"no",\u306F:"ha",\u3072:"hi",\u3075:"fu",\u3078:"he",\u307B:"ho",\u30CF:"ha",\u30D2:"hi",\u30D5:"fu",\u30D8:"he",\u30DB:"ho",\u307E:"ma",\u307F:"mi",\u3080:"mu",\u3081:"me",\u3082:"mo",\u30DE:"ma",\u30DF:"mi",\u30E0:"mu",\u30E1:"me",\u30E2:"mo",\u3084:"ya",\u3086:"yu",\u3088:"yo",\u30E4:"ya",\u30E6:"yu",\u30E8:"yo",\u3089:"ra",\u308A:"ri",\u308B:"ru",\u308C:"re",\u308D:"ro",\u30E9:"ra",\u30EA:"ri",\u30EB:"ru",\u30EC:"re",\u30ED:"ro",\u308F:"wa",\u3090:"i",\u3091:"e",\u3092:"o",\u30EF:"wa",\u30F0:"i",\u30F1:"e",\u30F2:"o",\u304C:"ga",\u304E:"gi",\u3050:"gu",\u3052:"ge",\u3054:"go",\u30AC:"ga",\u30AE:"gi",\u30B0:"gu",\u30B2:"ge",\u30B4:"go",\u3056:"za",\u3058:"ji",\u305A:"zu",\u305C:"ze",\u305E:"zo",\u30B6:"za",\u30B8:"ji",\u30BA:"zu",\u30BC:"ze",\u30BE:"zo",\u3060:"da",\u3062:"ji",\u3065:"zu",\u3067:"de",\u3069:"do",\u30C0:"da",\u30C2:"ji",\u30C5:"zu",\u30C7:"de",\u30C9:"do",\u3070:"ba",\u3073:"bi",\u3076:"bu",\u3079:"be",\u307C:"bo",\u30D0:"ba",\u30D3:"bi",\u30D6:"bu",\u30D9:"be",\u30DC:"bo",\u3071:"pa",\u3074:"pi",\u3077:"pu",\u307A:"pe",\u307D:"po",\u30D1:"pa",\u30D4:"pi",\u30D7:"pu",\u30DA:"pe",\u30DD:"po",\u304D\u3083:"kya",\u304D\u3085:"kyu",\u304D\u3087:"kyo",\u3057\u3083:"sha",\u3057\u3085:"shu",\u3057\u3087:"sho",\u3061\u3083:"cha",\u3061\u3085:"chu",\u3061\u3087:"cho",\u306B\u3083:"nya",\u306B\u3085:"nyu",\u306B\u3087:"nyo",\u3072\u3083:"hya",\u3072\u3085:"hyu",\u3072\u3087:"hyo",\u307F\u3083:"mya",\u307F\u3085:"myu",\u307F\u3087:"myo",\u308A\u3083:"rya",\u308A\u3085:"ryu",\u308A\u3087:"ryo",\u30AD\u30E3:"kya",\u30AD\u30E5:"kyu",\u30AD\u30E7:"kyo",\u30B7\u30E3:"sha",\u30B7\u30E5:"shu",\u30B7\u30E7:"sho",\u30C1\u30E3:"cha",\u30C1\u30E5:"chu",\u30C1\u30E7:"cho",\u30CB\u30E3:"nya",\u30CB\u30E5:"nyu",\u30CB\u30E7:"nyo",\u30D2\u30E3:"hya",\u30D2\u30E5:"hyu",\u30D2\u30E7:"hyo",\u30DF\u30E3:"mya",\u30DF\u30E5:"myu",\u30DF\u30E7:"myo",\u30EA\u30E3:"rya",\u30EA\u30E5:"ryu",\u30EA\u30E7:"ryo",\u304E\u3083:"gya",\u304E\u3085:"gyu",\u304E\u3087:"gyo",\u3058\u3083:"ja",\u3058\u3085:"ju",\u3058\u3087:"jo",\u3062\u3083:"ja",\u3062\u3085:"ju",\u3062\u3087:"jo",\u3073\u3083:"bya",\u3073\u3085:"byu",\u3073\u3087:"byo",\u3074\u3083:"pya",\u3074\u3085:"pyu",\u3074\u3087:"pyo",\u30AE\u30E3:"gya",\u30AE\u30E5:"gyu",\u30AE\u30E7:"gyo",\u30B8\u30E3:"ja",\u30B8\u30E5:"ju",\u30B8\u30E7:"jo",\u30C2\u30E3:"ja",\u30C2\u30E5:"ju",\u30C2\u30E7:"jo",\u30D3\u30E3:"bya",\u30D3\u30E5:"byu",\u30D3\u30E7:"byo",\u30D4\u30E3:"pya",\u30D4\u30E5:"pyu",\u30D4\u30E7:"pyo",\u3041:"a",\u3043:"i",\u3045:"u",\u3047:"e",\u3049:"o",\u3083:"ya",\u3085:"yu",\u3087:"yo",\u308E:"wa",\u30A1:"a",\u30A3:"i",\u30A5:"u",\u30A7:"e",\u30A9:"o",\u30E3:"ya",\u30E5:"yu",\u30E7:"yo",\u30EE:"wa",\u30F5:"ka",\u30F6:"ke",\u3093:"n",\u30F3:"n","\u3000":" ",\u30F4:"b"},hepburn:{"\uFF11":"1","\uFF12":"2","\uFF13":"3","\uFF14":"4","\uFF15":"5","\uFF16":"6","\uFF17":"7","\uFF18":"8","\uFF19":"9","\uFF10":"0","\uFF01":"!","\u201C":'"',"\u201D":'"',"\uFF03":"#","\uFF04":"$","\uFF05":"%","\uFF06":"&","\u2019":"'","\uFF08":"(","\uFF09":")","\uFF1D":"=","\uFF5E":"~","\uFF5C":"|","\uFF20":"@","\u2018":"`","\uFF0B":"+","\uFF0A":"*","\uFF1B":";","\uFF1A":":","\uFF1C":"<","\uFF1E":">","\u3001":",","\u3002":".","\uFF0F":"/","\uFF1F":"?","\uFF3F":"_","\u30FB":"\uFF65","\u300C":'"',"\u300D":'"',"\uFF5B":"{","\uFF5D":"}","\uFFE5":"\\","\uFF3E":"^",\u3042:"a",\u3044:"i",\u3046:"u",\u3048:"e",\u304A:"o",\u30A2:"a",\u30A4:"i",\u30A6:"u",\u30A8:"e",\u30AA:"o",\u304B:"ka",\u304D:"ki",\u304F:"ku",\u3051:"ke",\u3053:"ko",\u30AB:"ka",\u30AD:"ki",\u30AF:"ku",\u30B1:"ke",\u30B3:"ko",\u3055:"sa",\u3057:"shi",\u3059:"su",\u305B:"se",\u305D:"so",\u30B5:"sa",\u30B7:"shi",\u30B9:"su",\u30BB:"se",\u30BD:"so",\u305F:"ta",\u3061:"chi",\u3064:"tsu",\u3066:"te",\u3068:"to",\u30BF:"ta",\u30C1:"chi",\u30C4:"tsu",\u30C6:"te",\u30C8:"to",\u306A:"na",\u306B:"ni",\u306C:"nu",\u306D:"ne",\u306E:"no",\u30CA:"na",\u30CB:"ni",\u30CC:"nu",\u30CD:"ne",\u30CE:"no",\u306F:"ha",\u3072:"hi",\u3075:"fu",\u3078:"he",\u307B:"ho",\u30CF:"ha",\u30D2:"hi",\u30D5:"fu",\u30D8:"he",\u30DB:"ho",\u307E:"ma",\u307F:"mi",\u3080:"mu",\u3081:"me",\u3082:"mo",\u30DE:"ma",\u30DF:"mi",\u30E0:"mu",\u30E1:"me",\u30E2:"mo",\u3084:"ya",\u3086:"yu",\u3088:"yo",\u30E4:"ya",\u30E6:"yu",\u30E8:"yo",\u3089:"ra",\u308A:"ri",\u308B:"ru",\u308C:"re",\u308D:"ro",\u30E9:"ra",\u30EA:"ri",\u30EB:"ru",\u30EC:"re",\u30ED:"ro",\u308F:"wa",\u3090:"i",\u3091:"e",\u3092:"o",\u30EF:"wa",\u30F0:"i",\u30F1:"e",\u30F2:"o",\u304C:"ga",\u304E:"gi",\u3050:"gu",\u3052:"ge",\u3054:"go",\u30AC:"ga",\u30AE:"gi",\u30B0:"gu",\u30B2:"ge",\u30B4:"go",\u3056:"za",\u3058:"ji",\u305A:"zu",\u305C:"ze",\u305E:"zo",\u30B6:"za",\u30B8:"ji",\u30BA:"zu",\u30BC:"ze",\u30BE:"zo",\u3060:"da",\u3062:"ji",\u3065:"zu",\u3067:"de",\u3069:"do",\u30C0:"da",\u30C2:"ji",\u30C5:"zu",\u30C7:"de",\u30C9:"do",\u3070:"ba",\u3073:"bi",\u3076:"bu",\u3079:"be",\u307C:"bo",\u30D0:"ba",\u30D3:"bi",\u30D6:"bu",\u30D9:"be",\u30DC:"bo",\u3071:"pa",\u3074:"pi",\u3077:"pu",\u307A:"pe",\u307D:"po",\u30D1:"pa",\u30D4:"pi",\u30D7:"pu",\u30DA:"pe",\u30DD:"po",\u304D\u3083:"kya",\u304D\u3085:"kyu",\u304D\u3087:"kyo",\u3057\u3083:"sha",\u3057\u3085:"shu",\u3057\u3087:"sho",\u3061\u3083:"cha",\u3061\u3085:"chu",\u3061\u3087:"cho",\u306B\u3083:"nya",\u306B\u3085:"nyu",\u306B\u3087:"nyo",\u3072\u3083:"hya",\u3072\u3085:"hyu",\u3072\u3087:"hyo",\u307F\u3083:"mya",\u307F\u3085:"myu",\u307F\u3087:"myo",\u308A\u3083:"rya",\u308A\u3085:"ryu",\u308A\u3087:"ryo",\u30AD\u30E3:"kya",\u30AD\u30E5:"kyu",\u30AD\u30E7:"kyo",\u30B7\u30E3:"sha",\u30B7\u30E5:"shu",\u30B7\u30E7:"sho",\u30C1\u30E3:"cha",\u30C1\u30E5:"chu",\u30C1\u30E7:"cho",\u30CB\u30E3:"nya",\u30CB\u30E5:"nyu",\u30CB\u30E7:"nyo",\u30D2\u30E3:"hya",\u30D2\u30E5:"hyu",\u30D2\u30E7:"hyo",\u30DF\u30E3:"mya",\u30DF\u30E5:"myu",\u30DF\u30E7:"myo",\u30EA\u30E3:"rya",\u30EA\u30E5:"ryu",\u30EA\u30E7:"ryo",\u304E\u3083:"gya",\u304E\u3085:"gyu",\u304E\u3087:"gyo",\u3058\u3083:"ja",\u3058\u3085:"ju",\u3058\u3087:"jo",\u3062\u3083:"ja",\u3062\u3085:"ju",\u3062\u3087:"jo",\u3073\u3083:"bya",\u3073\u3085:"byu",\u3073\u3087:"byo",\u3074\u3083:"pya",\u3074\u3085:"pyu",\u3074\u3087:"pyo",\u30AE\u30E3:"gya",\u30AE\u30E5:"gyu",\u30AE\u30E7:"gyo",\u30B8\u30E3:"ja",\u30B8\u30E5:"ju",\u30B8\u30E7:"jo",\u30C2\u30E3:"ja",\u30C2\u30E5:"ju",\u30C2\u30E7:"jo",\u30D3\u30E3:"bya",\u30D3\u30E5:"byu",\u30D3\u30E7:"byo",\u30D4\u30E3:"pya",\u30D4\u30E5:"pyu",\u30D4\u30E7:"pyo",\u3041:"a",\u3043:"i",\u3045:"u",\u3047:"e",\u3049:"o",\u3083:"ya",\u3085:"yu",\u3087:"yo",\u308E:"wa",\u30A1:"a",\u30A3:"i",\u30A5:"u",\u30A7:"e",\u30A9:"o",\u30E3:"ya",\u30E5:"yu",\u30E7:"yo",\u30EE:"wa",\u30F5:"ka",\u30F6:"ke",\u3093:"n",\u30F3:"n","\u3000":" ",\u3044\u3047:"ye",\u3046\u3043:"wi",\u3046\u3047:"we",\u3046\u3049:"wo",\u304D\u3047:"kye",\u304F\u3041:"kwa",\u304F\u3043:"kwi",\u304F\u3047:"kwe",\u304F\u3049:"kwo",\u3050\u3041:"gwa",\u3050\u3043:"gwi",\u3050\u3047:"gwe",\u3050\u3049:"gwo",\u30A4\u30A7:"ye",\u30A6\u30A3:"wi",\u30A6\u30A7:"we",\u30A6\u30A9:"wo",\u30F4:"vu",\u30F4\u30A1:"va",\u30F4\u30A3:"vi",\u30F4\u30A7:"ve",\u30F4\u30A9:"vo",\u30F4\u30E5:"vyu",\u30F4\u30E7:"vyo",\u30AD\u30A7:"kya",\u30AF\u30A1:"kwa",\u30AF\u30A3:"kwi",\u30AF\u30A7:"kwe",\u30AF\u30A9:"kwo",\u30B0\u30A1:"gwa",\u30B0\u30A3:"gwi",\u30B0\u30A7:"gwe",\u30B0\u30A9:"gwo",\u3057\u3047:"she",\u3058\u3047:"je",\u3061\u3047:"che",\u3064\u3041:"tsa",\u3064\u3043:"tsi",\u3064\u3047:"tse",\u3064\u3049:"tso",\u3066\u3043:"ti",\u3066\u3085:"tyu",\u3067\u3043:"di",\u3067\u3085:"dyu",\u3068\u3045:"tu",\u3069\u3045:"du",\u306B\u3047:"nye",\u3072\u3047:"hye",\u3075\u3041:"fa",\u3075\u3043:"fi",\u3075\u3047:"fe",\u3075\u3049:"fo",\u3075\u3085:"fyu",\u3075\u3087:"fyo",\u30B7\u30A7:"she",\u30B8\u30A7:"je",\u30C1\u30A7:"che",\u30C4\u30A1:"tsa",\u30C4\u30A3:"tsi",\u30C4\u30A7:"tse",\u30C4\u30A9:"tso",\u30C6\u30A3:"ti",\u30C6\u30E5:"tyu",\u30C7\u30A3:"di",\u30C7\u30E5:"dyu",\u30C8\u30A5:"tu",\u30C9\u30A5:"du",\u30CB\u30A7:"nye",\u30D2\u30A7:"hye",\u30D5\u30A1:"fa",\u30D5\u30A3:"fi",\u30D5\u30A7:"fe",\u30D5\u30A9:"fo",\u30D5\u30E5:"fyu",\u30D5\u30E7:"fyo"}},i=/(っ|ッ)([bcdfghijklmnopqrstuvwyz])/gm,n=/っ|ッ/gm,o=0,r,s,l="";if(e===ka.PASSPORT&&(a=a.replace(/ー/gm,"")),e===ka.NIPPON||e===ka.HEPBURN){let d=new RegExp(/(ん|ン)(?=あ|い|う|え|お|ア|イ|ウ|エ|オ|ぁ|ぃ|ぅ|ぇ|ぉ|ァ|ィ|ゥ|ェ|ォ|や|ゆ|よ|ヤ|ユ|ヨ|ゃ|ゅ|ょ|ャ|ュ|ョ)/g),c,p=[];for(;(c=d.exec(a))!==null;)p.push(c.index+1);if(p.length!==0){let m="";for(let y=0;y=0&&a[e-1].pos&&a[e-1].pos==="\u52D5\u8A5E"&&(a[e-1].surface_form+="\u3046",a[e-1].pronunciation?a[e-1].pronunciation+="\u30FC":a[e-1].pronunciation=`${a[e-1].reading}\u30FC`,a[e-1].reading+="\u30A6",a.splice(e,1),e--);for(let e=0;e1&&(a[e].surface_form[a[e].surface_form.length-1]==="\u3063"||a[e].surface_form[a[e].surface_form.length-1]==="\u30C3")&&e+1ka[r]).indexOf(t.romajiSystem)===-1)throw new Error("Invalid Romanization System.");let n=await this._analyzer.parse(e),o=Uy(n);if(t.mode==="normal"||t.mode==="spaced")switch(t.to){case"katakana":return t.mode==="normal"?o.map(s=>s.reading).join(""):o.map(s=>s.reading).join(" ");case"romaji":let r=s=>{let l;return Zl(s.surface_form)?l=s.pronunciation||s.reading:l=s.surface_form,us(l,t.romajiSystem)};return t.mode==="normal"?o.map(r).join(""):o.map(r).join(" ");case"hiragana":for(let s=0;ss.reading).join(""):o.map(s=>s.reading).join(" ");default:throw new Error("Unknown option.to param")}else if(t.mode==="okurigana"||t.mode==="furigana"){let r=[];for(let l=0;l${r[l][0]}${t.delimiter_start}${Mi(r[l][2])}${t.delimiter_end}`;return s;case"romaji":if(t.mode==="okurigana")for(let l=0;l";for(let l=0;l${t.delimiter_start}${us(r[l][3],t.romajiSystem)}${t.delimiter_end}`;s+=""}return s;case"hiragana":if(t.mode==="okurigana")for(let l=0;l${r[l][0]}${t.delimiter_start}${r[l][2]}${t.delimiter_end}`;return s;default:throw new Error("Invalid Target Syllabary.")}}}},nL={isHiragana:ls,isKatakana:bn,isKana:cs,isKanji:Kt,isJapanese:Hd,hasHiragana:Gd,hasKatakana:Ud,hasKana:Hy,hasKanji:Wd,hasJapanese:Zl,kanaToHiragna:Wy,kanaToKatakana:$y,kanaToRomaji:Yy};Ql.Util=nL;var Ky=Ql;var Xy=Ky;var rg=R(tg());var dL="https://pkgs.spikerko.org",ec=new Map,ig=new Set,mL=(a,e,t="js")=>`${dL}/${a}/${a}@${e}.${t}`,pL=async a=>{try{if(ec.has(a))return;ig.add(a);let e=await import(a);return e===void 0?void 0:(ec.set(a,e),ig.delete(a),e)}catch(e){throw new Error(`SpicyLyrics [LoadPackage] ${e?.message??"An Error Occured"}`)}},kt=async(a,e,t="js")=>{try{let i=mL(a,e,t);if(ec.has(i))return ec.get(i);let n=await pL(i);return n===void 0?void 0:n}catch(i){throw new Error(`SpicyLyrics [RetrievePackage] ${i?.message??"An Error Occured"}`)}};var $d={};_S($d,{init:()=>hL,parse:()=>yL});kt("Kuromoji","1.0.0","js").catch(()=>{});var ac,hL=()=>ac!==void 0?Promise.resolve():new Promise(async(a,e)=>{for(await kt("Kuromoji","1.0.0","js");!window.kuromoji;)await new Promise(t=>setTimeout(t,50));window.kuromoji.builder({dicPath:"https://kuromoji.pkgs.spikerko.org"}).build((t,i)=>{if(t)return e(t);ac=i,a()})}),yL=(a="")=>{if(a.trim()===""||ac===void 0)return Promise.resolve([]);let e=ac.tokenize(a);for(let t of e)t.verbose={word_id:t.word_id,word_type:t.word_type,word_position:t.word_position},delete t.word_id,delete t.word_type,delete t.word_position;return Promise.resolve(e)};var gL=/[\u200B\u200E\u200F\u2060\uFEFF]/g;function Fa(a){return a.replace(gL,"")}var bt=a=>typeof a=="string"&&Fa(a).trim()!=="",at=a=>bt(a?.Text)||bt(a?.TransliteratedText),ds=a=>!Array.isArray(a?.Syllables)||!a.Syllables.some(e=>at(e)),fL=a=>a?.Lead!==void 0||a?.Background!==void 0?ds(a.Lead)&&!(Array.isArray(a.Background)&&a.Background.some(e=>!ds(e))):!at(a),_i=a=>Array.isArray(a)?a.filter(e=>!fL(e)):[],ng=a=>{if(!(!a||typeof a!="object")&&(Array.isArray(a.Lines)&&(a.Lines=_i(a.Lines)),Array.isArray(a.Content))){a.Content=_i(a.Content);for(let e of a.Content)Array.isArray(e?.Lead?.Syllables)&&(e.Lead.Syllables=e.Lead.Syllables.filter(at)),Array.isArray(e?.Background)&&(e.Background=e.Background.filter(t=>!ds(t)).map(t=>(t.Syllables=t.Syllables.filter(at),t)),e.Background.length===0&&delete e.Background)}},og=a=>{if(!a||typeof a!="object")return!0;let e=Array.isArray(a.Lines)?a.Lines:void 0,t=Array.isArray(a.Content)?a.Content:void 0;return e===void 0&&t===void 0?!1:(e?.length??0)===0&&(t?.length??0)===0};var sg=new Xy,lg=sg.init($d),kL=new ee("Lyrics Romanization"),cg=/[가-힯]|[ᄀ-ᇿ]|[㄰-㆏]|[ꥠ-꥿]|[ힰ-퟿]/,bL=/([一-鿿])/,wL=/([ぁ-んァ-ン])/,vL=/[Ѐ-ӿԀ-ԯⷠ-ⷿꙀ-ꚟ]{2,}/,ug=/[Ͱ-Ͽἀ-῿]/,SL=/[぀-ヿ一-鿿]/,LL=/[一-鿿]/,xL=cg,CL=/[Ѐ-ӿԀ-ԯⷠ-ⷿꙀ-ꚟ]/,EL=ug,TL=/[぀-ヿ一-鿿가-힯ᄀ-ᇿ㄰-㆏Ѐ-ԯͰ-Ͽἀ-῿]/;kt("pinyin","4.0.0","mjs").catch(()=>{});kt("aromanize","1.0.0","js").catch(()=>{});kt("GreekRomanization","1.0.0","js").catch(()=>{});var PL=["Japanese","Chinese","Korean","Cyrillic","Greek"],jL=(a,e)=>{if(a==="jpn")return"Japanese";if(a==="cmn")return"Chinese";if(a==="kor")return"Korean";if(a==="bel"||a==="bul"||a==="kaz"||e==="ky"||a==="mkd"||e==="mn"||a==="rus"||a==="srp"||a==="tgk"||a==="ukr")return"Cyrillic";if(a==="ell")return"Greek"},ML=async a=>{let e={};for(let t of a)t==="Japanese"?await lg:t==="Chinese"?e.pinyin=await kt("pinyin","4.0.0","mjs"):t==="Korean"?e.aromanize=await kt("aromanize","1.0.0","js"):t==="Greek"&&(e.greekRomanization=await kt("GreekRomanization","1.0.0","js"));return e},_L=async a=>(await lg,await sg.convert(a,{to:"romaji",mode:"spaced"})),BL=(a,e)=>e?e.pinyin(a,{segment:!1,group:!0}).join("-"):a,zL=(a,e)=>e?e.default(a,"RevisedRomanizationTransliteration"):a,AL=a=>{let e=Fd(a);return e??a},NL=(a,e)=>{if(!e)return a;let t=e.default(a);return t??a},RL=a=>{let e=[],t=[],i=[];if(a.Type==="Static")for(let r of a.Lines)e.push({target:r,line:r}),t.push(r.Text);else if(a.Type==="Line")for(let r of a.Content)r.Type==="Vocal"&&(e.push({target:r,line:r}),t.push(r.Text));else if(a.Type==="Syllable")for(let r of a.Content){if(r.Type!=="Vocal")continue;let s=r.Lead.Syllables;if(s.length>0){let l=s[0].Text;e.push({target:s[0],line:r});for(let u=1;u0?`${n} ${i.join(` `)}`:n;return{francText:n,scriptText:o,entries:e}},IL=(a,e,t)=>{let i=new Set;wL.test(a)?i.add("Japanese"):bL.test(a)&&i.add("Chinese"),cg.test(a)&&i.add("Korean"),vL.test(a)&&i.add("Cyrillic"),ug.test(a)&&i.add("Greek");let n=jL(e,t);return n&&!i.has(n)&&(n==="Japanese"||n==="Chinese"?!i.has("Japanese")&&!i.has("Chinese")&&i.add(n):i.add(n)),PL.filter(o=>i.has(o))},dg=a=>typeof a.TransliteratedText=="string"&&a.TransliteratedText!=="",qL=async(a,e,t)=>{let{target:i,line:n}=a;if(dg(i))return!1;let o=i.Text,r=!1;for(let s of e)s==="Japanese"?SL.test(o)&&(o=await _L(o),r=!0):s==="Chinese"?LL.test(o)&&(o=BL(o,t.pinyin),r=!0):s==="Korean"?xL.test(o)&&(o=zL(o,t.aromanize),r=!0):s==="Cyrillic"?CL.test(o)&&(o=AL(o),r=!0):s==="Greek"&&EL.test(o)&&(o=NL(o,t.greekRomanization),r=!0);return r&&(i.TransliteratedText=o,n.HasTransliterations=!0,TL.test(o)&&kL.warn("Incomplete romanization (original-script characters remain)",{original:i.Text,romanized:o})),r},ms=async a=>{let e=a.HasTransliterations===!0;ng(a);let{francText:t,scriptText:i,entries:n}=RL(a),o=Dy(t),r=rg.default.where("3",o)?.["1"];a.Language=o,a.LanguageISO2=r;let s=IL(i,o,r),l=!1;if(s.length>0&&n.some(u=>!dg(u.target))){let u=await ML(s);l=(await Promise.all(n.map(c=>qL(c,s,u)))).some(Boolean)}a.HasTransliterations=e||l,a.HasTransliterations===!0?E?.classList.add("Lyrics_RomanizationAvailable"):E?.classList.remove("Lyrics_RomanizationAvailable")};var Xd=(a,e)=>e.some(t=>a instanceof t),mg,pg;function VL(){return mg||(mg=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function DL(){return pg||(pg=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Jd=new WeakMap,Yd=new WeakMap,tc=new WeakMap;function FL(a){let e=new Promise((t,i)=>{let n=()=>{a.removeEventListener("success",o),a.removeEventListener("error",r)},o=()=>{t(wn(a.result)),n()},r=()=>{i(a.error),n()};a.addEventListener("success",o),a.addEventListener("error",r)});return tc.set(e,a),e}function OL(a){if(Jd.has(a))return;let e=new Promise((t,i)=>{let n=()=>{a.removeEventListener("complete",o),a.removeEventListener("error",r),a.removeEventListener("abort",r)},o=()=>{t(),n()},r=()=>{i(a.error||new DOMException("AbortError","AbortError")),n()};a.addEventListener("complete",o),a.addEventListener("error",r),a.addEventListener("abort",r)});Jd.set(a,e)}var Zd={get(a,e,t){if(a instanceof IDBTransaction){if(e==="done")return Jd.get(a);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return wn(a[e])},set(a,e,t){return a[e]=t,!0},has(a,e){return a instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in a}};function fg(a){Zd=a(Zd)}function HL(a){return DL().includes(a)?function(...e){return a.apply(Qd(this),e),wn(this.request)}:function(...e){return wn(a.apply(Qd(this),e))}}function GL(a){return typeof a=="function"?HL(a):(a instanceof IDBTransaction&&OL(a),Xd(a,VL())?new Proxy(a,Zd):a)}function wn(a){if(a instanceof IDBRequest)return FL(a);if(Yd.has(a))return Yd.get(a);let e=GL(a);return e!==a&&(Yd.set(a,e),tc.set(e,a)),e}var Qd=a=>tc.get(a);function ic(a,e,{blocked:t,upgrade:i,blocking:n,terminated:o}={}){let r=indexedDB.open(a,e),s=wn(r);return i&&r.addEventListener("upgradeneeded",l=>{i(wn(r.result),l.oldVersion,l.newVersion,wn(r.transaction),l)}),t&&r.addEventListener("blocked",l=>t(l.oldVersion,l.newVersion,l)),s.then(l=>{o&&l.addEventListener("close",()=>o()),n&&l.addEventListener("versionchange",u=>n(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}var UL=["get","getKey","getAll","getAllKeys","count"],WL=["put","add","delete","clear"],Kd=new Map;function hg(a,e){if(!(a instanceof IDBDatabase&&!(e in a)&&typeof e=="string"))return;if(Kd.get(e))return Kd.get(e);let t=e.replace(/FromIndex$/,""),i=e!==t,n=WL.includes(t);if(!(t in(i?IDBIndex:IDBObjectStore).prototype)||!(n||UL.includes(t)))return;let o=async function(r,...s){let l=this.transaction(r,n?"readwrite":"readonly"),u=l.store;return i&&(u=u.index(s.shift())),(await Promise.all([u[t](...s),n&&l.done]))[0]};return Kd.set(e,o),o}fg(a=>({...a,get:(e,t,i)=>hg(e,t)||a.get(e,t,i),has:(e,t)=>!!hg(e,t)||a.has(e,t)}));var $L=["continue","continuePrimaryKey","advance"],yg={},em=new WeakMap,kg=new WeakMap,YL={get(a,e){if(!$L.includes(e))return a[e];let t=yg[e];return t||(t=yg[e]=function(...i){em.set(this,kg.get(this)[e](...i))}),t}};async function*KL(...a){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...a)),!e)return;e=e;let t=new Proxy(e,YL);for(kg.set(t,e),tc.set(t,Qd(e));e;)yield t,e=await(em.get(t)||e.continue()),em.delete(t)}function gg(a,e){return e===Symbol.asyncIterator&&Xd(a,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Xd(a,[IDBIndex,IDBObjectStore])}fg(a=>({...a,get(e,t,i){return gg(e,t)?KL:a.get(e,t,i)},has(e,t){return gg(e,t)||a.has(e,t)}}));var bg=new ee("Database"),ps={LyricsStore:"lyricsStore"},Bi=ic("spicylyrics",1,{upgrade(a){bg.debug("Upgrade invoked"),a.objectStoreNames.contains(ps.LyricsStore)||(a.createObjectStore(ps.LyricsStore),bg.debug("Created '",ps.LyricsStore,"' store"))}});var wg=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",XL=wg+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",JL="["+wg+"]["+XL+"]*",ZL=new RegExp("^"+JL+"$");function nc(a,e){let t=[],i=e.exec(a);for(;i;){let n=[];n.startIndex=e.lastIndex-i[0].length;let o=i.length;for(let r=0;r"u")};function vg(a){return typeof a<"u"}var hs=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],oc=["__proto__","constructor","prototype"];var QL={allowBooleanAttributes:!1,unpairedTags:[]};function Eg(a,e){e=Object.assign({},QL,e);let t=[],i=!1,n=!1;a[0]==="\uFEFF"&&(a=a.substr(1));for(let o=0;o"&&a[o]!==" "&&a[o]!==" "&&a[o]!==` `&&a[o]!=="\r";o++)l+=a[o];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),o--),!sx(l)){let c;return l.trim().length===0?c="Invalid space after '<'.":c="Tag '"+l+"' is an invalid name.",Ve("InvalidTag",c,ua(a,o))}let u=tx(a,o);if(u===!1)return Ve("InvalidAttr","Attributes for '"+l+"' have open quote.",ua(a,o));let d=u.value;if(o=u.index,d[d.length-1]==="/"){let c=o-d.length;d=d.substring(0,d.length-1);let p=Cg(d,e);if(p===!0)i=!0;else return Ve(p.err.code,p.err.msg,ua(a,c+p.err.line))}else if(s)if(u.tagClosed){if(d.trim().length>0)return Ve("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",ua(a,r));if(t.length===0)return Ve("InvalidTag","Closing tag '"+l+"' has not been opened.",ua(a,r));{let c=t.pop();if(l!==c.tagName){let p=ua(a,c.tagStartPos);return Ve("InvalidTag","Expected closing tag '"+c.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+l+"'.",ua(a,r))}t.length==0&&(n=!0)}}else return Ve("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",ua(a,o));else{let c=Cg(d,e);if(c!==!0)return Ve(c.err.code,c.err.msg,ua(a,o-d.length+c.err.line));if(n===!0)return Ve("InvalidXml","Multiple possible root nodes found.",ua(a,o));e.unpairedTags.indexOf(l)!==-1||t.push({tagName:l,tagStartPos:r}),i=!0}for(o++;o0)return Ve("InvalidXml","Invalid '"+JSON.stringify(t.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Ve("InvalidXml","Start tag expected.",1);return!0}function Sg(a){return a===" "||a===" "||a===` `||a==="\r"}function Lg(a,e){let t=e;for(;e5&&i==="xml")return Ve("InvalidXml","XML declaration allowed only at the start of the document.",ua(a,e));if(a[e]=="?"&&a[e+1]==">"){e++;break}else continue}return e}function xg(a,e){if(a.length>e+5&&a[e+1]==="-"&&a[e+2]==="-"){for(e+=3;e"){e+=2;break}}else if(a.length>e+8&&a[e+1]==="D"&&a[e+2]==="O"&&a[e+3]==="C"&&a[e+4]==="T"&&a[e+5]==="Y"&&a[e+6]==="P"&&a[e+7]==="E"){let t=1;for(e+=8;e"&&(t--,t===0))break}else if(a.length>e+9&&a[e+1]==="["&&a[e+2]==="C"&&a[e+3]==="D"&&a[e+4]==="A"&&a[e+5]==="T"&&a[e+6]==="A"&&a[e+7]==="["){for(e+=8;e"){e+=2;break}}return e}var ex='"',ax="'";function tx(a,e){let t="",i="",n=!1;for(;e"&&i===""){n=!0;break}t+=a[e]}return i!==""?!1:{value:t,index:e,tagClosed:n}}var ix=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Cg(a,e){let t=nc(a,ix),i={};for(let n=0;n",lt:"<",quot:'"'},im={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"};var Do=Object.freeze({ALLOW:"allow",BLOCK:"block",THROW:"throw"}),lx=new Set("!?\\\\/[]$%{}^&*()<>|+");function Tg(a){if(a[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${a}"`);for(let e of a)if(lx.has(e))throw new Error(`[EntityReplacer] Invalid character '${e}' in entity name: "${a}"`);return a}function fs(...a){let e=Object.create(null);for(let t of a)if(t)for(let i of Object.keys(t)){let n=t[i];if(typeof n=="string")e[i]=n;else if(n&&typeof n=="object"&&n.val!==void 0){let o=n.val;typeof o=="string"&&(e[i]=o)}}return e}var vn="external",rc="base",nm="all";function cx(a){return!a||a===vn?new Set([vn]):a===nm?new Set([nm]):a===rc?new Set([rc]):Array.isArray(a)?new Set(a):new Set([vn])}var ba=Object.freeze({allow:0,leave:1,remove:2,throw:3}),ux=new Set([9,10,13]);function dx(a){if(!a)return{xmlVersion:1,onLevel:ba.allow,nullLevel:ba.remove};let e=a.xmlVersion===1.1?1.1:1,t=ba[a.onNCR]??ba.allow,i=ba[a.nullNCR]??ba.remove,n=Math.max(i,ba.remove);return{xmlVersion:e,onLevel:t,nullLevel:n}}var Fo=class{constructor(e={}){this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck=="function"?e.postCheck:i=>i,this._limitTiers=cx(this._limit.applyLimitsTo??vn),this._numericAllowed=e.numericAllowed??!0,this._baseMap=fs(gs,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let t=dx(e.ncr);this._ncrXmlVersion=t.xmlVersion,this._ncrOnLevel=t.onLevel,this._ncrNullLevel=t.nullLevel,this._onExternalEntity=typeof e.onExternalEntity=="function"?e.onExternalEntity:null,this._onInputEntity=typeof e.onInputEntity=="function"?e.onInputEntity:null}_applyRegistrationHook(e,t,i,n){if(!e)return!0;let o=e(t,i);if(o===Do.BLOCK)return!1;if(o===Do.THROW)throw new Error(`[EntityDecoder] Registration of ${n} entity "&${t};" was rejected by hook`);return!0}setExternalEntities(e){if(e)for(let n of Object.keys(e))Tg(n);if(!this._onExternalEntity){this._externalMap=fs(e);return}let t=fs(e),i=Object.create(null);for(let[n,o]of Object.entries(t))this._applyRegistrationHook(this._onExternalEntity,n,o,"external")&&(i[n]=o);this._externalMap=i}addExternalEntity(e,t){Tg(e),typeof t=="string"&&t.indexOf("&")===-1&&this._applyRegistrationHook(this._onExternalEntity,e,t,"external")&&(this._externalMap[e]=t)}addInputEntities(e){if(this._totalExpansions=0,this._expandedLength=0,!this._onInputEntity){this._inputMap=fs(e);return}let t=fs(e),i=Object.create(null);for(let[n,o]of Object.entries(t))this._applyRegistrationHook(this._onInputEntity,n,o,"input")&&(i[n]=o);this._inputMap=i}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!="string"||e.length===0||e.indexOf("&")===-1)return e;let t=e,i=[],n=e.length,o=0,r=0,s=this._maxTotalExpansions>0,l=this._maxExpandedLength>0,u=s||l;for(;r=n||e.charCodeAt(c)!==59){r++;continue}let p=e.slice(r+1,c);if(p.length===0){r++;continue}let m,y;if(this._removeSet.has(p))m="",y===void 0&&(y=vn);else if(this._leaveSet.has(p)){r++;continue}else if(p.charCodeAt(0)===35){let h=this._resolveNCR(p);if(h===void 0){r++;continue}m=h,y=rc}else{let h=this._resolveName(p);m=h?.value,y=h?.tier}if(m===void 0){r++;continue}if(r>o&&i.push(e.slice(o,r)),i.push(m),o=c+1,r=o,u&&this._tierCounts(y)){if(s&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(l){let h=m.length-(p.length+2);if(h>0&&(this._expandedLength+=h,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}o=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!ux.has(e)?ba.remove:-1}_applyNCRAction(e,t,i){switch(e){case ba.allow:return String.fromCodePoint(i);case ba.remove:return"";case ba.leave:return;case ba.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${i.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(i)}}_resolveNCR(e){let t=e.charCodeAt(1),i;if(t===120||t===88?i=parseInt(e.slice(2),16):i=parseInt(e.slice(1),10),Number.isNaN(i)||i<0||i>1114111)return;let n=this._classifyNCR(i);if(!this._numericAllowed&&nhs.includes(a)?"__"+a:a,mx={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0,unicode:!1},tagValueProcessor:function(a,e){return e},attributeValueProcessor:function(a,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(a,e,t){return a},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Pg};function px(a,e){if(typeof a!="string")return;let t=a.toLowerCase();if(hs.some(i=>t===i.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${a}" is a reserved JavaScript keyword that could cause prototype pollution`);if(oc.some(i=>t===i.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${a}" is a reserved JavaScript keyword that could cause prototype pollution`)}function jg(a,e){return typeof a=="boolean"?{enabled:a,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof a=="object"&&a!==null?{enabled:a.enabled!==!1,maxEntitySize:Math.max(1,a.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,a.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,a.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,a.maxExpandedLength??1e5),maxEntityCount:Math.max(1,a.maxEntityCount??1e3),allowedTags:a.allowedTags??null,tagFilter:a.tagFilter??null,appliesTo:a.appliesTo??"all"}:jg(!0)}var Mg=function(a){let e=Object.assign({},mx,a),t=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(let{value:i,name:n}of t)i&&px(i,n);return e.onDangerousProperty===null&&(e.onDangerousProperty=Pg),e.processEntities=jg(e.processEntities,e.htmlEntities),e.unpairedTagsSet=new Set(e.unpairedTags),e.stopNodes&&Array.isArray(e.stopNodes)&&(e.stopNodes=e.stopNodes.map(i=>typeof i=="string"&&i.startsWith("*.")?".."+i.substring(2):i)),e};var Sn;typeof Symbol!="function"?Sn="@@xmlMetadata":Sn=Symbol("XML Node Metadata");var wa=class{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),this.addStartIndex(t)}addStartIndex(e){e!==void 0&&(this.child[this.child.length-1][Sn]={startIndex:e})}addEndIndex(e){let t=this.child[this.child.length-1];t!==void 0&&t[Sn]!==void 0&&t[Sn].endIndex===void 0&&(t[Sn].endIndex=e)}static getMetaDataSymbol(){return Sn}};var _g=":A-Za-z_\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",hx=_g+"\\-\\.\\d\xB7\u0300-\u036F\u203F-\u2040",Bg=":A-Za-z_\xC0-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",yx=Bg+"\\-\\.\\d\xB7\u0300-\u036F\u0487\u203F-\u2040",om=(a,e,t="")=>{let i=a.replace(":",""),n=e.replace(":",""),o=`[${i}][${n}]*`;return{name:new RegExp(`^[${a}][${e}]*$`,t),ncName:new RegExp(`^${o}$`,t),qName:new RegExp(`^${o}(?::${o})?$`,t),nmToken:new RegExp(`^[${e}]+$`,t),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,t)}},gx=om(_g,hx),fx=om(Bg,yx,"u"),zg=":A-Za-z_",kx=zg+"\\-\\.\\d",bx=om(zg,kx),wx=(a="1.0",e=!1)=>e?bx:a==="1.1"?fx:gx;var rm=(a,{xmlVersion:e="1.0",asciiOnly:t=!1}={})=>wx(e,t).qName.test(a);var bs=class{constructor(e,t){this.suppressValidationErr=!e,this.options=e,this.xmlVersion=t||1}setXmlVersion(e=1){this.xmlVersion=e}readDocType(e,t){let i=Object.create(null),n=0;if(e[t+3]==="O"&&e[t+4]==="C"&&e[t+5]==="T"&&e[t+6]==="Y"&&e[t+7]==="P"&&e[t+8]==="E"){t=t+9;let o=1,r=!1,s=!1,l=null,u="";for(;t=this.options.maxEntityCount)throw new Error(`Entity count (${n+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);i[d]=c,n++}}else if(r&&Ln(e,"!ELEMENT",t)){t+=8;let{index:d}=this.readElementExp(e,t+1);t=d}else if(r&&Ln(e,"!ATTLIST",t))t+=8;else if(r&&Ln(e,"!NOTATION",t)){t+=9;let{index:d}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=d}else if(Ln(e,"!--",t))s=!0;else throw new Error("Invalid DOCTYPE");o++,u=""}else if(e[t]===">"){if(s?e[t-1]==="-"&&e[t-2]==="-"&&(s=!1,o--):o--,o===0)break}else e[t]==="["?r=!0:u+=e[t]}if(l!==null||o!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:i,i:t}}readEntityExp(e,t){t=va(e,t);let i=t;for(;tthis.options.maxEntitySize)throw new Error(`Entity "${n}" size (${o.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return t--,[n,o,t]}readNotationExp(e,t){t=va(e,t);let i=t;for(;t{for(;e=Rg&&o<=Ig||o===qg)){if(o=55296&&o<=56319){if(n+1=56320&&r<=57343){let s=65536+(o-55296<<10)+(r-56320);if(lc.has(s)){t=n;break}}}continue}if(cc[o-Oo]!==sc||uc.has(o)){t=n;break}}}if(t===-1)return a;let i=[];t>0&&i.push(a.slice(0,t));for(let n=t;n=Rg&&o<=Ig||o===qg){i.push(a[n]);continue}if(o=55296&&o<=56319){if(n+1=56320&&s<=57343){let l=65536+(o-55296<<10)+(s-56320),u=lc.get(l);if(u!==void 0){i.push(String.fromCharCode(u+48)),n++;continue}}}i.push(a[n]);continue}if(uc.has(o)){i.push("-");continue}let r=cc[o-Oo];i.push(r!==sc?String.fromCharCode(r+48):a[n])}return i.join("")}var Vg=Lx;var xx=/^[-+]?0x[a-fA-F0-9]+$/,Cx=/^0b[01]+$/,Ex=/^0o[0-7]+$/,Tx=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Px={hex:!0,binary:!1,octal:!1,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original",unicode:!1};function lm(a,e={}){if(e=Object.assign({},Px,e),!a||typeof a!="string")return a;let t=a.trim();if(t.length===0)return a;if(e.skipLike!==void 0&&e.skipLike.test(t))return a;if(t==="0"||e.unicode&&(t=Vg(t),t==="0"))return 0;if(e.hex&&xx.test(t))return sm(t,16);if(e.binary&&Cx.test(t))return sm(t,2);if(e.octal&&Ex.test(t))return sm(t,8);if(isFinite(t)){if(t.includes("e")||t.includes("E"))return Mx(a,t,e);{let i=Tx.exec(t);if(i){let n=i[1]||"",o=i[2],r=_x(i[3]),s=n?a[o.length+1]===".":a[o.length]===".";if(!e.leadingZeros&&(o.length>1||o.length===1&&!s))return a;{let l=Number(t),u=String(l);if(l===0)return l;if(u.search(/[eE]/)!==-1)return e.eNotation?l:a;if(t.indexOf(".")!==-1)return u==="0"||u===r||u===`${n}${r}`?l:a;let d=o?r:t;return o?d===u||n+d===u?l:a:d===u||d===n+u?l:a}}else return a}}else return Bx(a,Number(t),e)}var jx=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Mx(a,e,t){if(!t.eNotation)return a;let i=e.match(jx);if(i){let n=i[1]||"",o=i[3].indexOf("e")===-1?"E":"e",r=i[2],s=n?a[r.length+1]===o:a[r.length]===o;return r.length>1&&s?a:r.length===1&&(i[3].startsWith(`.${o}`)||i[3][0]===o)?Number(e):r.length>0?t.leadingZeros&&!s?(e=(i[1]||"")+i[3],Number(e)):a:Number(e)}else return a}function _x(a){if(a&&a.indexOf(".")!==-1){let e=a.length;for(;e>0&&a.charCodeAt(e-1)===48;)e--;return a=a.slice(0,e),a==="."?a="0":a[0]==="."?a="0"+a:a[a.length-1]==="."&&(a=a.substring(0,a.length-1)),a}return a}function sm(a,e){let t=a.trim();if((e===2||e===8)&&(a=t.substring(2)),parseInt)return parseInt(a,e);if(Number.parseInt)return Number.parseInt(a,e);if(window&&window.parseInt)return window.parseInt(a,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Bx(a,e,t){let i=e===1/0;switch(t.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return i?"Infinity":"-Infinity";default:return a}}function cm(a){return typeof a=="function"?a:Array.isArray(a)?e=>{for(let t of a)if(typeof t=="string"&&e===t||t instanceof RegExp&&t.test(e))return!0}:()=>!1}var xn=class{constructor(e,t={},i){this.pattern=e,this.separator=t.separator||".",this.segments=this._parse(e),this.data=i,this._hasDeepWildcard=this.segments.some(n=>n.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(n=>n.attrName!==void 0),this._hasPositionSelector=this.segments.some(n=>n.position!==void 0)}_parse(e){let t=[],i=0,n="";for(;i0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let t=this._matcher.path;if(t.length!==0)return t[t.length-1].values?.[e]}hasAttr(e){let t=this._matcher.path;if(t.length===0)return!1;let i=t[t.length-1];return i.values!==void 0&&e in i.values}getAnyParentAttr(e){return this._matcher.getAnyParentAttr(e)}hasAnyParentAttr(e){return this._matcher.hasAnyParentAttr(e)}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,t=!0){return this._matcher.toString(e,t)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}},Go=class{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new um(this),this._keptAttrs=[]}push(e,t=null,i=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let o=this.path.length,r=this.siblingStacks[o];r||(r={counts:new Map,total:0},this.siblingStacks[o]=r);let s=i?`${i}:${e}`:e,l=r.counts.get(s)||0,u=r.total;r.counts.set(s,l+1),r.total++;let d={tag:e,position:u,counter:l};i!=null&&(d.namespace=i),t!=null&&(d.values=t),this.path.push(d);let c=this.path.length,p=n!==null?n.keep:null;if(p!=null&&p.length>0&&t)for(let m=0;mthis.path.length+1&&(this.siblingStacks.length=this.path.length+1);let t=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=t;)this._keptAttrs.pop();return e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getAnyParentAttr(e){let t=this._keptAttrs;for(let i=t.length-1;i>=0;i--)if(t[i].name===e)return t[i].value}hasAnyParentAttr(e){let t=this._keptAttrs;for(let i=t.length-1;i>=0;i--)if(t[i].name===e)return!0;return!1}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){let i=e||this.separator;if(i===this.separator&&t===!0){if(this._pathStringCache!==null)return this._pathStringCache;let o=this.path.map(r=>r.namespace?`${r.namespace}:${r.tag}`:r.tag).join(i);return this._pathStringCache=o,o}return this.path.map(o=>t&&o.namespace?`${o.namespace}:${o.tag}`:o.tag).join(i)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(e){let t=e.segments;return t.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t=0&&t>=0;){let n=e[i];if(n.type==="deep-wildcard"){if(i--,i<0)return!0;let o=e[i],r=!1;for(let s=t;s>=0;s--)if(this._matchSegment(o,this.path[s],s===this.path.length-1)){t=s-1,i--,r=!0;break}if(!r)return!1}else{if(!this._matchSegment(n,this.path[t],t===this.path.length-1))return!1;t--,i--}}return i<0}_matchSegment(e,t,i){if(e.tag!=="*"&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!=="*"&&e.namespace!==t.namespace||e.attrName!==void 0&&(!i||!t.values||!(e.attrName in t.values)||e.attrValue!==void 0&&String(t.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!i)return!1;let n=t.counter??0;if(e.position==="first"&&n!==0)return!1;if(e.position==="odd"&&n%2!==1)return!1;if(e.position==="even"&&n%2!==0)return!1;if(e.position==="nth"&&n!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>e&&{counts:new Map(e.counts),total:e.total}),keptAttrs:this._keptAttrs.map(e=>({...e}))}}restore(e){this._pathStringCache=null,this.path=e.path.map(t=>({...t})),this.siblingStacks=e.siblingStacks.map(t=>t&&{counts:new Map(t.counts),total:t.total}),this._keptAttrs=(e.keptAttrs||[]).map(t=>({...t}))}readOnly(){return this._view}};var zx=[{id:"html-script-open",description:"