snipe-it/public/js/dist/all-defer.js

2 lines
41 KiB
JavaScript
Raw Normal View History

(()=>{var e,t,n,r,i=!1,o=!1,a=[],s=-1;function l(e){!function(e){a.includes(e)||a.push(e);o||i||(i=!0,queueMicrotask(u))}(e)}function c(e){let t=a.indexOf(e);-1!==t&&t>s&&a.splice(t,1)}function u(){i=!1,o=!0;for(let e=0;e<a.length;e++)a[e](),s=e;a.length=0,s=-1,o=!1}var f=!0;function d(e){t=e}function _(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function p(e,t){if("function"==typeof ShadowRoot&&e instanceof ShadowRoot)return void Array.from(e.children).forEach((e=>p(e,t)));let n=!1;if(t(e,(()=>n=!0)),n)return;let r=e.firstElementChild;for(;r;)p(r,t),r=r.nextElementSibling}function h(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var x=!1;var m=[],g=[];function v(){return m.map((e=>e()))}function y(){return m.concat(g).map((e=>e()))}function b(e){m.push(e)}function w(e){g.push(e)}function E(e,t=!1){return A(e,(e=>{if((t?y():v()).some((t=>e.matches(t))))return!0}))}function A(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),e.parentElement)return A(e.parentElement,t)}}var k=[];function O(e,t=p,n=(()=>{})){!function(e){me=!0;let t=Symbol();ve=t,ge.set(t,[]);let n=()=>{for(;ge.get(t).length;)ge.get(t).shift()();ge.delete(t)},r=()=>{me=!1,n()};e(n),r()}((()=>{t(e,((e,t)=>{n(e,t),k.forEach((n=>n(e,t))),he(e,e.attributes).forEach((e=>e())),e._x_ignore&&t()}))}))}function S(e){p(e,(e=>{P(e),function(e){if(e._x_cleanups)for(;e._x_cleanups.length;)e._x_cleanups.pop()()}(e)}))}var C=[],$=[],j=[];function N(e,t){"function"==typeof t?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,$.push(t))}function M(e){C.push(e)}function L(e,t,n){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(n)}function P(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach((([n,r])=>{(void 0===t||t.includes(n))&&(r.forEach((e=>e())),delete e._x_attributeCleanups[n])}))}var R=new MutationObserver(U),T=!1;function B(){R.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),T=!0}function z(){(I=I.concat(R.takeRecords())).length&&!D&&(D=!0,queueMicrotask((()=>{U(I),I.length=0,D=!1}))),R.disconnect(),T=!1}var I=[],D=!1;function q(e){if(!T)return e();z();let t=e();return B(),t}var F=!1,W=[];function U(e){if(F)return void(W=W.concat(e));let t=[],n=[],r=new Map,i=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&("childList"===e[o].type&&(e[o].addedNodes.forEach((e=>1===e.nodeType&&t.push(e))),e[o].removedNodes.forEach((e=>1===e.nodeType&&n.push(e)))),"attributes"===e[o].type)){let t=e[o].target,n=e[o].attributeName,a=e[o].oldValue,s=()=>{r.has(t)||r.set(t,[]),r.get(t).push({name:n,value:t.getAttribute(n)})},l=()=>{i.has(t)||i.set(t,[]),i.get(t).push(n)};t.hasAttribute(n)&&null===a?s():t.hasAttribute(n)?(l(),s()):l()}i.forEach(((e,t)=>{P(t,e)})),r.forEach(((e,t)=>{C.forEach((n=>n(t,e)))}));for(let e of n)t.includes(e)||($.forEach((t=>t(e))),S(e));t.forEach((e=>{e._x_ignoreSelf=!0,e._x_ignore=!0}));for(let e of t)n.includes(e)||e.isConnected&&(delete e._x_ignoreSelf,delete e._x_ignore,j.forEach((t=>t(e))),e._x_ignore=!0,e._x_ignoreSelf=!0);t.forEach((e=>{delete e._x_ignoreSelf,delete e._x_ignore})),t=null,n=null,r=null,i=null}function V(e){return H(K(e))}function J(e,t,n){return e._x_dataStack=[t,...K(n||e)],()=>{e._x_dataStack=e._x_dataStack.filter((e=>e!==t))}}function K(e){return e._x_dataStack?e._x_dataStack:"function"==typeof ShadowRoot&&e instanceof ShadowRoot?K(e.host):e.parentNode?K(e.parentNode):[]}function H(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap((e=>Object.keys(e))))),has:(t,n)=>e.some((e=>e.hasOwnProperty(n))),get:(n,r)=>(e.find((e=>{if(e.hasOwnProperty(r)){let n=Object.getOwnPropertyDescriptor(e,r);if(n.get&&n.get._x_alreadyBound||n.set&&n.set._x_alreadyBound)return!0;if((n.get||n.set)&&n.enumerable){let i=n.get,o=n.set,a=n;i=i&&i.bind(t),o=o&&o.bind(t),i&&(i._x_alreadyBound=!0),o&&(o._x_alreadyBound=!0),Object.defineProperty(e,r,{...a,get:i,set:o})}return!0}return!1}))||{})[