{"version":3,"sources":["webpack:///./node_modules/rellax/rellax.js","webpack:///./app/javascript/packs/public.js","webpack:///./app/javascript/mastodon/load_keyboard_extensions.js"],"names":["window","Rellax","el","options","self","Object","create","prototype","posY","screenY","posX","screenX","blocks","pause","loop","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","oRequestAnimationFrame","callback","setTimeout","loopId","supportsPassive","opts","defineProperty","get","addEventListener","removeEventListener","e","clearLoop","cancelAnimationFrame","mozCancelAnimationFrame","clearTimeout","transformProp","testEl","document","createElement","style","transform","vendors","vendor","undefined","validateCustomBreakpoints","breakpoints","length","Array","isArray","lastVal","isAscending","isNumerical","forEach","i","console","warn","speed","verticalSpeed","horizontalSpeed","center","wrapper","relativeToWrapper","round","vertical","horizontal","verticalScrollAxis","horizontalScrollAxis","keys","key","elements","querySelectorAll","elems","nodeType","querySelector","currentBreakpoint","getCurrentBreakpoint","w","bp","cacheBlocks","block","createBlock","push","init","cssText","innerHeight","innerWidth","setPosition","animate","update","mapBreakpoints","dataPercentage","getAttribute","dataSpeed","dataXsSpeed","dataMobileSpeed","dataTabletSpeed","dataDesktopSpeed","dataVerticalSpeed","dataHorizontalSpeed","dataVericalScrollAxis","dataHorizontalScrollAxis","dataZindex","dataMin","dataMax","dataMinX","dataMaxX","dataMinY","dataMaxY","wrapperPosY","scrollTop","pageYOffset","documentElement","body","offsetTop","scrollLeft","pageXOffset","blockTop","getBoundingClientRect","top","blockHeight","clientHeight","offsetHeight","scrollHeight","blockLeft","left","blockWidth","clientWidth","offsetWidth","scrollWidth","percentageY","percentageX","Number","bases","updatePosition","searchResult","exec","index","trimmedStyle","slice","delimiter","indexOf","replace","baseX","x","baseY","y","height","width","zindex","min","max","minX","maxX","minY","maxY","oldY","oldX","parentNode","scrollPosY","result","valueX","valueY","Math","deferredUpdate","passive","positions","toLowerCase","verticalScrollX","verticalScrollY","horizontalScrollX","positionY","positionX","translate","destroy","refresh","start","data","parent","type","ready","postMessage","id","getElementsByTagName","loadPolyfills","then","IntlMessageFormat","require","default","timeAgoString","delegate","emojify","getLocale","messages","ReactDOM","createBrowserHistory","scrollToDetailedStatus","history","detailedStatuses","location","state","scrolledToDetailedStatus","scrollIntoView","pathname","getEmojiAnimationHandler","swapTo","target","src","locale","lang","dateTimeFormat","Intl","DateTimeFormat","year","month","day","hour","minute","call","content","innerHTML","datetime","Date","formattedDate","format","title","textContent","now","formatMessage","values","defaultMessage","formatDate","date","getFullYear","includes","reactComponents","MediaContainer","component","children","child","removeChild","render","components","appendChild","catch","error","password","getElementById","confirmation","value","maxLength","setCustomValidity","statusEl","this","dataset","spoiler","spoilerLink","message","button","href","preventDefault","nodeName","open","name","escapeTextContentForBrowser","avatar","file","files","url","URL","createObjectURL","originalSrc","getProfileAvatarAnimationHandler","swapSrc","header","lock","checked","hidden","focus","select","setSelectionRange","input","oldReadOnly","readonly","execCommand","blur","classList","add","remove","err","toggle","closest","hostname","split","field","test","navigator","userAgent","arrowKeyNav","register","Promise","resolve"],"mappings":"gFAAA,sBAsBqB,oBAAXA,QAAyBA,OAV/B,EAAO,QAAW,0BAAP,EAUqC,WAClD,IAAIC,EAAS,SAAUC,EAAIC,GACzB,aAEA,IAAIC,EAAOC,OAAOC,OAAOL,EAAOM,WAC5BC,EAAO,EACPC,EAAU,EACVC,EAAO,EACPC,EAAU,EACVC,EAAS,GACTC,GAAQ,EAGRC,EAAOd,OAAOe,uBAAyBf,OAAOgB,6BAA+BhB,OAAOiB,0BAA4BjB,OAAOkB,yBAA2BlB,OAAOmB,wBAA0B,SAAUC,GAC/L,OAAOC,WAAWD,EAAU,IAAO,KAIjCE,EAAS,KAETC,GAAkB,EAEtB,IACE,IAAIC,EAAOnB,OAAOoB,eAAe,GAAI,UAAW,CAC9CC,IAAK,WACHH,GAAkB,KAGtBvB,OAAO2B,iBAAiB,cAAe,KAAMH,GAC7CxB,OAAO4B,oBAAoB,cAAe,KAAMJ,GAChD,MAAOK,IAGT,IAAIC,EAAY9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kH,EAAOqF,QAAQ,yBACjBvB,EAAM9D,EAAOqF,QAAQ,yBAAyBvM,aAAa,QAClDkH,EAAOqF,QAAQ,kBACxBvB,EAAM9D,EAAOqF,QAAQ,gBAAgBvM,aAAa,SAGhD1F,OAAOqM,SAAS6F,WAAaxB,EAAIyB,MAAM,KAAK,GAAGA,MAAM,KAAK,GAC5DnS,OAAOqM,SAAS4D,KAAOS,EAEvB1Q,OAAOoQ,KAAKM,EAAK,UAEZ,KAKT9E,EAASxJ,SAAU,mCAAoC,UAAU,KAC/D,CAAC,eAAgB,wBAAyB,4BAA6B,sCAAsCe,SAAQiI,IACnH,MAAMgH,EAAQhQ,SAASiN,eAAejE,GAClCgH,IACFA,EAAM7C,MAAQ,aAQnBhE,MCtTY,WACb,MAAI,QAAQ8G,KAAKC,UAAUC,WAJpB,+BAK6BhH,MAAKiH,IACrCA,EAAYC,cAGTC,QAAQC,aDiTdzD,OAAMC,IACL9L,QAAQ8L,MAAMA,Q","file":"js/public-37e61d75505fc4c95581.chunk.js","sourcesContent":["// ------------------------------------------\n// Rellax.js\n// Buttery smooth parallax library\n// Copyright (c) 2016 Moe Amaya (@moeamaya)\n// MIT license\n//\n// Thanks to Paraxify.js and Jaime Cabllero\n// for parallax concepts\n// ------------------------------------------\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.Rellax = factory();\n }\n})(typeof window !== \"undefined\" ? window : global, function () {\n var Rellax = function (el, options) {\n \"use strict\";\n\n var self = Object.create(Rellax.prototype);\n var posY = 0;\n var screenY = 0;\n var posX = 0;\n var screenX = 0;\n var blocks = [];\n var pause = true; // check what requestAnimationFrame to use, and if\n // it's not supported, use the onscroll event\n\n var loop = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function (callback) {\n return setTimeout(callback, 1000 / 60);\n }; // store the id for later use\n\n\n var loopId = null; // Test via a getter in the options object to see if the passive property is accessed\n\n var supportsPassive = false;\n\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function () {\n supportsPassive = true;\n }\n });\n window.addEventListener(\"testPassive\", null, opts);\n window.removeEventListener(\"testPassive\", null, opts);\n } catch (e) {} // check what cancelAnimation method to use\n\n\n var clearLoop = window.cancelAnimationFrame || window.mozCancelAnimationFrame || clearTimeout; // check which transform property to use\n\n var transformProp = window.transformProp || function () {\n var testEl = document.createElement('div');\n\n if (testEl.style.transform === null) {\n var vendors = ['Webkit', 'Moz', 'ms'];\n\n for (var vendor in vendors) {\n if (testEl.style[vendors[vendor] + 'Transform'] !== undefined) {\n return vendors[vendor] + 'Transform';\n }\n }\n }\n\n return 'transform';\n }(); // Default Settings\n\n\n self.options = {\n speed: -2,\n verticalSpeed: null,\n horizontalSpeed: null,\n breakpoints: [576, 768, 1201],\n center: false,\n wrapper: null,\n relativeToWrapper: false,\n round: true,\n vertical: true,\n horizontal: false,\n verticalScrollAxis: \"y\",\n horizontalScrollAxis: \"x\",\n callback: function () {}\n }; // User defined options (might have more in the future)\n\n if (options) {\n Object.keys(options).forEach(function (key) {\n self.options[key] = options[key];\n });\n }\n\n function validateCustomBreakpoints() {\n if (self.options.breakpoints.length === 3 && Array.isArray(self.options.breakpoints)) {\n var isAscending = true;\n var isNumerical = true;\n var lastVal;\n self.options.breakpoints.forEach(function (i) {\n if (typeof i !== 'number') isNumerical = false;\n\n if (lastVal !== null) {\n if (i < lastVal) isAscending = false;\n }\n\n lastVal = i;\n });\n if (isAscending && isNumerical) return;\n } // revert defaults if set incorrectly\n\n\n self.options.breakpoints = [576, 768, 1201];\n console.warn(\"Rellax: You must pass an array of 3 numbers in ascending order to the breakpoints option. Defaults reverted\");\n }\n\n if (options && options.breakpoints) {\n validateCustomBreakpoints();\n } // By default, rellax class\n\n\n if (!el) {\n el = '.rellax';\n } // check if el is a className or a node\n\n\n var elements = typeof el === 'string' ? document.querySelectorAll(el) : [el]; // Now query selector\n\n if (elements.length > 0) {\n self.elems = elements;\n } // The elements don't exist\n else {\n console.warn(\"Rellax: The elements you're trying to select don't exist.\");\n return;\n } // Has a wrapper and it exists\n\n\n if (self.options.wrapper) {\n if (!self.options.wrapper.nodeType) {\n var wrapper = document.querySelector(self.options.wrapper);\n\n if (wrapper) {\n self.options.wrapper = wrapper;\n } else {\n console.warn(\"Rellax: The wrapper you're trying to use doesn't exist.\");\n return;\n }\n }\n } // set a placeholder for the current breakpoint\n\n\n var currentBreakpoint; // helper to determine current breakpoint\n\n var getCurrentBreakpoint = function (w) {\n var bp = self.options.breakpoints;\n if (w < bp[0]) return 'xs';\n if (w >= bp[0] && w < bp[1]) return 'sm';\n if (w >= bp[1] && w < bp[2]) return 'md';\n return 'lg';\n }; // Get and cache initial position of all elements\n\n\n var cacheBlocks = function () {\n for (var i = 0; i < self.elems.length; i++) {\n var block = createBlock(self.elems[i]);\n blocks.push(block);\n }\n }; // Let's kick this script off\n // Build array for cached element values\n\n\n var init = function () {\n for (var i = 0; i < blocks.length; i++) {\n self.elems[i].style.cssText = blocks[i].style;\n }\n\n blocks = [];\n screenY = window.innerHeight;\n screenX = window.innerWidth;\n currentBreakpoint = getCurrentBreakpoint(screenX);\n setPosition();\n cacheBlocks();\n animate(); // If paused, unpause and set listener for window resizing events\n\n if (pause) {\n window.addEventListener('resize', init);\n pause = false; // Start the loop\n\n update();\n }\n }; // We want to cache the parallax blocks'\n // values: base, top, height, speed\n // el: is dom object, return: el cache values\n\n\n var createBlock = function (el) {\n var dataPercentage = el.getAttribute('data-rellax-percentage');\n var dataSpeed = el.getAttribute('data-rellax-speed');\n var dataXsSpeed = el.getAttribute('data-rellax-xs-speed');\n var dataMobileSpeed = el.getAttribute('data-rellax-mobile-speed');\n var dataTabletSpeed = el.getAttribute('data-rellax-tablet-speed');\n var dataDesktopSpeed = el.getAttribute('data-rellax-desktop-speed');\n var dataVerticalSpeed = el.getAttribute('data-rellax-vertical-speed');\n var dataHorizontalSpeed = el.getAttribute('data-rellax-horizontal-speed');\n var dataVericalScrollAxis = el.getAttribute('data-rellax-vertical-scroll-axis');\n var dataHorizontalScrollAxis = el.getAttribute('data-rellax-horizontal-scroll-axis');\n var dataZindex = el.getAttribute('data-rellax-zindex') || 0;\n var dataMin = el.getAttribute('data-rellax-min');\n var dataMax = el.getAttribute('data-rellax-max');\n var dataMinX = el.getAttribute('data-rellax-min-x');\n var dataMaxX = el.getAttribute('data-rellax-max-x');\n var dataMinY = el.getAttribute('data-rellax-min-y');\n var dataMaxY = el.getAttribute('data-rellax-max-y');\n var mapBreakpoints;\n var breakpoints = true;\n\n if (!dataXsSpeed && !dataMobileSpeed && !dataTabletSpeed && !dataDesktopSpeed) {\n breakpoints = false;\n } else {\n mapBreakpoints = {\n 'xs': dataXsSpeed,\n 'sm': dataMobileSpeed,\n 'md': dataTabletSpeed,\n 'lg': dataDesktopSpeed\n };\n } // initializing at scrollY = 0 (top of browser), scrollX = 0 (left of browser)\n // ensures elements are positioned based on HTML layout.\n //\n // If the element has the percentage attribute, the posY and posX needs to be\n // the current scroll position's value, so that the elements are still positioned based on HTML layout\n\n\n var wrapperPosY = self.options.wrapper ? self.options.wrapper.scrollTop : window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; // If the option relativeToWrapper is true, use the wrappers offset to top, subtracted from the current page scroll.\n\n if (self.options.relativeToWrapper) {\n var scrollPosY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;\n wrapperPosY = scrollPosY - self.options.wrapper.offsetTop;\n }\n\n var posY = self.options.vertical ? dataPercentage || self.options.center ? wrapperPosY : 0 : 0;\n var posX = self.options.horizontal ? dataPercentage || self.options.center ? self.options.wrapper ? self.options.wrapper.scrollLeft : window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft : 0 : 0;\n var blockTop = posY + el.getBoundingClientRect().top;\n var blockHeight = el.clientHeight || el.offsetHeight || el.scrollHeight;\n var blockLeft = posX + el.getBoundingClientRect().left;\n var blockWidth = el.clientWidth || el.offsetWidth || el.scrollWidth; // apparently parallax equation everyone uses\n\n var percentageY = dataPercentage ? dataPercentage : (posY - blockTop + screenY) / (blockHeight + screenY);\n var percentageX = dataPercentage ? dataPercentage : (posX - blockLeft + screenX) / (blockWidth + screenX);\n\n if (self.options.center) {\n percentageX = 0.5;\n percentageY = 0.5;\n } // Optional individual block speed as data attr, otherwise global speed\n\n\n var speed = breakpoints && mapBreakpoints[currentBreakpoint] !== null ? Number(mapBreakpoints[currentBreakpoint]) : dataSpeed ? dataSpeed : self.options.speed;\n var verticalSpeed = dataVerticalSpeed ? dataVerticalSpeed : self.options.verticalSpeed;\n var horizontalSpeed = dataHorizontalSpeed ? dataHorizontalSpeed : self.options.horizontalSpeed; // Optional individual block movement axis direction as data attr, otherwise gobal movement direction\n\n var verticalScrollAxis = dataVericalScrollAxis ? dataVericalScrollAxis : self.options.verticalScrollAxis;\n var horizontalScrollAxis = dataHorizontalScrollAxis ? dataHorizontalScrollAxis : self.options.horizontalScrollAxis;\n var bases = updatePosition(percentageX, percentageY, speed, verticalSpeed, horizontalSpeed); // ~~Store non-translate3d transforms~~\n // Store inline styles and extract transforms\n\n var style = el.style.cssText;\n var transform = ''; // Check if there's an inline styled transform\n\n var searchResult = /transform\\s*:/i.exec(style);\n\n if (searchResult) {\n // Get the index of the transform\n var index = searchResult.index; // Trim the style to the transform point and get the following semi-colon index\n\n var trimmedStyle = style.slice(index);\n var delimiter = trimmedStyle.indexOf(';'); // Remove \"transform\" string and save the attribute\n\n if (delimiter) {\n transform = \" \" + trimmedStyle.slice(11, delimiter).replace(/\\s/g, '');\n } else {\n transform = \" \" + trimmedStyle.slice(11).replace(/\\s/g, '');\n }\n }\n\n return {\n baseX: bases.x,\n baseY: bases.y,\n top: blockTop,\n left: blockLeft,\n height: blockHeight,\n width: blockWidth,\n speed: speed,\n verticalSpeed: verticalSpeed,\n horizontalSpeed: horizontalSpeed,\n verticalScrollAxis: verticalScrollAxis,\n horizontalScrollAxis: horizontalScrollAxis,\n style: style,\n transform: transform,\n zindex: dataZindex,\n min: dataMin,\n max: dataMax,\n minX: dataMinX,\n maxX: dataMaxX,\n minY: dataMinY,\n maxY: dataMaxY\n };\n }; // set scroll position (posY, posX)\n // side effect method is not ideal, but okay for now\n // returns true if the scroll changed, false if nothing happened\n\n\n var setPosition = function () {\n var oldY = posY;\n var oldX = posX;\n posY = self.options.wrapper ? self.options.wrapper.scrollTop : (document.documentElement || document.body.parentNode || document.body).scrollTop || window.pageYOffset;\n posX = self.options.wrapper ? self.options.wrapper.scrollLeft : (document.documentElement || document.body.parentNode || document.body).scrollLeft || window.pageXOffset; // If option relativeToWrapper is true, use relative wrapper value instead.\n\n if (self.options.relativeToWrapper) {\n var scrollPosY = (document.documentElement || document.body.parentNode || document.body).scrollTop || window.pageYOffset;\n posY = scrollPosY - self.options.wrapper.offsetTop;\n }\n\n if (oldY != posY && self.options.vertical) {\n // scroll changed, return true\n return true;\n }\n\n if (oldX != posX && self.options.horizontal) {\n // scroll changed, return true\n return true;\n } // scroll did not change\n\n\n return false;\n }; // Ahh a pure function, gets new transform value\n // based on scrollPosition and speed\n // Allow for decimal pixel values\n\n\n var updatePosition = function (percentageX, percentageY, speed, verticalSpeed, horizontalSpeed) {\n var result = {};\n var valueX = (horizontalSpeed ? horizontalSpeed : speed) * (100 * (1 - percentageX));\n var valueY = (verticalSpeed ? verticalSpeed : speed) * (100 * (1 - percentageY));\n result.x = self.options.round ? Math.round(valueX) : Math.round(valueX * 100) / 100;\n result.y = self.options.round ? Math.round(valueY) : Math.round(valueY * 100) / 100;\n return result;\n }; // Remove event listeners and loop again\n\n\n var deferredUpdate = function () {\n window.removeEventListener('resize', deferredUpdate);\n window.removeEventListener('orientationchange', deferredUpdate);\n (self.options.wrapper ? self.options.wrapper : window).removeEventListener('scroll', deferredUpdate);\n (self.options.wrapper ? self.options.wrapper : document).removeEventListener('touchmove', deferredUpdate); // loop again\n\n loopId = loop(update);\n }; // Loop\n\n\n var update = function () {\n if (setPosition() && pause === false) {\n animate(); // loop again\n\n loopId = loop(update);\n } else {\n loopId = null; // Don't animate until we get a position updating event\n\n window.addEventListener('resize', deferredUpdate);\n window.addEventListener('orientationchange', deferredUpdate);\n (self.options.wrapper ? self.options.wrapper : window).addEventListener('scroll', deferredUpdate, supportsPassive ? {\n passive: true\n } : false);\n (self.options.wrapper ? self.options.wrapper : document).addEventListener('touchmove', deferredUpdate, supportsPassive ? {\n passive: true\n } : false);\n }\n }; // Transform3d on parallax element\n\n\n var animate = function () {\n var positions;\n\n for (var i = 0; i < self.elems.length; i++) {\n // Determine relevant movement directions\n var verticalScrollAxis = blocks[i].verticalScrollAxis.toLowerCase();\n var horizontalScrollAxis = blocks[i].horizontalScrollAxis.toLowerCase();\n var verticalScrollX = verticalScrollAxis.indexOf(\"x\") != -1 ? posY : 0;\n var verticalScrollY = verticalScrollAxis.indexOf(\"y\") != -1 ? posY : 0;\n var horizontalScrollX = horizontalScrollAxis.indexOf(\"x\") != -1 ? posX : 0;\n var horizontalScrollY = horizontalScrollAxis.indexOf(\"y\") != -1 ? posX : 0;\n var percentageY = (verticalScrollY + horizontalScrollY - blocks[i].top + screenY) / (blocks[i].height + screenY);\n var percentageX = (verticalScrollX + horizontalScrollX - blocks[i].left + screenX) / (blocks[i].width + screenX); // Subtracting initialize value, so element stays in same spot as HTML\n\n positions = updatePosition(percentageX, percentageY, blocks[i].speed, blocks[i].verticalSpeed, blocks[i].horizontalSpeed);\n var positionY = positions.y - blocks[i].baseY;\n var positionX = positions.x - blocks[i].baseX; // The next two \"if\" blocks go like this:\n // Check if a limit is defined (first \"min\", then \"max\");\n // Check if we need to change the Y or the X\n // (Currently working only if just one of the axes is enabled)\n // Then, check if the new position is inside the allowed limit\n // If so, use new position. If not, set position to limit.\n // Check if a min limit is defined\n\n if (blocks[i].min !== null) {\n if (self.options.vertical && !self.options.horizontal) {\n positionY = positionY <= blocks[i].min ? blocks[i].min : positionY;\n }\n\n if (self.options.horizontal && !self.options.vertical) {\n positionX = positionX <= blocks[i].min ? blocks[i].min : positionX;\n }\n } // Check if directional min limits are defined\n\n\n if (blocks[i].minY != null) {\n positionY = positionY <= blocks[i].minY ? blocks[i].minY : positionY;\n }\n\n if (blocks[i].minX != null) {\n positionX = positionX <= blocks[i].minX ? blocks[i].minX : positionX;\n } // Check if a max limit is defined\n\n\n if (blocks[i].max !== null) {\n if (self.options.vertical && !self.options.horizontal) {\n positionY = positionY >= blocks[i].max ? blocks[i].max : positionY;\n }\n\n if (self.options.horizontal && !self.options.vertical) {\n positionX = positionX >= blocks[i].max ? blocks[i].max : positionX;\n }\n } // Check if directional max limits are defined\n\n\n if (blocks[i].maxY != null) {\n positionY = positionY >= blocks[i].maxY ? blocks[i].maxY : positionY;\n }\n\n if (blocks[i].maxX != null) {\n positionX = positionX >= blocks[i].maxX ? blocks[i].maxX : positionX;\n }\n\n var zindex = blocks[i].zindex; // Move that element\n // (Set the new translation and append initial inline transforms.)\n\n var translate = 'translate3d(' + (self.options.horizontal ? positionX : '0') + 'px,' + (self.options.vertical ? positionY : '0') + 'px,' + zindex + 'px) ' + blocks[i].transform;\n self.elems[i].style[transformProp] = translate;\n }\n\n self.options.callback(positions);\n };\n\n self.destroy = function () {\n for (var i = 0; i < self.elems.length; i++) {\n self.elems[i].style.cssText = blocks[i].style;\n } // Remove resize event listener if not pause, and pause\n\n\n if (!pause) {\n window.removeEventListener('resize', init);\n pause = true;\n } // Clear the animation loop to prevent possible memory leak\n\n\n clearLoop(loopId);\n loopId = null;\n }; // Init\n\n\n init(); // Allow to recalculate the initial values whenever we want\n\n self.refresh = init;\n return self;\n };\n\n return Rellax;\n});","import './public-path';\nimport escapeTextContentForBrowser from 'escape-html';\nimport loadPolyfills from '../mastodon/load_polyfills';\nimport ready from '../mastodon/ready';\nimport { start } from '../mastodon/common';\nimport loadKeyboardExtensions from '../mastodon/load_keyboard_extensions';\n\nstart();\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 IntlMessageFormat = require('intl-messageformat').default;\n const { timeAgoString } = require('../mastodon/components/relative_timestamp');\n const { delegate } = require('@rails/ujs');\n const emojify = require('../mastodon/features/emoji/emoji').default;\n const { getLocale } = require('../mastodon/locales');\n const { messages } = getLocale();\n const React = require('react');\n const ReactDOM = require('react-dom');\n const Rellax = require('rellax');\n const { createBrowserHistory } = require('history');\n\n const scrollToDetailedStatus = () => {\n const history = createBrowserHistory();\n const detailedStatuses = document.querySelectorAll('.public-layout .detailed-status');\n const location = history.location;\n\n if (detailedStatuses.length === 1 && (!location.state || !location.state.scrolledToDetailedStatus)) {\n detailedStatuses[0].scrollIntoView();\n history.replace(location.pathname, { ...location.state, scrolledToDetailedStatus: true });\n }\n };\n\n const getEmojiAnimationHandler = (swapTo) => {\n return ({ target }) => {\n target.src = target.getAttribute(swapTo);\n };\n };\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 [].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 const now = new Date();\n\n content.title = dateTimeFormat.format(datetime);\n content.textContent = timeAgoString({\n formatMessage: ({ id, defaultMessage }, values) => (new IntlMessageFormat(messages[id] || defaultMessage, locale)).format(values),\n formatDate: (date, options) => (new Intl.DateTimeFormat(locale, options)).format(date),\n }, datetime, now, now.getFullYear(), content.getAttribute('datetime').includes('T'));\n });\n\n const reactComponents = document.querySelectorAll('[data-component]');\n\n if (reactComponents.length > 0) {\n import(/* webpackChunkName: \"containers/media_container\" */ '../mastodon/containers/media_container')\n .then(({ default: MediaContainer }) => {\n [].forEach.call(reactComponents, (component) => {\n [].forEach.call(component.children, (child) => {\n component.removeChild(child);\n });\n });\n\n const content = document.createElement('div');\n\n ReactDOM.render(, content);\n document.body.appendChild(content);\n scrollToDetailedStatus();\n })\n .catch(error => {\n console.error(error);\n scrollToDetailedStatus();\n });\n } else {\n scrollToDetailedStatus();\n }\n\n const parallaxComponents = document.querySelectorAll('.parallax');\n\n if (parallaxComponents.length > 0 ) {\n new Rellax('.parallax', { speed: -1 });\n }\n\n delegate(document, '#registration_user_password_confirmation,#registration_user_password', 'input', () => {\n const password = document.getElementById('registration_user_password');\n const confirmation = document.getElementById('registration_user_password_confirmation');\n if (confirmation.value && confirmation.value.length > password.maxLength) {\n confirmation.setCustomValidity((new IntlMessageFormat(messages['password_confirmation.exceeds_maxlength'] || 'Password confirmation exceeds the maximum password length', locale)).format());\n } else if (password.value && password.value !== confirmation.value) {\n confirmation.setCustomValidity((new IntlMessageFormat(messages['password_confirmation.mismatching'] || 'Password confirmation does not match', locale)).format());\n } else {\n confirmation.setCustomValidity('');\n }\n });\n\n delegate(document, '#user_password,#user_password_confirmation', 'input', () => {\n const password = document.getElementById('user_password');\n const confirmation = document.getElementById('user_password_confirmation');\n if (!confirmation) return;\n\n if (confirmation.value && confirmation.value.length > password.maxLength) {\n confirmation.setCustomValidity((new IntlMessageFormat(messages['password_confirmation.exceeds_maxlength'] || 'Password confirmation exceeds the maximum password length', locale)).format());\n } else if (password.value && password.value !== confirmation.value) {\n confirmation.setCustomValidity((new IntlMessageFormat(messages['password_confirmation.mismatching'] || 'Password confirmation does not match', locale)).format());\n } else {\n confirmation.setCustomValidity('');\n }\n });\n\n delegate(document, '.custom-emoji', 'mouseover', getEmojiAnimationHandler('data-original'));\n delegate(document, '.custom-emoji', 'mouseout', getEmojiAnimationHandler('data-static'));\n\n delegate(document, '.status__content__spoiler-link', 'click', function() {\n const statusEl = this.parentNode.parentNode;\n\n if (statusEl.dataset.spoiler === 'expanded') {\n statusEl.dataset.spoiler = 'folded';\n this.textContent = (new IntlMessageFormat(messages['status.show_more'] || 'Show more', locale)).format();\n } else {\n statusEl.dataset.spoiler = 'expanded';\n this.textContent = (new IntlMessageFormat(messages['status.show_less'] || 'Show less', locale)).format();\n }\n\n return false;\n });\n\n [].forEach.call(document.querySelectorAll('.status__content__spoiler-link'), (spoilerLink) => {\n const statusEl = spoilerLink.parentNode.parentNode;\n const message = (statusEl.dataset.spoiler === 'expanded') ? (messages['status.show_less'] || 'Show less') : (messages['status.show_more'] || 'Show more');\n spoilerLink.textContent = (new IntlMessageFormat(message, locale)).format();\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, '.modal-button', 'click', e => {\n e.preventDefault();\n\n let href;\n\n if (e.target.nodeName !== 'A') {\n href = e.target.parentNode.href;\n } else {\n href = e.target.href;\n }\n\n window.open(href, 'mastodon-intent', 'width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes');\n });\n\n delegate(document, '#account_display_name', 'input', ({ target }) => {\n const name = document.querySelector('.card .display-name strong');\n if (name) {\n if (target.value) {\n name.innerHTML = emojify(escapeTextContentForBrowser(target.value));\n } else {\n name.textContent = target.dataset.default;\n }\n }\n });\n\n delegate(document, '#account_avatar', 'change', ({ target }) => {\n const avatar = document.querySelector('.card .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 const getProfileAvatarAnimationHandler = (swapTo) => {\n //animate avatar gifs on the profile page when moused over\n return ({ target }) => {\n const swapSrc = target.getAttribute(swapTo);\n //only change the img source if autoplay is off and the image src is actually different\n if(target.getAttribute('data-autoplay') !== 'true' && target.src !== swapSrc) {\n target.src = swapSrc;\n }\n };\n };\n\n delegate(document, 'img#profile_page_avatar', 'mouseover', getProfileAvatarAnimationHandler('data-original'));\n\n delegate(document, 'img#profile_page_avatar', 'mouseout', getProfileAvatarAnimationHandler('data-static'));\n\n delegate(document, '#account_header', 'change', ({ target }) => {\n const header = document.querySelector('.card .card__img img');\n const [file] = target.files || [];\n const url = file ? URL.createObjectURL(file) : header.dataset.originalSrc;\n\n header.src = url;\n });\n\n delegate(document, '#account_locked', 'change', ({ target }) => {\n const lock = document.querySelector('.card .display-name i');\n\n if (lock) {\n if (target.checked) {\n delete lock.dataset.hidden;\n } else {\n lock.dataset.hidden = 'true';\n }\n }\n });\n\n delegate(document, '.input-copy input', 'click', ({ target }) => {\n target.focus();\n target.select();\n target.setSelectionRange(0, target.value.length);\n });\n\n delegate(document, '.input-copy button', 'click', ({ target }) => {\n const input = target.parentNode.querySelector('.input-copy__wrapper input');\n\n const oldReadOnly = input.readonly;\n\n input.readonly = false;\n input.focus();\n input.select();\n input.setSelectionRange(0, input.value.length);\n\n try {\n if (document.execCommand('copy')) {\n input.blur();\n target.parentNode.classList.add('copied');\n\n setTimeout(() => {\n target.parentNode.classList.remove('copied');\n }, 700);\n }\n } catch (err) {\n console.error(err);\n }\n\n input.readonly = oldReadOnly;\n });\n\n delegate(document, '.sidebar__toggle__icon', 'click', () => {\n document.querySelector('.sidebar ul').classList.toggle('visible');\n });\n\n delegate(document, '.quote-status', 'click', ({ target }) => {\n if (target.closest('.status__content__spoiler-link') ||\n target.closest('.media-gallery') ||\n target.closest('.video-player') ||\n target.closest('.audio-player')) {\n return false;\n }\n\n let url = target.closest('.quote-status').getAttribute('dataurl');\n if (target.closest('.status__display-name')) {\n url = target.closest('.status__display-name').getAttribute('href');\n } else if (target.closest('.status-card')) {\n url = target.closest('.status-card').getAttribute('href');\n }\n\n if (window.location.hostname === url.split('/')[2].split(':')[0]) {\n window.location.href = url;\n } else {\n window.open(url, 'blank');\n }\n return false;\n });\n\n // Empty the honeypot fields in JS in case something like an extension\n // automatically filled them.\n delegate(document, '#registration_new_user,#new_user', 'submit', () => {\n ['user_website', 'user_confirm_password', 'registration_user_website', 'registration_user_confirm_password'].forEach(id => {\n const field = document.getElementById(id);\n if (field) {\n field.value = '';\n }\n });\n });\n}\n\nloadPolyfills()\n .then(main)\n .then(loadKeyboardExtensions)\n .catch(error => {\n console.error(error);\n });\n","// On KaiOS, we may not be able to use a mouse cursor or navigate using Tab-based focus, so we install\n// special left/right focus navigation keyboard listeners, at least on public pages (i.e. so folks\n// can at least log in using KaiOS devices).\n\nfunction importArrowKeyNavigation() {\n return import(/* webpackChunkName: \"arrow-key-navigation\" */ 'arrow-key-navigation');\n}\n\nexport default function loadKeyboardExtensions() {\n if (/KAIOS/.test(navigator.userAgent)) {\n return importArrowKeyNavigation().then(arrowKeyNav => {\n arrowKeyNav.register();\n });\n }\n return Promise.resolve();\n}\n"],"sourceRoot":""}