universalviewer
Version:
The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎
2 lines (1 loc) • 1.46 kB
JavaScript
var s=function(r){return typeof __zone_symbol__requestAnimationFrame=="function"?__zone_symbol__requestAnimationFrame(r):typeof requestAnimationFrame=="function"?requestAnimationFrame(r):setTimeout(r)},o=function(r){return!!r.shadowRoot&&!!r.attachShadow},d=function(r){var e=r.closest("ion-item");return e?e.querySelector("ion-label"):null},f=function(r,e,n,i,t){if(r||o(e)){var a=e.querySelector("input.aux-input");a||(a=e.ownerDocument.createElement("input"),a.type="hidden",a.classList.add("aux-input"),e.appendChild(a)),a.disabled=t,a.name=n,a.value=i||""}},l=function(r,e,n){return Math.max(r,Math.min(e,n))},m=function(r,e){if(!r){var n="ASSERT: "+e;console.error(n);debugger;throw new Error(n)}},c=function(r){return r.timeStamp||Date.now()},v=function(r){if(r){var e=r.changedTouches;if(e&&e.length>0){var n=e[0];return{x:n.clientX,y:n.clientY}}if(r.pageX!==void 0)return{x:r.pageX,y:r.pageY}}return{x:0,y:0}},p=function(r){var e=document.dir==="rtl";switch(r){case"start":return e;case"end":return!e;default:throw new Error('"'+r+'" is not a valid value for [side]. Use "start" or "end" instead.')}},g=function(r,e){var n=r._original||r;return{_original:r,emit:u(n.emit.bind(n),e)}},u=function(r,e){e===void 0&&(e=0);var n;return function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];clearTimeout(n),n=setTimeout.apply(void 0,[r,e].concat(i))}};export{s as a,o as b,d as c,f as d,l as e,m as f,c as g,v as h,p as i,g as j,u as k};