mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-11 13:40:12 +00:00
2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[78],{721:function(e,t,n){e.exports=n.p+"media/flavours/glitch/images/glitch-preview-bb9cc15a0102bfaf65712e5cff7e58df.jpg"},722:function(e,t,n){e.exports=n.p+"media/flavours/glitch/images/wave-drawer-ee1bfcbe5811ea31771b7187c7507ee6.png"},723:function(e,t,n){e.exports=n.p+"media/flavours/glitch/images/wave-drawer-glitched-33467bf8c8d2b995d6c76d8810aba3db.png"},75: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)},833:function(e,t,n){"use strict";n.r(t);var a=n(75);n(834);Object(a.start)(),n(835)},834:function(e,t,n){},835:function(e,t,n){var a={"./glitch-preview":721,"./glitch-preview.jpg":721,"./wave-drawer":722,"./wave-drawer-glitched":723,"./wave-drawer-glitched.png":723,"./wave-drawer.png":722};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=835}},[[833,0]]]);
|
|
//# sourceMappingURL=common.js.map
|