{"version":3,"sources":["webpack:///app/javascript/build/mastodon-5e6f150/app/javascript/flavours/glitch/packs/error.js","webpack:///app/javascript/build/mastodon-5e6f150/app/javascript/packs/public-path.js","webpack:///app/javascript/build/mastodon-5e6f150/app/javascript/flavours/glitch/ready.js"],"names":["ready","image","document","querySelector","addEventListener","src","removeOuterSlashes","string","replace","cdnHost","__webpack_public_path__","host","path","formattedHost","test","formatPublicPath","content","process","callback","Promise","resolve","reject","loaded","_result","result","err","then","catch","includes","readyState"],"mappings":"qIAAA,yBAGAA,aAAM,KACJ,MAAMC,EAAQC,SAASC,cAAc,OAErCF,EAAMG,iBAAiB,cAAc,KACnCH,EAAMI,IAAM,WAAW,IAGzBJ,EAAMG,iBAAiB,cAAc,KACnCH,EAAMI,IAAM,WAAW,GACvB,G,qBCRJ,SAASC,EAAmBC,GAC1B,OAAOA,EAAOC,QAAQ,OAAQ,IAAIA,QAAQ,OAAQ,GACpD,CAWA,MAAMC,EAAUP,SAASC,cAAc,uBAGvCO,IAZA,SAA0BC,EAAWC,QAAP,IAAJD,MAAO,SAAQ,IAAJC,MAAO,IAC1C,IAAIC,EAAgBP,EAAmBK,GAKvC,OAJIE,IAAkB,SAASC,KAAKD,KAClCA,EAAiB,KAAIA,KAGf,GAAEA,KADYP,EAAmBM,KAE3C,CAK0BG,CAAiBN,EAAUA,EAAQO,QAAU,GAAIC,Q,kCCd5D,SAASjB,EAAMkB,GAC5B,OAAO,IAAIC,SAAQ,CAACC,EAASC,KAC3B,SAASC,IAAU,IAADC,EAChB,IAAIC,EACJ,IACEA,EAASN,GACX,CAAE,MAAOO,GAGP,YAFAJ,EAAOI,EAGT,CAE4B,mBAAX,OAAbF,EAAOC,QAAM,EAAND,EAAQG,MACjBF,EAAOE,KAAKN,GAASO,MAAMN,GAE3BD,GAEJ,CAEI,CAAC,cAAe,YAAYQ,SAAS1B,SAAS2B,YAChDP,IAEApB,SAASE,iBAAiB,mBAAoBkB,EAChD,GAEJ,CA/BA,iC","file":"js/flavours/glitch/error-9be8c87cf774e27bf679.chunk.js","sourcesContent":["import 'packs/public-path';\nimport ready from 'flavours/glitch/ready';\n\nready(() => {\n const image = document.querySelector('img');\n\n image.addEventListener('mouseenter', () => {\n image.src = '/oops.gif';\n });\n\n image.addEventListener('mouseleave', () => {\n image.src = '/oops.png';\n });\n});\n","// Dynamically set webpack's loading path depending on a meta header, in order\n// to share the same assets regardless of instance configuration.\n// See https://webpack.js.org/guides/public-path/#on-the-fly\n\nfunction removeOuterSlashes(string) {\n return string.replace(/^\\/*/, '').replace(/\\/*$/, '');\n}\n\nfunction formatPublicPath(host = '', path = '') {\n let formattedHost = removeOuterSlashes(host);\n if (formattedHost && !/^http/i.test(formattedHost)) {\n formattedHost = `//${formattedHost}`;\n }\n const formattedPath = removeOuterSlashes(path);\n return `${formattedHost}/${formattedPath}/`;\n}\n\nconst cdnHost = document.querySelector('meta[name=cdn-host]');\n\n// eslint-disable-next-line no-undef\n__webpack_public_path__ = formatPublicPath(cdnHost ? cdnHost.content : '', process.env.PUBLIC_OUTPUT_PATH);\n","// @ts-check\n\n/**\n * @param {(() => void) | (() => Promise)} callback\n * @returns {Promise}\n */\nexport default function ready(callback) {\n return new Promise((resolve, reject) => {\n function loaded() {\n let result;\n try {\n result = callback();\n } catch (err) {\n reject(err);\n\n return;\n }\n\n if (typeof result?.then === 'function') {\n result.then(resolve).catch(reject);\n } else {\n resolve();\n }\n }\n\n if (['interactive', 'complete'].includes(document.readyState)) {\n loaded();\n } else {\n document.addEventListener('DOMContentLoaded', loaded);\n }\n });\n}\n"],"sourceRoot":""}