pleroma/priv/static/packs/flavours/glitch/async/compose.js.map

1 line
67 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/compose/containers/compose_form_container.js","webpack:///./node_modules/rails-ujs/lib/assets/compiled/rails-ujs.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/compose/containers/navigation_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/compose/components/header.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/compose/containers/header_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/util/log_out.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/compose/index.js"],"names":["messages","defineMessages","missingDescriptionMessage","missingDescriptionConfirm","missingDescriptionEdit","injectIntl","connect","state","spoilersAlwaysOn","getIn","inReplyTo","replyPrivacy","sideArmBasePrivacy","sideArmRestrictedPrivacy","privacyPreference","sideArmPrivacy","advancedOptions","focusDate","caretPosition","isSubmitting","isChangingUpload","isUploading","layout","media","preselectDate","privacy","sideArm","sensitive","showSearch","spoiler","spoilerText","suggestions","text","anyMedia","size","mediaDescriptionConfirmation","preselectOnReply","dispatch","intl","onChange","changeCompose","onSubmit","routerHistory","submitCompose","onClearSuggestions","clearComposeSuggestions","onFetchSuggestions","token","fetchComposeSuggestions","onSuggestionSelected","position","suggestion","path","selectComposeSuggestion","onChangeSpoilerText","changeComposeSpoilerText","onPaste","files","uploadCompose","onPickEmoji","emoji","insertEmojiCompose","onChangeSpoilerness","changeComposeSpoilerness","onChangeVisibility","value","changeComposeVisibility","onMediaDescriptionConfirm","mediaId","openModal","message","formatMessage","confirm","onConfirm","secondary","onSecondary","id","onDoNotAsk","changeLocalSetting","ComposeForm","this","Rails","linkClickSelector","buttonClickSelector","selector","exclude","inputChangeSelector","formSubmitSelector","formInputClickSelector","formDisableSelector","formEnableSelector","fileInputSelector","linkDisableSelector","buttonDisableSelector","call","nonce","loadCSPNonce","ref","document","querySelector","content","cspNonce","m","Element","prototype","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","element","getData","key","setData","$","Array","slice","querySelectorAll","csrfParam","csrfToken","meta","CSRFProtection","xhr","setRequestHeader","refreshCSRFTokens","param","forEach","input","CustomEvent","fire","preventDefault","window","event","params","evt","createEvent","initCustomEvent","bubbles","cancelable","detail","Event","result","defaultPrevented","Object","defineProperty","get","obj","name","data","dispatchEvent","stopEverything","e","target","stopPropagation","stopImmediatePropagation","delegate","eventType","handler","addEventListener","parentNode","AcceptHeaders","createXHR","prepareOptions","processResponse","html","xml","json","script","ajax","options","response","responseText","getResponseHeader","Math","floor","status","success","statusText","error","complete","beforeSend","readyState","XMLHttpRequest","OPENED","send","url","location","href","type","toUpperCase","indexOf","dataType","accept","done","open","crossDomain","withCredentials","onreadystatechange","DONE","parser","match","JSON","parse","createElement","setAttribute","head","appendChild","removeChild","DOMParser","replace","parseFromString","isCrossDomain","originAnchor","urlAnchor","protocol","host","toArray","serializeElement","additionalParam","inputs","elements","disabled","option","selected","push","checked","map","encodeURIComponent","join","formElements","form","filter","el","allowAction","handleConfirm","answer","callback","getAttribute","disableFormElement","disableFormElements","disableLinkElement","enableFormElement","enableFormElements","enableLinkElement","handleDisabledElement","enableElement","disableElement","replacement","innerHTML","originalText","removeEventListener","handleMethod","formContent","method","action","style","display","body","click","isRemote","handleRemote","button","enctype","FormData","append","args","arguments","length","formSubmitButtonClick","formNoValidate","preventInsignificantClick","insignificantMetaClick","metaKey","ctrlKey","jQuery","rails","Error","ajaxPrefilter","originalOptions","start","_rails_loaded","setTimeout","module","exports","account","me","NavigationBar","community","home_timeline","logout","notifications","public","settings","Header","props","onLogout","render","columns","unreadNotifications","showNotificationsBadge","onSettingsClick","renderForColumn","conditionalRender","bind","columnId","some","column","className","Link","aria-label","title","to","onClick","handleLogoutClick","signOutLink","ImmutablePureComponent","ImmutablePropTypes","list","PropTypes","number","bool","object","func","isRequired","logoutMessage","logoutConfirm","methodInput","csrfInput","submitButton","logOut","compose","Compose","ownProps","multiColumn","isSearchPage","onMount","mountCompose","onUnmount","unmountCompose","componentDidMount","componentWillUnmount","computedClass","classNames","role","mascot","alt","draggable","src","defaultStyle","x","spring","stiffness","damping","transform","visibility","React","PureComponent"],"mappings":"2FAAA,8DAsBMA,EAAWC,YAAe,CAC9BC,0BAA0B,CAAD,6NAEzBC,0BAA0B,CAAD,mFAEzBC,uBAAuB,CAAD,iFAsGTC,gBAAWC,mBAjG1B,SAA0BC,GACxB,IAAMC,EAAmBD,EAAME,MAAM,CAAC,iBAAkB,+BAClDC,EAAYH,EAAME,MAAM,CAAC,UAAW,gBACpCE,EAAeD,EAAYH,EAAME,MAAM,CAAC,WAAYC,EAAW,eAAiB,KAChFE,EAAqBL,EAAME,MAAM,CAAC,iBAAkB,aACpDI,EAA2BF,EAAeG,YAAkBH,EAAcC,GAAsB,KAClGG,EAAiB,KACrB,OAAQR,EAAME,MAAM,CAAC,iBAAkB,yBACrC,IAAK,OACHM,EAAiBJ,EACjB,MACF,IAAK,WACHI,EAAiBF,EAIrB,OADAE,EAAiBA,GAAkBH,EAC5B,CACLI,gBAAiBT,EAAME,MAAM,CAAC,UAAW,qBACzCQ,UAAWV,EAAME,MAAM,CAAC,UAAW,cACnCS,cAAeX,EAAME,MAAM,CAAC,UAAW,kBACvCU,aAAcZ,EAAME,MAAM,CAAC,UAAW,kBACtCW,iBAAkBb,EAAME,MAAM,CAAC,UAAW,uBAC1CY,YAAad,EAAME,MAAM,CAAC,UAAW,iBACrCa,OAAQf,EAAME,MAAM,CAAC,iBAAkB,WACvCc,MAAOhB,EAAME,MAAM,CAAC,UAAW,sBAC/Be,cAAejB,EAAME,MAAM,CAAC,UAAW,kBACvCgB,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,mBAAKA,UAAU,gCAAf,EACGqC,IAAS,mBAAKC,IAAI,GAAGC,UAAU,QAAQC,IAAKH,MAAa,sBAAQrC,UAAU,eAIhF,YAAC,IAAD,CAAQyC,aAAc,CAAEC,EAAGf,EAAe,GAAK,KAAO/E,MAAO,CAAE8F,EAAGC,IAAOnU,GAAcmT,EAAe,GAAK,IAAK,CAAEiB,UAAW,IAAKC,QAAS,YAA3I,GACG,gBAAGH,EAAH,EAAGA,EAAH,OACC,mBAAK1C,UAAU,uBAAuBpD,MAAO,CAAEkG,UAAU,cAAeJ,EAAhB,KAAuBK,YAAmB,MAAPL,EAAa,SAAW,iBAAnH,EACE,YAAC,IAAD,W,GAvDMM,IAAMC,iB","file":"flavours/glitch/async/compose.js","sourcesContent":["import { connect } from 'react-redux';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ComposeForm from '../components/compose_form';\nimport {\n changeCompose,\n changeComposeSpoilerText,\n changeComposeSpoilerness,\n changeComposeVisibility,\n clearComposeSuggestions,\n fetchComposeSuggestions,\n insertEmojiCompose,\n selectComposeSuggestion,\n submitCompose,\n uploadCompose,\n} from 'flavours/glitch/actions/compose';\nimport {\n openModal,\n} from 'flavours/glitch/actions/modal';\nimport { changeLocalSetting } from 'flavours/glitch/actions/local_settings';\n\nimport { privacyPreference } from 'flavours/glitch/util/privacy_preference';\n\nconst messages = defineMessages({\n missingDescriptionMessage: { id: 'confirmations.missing_media_description.message',\n defaultMessage: 'At least one media attachment is lacking a description. Consider describing all media attachments for the visually impaired before sending your toot.' },\n missingDescriptionConfirm: { id: 'confirmations.missing_media_description.confirm',\n defaultMessage: 'Send anyway' },\n missingDescriptionEdit: { id: 'confirmations.missing_media_description.edit',\n defaultMessage: 'Edit media' },\n});\n\n// State mapping.\nfunction mapStateToProps (state) {\n const spoilersAlwaysOn = state.getIn(['local_settings', 'always_show_spoilers_field']);\n const inReplyTo = state.getIn(['compose', 'in_reply_to']);\n const replyPrivacy = inReplyTo ? state.getIn(['statuses', inReplyTo, 'visibility']) : null;\n const sideArmBasePrivacy = state.getIn(['local_settings', 'side_arm']);\n const sideArmRestrictedPrivacy = replyPrivacy ? privacyPreference(replyPrivacy, sideArmBasePrivacy) : null;\n let sideArmPrivacy = null;\n switch (state.getIn(['local_settings', 'side_arm_reply_mode'])) {\n case 'copy':\n sideArmPrivacy = replyPrivacy;\n break;\n case 'restrict':\n sideArmPrivacy = sideArmRestrictedPrivacy;\n break;\n }\n sideArmPrivacy = sideArmPrivacy || sideArmBasePrivacy;\n return {\n advancedOptions: state.getIn(['compose', 'advanced_options']),\n focusDate: state.getIn(['compose', 'focusDate']),\n caretPosition: state.getIn(['compose', 'caretPosition']),\n isSubmitting: state.getIn(['compose', 'is_submitting']),\n isChangingUpload: state.getIn(['compose', 'is_changing_upload']),\n isUploading: state.getIn(['compose', 'is_uploading']),\n layout: state.getIn(['local_settings', 'layout']),\n media: state.getIn(['compose', 'media_attachments']),\n preselectDate: state.getIn(['compose', 'preselectDate']),\n privacy: state.getIn(['compose', 'privacy']),\n sideArm: sideArmPrivacy,\n sensitive: state.getIn(['compose', 'sensitive']),\n showSearch: state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']),\n spoiler: spoilersAlwaysOn || state.getIn(['compose', 'spoiler']),\n spoilerText: state.getIn(['compose', 'spoiler_text']),\n suggestions: state.getIn(['compose', 'suggestions']),\n text: state.getIn(['compose', 'text']),\n anyMedia: state.getIn(['compose', 'media_attachments']).size > 0,\n spoilersAlwaysOn: spoilersAlwaysOn,\n mediaDescriptionConfirmation: state.getIn(['local_settings', 'confirm_missing_media_description']),\n preselectOnReply: state.getIn(['local_settings', 'preselect_on_reply']),\n };\n};\n\n// Dispatch mapping.\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n\n onChange(text) {\n dispatch(changeCompose(text));\n },\n\n onSubmit(routerHistory) {\n dispatch(submitCompose(routerHistory));\n },\n\n onClearSuggestions() {\n dispatch(clearComposeSuggestions());\n },\n\n onFetchSuggestions(token) {\n dispatch(fetchComposeSuggestions(token));\n },\n\n onSuggestionSelected(position, token, suggestion, path) {\n dispatch(selectComposeSuggestion(position, token, suggestion, path));\n },\n\n onChangeSpoilerText(text) {\n dispatch(changeComposeSpoilerText(text));\n },\n\n onPaste(files) {\n dispatch(uploadCompose(files));\n },\n\n onPickEmoji(position, emoji) {\n dispatch(insertEmojiCompose(position, emoji));\n },\n\n onChangeSpoilerness() {\n dispatch(changeComposeSpoilerness());\n },\n\n onChangeVisibility(value) {\n dispatch(changeComposeVisibility(value));\n },\n\n onMediaDescriptionConfirm(routerHistory, mediaId) {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(messages.missingDescriptionMessage),\n confirm: intl.formatMessage(messages.missingDescriptionConfirm),\n onConfirm: () => dispatch(submitCompose(routerHistory)),\n secondary: intl.formatMessage(messages.missingDescriptionEdit),\n onSecondary: () => dispatch(openModal('FOCAL_POINT', { id: mediaId })),\n onDoNotAsk: () => dispatch(changeLocalSetting(['confirm_missing_media_description'], false)),\n }));\n },\n\n});\n\nexport default injectIntl(connect(mapStateToProps, mapDispatchToProps)(ComposeForm));\n","/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/master/actionview/app/assets/javascripts\nReleased under the MIT license\n */\n;\n(function () {\n var context = this;\n (function () {\n (function () {\n this.Rails = {\n linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n buttonClickSelector: {\n selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n exclude: 'form button'\n },\n inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n formSubmitSelector: 'form',\n formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n fileInputSelector: 'input[name][type=file]:not([disabled])',\n linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n };\n }).call(this);\n }).call(context);\n var Rails = context.Rails;\n (function () {\n (function () {\n var nonce;\n nonce = null;\n\n Rails.loadCSPNonce = function () {\n var ref;\n return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n };\n\n Rails.cspNonce = function () {\n return nonce != null ? nonce : Rails.loadCSPNonce();\n };\n }).call(this);\n (function () {\n var expando, m;\n m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n Rails.matches = function (element, selector) {\n if (selector.exclude != null) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n };\n\n expando = '_ujsData';\n\n Rails.getData = function (element, key) {\n var ref;\n return (ref = element[expando]) != null ? ref[key] : void 0;\n };\n\n Rails.setData = function (element, key, value) {\n if (element[expando] == null) {\n element[expando] = {};\n }\n\n return element[expando][key] = value;\n };\n\n Rails.$ = function (selector) {\n return Array.prototype.slice.call(document.querySelectorAll(selector));\n };\n }).call(this);\n (function () {\n var $, csrfParam, csrfToken;\n $ = Rails.$;\n\n csrfToken = Rails.csrfToken = function () {\n var meta;\n meta = document.querySelector('meta[name=csrf-token]');\n return meta && meta.content;\n };\n\n csrfParam = Rails.csrfParam = function () {\n var meta;\n meta = document.querySelector('meta[name=csrf-param]');\n return meta && meta.content;\n };\n\n Rails.CSRFProtection = function (xhr) {\n var token;\n token = csrfToken();\n\n if (token != null) {\n return xhr.setRequestHeader('X-CSRF-Token', token);\n }\n };\n\n Rails.refreshCSRFTokens = function () {\n var param, token;\n token = csrfToken();\n param = csrfParam();\n\n if (token != null && param != null) {\n return $('form input[name=\"' + param + '\"]').forEach(function (input) {\n return input.value = token;\n });\n }\n };\n }).call(this);\n (function () {\n var CustomEvent, fire, matches, preventDefault;\n matches = Rails.matches;\n CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function CustomEvent(event, params) {\n var evt;\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n preventDefault = CustomEvent.prototype.preventDefault;\n\n CustomEvent.prototype.preventDefault = function () {\n var result;\n result = preventDefault.call(this);\n\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function get() {\n return true;\n }\n });\n }\n\n return result;\n };\n }\n\n fire = Rails.fire = function (obj, name, data) {\n var event;\n event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n };\n\n Rails.stopEverything = function (e) {\n fire(e.target, 'ujs:everythingStopped');\n e.preventDefault();\n e.stopPropagation();\n return e.stopImmediatePropagation();\n };\n\n Rails.delegate = function (element, selector, eventType, handler) {\n return element.addEventListener(eventType, function (e) {\n var target;\n target = e.target;\n\n while (!(!(target instanceof Element) || matches(target, selector))) {\n target = target.parentNode;\n }\n\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n return e.stopPropagation();\n }\n });\n };\n }).call(this);\n (function () {\n var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n AcceptHeaders = {\n '*': '*/*',\n text: 'text/plain',\n html: 'text/html',\n xml: 'application/xml, text/xml',\n json: 'application/json, text/javascript',\n script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n };\n\n Rails.ajax = function (options) {\n var xhr;\n options = prepareOptions(options);\n xhr = createXHR(options, function () {\n var ref, response;\n response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n });\n\n if (options.beforeSend != null && !options.beforeSend(xhr, options)) {\n return false;\n }\n\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n };\n\n prepareOptions = function prepareOptions(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n\n if (options.type === 'GET' && options.data) {\n if (options.url.indexOf('?') < 0) {\n options.url += '?' + options.data;\n } else {\n options.url += '&' + options.data;\n }\n }\n\n if (AcceptHeaders[options.dataType] == null) {\n options.dataType = '*';\n }\n\n options.accept = AcceptHeaders[options.dataType];\n\n if (options.dataType !== '*') {\n options.accept += ', */*; q=0.01';\n }\n\n return options;\n };\n\n createXHR = function createXHR(options, done) {\n var xhr;\n xhr = new XMLHttpRequest();\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader('Accept', options.accept);\n\n if (typeof options.data === 'string') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n }\n\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n }\n\n CSRFProtection(xhr);\n xhr.withCredentials = !!options.withCredentials;\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n\n return xhr;\n };\n\n processResponse = function processResponse(response, type) {\n var parser, script;\n\n if (typeof response === 'string' && typeof type === 'string') {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n script = document.createElement('script');\n script.setAttribute('nonce', cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n parser = new DOMParser();\n type = type.replace(/;.+/, '');\n\n try {\n response = parser.parseFromString(response, type);\n } catch (error) {}\n }\n }\n\n return response;\n };\n\n Rails.href = function (element) {\n return element.href;\n };\n\n Rails.isCrossDomain = function (url) {\n var e, originAnchor, urlAnchor;\n originAnchor = document.createElement('a');\n originAnchor.href = location.href;\n urlAnchor = document.createElement('a');\n\n try {\n urlAnchor.href = url;\n return !((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host || originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host);\n } catch (error) {\n e = error;\n return true;\n }\n };\n }).call(this);\n (function () {\n var matches, toArray;\n matches = Rails.matches;\n\n toArray = function toArray(e) {\n return Array.prototype.slice.call(e);\n };\n\n Rails.serializeElement = function (element, additionalParam) {\n var inputs, params;\n inputs = [element];\n\n if (matches(element, 'form')) {\n inputs = toArray(element.elements);\n }\n\n params = [];\n inputs.forEach(function (input) {\n if (!input.name || input.disabled) {\n return;\n }\n\n if (matches(input, 'select')) {\n return toArray(input.options).forEach(function (option) {\n if (option.selected) {\n return params.push({\n name: input.name,\n value: option.value\n });\n }\n });\n } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n return params.push({\n name: input.name,\n value: input.value\n });\n }\n });\n\n if (additionalParam) {\n params.push(additionalParam);\n }\n\n return params.map(function (param) {\n if (param.name != null) {\n return encodeURIComponent(param.name) + \"=\" + encodeURIComponent(param.value);\n } else {\n return param;\n }\n }).join('&');\n };\n\n Rails.formElements = function (form, selector) {\n if (matches(form, 'form')) {\n return toArray(form.elements).filter(function (el) {\n return matches(el, selector);\n });\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n };\n }).call(this);\n (function () {\n var allowAction, fire, stopEverything;\n fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n Rails.handleConfirm = function (e) {\n if (!allowAction(this)) {\n return stopEverything(e);\n }\n };\n\n allowAction = function allowAction(element) {\n var answer, callback, message;\n message = element.getAttribute('data-confirm');\n\n if (!message) {\n return true;\n }\n\n answer = false;\n\n if (fire(element, 'confirm')) {\n try {\n answer = confirm(message);\n } catch (error) {}\n\n callback = fire(element, 'confirm:complete', [answer]);\n }\n\n return answer && callback;\n };\n }).call(this);\n (function () {\n var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, matches, setData, stopEverything;\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n Rails.handleDisabledElement = function (e) {\n var element;\n element = this;\n\n if (element.disabled) {\n return stopEverything(e);\n }\n };\n\n Rails.enableElement = function (e) {\n var element;\n element = e instanceof Event ? e.target : e;\n\n if (matches(element, Rails.linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return enableFormElements(element);\n }\n };\n\n Rails.disableElement = function (e) {\n var element;\n element = e instanceof Event ? e.target : e;\n\n if (matches(element, Rails.linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return disableFormElements(element);\n }\n };\n\n disableLinkElement = function disableLinkElement(element) {\n var replacement;\n replacement = element.getAttribute('data-disable-with');\n\n if (replacement != null) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n }\n\n element.addEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', true);\n };\n\n enableLinkElement = function enableLinkElement(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, 'ujs:enable-with', null);\n }\n\n element.removeEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', null);\n };\n\n disableFormElements = function disableFormElements(form) {\n return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n };\n\n disableFormElement = function disableFormElement(element) {\n var replacement;\n replacement = element.getAttribute('data-disable-with');\n\n if (replacement != null) {\n if (matches(element, 'button')) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, 'ujs:enable-with', element.value);\n element.value = replacement;\n }\n }\n\n element.disabled = true;\n return setData(element, 'ujs:disabled', true);\n };\n\n enableFormElements = function enableFormElements(form) {\n return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n };\n\n enableFormElement = function enableFormElement(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n\n if (originalText != null) {\n if (matches(element, 'button')) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n\n setData(element, 'ujs:enable-with', null);\n }\n\n element.disabled = false;\n return setData(element, 'ujs:disabled', null);\n };\n }).call(this);\n (function () {\n var stopEverything;\n stopEverything = Rails.stopEverything;\n\n Rails.handleMethod = function (e) {\n var csrfParam, csrfToken, form, formContent, href, link, method;\n link = this;\n method = link.getAttribute('data-method');\n\n if (!method) {\n return;\n }\n\n href = Rails.href(link);\n csrfToken = Rails.csrfToken();\n csrfParam = Rails.csrfParam();\n form = document.createElement('form');\n formContent = \"<input name='_method' value='\" + method + \"' type='hidden' />\";\n\n if (csrfParam != null && csrfToken != null && !Rails.isCrossDomain(href)) {\n formContent += \"<input name='\" + csrfParam + \"' value='\" + csrfToken + \"' type='hidden' />\";\n }\n\n formContent += '<input type=\"submit\" />';\n form.method = 'post';\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = 'none';\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n return stopEverything(e);\n };\n }).call(this);\n (function () {\n var ajax,\n fire,\n getData,\n isCrossDomain,\n isRemote,\n matches,\n serializeElement,\n setData,\n stopEverything,\n slice = [].slice;\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n isRemote = function isRemote(element) {\n var value;\n value = element.getAttribute('data-remote');\n return value != null && value !== 'false';\n };\n\n Rails.handleRemote = function (e) {\n var button, data, dataType, element, method, url, withCredentials;\n element = this;\n\n if (!isRemote(element)) {\n return true;\n }\n\n if (!fire(element, 'ajax:before')) {\n fire(element, 'ajax:stopped');\n return false;\n }\n\n withCredentials = element.getAttribute('data-with-credentials');\n dataType = element.getAttribute('data-type') || 'script';\n\n if (matches(element, Rails.formSubmitSelector)) {\n button = getData(element, 'ujs:submit-button');\n method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n\n if (method.toUpperCase() === 'GET') {\n url = url.replace(/\\?.*$/, '');\n }\n\n if (element.enctype === 'multipart/form-data') {\n data = new FormData(element);\n\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n\n setData(element, 'ujs:submit-button', null);\n setData(element, 'ujs:submit-button-formmethod', null);\n setData(element, 'ujs:submit-button-formaction', null);\n } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n method = element.getAttribute('data-method');\n url = element.getAttribute('data-url');\n data = serializeElement(element, element.getAttribute('data-params'));\n } else {\n method = element.getAttribute('data-method');\n url = Rails.href(element);\n data = element.getAttribute('data-params');\n }\n\n ajax({\n type: method || 'GET',\n url: url,\n data: data,\n dataType: dataType,\n beforeSend: function beforeSend(xhr, options) {\n if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n return fire(element, 'ajax:send', [xhr]);\n } else {\n fire(element, 'ajax:stopped');\n return false;\n }\n },\n success: function success() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:success', args);\n },\n error: function error() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:error', args);\n },\n complete: function complete() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:complete', args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: withCredentials != null && withCredentials !== 'false'\n });\n return stopEverything(e);\n };\n\n Rails.formSubmitButtonClick = function (e) {\n var button, form;\n button = this;\n form = button.form;\n\n if (!form) {\n return;\n }\n\n if (button.name) {\n setData(form, 'ujs:submit-button', {\n name: button.name,\n value: button.value\n });\n }\n\n setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n };\n\n Rails.preventInsignificantClick = function (e) {\n var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n link = this;\n method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n data = link.getAttribute('data-params');\n metaClick = e.metaKey || e.ctrlKey;\n insignificantMetaClick = metaClick && method === 'GET' && !data;\n nonPrimaryMouseClick = e.button != null && e.button !== 0;\n\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n return e.stopImmediatePropagation();\n }\n };\n }).call(this);\n (function () {\n var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n if (typeof jQuery !== \"undefined\" && jQuery !== null && jQuery.ajax != null) {\n if (jQuery.rails) {\n throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n }\n\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter(function (options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n });\n }\n\n Rails.start = function () {\n if (window._rails_loaded) {\n throw new Error('rails-ujs has already been loaded!');\n }\n\n window.addEventListener('pageshow', function () {\n $(Rails.formEnableSelector).forEach(function (el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n return $(Rails.linkDisableSelector).forEach(function (el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n });\n delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n delegate(document, Rails.linkClickSelector, 'click', disableElement);\n delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', function (e) {\n return setTimeout(function () {\n return disableElement(e);\n }, 13);\n });\n delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n document.addEventListener('DOMContentLoaded', loadCSPNonce);\n return window._rails_loaded = true;\n };\n\n if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n Rails.start();\n }\n }).call(this);\n }).call(this);\n\n if (typeof module === \"object\" && module.exports) {\n module.exports = Rails;\n } else if (typeof define === \"function\" && define.amd) {\n define(Rails);\n }\n}).call(this);","import { connect } from 'react-redux';\nimport NavigationBar from '../components/navigation_bar';\nimport { me } from 'flavours/glitch/util/initial_state';\n\nconst mapStateToProps = state => {\n return {\n account: state.getIn(['accounts', me]),\n };\n};\n\nexport default connect(mapStateToProps)(NavigationBar);\n","// Package imports.\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport { Link } from 'react-router-dom';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\n\n// Components.\nimport Icon from 'flavours/glitch/components/icon';\n\n// Utils.\nimport { conditionalRender } from 'flavours/glitch/util/react_helpers';\nimport { signOutLink } from 'flavours/glitch/util/backend_links';\n\n// Messages.\nconst messages = defineMessages({\n community: {\n defaultMessage: 'Local timeline',\n id: 'navigation_bar.community_timeline',\n },\n home_timeline: {\n defaultMessage: 'Home',\n id: 'tabs_bar.home',\n },\n logout: {\n defaultMessage: 'Logout',\n id: 'navigation_bar.logout',\n },\n notifications: {\n defaultMessage: 'Notifications',\n id: 'tabs_bar.notifications',\n },\n public: {\n defaultMessage: 'Federated timeline',\n id: 'navigation_bar.public_timeline',\n },\n settings: {\n defaultMessage: 'App settings',\n id: 'navigation_bar.app_settings',\n },\n start: {\n defaultMessage: 'Getting started',\n id: 'getting_started.heading',\n },\n});\n\nexport default @injectIntl\nclass Header extends ImmutablePureComponent {\n static propTypes = {\n columns: ImmutablePropTypes.list,\n unreadNotifications: PropTypes.number,\n showNotificationsBadge: PropTypes.bool,\n intl: PropTypes.object,\n onSettingsClick: PropTypes.func,\n onLogout: PropTypes.func.isRequired,\n };\n\n handleLogoutClick = e => {\n e.preventDefault();\n e.stopPropagation();\n\n this.props.onLogout();\n\n return false;\n }\n\n render () {\n const { intl, columns, unreadNotifications, showNotificationsBadge, onSettingsClick } = this.props;\n\n // Only renders the component if the column isn't being shown.\n const renderForColumn = conditionalRender.bind(null,\n columnId => !columns || !columns.some(\n column => column.get('id') === columnId\n )\n );\n\n // The result.\n return (\n <nav className='drawer--header'>\n <Link\n aria-label={intl.formatMessage(messages.start)}\n title={intl.formatMessage(messages.start)}\n to='/getting-started'\n ><Icon id='asterisk' /></Link>\n {renderForColumn('HOME', (\n <Link\n aria-label={intl.formatMessage(messages.home_timeline)}\n title={intl.formatMessage(messages.home_timeline)}\n to='/timelines/home'\n ><Icon id='home' /></Link>\n ))}\n {renderForColumn('NOTIFICATIONS', (\n <Link\n aria-label={intl.formatMessage(messages.notifications)}\n title={intl.formatMessage(messages.notifications)}\n to='/notifications'\n >\n <span className='icon-badge-wrapper'>\n <Icon id='bell' />\n { showNotificationsBadge && unreadNotifications > 0 && <div className='icon-badge' />}\n </span>\n </Link>\n ))}\n {renderForColumn('COMMUNITY', (\n <Link\n aria-label={intl.formatMessage(messages.community)}\n title={intl.formatMessage(messages.community)}\n to='/timelines/public/local'\n ><Icon id='users' /></Link>\n ))}\n {renderForColumn('PUBLIC', (\n <Link\n aria-label={intl.formatMessage(messages.public)}\n title={intl.formatMessage(messages.public)}\n to='/timelines/public'\n ><Icon id='globe' /></Link>\n ))}\n <a\n aria-label={intl.formatMessage(messages.settings)}\n onClick={onSettingsClick}\n href='#'\n title={intl.formatMessage(messages.settings)}\n ><Icon id='cogs' /></a>\n <a\n aria-label={intl.formatMessage(messages.logout)}\n onClick={this.handleLogoutClick}\n href={ signOutLink }\n title={intl.formatMessage(messages.logout)}\n ><Icon id='sign-out' /></a>\n </nav>\n );\n };\n}\n","import { openModal } from 'flavours/glitch/actions/modal';\nimport { connect } from 'react-redux';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport Header from '../components/header';\nimport { logOut } from 'flavours/glitch/util/log_out';\n\nconst messages = defineMessages({\n logoutMessage: { id: 'confirmations.logout.message', defaultMessage: 'Are you sure you want to log out?' },\n logoutConfirm: { id: 'confirmations.logout.confirm', defaultMessage: 'Log out' },\n});\n\nconst mapStateToProps = state => {\n return {\n columns: state.getIn(['settings', 'columns']),\n unreadNotifications: state.getIn(['notifications', 'unread']),\n showNotificationsBadge: state.getIn(['local_settings', 'notifications', 'tab_badge']),\n };\n};\n\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n onSettingsClick (e) {\n e.preventDefault();\n e.stopPropagation();\n dispatch(openModal('SETTINGS', {}));\n },\n onLogout () {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(messages.logoutMessage),\n confirm: intl.formatMessage(messages.logoutConfirm),\n onConfirm: () => logOut(),\n }));\n },\n});\n\nexport default injectIntl(connect(mapStateToProps, mapDispatchToProps)(Header));\n","import Rails from 'rails-ujs';\nimport { signOutLink } from 'flavours/glitch/util/backend_links';\n\nexport const logOut = () => {\n const form = document.createElement('form');\n\n const methodInput = document.createElement('input');\n methodInput.setAttribute('name', '_method');\n methodInput.setAttribute('value', 'delete');\n methodInput.setAttribute('type', 'hidden');\n form.appendChild(methodInput);\n\n const csrfToken = Rails.csrfToken();\n const csrfParam = Rails.csrfParam();\n\n if (csrfParam && csrfToken) {\n const csrfInput = document.createElement('input');\n csrfInput.setAttribute('name', csrfParam);\n csrfInput.setAttribute('value', csrfToken);\n csrfInput.setAttribute('type', 'hidden');\n form.appendChild(csrfInput);\n }\n\n const submitButton = document.createElement('input');\n submitButton.setAttribute('type', 'submit');\n form.appendChild(submitButton);\n\n form.method = 'post';\n form.action = signOutLink;\n form.style.display = 'none';\n\n document.body.appendChild(form);\n submitButton.click();\n};\n","import React from 'react';\nimport ComposeFormContainer from './containers/compose_form_container';\nimport NavigationContainer from './containers/navigation_container';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { connect } from 'react-redux';\nimport { mountCompose, unmountCompose } from 'flavours/glitch/actions/compose';\nimport { injectIntl, defineMessages } from 'react-intl';\nimport classNames from 'classnames';\nimport SearchContainer from './containers/search_container';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\nimport SearchResultsContainer from './containers/search_results_container';\nimport { me, mascot } from 'flavours/glitch/util/initial_state';\nimport HeaderContainer from './containers/header_container';\n\nconst messages = defineMessages({\n compose: { id: 'navigation_bar.compose', defaultMessage: 'Compose new toot' },\n});\n\nconst mapStateToProps = (state, ownProps) => ({\n showSearch: ownProps.multiColumn ? state.getIn(['search', 'submitted']) && !state.getIn(['search', 'hidden']) : ownProps.isSearchPage,\n});\n\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n onMount () {\n dispatch(mountCompose());\n },\n\n onUnmount () {\n dispatch(unmountCompose());\n },\n});\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass Compose extends React.PureComponent {\n static propTypes = {\n multiColumn: PropTypes.bool,\n showSearch: PropTypes.bool,\n isSearchPage: PropTypes.bool,\n onMount: PropTypes.func,\n onUnmount: PropTypes.func,\n intl: PropTypes.object.isRequired,\n };\n\n componentDidMount () {\n const { isSearchPage } = this.props;\n\n if (!isSearchPage) {\n this.props.onMount();\n }\n }\n\n componentWillUnmount () {\n const { isSearchPage } = this.props;\n\n if (!isSearchPage) {\n this.props.onUnmount();\n }\n }\n\n render () {\n const {\n intl,\n multiColumn,\n isSearchPage,\n showSearch,\n } = this.props;\n const computedClass = classNames('drawer', 'mbstobon');\n\n return (\n <div className={computedClass} role='region' aria-label={intl.formatMessage(messages.compose)}>\n {multiColumn && <HeaderContainer />}\n\n {(multiColumn || isSearchPage) && <SearchContainer />}\n\n <div className='drawer__pager'>\n {!isSearchPage && <div className='drawer__inner'>\n <NavigationContainer />\n\n <ComposeFormContainer />\n\n <div className='drawer__inner__mastodon'>\n {mascot ? <img alt='' draggable='false' src={mascot} /> : <button className='mastodon' />}\n </div>\n </div>}\n\n <Motion defaultStyle={{ x: isSearchPage ? 0 : -100 }} style={{ x: spring(showSearch || isSearchPage ? 0 : -100, { stiffness: 210, damping: 20 }) }}>\n {({ x }) => (\n <div className='drawer__inner darker' style={{ transform: `translateX(${x}%)`, visibility: x === -100 ? 'hidden' : 'visible' }}>\n <SearchResultsContainer />\n </div>\n )}\n </Motion>\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""}