PageSourceSearch

https://joesecurity.org/jotform/js/for-aria-notify-polyfill.js

js joesecurity.org collected 2026-10-02 03:16:31 UTC 3,854 bytes, 1 lines download raw bytes

1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["for-aria-notify-polyfill"]=t():e["for-aria-notify-polyfill"]=t()}(this,function(){return function(){"use strict";var e={};function t(e,t,i){if(!t.has(e))throw TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function i(e,i){var n=t(e,i,"get");return n.get?n.get.call(e):n.value}function n(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,i){n(e,t),t.set(e,i)}function s(e,t,i){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return i}function a(e,t){n(e,t),t.add(e)}function l(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}return!function(){if("u">typeof window&&void 0!==window.Element&&void 0!==window.Document&&(!("ariaNotify"in Element.prototype)||!("ariaNotify"in Document.prototype))){let f=`${Date.now()}`;try{f=crypto.randomUUID()}catch(e){}let d=Symbol(),m=`polite-live-region-${f}`,y=`assertive-live-region-${f}`;var e,n,r,c=new WeakSet;class w{async announce(){if(!s(this,c,u).call(this))return;let e=this.element.closest("dialog")||this.element.closest("[role='dialog']")||this.element.getRootNode();(!e||e instanceof Document)&&(e=document.body);let t="high"===this.priority?y:m,i=e.querySelector(t);i||(i=document.createElement(t),e.append(i)),await new Promise(e=>setTimeout(e,250)),i.handleMessage(d,this.message)}constructor({element:e,message:t,priority:i="normal"}){a(this,c),l(this,"element",void 0),l(this,"message",void 0),l(this,"priority","normal"),this.element=e,this.message=t,this.priority=i}}function u(){var e,t;let i="dialog[open]";try{"u">typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("selector(:modal)")&&(i=":modal")}catch(e){}return this.element.isConnected&&!this.element.closest("[inert]")&&(null==(e=null==(t=this.element.ownerDocument.querySelector(i))?void 0:t.contains(this.element))||e)}let v=new(e=new WeakMap,n=new WeakMap,r=new WeakSet,class{enqueue(t){let{priority:o}=t;if("high"===o){let n=i(this,e).findLastIndex(e=>"high"===e.priority);i(this,e).splice(n+1,0,t)}else i(this,e).push(t);i(this,n)||s(this,r,p).call(this)}constructor(){a(this,r),o(this,e,{writable:!0,value:[]}),o(this,n,{writable:!0,value:null})}});var h=new WeakMap;class b extends HTMLElement{connectedCallback(){this.setAttribute("aria-atomic","true"),this.style.marginLeft="-1px",this.style.marginTop="-1px",this.style.position="absolute",this.style.width="1px",this.style.height="1px",this.style.overflow="hidden",this.style.clipPath="rect(0 0 0 0)",this.style.overflowWrap="normal"}handleMessage(e=null,t){if(d!==e)return;let n=i(this,h).textContent===t?" ":"";i(this,h).textContent=`${t}${n}`}constructor(...e){super(...e),o(this,h,{writable:!0,value:this.attachShadow({mode:"closed"})})}}async function p(){!function(e,i,n){var o=t(e,i,"set");if(o.set)o.set.call(e,n);else{if(!o.writable)throw TypeError("attempted to set read only private field");o.value=n}}(this,n,i(this,e).shift()),i(this,n)&&(await i(this,n).announce(),s(this,r,p).call(this))}customElements.define(m,class extends b{connectedCallback(){this.setAttribute("aria-live","polite"),super.connectedCallback()}}),customElements.define(y,class extends b{connectedCallback(){this.setAttribute("aria-live","assertive"),super.connectedCallback()}}),"ariaNotify"in Element.prototype||(Element.prototype.ariaNotify=function(e,{priority:t="normal"}={}){v.enqueue(new w({element:this,message:e,priority:t}))}),"ariaNotify"in Document.prototype||(Document.prototype.ariaNotify=function(e,{priority:t="normal"}={}){v.enqueue(new w({element:this.documentElement,message:e,priority:t}))})}}(),e=e.default}()});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.