Current section
Files
Jump to
Current section
Files
priv/static/teal/js/13.e72b59b828b67b4ca6ce.chunk.js
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{Ch5u:function(t,e,n){"use strict";!function(){var t=function(){if("function"==typeof window.CustomEvent)return window.CustomEvent;function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}return t.prototype=window.Event.prototype,t}();function e(t,e){var n=document.createElement("input");return n.type="hidden",n.name=t,n.value=e,n}function n(t){var n=t.getAttribute("data-to"),i=e("_method",t.getAttribute("data-method")),a=e("_csrf_token",t.getAttribute("data-csrf")),o=document.createElement("form"),r=t.getAttribute("target");o.method="get"===t.getAttribute("data-method")?"get":"post",o.action=n,o.style.display="hidden",r&&(o.target=r),o.appendChild(a),o.appendChild(i),document.body.appendChild(o),o.submit()}window.addEventListener("click",function(e){for(var i=e.target;i&&i.getAttribute;){var a=new t("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!i.dispatchEvent(a))return e.preventDefault(),e.stopImmediatePropagation(),!1;if(i.getAttribute("data-method"))return n(i),e.preventDefault(),!1;i=i.parentNode}},!1),window.addEventListener("phoenix.link.click",function(t){var e=t.target.getAttribute("data-confirm");e&&!window.confirm(e)&&t.preventDefault()},!1)}()}}]);