mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-23 23:11:13 +00:00
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"version":3,"sources":["webpack:///public.js","webpack:///./app/javascript/packs/public.js"],"names":["webpackJsonp","682","module","__webpack_exports__","__webpack_require__","main","_require","length","IntlRelativeFormat","default","_require2","delegate","emojify","_require3","getLocale","_getLocale","localeData","ReactDOM","forEach","__addLocaleData","Object","__WEBPACK_IMPORTED_MODULE_2__mastodon_ready__","locale","document","documentElement","lang","dateTimeFormat","Intl","DateTimeFormat","year","month","day","hour","minute","relativeFormat","call","querySelectorAll","content","innerHTML","datetime","Date","getAttribute","formattedDate","format","title","textContent","addEventListener","e","preventDefault","window","open","target","href","reactComponents","then","bind","_ref","MediaContainer","createElement","render","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default","components","body","appendChild","catch","error","console","_ref2","button","location","_ref3","contentEl","parentNode","querySelector","style","display","marginBottom","_ref4","nameCounter","value","_ref5","noteCounter","_ref6","avatar","_ref7","files","file","url","URL","createObjectURL","dataset","originalSrc","src","_ref8","header","_ref9","backgroundImage","defineProperty","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx__","n","__WEBPACK_IMPORTED_MODULE_1__mastodon_load_polyfills__","data","parent","type","postMessage","id","height","getElementsByTagName","scrollHeight"],"mappings":"AAAAA,cAAc,KAERC,IACA,SAAUC,EAAQC,EAAqBC,GAE7C,YCcA,SAASC,KAAO,GAAAC,GACKF,EAAQ,IAAnBG,EADMD,EACNC,OACFC,EAAqBJ,EAAQ,IAAuBK,QAF5CC,EAGON,EAAQ,KAArBO,EAHMD,EAGNC,SACFC,EAAUR,EAAQ,IAAoCK,QAJ9CI,EAKQT,EAAQ,GAAtBU,EALMD,EAKNC,UALMC,EAMSD,IAAfE,EANMD,EAMNC,WAEFC,GADQb,EAAQ,GACLA,EAAQ,IAEzBY,GAAWE,QAAQV,EAAmBW,iBAEtCC,OAAAC,EA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E,OAAO,GAC7C,IAAImB,GAA0D9F,EAAoB,GAC9EwD,EAAkExD,EAAoB+F,EAAED,GACxFE,EAAyDhG,EAAoB,IAC7EiB,EAAgDjB,EAAoB,GCP7F6C,QAAOH,iBAAiB,UAAW,SAAAC,GACjC,GAAMsD,GAAOtD,EAAEsD,QAEVpD,QAAOqD,QAAwB,cAAdD,EAAKE,MAI3BnF,OAAAC,EAAA,SAAM,WACJ4B,OAAOqD,OAAOE,aACZD,KAAM,YACNE,GAAIJ,EAAKI,GACTC,OAAQnF,SAASoF,qBAAqB,QAAQ,GAAGC,cAChD,SA2HPxF,OAAAgF,EAAA,KAAgB9C,KAAKjD,GAAM2D,MAAM,SAAAC,GAC/BC,QAAQD,MAAMA,QDmDb","file":"public.js","sourcesContent":["webpackJsonp([84],{\n\n/***/ 682:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mastodon_load_polyfills__ = __webpack_require__(77);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mastodon_ready__ = __webpack_require__(89);\n\n\n\n\nwindow.addEventListener('message', function (e) {\n var data = e.data || {};\n\n if (!window.parent || data.type !== 'setHeight') {\n return;\n }\n\n Object(__WEBPACK_IMPORTED_MODULE_2__mastodon_ready__[\"default\"])(function () {\n window.parent.postMessage({\n type: 'setHeight',\n id: data.id,\n height: document.getElementsByTagName('html')[0].scrollHeight\n }, '*');\n });\n});\n\nfunction main() {\n var _require = __webpack_require__(99),\n length = _require.length;\n\n var IntlRelativeFormat = __webpack_require__(76).default;\n\n var _require2 = __webpack_require__(152),\n delegate = _require2.delegate;\n\n var emojify = __webpack_require__(73).default;\n\n var _require3 = __webpack_require__(6),\n getLocale = _require3.getLocale;\n\n var _getLocale = getLocale(),\n localeData = _getLocale.localeData;\n\n var React = __webpack_require__(0);\n var ReactDOM = __webpack_require__(20);\n\n localeData.forEach(IntlRelativeFormat.__addLocaleData);\n\n Object(__WEBPACK_IMPORTED_MODULE_2__mastodon_ready__[\"default\"])(function () {\n var locale = document.documentElement.lang;\n\n var dateTimeFormat = new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric'\n });\n\n var relativeFormat = new IntlRelativeFormat(locale);\n\n [].forEach.call(document.querySelectorAll('.emojify'), function (content) {\n content.innerHTML = emojify(content.innerHTML);\n });\n\n [].forEach.call(document.querySelectorAll('time.formatted'), function (content) {\n var datetime = new Date(content.getAttribute('datetime'));\n var formattedDate = dateTimeFormat.format(datetime);\n\n content.title = formattedDate;\n content.textContent = formattedDate;\n });\n\n [].forEach.call(document.querySelectorAll('time.time-ago'), function (content) {\n var datetime = new Date(content.getAttribute('datetime'));\n\n content.title = dateTimeFormat.format(datetime);\n content.textContent = relativeFormat.format(datetime);\n });\n\n [].forEach.call(document.querySelectorAll('.logo-button'), function (content) {\n content.addEventListener('click', function (e) {\n e.preventDefault();\n window.open(e.target.href, 'mastodon-intent', 'width=400,height=400,resizable=no,menubar=no,status=no,scrollbars=yes');\n });\n });\n\n var reactComponents = document.querySelectorAll('[data-component]');\n if (reactComponents.length > 0) {\n __webpack_require__.e/* import() */(34).then(__webpack_require__.bind(null, 839)).then(function (_ref) {\n var MediaContainer = _ref.default;\n\n var content = document.createElement('div');\n\n ReactDOM.render(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()(MediaContainer, {\n locale: locale,\n components: reactComponents\n }), content);\n document.body.appendChild(content);\n }).catch(function (error) {\n return console.error(error);\n });\n }\n });\n\n delegate(document, '.webapp-btn', 'click', function (_ref2) {\n var target = _ref2.target,\n button = _ref2.button;\n\n if (button !== 0) {\n return true;\n }\n window.location.href = target.href;\n return false;\n });\n\n delegate(document, '.status__content__spoiler-link', 'click', function (_ref3) {\n var target = _ref3.target;\n\n var contentEl = target.parentNode.parentNode.querySelector('.e-content');\n\n if (contentEl.style.display === 'block') {\n contentEl.style.display = 'none';\n target.parentNode.style.marginBottom = 0;\n } else {\n contentEl.style.display = 'block';\n target.parentNode.style.marginBottom = null;\n }\n\n return false;\n });\n\n delegate(document, '.account_display_name', 'input', function (_ref4) {\n var target = _ref4.target;\n\n var nameCounter = document.querySelector('.name-counter');\n\n if (nameCounter) {\n nameCounter.textContent = 30 - length(target.value);\n }\n });\n\n delegate(document, '.account_note', 'input', function (_ref5) {\n var target = _ref5.target;\n\n var noteCounter = document.querySelector('.note-counter');\n\n if (noteCounter) {\n noteCounter.textContent = 160 - length(target.value);\n }\n });\n\n delegate(document, '#account_avatar', 'change', function (_ref6) {\n var target = _ref6.target;\n\n var avatar = document.querySelector('.card.compact .avatar img');\n\n var _ref7 = target.files || [],\n file = _ref7[0];\n\n var url = file ? URL.createObjectURL(file) : avatar.dataset.originalSrc;\n\n avatar.src = url;\n });\n\n delegate(document, '#account_header', 'change', function (_ref8) {\n var target = _ref8.target;\n\n var header = document.querySelector('.card.compact');\n\n var _ref9 = target.files || [],\n file = _ref9[0];\n\n var url = file ? URL.createObjectURL(file) : header.dataset.originalSrc;\n\n header.style.backgroundImage = 'url(' + url + ')';\n });\n}\n\nObject(__WEBPACK_IMPORTED_MODULE_1__mastodon_load_polyfills__[\"a\" /* default */])().then(main).catch(function (error) {\n console.error(error);\n});\n\n/***/ })\n\n},[682]);\n\n\n// WEBPACK FOOTER //\n// public.js","import loadPolyfills from '../mastodon/load_polyfills';\nimport ready from '../mastodon/ready';\n\nwindow.addEventListener('message', e => {\n const data = e.data || {};\n\n if (!window.parent || data.type !== 'setHeight') {\n return;\n }\n\n ready(() => {\n window.parent.postMessage({\n type: 'setHeight',\n id: data.id,\n height: document.getElementsByTagName('html')[0].scrollHeight,\n }, '*');\n });\n});\n\nfunction main() {\n const { length } = require('stringz');\n const IntlRelativeFormat = require('intl-relativeformat').default;\n const { delegate } = require('rails-ujs');\n const emojify = require('../mastodon/features/emoji/emoji').default;\n const { getLocale } = require('../mastodon/locales');\n const { localeData } = getLocale();\n const React = require('react');\n const ReactDOM = require('react-dom');\n\n localeData.forEach(IntlRelativeFormat.__addLocaleData);\n\n ready(() => {\n const locale = document.documentElement.lang;\n\n const dateTimeFormat = new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n });\n\n const relativeFormat = new IntlRelativeFormat(locale);\n\n [].forEach.call(document.querySelectorAll('.emojify'), (content) => {\n content.innerHTML = emojify(content.innerHTML);\n });\n\n [].forEach.call(document.querySelectorAll('time.formatted'), (content) => {\n const datetime = new Date(content.getAttribute('datetime'));\n const formattedDate = dateTimeFormat.format(datetime);\n\n content.title = formattedDate;\n content.textContent = formattedDate;\n });\n\n [].forEach.call(document.querySelectorAll('time.time-ago'), (content) => {\n const datetime = new Date(content.getAttribute('datetime'));\n\n content.title = dateTimeFormat.format(datetime);\n content.textContent = relativeFormat.format(datetime);\n });\n\n [].forEach.call(document.querySelectorAll('.logo-button'), (content) => {\n content.addEventListener('click', (e) => {\n e.preventDefault();\n window.open(e.target.href, 'mastodon-intent', 'width=400,height=400,resizable=no,menubar=no,status=no,scrollbars=yes');\n });\n });\n\n const reactComponents = document.querySelectorAll('[data-component]');\n if (reactComponents.length > 0) {\n import(/* webpackChunkName: \"containers/media_container\" */ '../mastodon/containers/media_container')\n .then(({ default: MediaContainer }) => {\n const content = document.createElement('div');\n\n ReactDOM.render(<MediaContainer locale={locale} components={reactComponents} />, content);\n document.body.appendChild(content);\n })\n .catch(error => console.error(error));\n }\n });\n\n delegate(document, '.webapp-btn', 'click', ({ target, button }) => {\n if (button !== 0) {\n return true;\n }\n window.location.href = target.href;\n return false;\n });\n\n delegate(document, '.status__content__spoiler-link', 'click', ({ target }) => {\n const contentEl = target.parentNode.parentNode.querySelector('.e-content');\n\n if (contentEl.style.display === 'block') {\n contentEl.style.display = 'none';\n target.parentNode.style.marginBottom = 0;\n } else {\n contentEl.style.display = 'block';\n target.parentNode.style.marginBottom = null;\n }\n\n return false;\n });\n\n delegate(document, '.account_display_name', 'input', ({ target }) => {\n const nameCounter = document.querySelector('.name-counter');\n\n if (nameCounter) {\n nameCounter.textContent = 30 - length(target.value);\n }\n });\n\n delegate(document, '.account_note', 'input', ({ target }) => {\n const noteCounter = document.querySelector('.note-counter');\n\n if (noteCounter) {\n noteCounter.textContent = 160 - length(target.value);\n }\n });\n\n delegate(document, '#account_avatar', 'change', ({ target }) => {\n const avatar = document.querySelector('.card.compact .avatar img');\n const [file] = target.files || [];\n const url = file ? URL.createObjectURL(file) : avatar.dataset.originalSrc;\n\n avatar.src = url;\n });\n\n delegate(document, '#account_header', 'change', ({ target }) => {\n const header = document.querySelector('.card.compact');\n const [file] = target.files || [];\n const url = file ? URL.createObjectURL(file) : header.dataset.originalSrc;\n\n header.style.backgroundImage = `url(${url})`;\n });\n}\n\nloadPolyfills().then(main).catch(error => {\n console.error(error);\n});\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/packs/public.js"],"sourceRoot":""} |