phirepass-widgets 0.0.47 → 0.0.48
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-BiurVooY.js → index-DqslB2R4.js} +27 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +28 -12
- package/dist/cjs/phirepass-terminal.cjs.entry.js +2 -2
- package/dist/cjs/phirepass-widgets.cjs.js +1 -1
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +61 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.download.svg +7 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +26 -10
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +1 -1
- package/dist/esm/{index-zZMsduaU.js → index-jdexunMF.js} +27 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/phirepass-sftp-client.entry.js +28 -12
- package/dist/esm/phirepass-terminal.entry.js +2 -2
- package/dist/esm/phirepass-widgets.js +2 -2
- package/dist/phirepass-widgets/p-764392dc.entry.js +1 -0
- package/dist/phirepass-widgets/{p-5b21bc31.entry.js → p-d8e588a3.entry.js} +5 -5
- package/dist/phirepass-widgets/p-jdexunMF.js +2 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +1 -0
- package/package.json +1 -1
- package/dist/phirepass-widgets/p-32ca8ca5.entry.js +0 -1
- package/dist/phirepass-widgets/p-zZMsduaU.js +0 -2
|
@@ -8,6 +8,10 @@ const BUILD = /* phirepass-widgets */ { hotModuleReplacement: false, hydratedSel
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
// src/utils/constants.ts
|
|
12
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
13
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
14
|
+
|
|
11
15
|
// src/utils/get-prop-descriptor.ts
|
|
12
16
|
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
13
17
|
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
@@ -710,12 +714,19 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
710
714
|
if (newVNode2.$text$ != null) {
|
|
711
715
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
712
716
|
} else {
|
|
717
|
+
if (!isSvgMode) {
|
|
718
|
+
isSvgMode = newVNode2.$tag$ === "svg";
|
|
719
|
+
}
|
|
713
720
|
if (!win.document) {
|
|
714
721
|
throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
|
|
715
722
|
}
|
|
716
|
-
elm = newVNode2.$elm$ = win.document.
|
|
723
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
724
|
+
isSvgMode ? SVG_NS : HTML_NS,
|
|
717
725
|
newVNode2.$tag$
|
|
718
|
-
);
|
|
726
|
+
) ;
|
|
727
|
+
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
728
|
+
isSvgMode = false;
|
|
729
|
+
}
|
|
719
730
|
{
|
|
720
731
|
updateElement(null, newVNode2, isSvgMode);
|
|
721
732
|
}
|
|
@@ -728,6 +739,13 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
728
739
|
}
|
|
729
740
|
}
|
|
730
741
|
}
|
|
742
|
+
{
|
|
743
|
+
if (newVNode2.$tag$ === "svg") {
|
|
744
|
+
isSvgMode = false;
|
|
745
|
+
} else if (elm.tagName === "foreignObject") {
|
|
746
|
+
isSvgMode = true;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
731
749
|
}
|
|
732
750
|
elm["s-hn"] = hostTagName;
|
|
733
751
|
return elm;
|
|
@@ -864,8 +882,12 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
864
882
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
865
883
|
const oldChildren = oldVNode.$children$;
|
|
866
884
|
const newChildren = newVNode2.$children$;
|
|
885
|
+
const tag = newVNode2.$tag$;
|
|
867
886
|
const text = newVNode2.$text$;
|
|
868
887
|
if (text == null) {
|
|
888
|
+
{
|
|
889
|
+
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
890
|
+
}
|
|
869
891
|
{
|
|
870
892
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
871
893
|
}
|
|
@@ -882,6 +904,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
882
904
|
) {
|
|
883
905
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
884
906
|
} else ;
|
|
907
|
+
if (isSvgMode && tag === "svg") {
|
|
908
|
+
isSvgMode = false;
|
|
909
|
+
}
|
|
885
910
|
} else if (oldVNode.$text$ !== text) {
|
|
886
911
|
elm.data = text;
|
|
887
912
|
}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DqslB2R4.js');
|
|
4
4
|
var protocol = require('./protocol-BDROfN76.js');
|
|
5
5
|
|
|
6
6
|
const phirepassSftpClientLogoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10ZXJtaW5hbCB3LTMuNSBoLTMuNSB0ZXh0LXByaW1hcnkiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iNCAxNyAxMCAxMSA0IDUiPjwvcG9seWxpbmU+CiAgICA8bGluZSB4MT0iMTIiIHgyPSIyMCIgeTE9IjE5IiB5Mj0iMTkiPjwvbGluZT4KPC9zdmc+Cg==';
|
|
@@ -19,7 +19,7 @@ const phirepassSftpClientRefreshSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0
|
|
|
19
19
|
|
|
20
20
|
const phirepassSftpClientUploadSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTg5LCAyMTksIDIwOSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtdXBsb2FkIHctMy41IGgtMy41Ij4KICAgIDxwYXRoIGQ9Ik0yMSAxNXY0YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0ydi00Ij48L3BhdGg+CiAgICA8cG9seWxpbmUgcG9pbnRzPSIxNyA4IDEyIDMgNyA4Ij48L3BvbHlsaW5lPgogICAgPGxpbmUgeDE9IjEyIiB4Mj0iMTIiIHkxPSIzIiB5Mj0iMTUiPjwvbGluZT4KPC9zdmc+Cg==';
|
|
21
21
|
|
|
22
|
-
const phirepassSftpClientCss = () => `:host{--radius:0.375rem;--card:220 18% 10%;--border:220 15% 18%;--primary:160 60% 45%;--radius:0.375rem;--destructive:0 70% 50%;--muted:220 15% 13%;--muted-foreground:220 10% 50%;--primary-foreground:220 20% 7%;--scroll-track:220 16% 12%;--scroll-thumb:220 12% 34%;--scroll-thumb-hover:160 45% 44%;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;height:100%;width:100%;border:1px solid hsl(var(--border));background-color:hsl(var(--card));border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;position:relative;.listing{flex:1;display:flex;flex-direction:column;justify-content:space-between;min-height:0;header{height:30px;background:rgba(28, 31, 38, 0.6);border-bottom:1px solid hsl(var(--border));display:flex;align-items:center;justify-content:space-between;.actions{display:flex;align-items:center;.action{cursor:pointer;padding:4px;display:flex;align-items:center;z-index:1;img{height:14px;padding:4px;border-radius:4px}&:hover{background-color:hsl(var(--border) / 0.6)}}}.title{color:hsl(var(--primary));height:14px;padding:0 12px;display:flex;align-items:center;font-size:0.75rem;line-height:1rem;img{height:14px;margin-right:5px}.text{display:flex;flex-direction:row;justify-content:center;margin-top:2px;.name{margin-right:10px}.description{color:hsl(var(--muted-foreground))}}}}main{flex:1;display:flex;flex-direction:column;position:relative;min-height:0;overflow:hidden;.loader{color:hsl(var(--muted-foreground));font-size:13px;animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;text-align:center;display:flex;align-items:center;justify-content:center;position:absolute;height:100%;width:100%;background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px)}.error{font-size:13px;text-align:center;color:hsl(var(--destructive));height:100%;display:flex;align-items:center;justify-content:center}.navigation{height:25px;padding:10px;font-size:0.75rem;line-height:1rem;background-color:hsl(var(--card));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid hsl(var(--border));position:sticky;top:0;z-index:3;.breadcrumbs{display:flex;align-items:center;margin-right:10px;.breadcrumb{color:hsl(var(--primary));margin-right:4px;cursor:pointer;&:after{margin-left:4px}&:hover{color:rgb(189, 219, 209)}&:last-child{margin-right:0;color:rgb(189, 219, 209);cursor:default}}.arrow{height:12px;width:12px;opacity:0.6;top:2px;margin-right:4px;position:relative}}.actions{display:flex;align-items:center;gap:8px}.action{border:none;background:transparent;color:rgb(189, 219, 209);font-size:1.1rem;line-height:1;padding:2px 4px;border-radius:4px;cursor:pointer;&:hover{background-color:hsl(var(--border) / 0.6)}img{height:14px;width:14px;display:block}}.action.disconnect{color:#ff4d5f;font-size:0.65rem;letter-spacing:0.08em;padding:4px 8px;&:hover{color:#ff6b7a;background-color:hsl(var(--destructive) / 0.12)}}}.content{flex:1;min-height:0;overflow:auto;font-size:0.75rem;line-height:1rem;scrollbar-width:thin;scrollbar-color:hsl(var(--scroll-thumb)) hsl(var(--scroll-track));&::-webkit-scrollbar{width:10px;height:10px}&::-webkit-scrollbar-track{background:hsl(var(--scroll-track))}&::-webkit-scrollbar-thumb{background:hsl(var(--scroll-thumb));border-radius:999px;border:2px solid hsl(var(--scroll-track))}&::-webkit-scrollbar-thumb:hover{background:hsl(var(--scroll-thumb-hover))}table{width:100%;border-collapse:separate;border-spacing:0;thead{background-color:hsl(var(--muted));border-bottom:1px solid hsl(var(--border));th{padding:8px 10px;text-align:left;color:hsl(var(--muted-foreground));position:sticky;top:0;z-index:2;background-color:hsl(var(--muted));border-bottom:1px solid hsl(var(--border));line-height:0.95rem}}tbody{padding:10px 10px;tr{border-bottom:1px solid hsl(var(--border) / 0.4);td{padding:10px 10px 9px;color:hsl(var(--muted-foreground));.name{&.file{color:rgb(189, 219, 209)}&.folder{color:hsl(var(--primary))}}.kind{height:14px;width:14px;margin-right:5px;top:3px;position:relative}}&:hover{cursor:pointer;background-color:hsl(var(--muted) / 0.4)}&.selected{background-color:hsl(var(--primary) / 0.3)
|
|
22
|
+
const phirepassSftpClientCss = () => `:host{--radius:0.375rem;--card:220 18% 10%;--border:220 15% 18%;--primary:160 60% 45%;--radius:0.375rem;--destructive:0 70% 50%;--muted:220 15% 13%;--muted-foreground:220 10% 50%;--primary-foreground:220 20% 7%;--scroll-track:220 16% 12%;--scroll-thumb:220 12% 34%;--scroll-thumb-hover:160 45% 44%;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;height:100%;width:100%;border:1px solid hsl(var(--border));background-color:hsl(var(--card));border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;position:relative;.listing{flex:1;display:flex;flex-direction:column;justify-content:space-between;min-height:0;header{height:30px;background:rgba(28, 31, 38, 0.6);border-bottom:1px solid hsl(var(--border));display:flex;align-items:center;justify-content:space-between;.actions{display:flex;align-items:center;.action{cursor:pointer;padding:4px;display:flex;align-items:center;z-index:1;img{height:14px;padding:4px;border-radius:4px}&:hover{background-color:hsl(var(--border) / 0.6)}}}.title{color:hsl(var(--primary));height:14px;padding:0 12px;display:flex;align-items:center;font-size:0.75rem;line-height:1rem;img{height:14px;margin-right:5px}.text{display:flex;flex-direction:row;justify-content:center;margin-top:2px;.name{margin-right:10px}.description{color:hsl(var(--muted-foreground))}}}}main{flex:1;display:flex;flex-direction:column;position:relative;min-height:0;overflow:hidden;.loader{color:hsl(var(--muted-foreground));font-size:13px;animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;text-align:center;display:flex;align-items:center;justify-content:center;position:absolute;height:100%;width:100%;background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px)}.error{font-size:13px;text-align:center;color:hsl(var(--destructive));height:100%;display:flex;align-items:center;justify-content:center}.navigation{height:25px;padding:10px;font-size:0.75rem;line-height:1rem;background-color:hsl(var(--card));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid hsl(var(--border));position:sticky;top:0;z-index:3;.breadcrumbs{display:flex;align-items:center;margin-right:10px;.breadcrumb{color:hsl(var(--primary));margin-right:4px;cursor:pointer;&:after{margin-left:4px}&:hover{color:rgb(189, 219, 209)}&:last-child{margin-right:0;color:rgb(189, 219, 209);cursor:default}}.arrow{height:12px;width:12px;opacity:0.6;top:2px;margin-right:4px;position:relative}}.actions{display:flex;align-items:center;gap:8px}.action{border:none;background:transparent;color:rgb(189, 219, 209);font-size:1.1rem;line-height:1;padding:2px 4px;border-radius:4px;cursor:pointer;&:hover{background-color:hsl(var(--border) / 0.6)}img{height:14px;width:14px;display:block}}.action.disconnect{color:#ff4d5f;font-size:0.65rem;letter-spacing:0.08em;padding:4px 8px;&:hover{color:#ff6b7a;background-color:hsl(var(--destructive) / 0.12)}}}.content{flex:1;min-height:0;overflow:auto;font-size:0.75rem;line-height:1rem;scrollbar-width:thin;scrollbar-color:hsl(var(--scroll-thumb)) hsl(var(--scroll-track));&::-webkit-scrollbar{width:10px;height:10px}&::-webkit-scrollbar-track{background:hsl(var(--scroll-track))}&::-webkit-scrollbar-thumb{background:hsl(var(--scroll-thumb));border-radius:999px;border:2px solid hsl(var(--scroll-track))}&::-webkit-scrollbar-thumb:hover{background:hsl(var(--scroll-thumb-hover))}table{width:100%;border-collapse:separate;border-spacing:0;thead{background-color:hsl(var(--muted));border-bottom:1px solid hsl(var(--border));th{padding:8px 10px;text-align:left;color:hsl(var(--muted-foreground));position:sticky;top:0;z-index:2;background-color:hsl(var(--muted));border-bottom:1px solid hsl(var(--border));line-height:0.95rem;&.action-col{width:20px;min-width:20px;padding:0 10px}&:hover{&.action-col{color:blue;background-color:red;stroke:red}}}}tbody{padding:10px 10px;tr{border-bottom:1px solid hsl(var(--border) / 0.4);td{padding:10px 10px 9px;color:hsl(var(--muted-foreground));&.action-col{width:20px;min-width:20px;text-align:center;padding-left:1px;padding-right:1px;.file-action{border:none;background:transparent;color:hsl(var(--muted-foreground));width:16px;height:16px;border-radius:3px;cursor:pointer;opacity:0;visibility:hidden;pointer-events:none;transition:opacity 120ms ease;padding:0;svg{width:12px;height:12px;display:block;margin:0 auto}&:hover{color:hsl(var(--primary))}}}.name{&.file{color:rgb(189, 219, 209)}&.folder{color:hsl(var(--primary))}}.kind{height:14px;width:14px;margin-right:5px;top:3px;position:relative}}&:hover{cursor:pointer;background-color:hsl(var(--muted) / 0.4);td.action-col .file-action{opacity:1;visibility:visible;pointer-events:auto;color:hsl(var(--primary))}}&.selected{background-color:hsl(var(--primary) / 0.3);td.action-col .file-action{opacity:1;visibility:visible;pointer-events:auto}&:hover{background-color:hsl(var(--primary) / 0.4)}}}}}}}footer{height:25px;background:rgba(28, 31, 38, 0.6);border-top:1px solid hsl(var(--border));font-size:0.75rem;line-height:1rem;display:flex;align-items:center;justify-content:space-between;padding:0 10px;.status{font-size:0.65rem;color:hsl(var(--muted-foreground));.selected-item{margin-left:10px;color:hsl(var(--primary))}}.version{font-size:0.65rem;color:hsl(var(--muted-foreground))}}}.creds{position:absolute;top:0;left:0;height:100%;width:100%;display:flex;justify-content:center;align-items:center;;&.blurred{background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px)}.auth{display:flex;flex-direction:column;background:hsl(var(--card));position:relative;background-color:rgba(21, 24, 30, 0.95);border:1px solid hsl(var(--border));padding:30px;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.5) 0px 25px 50px -12px;border-radius:var(--radius);.title{margin-bottom:12px;color:hsl(var(--primary))}label{font-size:0.75rem;line-height:1rem;margin-bottom:1rem;color:hsl(var(--muted-foreground))}input{font-size:0.875rem;line-height:1.25rem;padding-top:0.5rem;padding-bottom:0.5rem;padding-left:0.75rem;padding-right:0.75rem;background-color:rgb(28, 31, 38);border-color:rgb(39, 44, 53);border-width:1px;border-radius:calc(var(--radius) - 2px);width:100%;margin-bottom:12px;color:rgb(189, 219, 209);box-sizing:border-box;&:focus{outline:none;border-color:hsl(var(--primary));box-shadow:0 0 0 1px hsl(var(--primary))}}button[type='submit']{margin-top:12px;width:100%;background-color:hsl(var(--primary));color:hsl(var(--primary-foreground));letter-spacing:0.05em;font-size:13px;font-weight:500;padding:0.5rem 1rem;border-radius:calc(var(--radius) - 2px);height:2rem;cursor:pointer;border:none;&:hover{background-color:hsl(var(--primary) / 0.9)}}}}}:host(.max){height:100vh;width:100vw;position:fixed;top:0;left:0;z-index:9999}`;
|
|
23
23
|
|
|
24
24
|
const PhirepassSftpClient = class {
|
|
25
25
|
constructor(hostRef) {
|
|
@@ -311,8 +311,23 @@ const PhirepassSftpClient = class {
|
|
|
311
311
|
disconnect_session() {
|
|
312
312
|
this.close_comms();
|
|
313
313
|
this.session_id = undefined;
|
|
314
|
-
this.status = 'Disconnected';
|
|
315
314
|
this.show_loader = false;
|
|
315
|
+
this.show_content = false;
|
|
316
|
+
this.breadcrumbs = [];
|
|
317
|
+
this.current_dir = '.';
|
|
318
|
+
this.listing = [];
|
|
319
|
+
this.show_navigation = false;
|
|
320
|
+
this.show_login_screen_username = false;
|
|
321
|
+
this.show_login_screen_password = false;
|
|
322
|
+
this.show_login_screen = false;
|
|
323
|
+
this.version = '';
|
|
324
|
+
this.status = 'Disconnected';
|
|
325
|
+
}
|
|
326
|
+
on_file_row_action(item, event) {
|
|
327
|
+
event.preventDefault();
|
|
328
|
+
event.stopPropagation();
|
|
329
|
+
this.selected_item = item;
|
|
330
|
+
window.alert(`Download for "${item.name}" is not available yet.`);
|
|
316
331
|
}
|
|
317
332
|
open_upload_picker() {
|
|
318
333
|
this.uploadInputEl?.click();
|
|
@@ -360,17 +375,18 @@ const PhirepassSftpClient = class {
|
|
|
360
375
|
return [item.path, item.name].join('/');
|
|
361
376
|
}
|
|
362
377
|
render() {
|
|
363
|
-
return (index.h(index.Host, { key: '
|
|
378
|
+
return (index.h(index.Host, { key: '84b1bd4b89e4e18be8165b2501af5fcf7bb09b68', class: {
|
|
364
379
|
'default': !this.max,
|
|
365
380
|
'max': this.max,
|
|
366
|
-
} }, index.h("section", { key: '
|
|
367
|
-
index.h("header", { key: '
|
|
381
|
+
} }, index.h("section", { key: 'fd8e39bc72055158a7a1daac5f536e4d34393db9', class: "listing" }, !this.hideHeader &&
|
|
382
|
+
index.h("header", { key: '5f223331f9e2b5c6570ce80313c121c94ce36805' }, index.h("section", { key: '1314b571f73bbdc07dd46f5015f75789793461e5', class: "title" }, index.h("img", { key: 'e582af1a23c051ddc9e0a44737f4c53a048b85be', src: phirepassSftpClientLogoSvg, alt: "SFTP Client" }), index.h("div", { key: 'f43bd6e4409b0e353b1224866b0d6ebe55e37705', class: "text" }, index.h("div", { key: 'f84ec4ed31f44b6216cf98fedda2eee3f6d3fae0', class: "name" }, this.name), index.h("div", { key: 'ad6b56a1f9e69b70be8e1906d26538ecf5e81369', class: "description" }, this.description))), index.h("section", { key: '4cc95044e4d7ea1bacb8de579c6d22a29530a124', class: "actions" }, index.h("div", { key: 'fb85bf224c56e874ee7b4c0818ba35bcc06b4c35', class: "action", onClick: () => this.toggle_max() }, index.h("img", { key: '5cfbeafc5bbce5e5b87d75b23113a93c83d48f3b', src: phirepassSftpClientMaxSvg, alt: "Maximize" })))), index.h("main", { key: 'f0ed3ecc82981b8352b4908df9bcc7706c07c111' }, this.show_navigation && index.h("nav", { key: '8b790eab0adc12e592b73e6757c1663db88f5a49', class: "navigation" }, index.h("div", { key: '85c62f8b0e15d7aa77572028665d51705f9ef453', class: "breadcrumbs" }, this.breadcrumbs.map((crumb, index$1, breadcrumbs) => (index.h(index.h.Fragment, null, index.h("span", { key: index$1, onClick: () => this.list_breadcrumb(crumb.path), class: "breadcrumb" }, crumb.label), index$1 < breadcrumbs.length - 1 && index.h("img", { class: "arrow", src: phirepassSftpClientChevronSvg }))))), index.h("section", { key: '9e1f1b406f3ac7b1a4fdda4081f310bdc054e125', class: "actions", "aria-label": "SFTP actions" }, index.h("button", { key: '1f95decb5addbd8c7c1b48b811e72231afb01491', type: "button", class: "action", onClick: () => this.go_to_parent_directory(), title: "Go to parent directory", "aria-label": "Go to parent directory" }, index.h("img", { key: '888341d92e55f79037ccb8eca6b0eec69ff2f406', src: phirepassSftpClientGoUpSvg, alt: "Go up" })), index.h("button", { key: '41d8256a3c8e7e6810c6f979537be3556de3611a', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, index.h("img", { key: 'e7e2d8feef73e5a77580f311d3248baaa62a44ec', src: phirepassSftpClientRefreshSvg, alt: "Refresh" })), index.h("button", { key: '4a1453249181827600e980bfcc5eef10b94c4bd7', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, index.h("img", { key: '66dc18510465e05509ea966b0d48a92dabc5a00d', src: phirepassSftpClientUploadSvg, alt: "Upload" })), index.h("button", { key: 'cbc12df3cb223cf650a12980f2b10db5114b2bff', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), index.h("input", { key: '8b472b4b82995d286127f60e394f6f83b88d05bd', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && index.h("div", { key: '9f4517dfb33071e1d1702c73fcbaaa812049c012', class: "content" }, index.h("table", { key: '841b90ae73e52083478dcccb54d75ef52b208d74' }, index.h("thead", { key: '96f9129791c51bae1f1693b4a77c3866cefe7ada' }, index.h("tr", { key: 'd5d5e032d059751a65305577670f1370c8cb0be5' }, index.h("th", { key: '06a796b795813f286c1823eb053bc21211c7a6c2' }, "Name"), index.h("th", { key: '4ce88c6ceb13af2d9e80a5c733a02ac7a15558ba' }, "Size"), index.h("th", { key: 'b4746be62c9c882f3c335b433486bc094b0fe6c3' }, "Permissions"), index.h("th", { key: '8ab7d1bab01ce229b236d9aceb3ca166b84b2551' }, "Owner"), index.h("th", { key: 'baaf0986f2851903e22d8bb8c5a2aff8c4762bf1' }, "Modified"), index.h("th", { key: 'be874212a04f3e6f9764fb664837e11cacfc9b32', class: "action-col", "aria-label": "Actions" }))), index.h("tbody", { key: 'd14243b3467786b08a3cd8d53b4e365c7c9d644d' }, this.listing.map((item, index$1) => (index.h("tr", { key: index$1, class: {
|
|
368
383
|
'selected': this.is_selected(item),
|
|
369
|
-
}, onClick: () => this.list_directory(item) }, index.h("td", null, item.kind === 'Folder' ? index.h("img", { class: "kind", src: phirepassSftpClientFolderSvg, alt: "Folder" }) : index.h("img", { class: "kind", src: phirepassSftpClientFileSvg, alt: "File" }), index.h("span", { class: `name ${item.kind.toLowerCase()}` }, item.name)), index.h("td", null, item.attributes.size), index.h("td", null, item.attributes.permissions ?? '-'), index.h("td", null, item.attributes.user ?? '-'), index.h("td", null, new Date(item.attributes.mtime * 1000).toLocaleString())
|
|
370
|
-
index.h("section", { key: '
|
|
384
|
+
}, onClick: () => this.list_directory(item) }, index.h("td", null, item.kind === 'Folder' ? index.h("img", { class: "kind", src: phirepassSftpClientFolderSvg, alt: "Folder" }) : index.h("img", { class: "kind", src: phirepassSftpClientFileSvg, alt: "File" }), index.h("span", { class: `name ${item.kind.toLowerCase()}` }, item.name)), index.h("td", null, item.attributes.size), index.h("td", null, item.attributes.permissions ?? '-'), index.h("td", null, item.attributes.user ?? '-'), index.h("td", null, new Date(item.attributes.mtime * 1000).toLocaleString()), index.h("td", { class: "action-col" }, item.kind === 'File' &&
|
|
385
|
+
index.h("button", { type: "button", class: "file-action", onClick: (event) => this.on_file_row_action(item, event), title: "Download", "aria-label": "Download" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), index.h("polyline", { points: "7 10 12 15 17 10" }), index.h("line", { x1: "12", x2: "12", y1: "15", y2: "3" })))))))))), this.show_loader && index.h("div", { key: 'ee78459b85c3ffaf2583fd79edadc1398a96aa81', class: "loader" }, "Loading..."), this.show_error && index.h("div", { key: 'f658bc7e5fd922d9a9499f2b6402ca3a6453adb8', class: "error" }, this.error_message)), index.h("footer", { key: '8928750efac3a300348a0c2cfd97c735820351c7' }, index.h("section", { key: '2c72adc84a24cf9255219125ad617578d9d4e50d', class: "status" }, index.h("span", { key: '192c7f26e2372e22b8d48d3ce0d6697d20c1ad4a' }, this.status), this.selected_item && index.h("span", { key: '01d1d92290b47332e014b010be7575d9976a61d6', class: "selected-item" }, this.get_full_path(this.selected_item))), index.h("section", { key: '32951e5b9ae53f2d84d90b43820801d1a2caeb65', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
|
|
386
|
+
index.h("section", { key: '46ea29aafbc1b4392d5a368534b1fd1f5ca8446a', class: {
|
|
371
387
|
'creds': true,
|
|
372
388
|
'blurred': this.show_login_screen,
|
|
373
|
-
} }, index.h("form", { key: '
|
|
389
|
+
} }, index.h("form", { key: 'c70ab635c91947a722dd203a346ed40b76471a25', class: "auth", onSubmit: (event) => {
|
|
374
390
|
const formData = new FormData(event.target);
|
|
375
391
|
let username = undefined;
|
|
376
392
|
if (this.show_login_screen_username) {
|
|
@@ -387,9 +403,9 @@ const PhirepassSftpClient = class {
|
|
|
387
403
|
this.show_loader = true;
|
|
388
404
|
event.stopPropagation();
|
|
389
405
|
event.preventDefault();
|
|
390
|
-
} }, index.h("div", { key: '
|
|
391
|
-
index.h("div", { key: '
|
|
392
|
-
index.h("div", { key: '
|
|
406
|
+
} }, index.h("div", { key: '498d0374665f404fac6feef40ddcb7bc386e749b', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
|
|
407
|
+
index.h("div", { key: '2ff0c7b6bce0dabde50cc73de23ca3068951ef3d' }, index.h("label", { key: 'b6b6fb3d1c645e0ba7f55c420db3077a785cac48', htmlFor: "username" }, "Username"), index.h("input", { key: '42e5c54dcf9ee40fc35c84b44be942b4775a82b4', id: "username", autoComplete: 'off', name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
|
|
408
|
+
index.h("div", { key: 'ef4861042d2b239766add5185e8f4d46af526232' }, index.h("label", { key: '901716f1f0f61d9116bdac51cc96581778bf2ebb', htmlFor: "password" }, "Password"), index.h("input", { key: 'da97e27113dfc2e9bb0c0a32e9b94140db1defa7', id: "password", autoComplete: 'off', name: "password", type: "password", placeholder: "" })), index.h("div", { key: 'd8c497d4072f7b3940b483f02a722058c0b8a843' }, index.h("button", { key: 'bd9a920f46b0c48a15936a2249dadc4f04cdcc0f', type: "submit" }, "Connect"))))));
|
|
393
409
|
}
|
|
394
410
|
static get watchers() { return {
|
|
395
411
|
"nodeId": [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DqslB2R4.js');
|
|
4
4
|
var protocol = require('./protocol-BDROfN76.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -694,7 +694,7 @@ const PhirepassTerminal = class {
|
|
|
694
694
|
this.usernameBuffer = "";
|
|
695
695
|
}
|
|
696
696
|
render() {
|
|
697
|
-
return (index.h(index.Host, { key: '
|
|
697
|
+
return (index.h(index.Host, { key: 'e0e73c834bdcafc1bc00cf27a1846893deeafdc6' }, index.h("div", { key: '8db965a7a3356deb0f672470d92521b755f2f165', id: "ccc", ref: el => (this.containerEl = el) })));
|
|
698
698
|
}
|
|
699
699
|
static get watchers() { return {
|
|
700
700
|
"nodeId": [{
|
|
@@ -272,6 +272,20 @@
|
|
|
272
272
|
background-color: hsl(var(--muted));
|
|
273
273
|
border-bottom: 1px solid hsl(var(--border));
|
|
274
274
|
line-height: 0.95rem;
|
|
275
|
+
|
|
276
|
+
&.action-col {
|
|
277
|
+
width: 20px;
|
|
278
|
+
min-width: 20px;
|
|
279
|
+
padding: 0 10px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
&:hover {
|
|
283
|
+
&.action-col {
|
|
284
|
+
color: blue;
|
|
285
|
+
background-color: red;
|
|
286
|
+
stroke: red;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
275
289
|
}
|
|
276
290
|
}
|
|
277
291
|
|
|
@@ -284,6 +298,40 @@
|
|
|
284
298
|
padding: 10px 10px 9px;
|
|
285
299
|
color: hsl(var(--muted-foreground));
|
|
286
300
|
|
|
301
|
+
&.action-col {
|
|
302
|
+
width: 20px;
|
|
303
|
+
min-width: 20px;
|
|
304
|
+
text-align: center;
|
|
305
|
+
padding-left: 1px;
|
|
306
|
+
padding-right: 1px;
|
|
307
|
+
|
|
308
|
+
.file-action {
|
|
309
|
+
border: none;
|
|
310
|
+
background: transparent;
|
|
311
|
+
color: hsl(var(--muted-foreground));
|
|
312
|
+
width: 16px;
|
|
313
|
+
height: 16px;
|
|
314
|
+
border-radius: 3px;
|
|
315
|
+
cursor: pointer;
|
|
316
|
+
opacity: 0;
|
|
317
|
+
visibility: hidden;
|
|
318
|
+
pointer-events: none;
|
|
319
|
+
transition: opacity 120ms ease;
|
|
320
|
+
padding: 0;
|
|
321
|
+
|
|
322
|
+
svg {
|
|
323
|
+
width: 12px;
|
|
324
|
+
height: 12px;
|
|
325
|
+
display: block;
|
|
326
|
+
margin: 0 auto;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
&:hover {
|
|
330
|
+
color: hsl(var(--primary));
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
287
335
|
.name {
|
|
288
336
|
&.file {
|
|
289
337
|
color: rgb(189, 219, 209);
|
|
@@ -305,11 +353,24 @@
|
|
|
305
353
|
&:hover {
|
|
306
354
|
cursor: pointer;
|
|
307
355
|
background-color: hsl(var(--muted) / 0.4);
|
|
356
|
+
|
|
357
|
+
td.action-col .file-action {
|
|
358
|
+
opacity: 1;
|
|
359
|
+
visibility: visible;
|
|
360
|
+
pointer-events: auto;
|
|
361
|
+
color: hsl(var(--primary));
|
|
362
|
+
}
|
|
308
363
|
}
|
|
309
364
|
|
|
310
365
|
&.selected {
|
|
311
366
|
background-color: hsl(var(--primary) / 0.3);
|
|
312
367
|
|
|
368
|
+
td.action-col .file-action {
|
|
369
|
+
opacity: 1;
|
|
370
|
+
visibility: visible;
|
|
371
|
+
pointer-events: auto;
|
|
372
|
+
}
|
|
373
|
+
|
|
313
374
|
&:hover {
|
|
314
375
|
background-color: hsl(var(--primary) / 0.4);
|
|
315
376
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
3
|
+
class="lucide lucide-download w-3 h-3 text-primary">
|
|
4
|
+
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
|
|
5
|
+
<polyline points="7 10 12 15 17 10"></polyline>
|
|
6
|
+
<line x1="12" x2="12" y1="15" y2="3"></line>
|
|
7
|
+
</svg>
|
|
@@ -295,8 +295,23 @@ export class PhirepassSftpClient {
|
|
|
295
295
|
disconnect_session() {
|
|
296
296
|
this.close_comms();
|
|
297
297
|
this.session_id = undefined;
|
|
298
|
-
this.status = 'Disconnected';
|
|
299
298
|
this.show_loader = false;
|
|
299
|
+
this.show_content = false;
|
|
300
|
+
this.breadcrumbs = [];
|
|
301
|
+
this.current_dir = '.';
|
|
302
|
+
this.listing = [];
|
|
303
|
+
this.show_navigation = false;
|
|
304
|
+
this.show_login_screen_username = false;
|
|
305
|
+
this.show_login_screen_password = false;
|
|
306
|
+
this.show_login_screen = false;
|
|
307
|
+
this.version = '';
|
|
308
|
+
this.status = 'Disconnected';
|
|
309
|
+
}
|
|
310
|
+
on_file_row_action(item, event) {
|
|
311
|
+
event.preventDefault();
|
|
312
|
+
event.stopPropagation();
|
|
313
|
+
this.selected_item = item;
|
|
314
|
+
window.alert(`Download for "${item.name}" is not available yet.`);
|
|
300
315
|
}
|
|
301
316
|
open_upload_picker() {
|
|
302
317
|
this.uploadInputEl?.click();
|
|
@@ -344,17 +359,18 @@ export class PhirepassSftpClient {
|
|
|
344
359
|
return [item.path, item.name].join('/');
|
|
345
360
|
}
|
|
346
361
|
render() {
|
|
347
|
-
return (h(Host, { key: '
|
|
362
|
+
return (h(Host, { key: '84b1bd4b89e4e18be8165b2501af5fcf7bb09b68', class: {
|
|
348
363
|
'default': !this.max,
|
|
349
364
|
'max': this.max,
|
|
350
|
-
} }, h("section", { key: '
|
|
351
|
-
h("header", { key: '
|
|
365
|
+
} }, h("section", { key: 'fd8e39bc72055158a7a1daac5f536e4d34393db9', class: "listing" }, !this.hideHeader &&
|
|
366
|
+
h("header", { key: '5f223331f9e2b5c6570ce80313c121c94ce36805' }, h("section", { key: '1314b571f73bbdc07dd46f5015f75789793461e5', class: "title" }, h("img", { key: 'e582af1a23c051ddc9e0a44737f4c53a048b85be', src: svg, alt: "SFTP Client" }), h("div", { key: 'f43bd6e4409b0e353b1224866b0d6ebe55e37705', class: "text" }, h("div", { key: 'f84ec4ed31f44b6216cf98fedda2eee3f6d3fae0', class: "name" }, this.name), h("div", { key: 'ad6b56a1f9e69b70be8e1906d26538ecf5e81369', class: "description" }, this.description))), h("section", { key: '4cc95044e4d7ea1bacb8de579c6d22a29530a124', class: "actions" }, h("div", { key: 'fb85bf224c56e874ee7b4c0818ba35bcc06b4c35', class: "action", onClick: () => this.toggle_max() }, h("img", { key: '5cfbeafc5bbce5e5b87d75b23113a93c83d48f3b', src: max, alt: "Maximize" })))), h("main", { key: 'f0ed3ecc82981b8352b4908df9bcc7706c07c111' }, this.show_navigation && h("nav", { key: '8b790eab0adc12e592b73e6757c1663db88f5a49', class: "navigation" }, h("div", { key: '85c62f8b0e15d7aa77572028665d51705f9ef453', class: "breadcrumbs" }, this.breadcrumbs.map((crumb, index, breadcrumbs) => (h(h.Fragment, null, h("span", { key: index, onClick: () => this.list_breadcrumb(crumb.path), class: "breadcrumb" }, crumb.label), index < breadcrumbs.length - 1 && h("img", { class: "arrow", src: chevron }))))), h("section", { key: '9e1f1b406f3ac7b1a4fdda4081f310bdc054e125', class: "actions", "aria-label": "SFTP actions" }, h("button", { key: '1f95decb5addbd8c7c1b48b811e72231afb01491', type: "button", class: "action", onClick: () => this.go_to_parent_directory(), title: "Go to parent directory", "aria-label": "Go to parent directory" }, h("img", { key: '888341d92e55f79037ccb8eca6b0eec69ff2f406', src: go_up, alt: "Go up" })), h("button", { key: '41d8256a3c8e7e6810c6f979537be3556de3611a', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, h("img", { key: 'e7e2d8feef73e5a77580f311d3248baaa62a44ec', src: refresh, alt: "Refresh" })), h("button", { key: '4a1453249181827600e980bfcc5eef10b94c4bd7', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, h("img", { key: '66dc18510465e05509ea966b0d48a92dabc5a00d', src: upload, alt: "Upload" })), h("button", { key: 'cbc12df3cb223cf650a12980f2b10db5114b2bff', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), h("input", { key: '8b472b4b82995d286127f60e394f6f83b88d05bd', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && h("div", { key: '9f4517dfb33071e1d1702c73fcbaaa812049c012', class: "content" }, h("table", { key: '841b90ae73e52083478dcccb54d75ef52b208d74' }, h("thead", { key: '96f9129791c51bae1f1693b4a77c3866cefe7ada' }, h("tr", { key: 'd5d5e032d059751a65305577670f1370c8cb0be5' }, h("th", { key: '06a796b795813f286c1823eb053bc21211c7a6c2' }, "Name"), h("th", { key: '4ce88c6ceb13af2d9e80a5c733a02ac7a15558ba' }, "Size"), h("th", { key: 'b4746be62c9c882f3c335b433486bc094b0fe6c3' }, "Permissions"), h("th", { key: '8ab7d1bab01ce229b236d9aceb3ca166b84b2551' }, "Owner"), h("th", { key: 'baaf0986f2851903e22d8bb8c5a2aff8c4762bf1' }, "Modified"), h("th", { key: 'be874212a04f3e6f9764fb664837e11cacfc9b32', class: "action-col", "aria-label": "Actions" }))), h("tbody", { key: 'd14243b3467786b08a3cd8d53b4e365c7c9d644d' }, this.listing.map((item, index) => (h("tr", { key: index, class: {
|
|
352
367
|
'selected': this.is_selected(item),
|
|
353
|
-
}, onClick: () => this.list_directory(item) }, h("td", null, item.kind === 'Folder' ? h("img", { class: "kind", src: folder, alt: "Folder" }) : h("img", { class: "kind", src: file, alt: "File" }), h("span", { class: `name ${item.kind.toLowerCase()}` }, item.name)), h("td", null, item.attributes.size), h("td", null, item.attributes.permissions ?? '-'), h("td", null, item.attributes.user ?? '-'), h("td", null, new Date(item.attributes.mtime * 1000).toLocaleString())
|
|
354
|
-
h("section", { key: '
|
|
368
|
+
}, onClick: () => this.list_directory(item) }, h("td", null, item.kind === 'Folder' ? h("img", { class: "kind", src: folder, alt: "Folder" }) : h("img", { class: "kind", src: file, alt: "File" }), h("span", { class: `name ${item.kind.toLowerCase()}` }, item.name)), h("td", null, item.attributes.size), h("td", null, item.attributes.permissions ?? '-'), h("td", null, item.attributes.user ?? '-'), h("td", null, new Date(item.attributes.mtime * 1000).toLocaleString()), h("td", { class: "action-col" }, item.kind === 'File' &&
|
|
369
|
+
h("button", { type: "button", class: "file-action", onClick: (event) => this.on_file_row_action(item, event), title: "Download", "aria-label": "Download" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), h("polyline", { points: "7 10 12 15 17 10" }), h("line", { x1: "12", x2: "12", y1: "15", y2: "3" })))))))))), this.show_loader && h("div", { key: 'ee78459b85c3ffaf2583fd79edadc1398a96aa81', class: "loader" }, "Loading..."), this.show_error && h("div", { key: 'f658bc7e5fd922d9a9499f2b6402ca3a6453adb8', class: "error" }, this.error_message)), h("footer", { key: '8928750efac3a300348a0c2cfd97c735820351c7' }, h("section", { key: '2c72adc84a24cf9255219125ad617578d9d4e50d', class: "status" }, h("span", { key: '192c7f26e2372e22b8d48d3ce0d6697d20c1ad4a' }, this.status), this.selected_item && h("span", { key: '01d1d92290b47332e014b010be7575d9976a61d6', class: "selected-item" }, this.get_full_path(this.selected_item))), h("section", { key: '32951e5b9ae53f2d84d90b43820801d1a2caeb65', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
|
|
370
|
+
h("section", { key: '46ea29aafbc1b4392d5a368534b1fd1f5ca8446a', class: {
|
|
355
371
|
'creds': true,
|
|
356
372
|
'blurred': this.show_login_screen,
|
|
357
|
-
} }, h("form", { key: '
|
|
373
|
+
} }, h("form", { key: 'c70ab635c91947a722dd203a346ed40b76471a25', class: "auth", onSubmit: (event) => {
|
|
358
374
|
const formData = new FormData(event.target);
|
|
359
375
|
let username = undefined;
|
|
360
376
|
if (this.show_login_screen_username) {
|
|
@@ -371,9 +387,9 @@ export class PhirepassSftpClient {
|
|
|
371
387
|
this.show_loader = true;
|
|
372
388
|
event.stopPropagation();
|
|
373
389
|
event.preventDefault();
|
|
374
|
-
} }, h("div", { key: '
|
|
375
|
-
h("div", { key: '
|
|
376
|
-
h("div", { key: '
|
|
390
|
+
} }, h("div", { key: '498d0374665f404fac6feef40ddcb7bc386e749b', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
|
|
391
|
+
h("div", { key: '2ff0c7b6bce0dabde50cc73de23ca3068951ef3d' }, h("label", { key: 'b6b6fb3d1c645e0ba7f55c420db3077a785cac48', htmlFor: "username" }, "Username"), h("input", { key: '42e5c54dcf9ee40fc35c84b44be942b4775a82b4', id: "username", autoComplete: 'off', name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
|
|
392
|
+
h("div", { key: 'ef4861042d2b239766add5185e8f4d46af526232' }, h("label", { key: '901716f1f0f61d9116bdac51cc96581778bf2ebb', htmlFor: "password" }, "Password"), h("input", { key: 'da97e27113dfc2e9bb0c0a32e9b94140db1defa7', id: "password", autoComplete: 'off', name: "password", type: "password", placeholder: "" })), h("div", { key: 'd8c497d4072f7b3940b483f02a722058c0b8a843' }, h("button", { key: 'bd9a920f46b0c48a15936a2249dadc4f04cdcc0f', type: "submit" }, "Connect"))))));
|
|
377
393
|
}
|
|
378
394
|
static get is() { return "phirepass-sftp-client"; }
|
|
379
395
|
static get encapsulation() { return "shadow"; }
|
|
@@ -482,7 +482,7 @@ export class PhirepassTerminal {
|
|
|
482
482
|
this.usernameBuffer = "";
|
|
483
483
|
}
|
|
484
484
|
render() {
|
|
485
|
-
return (h(Host, { key: '
|
|
485
|
+
return (h(Host, { key: 'e0e73c834bdcafc1bc00cf27a1846893deeafdc6' }, h("div", { key: '8db965a7a3356deb0f672470d92521b755f2f165', id: "ccc", ref: el => (this.containerEl = el) })));
|
|
486
486
|
}
|
|
487
487
|
static get is() { return "phirepass-terminal"; }
|
|
488
488
|
static get encapsulation() { return "shadow"; }
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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 in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r="undefined"!=typeof window?window:{},c=r.HTMLElement||class{},f={i:0,u:"",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)},u=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!u&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),p=!1,d=[],h=[],m=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.i?$(y):f.raf(y))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},y=()=>{b(d),b(h),(p=d.length>0)&&f.raf(y)},$=t=>Promise.resolve(void 0).then(t),v=m(h,!0),g=t=>{const e=new URL(t,f.u);return e.origin!==r.location.origin?e.href:e.pathname},w=t=>f.u=t;function j(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(a?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var O,S=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].h+=o:r.push(s?C(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,A);const f=C(t,null);return f.m=e,r.length>0&&(f.$=r),f.v=l,f},C=(t,e)=>({i:0,j:t,h:null!=e?e:null,O:null,$:null,m:null,v:null}),x={},A={forEach:(t,e)=>t.map(L).forEach(e),map:(t,e)=>t.map(L).map(e).map(N)},L=t=>({vattrs:t.m,vchildren:t.$,vkey:t.v,vname:t.S,vtag:t.j,vtext:t.h}),N=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),E(t.vtag,e,...t.vchildren||[])}const e=C(t.vtag,t.vtext);return e.m=t.vattrs,e.$=t.vchildren,e.v=t.vkey,e.S=t.vname,e},_=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},D=(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,H=(t,e)=>{const n=t;return{emit:t=>P(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},P=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},R=(t,e,n,s,i,c)=>{if(n===s)return;let u=l(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=W(n);let l=W(s);e.remove(...o.filter((t=>t&&!l.includes(t)))),e.add(...l.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if("ref"===e)s&&X(s,t);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let l;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(l=t[1])}}return l||(l=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const o=M(s);if((u||o&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const o=null==s?"":s;"list"===e?u=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!u||4&c||i)&&!o&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}}else if(e="-"===e[2]?e.slice(3):l(r,a)?a.slice(2):a[2]+e.slice(3),n||s){const o=e.endsWith(F);e=e.replace(V,""),n&&f.rel(t,e,n,o),s&&f.ael(t,e,s,o)}},U=/\s/,W=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(U):[]),F="Capture",V=RegExp(F+"$"),q=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.m||{},s=e.m||{};for(const t of z(Object.keys(l)))t in s||R(o,t,l[t],void 0,n,e.i);for(const t of z(Object.keys(s)))R(o,t,l[t],s[t],n,e.i)};function z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var T=!1,Y=[],Z=[],B=(t,e,n)=>{const o=e.$[n];let l,s,i=0;if(null!=o.h)l=o.O=r.document.createTextNode(o.h);else{if(!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=r.document.createElement(o.j),q(null,o,T),o.$){const e="template"===o.j?l.content:l;for(i=0;i<o.$.length;++i)s=B(t,o,i),s&&e.appendChild(s)}}return l["s-hn"]=O,l},G=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===O&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);l<=s;++l)o[l]&&(i=B(null,n,l),i&&(o[l].O=i,tt(r,i,e)))},I=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;Q(e),t&&t.remove()}}},J=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),K=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,s=e.$,i=e.h;null==i?(q(t,e,T),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=e.length-1,p=e[0],d=e[a],h=o.length-1,m=o[0],b=o[h];const y="template"===n.j?t.content:t;for(;r<=a&&c<=h;)if(null==p)p=e[++r];else if(null==d)d=e[--a];else if(null==m)m=o[++c];else if(null==b)b=o[--h];else if(J(p,m,l))K(p,m,l),p=e[++r],m=o[++c];else if(J(d,b,l))K(d,b,l),d=e[--a],b=o[--h];else if(J(p,b,l))K(p,b,l),tt(y,p.O,d.O.nextSibling),p=e[++r],b=o[--h];else if(J(d,m,l))K(d,m,l),tt(y,d.O,p.O),d=e[--a],m=o[++c];else{for(f=-1,u=r;u<=a;++u)if(e[u]&&null!==e[u].v&&e[u].v===m.v){f=u;break}f>=0?(i=e[f],i.j!==m.j?s=B(e&&e[c],n,f):(K(i,m,l),e[f]=void 0,s=i.O),m=o[++c]):(s=B(e&&e[c],n,c),m=o[++c]),s&&tt(p.O.parentNode,s,p.O)}r>a?G(t,null==o[h+1]?null:o[h+1].O,n,o,c,h):c>h&&I(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.h&&(o.textContent=""),G(o,null,e,s,0,s.length-1)):!n&&null!==l&&I(l,0,l.length-1)):t.h!==i&&(o.data=i)},Q=t=>{t.m&&t.m.ref&&Y.push((()=>t.m.ref(null))),t.$&&t.$.map(Q)},X=(t,e)=>{Z.push((()=>t(e)))},tt=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),et=(t,e,n=!1)=>{const o=t.$hostElement$,l=t.k||C(null,null),s=(t=>t&&t.j===x)(e)?e:E(null,null,e);if(O=o.tagName,n&&s.m)for(const t of Object.keys(s.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.m[t]=o[t]);s.j=null,s.i|=4,t.k=s,s.O=l.O=o.shadowRoot||o,K(l,s,n),Y.forEach((t=>t())),Y.length=0,Z.forEach((t=>t())),Z.length=0},nt=(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()})))}},ot=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);nt(t,t.C);const n=()=>lt(t,e);if(!e)return v(n);queueMicrotask((()=>{n()}))},lt=(t,e)=>{const n=t.$hostElement$,o=n;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 l=at(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=st(l,(()=>at(o,"componentWillRender",void 0,n))),st(l,(()=>rt(t,o,e)))},st=(t,e)=>it(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),it=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,rt=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.i,l=((t,e)=>{var n,o,l;const s=k(e),c=i.get(s);if(!r.document)return s;if(t=11===t.nodeType?t:r.document,c)if("string"==typeof c){let l,i=S.get(t=t.head||t);if(i||S.set(t,i=new Set),!i.has(s)){l=r.document.createElement("style"),l.textContent=c;const p=null!=(n=f.A)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=r.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=p&&l.setAttribute("nonce",p),!(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(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(u){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=c+e.textContent:t.prepend(l)}else t.append(l);1&e.i&&t.insertBefore(l,null),4&e.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=S.get(t);if(e||S.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(c.constructor===n.CSSStyleSheet)o=c;else{o=new n.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)o.insertRule(c.cssRules[t].cssText,t)}a?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);ct(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ft(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},ct=(t,e,n,o)=>{try{e=e.render(),t.i&=-17,t.i|=2,et(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},ft=t=>{const e=t.$hostElement$,n=e,o=t.C;at(n,"componentDidRender",void 0,e),64&t.i?at(n,"componentDidUpdate",void 0,e):(t.i|=64,pt(e),at(n,"componentDidLoad",void 0,e),t.L(e),o||ut()),t.M&&(t.M(),t.M=void 0),512&t.i&&$((()=>ot(t,!1))),t.i&=-517},ut=()=>{$((()=>P(r,"appload",{detail:{namespace:"phirepass-widgets"}})))},at=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},pt=t=>t.classList.add("hydrated"),dt=(t,e,n,l)=>{const i=o(t);if(!i)return;const r=t,c=i.l.get(e),f=i.i,u=r;if(!((n=D(n,l.t[e][0]))===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.l.set(e,n),l.N){const t=l.N[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&f||1&l)&&(u?u[o](n,c,e):i._.push((()=>{i.D[o](n,c,e)})))}catch(t){s(t,r)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,c,e)&&!(16&f))return;16&f||ot(i,!1)}}},ht=(e,n)=>{var l,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!=(l=n.t)?l:{});r.map((([e,[l]])=>{if(31&l||32&l){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)=>o(this).l.get(e))(0,e)},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=o(this);if(s){if(r)return void 0===(32&l?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),r.call(this,D(t,l)),void dt(this,e,t=32&l?this[e]:s.$hostElement$[e],n);dt(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var c;const f=t.get(e),u=o(this);if(this.hasOwnProperty(f),i.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==s)return;if(null==f){const t=null==u?void 0:u.i;if(u&&t&&!(8&t)&&s!==l){const o=this,i=null==(c=n.N)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=o[i]&&(128&t||1&r)&&o[i].call(o,s,l,e)}))}return}const a=r.find((([t])=>t===f)),p=a&&4&a[1][0],d=p&&null===s&&void 0===this[f];p&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(i,f);d||s==this[f]||h.get&&!h.set||(this[f]=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 o=n[1]||e;return t.set(o,e),o}))]))}}return e},mt=(t,e)=>{const l={i:e[0],p:e[1]};try{l.t=e[2],l.N=_(t.N),l.H=t.H,l.P=t.P;const r=t.prototype.connectedCallback,c=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const o={i:0,$hostElement$:t,o:e,l:new Map,R:new Map};o.U=new Promise((t=>o.L=t)),t["s-p"]=[],t["s-rc"]=[];const l=o;t.__stencil__getHostRef=()=>l,512&e.i&&n(t,o)})(this,l)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!o(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&f.i)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.i)(null==e?void 0:e.D)||(null==e?void 0:e.U)&&e.U.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){nt(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.i)&&(e.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const e=k(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);u&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.i)),o()}}const l=e.C,s=()=>ot(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),e.L&&e.L(t)}})(t,e,n)}l()}})(this),r&&r.call(this)},disconnectedCallback(){(async t=>{S.has(t)&&S.delete(t),t.shadowRoot&&S.has(t.shadowRoot)&&S.delete(t.shadowRoot)})(this),c&&c.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${l.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(this,l)}}),Object.defineProperty(t,"is",{value:l.p,configurable:!0}),ht(t,l)}catch(e){return s(e),t}},bt=t=>f.A=t,yt=t=>Object.assign(f,t),$t=new WeakMap;function vt(t,e){let n=$t.get(e);n||(n={i:0,o:{i:0,p:e.tagName},$hostElement$:e},$t.set(e,n)),et(n,t)}function gt(t){return t}export{c as H,x as a,H as c,g as getAssetPath,E as h,mt as p,vt as render,w as setAssetPath,bt as setNonce,yt as setPlatformOptions,gt as t}
|
|
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 in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,i="undefined"!=typeof window?window:{},c=i.HTMLElement||class{},f={i:0,u:"",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)},u=(()=>{try{return!!i.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!u&&(()=>!!i.document&&Object.getOwnPropertyDescriptor(i.document.adoptedStyleSheets,"length").writable)(),p=!1,d=[],h=[],m=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.i?v(y):f.raf(y))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},y=()=>{b(d),b(h),(p=d.length>0)&&f.raf(y)},v=t=>Promise.resolve(void 0).then(t),$=m(h,!0),g=t=>{const e=new URL(t,f.u);return e.origin!==i.location.origin?e.href:e.pathname},w=t=>f.u=t;function j(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(a?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var O,S=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,r=!1;const i=[],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&&r?i[i.length-1].h+=o:i.push(s?x(null,o):o),r=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,i,A);const f=x(t,null);return f.m=e,i.length>0&&(f.v=i),f.$=l,f},x=(t,e)=>({i:0,j:t,h:null!=e?e:null,O:null,v:null,m:null,$:null}),C={},A={forEach:(t,e)=>t.map(L).forEach(e),map:(t,e)=>t.map(L).map(e).map(N)},L=t=>({vattrs:t.m,vchildren:t.v,vkey:t.$,vname:t.S,vtag:t.j,vtext:t.h}),N=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),E(t.vtag,e,...t.vchildren||[])}const e=x(t.vtag,t.vtext);return e.m=t.vattrs,e.v=t.vchildren,e.$=t.vkey,e.S=t.vname,e},_=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},D=(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,H=(t,e)=>{const n=t;return{emit:t=>P(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},P=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},R=(t,e,n,s,r,c)=>{if(n===s)return;let u=l(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=W(n);let l=W(s);e.remove(...o.filter((t=>t&&!l.includes(t)))),e.add(...l.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if("ref"===e)s&&X(s,t);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let l;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(l=t[1])}}return l||(l=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const o=M(s);if((u||o&&null!==s)&&!r)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const o=null==s?"":s;"list"===e?u=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!u||4&c||r)&&!o&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}}else if(e="-"===e[2]?e.slice(3):l(i,a)?a.slice(2):a[2]+e.slice(3),n||s){const o=e.endsWith(F);e=e.replace(V,""),n&&f.rel(t,e,n,o),s&&f.ael(t,e,s,o)}},U=/\s/,W=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(U):[]),F="Capture",V=RegExp(F+"$"),q=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.m||{},s=e.m||{};for(const t of z(Object.keys(l)))t in s||R(o,t,l[t],void 0,n,e.i);for(const t of z(Object.keys(s)))R(o,t,l[t],s[t],n,e.i)};function z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var T=!1,Y=[],Z=[],B=(t,e,n)=>{const o=e.v[n];let l,s,r=0;if(null!=o.h)l=o.O=i.document.createTextNode(o.h);else{if(T||(T="svg"===o.j),!i.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=i.document.createElementNS(T?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.j),T&&"foreignObject"===o.j&&(T=!1),q(null,o,T),o.v){const e="template"===o.j?l.content:l;for(r=0;r<o.v.length;++r)s=B(t,o,r),s&&e.appendChild(s)}"svg"===o.j?T=!1:"foreignObject"===l.tagName&&(T=!0)}return l["s-hn"]=O,l},G=(t,e,n,o,l,s)=>{let r,i=t;for(i.shadowRoot&&i.tagName===O&&(i=i.shadowRoot),"template"===n.j&&(i=i.content);l<=s;++l)o[l]&&(r=B(null,n,l),r&&(o[l].O=r,tt(i,r,e)))},I=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;Q(e),t&&t.remove()}}},J=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),K=(t,e,n=!1)=>{const o=e.O=t.O,l=t.v,s=e.v,r=e.j,i=e.h;null==i?(q(t,e,T="svg"===r||"foreignObject"!==r&&T),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,r,i=0,c=0,f=0,u=0,a=e.length-1,p=e[0],d=e[a],h=o.length-1,m=o[0],b=o[h];const y="template"===n.j?t.content:t;for(;i<=a&&c<=h;)if(null==p)p=e[++i];else if(null==d)d=e[--a];else if(null==m)m=o[++c];else if(null==b)b=o[--h];else if(J(p,m,l))K(p,m,l),p=e[++i],m=o[++c];else if(J(d,b,l))K(d,b,l),d=e[--a],b=o[--h];else if(J(p,b,l))K(p,b,l),tt(y,p.O,d.O.nextSibling),p=e[++i],b=o[--h];else if(J(d,m,l))K(d,m,l),tt(y,d.O,p.O),d=e[--a],m=o[++c];else{for(f=-1,u=i;u<=a;++u)if(e[u]&&null!==e[u].$&&e[u].$===m.$){f=u;break}f>=0?(r=e[f],r.j!==m.j?s=B(e&&e[c],n,f):(K(r,m,l),e[f]=void 0,s=r.O),m=o[++c]):(s=B(e&&e[c],n,c),m=o[++c]),s&&tt(p.O.parentNode,s,p.O)}i>a?G(t,null==o[h+1]?null:o[h+1].O,n,o,c,h):c>h&&I(e,i,a)})(o,l,e,s,n):null!==s?(null!==t.h&&(o.textContent=""),G(o,null,e,s,0,s.length-1)):!n&&null!==l&&I(l,0,l.length-1),T&&"svg"===r&&(T=!1)):t.h!==i&&(o.data=i)},Q=t=>{t.m&&t.m.ref&&Y.push((()=>t.m.ref(null))),t.v&&t.v.map(Q)},X=(t,e)=>{Z.push((()=>t(e)))},tt=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),et=(t,e,n=!1)=>{const o=t.$hostElement$,l=t.k||x(null,null),s=(t=>t&&t.j===C)(e)?e:E(null,null,e);if(O=o.tagName,n&&s.m)for(const t of Object.keys(s.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.m[t]=o[t]);s.j=null,s.i|=4,t.k=s,s.O=l.O=o.shadowRoot||o,K(l,s,n),Y.forEach((t=>t())),Y.length=0,Z.forEach((t=>t())),Z.length=0},nt=(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()})))}},ot=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);nt(t,t.C);const n=()=>lt(t,e);if(!e)return $(n);queueMicrotask((()=>{n()}))},lt=(t,e)=>{const n=t.$hostElement$,o=n;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 l=at(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=st(l,(()=>at(o,"componentWillRender",void 0,n))),st(l,(()=>it(t,o,e)))},st=(t,e)=>rt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),rt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,it=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.i,l=((t,e)=>{var n,o,l;const s=k(e),c=r.get(s);if(!i.document)return s;if(t=11===t.nodeType?t:i.document,c)if("string"==typeof c){let l,r=S.get(t=t.head||t);if(r||S.set(t,r=new Set),!r.has(s)){l=i.document.createElement("style"),l.textContent=c;const p=null!=(n=f.A)?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!=p&&l.setAttribute("nonce",p),!(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(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(u){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=c+e.textContent:t.prepend(l)}else t.append(l);1&e.i&&t.insertBefore(l,null),4&e.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let e=S.get(t);if(e||S.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(c.constructor===n.CSSStyleSheet)o=c;else{o=new n.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)o.insertRule(c.cssRules[t].cssText,t)}a?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);ct(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ft(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},ct=(t,e,n,o)=>{try{e=e.render(),t.i&=-17,t.i|=2,et(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},ft=t=>{const e=t.$hostElement$,n=e,o=t.C;at(n,"componentDidRender",void 0,e),64&t.i?at(n,"componentDidUpdate",void 0,e):(t.i|=64,pt(e),at(n,"componentDidLoad",void 0,e),t.L(e),o||ut()),t.M&&(t.M(),t.M=void 0),512&t.i&&v((()=>ot(t,!1))),t.i&=-517},ut=()=>{v((()=>P(i,"appload",{detail:{namespace:"phirepass-widgets"}})))},at=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},pt=t=>t.classList.add("hydrated"),dt=(t,e,n,l)=>{const r=o(t);if(!r)return;const i=t,c=r.l.get(e),f=r.i,u=i;if(!((n=D(n,l.t[e][0]))===c||Number.isNaN(c)&&Number.isNaN(n))){if(r.l.set(e,n),l.N){const t=l.N[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&f||1&l)&&(u?u[o](n,c,e):r._.push((()=>{r.D[o](n,c,e)})))}catch(t){s(t,i)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,c,e)&&!(16&f))return;16&f||ot(r,!1)}}},ht=(e,n)=>{var l,s;const r=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 i=Object.entries(null!=(l=n.t)?l:{});i.map((([e,[l]])=>{if(31&l||32&l){const{get:s,set:i}=t(r,e)||{};s&&(n.t[e][0]|=2048),i&&(n.t[e][0]|=4096),Object.defineProperty(r,e,{get(){return s?s.apply(this):((t,e)=>o(this).l.get(e))(0,e)},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=o(this);if(s){if(i)return void 0===(32&l?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),i.call(this,D(t,l)),void dt(this,e,t=32&l?this[e]:s.$hostElement$[e],n);dt(this,e,t,n)}}})}}));{const t=new Map;r.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var c;const f=t.get(e),u=o(this);if(this.hasOwnProperty(f),r.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==s)return;if(null==f){const t=null==u?void 0:u.i;if(u&&t&&!(8&t)&&s!==l){const o=this,r=null==(c=n.N)?void 0:c[e];null==r||r.forEach((n=>{const[[r,i]]=Object.entries(n);null!=o[r]&&(128&t||1&i)&&o[r].call(o,s,l,e)}))}return}const a=i.find((([t])=>t===f)),p=a&&4&a[1][0],d=p&&null===s&&void 0===this[f];p&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(r,f);d||s==this[f]||h.get&&!h.set||(this[f]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.N)?s:{}),...i.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},mt=(t,e)=>{const l={i:e[0],p:e[1]};try{l.t=e[2],l.N=_(t.N),l.H=t.H,l.P=t.P;const i=t.prototype.connectedCallback,c=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const o={i:0,$hostElement$:t,o:e,l:new Map,R:new Map};o.U=new Promise((t=>o.L=t)),t["s-p"]=[],t["s-rc"]=[];const l=o;t.__stencil__getHostRef=()=>l,512&e.i&&n(t,o)})(this,l)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!o(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&f.i)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.i)(null==e?void 0:e.D)||(null==e?void 0:e.U)&&e.U.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){nt(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.i)&&(e.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),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);u&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.i)),o()}}const l=e.C,s=()=>ot(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),e.L&&e.L(t)}})(t,e,n)}l()}})(this),i&&i.call(this)},disconnectedCallback(){(async t=>{S.has(t)&&S.delete(t),t.shadowRoot&&S.has(t.shadowRoot)&&S.delete(t.shadowRoot)})(this),c&&c.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${l.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(this,l)}}),Object.defineProperty(t,"is",{value:l.p,configurable:!0}),ht(t,l)}catch(e){return s(e),t}},bt=t=>f.A=t,yt=t=>Object.assign(f,t),vt=new WeakMap;function $t(t,e){let n=vt.get(e);n||(n={i:0,o:{i:0,p:e.tagName},$hostElement$:e},vt.set(e,n)),et(n,t)}function gt(t){return t}export{c as H,C as a,H as c,g as getAssetPath,E as h,mt as p,$t as render,w as setAssetPath,bt as setNonce,yt as setPlatformOptions,gt as t}
|