Removed file as requested
[akkoma] / priv / static / packs / public.js
1 (window.webpackJsonp=window.webpackJsonp||[]).push([[88],{447:function(e,t,n){var o,r,a;r=[],void 0===(a="function"==typeof(o=function(){var e=function(t,n){"use strict";var o=Object.create(e.prototype),r=0,a=0,i=0,c=0,l=[],s=!0,u=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},d=window.transformProp||function(){var e=document.createElement("div");if(null===e.style.transform){var t=["Webkit","Moz","ms"];for(var n in t)if(void 0!==e.style[t[n]+"Transform"])return t[n]+"Transform"}return"transform"}();o.options={speed:-2,center:!1,wrapper:null,round:!0,vertical:!0,horizontal:!1,callback:function(){}},n&&Object.keys(n).forEach(function(e){o.options[e]=n[e]}),t||(t=".rellax");var m="string"==typeof t?document.querySelectorAll(t):[t];if(!(m.length>0))throw new Error("The elements you're trying to select don't exist.");if(o.elems=m,o.options.wrapper&&!o.options.wrapper.nodeType){var p=document.querySelector(o.options.wrapper);if(!p)throw new Error("The wrapper you're trying to use don't exist.");o.options.wrapper=p}var f=function(){for(var e=0;e<l.length;e++)o.elems[e].style.cssText=l[e].style;l=[],a=window.innerHeight,c=window.innerWidth,w(),function(){for(var e=0;e<o.elems.length;e++){var t=g(o.elems[e]);l.push(t)}}(),s&&(window.addEventListener("resize",f),s=!1),v()},g=function(e){var t=e.getAttribute("data-rellax-percentage"),n=e.getAttribute("data-rellax-speed"),r=e.getAttribute("data-rellax-zindex")||0,i=o.options.wrapper?o.options.wrapper.scrollTop:window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,l=o.options.vertical&&(t||o.options.center)?i:0,s=o.options.horizontal&&(t||o.options.center)?window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft:0,u=l+e.getBoundingClientRect().top,d=e.clientHeight||e.offsetHeight||e.scrollHeight,m=s+e.getBoundingClientRect().left,p=e.clientWidth||e.offsetWidth||e.scrollWidth,f=t||(l-u+a)/(d+a),g=t||(s-m+c)/(p+c);o.options.center&&(g=.5,f=.5);var w=n||o.options.speed,y=h(g,f,w),v=e.style.cssText,b="";if(v.indexOf("transform")>=0){var x=v.indexOf("transform"),T=v.slice(x),q=T.indexOf(";");b=q?" "+T.slice(11,q).replace(/\s/g,""):" "+T.slice(11).replace(/\s/g,"")}return{baseX:y.x,baseY:y.y,top:u,left:m,height:d,width:p,speed:w,style:v,transform:b,zindex:r}},w=function(){var e=r,t=i;return r=o.options.wrapper?o.options.wrapper.scrollTop:(document.documentElement||document.body.parentNode||document.body).scrollTop||window.pageYOffset,i=o.options.wrapper?o.options.wrapper.scrollLeft:(document.documentElement||document.body.parentNode||document.body).scrollLeft||window.pageXOffset,!(e==r||!o.options.vertical)||!(t==i||!o.options.horizontal)},h=function(e,t,n){var r={},a=n*(100*(1-e)),i=n*(100*(1-t));return r.x=o.options.round?Math.round(a):Math.round(100*a)/100,r.y=o.options.round?Math.round(i):Math.round(100*i)/100,r},y=function(){w()&&!1===s&&v(),u(y)},v=function(){for(var e,t=0;t<o.elems.length;t++){var n=(r-l[t].top+a)/(l[t].height+a),s=(i-l[t].left+c)/(l[t].width+c),u=(e=h(s,n,l[t].speed)).y-l[t].baseY,m=e.x-l[t].baseX,p=l[t].zindex,f="translate3d("+(o.options.horizontal?m:"0")+"px,"+(o.options.vertical?u:"0")+"px,"+p+"px) "+l[t].transform;o.elems[t].style[d]=f}o.options.callback(e)};return o.destroy=function(){for(var e=0;e<o.elems.length;e++)o.elems[e].style.cssText=l[e].style;s||(window.removeEventListener("resize",f),s=!0)},f(),y(),o.refresh=f,o};return e})?o.apply(t,r):o)||(e.exports=a)},449:function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),a=n(67),i=n(80),c=n(66);Object(c.a)(),window.addEventListener("message",function(e){var t=e.data||{};window.parent&&"setHeight"===t.type&&Object(i.default)(function(){window.parent.postMessage({type:"setHeight",id:t.id,height:document.getElementsByTagName("html")[0].scrollHeight},"*")})}),Object(a.a)().then(function(){var e=n(103).length,t=n(52).default,o=n(81).timeAgoString,a=n(58).delegate,c=n(47).default,l=(0,n(8).getLocale)().messages,s=(n(1),n(28)),u=n(447),d=n(54).createBrowserHistory;Object(i.default)(function(){var e=document.documentElement.lang,a=new Intl.DateTimeFormat(e,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"});[].forEach.call(document.querySelectorAll(".emojify"),function(e){e.innerHTML=c(e.innerHTML)}),[].forEach.call(document.querySelectorAll("time.formatted"),function(e){var t=new Date(e.getAttribute("datetime")),n=a.format(t);e.title=n,e.textContent=n}),[].forEach.call(document.querySelectorAll("time.time-ago"),function(n){var r=new Date(n.getAttribute("datetime")),i=new Date;n.title=a.format(r),n.textContent=o({formatMessage:function(n,o){var r=n.id,a=n.defaultMessage;return new t(l[r]||a,e).format(o)},formatDate:function(t,n){return new Intl.DateTimeFormat(e,n).format(t)}},r,i,r.getFullYear())});var i=document.querySelectorAll("[data-component]");i.length>0&&n.e(1).then(n.bind(null,714)).then(function(t){var n=t.default,o=document.createElement("div");s.render(r()(n,{locale:e,components:i}),o),document.body.appendChild(o)}).catch(function(e){return console.error(e)}),document.querySelectorAll(".parallax").length>0&&new u(".parallax",{speed:-1});var m=d(),p=document.querySelectorAll(".public-layout .detailed-status"),f=m.location;1!==p.length||f.state&&f.state.scrolledToDetailedStatus||(p[0].scrollIntoView(),m.replace(f.pathname,Object.assign({},f.state,{scrolledToDetailedStatus:!0})))}),a(document,".webapp-btn","click",function(e){var t=e.target;return 0!==e.button||(window.location.href=t.href,!1)}),a(document,".status__content__spoiler-link","click",function(e){var t=e.target,n=t.parentNode.parentNode.querySelector(".e-content");return"block"===n.style.display?(n.style.display="none",t.parentNode.style.marginBottom=0):(n.style.display="block",t.parentNode.style.marginBottom=null),!1}),a(document,".modal-button","click",function(e){e.preventDefault();var t=void 0;t="A"!==e.target.nodeName?e.target.parentNode.href:e.target.href,window.open(t,"mastodon-intent","width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes")}),a(document,"#account_display_name","input",function(t){var n=t.target,o=document.querySelector(".name-counter"),r=document.querySelector(".card .display-name strong");o&&(o.textContent=30-e(n.value)),r&&(r.innerHTML=c(n.value))}),a(document,"#account_note","input",function(t){var n=t.target,o=document.querySelector(".note-counter");o&&(o.textContent=160-e(n.value))}),a(document,"#account_avatar","change",function(e){var t=e.target,n=document.querySelector(".card .avatar img"),o=(t.files||[])[0],r=o?URL.createObjectURL(o):n.dataset.originalSrc;n.src=r}),a(document,"#account_header","change",function(e){var t=e.target,n=document.querySelector(".card .card__img img"),o=(t.files||[])[0],r=o?URL.createObjectURL(o):n.dataset.originalSrc;n.src=r}),a(document,"#account_locked","change",function(e){var t=e.target,n=document.querySelector(".card .display-name i");t.checked?n.style.display="inline":n.style.display="none"})}).catch(function(e){console.error(e)})}},[[449,0]]]);
2 //# sourceMappingURL=public.js.map