-
Notifications
You must be signed in to change notification settings - Fork 0
/
p-f100910a.js
5 lines (5 loc) · 3.18 KB
/
p-f100910a.js
1
2
3
4
5
/*!
* Built by BASIS
* Copyright BASIS International Ltd.
*/
import{c as o}from"./p-5119ef20.js";!function(){function o(o){var e=!0,n=!1,t=null,u={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function d(o){return!!(o&&o!==document&&"HTML"!==o.nodeName&&"BODY"!==o.nodeName&&"classList"in o&&"contains"in o.classList)}function c(o){o.classList.contains("focus-visible")||(o.classList.add("focus-visible"),o.setAttribute("data-focus-visible-added",""))}function i(){e=!1}function m(){document.addEventListener("mousemove",s),document.addEventListener("mousedown",s),document.addEventListener("mouseup",s),document.addEventListener("pointermove",s),document.addEventListener("pointerdown",s),document.addEventListener("pointerup",s),document.addEventListener("touchmove",s),document.addEventListener("touchstart",s),document.addEventListener("touchend",s)}function s(o){o.target.nodeName&&"html"===o.target.nodeName.toLowerCase()||(e=!1,document.removeEventListener("mousemove",s),document.removeEventListener("mousedown",s),document.removeEventListener("mouseup",s),document.removeEventListener("pointermove",s),document.removeEventListener("pointerdown",s),document.removeEventListener("pointerup",s),document.removeEventListener("touchmove",s),document.removeEventListener("touchstart",s),document.removeEventListener("touchend",s))}document.addEventListener("keydown",(function(n){n.metaKey||n.altKey||n.ctrlKey||(d(o.activeElement)&&c(o.activeElement),e=!0)}),!0),document.addEventListener("mousedown",i,!0),document.addEventListener("pointerdown",i,!0),document.addEventListener("touchstart",i,!0),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&(n&&(e=!0),m())}),!0),m(),o.addEventListener("focus",(function(o){d(o.target)&&(e||function(o){var e=o.tagName;return!("INPUT"!==e||!u[o.type]||o.readOnly)||"TEXTAREA"===e&&!o.readOnly||!!o.isContentEditable}(o.target))&&c(o.target)}),!0),o.addEventListener("blur",(function(o){d(o.target)&&(o.target.classList.contains("focus-visible")||o.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(t),t=window.setTimeout((function(){n=!1}),100),function(o){o.hasAttribute("data-focus-visible-added")&&(o.classList.remove("focus-visible"),o.removeAttribute("data-focus-visible-added"))}(o.target))}),!0),o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&o.host?o.host.setAttribute("data-js-focus-visible",""):o.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var e;window.applyFocusVisiblePolyfill=o;try{e=new CustomEvent("focus-visible-polyfill-ready")}catch(o){(e=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(e)}"undefined"!=typeof document&&o(document)}();const e=function(){const o=()=>{const o=.01*window.innerHeight,e=.01*window.innerWidth;document.documentElement.style.setProperty("--dwc-vh",o+"px"),document.documentElement.style.setProperty("--dwc-vw",e+"px")};o(),window.addEventListener("resize",o)};export{e as g}