phirepass-widgets 0.0.16 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -446,7 +446,11 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
446
446
  }
447
447
  let isProp = isMemberInElement(elm, memberName);
448
448
  memberName.toLowerCase();
449
- if (memberName === "key") ; else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
449
+ if (memberName === "key") ; else if (memberName === "ref") {
450
+ if (newValue) {
451
+ queueRefAttachment(newValue, elm);
452
+ }
453
+ } else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
450
454
  const propName = memberName.slice(5);
451
455
  let attrName;
452
456
  {
@@ -552,6 +556,8 @@ function sortedAttrNames(attrNames) {
552
556
  var hostTagName;
553
557
  var useNativeShadowDom = false;
554
558
  var isSvgMode = false;
559
+ var refCallbacksToRemove = [];
560
+ var refCallbacksToAttach = [];
555
561
  var createElm = (oldParentVNode, newParentVNode, childIndex) => {
556
562
  const newVNode2 = newParentVNode.$children$[childIndex];
557
563
  let i2 = 0;
@@ -623,6 +629,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
623
629
  const vnode = vnodes[index];
624
630
  if (vnode) {
625
631
  const elm = vnode.$elm$;
632
+ nullifyVNodeRefs(vnode);
626
633
  if (elm) {
627
634
  elm.remove();
628
635
  }
@@ -753,6 +760,27 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
753
760
  } else ;
754
761
  }
755
762
  };
763
+ var nullifyVNodeRefs = (vNode) => {
764
+ {
765
+ if (vNode.$attrs$ && vNode.$attrs$.ref) {
766
+ refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
767
+ }
768
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
769
+ }
770
+ };
771
+ var queueRefAttachment = (refCallback, elm) => {
772
+ {
773
+ refCallbacksToAttach.push(() => refCallback(elm));
774
+ }
775
+ };
776
+ var flushQueuedRefCallbacks = () => {
777
+ {
778
+ refCallbacksToRemove.forEach((cb) => cb());
779
+ refCallbacksToRemove.length = 0;
780
+ refCallbacksToAttach.forEach((cb) => cb());
781
+ refCallbacksToAttach.length = 0;
782
+ }
783
+ };
756
784
  var insertBefore = (parent, newNode, reference, isInitialLoad) => {
757
785
  if (parent.__insertBefore) {
758
786
  return parent.__insertBefore(newNode, reference);
@@ -780,6 +808,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
780
808
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
781
809
  useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
782
810
  patch(oldVNode, rootVnode, isInitialLoad);
811
+ flushQueuedRefCallbacks();
783
812
  };
784
813
 
785
814
  // src/runtime/update-component.ts
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D6ygTbCo.js');
3
+ var index = require('./index-L0_45iFE.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  const defineCustomElements = async (win, options) => {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D6ygTbCo.js');
3
+ var index = require('./index-L0_45iFE.js');
4
4
 
5
5
  const phirepassSftpClientCss = () => `:host{display:block}`;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D6ygTbCo.js');
3
+ var index = require('./index-L0_45iFE.js');
4
4
 
5
5
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
6
6
  /**
@@ -998,6 +998,10 @@ const PhirepassTerminal = class {
998
998
  serializeAddon;
999
999
  imageAddon;
1000
1000
  channel;
1001
+ containerEl;
1002
+ domReady = false;
1003
+ runtimeReady = false;
1004
+ connected = false;
1001
1005
  inputMode = InputMode.Default;
1002
1006
  resizeObserver;
1003
1007
  resizeDebounceHandle;
@@ -1102,19 +1106,36 @@ const PhirepassTerminal = class {
1102
1106
  console.log('Terminal setup complete');
1103
1107
  this.open_comms();
1104
1108
  console.log('Comms opened');
1109
+ this.runtimeReady = true;
1105
1110
  if (!this.nodeId) {
1106
1111
  console.warn('Prop node_id is not set. Cannot connect to terminal.');
1107
1112
  return;
1108
1113
  }
1109
- this.connect();
1114
+ this.try_connect();
1115
+ }
1116
+ componentDidLoad() {
1117
+ this.domReady = true;
1118
+ this.try_connect();
1110
1119
  }
1111
1120
  async disconnectedCallback() {
1112
1121
  if (this.resizeObserver) {
1113
1122
  this.resizeObserver.disconnect();
1114
1123
  }
1124
+ this.connected = false;
1125
+ this.domReady = false;
1126
+ this.runtimeReady = false;
1115
1127
  this.close_comms();
1116
1128
  this.destroy_terminal();
1117
1129
  }
1130
+ try_connect() {
1131
+ if (this.connected || !this.domReady || !this.runtimeReady) {
1132
+ return;
1133
+ }
1134
+ if (!this.containerEl || !this.terminal || !this.channel) {
1135
+ return;
1136
+ }
1137
+ this.connect();
1138
+ }
1118
1139
  setup_terminal() {
1119
1140
  this.terminal = new Dl(this.terminalOptions);
1120
1141
  this.fitAddon = new o();
@@ -1266,14 +1287,17 @@ const PhirepassTerminal = class {
1266
1287
  this.terminal.writeln("Connection closed.");
1267
1288
  }
1268
1289
  connect() {
1269
- const container = this.el.shadowRoot.getElementById('ccc');
1290
+ const container = this.containerEl;
1291
+ console.log('Attempting to connect terminal to container:', container);
1270
1292
  if (container) {
1271
1293
  this.terminal.open(container);
1294
+ console.log('Terminal opened in container');
1272
1295
  this.fitAddon.fit();
1273
1296
  this.terminal.focus();
1274
1297
  this.terminal.onData(this.handleTerminalData.bind(this));
1275
1298
  this.channel.connect();
1276
1299
  this.setupResizeObserver();
1300
+ this.connected = true;
1277
1301
  console.log('Terminal connected and ready');
1278
1302
  }
1279
1303
  }
@@ -1382,7 +1406,7 @@ const PhirepassTerminal = class {
1382
1406
  this.usernameBuffer = "";
1383
1407
  }
1384
1408
  render() {
1385
- return (index.h(index.Host, { key: '3f923e0cc42c6a8eca61424a7e75960317a5d99c' }, index.h("div", { key: '4a3e2f6d4652b7049c9ec9f535ad32fd6401cc09', id: "ccc" })));
1409
+ return (index.h(index.Host, { key: '16372280bf650813e7aae4e28fae8b761b87a096' }, index.h("div", { key: '5a387d5d9d0772510ded9b50c764ab4ae4b14abc', id: "ccc", ref: el => (this.containerEl = el) })));
1386
1410
  }
1387
1411
  static get watchers() { return {
1388
1412
  "nodeId": [{
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D6ygTbCo.js');
3
+ var index = require('./index-L0_45iFE.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
@@ -23,6 +23,10 @@ export class PhirepassTerminal {
23
23
  serializeAddon;
24
24
  imageAddon;
25
25
  channel;
26
+ containerEl;
27
+ domReady = false;
28
+ runtimeReady = false;
29
+ connected = false;
26
30
  inputMode = InputMode.Default;
27
31
  resizeObserver;
28
32
  resizeDebounceHandle;
@@ -127,19 +131,36 @@ export class PhirepassTerminal {
127
131
  console.log('Terminal setup complete');
128
132
  this.open_comms();
129
133
  console.log('Comms opened');
134
+ this.runtimeReady = true;
130
135
  if (!this.nodeId) {
131
136
  console.warn('Prop node_id is not set. Cannot connect to terminal.');
132
137
  return;
133
138
  }
134
- this.connect();
139
+ this.try_connect();
140
+ }
141
+ componentDidLoad() {
142
+ this.domReady = true;
143
+ this.try_connect();
135
144
  }
136
145
  async disconnectedCallback() {
137
146
  if (this.resizeObserver) {
138
147
  this.resizeObserver.disconnect();
139
148
  }
149
+ this.connected = false;
150
+ this.domReady = false;
151
+ this.runtimeReady = false;
140
152
  this.close_comms();
141
153
  this.destroy_terminal();
142
154
  }
155
+ try_connect() {
156
+ if (this.connected || !this.domReady || !this.runtimeReady) {
157
+ return;
158
+ }
159
+ if (!this.containerEl || !this.terminal || !this.channel) {
160
+ return;
161
+ }
162
+ this.connect();
163
+ }
143
164
  setup_terminal() {
144
165
  this.terminal = new Terminal(this.terminalOptions);
145
166
  this.fitAddon = new FitAddon();
@@ -291,14 +312,17 @@ export class PhirepassTerminal {
291
312
  this.terminal.writeln("Connection closed.");
292
313
  }
293
314
  connect() {
294
- const container = this.el.shadowRoot.getElementById('ccc');
315
+ const container = this.containerEl;
316
+ console.log('Attempting to connect terminal to container:', container);
295
317
  if (container) {
296
318
  this.terminal.open(container);
319
+ console.log('Terminal opened in container');
297
320
  this.fitAddon.fit();
298
321
  this.terminal.focus();
299
322
  this.terminal.onData(this.handleTerminalData.bind(this));
300
323
  this.channel.connect();
301
324
  this.setupResizeObserver();
325
+ this.connected = true;
302
326
  console.log('Terminal connected and ready');
303
327
  }
304
328
  }
@@ -407,7 +431,7 @@ export class PhirepassTerminal {
407
431
  this.usernameBuffer = "";
408
432
  }
409
433
  render() {
410
- return (h(Host, { key: '3f923e0cc42c6a8eca61424a7e75960317a5d99c' }, h("div", { key: '4a3e2f6d4652b7049c9ec9f535ad32fd6401cc09', id: "ccc" })));
434
+ return (h(Host, { key: '16372280bf650813e7aae4e28fae8b761b87a096' }, h("div", { key: '5a387d5d9d0772510ded9b50c764ab4ae4b14abc', id: "ccc", ref: el => (this.containerEl = el) })));
411
435
  }
412
436
  static get is() { return "phirepass-terminal"; }
413
437
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>(0,console.error)(t,e),s=new Map,i="undefined"!=typeof window?window:{},r=i.HTMLElement||class{},c={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},u=(()=>{try{return!!i.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),f=!!u&&(()=>!!i.document&&Object.getOwnPropertyDescriptor(i.document.adoptedStyleSheets,"length").writable)(),a=!1,d=[],h=[],p=(t,e)=>n=>{t.push(n),a||(a=!0,e&&4&c.i?$(y):c.raf(y))},m=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},y=()=>{m(d),m(h),(a=d.length>0)&&c.raf(y)},$=t=>Promise.resolve(void 0).then(t),b=p(h,!0),v=t=>{const e=new URL(t,c.u);return e.origin!==i.location.origin?e.href:e.pathname},w=t=>c.u=t;function g(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(f?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var j,O=new WeakMap,S=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,k=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!M(l))&&(l+=""),s&&i?r[r.length-1].p+=l:r.push(s?E(null,l):l),i=s)};c(n),e&&e.key&&(o=e.key);const u=E(t,null);return u.m=e,r.length>0&&(u.$=r),u.v=o,u},E=(t,e)=>({i:0,j:t,p:null!=e?e:null,O:null,$:null,m:null,v:null}),A={},C=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,L=(t,e,n,o,s,i)=>{if(n===o)return;let r=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"key"===e);else{if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let s;{const e=l(t);if(e&&e.l&&e.l.t){const t=e.l.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===o?"":o))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=o}catch(t){}return}{const l=M(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!l&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}}},N=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of _(Object.keys(o)))t in s||L(l,t,o[t],void 0,n,e.i);for(const t of _(Object.keys(s)))L(l,t,o[t],s[t],n,e.i)};function _(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var x=!1,D=!1,H=(t,e,n)=>{const l=e.$[n];let o,s,r=0;if(!i.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=i.document.createElement(l.j),N(null,l,D),l.$){const e="template"===l.j?o.content:o;for(r=0;r<l.$.length;++r)s=H(t,l,r),s&&e.appendChild(s)}return o["s-hn"]=j,o},P=(t,e,n,l,o,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===j&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);o<=s;++o)l[o]&&(i=H(null,n,o),i&&(l[o].O=i,F(r,i,e)))},U=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;t&&t.remove()}}},R=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),W=(t,e,n=!1)=>{const l=e.O=t.O,o=t.$,s=e.$;"slot"!==e.j||x||t.S!==e.S&&(e.O["s-sn"]=e.S||"",(t=>{c.i|=1;const e=t.closest(j.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of n?l.reverse():l)null!=t["s-sh"]&&(F(e,t,null!=n?n:null),t["s-sh"]=void 0)}c.i&=-2})(e.O.parentElement)),N(t,e,D),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=l.length-1,m=l[0],y=l[p];const $="template"===n.j?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(R(d,m,o))W(d,m,o),d=e[++r],m=l[++c];else if(R(h,y,o))W(h,y,o),h=e[--a],y=l[--p];else if(R(d,y,o))W(d,y,o),F($,d.O,h.O.nextSibling),d=e[++r],y=l[--p];else if(R(h,m,o))W(h,m,o),F($,h.O,d.O),h=e[--a],m=l[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].v&&e[f].v===m.v){u=f;break}u>=0?(i=e[u],i.j!==m.j?s=H(e&&e[c],n,u):(W(i,m,o),e[u]=void 0,s=i.O),m=l[++c]):(s=H(e&&e[c],n,c),m=l[++c]),s&&F(d.O.parentNode,s,d.O)}r>a?P(t,null==l[p+1]?null:l[p+1].O,n,l,c,p):c>p&&U(e,r,a)})(l,o,e,s,n):null!==s?P(l,null,e,s,0,s.length-1):!n&&null!==o&&U(o,0,o.length-1)},F=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),q=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.l,s=t.M||E(null,null),i=(t=>t&&t.j===A)(e)?e:k(null,null,e);if(j=l.tagName,n&&i.m)for(const t of Object.keys(i.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.m[t]=l[t]);i.j=null,i.i|=4,t.M=i,i.O=s.O=l.shadowRoot||l,x=!(!(1&o.i)||128&o.i),W(s,i,n)},z=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.k=()=>{e["s-p"].splice(n-1,1),l()})))}},T=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);z(t,t.A);const n=()=>V(t,e);if(!e)return b(n);queueMicrotask((()=>{n()}))},V=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=K(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=Y(o,(()=>K(l,"componentWillRender",void 0,n))),Y(o,(()=>B(t,l,e)))},Y=(t,e)=>Z(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Z=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,B=async(t,e,n)=>{var l;const o=t.$hostElement$,r=o["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,o=((t,e)=>{var n,l,o;const r=S(e),a=s.get(r);if(!i.document)return r;if(t=11===t.nodeType?t:i.document,a)if("string"==typeof a){let o,s=O.get(t=t.head||t);if(s||O.set(t,s=new Set),!s.has(r)){o=i.document.createElement("style"),o.textContent=a;const d=null!=(n=c.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=i.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&o.setAttribute("nonce",d),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(u){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(a),f?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=a+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(r)}}else{let e=O.get(t);if(e||O.set(t,e=new Set),!e.has(r)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(a.constructor===n.CSSStyleSheet)l=a;else{l=new n.CSSStyleSheet;for(let t=0;t<a.cssRules.length;t++)l.insertRule(a.cssRules[t].cssText,t)}f?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(r)}}return r})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);G(t,e,o,n),r&&(r.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>I(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},G=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,q(t,e,l)}catch(e){o(e,t.$hostElement$)}return null},I=t=>{const e=t.$hostElement$,n=e,l=t.A;K(n,"componentDidRender",void 0,e),64&t.i?K(n,"componentDidUpdate",void 0,e):(t.i|=64,Q(e),K(n,"componentDidLoad",void 0,e),t.L(e),l||J()),t.k&&(t.k(),t.k=void 0),512&t.i&&$((()=>T(t,!1))),t.i&=-517},J=()=>{$((()=>(t=>{const e=c.ce("appload",{detail:{namespace:"phirepass-widgets"}});return t.dispatchEvent(e),e})(i)))},K=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t,l)}},Q=t=>t.classList.add("hydrated"),X=(t,e,n,s)=>{const i=l(t);if(!i)return;const r=t,c=i.o.get(e),u=i.i,f=r;if(!((n=C(n,s.t[e][0]))===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.o.set(e,n),s.N){const t=s.N[e];t&&t.map((t=>{try{const[[l,o]]=Object.entries(t);(128&u||1&o)&&(f?f[l](n,c,e):i._.push((()=>{i.D[l](n,c,e)})))}catch(t){o(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||T(i,!1)}}},tt=(e,n)=>{var o,s;const i=e.prototype;{e.watchers&&!n.N&&(n.N=e.watchers),e.deserializers&&!n.H&&(n.H=e.deserializers),e.serializers&&!n.P&&(n.P=e.serializers);const r=Object.entries(null!=(o=n.t)?o:{});r.map((([e,[o]])=>{if(31&o||32&o){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):((t,e)=>l(this).o.get(e))(0,e)},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=l(this);if(s){if(r)return void 0===(32&o?this[e]:s.$hostElement$[e])&&s.o.get(e)&&(t=s.o.get(e)),r.call(this,C(t,o)),void X(this,e,t=32&o?this[e]:s.$hostElement$[e],n);X(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,o,s){c.jmp((()=>{var c;const u=t.get(e),f=l(this);if(this.hasOwnProperty(u),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.i;if(f&&t&&!(8&t)&&s!==o){const l=this,i=null==(c=n.N)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=l[i]&&(128&t||1&r)&&l[i].call(l,s,o,e)}))}return}const a=r.find((([t])=>t===u));a&&4&a[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(i,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.N)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},et=(t,e)=>{const i={i:e[0],h:e[1]};try{i.t=e[2],i.N=t.N,i.H=t.H,i.P=t.P;const r=t.prototype.connectedCallback,f=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const l={i:0,$hostElement$:t,l:e,o:new Map,U:new Map};l.R=new Promise((t=>l.L=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&e.i&&n(t,l)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&c.i)){const e=l(t);if(!e)return;const n=e.l,i=()=>{};if(1&e.i)(null==e?void 0:e.D)||(null==e?void 0:e.R)&&e.R.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){z(e,e.A=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=S(n);if(!s.has(e)){const l=()=>{};((t,e,n)=>{let l=s.get(t);u&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,s.set(t,l)})(e,t,!!(1&n.i)),l()}}const o=e.A,i=()=>T(e,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()}catch(n){o(n,t),e.k&&(e.k(),e.k=void 0),e.L&&e.L(t)}})(t,e,n)}i()}})(this),r&&r.call(this)},disconnectedCallback(){(async t=>{O.has(t)&&O.delete(t),t.shadowRoot&&O.has(t.shadowRoot)&&O.delete(t.shadowRoot)})(this),f&&f.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${i.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else g.call(this,i)}}),Object.defineProperty(t,"is",{value:i.h,configurable:!0}),tt(t,i)}catch(e){return o(e),t}},nt=t=>c.C=t,lt=t=>Object.assign(c,t);function ot(t,e){q({l:{i:0,h:e.tagName},$hostElement$:e},t)}function st(t){return t}export{r as H,A as a,v as getAssetPath,k as h,et as p,ot as render,w as setAssetPath,nt as setNonce,lt as setPlatformOptions,st as t}
1
+ function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>(0,console.error)(t,e),s=new Map,i="undefined"!=typeof window?window:{},r=i.HTMLElement||class{},c={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},u=(()=>{try{return!!i.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),f=!!u&&(()=>!!i.document&&Object.getOwnPropertyDescriptor(i.document.adoptedStyleSheets,"length").writable)(),a=!1,d=[],h=[],p=(t,e)=>n=>{t.push(n),a||(a=!0,e&&4&c.i?$(y):c.raf(y))},m=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},y=()=>{m(d),m(h),(a=d.length>0)&&c.raf(y)},$=t=>Promise.resolve(void 0).then(t),b=p(h,!0),v=t=>{const e=new URL(t,c.u);return e.origin!==i.location.origin?e.href:e.pathname},w=t=>c.u=t;function g(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(f?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var j,O=new WeakMap,S=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,k=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!M(l))&&(l+=""),s&&i?r[r.length-1].p+=l:r.push(s?E(null,l):l),i=s)};c(n),e&&e.key&&(o=e.key);const u=E(t,null);return u.m=e,r.length>0&&(u.$=r),u.v=o,u},E=(t,e)=>({i:0,j:t,p:null!=e?e:null,O:null,$:null,m:null,v:null}),A={},C=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,L=(t,e,n,o,s,i)=>{if(n===o)return;let r=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"key"===e);else if("ref"===e)o&&T(o,t);else{if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let s;{const e=l(t);if(e&&e.l&&e.l.t){const t=e.l.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===o?"":o))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=o}catch(t){}return}{const l=M(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!l&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}}},N=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of _(Object.keys(o)))t in s||L(l,t,o[t],void 0,n,e.i);for(const t of _(Object.keys(s)))L(l,t,o[t],s[t],n,e.i)};function _(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var x=!1,D=!1,H=[],P=[],U=(t,e,n)=>{const l=e.$[n];let o,s,r=0;if(!i.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=i.document.createElement(l.j),N(null,l,D),l.$){const e="template"===l.j?o.content:o;for(r=0;r<l.$.length;++r)s=U(t,l,r),s&&e.appendChild(s)}return o["s-hn"]=j,o},R=(t,e,n,l,o,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===j&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);o<=s;++o)l[o]&&(i=U(null,n,o),i&&(l[o].O=i,V(r,i,e)))},W=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;z(e),t&&t.remove()}}},F=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),q=(t,e,n=!1)=>{const l=e.O=t.O,o=t.$,s=e.$;"slot"!==e.j||x||t.S!==e.S&&(e.O["s-sn"]=e.S||"",(t=>{c.i|=1;const e=t.closest(j.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of n?l.reverse():l)null!=t["s-sh"]&&(V(e,t,null!=n?n:null),t["s-sh"]=void 0)}c.i&=-2})(e.O.parentElement)),N(t,e,D),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=l.length-1,m=l[0],y=l[p];const $="template"===n.j?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(F(d,m,o))q(d,m,o),d=e[++r],m=l[++c];else if(F(h,y,o))q(h,y,o),h=e[--a],y=l[--p];else if(F(d,y,o))q(d,y,o),V($,d.O,h.O.nextSibling),d=e[++r],y=l[--p];else if(F(h,m,o))q(h,m,o),V($,h.O,d.O),h=e[--a],m=l[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].v&&e[f].v===m.v){u=f;break}u>=0?(i=e[u],i.j!==m.j?s=U(e&&e[c],n,u):(q(i,m,o),e[u]=void 0,s=i.O),m=l[++c]):(s=U(e&&e[c],n,c),m=l[++c]),s&&V(d.O.parentNode,s,d.O)}r>a?R(t,null==l[p+1]?null:l[p+1].O,n,l,c,p):c>p&&W(e,r,a)})(l,o,e,s,n):null!==s?R(l,null,e,s,0,s.length-1):!n&&null!==o&&W(o,0,o.length-1)},z=t=>{t.m&&t.m.ref&&H.push((()=>t.m.ref(null))),t.$&&t.$.map(z)},T=(t,e)=>{P.push((()=>t(e)))},V=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),Y=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.l,s=t.M||E(null,null),i=(t=>t&&t.j===A)(e)?e:k(null,null,e);if(j=l.tagName,n&&i.m)for(const t of Object.keys(i.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.m[t]=l[t]);i.j=null,i.i|=4,t.M=i,i.O=s.O=l.shadowRoot||l,x=!(!(1&o.i)||128&o.i),q(s,i,n),H.forEach((t=>t())),H.length=0,P.forEach((t=>t())),P.length=0},Z=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.k=()=>{e["s-p"].splice(n-1,1),l()})))}},B=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);Z(t,t.A);const n=()=>G(t,e);if(!e)return b(n);queueMicrotask((()=>{n()}))},G=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=et(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=I(o,(()=>et(l,"componentWillRender",void 0,n))),I(o,(()=>K(t,l,e)))},I=(t,e)=>J(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),J=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,K=async(t,e,n)=>{var l;const o=t.$hostElement$,r=o["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,o=((t,e)=>{var n,l,o;const r=S(e),a=s.get(r);if(!i.document)return r;if(t=11===t.nodeType?t:i.document,a)if("string"==typeof a){let o,s=O.get(t=t.head||t);if(s||O.set(t,s=new Set),!s.has(r)){o=i.document.createElement("style"),o.textContent=a;const d=null!=(n=c.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=i.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&o.setAttribute("nonce",d),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(u){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(a),f?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=a+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(r)}}else{let e=O.get(t);if(e||O.set(t,e=new Set),!e.has(r)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(a.constructor===n.CSSStyleSheet)l=a;else{l=new n.CSSStyleSheet;for(let t=0;t<a.cssRules.length;t++)l.insertRule(a.cssRules[t].cssText,t)}f?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(r)}}return r})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);Q(t,e,o,n),r&&(r.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>X(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},Q=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,Y(t,e,l)}catch(e){o(e,t.$hostElement$)}return null},X=t=>{const e=t.$hostElement$,n=e,l=t.A;et(n,"componentDidRender",void 0,e),64&t.i?et(n,"componentDidUpdate",void 0,e):(t.i|=64,nt(e),et(n,"componentDidLoad",void 0,e),t.L(e),l||tt()),t.k&&(t.k(),t.k=void 0),512&t.i&&$((()=>B(t,!1))),t.i&=-517},tt=()=>{$((()=>(t=>{const e=c.ce("appload",{detail:{namespace:"phirepass-widgets"}});return t.dispatchEvent(e),e})(i)))},et=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t,l)}},nt=t=>t.classList.add("hydrated"),lt=(t,e,n,s)=>{const i=l(t);if(!i)return;const r=t,c=i.o.get(e),u=i.i,f=r;if(!((n=C(n,s.t[e][0]))===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.o.set(e,n),s.N){const t=s.N[e];t&&t.map((t=>{try{const[[l,o]]=Object.entries(t);(128&u||1&o)&&(f?f[l](n,c,e):i._.push((()=>{i.D[l](n,c,e)})))}catch(t){o(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||B(i,!1)}}},ot=(e,n)=>{var o,s;const i=e.prototype;{e.watchers&&!n.N&&(n.N=e.watchers),e.deserializers&&!n.H&&(n.H=e.deserializers),e.serializers&&!n.P&&(n.P=e.serializers);const r=Object.entries(null!=(o=n.t)?o:{});r.map((([e,[o]])=>{if(31&o||32&o){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):((t,e)=>l(this).o.get(e))(0,e)},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=l(this);if(s){if(r)return void 0===(32&o?this[e]:s.$hostElement$[e])&&s.o.get(e)&&(t=s.o.get(e)),r.call(this,C(t,o)),void lt(this,e,t=32&o?this[e]:s.$hostElement$[e],n);lt(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,o,s){c.jmp((()=>{var c;const u=t.get(e),f=l(this);if(this.hasOwnProperty(u),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.i;if(f&&t&&!(8&t)&&s!==o){const l=this,i=null==(c=n.N)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=l[i]&&(128&t||1&r)&&l[i].call(l,s,o,e)}))}return}const a=r.find((([t])=>t===u));a&&4&a[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(i,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.N)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},st=(t,e)=>{const i={i:e[0],h:e[1]};try{i.t=e[2],i.N=t.N,i.H=t.H,i.P=t.P;const r=t.prototype.connectedCallback,f=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const l={i:0,$hostElement$:t,l:e,o:new Map,U:new Map};l.R=new Promise((t=>l.L=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&e.i&&n(t,l)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&c.i)){const e=l(t);if(!e)return;const n=e.l,i=()=>{};if(1&e.i)(null==e?void 0:e.D)||(null==e?void 0:e.R)&&e.R.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Z(e,e.A=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=S(n);if(!s.has(e)){const l=()=>{};((t,e,n)=>{let l=s.get(t);u&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,s.set(t,l)})(e,t,!!(1&n.i)),l()}}const o=e.A,i=()=>B(e,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()}catch(n){o(n,t),e.k&&(e.k(),e.k=void 0),e.L&&e.L(t)}})(t,e,n)}i()}})(this),r&&r.call(this)},disconnectedCallback(){(async t=>{O.has(t)&&O.delete(t),t.shadowRoot&&O.has(t.shadowRoot)&&O.delete(t.shadowRoot)})(this),f&&f.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${i.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else g.call(this,i)}}),Object.defineProperty(t,"is",{value:i.h,configurable:!0}),ot(t,i)}catch(e){return o(e),t}},it=t=>c.C=t,rt=t=>Object.assign(c,t);function ct(t,e){Y({l:{i:0,h:e.tagName},$hostElement$:e},t)}function ut(t){return t}export{r as H,A as a,v as getAssetPath,k as h,st as p,ct as render,w as setAssetPath,it as setNonce,rt as setPlatformOptions,ut as t}