phirepass-widgets 0.0.24 → 0.0.26
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.
- package/dist/cjs/{index-L0_45iFE.js → index-Rxdu9QG2.js} +16 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +1 -1
- package/dist/cjs/phirepass-terminal.cjs.entry.js +26 -14
- package/dist/cjs/phirepass-widgets.cjs.js +1 -1
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +47 -13
- package/dist/components/index.js +1 -1
- package/dist/components/phirepass-terminal.js +5 -5
- package/dist/esm/{index-BZOTLEeX.js → index-C8ZFkLEv.js} +16 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/phirepass-sftp-client.entry.js +1 -1
- package/dist/esm/phirepass-terminal.entry.js +26 -14
- package/dist/esm/phirepass-widgets.js +2 -2
- package/dist/phirepass-widgets/p-376ef3af.entry.js +1 -0
- package/dist/phirepass-widgets/p-C8ZFkLEv.js +2 -0
- package/dist/phirepass-widgets/p-c171f4db.entry.js +49 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/components/phirepass-terminal/phirepass-terminal.d.ts +10 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/phirepass-widgets/p-0bd7f5f1.entry.js +0 -1
- package/dist/phirepass-widgets/p-9f8cf22e.entry.js +0 -49
- package/dist/phirepass-widgets/p-BZOTLEeX.js +0 -2
|
@@ -433,6 +433,21 @@ var getElement = (ref) => {
|
|
|
433
433
|
var _a;
|
|
434
434
|
return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
|
|
435
435
|
};
|
|
436
|
+
|
|
437
|
+
// src/runtime/event-emitter.ts
|
|
438
|
+
var createEvent = (ref, name, flags) => {
|
|
439
|
+
const elm = getElement(ref);
|
|
440
|
+
return {
|
|
441
|
+
emit: (detail) => {
|
|
442
|
+
return emitEvent(elm, name, {
|
|
443
|
+
bubbles: true,
|
|
444
|
+
composed: true,
|
|
445
|
+
cancelable: true,
|
|
446
|
+
detail
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
};
|
|
436
451
|
var emitEvent = (elm, name, opts) => {
|
|
437
452
|
const ev = plt.ce(name, opts);
|
|
438
453
|
elm.dispatchEvent(ev);
|
|
@@ -1470,4 +1485,4 @@ function transformTag(tag) {
|
|
|
1470
1485
|
return tag;
|
|
1471
1486
|
}
|
|
1472
1487
|
|
|
1473
|
-
export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1488
|
+
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-C8ZFkLEv.js';
|
|
2
|
+
export { s as setNonce } from './index-C8ZFkLEv.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, g as getElement, h as h$1, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement, h as h$1, H as Host } from './index-C8ZFkLEv.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
@@ -983,9 +983,16 @@ var InputMode;
|
|
|
983
983
|
InputMode[InputMode["Password"] = 1] = "Password";
|
|
984
984
|
InputMode[InputMode["Default"] = 2] = "Default";
|
|
985
985
|
})(InputMode || (InputMode = {}));
|
|
986
|
+
var ConnectionState;
|
|
987
|
+
(function (ConnectionState) {
|
|
988
|
+
ConnectionState["Disconnected"] = "disconnected";
|
|
989
|
+
ConnectionState["Connected"] = "connected";
|
|
990
|
+
ConnectionState["Error"] = "error";
|
|
991
|
+
})(ConnectionState || (ConnectionState = {}));
|
|
986
992
|
const PhirepassTerminal = class {
|
|
987
993
|
constructor(hostRef) {
|
|
988
994
|
registerInstance(this, hostRef);
|
|
995
|
+
this.connectionStateChanged = createEvent(this, "connectionStateChanged");
|
|
989
996
|
}
|
|
990
997
|
terminal;
|
|
991
998
|
fitAddon;
|
|
@@ -1085,6 +1092,7 @@ const PhirepassTerminal = class {
|
|
|
1085
1092
|
onServerIdChange(_newValue, _oldValue) {
|
|
1086
1093
|
this.onNodeIdChange(this.nodeId, this.nodeId);
|
|
1087
1094
|
}
|
|
1095
|
+
connectionStateChanged;
|
|
1088
1096
|
create_web_socket_endpoint() {
|
|
1089
1097
|
const protocol = this.allowInsecure ? 'ws' : 'wss';
|
|
1090
1098
|
if (!this.allowInsecure && this.serverPort === 443) {
|
|
@@ -1096,13 +1104,9 @@ const PhirepassTerminal = class {
|
|
|
1096
1104
|
return `${protocol}://${this.serverHost}:${this.serverPort}`;
|
|
1097
1105
|
}
|
|
1098
1106
|
async connectedCallback() {
|
|
1099
|
-
console.log('PhirepassTerminal connected to DOM');
|
|
1100
1107
|
await __wbg_init();
|
|
1101
|
-
console.log('PhirepassChannel module initialized');
|
|
1102
1108
|
this.setup_terminal();
|
|
1103
|
-
console.log('Terminal setup complete');
|
|
1104
1109
|
this.open_comms();
|
|
1105
|
-
console.log('Comms opened');
|
|
1106
1110
|
this.runtimeReady = true;
|
|
1107
1111
|
if (!this.nodeId) {
|
|
1108
1112
|
console.warn('Prop node_id is not set. Cannot connect to terminal.');
|
|
@@ -1170,15 +1174,17 @@ const PhirepassTerminal = class {
|
|
|
1170
1174
|
this.channel = new Channel(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId);
|
|
1171
1175
|
}
|
|
1172
1176
|
this.channel.on_connection_open(() => {
|
|
1177
|
+
this.connectionStateChanged.emit([ConnectionState.Connected]);
|
|
1173
1178
|
this.channel.authenticate(this.token, this.nodeId);
|
|
1174
1179
|
});
|
|
1175
1180
|
this.channel.on_connection_close(() => {
|
|
1181
|
+
this.connectionStateChanged.emit([ConnectionState.Disconnected]);
|
|
1176
1182
|
this.terminal.reset();
|
|
1177
1183
|
});
|
|
1178
1184
|
this.channel.on_connection_error((err) => {
|
|
1179
|
-
|
|
1185
|
+
this.connectionStateChanged.emit([ConnectionState.Error, err]);
|
|
1180
1186
|
});
|
|
1181
|
-
this.channel.on_connection_message((
|
|
1187
|
+
this.channel.on_connection_message((_raw_) => {
|
|
1182
1188
|
// console.log('>> raw message received', raw);
|
|
1183
1189
|
});
|
|
1184
1190
|
this.channel.on_protocol_message((msg) => {
|
|
@@ -1191,15 +1197,13 @@ const PhirepassTerminal = class {
|
|
|
1191
1197
|
this.handle_auth_success(web);
|
|
1192
1198
|
break;
|
|
1193
1199
|
case "TunnelOpened":
|
|
1194
|
-
this.
|
|
1195
|
-
this.terminal.reset();
|
|
1196
|
-
this.send_ssh_terminal_resize();
|
|
1200
|
+
this.handle_tunnel_opened(web);
|
|
1197
1201
|
break;
|
|
1198
1202
|
case "TunnelClosed":
|
|
1199
|
-
this.handle_tunnel_closed();
|
|
1203
|
+
this.handle_tunnel_closed(web);
|
|
1200
1204
|
break;
|
|
1201
1205
|
case "TunnelData":
|
|
1202
|
-
this.
|
|
1206
|
+
this.handle_tunnel_data(web);
|
|
1203
1207
|
break;
|
|
1204
1208
|
default:
|
|
1205
1209
|
console.warn('Unknown protocol message type:', web);
|
|
@@ -1279,7 +1283,15 @@ const PhirepassTerminal = class {
|
|
|
1279
1283
|
this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
|
|
1280
1284
|
this.channel.open_ssh_tunnel(this.nodeId);
|
|
1281
1285
|
}
|
|
1282
|
-
|
|
1286
|
+
handle_tunnel_opened(web) {
|
|
1287
|
+
this.session_id = web.sid;
|
|
1288
|
+
this.terminal.reset();
|
|
1289
|
+
this.send_ssh_terminal_resize();
|
|
1290
|
+
}
|
|
1291
|
+
handle_tunnel_data(web) {
|
|
1292
|
+
this.terminal.write(new Uint8Array(web.data));
|
|
1293
|
+
}
|
|
1294
|
+
handle_tunnel_closed(_web_) {
|
|
1283
1295
|
this.session_id = undefined;
|
|
1284
1296
|
this.inputMode = InputMode.Default;
|
|
1285
1297
|
this.clear_creds_buffer();
|
|
@@ -1407,7 +1419,7 @@ const PhirepassTerminal = class {
|
|
|
1407
1419
|
this.usernameBuffer = "";
|
|
1408
1420
|
}
|
|
1409
1421
|
render() {
|
|
1410
|
-
return (h$1(Host, { key: '
|
|
1422
|
+
return (h$1(Host, { key: '350d8b50b8fdcc56816775a617c59040a70370d7' }, h$1("div", { key: 'dbaf79641b6f8f969c0a7f31a87cdc659c301327', id: "ccc", ref: el => (this.containerEl = el) })));
|
|
1411
1423
|
}
|
|
1412
1424
|
static get watchers() { return {
|
|
1413
1425
|
"nodeId": [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-C8ZFkLEv.js';
|
|
2
|
+
export { s as setNonce } from './index-C8ZFkLEv.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as e,H as r}from"./p-C8ZFkLEv.js";const t=class{constructor(e){s(this,e)}render(){return e(r,{key:"d03ff09e3636f79d699c7462e121abe7d08c6683"},e("slot",{key:"bd7285e70384558e4cbf0600b89a57fa4ec3406d"}))}};t.style=":host{display:block}";export{t as phirepass_sftp_client}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],s=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);s&&Object.defineProperty(e,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="undefined"!=typeof window?window:{},u={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},a=t=>Promise.resolve(t),f=(()=>{try{return!!c.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),d=!!f&&(()=>!!c.document&&Object.getOwnPropertyDescriptor(c.document.adoptedStyleSheets,"length").writable)(),h=!1,p=[],m=[],v=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&u.u?$(b):u.raf(b))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{y(p),y(m),(h=p.length>0)&&u.raf(b)},$=t=>a().then(t),w=v(m,!0);function g(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(d?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var S,O=new WeakMap,k=t=>"sc-"+t.p,M=t=>"object"==(t=typeof t)||"function"===t,E=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!M(o))&&(o+=""),s&&i?r[r.length-1].m+=o:r.push(s?C(null,o):o),i=s)};c(n),e&&e.key&&(l=e.key);const u=C(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},C=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),A={},L=(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,N=t=>{var e;return null==(e=o(t))?void 0:e.$hostElement$},x=(t,e)=>{const n=N(t);return{emit:t=>D(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},D=(t,e,n)=>{const o=u.ce(e,n);return t.dispatchEvent(o),o},H=(t,e,n,l,s,i)=>{if(n===l)return;let r=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"key"===e);else if("ref"===e)l&&_(l,t);else{if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let s;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=M(l);if((r||o&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}},P=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},s=e.v||{};for(const t of R(Object.keys(l)))t in s||H(o,t,l[t],void 0,n,e.u);for(const t of R(Object.keys(s)))H(o,t,l[t],s[t],n,e.u)};function R(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var T=!1,U=!1,W=[],z=[],F=(t,e,n)=>{const o=e.$[n];let l,s,i=0;if(!c.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=c.document.createElement(o.S),P(null,o,U),o.$){const e="template"===o.S?l.content:l;for(i=0;i<o.$.length;++i)s=F(t,o,i),s&&e.appendChild(s)}return l["s-hn"]=S,l},q=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===S&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=s;++l)o[l]&&(i=F(null,n,l),i&&(o[l].O=i,B(r,i,e)))},V=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;Z(e),t&&t.remove()}}},G=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),Y=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,s=e.$;"slot"!==e.S||T||t.k!==e.k&&(e.O["s-sn"]=e.k||"",(t=>{u.u|=1;const e=t.closest(S.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(B(e,t,null!=n?n:null),t["s-sh"]=void 0)}u.u&=-2})(e.O.parentElement)),P(t,e,U),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=o.length-1,m=o[0],v=o[p];const y="template"===n.S?t.content:t;for(;r<=f&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(G(d,m,l))Y(d,m,l),d=e[++r],m=o[++c];else if(G(h,v,l))Y(h,v,l),h=e[--f],v=o[--p];else if(G(d,v,l))Y(d,v,l),B(y,d.O,h.O.nextSibling),d=e[++r],v=o[--p];else if(G(h,m,l))Y(h,m,l),B(y,h.O,d.O),h=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===m.j){u=a;break}u>=0?(i=e[u],i.S!==m.S?s=F(e&&e[c],n,u):(Y(i,m,l),e[u]=void 0,s=i.O),m=o[++c]):(s=F(e&&e[c],n,c),m=o[++c]),s&&B(d.O.parentNode,s,d.O)}r>f?q(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&V(e,r,f)})(o,l,e,s,n):null!==s?q(o,null,e,s,0,s.length-1):!n&&null!==l&&V(l,0,l.length-1)},Z=t=>{t.v&&t.v.ref&&W.push((()=>t.v.ref(null))),t.$&&t.$.map(Z)},_=(t,e)=>{z.push((()=>t(e)))},B=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),I=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},J=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);I(t,t.C);const n=()=>K(t,e);if(!e)return w(n);queueMicrotask((()=>{n()}))},K=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)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 l;return e?(t.A.length&&t.A.forEach((t=>t(n))),l=lt(o,"componentWillLoad",void 0,n)):l=lt(o,"componentWillUpdate",void 0,n),l=Q(l,(()=>lt(o,"componentWillRender",void 0,n))),Q(l,(()=>tt(t,o,e)))},Q=(t,e)=>X(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),X=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,tt=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const s=k(e),i=r.get(s);if(!c.document)return s;if(t=11===t.nodeType?t:c.document,i)if("string"==typeof i){let l,r=O.get(t=t.head||t);if(r||O.set(t,r=new Set),!r.has(s)){l=c.document.createElement("style"),l.textContent=i;const a=null!=(n=u.L)?n:j(c.document);if(null!=a&&l.setAttribute("nonce",a),!(1&e.u))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(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(f){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(i),d?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=i+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let e=O.get(t);if(e||O.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===n.CSSStyleSheet)o=i;else{o=new n.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}d?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);et(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>nt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},et=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,s=t.N||C(null,null),i=(t=>t&&t.S===A)(e)?e:E(null,null,e);if(S=o.tagName,n&&i.v)for(const t of Object.keys(i.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.v[t]=o[t]);i.S=null,i.u|=4,t.N=i,i.O=s.O=o.shadowRoot||o,T=!(!(1&l.u)||128&l.u),Y(s,i,n),W.forEach((t=>t())),W.length=0,z.forEach((t=>t())),z.length=0})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},nt=t=>{const e=t.$hostElement$,n=t.i,o=t.C;lt(n,"componentDidRender",void 0,e),64&t.u?lt(n,"componentDidUpdate",void 0,e):(t.u|=64,st(e),lt(n,"componentDidLoad",void 0,e),t.D(e),o||ot()),t.M&&(t.M(),t.M=void 0),512&t.u&&$((()=>J(t,!1))),t.u&=-517},ot=()=>{$((()=>D(c,"appload",{detail:{namespace:"phirepass-widgets"}})))},lt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},st=t=>t.classList.add("hydrated"),it=(t,e,n,l)=>{const i=o(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.l.get(e),u=i.u,a=i.i;if(n=L(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.l.set(e,n),l.H){const t=l.H[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(a?a[o](n,c,e):i.A.push((()=>{i.i[o](n,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||J(i,!1)}}},rt=(e,n,l)=>{var s,i;const r=e.prototype;{e.watchers&&!n.H&&(n.H=e.watchers),e.deserializers&&!n.P&&(n.P=e.deserializers),e.serializers&&!n.R&&(n.R=e.serializers);const c=Object.entries(null!=(s=n.t)?s:{});if(c.map((([e,[s]])=>{if(31&s||2&l&&32&s){const{get:i,set:c}=t(r,e)||{};i&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!i)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>o(this).l.get(e))(0,e);const t=o(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const i=o(this);if(i){if(c)return void 0===(32&s?this[e]:i.$hostElement$[e])&&i.l.get(e)&&(t=i.l.get(e)),c.call(this,L(t,s)),void it(this,e,t=32&s?this[e]:i.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return it(this,e,t,n),void(1&l&&!i.i&&i.A.push((()=>{4096&n.t[e][0]&&i.i[e]!==i.l.get(e)&&(i.i[e]=t)})));const o=()=>{const o=i.i[e];!i.l.get(e)&&o&&i.l.set(e,o),i.i[e]=L(t,s),it(this,e,i.i[e],n)};i.i?o():i.A.push((()=>{o()}))}}}})}})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,s){u.jmp((()=>{var i;const u=t.get(e),a=o(this);if(this.hasOwnProperty(u)&&(s=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==a?void 0:a.u;if(a&&t&&!(8&t)&&s!==l){const o=a.i,r=null==(i=n.H)?void 0:i[e];null==r||r.forEach((n=>{const[[i,r]]=Object.entries(n);null!=o[i]&&(128&t||1&r)&&o[i].call(o,s,l,e)}))}return}const f=c.find((([t])=>t===u));f&&4&f[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(r,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=n.H)?i:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},ct=(t,e)=>{lt(t,"connectedCallback",void 0,e)},ut=(t,e)=>{lt(t,"disconnectedCallback",void 0,e||t)},at=(t,e={})=>{var n;if(!c.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],a=e.exclude||[],d=c.customElements,h=c.document.head,p=h.querySelector("meta[charset]"),m=c.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(u,e),u.h=new URL(e.resourcesUrl||"./",c.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,c,h;const p={u:e[0],p:e[1],t:e[2],T:e[3]};p.t=e[2],p.H=null!=(n=e[4])?n:{},p.R=null!=(c=e[5])?c:{},p.P=null!=(h=e[6])?h:{};const m=p.p,$=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,U:new Map};n.W=new Promise((t=>n.D=t)),t["s-p"]=[],t["s-rc"]=[],n.A=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,p),1&p.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${p.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else g.call(t,p)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):u.jmp((()=>(t=>{if(!(1&u.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?ct(e.i,t):(null==e?void 0:e.W)&&e.W.then((()=>ct(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){I(e,e.C=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 o;try{if(!(32&e.u)){if(e.u|=32,n.F){const l=((t,e)=>{const n=t.p.replace(/-/g,"_"),o=t.F;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.p}#${e.q}" was not found`);o.isProxied||(n.H=o.watchers,n.R=o.serializers,n.P=o.deserializers,rt(o,n,2),o.isProxied=!0);const r=()=>{};e.u|=8;try{new o(e)}catch(e){s(e,t)}e.u&=-9,e.u|=128,r(),ct(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=k(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);f&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.C,c=()=>J(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),e.D&&e.D(t)}})(t,e,n)}l()}})(this))))}disconnectedCallback(){u.jmp((()=>(async t=>{if(!(1&u.u)){const e=o(t);(null==e?void 0:e.i)?ut(e.i,t):(null==e?void 0:e.W)&&e.W.then((()=>ut(e.i,t)))}O.has(t)&&O.delete(t),t.shadowRoot&&O.has(t.shadowRoot)&&O.delete(t.shadowRoot)})(this))),u.raf((()=>{var t;const e=o(this);if(!e)return;const n=v.findIndex((t=>t===this));n>-1&&v.splice(n,1),(null==(t=null==e?void 0:e.N)?void 0:t.O)instanceof Node&&!e.N.O.isConnected&&delete e.N.O}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.W}};p.F=t[0],a.includes(m)||d.get(m)||(l.push(m),d.define(m,rt($,p,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(n=u.L)?n:j(c.document);null!=t&&m.setAttribute("nonce",t),h.insertBefore(m,p?p.nextSibling:h.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):u.jmp((()=>y=setTimeout(ot,30)))},ft=t=>u.L=t;export{A as H,at as b,x as c,N as g,E as h,a as p,l as r,ft as s}
|