/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import{d as l,e as u}from"./chunk.4LA6HEA7.js";import{i as c}from"./chunk.J2M2MXP2.js";var s="_forgeElementStyles",d=window.ShadowRoot&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function E(e){x(e._customElementName,e),c(e._customElementDependencies)&&S(e._customElementDependencies)}function S(e){e.forEach(E)}function x(e,t,n){var o;!((o=window==null?void 0:window.customElements)===null||o===void 0)&&o.get(e)||window.customElements.define(e,t,n)}function v(e,t){let n=e;for(;n.parentNode&&(n=n.parentNode,!!n.tagName);)if(!n.tagName||n.tagName.toLowerCase()===t.toLowerCase())return n;return null}function f(e){return new DOMParser().parseFromString(e,"text/html").querySelector("template")}function T(e,t){e.appendChild(f(t).content.cloneNode(!0))}function N(e,t,n,o=!1){let r=m(t);e.attachShadow({mode:"open",delegatesFocus:o}),n&&h(e,n),p(e,r)}function y(e,t,n){if(!e.shadowRoot)throw new Error("This element does not contain a shadow root. Did you mean to call `attachShadowTemplate`?");let o=m(t);e.shadowRoot.children.length&&l(e.shadowRoot),n&&h(e,n,{force:!0}),p(e,o)}function m(e,t){let n=f(e);if(t){t=t instanceof Array?t:[t];let o=document.createElement("style"),r=window.forgeNonce;r&&o.setAttribute("nonce",r),o.textContent=t.join(" "),n.content.appendChild(o)}return n}function p(e,t){e.shadowRoot.appendChild(t.content.cloneNode(!0))}function h(e,t,{force:n}={force:!1}){let o=e.constructor;if(!e.shadowRoot||!t){d&&(o[s]&&(o[s]=[]),e.shadowRoot&&(e.shadowRoot.adoptedStyleSheets=[]));return}if(t=t instanceof Array?t:[t],d){if(n||!o[s]){let r=new CSSStyleSheet;r.replaceSync(t.join(" ")),o[s]=[r]}e.shadowRoot.adoptedStyleSheets=o[s]}else{let r=document.createElement("style"),i=window.forgeNonce;i&&r.setAttribute("nonce",i),r.textContent=t.join(" "),e.shadowRoot.appendChild(r)}}function g(e,t){return e.shadowRoot.querySelector(t)}function _(e,t){return e.querySelector(t)}function D(e,t,n,o=!0,r=!1){let i;return typeof CustomEvent=="function"?i=new CustomEvent(t,{detail:n,bubbles:o,cancelable:r}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,o,r,n)),e.dispatchEvent(i)}function P(e,t,n,o,r,i){let a=!!g(e,o);return i||(i=document.createComment(`(${n}) ${o}`)),t&&!a?u(r,i):!t&&a&&u(i,r),i}function A(e,t){function n(o){return!o||o===document||o===window?null:(o.assignedSlot&&(o=o.assignedSlot),o.closest(e)||n(o.getRootNode().host))}return n(t)}var w=class extends HTMLElement{};export{E as a,S as b,v as c,T as d,N as e,y as f,g,_ as h,D as i,P as j,A as k,w as l};
//# sourceMappingURL=chunk.LJLEPTLU.js.map
