Merge remote-tracking branch 'pleroma/develop' into feature/disable-account
[akkoma] / priv / static / packs / flavours / glitch / common.js
index 5fed8624c47b4edf7163e17f289710d50076a0fc..a0d2fe6ed08b573fc315b6bb73f2cf4fa41c765c 100644 (file)
@@ -1,2 +1,2 @@
-(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{78:function(t,e,n){var a,r;(function(){(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",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])",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",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",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(this);var S=this.Rails;(function(){(function(){S.cspNonce=function(){var t;return(t=document.querySelector("meta[name=csp-nonce]"))&&t.content}}).call(this),function(){var a,n;n=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,S.matches=function(t,e){return null!=e.exclude?n.call(t,e.selector)&&!n.call(t,e.exclude):n.call(t,e)},a="_ujsData",S.getData=function(t,e){var n;return null!=(n=t[a])?n[e]:void 0},S.setData=function(t,e,n){return null==t[a]&&(t[a]={}),t[a][e]=n},S.$=function(t){return Array.prototype.slice.call(document.querySelectorAll(t))}}.call(this),function(){var n,a,r;n=S.$,r=S.csrfToken=function(){var t;return(t=document.querySelector("meta[name=csrf-token]"))&&t.content},a=S.csrfParam=function(){var t;return(t=document.querySelector("meta[name=csrf-param]"))&&t.content},S.CSRFProtection=function(t){var e;if(null!=(e=r()))return t.setRequestHeader("X-CSRF-Token",e)},S.refreshCSRFTokens=function(){var t,e;if(e=r(),t=a(),null!=e&&null!=t)return n('form input[name="'+t+'"]').forEach(function(t){return t.value=e})}}.call(this),function(){var r,e,o,n;o=S.matches,"function"!=typeof(r=window.CustomEvent)&&((r=function(t,e){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype,n=r.prototype.preventDefault,r.prototype.preventDefault=function(){var t;return t=n.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),t}),e=S.fire=function(t,e,n){var a;return a=new r(e,{bubbles:!0,cancelable:!0,detail:n}),t.dispatchEvent(a),!a.defaultPrevented},S.stopEverything=function(t){return e(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},S.delegate=function(t,n,e,a){return t.addEventListener(e,function(t){var e;for(e=t.target;e instanceof Element&&!o(e,n);)e=e.parentNode;if(e instanceof Element&&!1===a.call(e,t))return t.preventDefault(),t.stopPropagation()})}}.call(this),function(){var e,a,t,r,o,i;r=S.cspNonce,a=S.CSRFProtection,S.fire,e={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},S.ajax=function(n){var a;return n=o(n),a=t(n,function(){var t,e;return e=i(null!=(t=a.response)?t:a.responseText,a.getResponseHeader("Content-Type")),2===Math.floor(a.status/100)?"function"==typeof n.success&&n.success(e,a.statusText,a):"function"==typeof n.error&&n.error(e,a.statusText,a),"function"==typeof n.complete?n.complete(a,a.statusText):void 0}),!(null!=n.beforeSend&&!n.beforeSend(a,n))&&(a.readyState===XMLHttpRequest.OPENED?a.send(n.data):void 0)},o=function(t){return t.url=t.url||location.href,t.type=t.type.toUpperCase(),"GET"===t.type&&t.data&&(t.url.indexOf("?")<0?t.url+="?"+t.data:t.url+="&"+t.data),null==e[t.dataType]&&(t.dataType="*"),t.accept=e[t.dataType],"*"!==t.dataType&&(t.accept+=", */*; q=0.01"),t},t=function(t,e){var n;return(n=new XMLHttpRequest).open(t.type,t.url,!0),n.setRequestHeader("Accept",t.accept),"string"==typeof t.data&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||n.setRequestHeader("X-Requested-With","XMLHttpRequest"),a(n),n.withCredentials=!!t.withCredentials,n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE)return e(n)},n},i=function(t,e){var n,a;if("string"==typeof t&&"string"==typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(t){}else if(e.match(/\b(?:java|ecma)script\b/))(a=document.createElement("script")).setAttribute("nonce",r()),a.text=t,document.head.appendChild(a).parentNode.removeChild(a);else if(e.match(/\b(xml|html|svg)\b/)){n=new DOMParser,e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(t){}}return t},S.href=function(t){return t.href},S.isCrossDomain=function(t){var e,n;(e=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(t){return t,!0}}}.call(this),function(){var r,o;r=S.matches,o=function(t){return Array.prototype.slice.call(t)},S.serializeElement=function(t,e){var n,a;return n=[t],r(t,"form")&&(n=o(t.elements)),a=[],n.forEach(function(e){if(e.name&&!e.disabled)return r(e,"select")?o(e.options).forEach(function(t){if(t.selected)return a.push({name:e.name,value:t.value})}):e.checked||-1===["radio","checkbox","submit"].indexOf(e.type)?a.push({name:e.name,value:e.value}):void 0}),e&&a.push(e),a.map(function(t){return null!=t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):t}).join("&")},S.formElements=function(t,e){return r(t,"form")?o(t.elements).filter(function(t){return r(t,e)}):o(t.querySelectorAll(e))}}.call(this),function(){var e,r,n;r=S.fire,n=S.stopEverything,S.handleConfirm=function(t){if(!e(this))return n(t)},e=function(t){var e,n,a;if(!(a=t.getAttribute("data-confirm")))return!0;if(e=!1,r(t,"confirm")){try{e=confirm(a)}catch(t){}n=r(t,"confirm:complete",[e])}return e&&n}}.call(this),function(){var n,a,r,o,i,l,e,c,u,s,d;u=S.matches,c=S.getData,s=S.setData,d=S.stopEverything,e=S.formElements,S.handleDisabledElement=function(t){if(this.disabled)return d(t)},S.enableElement=function(t){var e;return e=t instanceof Event?t.target:t,u(e,S.linkDisableSelector)?l(e):u(e,S.buttonDisableSelector)||u(e,S.formEnableSelector)?o(e):u(e,S.formSubmitSelector)?i(e):void 0},S.disableElement=function(t){var e;return e=t instanceof Event?t.target:t,u(e,S.linkDisableSelector)?r(e):u(e,S.buttonDisableSelector)||u(e,S.formDisableSelector)?n(e):u(e,S.formSubmitSelector)?a(e):void 0},r=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(s(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",d),s(t,"ujs:disabled",!0)},l=function(t){var e;return null!=(e=c(t,"ujs:enable-with"))&&(t.innerHTML=e,s(t,"ujs:enable-with",null)),t.removeEventListener("click",d),s(t,"ujs:disabled",null)},a=function(t){return e(t,S.formDisableSelector).forEach(n)},n=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(u(t,"button")?(s(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(s(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,s(t,"ujs:disabled",!0)},i=function(t){return e(t,S.formEnableSelector).forEach(o)},o=function(t){var e;return null!=(e=c(t,"ujs:enable-with"))&&(u(t,"button")?t.innerHTML=e:t.value=e,s(t,"ujs:enable-with",null)),t.disabled=!1,s(t,"ujs:disabled",null)}}.call(this),function(){var l;l=S.stopEverything,S.handleMethod=function(t){var e,n,a,r,o,i;if(i=this.getAttribute("data-method"))return o=S.href(this),n=S.csrfToken(),e=S.csrfParam(),a=document.createElement("form"),r="<input name='_method' value='"+i+"' type='hidden' />",null==e||null==n||S.isCrossDomain(o)||(r+="<input name='"+e+"' value='"+n+"' type='hidden' />"),r+='<input type="submit" />',a.method="post",a.action=o,a.target=this.target,a.innerHTML=r,a.style.display="none",document.body.appendChild(a),a.querySelector('[type="submit"]').click(),l(t)}}.call(this),function(){var c,u,s,d,m,f,p,b,h,v=[].slice;f=S.matches,s=S.getData,b=S.setData,u=S.fire,h=S.stopEverything,c=S.ajax,d=S.isCrossDomain,p=S.serializeElement,m=function(t){var e;return null!=(e=t.getAttribute("data-remote"))&&"false"!==e},S.handleRemote=function(t){var e,n,a,r,o,i,l;return!m(r=this)||(u(r,"ajax:before")?(l=r.getAttribute("data-with-credentials"),a=r.getAttribute("data-type")||"script",f(r,S.formSubmitSelector)?(e=s(r,"ujs:submit-button"),o=s(r,"ujs:submit-button-formmethod")||r.method,i=s(r,"ujs:submit-button-formaction")||r.getAttribute("action")||location.href,"GET"===o.toUpperCase()&&(i=i.replace(/\?.*$/,"")),"multipart/form-data"===r.enctype?(n=new FormData(r),null!=e&&n.append(e.name,e.value)):n=p(r,e),b(r,"ujs:submit-button",null),b(r,"ujs:submit-button-formmethod",null),b(r,"ujs:submit-button-formaction",null)):n=f(r,S.buttonClickSelector)||f(r,S.inputChangeSelector)?(o=r.getAttribute("data-method"),i=r.getAttribute("data-url"),p(r,r.getAttribute("data-params"))):(o=r.getAttribute("data-method"),i=S.href(r),r.getAttribute("data-params")),c({type:o||"GET",url:i,data:n,dataType:a,beforeSend:function(t,e){return u(r,"ajax:beforeSend",[t,e])?u(r,"ajax:send",[t]):(u(r,"ajax:stopped"),!1)},success:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],u(r,"ajax:success",t)},error:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],u(r,"ajax:error",t)},complete:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],u(r,"ajax:complete",t)},crossDomain:d(i),withCredentials:null!=l&&"false"!==l}),h(t)):(u(r,"ajax:stopped"),!1))},S.formSubmitButtonClick=function(t){var e,n;if(n=(e=this).form)return e.name&&b(n,"ujs:submit-button",{name:e.name,value:e.value}),b(n,"ujs:formnovalidate-button",e.formNoValidate),b(n,"ujs:submit-button-formaction",e.getAttribute("formaction")),b(n,"ujs:submit-button-formmethod",e.getAttribute("formmethod"))},S.handleMetaClick=function(t){var e,n;if(n=(this.getAttribute("data-method")||"GET").toUpperCase(),e=this.getAttribute("data-params"),(t.metaKey||t.ctrlKey)&&"GET"===n&&!e)return t.stopImmediatePropagation()}}.call(this),function(){var t,a,e,n,r,o,i,l,c,u,s,d,m,f;if(o=S.fire,e=S.delegate,l=S.getData,t=S.$,f=S.refreshCSRFTokens,a=S.CSRFProtection,r=S.enableElement,n=S.disableElement,u=S.handleDisabledElement,c=S.handleConfirm,m=S.handleRemote,i=S.formSubmitButtonClick,s=S.handleMetaClick,d=S.handleMethod,"undefined"!=typeof jQuery&&null!==jQuery&&null!=jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=S,jQuery.ajaxPrefilter(function(t,e,n){if(!t.crossDomain)return a(n)})}S.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",function(){return t(S.formEnableSelector).forEach(function(t){if(l(t,"ujs:disabled"))return r(t)}),t(S.linkDisableSelector).forEach(function(t){if(l(t,"ujs:disabled"))return r(t)})}),e(document,S.linkDisableSelector,"ajax:complete",r),e(document,S.linkDisableSelector,"ajax:stopped",r),e(document,S.buttonDisableSelector,"ajax:complete",r),e(document,S.buttonDisableSelector,"ajax:stopped",r),e(document,S.linkClickSelector,"click",u),e(document,S.linkClickSelector,"click",c),e(document,S.linkClickSelector,"click",s),e(document,S.linkClickSelector,"click",n),e(document,S.linkClickSelector,"click",m),e(document,S.linkClickSelector,"click",d),e(document,S.buttonClickSelector,"click",u),e(document,S.buttonClickSelector,"click",c),e(document,S.buttonClickSelector,"click",n),e(document,S.buttonClickSelector,"click",m),e(document,S.inputChangeSelector,"change",u),e(document,S.inputChangeSelector,"change",c),e(document,S.inputChangeSelector,"change",m),e(document,S.formSubmitSelector,"submit",u),e(document,S.formSubmitSelector,"submit",c),e(document,S.formSubmitSelector,"submit",m),e(document,S.formSubmitSelector,"submit",function(t){return setTimeout(function(){return n(t)},13)}),e(document,S.formSubmitSelector,"ajax:send",n),e(document,S.formSubmitSelector,"ajax:complete",r),e(document,S.formInputClickSelector,"click",u),e(document,S.formInputClickSelector,"click",c),e(document,S.formInputClickSelector,"click",i),document.addEventListener("DOMContentLoaded",f),window._rails_loaded=!0},window.Rails===S&&o(document,"rails:attachBindings")&&S.start()}.call(this)}).call(this),t.exports?t.exports=S:void 0===(r="function"==typeof(a=S)?a.call(e,n,e,t):a)||(t.exports=r)}).call(this)},825:function(t,e,n){"use strict";n.r(e);var a=n(78);n(826);Object(a.start)(),n(827)},826:function(t,e,n){},827:function(t,e,n){var a={"./glitch-preview.jpg":828,"./wave-drawer-glitched.png":829,"./wave-drawer.png":830};function r(t){var e=o(t);return n(e)}function o(t){var e=a[t];if(e+1)return e;var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}r.keys=function(){return Object.keys(a)},r.resolve=o,(t.exports=r).id=827},828:function(t,e,n){t.exports=n.p+"glitch-preview-bb9cc15a0102bfaf65712e5cff7e58df.jpg"},829:function(t,e,n){t.exports=n.p+"wave-drawer-glitched-33467bf8c8d2b995d6c76d8810aba3db.png"},830:function(t,e,n){t.exports=n.p+"wave-drawer-ee1bfcbe5811ea31771b7187c7507ee6.png"}},[[825,0]]]);
+(window.webpackJsonp=window.webpackJsonp||[]).push([[78],{720:function(e,t,n){e.exports=n.p+"media/flavours/glitch/images/glitch-preview-bb9cc15a0102bfaf65712e5cff7e58df.jpg"},721:function(e,t,n){e.exports=n.p+"media/flavours/glitch/images/wave-drawer-ee1bfcbe5811ea31771b7187c7507ee6.png"},722:function(e,t,n){e.exports=n.p+"media/flavours/glitch/images/wave-drawer-glitched-33467bf8c8d2b995d6c76d8810aba3db.png"},76:function(e,t,n){var a,r;(function(){(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",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])",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",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",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(this);var S=this.Rails;(function(){(function(){S.cspNonce=function(){var e;return(e=document.querySelector("meta[name=csp-nonce]"))&&e.content}}).call(this),function(){var a,n;n=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,S.matches=function(e,t){return null!=t.exclude?n.call(e,t.selector)&&!n.call(e,t.exclude):n.call(e,t)},a="_ujsData",S.getData=function(e,t){var n;return null!=(n=e[a])?n[t]:void 0},S.setData=function(e,t,n){return null==e[a]&&(e[a]={}),e[a][t]=n},S.$=function(e){return Array.prototype.slice.call(document.querySelectorAll(e))}}.call(this),function(){var n,a,r;n=S.$,r=S.csrfToken=function(){var e;return(e=document.querySelector("meta[name=csrf-token]"))&&e.content},a=S.csrfParam=function(){var e;return(e=document.querySelector("meta[name=csrf-param]"))&&e.content},S.CSRFProtection=function(e){var t;if(null!=(t=r()))return e.setRequestHeader("X-CSRF-Token",t)},S.refreshCSRFTokens=function(){var e,t;if(t=r(),e=a(),null!=t&&null!=e)return n('form input[name="'+e+'"]').forEach(function(e){return e.value=t})}}.call(this),function(){var r,t,o,n;o=S.matches,"function"!=typeof(r=window.CustomEvent)&&((r=function(e,t){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}).prototype=window.Event.prototype,n=r.prototype.preventDefault,r.prototype.preventDefault=function(){var e;return e=n.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),e}),t=S.fire=function(e,t,n){var a;return a=new r(t,{bubbles:!0,cancelable:!0,detail:n}),e.dispatchEvent(a),!a.defaultPrevented},S.stopEverything=function(e){return t(e.target,"ujs:everythingStopped"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()},S.delegate=function(e,n,t,a){return e.addEventListener(t,function(e){var t;for(t=e.target;t instanceof Element&&!o(t,n);)t=t.parentNode;if(t instanceof Element&&!1===a.call(t,e))return e.preventDefault(),e.stopPropagation()})}}.call(this),function(){var t,a,e,r,o,i;r=S.cspNonce,a=S.CSRFProtection,S.fire,t={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},S.ajax=function(n){var a;return n=o(n),a=e(n,function(){var e,t;return t=i(null!=(e=a.response)?e:a.responseText,a.getResponseHeader("Content-Type")),2===Math.floor(a.status/100)?"function"==typeof n.success&&n.success(t,a.statusText,a):"function"==typeof n.error&&n.error(t,a.statusText,a),"function"==typeof n.complete?n.complete(a,a.statusText):void 0}),!(null!=n.beforeSend&&!n.beforeSend(a,n))&&(a.readyState===XMLHttpRequest.OPENED?a.send(n.data):void 0)},o=function(e){return e.url=e.url||location.href,e.type=e.type.toUpperCase(),"GET"===e.type&&e.data&&(e.url.indexOf("?")<0?e.url+="?"+e.data:e.url+="&"+e.data),null==t[e.dataType]&&(e.dataType="*"),e.accept=t[e.dataType],"*"!==e.dataType&&(e.accept+=", */*; q=0.01"),e},e=function(e,t){var n;return(n=new XMLHttpRequest).open(e.type,e.url,!0),n.setRequestHeader("Accept",e.accept),"string"==typeof e.data&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.crossDomain||n.setRequestHeader("X-Requested-With","XMLHttpRequest"),a(n),n.withCredentials=!!e.withCredentials,n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE)return t(n)},n},i=function(e,t){var n,a;if("string"==typeof e&&"string"==typeof t)if(t.match(/\bjson\b/))try{e=JSON.parse(e)}catch(e){}else if(t.match(/\b(?:java|ecma)script\b/))(a=document.createElement("script")).setAttribute("nonce",r()),a.text=e,document.head.appendChild(a).parentNode.removeChild(a);else if(t.match(/\b(xml|html|svg)\b/)){n=new DOMParser,t=t.replace(/;.+/,"");try{e=n.parseFromString(e,t)}catch(e){}}return e},S.href=function(e){return e.href},S.isCrossDomain=function(e){var t,n;(t=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=e,!((!n.protocol||":"===n.protocol)&&!n.host||t.protocol+"//"+t.host==n.protocol+"//"+n.host)}catch(e){return e,!0}}}.call(this),function(){var r,o;r=S.matches,o=function(e){return Array.prototype.slice.call(e)},S.serializeElement=function(e,t){var n,a;return n=[e],r(e,"form")&&(n=o(e.elements)),a=[],n.forEach(function(t){if(t.name&&!t.disabled)return r(t,"select")?o(t.options).forEach(function(e){if(e.selected)return a.push({name:t.name,value:e.value})}):t.checked||-1===["radio","checkbox","submit"].indexOf(t.type)?a.push({name:t.name,value:t.value}):void 0}),t&&a.push(t),a.map(function(e){return null!=e.name?encodeURIComponent(e.name)+"="+encodeURIComponent(e.value):e}).join("&")},S.formElements=function(e,t){return r(e,"form")?o(e.elements).filter(function(e){return r(e,t)}):o(e.querySelectorAll(t))}}.call(this),function(){var t,r,n;r=S.fire,n=S.stopEverything,S.handleConfirm=function(e){if(!t(this))return n(e)},t=function(e){var t,n,a;if(!(a=e.getAttribute("data-confirm")))return!0;if(t=!1,r(e,"confirm")){try{t=confirm(a)}catch(e){}n=r(e,"confirm:complete",[t])}return t&&n}}.call(this),function(){var n,a,r,o,i,l,t,c,u,s,d;u=S.matches,c=S.getData,s=S.setData,d=S.stopEverything,t=S.formElements,S.handleDisabledElement=function(e){if(this.disabled)return d(e)},S.enableElement=function(e){var t;return t=e instanceof Event?e.target:e,u(t,S.linkDisableSelector)?l(t):u(t,S.buttonDisableSelector)||u(t,S.formEnableSelector)?o(t):u(t,S.formSubmitSelector)?i(t):void 0},S.disableElement=function(e){var t;return t=e instanceof Event?e.target:e,u(t,S.linkDisableSelector)?r(t):u(t,S.buttonDisableSelector)||u(t,S.formDisableSelector)?n(t):u(t,S.formSubmitSelector)?a(t):void 0},r=function(e){var t;return null!=(t=e.getAttribute("data-disable-with"))&&(s(e,"ujs:enable-with",e.innerHTML),e.innerHTML=t),e.addEventListener("click",d),s(e,"ujs:disabled",!0)},l=function(e){var t;return null!=(t=c(e,"ujs:enable-with"))&&(e.innerHTML=t,s(e,"ujs:enable-with",null)),e.removeEventListener("click",d),s(e,"ujs:disabled",null)},a=function(e){return t(e,S.formDisableSelector).forEach(n)},n=function(e){var t;return null!=(t=e.getAttribute("data-disable-with"))&&(u(e,"button")?(s(e,"ujs:enable-with",e.innerHTML),e.innerHTML=t):(s(e,"ujs:enable-with",e.value),e.value=t)),e.disabled=!0,s(e,"ujs:disabled",!0)},i=function(e){return t(e,S.formEnableSelector).forEach(o)},o=function(e){var t;return null!=(t=c(e,"ujs:enable-with"))&&(u(e,"button")?e.innerHTML=t:e.value=t,s(e,"ujs:enable-with",null)),e.disabled=!1,s(e,"ujs:disabled",null)}}.call(this),function(){var l;l=S.stopEverything,S.handleMethod=function(e){var t,n,a,r,o,i;if(i=this.getAttribute("data-method"))return o=S.href(this),n=S.csrfToken(),t=S.csrfParam(),a=document.createElement("form"),r="<input name='_method' value='"+i+"' type='hidden' />",null==t||null==n||S.isCrossDomain(o)||(r+="<input name='"+t+"' value='"+n+"' type='hidden' />"),r+='<input type="submit" />',a.method="post",a.action=o,a.target=this.target,a.innerHTML=r,a.style.display="none",document.body.appendChild(a),a.querySelector('[type="submit"]').click(),l(e)}}.call(this),function(){var c,u,s,d,m,f,p,b,h,v=[].slice;f=S.matches,s=S.getData,b=S.setData,u=S.fire,h=S.stopEverything,c=S.ajax,d=S.isCrossDomain,p=S.serializeElement,m=function(e){var t;return null!=(t=e.getAttribute("data-remote"))&&"false"!==t},S.handleRemote=function(e){var t,n,a,r,o,i,l;return!m(r=this)||(u(r,"ajax:before")?(l=r.getAttribute("data-with-credentials"),a=r.getAttribute("data-type")||"script",f(r,S.formSubmitSelector)?(t=s(r,"ujs:submit-button"),o=s(r,"ujs:submit-button-formmethod")||r.method,i=s(r,"ujs:submit-button-formaction")||r.getAttribute("action")||location.href,"GET"===o.toUpperCase()&&(i=i.replace(/\?.*$/,"")),"multipart/form-data"===r.enctype?(n=new FormData(r),null!=t&&n.append(t.name,t.value)):n=p(r,t),b(r,"ujs:submit-button",null),b(r,"ujs:submit-button-formmethod",null),b(r,"ujs:submit-button-formaction",null)):n=f(r,S.buttonClickSelector)||f(r,S.inputChangeSelector)?(o=r.getAttribute("data-method"),i=r.getAttribute("data-url"),p(r,r.getAttribute("data-params"))):(o=r.getAttribute("data-method"),i=S.href(r),r.getAttribute("data-params")),c({type:o||"GET",url:i,data:n,dataType:a,beforeSend:function(e,t){return u(r,"ajax:beforeSend",[e,t])?u(r,"ajax:send",[e]):(u(r,"ajax:stopped"),!1)},success:function(){var e;return e=1<=arguments.length?v.call(arguments,0):[],u(r,"ajax:success",e)},error:function(){var e;return e=1<=arguments.length?v.call(arguments,0):[],u(r,"ajax:error",e)},complete:function(){var e;return e=1<=arguments.length?v.call(arguments,0):[],u(r,"ajax:complete",e)},crossDomain:d(i),withCredentials:null!=l&&"false"!==l}),h(e)):(u(r,"ajax:stopped"),!1))},S.formSubmitButtonClick=function(e){var t,n;if(n=(t=this).form)return t.name&&b(n,"ujs:submit-button",{name:t.name,value:t.value}),b(n,"ujs:formnovalidate-button",t.formNoValidate),b(n,"ujs:submit-button-formaction",t.getAttribute("formaction")),b(n,"ujs:submit-button-formmethod",t.getAttribute("formmethod"))},S.handleMetaClick=function(e){var t,n;if(n=(this.getAttribute("data-method")||"GET").toUpperCase(),t=this.getAttribute("data-params"),(e.metaKey||e.ctrlKey)&&"GET"===n&&!t)return e.stopImmediatePropagation()}}.call(this),function(){var e,a,t,n,r,o,i,l,c,u,s,d,m,f;if(o=S.fire,t=S.delegate,l=S.getData,e=S.$,f=S.refreshCSRFTokens,a=S.CSRFProtection,r=S.enableElement,n=S.disableElement,u=S.handleDisabledElement,c=S.handleConfirm,m=S.handleRemote,i=S.formSubmitButtonClick,s=S.handleMetaClick,d=S.handleMethod,"undefined"!=typeof jQuery&&null!==jQuery&&null!=jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=S,jQuery.ajaxPrefilter(function(e,t,n){if(!e.crossDomain)return a(n)})}S.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",function(){return e(S.formEnableSelector).forEach(function(e){if(l(e,"ujs:disabled"))return r(e)}),e(S.linkDisableSelector).forEach(function(e){if(l(e,"ujs:disabled"))return r(e)})}),t(document,S.linkDisableSelector,"ajax:complete",r),t(document,S.linkDisableSelector,"ajax:stopped",r),t(document,S.buttonDisableSelector,"ajax:complete",r),t(document,S.buttonDisableSelector,"ajax:stopped",r),t(document,S.linkClickSelector,"click",u),t(document,S.linkClickSelector,"click",c),t(document,S.linkClickSelector,"click",s),t(document,S.linkClickSelector,"click",n),t(document,S.linkClickSelector,"click",m),t(document,S.linkClickSelector,"click",d),t(document,S.buttonClickSelector,"click",u),t(document,S.buttonClickSelector,"click",c),t(document,S.buttonClickSelector,"click",n),t(document,S.buttonClickSelector,"click",m),t(document,S.inputChangeSelector,"change",u),t(document,S.inputChangeSelector,"change",c),t(document,S.inputChangeSelector,"change",m),t(document,S.formSubmitSelector,"submit",u),t(document,S.formSubmitSelector,"submit",c),t(document,S.formSubmitSelector,"submit",m),t(document,S.formSubmitSelector,"submit",function(e){return setTimeout(function(){return n(e)},13)}),t(document,S.formSubmitSelector,"ajax:send",n),t(document,S.formSubmitSelector,"ajax:complete",r),t(document,S.formInputClickSelector,"click",u),t(document,S.formInputClickSelector,"click",c),t(document,S.formInputClickSelector,"click",i),document.addEventListener("DOMContentLoaded",f),window._rails_loaded=!0},window.Rails===S&&o(document,"rails:attachBindings")&&S.start()}.call(this)}).call(this),e.exports?e.exports=S:void 0===(r="function"==typeof(a=S)?a.call(t,n,t,e):a)||(e.exports=r)}).call(this)},829:function(e,t,n){"use strict";n.r(t);var a=n(76);n(830);Object(a.start)(),n(831)},830:function(e,t,n){},831:function(e,t,n){var a={"./glitch-preview":720,"./glitch-preview.jpg":720,"./wave-drawer":721,"./wave-drawer-glitched":722,"./wave-drawer-glitched.png":722,"./wave-drawer.png":721};function r(e){var t=o(e);return n(t)}function o(e){if(n.o(a,e))return a[e];var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}r.keys=function(){return Object.keys(a)},r.resolve=o,(e.exports=r).id=831}},[[829,0]]]);
 //# sourceMappingURL=common.js.map
\ No newline at end of file