@highstate/designer 0.9.31 → 0.9.33
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/AV0MK5it.js +1 -0
- package/.output/public/_nuxt/{DKFrVLtg.js → B-tzHMOR.js} +1 -1
- package/.output/public/_nuxt/{BKYQyu8j.js → B9QOj8at.js} +1 -1
- package/.output/public/_nuxt/{I7yKl6nV.js → BDCIi1Fb.js} +1 -1
- package/.output/public/_nuxt/{Blz0Sm08.js → BIoksCZ6.js} +1 -1
- package/.output/public/_nuxt/BKe7h20I.js +2 -0
- package/.output/public/_nuxt/{J4wdQuQL.js → BL-2dw2H.js} +2 -2
- package/.output/public/_nuxt/{CIL14epm.js → BM49jZle.js} +1 -1
- package/.output/public/_nuxt/{CnDkXYfV.js → BNR_JCLq.js} +1 -1
- package/.output/public/_nuxt/{CGKQr8UN.js → BOoETPDV.js} +1 -1
- package/.output/public/_nuxt/BQy0v27R.js +1 -0
- package/.output/public/_nuxt/{DjHUPHRz.js → BXaX6_oe.js} +1 -1
- package/.output/public/_nuxt/{C21I50ti.js → B_v2zcbf.js} +1 -1
- package/.output/public/_nuxt/{bIrSG7NP.js → BcG6zz3f.js} +1 -1
- package/.output/public/_nuxt/BcoNctsL.js +1 -0
- package/.output/public/_nuxt/BkNdYhVU.js +1 -0
- package/.output/public/_nuxt/{DtdG4Ruv.js → BlqvLz7f.js} +1 -1
- package/.output/public/_nuxt/{Df0di3r3.js → BskLrcgq.js} +1 -1
- package/.output/public/_nuxt/BuN5GOse.js +1 -0
- package/.output/public/_nuxt/{CVisNyay.js → ByQEjDj-.js} +1 -1
- package/.output/public/_nuxt/{BBKBnsTe.js → BzLYComM.js} +1 -1
- package/.output/public/_nuxt/{9q8hzT4_.js → C5w7DwS9.js} +1 -1
- package/.output/public/_nuxt/CDPuLdqk.js +1 -0
- package/.output/public/_nuxt/{B7q8IMeI.js → CFtPCidf.js} +1 -1
- package/.output/public/_nuxt/{9QMuE4_e.js → CGIsbOqt.js} +1 -1
- package/.output/public/_nuxt/CJ9AjueP.js +34 -0
- package/.output/public/_nuxt/{CpvQ6GXq.js → CPh4u-Ki.js} +1 -1
- package/.output/public/_nuxt/{CpPpKw9J.js → CXRolcM8.js} +1 -1
- package/.output/public/_nuxt/{Da1awfCG.js → CjxVmS5D.js} +1 -1
- package/.output/public/_nuxt/{CKLtsx29.js → CpCar6eJ.js} +1 -1
- package/.output/public/_nuxt/Cvl8iHT_.js +1 -0
- package/.output/public/_nuxt/{Bz3KLkvx.js → D-IcYK3n.js} +1 -1
- package/.output/public/_nuxt/{CJjncXKU.js → D12QiTSl.js} +1 -1
- package/.output/public/_nuxt/{KAOCxt3F.js → D2hOj9XC.js} +1 -1
- package/.output/public/_nuxt/{1foJT8KY.js → D4I3CwV0.js} +7 -7
- package/.output/public/_nuxt/{CwaiBfXS.js → D5xa2_5u.js} +1 -1
- package/.output/public/_nuxt/{C8SfgRr3.js → DA66NkQb.js} +1 -1
- package/.output/public/_nuxt/{Ck_SHGtr.js → DDEihc9R.js} +1 -1
- package/.output/public/_nuxt/{cOEvB8MO.js → DQF3Xngg.js} +1 -1
- package/.output/public/_nuxt/{BK3Hljmt.js → DSVU4Cl7.js} +1 -1
- package/.output/public/_nuxt/{B-kr6Mxx.js → DStOH21o.js} +1 -1
- package/.output/public/_nuxt/{CW-4Mdov.js → DX2ssmvF.js} +1 -1
- package/.output/public/_nuxt/{DALeoUlC.js → DeCCkKCn.js} +1 -1
- package/.output/public/_nuxt/DizFB7BZ.js +1 -0
- package/.output/public/_nuxt/{ClIloWRv.js → Dj-ZGW1B.js} +1 -1
- package/.output/public/_nuxt/{D3yMfpjI.js → DkPrE8g-.js} +1 -1
- package/.output/public/_nuxt/{Da9q7HwT.js → Dlt67GMf.js} +1 -1
- package/.output/public/_nuxt/{NHU215No.js → DmCOOqTD.js} +1 -1
- package/.output/public/_nuxt/{_nAeoBoi.js → Dn-R_Odm.js} +1 -1
- package/.output/public/_nuxt/{BxLxKFyQ.js → DnodTinn.js} +1 -1
- package/.output/public/_nuxt/{B39EfOn0.js → DpCgGkMV.js} +1 -1
- package/.output/public/_nuxt/{IOMiH8qI.js → DqcsB7RK.js} +1 -1
- package/.output/public/_nuxt/Dqe2EjXB.js +16 -0
- package/.output/public/_nuxt/{D7lxNUlX.js → DtufO5Sm.js} +1 -1
- package/.output/public/_nuxt/{CrCcAfvX.js → Du2xhFnN.js} +1 -1
- package/.output/public/_nuxt/{BPddPopq.js → FQpR5TAR.js} +1 -1
- package/.output/public/_nuxt/{BXfGU54c.js → G0kTzIhG.js} +1 -1
- package/.output/public/_nuxt/{C7qPbc4_.js → GaMchdM_.js} +64 -64
- package/.output/public/_nuxt/{C_cDObbA.js → LPrTxMoA.js} +1 -1
- package/.output/public/_nuxt/{CpLTE7AO.js → NHPpYOb8.js} +1 -1
- package/.output/public/_nuxt/{N5YObFtv.js → Q0n-WHNk.js} +1 -1
- package/.output/public/_nuxt/{D59NcB3D.js → RIDdiPVc.js} +1 -1
- package/.output/public/_nuxt/{BDMnUv6-.js → RJCesp1_.js} +1 -1
- package/.output/public/_nuxt/{SecretValueField.Bt8N7AOu.css → SecretValueField.DE3sVz_6.css} +1 -1
- package/.output/public/_nuxt/{BOaRzPNm.js → TwbepanP.js} +1 -1
- package/.output/public/_nuxt/{C1wlP-3M.js → UlOiG1et.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/d0a92083-1f47-4139-9775-0d6904d00cff.json +1 -0
- package/.output/public/_nuxt/{entry.DMg-k_uW.css → entry.BmVIGwdf.css} +1 -1
- package/.output/public/_nuxt/{-cuf5ozd.js → gL-G5cIZ.js} +1 -1
- package/.output/public/_nuxt/{C3_kiIzf.js → gMNeqWrU.js} +1 -1
- package/.output/public/_nuxt/{BkMxUTMz.js → gbAWFwGr.js} +1 -1
- package/.output/public/_nuxt/{graph-resolver-Cp0WRm7J.js → graph-resolver-DPkIWjud.js} +46 -46
- package/.output/public/_nuxt/{CpSeRQOr.js → hR6-a8C4.js} +1 -1
- package/.output/public/_nuxt/{index.cU4FhqMM.css → index.CQwfsW5z.css} +1 -1
- package/.output/public/_nuxt/{DWIEZWky.js → n5hdtVlR.js} +1 -1
- package/.output/public/_nuxt/operations.D9z3Ystv.css +1 -0
- package/.output/public/_nuxt/{vuetify.B9hb7bXd.css → vuetify.BqwNhQ76.css} +1 -1
- package/.output/public/_nuxt/{lPSpUDlM.js → yCy9iX43.js} +1 -1
- package/.output/public/_nuxt/{yaml.worker-DLQcEOxU.js → yaml.worker-DHVZkNc-.js} +1 -1
- package/.output/public/_nuxt/{CwpbJbCJ.js → zOx78ZE1.js} +1 -1
- package/.output/public/_nuxt/{CFByMTBT.js → zzXvEwMy.js} +1 -1
- package/.output/server/index.mjs +1412 -1855
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/package.json +5 -5
- package/.output/public/_nuxt/Bw6EBqF0.js +0 -1
- package/.output/public/_nuxt/ByMpwe6u.js +0 -1
- package/.output/public/_nuxt/C5sBcLek.js +0 -2
- package/.output/public/_nuxt/CjQdWgec.js +0 -16
- package/.output/public/_nuxt/D06L1AXX.js +0 -1
- package/.output/public/_nuxt/D2XIPlys.js +0 -1
- package/.output/public/_nuxt/DJ3_xD1J.js +0 -1
- package/.output/public/_nuxt/builds/meta/6fbe10b8-b530-4bbc-8a71-83bb9b2d0e20.json +0 -1
- package/.output/public/_nuxt/gt3opOQe.js +0 -1
- package/.output/public/_nuxt/oUH_eVj3.js +0 -26
- package/.output/public/_nuxt/operations.B7FA252u.css +0 -1
package/.output/nitro.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as h,aS as $}from"#entry";import{F as g,Z as c,W as m,aI as I,aV as B,a1 as t,X as a,aY as L,G as p,a0 as S,a2 as l,a3 as i,_ as E,ab as r,b9 as M,ba as V,aO as O,av as T,r as y,aW as N,J as X,O as Y,a$ as D,aH as G,n as U}from"./CJ9AjueP.js";import{I as W}from"./Cvl8iHT_.js";const J=g({__name:"ContextMenuItem",props:{title:{},subtitle:{},color:{},icon:{},customIcon:{},disabled:{type:Boolean},loading:{type:Boolean}},emits:["click"],setup(f,{emit:u}){const n=u;return(e,s)=>(m(),c(I,{disabled:e.disabled,onClick:s[0]||(s[0]=d=>n("click"))},B({append:t(()=>[r(e.$slots,"append")]),default:t(()=>[a(M,{color:e.color},{default:t(()=>[l(i(e.title),1)]),_:1},8,["color"]),e.subtitle?(m(),c(V,{key:0,color:e.color},{default:t(()=>[l(i(e.subtitle),1)]),_:1},8,["color"])):E("",!0),r(e.$slots,"default")]),_:2},[e.loading?{name:"prepend",fn:t(()=>[a(L,{indeterminate:"",color:"primary"})]),key:"0"}:e.customIcon?{name:"prepend",fn:t(()=>[a(p(h),{icon:e.customIcon,color:e.color,style:{"margin-right":"12px",width:"24px",height:"24px"}},null,8,["icon","color"])]),key:"1"}:e.icon?{name:"prepend",fn:t(()=>[a(S,{color:e.color,style:{"margin-right":"-20px"}},{default:t(()=>[l(i(e.icon),1)]),_:1},8,["color"])]),key:"2"}:void 0]),1032,["disabled"]))}}),P=g({__name:"GenericContextMenu",props:O({title:{},subtitle:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(f,{expose:u}){const n=T(f,"visible"),e=y(0),s=y(0),d=N("contextMenu"),{isOutside:k}=$(d),w=async o=>{o.preventDefault(),n.value=!1,e.value=o.clientX,s.value=o.clientY,await U(),n.value=!0},b=()=>{k.value&&(n.value=!1)};return X(()=>{window.addEventListener("mousedown",b)}),Y(()=>{window.removeEventListener("mousedown",b),n.value=!1}),u({showContextMenu:w}),(o,v)=>(m(),c(D,{modelValue:n.value,"onUpdate:modelValue":v[0]||(v[0]=C=>n.value=C),target:[p(e),p(s)],location:"end","close-on-content-click":!1},{default:t(()=>[a(G,{ref_key:"contextMenu",ref:d,density:"compact",variant:"text",style:{"padding-bottom":"0"}},{default:t(()=>[r(o.$slots,"header",{},()=>[a(I,{class:"mb-2"},{default:t(()=>[a(M,null,{default:t(()=>[l(i(o.title),1)]),_:1}),a(V,{class:"d-flex align-center",style:{"font-family":"monospace"}},{default:t(()=>[l(i(o.subtitle)+" ",1),a(W,{content:o.subtitle},null,8,["content"])]),_:1})]),_:1})]),r(o.$slots,"default")]),_:3},512)]),_:3},8,["modelValue","target"]))}});export{P as _,J as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{V as vt}from"./
|
|
1
|
+
import{V as vt}from"./UlOiG1et.js";import{Y as R,F as It,G as q,H as $t,J as ot,S as u,K as h,L as C,M as F,N as L,O as _t,P as At,Q as Tt,R as jt,T as w,U as at,V as W,W as Bt,X as H,Z as X,$ as B,a0 as kt,a1 as xt,a2 as Ct,a3 as Ft,a4 as Lt,a5 as y,a6 as Mt,a7 as E,a8 as Pt,a9 as Z,aa as Dt,ab as Jt,ac as Ut,_ as Yt}from"#entry";import{F as Kt,j as Vt,Z as Rt,W as qt,aT as Wt,a1 as k,$ as G,X as z,G as Q,aa as Ht,a2 as tt,a0 as Xt,a3 as et}from"./CJ9AjueP.js";import"./DkPrE8g-.js";const p={collection:"map",default:!0,nodeClass:R,tag:"tag:yaml.org,2002:map",resolve(t,e){return It(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>R.from(t,e,n)},b={collection:"seq",default:!0,nodeClass:q,tag:"tag:yaml.org,2002:seq",resolve(t,e){return $t(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>q.from(t,e,n)},v={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,s){return e=Object.assign({actualString:!0},e),ot(t,e,n,s)}},I={identify:t=>t==null,createNode:()=>new u(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new u(null),stringify:({source:t},e)=>typeof t=="string"&&I.test.test(t)?t:e.options.nullStr},M={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new u(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&M.test.test(t)){const s=t[0]==="t"||t[0]==="T";if(e===s)return t}return e?n.options.trueStr:n.options.falseStr}};function g({format:t,minFractionDigits:e,tag:n,value:s}){if(typeof s=="bigint")return String(s);const i=typeof s=="number"?s:Number(s);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=JSON.stringify(s);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let f=e-(r.length-o-1);for(;f-- >0;)r+="0"}return r}const ft={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:g},lt={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():g(t)}},ct={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new u(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:g},$=t=>typeof t=="bigint"||Number.isInteger(t),P=(t,e,n,{intAsBigInt:s})=>s?BigInt(t):parseInt(t.substring(e),n);function ut(t,e,n){const{value:s}=t;return $(s)&&s>=0?n+s.toString(e):g(t)}const gt={identify:t=>$(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>P(t,2,8,n),stringify:t=>ut(t,8,"0o")},mt={identify:$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>P(t,0,10,n),stringify:g},dt={identify:t=>$(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>P(t,2,16,n),stringify:t=>ut(t,16,"0x")},Zt=[p,b,v,I,M,gt,mt,dt,ft,lt,ct];function nt(t){return typeof t=="bigint"||Number.isInteger(t)}const O=({value:t})=>JSON.stringify(t),Gt=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:O},{identify:t=>t==null,createNode:()=>new u(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:O},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:O},{identify:nt,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>nt(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:O}],zt={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Qt=[p,b].concat(Gt,zt),D={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),s=new Uint8Array(n.length);for(let i=0;i<n.length;++i)s[i]=n.charCodeAt(i);return s}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},s,i,r){if(!n)return"";const o=n;let f;if(typeof btoa=="function"){let a="";for(let l=0;l<o.length;++l)a+=String.fromCharCode(o[l]);f=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=u.BLOCK_LITERAL),e!==u.QUOTE_DOUBLE){const a=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),l=Math.ceil(f.length/a),c=new Array(l);for(let m=0,S=0;m<l;++m,S+=a)c[m]=f.substr(S,a);f=c.join(e===u.BLOCK_LITERAL?`
|
|
2
2
|
`:" ")}return ot({comment:t,type:e,value:f},s,i,r)}};function yt({value:t,source:e},n){return e&&(t?ht:pt).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const ht={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new u(!0),stringify:yt},pt={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new u(!1),stringify:yt},te={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:g},ee={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():g(t)}},ne={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new u(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const s=t.substring(n+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:g},N=t=>typeof t=="bigint"||Number.isInteger(t);function _(t,e,n,{intAsBigInt:s}){const i=t[0];if((i==="-"||i==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),s){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return i==="-"?BigInt(-1)*o:o}const r=parseInt(t,n);return i==="-"?-1*r:r}function J(t,e,n){const{value:s}=t;if(N(s)){const i=s.toString(e);return s<0?"-"+n+i.substr(1):n+i}return g(t)}const se={identify:N,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>_(t,2,2,n),stringify:t=>J(t,2,"0b")},ie={identify:N,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>_(t,1,8,n),stringify:t=>J(t,8,"0")},re={identify:N,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>_(t,0,10,n),stringify:g},oe={identify:N,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>_(t,2,16,n),stringify:t=>J(t,16,"0x")};function U(t,e){const n=t[0],s=n==="-"||n==="+"?t.substring(1):t,i=o=>e?BigInt(o):Number(o),r=s.replace(/_/g,"").split(":").reduce((o,f)=>o*i(60)+i(f),i(0));return n==="-"?i(-1)*r:r}function bt(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return g(t);let s="";e<0&&(s="-",e*=n(-1));const i=n(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),s+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Nt={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>U(t,n),stringify:bt},St={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>U(t,!1),stringify:bt},A={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(A.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,s,i,r,o,f]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let l=Date.UTC(n,s-1,i,r||0,o||0,f||0,a);const c=e[8];if(c&&c!=="Z"){let m=U(c,!1);Math.abs(m)<30&&(m*=60),l-=6e4*m}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},st=[p,b,v,I,ht,pt,se,ie,re,oe,te,ee,ne,D,h,C,F,L,Nt,St,A],it=new Map([["core",Zt],["failsafe",[p,b,v]],["json",Qt],["yaml11",st],["yaml-1.1",st]]),rt={binary:D,bool:M,float:ct,floatExp:lt,floatNaN:ft,floatTime:St,int:mt,intHex:dt,intOct:gt,intTime:Nt,map:p,merge:h,null:I,omap:C,pairs:F,seq:b,set:L,timestamp:A},ae={"tag:yaml.org,2002:binary":D,"tag:yaml.org,2002:merge":h,"tag:yaml.org,2002:omap":C,"tag:yaml.org,2002:pairs":F,"tag:yaml.org,2002:set":L,"tag:yaml.org,2002:timestamp":A};function x(t,e,n){const s=it.get(e);if(s&&!t)return n&&!s.includes(h)?s.concat(h):s.slice();let i=s;if(!i)if(Array.isArray(t))i=[];else{const r=Array.from(it.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(t))for(const r of t)i=i.concat(r);else typeof t=="function"&&(i=t(i.slice()));return n&&(i=i.concat(h)),i.reduce((r,o)=>{const f=typeof o=="string"?rt[o]:o;if(!f){const a=JSON.stringify(o),l=Object.keys(rt).map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${l}`)}return r.includes(f)||r.push(f),r},[])}const fe=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class Y{constructor({compat:e,customTags:n,merge:s,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:f}){this.compat=Array.isArray(e)?x(e,"compat"):e?x(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?ae:{},this.tags=x(n,this.name,s),this.toStringOptions=f??null,Object.defineProperty(this,_t,{value:p}),Object.defineProperty(this,At,{value:v}),Object.defineProperty(this,Tt,{value:b}),this.sortMapEntries=typeof o=="function"?o:o===!0?fe:null}clone(){const e=Object.create(Y.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function le(t,e){const n=[];let s=e.directives===!0;if(e.directives!==!1&&t.directives){const a=t.directives.toString(t);a?(n.push(a),s=!0):t.directives.docStart&&(s=!0)}s&&n.push("---");const i=jt(t,e),{commentString:r}=i.options;if(t.commentBefore){n.length!==1&&n.unshift("");const a=r(t.commentBefore);n.unshift(w(a,""))}let o=!1,f=null;if(t.contents){if(at(t.contents)){if(t.contents.spaceBefore&&s&&n.push(""),t.contents.commentBefore){const c=r(t.contents.commentBefore);n.push(w(c,""))}i.forceBlockIndent=!!t.comment,f=t.contents.comment}const a=f?void 0:()=>o=!0;let l=W(t.contents,i,()=>f=null,a);f&&(l+=Bt(l,"",r(f))),(l[0]==="|"||l[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${l}`:n.push(l)}else n.push(W(t.contents,i));if(t.directives?.docEnd)if(t.comment){const a=r(t.comment);a.includes(`
|
|
3
3
|
`)?(n.push("..."),n.push(w(a,""))):n.push(`... ${a}`)}else n.push("...");else{let a=t.comment;a&&o&&(a=a.replace(/^\n+/,"")),a&&((!o||f)&&n[n.length-1]!==""&&n.push(""),n.push(w(r(a),"")))}return n.join(`
|
|
4
4
|
`)+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as _,s as z}from"#entry";import"./
|
|
1
|
+
import{q as _,s as z}from"#entry";import"./DkPrE8g-.js";import{S as N}from"./DqcsB7RK.js";import{b as P,S as H}from"./ByQEjDj-.js";import{u as E}from"./BQy0v27R.js";import{_ as R}from"./Dj-ZGW1B.js";import{_ as W}from"./D-IcYK3n.js";import{F as V,aO as U,av as M,r as h,w as q,Z as w,W as b,a1 as l,aw as x,X as a,ay as S,_ as j,G as t,aB as $,a2 as v,a3 as T,aC as A,aD as I,ai as C,aE as L,a0 as G,aF as O,$ as B,aL as D,L as X,b as F,a9 as Z}from"./CJ9AjueP.js";import{_ as J,c as K}from"./Dn-R_Odm.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./DnodTinn.js";import"./CFtPCidf.js";import"./BL-2dw2H.js";const Q=V({__name:"CreateUnlockMethodDialog",props:{visible:{type:Boolean},visibleModifiers:{}},emits:U(["created"],["update:visible"]),setup(k,{emit:g}){const n=M(k,"visible"),s=g,{settingsStore:c}=_(),p=h(!1),u=h(!1),m=h(null),d=h(),e=h({type:"password",title:"",description:"",password:"",confirmPassword:""}),i=()=>{n.value=!1,d.value?.resetForm(),m.value=null},y=async()=>{if(p.value){u.value=!0,m.value=null;try{const o=await K(e.value);await c.addUnlockMethod(o),n.value=!1,d.value?.resetForm(),m.value=null,s("created")}catch(o){console.error("Failed to create unlock method:",o),m.value="Some error occurred"}finally{u.value=!1}}};return q(n,o=>{o||(d.value?.resetForm(),m.value=null)}),(o,r)=>(b(),w(x,{modelValue:n.value,"onUpdate:modelValue":r[2]||(r[2]=f=>n.value=f),"max-width":"600px"},{default:l(()=>[a(L,{title:"Create Unlock Method"},{default:l(()=>[a(S,null,{default:l(()=>[a(J,{ref_key:"unlockMethodForm",ref:d,"onUpdate:valid":r[0]||(r[0]=f=>p.value=f),"onUpdate:form":r[1]||(r[1]=f=>e.value=f)},null,512),t(m)?(b(),w($,{key:0,type:"error",density:"compact",class:"mb-4"},{default:l(()=>[v(T(t(m)),1)]),_:1})):j("",!0)]),_:1}),a(A,null,{default:l(()=>[a(I),a(C,{disabled:t(u),onClick:i},{default:l(()=>r[3]||(r[3]=[v("Cancel")])),_:1,__:[3]},8,["disabled"]),a(C,{color:"primary",disabled:!t(p),loading:t(u),onClick:y},{default:l(()=>r[4]||(r[4]=[v(" Create ")])),_:1,__:[4]},8,["disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Y={class:"mb-3"},ee=V({__name:"DeleteUnlockMethodDialog",props:U({unlockMethod:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:U(["confirm"],["update:visible"]),setup(k,{emit:g}){const n=M(k,"visible"),s=k,c=g,p=h(!1),u=()=>{s.unlockMethod&&c("confirm",s.unlockMethod)},m=()=>{n.value=!1};return(d,e)=>(b(),w(x,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=i=>n.value=i),"max-width":"500px"},{default:l(()=>[d.unlockMethod?(b(),w(L,{key:0},{default:l(()=>[a(O,{class:"d-flex align-center"},{default:l(()=>[a(G,{class:"mr-2 text-error"},{default:l(()=>e[1]||(e[1]=[v("mdi-alert-circle-outline")])),_:1,__:[1]}),e[2]||(e[2]=v(" Delete Unlock Method "))]),_:1,__:[2]}),a(S,null,{default:l(()=>[B("p",Y,[e[3]||(e[3]=v(" Are you sure you want to delete the unlock method ")),B("strong",null,'"'+T(d.unlockMethod.meta.title)+'"',1),e[4]||(e[4]=v(" ? "))]),a($,{type:"warning",density:"compact"},{default:l(()=>e[5]||(e[5]=[B("strong",null,"Warning:",-1),v(" Deleting this unlock method will permanently remove your ability to unlock the project using this method. Make sure you have at least one other unlock method configured before proceeding. ")])),_:1,__:[5]})]),_:1}),a(A,null,{default:l(()=>[a(I),a(C,{disabled:t(p),onClick:m},{default:l(()=>e[6]||(e[6]=[v("Cancel")])),_:1,__:[6]},8,["disabled"]),a(C,{color:"error",loading:t(p),onClick:u},{default:l(()=>e[7]||(e[7]=[v("Delete")])),_:1,__:[7]},8,["loading"])]),_:1})]),_:1})):j("",!0)]),_:1},8,["modelValue"]))}}),te={class:"d-flex align-center gap-1"},oe=V({__name:"UnlockMethodsTable",props:U({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:U(["delete"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(k,{emit:g}){const n=g,s=M(k,"search"),c=M(k,"sortBy"),p=M(k,"page"),u=M(k,"itemsPerPage"),m=[{key:"type",title:"Type"},P.name,P.id,P.createdAt,P.actions];return(d,e)=>(b(),w(t(H),{search:s.value,"onUpdate:search":e[0]||(e[0]=i=>s.value=i),"sort-by":c.value,"onUpdate:sortBy":e[1]||(e[1]=i=>c.value=i),page:p.value,"onUpdate:page":e[2]||(e[2]=i=>p.value=i),"items-per-page":u.value,"onUpdate:itemsPerPage":e[3]||(e[3]=i=>u.value=i),headers:m,data:d.data,loading:d.loading,"hide-header":d.hideHeader,height:d.height},{"item.type":l(({item:i})=>[a(t(R),{status:i.type,"status-map":t(E)},null,8,["status","status-map"])]),"item.actions":l(({item:i})=>[B("div",te,[a(t(W),{"page-name":"settings.unlock-method-details","page-params":{projectId:d.projectId,unlockMethodId:i.id}},null,8,["page-params"]),a(C,{variant:"text",icon:"mdi-delete",size:"small",color:"error",onClick:y=>n("delete",i)},null,8,["onClick"])])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}}),ke=V({__name:"index",async setup(k){let g,n;const{settingsStore:s}=_(),{projectStore:c}=_();c.initializing?([g,n]=D(()=>z(()=>c.initialized).toBe(!0)),await g,n(),c.addLibraryRoot()):([g,n]=D(()=>c.initialize1()),await g,n(),[g,n]=D(()=>c.initialize2()),await g,n()),s.unlockMethods.load();const p=h(!1),u=h(!1),m=h(null),d=h(!1),e=y=>{m.value=y,u.value=!0},i=async y=>{d.value=!0;try{await s.removeUnlockMethod(y.id),u.value=!1,m.value=null}catch(o){console.error("Failed to delete unlock method:",o)}finally{d.value=!1}};return(y,o)=>(b(),X(Z,null,[a(t(N),{title:"Unlock Methods",icon:"mdi-lock-open-outline",description:"Manage the methods used to unlock and access this project's encrypted data."},{actions:l(()=>[a(C,{color:"primary","prepend-icon":"mdi-plus",onClick:o[0]||(o[0]=r=>p.value=!0)},{default:l(()=>o[7]||(o[7]=[v(" Add Unlock Method ")])),_:1,__:[7]})]),default:l(({height:r})=>[a(t(oe),{search:t(s).unlockMethods.search,"onUpdate:search":o[1]||(o[1]=f=>t(s).unlockMethods.search=f),"sort-by":t(s).unlockMethods.sortBy,"onUpdate:sortBy":o[2]||(o[2]=f=>t(s).unlockMethods.sortBy=f),page:t(s).unlockMethods.page,"onUpdate:page":o[3]||(o[3]=f=>t(s).unlockMethods.page=f),"items-per-page":t(s).unlockMethods.itemsPerPage,"onUpdate:itemsPerPage":o[4]||(o[4]=f=>t(s).unlockMethods.itemsPerPage=f),"project-id":t(c).projectId,data:t(s).unlockMethods.data,loading:t(s).unlockMethods.isLoading,height:r,onDelete:e},null,8,["search","sort-by","page","items-per-page","project-id","data","loading","height"])]),_:1}),a(t(Q),{visible:t(p),"onUpdate:visible":o[5]||(o[5]=r=>F(p)?p.value=r:null)},null,8,["visible"]),a(t(ee),{visible:t(u),"onUpdate:visible":o[6]||(o[6]=r=>F(u)?u.value=r:null),"unlock-method":t(m),onConfirm:i},null,8,["visible","unlock-method"])],64))}});export{ke as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as m,_ as S}from"#entry";import{F as y,j as p,L as k,W as f,X as h,Z as g,_ as v,G as u,aE as I,aa as w,a1 as d,ab as b}from"./
|
|
1
|
+
import{I as m,_ as S}from"#entry";import{F as y,j as p,L as k,W as f,X as h,Z as g,_ as v,G as u,aE as I,aa as w,a1 as d,ab as b}from"./CJ9AjueP.js";var N={done:!1,hasNext:!1};function A(o,...a){let t=o,e=a.map(r=>"lazy"in r?_(r):void 0),n=0;for(;n<a.length;){if(e[n]===void 0||!B(t)){let l=a[n];t=l(t),n+=1;continue}let r=[];for(let l=n;l<a.length;l++){let s=e[l];if(s===void 0||(r.push(s),s.isSingle))break}let i=[];for(let l of t)if(x(l,i,r))break;let{isSingle:c}=r.at(-1);t=c?i[0]:i,n+=r.length}return t}function x(o,a,t){if(t.length===0)return a.push(o),!1;let e=o,n=N,r=!1;for(let[i,c]of t.entries()){let{index:l,items:s}=c;if(s.push(e),n=c(e,l,s),c.index+=1,n.hasNext){if(n.hasMany??!1){for(let C of n.next)if(x(C,a,t.slice(i+1)))return!0;return r}e=n.next}if(!n.hasNext)break;n.done&&(r=!0)}return n.hasNext&&a.push(e),r}function _(o){let{lazy:a,lazyArgs:t}=o,e=a(...t);return Object.assign(e,{isSingle:a.single??!1,index:0,items:[]})}function B(o){return typeof o=="string"||typeof o=="object"&&o!==null&&Symbol.iterator in o}const z={class:"dual-icon"},F=y({__name:"ComponentIcon",props:{meta:{}},setup(o){const a=p(()=>o.meta.icon??"iconamoon:component");return(t,e)=>(f(),k("div",z,[h(u(m),{icon:u(a),class:"primary-icon",color:t.meta.iconColor},null,8,["icon","color"]),t.meta.secondaryIcon?(f(),g(u(m),{key:0,icon:t.meta.secondaryIcon,color:t.meta.secondaryIconColor,class:"secondary-icon"},null,8,["icon","color"])):v("",!0)]))}}),j=S(F,[["__scopeId","data-v-9a7de32f"]]),E=y({__name:"ComponentCard",props:{component:{},subtitle:{},text:{},blueprintStatus:{default:"default"},selected:{type:Boolean,default:!1}},setup(o){const a=p(()=>{const e={borderRadius:"4px"};switch(o.blueprintStatus){case"blueprint-valid":return{...e,opacity:"0.7",outline:"2px solid #4CAF50",backgroundColor:"rgba(76, 175, 80, 0.1)",boxShadow:"0 0 10px rgba(76, 175, 80, 0.3)"};case"blueprint-invalid":return{...e,opacity:"0.7",outline:"2px solid #F44336",backgroundColor:"rgba(244, 67, 54, 0.1)",boxShadow:"0 0 10px rgba(244, 67, 54, 0.3)"}}return o.selected?{...e,outline:"2px solid #2196F3",boxShadow:"0 0 8px rgba(33, 150, 243, 0.4)"}:e}),t=p(()=>o.blueprintStatus!=="default"?"#424242":o.component.meta.color??"#2d2d2d");return(e,n)=>(f(),g(I,{width:360,title:e.component.meta.title,subtitle:e.subtitle,text:e.text,color:u(t),style:w(u(a)),variant:"flat"},{prepend:d(()=>[h(j,{meta:e.component.meta},null,8,["meta"])]),append:d(()=>[b(e.$slots,"append")]),default:d(()=>[b(e.$slots,"default")]),_:3},8,["title","subtitle","text","color","style"]))}});export{A as C,E as _,j as a,N as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as A,_ as B,f as E,u as F,l as z,n as x}from"#entry";import{P as K}from"./
|
|
1
|
+
import{k as A,_ as B,f as E,u as F,l as z,n as x}from"#entry";import{P as K}from"./D2hOj9XC.js";import{F as N,L as h,W as o,X as p,a1 as r,ab as M,C as U,w as R,j as G,$ as u,a9 as k,af as y,G as s,aA as w,_ as S,aK as X,aE as Z,ay as q,Z as m,a4 as H,a5 as $,ah as J,a0 as C,a2 as I,a3 as _,ac as V,ai as P}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./BL-2dw2H.js";const O={class:"tab-wrapper"},Q=N({__name:"ProjectTabWrapper",props:{projectId:{}},setup(W){return A(W.projectId),(l,j)=>(o(),h("div",O,[p(K,{"project-id":l.projectId,"can-unlock":""},{default:r(()=>[M(l.$slots,"default",{},void 0,!0)]),_:3},8,["project-id"])]))}}),Y=B(Q,[["__scopeId","data-v-cbe63052"]]),ee={class:"data-settings-panel"},te={class:"panel-layout"},ae={class:"vertical-tabs"},se={class:"tab-section"},oe={class:"tab-label"},re={class:"tab-section"},ne={class:"tab-label"},ce={class:"tab-section"},le={class:"tab-label"},ie={class:"content-area"},de=N({__name:"settings",setup(W){const l=E(),j=F(),n=U(null);R(j.currentRoute,async t=>{t.path.startsWith("/settings/")&&(z.info({from:n.value?.path,to:t.path},"settings route changed"),n.value=t),t?.name==="settings"&&await f(i.value.beforeGlobalTabs[0])},{immediate:!0});const i=G(()=>{const b=j.getRoutes().filter(a=>a.path.startsWith("/settings/")&&a.path!=="/settings"&&a.meta?.tab),c=[],e=[];for(const a of b){const d=a.meta.tab;if(!d||!a.path.startsWith("/settings/"))continue;const T={name:a.name,icon:d.icon,label:d.label,order:d.order||50,isProjectTab:a.path.startsWith("/settings/projects/"),subpages:d.subpages??[]};T.isProjectTab?e.push(T):c.push(T)}c.sort((a,d)=>a.order-d.order),e.sort((a,d)=>a.order-d.order);const g=c.filter(a=>a.order<90),L=c.filter(a=>a.order>=90);return{beforeGlobalTabs:g,projectTabs:e,afterGlobalTabs:L}}),v=t=>n.value&&(t.name===n.value.name||t.subpages.includes(n.value.name)),D=G(()=>i.value.beforeGlobalTabs.find(v)||i.value.projectTabs.find(v)),f=async t=>{if(!t.isProjectTab){await x({name:t.name});return}await x({name:t.name,params:{projectId:l.focusedProjectId}})};return R(()=>l.focusedProjectId,async(t,b)=>{const c=j.currentRoute.value;!c||t===b&&c.path.startsWith("/settings/projects/")||!c.path.startsWith("/settings/")||(t&&i.value.projectTabs.length>0?await f(D.value??i.value.projectTabs[0]):!t&&c.path.startsWith("/settings/projects/")&&await f(i.value.beforeGlobalTabs[0]))}),(t,b)=>{const c=J("RouterView");return o(),h("div",ee,[u("div",te,[u("div",ae,[u("div",se,[(o(!0),h(k,null,y(s(i).beforeGlobalTabs,e=>(o(),m(P,{key:e.name,variant:"text",class:V(["tab-item",{active:v(e)}]),onClick:g=>f(e)},{default:r(()=>[p(C,{class:"tab-icon"},{default:r(()=>[I(_(e.icon),1)]),_:2},1024),u("span",oe,_(e.label),1)]),_:2},1032,["class","onClick"]))),128))]),p(w,{class:"section-divider"}),u("div",re,[p(X,{modelValue:s(l).focusedProjectId,"onUpdate:modelValue":b[0]||(b[0]=e=>s(l).focusedProjectId=e),items:s(l).projects,label:"Project","item-title":"meta.title","item-value":"id",variant:"outlined",density:"compact",class:"project-selector","prepend-inner-icon":"mdi-folder-outline",clearable:"","hide-details":""},null,8,["modelValue","items"]),s(l).focusedProjectId?(o(!0),h(k,{key:0},y(s(i).projectTabs,e=>(o(),m(P,{key:e.name,variant:"text",class:V(["tab-item",{active:v(e)}]),onClick:g=>f(e)},{default:r(()=>[p(C,{class:"tab-icon"},{default:r(()=>[I(_(e.icon),1)]),_:2},1024),u("span",ne,_(e.label),1)]),_:2},1032,["class","onClick"]))),128)):S("",!0)]),p(w,{class:"section-divider"}),u("div",ce,[(o(!0),h(k,null,y(s(i).afterGlobalTabs,e=>(o(),m(P,{key:e.name,variant:"text",class:V(["tab-item",{active:v(e)}]),onClick:g=>f(e)},{default:r(()=>[p(C,{class:"tab-icon"},{default:r(()=>[I(_(e.icon),1)]),_:2},1024),u("span",le,_(e.label),1)]),_:2},1032,["class","onClick"]))),128))])]),u("div",ie,[p(Z,{class:"content-card",variant:"flat"},{default:r(()=>[p(q,{class:"content-card-text"},{default:r(()=>[s(n)?(o(),m(c,{key:0,route:s(n)},{default:r(({Component:e})=>[s(n).params.projectId?(o(),m(H,{key:0},{default:r(()=>[(o(),m(s(Y),{"project-id":s(n).params.projectId,key:s(n).params.projectId},{default:r(()=>[(o(),m($(e),{params:s(n).params},null,8,["params"]))]),_:2},1032,["project-id"]))]),_:2},1024)):(o(),m($(e),{key:1}))]),_:1},8,["route"])):S("",!0)]),_:1})]),_:1})])])])}}}),ve=B(de,[["__scopeId","data-v-60d93a31"]]);export{ve as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ao as x,ap as C,aq as O,q as _,_ as $}from"#entry";import"./BmhnSWN5.js";import{_ as y}from"./DnodTinn.js";import{G as T}from"./CXRolcM8.js";import{F as V,u as j,O as B,Z as g,W as m,G as s,j as h,r as w,w as L,a$ as E,b as I,a1 as d,X as p,b0 as N,b1 as P,b2 as R,_ as W,b3 as q,$ as v,aa as b,ac as k,a3 as S,aP as z,a8 as H,L as U}from"./CJ9AjueP.js";const G={error:"alert-circle-outline",healthy:"heart",degraded:"heart-flash",down:"heart-broken",warning:"alert-octagon-outline",progressing:"progress-clock"},K={error:"error",degraded:"warning",down:"error",healthy:"success",warning:"warning",progressing:"warning"},D={cancelled:"close-circle-outline",destroyed:"trash-can-outline",refreshed:"check-circle-outline",updated:"check-circle-outline",skipped:"skip-next-circle-outline",failed:"alert-circle-outline",cancelling:"stop-circle-outline",pending:"clock-outline",destroying:"trash-can-outline",processing_triggers:"flash",previewing:"eye-outline",previewed:"eye-outline",refreshing:"refresh",updating:"sync"},M={updated:"success",cancelled:"warning",destroyed:"success",refreshed:"success",skipped:"",failed:"error",cancelling:"warning",pending:"",destroying:"error",processing_triggers:"primary",previewing:"secondary",previewed:"success",refreshing:"info",updating:"primary"},A={undeployed:"circle-outline",attempted:"clock-outline",deployed:"check-circle-outline",failed:"alert-circle-outline"},F={undeployed:"",attempted:"warning",deployed:"success",failed:"error"},X={error:"alert-circle-outline",evaluated:"check-circle-outline",evaluating:"cogs"},Z={error:"error",evaluated:"success",evaluating:"primary"};function J(e,r){return e.inputHash&&e.inputHash!==r?{name:"instance-state",title:"State",status:"changed",message:"The configuration of this instance or one of its dependencies has changed since the last operation.",icon:"not-equal-variant",color:"warning",important:!1,order:5}:{name:"instance-state",status:e.status,title:"State",message:`Instance is ${e.status}`,icon:A[e.status],color:F[e.status],order:5,important:!1}}function Q(){return{name:"instnace-state",status:"undeployed",title:"State",message:"Instance is not deployed",icon:"circle-outline",color:"",important:!1,order:5}}function Y(e,r){const t=e.lastOperationState;return{name:"operation",logs:!0,title:"Operation",status:t.status,icon:D[t.status],color:M[t.status],important:x(r?.status)||t.status==="failed"&&e.status!=="undeployed",order:10,progress:C(t.status)&&t.status!=="pending"&&t.currentResourceCount&&t.totalResourceCount?Math.round(t.currentResourceCount/t.totalResourceCount*100):void 0}}function ee(e){return{name:"evaluation",status:e.status,title:"Evaluation",message:e.message??"",icon:X[e.status],color:Z[e.status],important:e.status==="error",order:15}}function te(e){return e.status==="ok"?{name:"validation",status:"ok",title:"Validation",message:"Instance is valid",icon:"check-circle-outline",color:"success",important:!1,order:20}:{name:"validation",title:"Validation",status:"error",message:e.errorText,icon:"alert-circle-outline",color:"error",important:!0,order:20}}function ae(e){return{name:e.name,status:e.value,title:e.meta.title,message:e.message??"",icon:G[e.value]??"information-outline",customIcon:e.meta.icon,color:e.meta.iconColor??K[e.value]??"primary",important:e.value===O.Error,order:e.order??50}}function oe(e,r,t,i){const n=[];if(e&&e.status!=="undeployed"?n.push(J(e,t)):n.push(Q()),e?.lastOperationState&&n.push(Y(e,r)),e?.evaluationState&&n.push(ee(e.evaluationState)),i&&n.push(te(i)),e?.customStatuses)for(const u of e.customStatuses)n.push(ae(u));return n.sort((u,c)=>u.order-c.order)}const ne=V({__name:"InstanceStatusLogsTab",props:{operationState:{}},setup(e){const{projectStore:r}=_(),{$client:t}=j();let i=null;const n=c=>{const l=c.split(`
|
|
2
|
+
`);for(const o of l)i.writeln(o)};if(C(e.operationState.status)){const{unsubscribe:c}=t.logs.watchInstanceLogs.subscribe({stateId:e.operationState.stateId,operationId:e.operationState.operationId},{onData:l=>{i&&n(l.content)}});B(c)}const u=async c=>{i=c;const l=await t.logs.getInstanceLogs.query({projectId:r.projectId,stateId:e.operationState.stateId,operationId:e.operationState.operationId});for(const o of l)n(o.content)};return(c,l)=>(m(),g(s(T),{class:"mt-2 mb-2",columns:80,rows:24,onLoad:u}))}}),se={key:0,class:"d-flex align-center justify-center",style:{width:"100%",height:"100%"}},re={class:"d-flex flex-column"},ie=V({__name:"InstanceStatusBadge",props:{state:{},operation:{},expectedInputHash:{},validationOutput:{}},setup(e){const r=h(()=>oe(e.state,e.operation,e.expectedInputHash,e.validationOutput)),t=h(()=>r.value.find(o=>o.important)??r.value[0]),i=w(t.value.name),n=w(!1);L([t,e.state],()=>{n.value||(i.value=t.value.name)},{immediate:!0});const u=o=>o.startsWith("#")?{}:{[`text-${o}`]:!0},c=o=>o.startsWith("#")?{color:o}:{},l=h(()=>t.value.progress!==void 0&&t.value.progress<100);return(o,f)=>(m(),g(E,{modelValue:s(n),"onUpdate:modelValue":f[1]||(f[1]=a=>I(n)?n.value=a:null),"open-on-hover":"","close-on-content-click":!1,location:"end"},{activator:d(({props:a})=>[p(z,H(a,{color:s(t).color,style:[{width:"44px"},{padding:s(l)?"0":void 0}],class:"status-chip"}),{default:d(()=>[s(l)?(m(),U("div",se,S(s(t).progress)+"% ",1)):(m(),g(s(y),{key:1,size:20,icon:`mdi-${s(t).icon}`,"custom-icon":s(t).customIcon},null,8,["icon","custom-icon"]))]),_:2},1040,["color","style"])]),default:d(()=>[p(N,{color:"black"},{default:d(()=>[p(P,{modelValue:s(i),"onUpdate:modelValue":f[0]||(f[0]=a=>I(i)?i.value=a:null),items:s(r)},{tab:d(({item:a})=>[p(q,{value:a.name},{default:d(()=>[p(s(y),{size:22,icon:`mdi-${a.icon}`,"custom-icon":a.customIcon,color:a.color,class:"mr-2"},null,8,["icon","custom-icon","color"]),v("div",re,[v("div",{class:k(["font-weight-bold text-start",u(a.color)]),style:b(c(a.color))},S(a.title),7),v("div",{class:k(["text-caption font-weight-bold text-start",u(a.color)]),style:b(c(a.color))},S(a.status),7)])]),_:2},1032,["value"])]),item:d(({item:a})=>[p(R,{value:a.name},{default:d(()=>[a.logs?o.state?.lastOperationState?.operationId?(m(),g(ne,{key:o.state.lastOperationState.operationId,"instance-id":o.state.id,operationState:o.state.lastOperationState},null,8,["instance-id","operationState"])):W("",!0):(m(),g(s(T),{key:0,class:"mt-2 mb-2",columns:80,rows:24,content:a.message},null,8,["content"]))]),_:2},1032,["value"])]),_:1},8,["modelValue","items"])]),_:1})]),_:1},8,["modelValue"]))}}),me=$(ie,[["__scopeId","data-v-eb35995d"]]);export{me as I};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{ah as Y,ai as ut}from"#entry";import{F as $e,av as Zt,aX as je,Z as Pe,W as Ve,az as We,a1 as Jt,X as Xe,a0 as Ge,a2 as De,a3 as qe}from"./oUH_eVj3.js";const at=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ye(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function V(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ft(e,...t){if(!ye(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function It(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");V(e.outputLen),V(e.blockLen)}function At(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ye(e,t){ft(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function St(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ct(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Et(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function q(e,t){return e<<32-t|e>>>t}function K(e,t){return e<<t|e>>>32-t>>>0}const Ze=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Je(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Qe(e){for(let t=0;t<e.length;t++)e[t]=Je(e[t]);return e}const Qt=Ze?e=>e:Qe,pe=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",tn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function en(e){if(ft(e),pe)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=tn[e[n]];return t}const tt={_0:48,_9:57,A:65,F:70,a:97,f:102};function te(e){if(e>=tt._0&&e<=tt._9)return e-tt._0;if(e>=tt.A&&e<=tt.F)return e-(tt.A-10);if(e>=tt.a&&e<=tt.f)return e-(tt.a-10)}function ge(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(pe)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=te(e.charCodeAt(s)),c=te(e.charCodeAt(s+1));if(i===void 0||c===void 0){const f=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+s)}r[o]=i*16+c}return r}function we(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function xt(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function ee(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function xe(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class be{}function nn(e){const t=r=>e().update(xt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ot(e=32){if(at&&typeof at.getRandomValues=="function")return at.getRandomValues(new Uint8Array(e));if(at&&typeof at.randomBytes=="function")return Uint8Array.from(at.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class me extends be{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,It(t);const r=xt(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),ct(s)}update(t){return At(this),this.iHash.update(t),this}digestInto(t){At(this),ft(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:c}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const gt=(e,t,n)=>new me(e,t).update(n).digest();gt.create=(e,t)=>new me(e,t);function Ee(e,t,n){return It(e),n===void 0&&(n=new Uint8Array(e.outputLen)),gt(e,xt(n),xt(t))}const kt=Uint8Array.from([0]),ne=Uint8Array.of();function rn(e,t,n,r=32){It(e),V(r);const o=e.outputLen;if(r>255*o)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(r/o);n===void 0&&(n=ne);const i=new Uint8Array(s*o),c=gt.create(e,t),f=c._cloneInto(),h=new Uint8Array(c.outputLen);for(let a=0;a<s;a++)kt[0]=a+1,f.update(a===0?ne:h).update(n).update(kt).digestInto(h),i.set(h,o*a),c._cloneInto(f);return c.destroy(),f.destroy(),ct(h,kt),i.slice(0,r)}const dt=(e,t,n,r,o)=>rn(e,Ee(e,t,n),r,o);function sn(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=r?4:0,h=r?0:4;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function on(e,t,n){return e&t^~e&n}function cn(e,t,n){return e&t^e&n^t&n}class fn extends be{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Et(this.buffer)}update(t){At(this),t=xt(t),ft(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const c=Math.min(o-this.pos,s-i);if(c===o){const f=Et(t);for(;o<=s-i;i+=o)this.process(f,i);continue}r.set(t.subarray(i,i+c),this.pos),this.pos+=c,i+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){At(this),Ye(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,ct(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let l=i;l<o;l++)n[l]=0;sn(r,o-8,BigInt(this.length*8),s),this.process(r,0);const c=Et(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=f/4,a=this.get();if(h>a.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<h;l++)c.setUint32(4*l,a[l],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:c}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=c,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const nt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),an=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),rt=new Uint32Array(64);class ln extends fn{constructor(t=32){super(64,t,8,!1),this.A=nt[0]|0,this.B=nt[1]|0,this.C=nt[2]|0,this.D=nt[3]|0,this.E=nt[4]|0,this.F=nt[5]|0,this.G=nt[6]|0,this.H=nt[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:c,H:f}=this;return[t,n,r,o,s,i,c,f]}set(t,n,r,o,s,i,c,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=c|0,this.H=f|0}process(t,n){for(let l=0;l<16;l++,n+=4)rt[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const w=rt[l-15],g=rt[l-2],b=q(w,7)^q(w,18)^w>>>3,p=q(g,17)^q(g,19)^g>>>10;rt[l]=p+rt[l-7]+b+rt[l-16]|0}let{A:r,B:o,C:s,D:i,E:c,F:f,G:h,H:a}=this;for(let l=0;l<64;l++){const w=q(c,6)^q(c,11)^q(c,25),g=a+w+on(c,f,h)+an[l]+rt[l]|0,p=(q(r,2)^q(r,13)^q(r,22))+cn(r,o,s)|0;a=h,h=f,f=c,c=i+g|0,i=s,s=o,o=r,r=g+p|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,c=c+this.E|0,f=f+this.F|0,h=h+this.G|0,a=a+this.H|0,this.set(r,o,s,i,c,f,h,a)}roundClean(){ct(rt)}destroy(){this.set(0,0,0,0,0,0,0,0),ct(this.buffer)}}const jt=nn(()=>new ln),et=jt;function hn(e,t,n,r){It(e);const o=xe({dkLen:32,asyncTick:10},r),{c:s,dkLen:i,asyncTick:c}=o;if(V(s),V(i),V(c),s<1)throw new Error("iterations (c) should be >= 1");const f=ee(t),h=ee(n),a=new Uint8Array(i),l=gt.create(e,f),w=l._cloneInto().update(h);return{c:s,dkLen:i,asyncTick:c,DK:a,PRF:l,PRFSalt:w}}function un(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),ct(o),n}function Ae(e,t,n,r){const{c:o,dkLen:s,DK:i,PRF:c,PRFSalt:f}=hn(e,t,n,r);let h;const a=new Uint8Array(4),l=Et(a),w=new Uint8Array(c.outputLen);for(let g=1,b=0;b<s;g++,b+=c.outputLen){const p=i.subarray(b,b+c.outputLen);l.setInt32(0,g,!1),(h=f._cloneInto(h)).update(a).digestInto(w),p.set(w.subarray(0,p.length));for(let y=1;y<o;y++){c._cloneInto(h).update(w).digestInto(w);for(let B=0;B<p.length;B++)p[B]^=w[B]}}return un(c,f,i,h,w)}function re(e,t,n,r,o,s){let i=e[t++]^n[r++],c=e[t++]^n[r++],f=e[t++]^n[r++],h=e[t++]^n[r++],a=e[t++]^n[r++],l=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],b=e[t++]^n[r++],p=e[t++]^n[r++],y=e[t++]^n[r++],B=e[t++]^n[r++],M=e[t++]^n[r++],z=e[t++]^n[r++],O=e[t++]^n[r++],$=e[t++]^n[r++],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=$;for(let F=0;F<8;F+=2)_^=K(v+A|0,7),x^=K(_+v|0,9),A^=K(x+_|0,13),v^=K(A+x|0,18),m^=K(S+H|0,7),u^=K(m+S|0,9),H^=K(u+m|0,13),S^=K(H+u|0,18),U^=K(I+k|0,7),R^=K(U+I|0,9),k^=K(R+U|0,13),I^=K(k+R|0,18),C^=K(L+E|0,7),d^=K(C+L|0,9),E^=K(d+C|0,13),L^=K(E+d|0,18),H^=K(v+C|0,7),R^=K(H+v|0,9),C^=K(R+H|0,13),v^=K(C+R|0,18),k^=K(S+_|0,7),d^=K(k+S|0,9),_^=K(d+k|0,13),S^=K(_+d|0,18),E^=K(I+m|0,7),x^=K(E+I|0,9),m^=K(x+E|0,13),I^=K(m+x|0,18),A^=K(L+U|0,7),u^=K(A+L|0,9),U^=K(u+A|0,13),L^=K(U+u|0,18);o[s++]=i+v|0,o[s++]=c+H|0,o[s++]=f+R|0,o[s++]=h+C|0,o[s++]=a+_|0,o[s++]=l+S|0,o[s++]=w+k|0,o[s++]=g+d|0,o[s++]=b+x|0,o[s++]=p+m|0,o[s++]=y+I|0,o[s++]=B+E|0,o[s++]=M+A|0,o[s++]=z+u|0,o[s++]=O+U|0,o[s++]=$+L|0}function vt(e,t,n,r,o){let s=r+0,i=r+16*o;for(let c=0;c<16;c++)n[i+c]=e[t+(2*o-1)*16+c];for(let c=0;c<o;c++,s+=16,t+=16)re(n,i,e,t,n,s),c>0&&(i+=16),re(n,s,e,t+=16,n,i)}function dn(e,t,n){const r=xe({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:o,r:s,p:i,dkLen:c,asyncTick:f,maxmem:h,onProgress:a}=r;if(V(o),V(s),V(i),V(c),V(f),V(h),a!==void 0&&typeof a!="function")throw new Error("progressCb should be function");const l=128*s,w=l/4,g=Math.pow(2,32);if(o<=1||(o&o-1)!==0||o>g)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(i<0||i>(g-1)*32/l)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(c<0||c>(g-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(l*(o+i)>h)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+h);const p=Ae(jt,e,t,{c:1,dkLen:l*i}),y=St(p),B=St(new Uint8Array(l*o)),M=St(new Uint8Array(l));let z=()=>{};if(a){const O=2*o*i,$=Math.max(Math.floor(O/1e4),1);let v=0;z=()=>{v++,a&&(!(v%$)||v===O)&&a(v/O)}}return{N:o,r:s,p:i,dkLen:c,blockSize32:w,V:B,B32:y,B:p,tmp:M,blockMixCb:z,asyncTick:f}}function yn(e,t,n,r,o){const s=Ae(jt,e,n,{c:1,dkLen:t});return ct(n,r,o),s}function Be(e,t,n){const{N:r,r:o,p:s,dkLen:i,blockSize32:c,V:f,B32:h,B:a,tmp:l,blockMixCb:w}=dn(e,t,n);Qt(h);for(let g=0;g<s;g++){const b=c*g;for(let p=0;p<c;p++)f[p]=h[b+p];for(let p=0,y=0;p<r-1;p++)vt(f,y,f,y+=c,o),w();vt(f,(r-1)*c,h,b,o),w();for(let p=0;p<r;p++){const y=h[b+c-16]%r;for(let B=0;B<c;B++)l[B]=h[b+B]^f[y*c+B];vt(l,0,h,b,o),w()}}return Qt(h),yn(e,i,a,f,l)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Ue(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ht(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Kt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function j(e,...t){if(!Ue(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function se(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function pn(e,t){j(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function st(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function yt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function gn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const wn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function xn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Ft(e){if(typeof e=="string")e=xn(e);else if(Ue(e))e=Rt(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function bn(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function mn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const En=(e,t)=>{function n(r,...o){if(j(r),!wn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const a=o[0];if(!a)throw new Error("nonce / iv required");e.varSizeNonce?j(a):j(a,e.nonceLength)}const s=e.tagLength;s&&o[1]!==void 0&&j(o[1]);const i=t(r,...o),c=(a,l)=>{if(l!==void 0){if(a!==2)throw new Error("cipher output not supported");j(l)}};let f=!1;return{encrypt(a,l){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,j(a),c(i.encrypt.length,l),i.encrypt(a,l)},decrypt(a,l){if(j(a),s&&a.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return c(i.decrypt.length,l),i.decrypt(a,l)}}}return Object.assign(n,e),n};function oe(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!Bn(t))throw new Error("invalid output, must be aligned");return t}function ie(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=4,h=0;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function An(e,t,n){Ht(n);const r=new Uint8Array(16),o=gn(r);return ie(o,0,BigInt(t),n),ie(o,8,BigInt(e),n),r}function Bn(e){return e.byteOffset%4===0}function Rt(e){return Uint8Array.from(e)}const Ie=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Un=Ie("expand 16-byte k"),In=Ie("expand 32-byte k"),Ln=st(Un),Cn=st(In);function T(e,t){return e<<t|e>>>32-t}function Mt(e){return e.byteOffset%4===0}const bt=64,_n=16,Le=2**32-1,ce=new Uint32Array;function Sn(e,t,n,r,o,s,i,c){const f=o.length,h=new Uint8Array(bt),a=st(h),l=Mt(o)&&Mt(s),w=l?st(o):ce,g=l?st(s):ce;for(let b=0;b<f;i++){if(e(t,n,r,a,i,c),i>=Le)throw new Error("arx: counter overflow");const p=Math.min(bt,f-b);if(l&&p===bt){const y=b/4;if(b%4!==0)throw new Error("arx: invalid block position");for(let B=0,M;B<_n;B++)M=y+B,g[M]=w[M]^a[B];b+=bt;continue}for(let y=0,B;y<p;y++)B=b+y,s[B]=o[B]^h[y];b+=p}}function kn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:i}=bn({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Kt(o),Kt(i),Ht(s),Ht(n),(c,f,h,a,l=0)=>{j(c),j(f),j(h);const w=h.length;if(a===void 0&&(a=new Uint8Array(w)),j(a),Kt(l),l<0||l>=Le)throw new Error("arx: counter overflow");if(a.length<w)throw new Error(`arx: output (${a.length}) is shorter than data (${w})`);const g=[];let b=c.length,p,y;if(b===32)g.push(p=Rt(c)),y=Cn;else if(b===16&&n)p=new Uint8Array(32),p.set(c),p.set(c,16),y=Ln,g.push(p);else throw new Error(`arx: invalid 32-byte key, got length=${b}`);Mt(f)||g.push(f=Rt(f));const B=st(p);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(y,B,st(f.subarray(0,16)),B),f=f.subarray(16)}const M=16-o;if(M!==f.length)throw new Error(`arx: nonce must be ${M} or 16 bytes`);if(M!==12){const O=new Uint8Array(12);O.set(f,s?0:12-f.length),f=O,g.push(f)}const z=st(f);return Sn(e,y,B,z,h,a,l,i),yt(...g),a}}const N=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class vn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Ft(t),j(t,32);const n=N(t,0),r=N(t,2),o=N(t,4),s=N(t,6),i=N(t,8),c=N(t,10),f=N(t,12),h=N(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|i<<12)&255,this.r[5]=i>>>1&8190,this.r[6]=(i>>>14|c<<2)&8191,this.r[7]=(c>>>11|f<<5)&8065,this.r[8]=(f>>>8|h<<8)&8191,this.r[9]=h>>>5&127;for(let a=0;a<8;a++)this.pad[a]=N(t,16+2*a)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:i}=this,c=i[0],f=i[1],h=i[2],a=i[3],l=i[4],w=i[5],g=i[6],b=i[7],p=i[8],y=i[9],B=N(t,n+0),M=N(t,n+2),z=N(t,n+4),O=N(t,n+6),$=N(t,n+8),v=N(t,n+10),H=N(t,n+12),R=N(t,n+14);let C=s[0]+(B&8191),_=s[1]+((B>>>13|M<<3)&8191),S=s[2]+((M>>>10|z<<6)&8191),k=s[3]+((z>>>7|O<<9)&8191),d=s[4]+((O>>>4|$<<12)&8191),x=s[5]+($>>>1&8191),m=s[6]+(($>>>14|v<<2)&8191),I=s[7]+((v>>>11|H<<5)&8191),E=s[8]+((H>>>8|R<<8)&8191),A=s[9]+(R>>>5|o),u=0,U=u+C*c+_*(5*y)+S*(5*p)+k*(5*b)+d*(5*g);u=U>>>13,U&=8191,U+=x*(5*w)+m*(5*l)+I*(5*a)+E*(5*h)+A*(5*f),u+=U>>>13,U&=8191;let L=u+C*f+_*c+S*(5*y)+k*(5*p)+d*(5*b);u=L>>>13,L&=8191,L+=x*(5*g)+m*(5*w)+I*(5*l)+E*(5*a)+A*(5*h),u+=L>>>13,L&=8191;let F=u+C*h+_*f+S*c+k*(5*y)+d*(5*p);u=F>>>13,F&=8191,F+=x*(5*b)+m*(5*g)+I*(5*w)+E*(5*l)+A*(5*a),u+=F>>>13,F&=8191;let P=u+C*a+_*h+S*f+k*c+d*(5*y);u=P>>>13,P&=8191,P+=x*(5*p)+m*(5*b)+I*(5*g)+E*(5*w)+A*(5*l),u+=P>>>13,P&=8191;let Z=u+C*l+_*a+S*h+k*f+d*c;u=Z>>>13,Z&=8191,Z+=x*(5*y)+m*(5*p)+I*(5*b)+E*(5*g)+A*(5*w),u+=Z>>>13,Z&=8191;let X=u+C*w+_*l+S*a+k*h+d*f;u=X>>>13,X&=8191,X+=x*c+m*(5*y)+I*(5*p)+E*(5*b)+A*(5*g),u+=X>>>13,X&=8191;let G=u+C*g+_*w+S*l+k*a+d*h;u=G>>>13,G&=8191,G+=x*f+m*c+I*(5*y)+E*(5*p)+A*(5*b),u+=G>>>13,G&=8191;let D=u+C*b+_*g+S*w+k*l+d*a;u=D>>>13,D&=8191,D+=x*h+m*f+I*c+E*(5*y)+A*(5*p),u+=D>>>13,D&=8191;let J=u+C*p+_*b+S*g+k*w+d*l;u=J>>>13,J&=8191,J+=x*a+m*h+I*f+E*c+A*(5*y),u+=J>>>13,J&=8191;let Q=u+C*y+_*p+S*b+k*g+d*w;u=Q>>>13,Q&=8191,Q+=x*l+m*a+I*h+E*f+A*c,u+=Q>>>13,Q&=8191,u=(u<<2)+u|0,u=u+U|0,U=u&8191,u=u>>>13,L+=u,s[0]=U,s[1]=L,s[2]=F,s[3]=P,s[4]=Z,s[5]=X,s[6]=G,s[7]=D,s[8]=J,s[9]=Q}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=o,o=t[c]>>>13,t[c]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let c=1;c<10;c++)r[c]=t[c]+o,o=r[c]>>>13,r[c]&=8191;r[9]-=8192;let s=(o^1)-1;for(let c=0;c<10;c++)r[c]&=s;s=~s;for(let c=0;c<10;c++)t[c]=t[c]&s|r[c];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let i=t[0]+n[0];t[0]=i&65535;for(let c=1;c<8;c++)i=(t[c]+n[c]|0)+(i>>>16)|0,t[c]=i&65535;yt(r)}update(t){se(this),t=Ft(t),j(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(r-this.pos,o-s);if(i===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){yt(this.h,this.r,this.buffer,this.pad)}digestInto(t){se(this),pn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:o}=this;if(o){for(n[o++]=1;o<16;o++)n[o]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let i=0;i<8;i++)t[s++]=r[i]>>>0,t[s++]=r[i]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Kn(e){const t=(r,o)=>e(o).update(Ft(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Tn=Kn(e=>new vn(e));function Hn(e,t,n,r,o,s=20){let i=e[0],c=e[1],f=e[2],h=e[3],a=t[0],l=t[1],w=t[2],g=t[3],b=t[4],p=t[5],y=t[6],B=t[7],M=o,z=n[0],O=n[1],$=n[2],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=$;for(let P=0;P<s;P+=2)v=v+_|0,A=T(A^v,16),x=x+A|0,_=T(_^x,12),v=v+_|0,A=T(A^v,8),x=x+A|0,_=T(_^x,7),H=H+S|0,u=T(u^H,16),m=m+u|0,S=T(S^m,12),H=H+S|0,u=T(u^H,8),m=m+u|0,S=T(S^m,7),R=R+k|0,U=T(U^R,16),I=I+U|0,k=T(k^I,12),R=R+k|0,U=T(U^R,8),I=I+U|0,k=T(k^I,7),C=C+d|0,L=T(L^C,16),E=E+L|0,d=T(d^E,12),C=C+d|0,L=T(L^C,8),E=E+L|0,d=T(d^E,7),v=v+S|0,L=T(L^v,16),I=I+L|0,S=T(S^I,12),v=v+S|0,L=T(L^v,8),I=I+L|0,S=T(S^I,7),H=H+k|0,A=T(A^H,16),E=E+A|0,k=T(k^E,12),H=H+k|0,A=T(A^H,8),E=E+A|0,k=T(k^E,7),R=R+d|0,u=T(u^R,16),x=x+u|0,d=T(d^x,12),R=R+d|0,u=T(u^R,8),x=x+u|0,d=T(d^x,7),C=C+_|0,U=T(U^C,16),m=m+U|0,_=T(_^m,12),C=C+_|0,U=T(U^C,8),m=m+U|0,_=T(_^m,7);let F=0;r[F++]=i+v|0,r[F++]=c+H|0,r[F++]=f+R|0,r[F++]=h+C|0,r[F++]=a+_|0,r[F++]=l+S|0,r[F++]=w+k|0,r[F++]=g+d|0,r[F++]=b+x|0,r[F++]=p+m|0,r[F++]=y+I|0,r[F++]=B+E|0,r[F++]=M+A|0,r[F++]=z+u|0,r[F++]=O+U|0,r[F++]=$+L|0}const Fn=kn(Hn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Rn=new Uint8Array(16),fe=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(Rn.subarray(n))},Mn=new Uint8Array(32);function ae(e,t,n,r,o){const s=e(t,n,Mn),i=Tn.create(s);o&&fe(i,o),fe(i,r);const c=An(r.length,o?o.length:0,!0);i.update(c);const f=i.digest();return yt(s,c),f}const On=e=>(t,n,r)=>({encrypt(s,i){const c=s.length;i=oe(c+16,i,!1),i.set(s);const f=i.subarray(0,-16);e(t,n,f,f,1);const h=ae(e,t,n,f,r);return i.set(h,c),yt(h),i},decrypt(s,i){i=oe(s.length-16,i,!1);const c=s.subarray(0,-16),f=s.subarray(-16),h=ae(e,t,n,c,r);if(!mn(f,h))throw new Error("invalid tag");return i.set(s.subarray(0,-16)),e(t,n,i,i,1),yt(h),i}}),pt=En({blockSize:64,nonceLength:12,tagLength:16},On(Fn));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ce=BigInt(0);function Nn(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Ce:BigInt("0x"+e)}function le(e){return ft(e),Nn(en(Uint8Array.from(e).reverse()))}function zn(e,t){return ge(e.toString(16).padStart(t*2,"0"))}function $n(e,t){return zn(e,t).reverse()}function he(e,t,n){let r;if(typeof t=="string")try{r=ge(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(ye(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}const Tt=e=>typeof e=="bigint"&&Ce<=e;function jn(e,t,n){return Tt(e)&&Tt(t)&&Tt(n)&&t<=e&&e<n}function ue(e,t,n,r){if(!jn(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Pn(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,i){const c=e[o];if(i&&c===void 0)return;const f=typeof c;if(f!==s||c===null)throw new Error(`param "${o}" is invalid: expected ${s}, got ${f}`)}Object.entries(t).forEach(([o,s])=>r(o,s,!1)),Object.entries(n).forEach(([o,s])=>r(o,s,!0))}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _e=BigInt(0);BigInt(1);function Se(e,t){const n=e%t;return n>=_e?n:t+n}function W(e,t,n){let r=e;for(;t-- >_e;)r*=r,r%=n;return r}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wt=BigInt(0),lt=BigInt(1),mt=BigInt(2);function Vn(e){return Pn(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function Wn(e){const t=Vn(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:i}=t,c=r==="x25519";if(!c&&r!=="x448")throw new Error("invalid type");const f=i||ot,h=c?255:448,a=c?32:56,l=BigInt(c?9:5),w=BigInt(c?121665:39081),g=c?mt**BigInt(254):mt**BigInt(447),b=c?BigInt(8)*mt**BigInt(251)-lt:BigInt(4)*mt**BigInt(445)-lt,p=g+b+lt,y=d=>Se(d,n),B=M(l);function M(d){return $n(y(d),a)}function z(d){const x=he("u coordinate",d,a);return c&&(x[31]&=127),y(le(x))}function O(d){return le(o(he("scalar",d,a)))}function $(d,x){const m=R(z(x),O(d));if(m===wt)throw new Error("invalid private or public key received");return M(m)}function v(d){return $(d,B)}function H(d,x,m){const I=y(d*(x-m));return x=y(x-I),m=y(m+I),{x_2:x,x_3:m}}function R(d,x){ue("u",d,wt,n),ue("scalar",x,g,p);const m=x,I=d;let E=lt,A=wt,u=d,U=lt,L=wt;for(let P=BigInt(h-1);P>=wt;P--){const Z=m>>P<L^=Z,{x_2:E,x_3:u}=H(L,E,u),{x_2:A,x_3:U}=H(L,A,U),L=Z;const X=E+A,G=y(X*X),D=E-A,J=y(D*D),Q=G-J,Ne=u+U,ze=u-U,Gt=y(ze*X),Dt=y(Ne*D),qt=Gt+Dt,Yt=Gt-Dt;u=y(qt*qt),U=y(I*y(Yt*Yt)),E=y(G*J),A=y(Q*(G+y(w*Q)))}({x_2:E,x_3:u}=H(L,E,u)),{x_2:A,x_3:U}=H(L,A,U);const F=s(A);return y(E*F)}const C=(d=f(a))=>d,_={randomSecretKey:C,randomPrivateKey:C};function S(d){const x=_.randomSecretKey(d);return{secretKey:x,publicKey:v(x)}}const k={secret:a,public:a,seed:a};return{keygen:S,getSharedSecret:(d,x)=>$(d,x),getPublicKey:d=>v(d),scalarMult:$,scalarMultBase:v,utils:_,GuBytes:B.slice(),info:{type:"montgomery",lengths:k}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Xn=BigInt(1),de=BigInt(2),Gn=BigInt(3),Dn=BigInt(5);BigInt(8);const ke={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function qn(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=ke.p,c=e*e%s*e%s,f=W(c,de,s)*c%s,h=W(f,Xn,s)*e%s,a=W(h,Dn,s)*h%s,l=W(a,t,s)*a%s,w=W(l,n,s)*l%s,g=W(w,r,s)*w%s,b=W(g,o,s)*g%s,p=W(b,o,s)*g%s,y=W(p,t,s)*a%s;return{pow_p_5_8:W(y,de,s)*e%s,b2:c}}function Yn(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ot=(()=>{const e=ke.p;return Wn({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=qn(t);return Se(W(n,Gn,e)*r,e)},adjustScalarBytes:Yn})})(),ve=!1;async function Ke(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Pt(e,t){return await Ke(async()=>{const n=Nt(e)?e:await Jn(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},ve,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMult(e,t)})}async function Bt(e){return await Ke(async()=>Pt(e,Ot.GuBytes),()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMultBase(e)})}const Zn=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Jn(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([...Zn,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},ve,["deriveBits"])}function Nt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class Qn{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),tr(ht(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=ht(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:ht(this.transcript)}}}function tr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function ht(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Ut(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function zt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Te(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function er(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function nr(e,t){const n=e.getReader(),r=[];let o=0;for(;o<t;){const{done:f,value:h}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(h),o+=h.length}n.releaseLock();const s=ht(r),i=s.subarray(0,t),c=Ut(e,s.subarray(t));return{data:i,rest:c}}class Lt{args;body;constructor(t,n){this.args=t,this.body=n}}async function rr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const s of n)if(s.length===0)throw Error("invalid stanza");const r=[];for(;;){const s=await e.readLine();if(s===null)throw Error("invalid stanza");const i=Y.decode(s);if(i.length>48)throw Error("invalid stanza");if(r.push(i),i.length<48)break}const o=ht(r);return{s:new Lt(n,o)}}async function sr(e){const t=new Qn(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s:o,next:s}=await rr(t);if(o!==void 0){r.push(o);continue}if(!s.startsWith("--- "))throw Error("invalid header");const i=Y.decode(s.slice(4)),{rest:c,transcript:f}=t.close(),h=f.slice(0,f.length-1-s.length+3);return{stanzas:r,headerNoMAC:h,MAC:i,headerSize:f.length,rest:Ut(e,c)}}}function He(e){const t=[];t.push(`age-encryption.org/v1
|
|
1
|
+
import{ai as Y,aj as ut}from"#entry";import{F as je,av as Zt,aW as $e,Z as Pe,W as Ve,az as We,a1 as Jt,X as Ge,a0 as Xe,a2 as De,a3 as qe}from"./CJ9AjueP.js";const at=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ye(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function V(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ft(e,...t){if(!ye(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function It(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");V(e.outputLen),V(e.blockLen)}function At(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ye(e,t){ft(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function St(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ct(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Et(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function q(e,t){return e<<32-t|e>>>t}function K(e,t){return e<<t|e>>>32-t>>>0}const Ze=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Je(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Qe(e){for(let t=0;t<e.length;t++)e[t]=Je(e[t]);return e}const Qt=Ze?e=>e:Qe,pe=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",tn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function en(e){if(ft(e),pe)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=tn[e[n]];return t}const tt={_0:48,_9:57,A:65,F:70,a:97,f:102};function te(e){if(e>=tt._0&&e<=tt._9)return e-tt._0;if(e>=tt.A&&e<=tt.F)return e-(tt.A-10);if(e>=tt.a&&e<=tt.f)return e-(tt.a-10)}function ge(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(pe)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=te(e.charCodeAt(s)),c=te(e.charCodeAt(s+1));if(i===void 0||c===void 0){const f=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+s)}r[o]=i*16+c}return r}function we(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function xt(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function ee(e){return typeof e=="string"&&(e=we(e)),ft(e),e}function xe(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class be{}function nn(e){const t=r=>e().update(xt(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ot(e=32){if(at&&typeof at.getRandomValues=="function")return at.getRandomValues(new Uint8Array(e));if(at&&typeof at.randomBytes=="function")return Uint8Array.from(at.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class me extends be{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,It(t);const r=xt(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),ct(s)}update(t){return At(this),this.iHash.update(t),this}digestInto(t){At(this),ft(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:c}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const gt=(e,t,n)=>new me(e,t).update(n).digest();gt.create=(e,t)=>new me(e,t);function Ee(e,t,n){return It(e),n===void 0&&(n=new Uint8Array(e.outputLen)),gt(e,xt(n),xt(t))}const kt=Uint8Array.from([0]),ne=Uint8Array.of();function rn(e,t,n,r=32){It(e),V(r);const o=e.outputLen;if(r>255*o)throw new Error("Length should be <= 255*HashLen");const s=Math.ceil(r/o);n===void 0&&(n=ne);const i=new Uint8Array(s*o),c=gt.create(e,t),f=c._cloneInto(),h=new Uint8Array(c.outputLen);for(let a=0;a<s;a++)kt[0]=a+1,f.update(a===0?ne:h).update(n).update(kt).digestInto(h),i.set(h,o*a),c._cloneInto(f);return c.destroy(),f.destroy(),ct(h,kt),i.slice(0,r)}const dt=(e,t,n,r,o)=>rn(e,Ee(e,t,n),r,o);function sn(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=r?4:0,h=r?0:4;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function on(e,t,n){return e&t^~e&n}function cn(e,t,n){return e&t^e&n^t&n}class fn extends be{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=Et(this.buffer)}update(t){At(this),t=xt(t),ft(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const c=Math.min(o-this.pos,s-i);if(c===o){const f=Et(t);for(;o<=s-i;i+=o)this.process(f,i);continue}r.set(t.subarray(i,i+c),this.pos),this.pos+=c,i+=c,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){At(this),Ye(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,ct(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let l=i;l<o;l++)n[l]=0;sn(r,o-8,BigInt(this.length*8),s),this.process(r,0);const c=Et(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=f/4,a=this.get();if(h>a.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<h;l++)c.setUint32(4*l,a[l],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:c}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=c,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const nt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),an=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),rt=new Uint32Array(64);class ln extends fn{constructor(t=32){super(64,t,8,!1),this.A=nt[0]|0,this.B=nt[1]|0,this.C=nt[2]|0,this.D=nt[3]|0,this.E=nt[4]|0,this.F=nt[5]|0,this.G=nt[6]|0,this.H=nt[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:c,H:f}=this;return[t,n,r,o,s,i,c,f]}set(t,n,r,o,s,i,c,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=c|0,this.H=f|0}process(t,n){for(let l=0;l<16;l++,n+=4)rt[l]=t.getUint32(n,!1);for(let l=16;l<64;l++){const w=rt[l-15],g=rt[l-2],b=q(w,7)^q(w,18)^w>>>3,p=q(g,17)^q(g,19)^g>>>10;rt[l]=p+rt[l-7]+b+rt[l-16]|0}let{A:r,B:o,C:s,D:i,E:c,F:f,G:h,H:a}=this;for(let l=0;l<64;l++){const w=q(c,6)^q(c,11)^q(c,25),g=a+w+on(c,f,h)+an[l]+rt[l]|0,p=(q(r,2)^q(r,13)^q(r,22))+cn(r,o,s)|0;a=h,h=f,f=c,c=i+g|0,i=s,s=o,o=r,r=g+p|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,c=c+this.E|0,f=f+this.F|0,h=h+this.G|0,a=a+this.H|0,this.set(r,o,s,i,c,f,h,a)}roundClean(){ct(rt)}destroy(){this.set(0,0,0,0,0,0,0,0),ct(this.buffer)}}const $t=nn(()=>new ln),et=$t;function hn(e,t,n,r){It(e);const o=xe({dkLen:32,asyncTick:10},r),{c:s,dkLen:i,asyncTick:c}=o;if(V(s),V(i),V(c),s<1)throw new Error("iterations (c) should be >= 1");const f=ee(t),h=ee(n),a=new Uint8Array(i),l=gt.create(e,f),w=l._cloneInto().update(h);return{c:s,dkLen:i,asyncTick:c,DK:a,PRF:l,PRFSalt:w}}function un(e,t,n,r,o){return e.destroy(),t.destroy(),r&&r.destroy(),ct(o),n}function Ae(e,t,n,r){const{c:o,dkLen:s,DK:i,PRF:c,PRFSalt:f}=hn(e,t,n,r);let h;const a=new Uint8Array(4),l=Et(a),w=new Uint8Array(c.outputLen);for(let g=1,b=0;b<s;g++,b+=c.outputLen){const p=i.subarray(b,b+c.outputLen);l.setInt32(0,g,!1),(h=f._cloneInto(h)).update(a).digestInto(w),p.set(w.subarray(0,p.length));for(let y=1;y<o;y++){c._cloneInto(h).update(w).digestInto(w);for(let B=0;B<p.length;B++)p[B]^=w[B]}}return un(c,f,i,h,w)}function re(e,t,n,r,o,s){let i=e[t++]^n[r++],c=e[t++]^n[r++],f=e[t++]^n[r++],h=e[t++]^n[r++],a=e[t++]^n[r++],l=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],b=e[t++]^n[r++],p=e[t++]^n[r++],y=e[t++]^n[r++],B=e[t++]^n[r++],M=e[t++]^n[r++],z=e[t++]^n[r++],O=e[t++]^n[r++],j=e[t++]^n[r++],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=j;for(let F=0;F<8;F+=2)_^=K(v+A|0,7),x^=K(_+v|0,9),A^=K(x+_|0,13),v^=K(A+x|0,18),m^=K(S+H|0,7),u^=K(m+S|0,9),H^=K(u+m|0,13),S^=K(H+u|0,18),U^=K(I+k|0,7),R^=K(U+I|0,9),k^=K(R+U|0,13),I^=K(k+R|0,18),C^=K(L+E|0,7),d^=K(C+L|0,9),E^=K(d+C|0,13),L^=K(E+d|0,18),H^=K(v+C|0,7),R^=K(H+v|0,9),C^=K(R+H|0,13),v^=K(C+R|0,18),k^=K(S+_|0,7),d^=K(k+S|0,9),_^=K(d+k|0,13),S^=K(_+d|0,18),E^=K(I+m|0,7),x^=K(E+I|0,9),m^=K(x+E|0,13),I^=K(m+x|0,18),A^=K(L+U|0,7),u^=K(A+L|0,9),U^=K(u+A|0,13),L^=K(U+u|0,18);o[s++]=i+v|0,o[s++]=c+H|0,o[s++]=f+R|0,o[s++]=h+C|0,o[s++]=a+_|0,o[s++]=l+S|0,o[s++]=w+k|0,o[s++]=g+d|0,o[s++]=b+x|0,o[s++]=p+m|0,o[s++]=y+I|0,o[s++]=B+E|0,o[s++]=M+A|0,o[s++]=z+u|0,o[s++]=O+U|0,o[s++]=j+L|0}function vt(e,t,n,r,o){let s=r+0,i=r+16*o;for(let c=0;c<16;c++)n[i+c]=e[t+(2*o-1)*16+c];for(let c=0;c<o;c++,s+=16,t+=16)re(n,i,e,t,n,s),c>0&&(i+=16),re(n,s,e,t+=16,n,i)}function dn(e,t,n){const r=xe({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:o,r:s,p:i,dkLen:c,asyncTick:f,maxmem:h,onProgress:a}=r;if(V(o),V(s),V(i),V(c),V(f),V(h),a!==void 0&&typeof a!="function")throw new Error("progressCb should be function");const l=128*s,w=l/4,g=Math.pow(2,32);if(o<=1||(o&o-1)!==0||o>g)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(i<0||i>(g-1)*32/l)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(c<0||c>(g-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(l*(o+i)>h)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+h);const p=Ae($t,e,t,{c:1,dkLen:l*i}),y=St(p),B=St(new Uint8Array(l*o)),M=St(new Uint8Array(l));let z=()=>{};if(a){const O=2*o*i,j=Math.max(Math.floor(O/1e4),1);let v=0;z=()=>{v++,a&&(!(v%j)||v===O)&&a(v/O)}}return{N:o,r:s,p:i,dkLen:c,blockSize32:w,V:B,B32:y,B:p,tmp:M,blockMixCb:z,asyncTick:f}}function yn(e,t,n,r,o){const s=Ae($t,e,n,{c:1,dkLen:t});return ct(n,r,o),s}function Be(e,t,n){const{N:r,r:o,p:s,dkLen:i,blockSize32:c,V:f,B32:h,B:a,tmp:l,blockMixCb:w}=dn(e,t,n);Qt(h);for(let g=0;g<s;g++){const b=c*g;for(let p=0;p<c;p++)f[p]=h[b+p];for(let p=0,y=0;p<r-1;p++)vt(f,y,f,y+=c,o),w();vt(f,(r-1)*c,h,b,o),w();for(let p=0;p<r;p++){const y=h[b+c-16]%r;for(let B=0;B<c;B++)l[B]=h[b+B]^f[y*c+B];vt(l,0,h,b,o),w()}}return Qt(h),yn(e,i,a,f,l)}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Ue(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ht(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function Kt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function $(e,...t){if(!Ue(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function se(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function pn(e,t){$(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function st(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function yt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function gn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const wn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function xn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Ft(e){if(typeof e=="string")e=xn(e);else if(Ue(e))e=Rt(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function bn(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function mn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const En=(e,t)=>{function n(r,...o){if($(r),!wn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const a=o[0];if(!a)throw new Error("nonce / iv required");e.varSizeNonce?$(a):$(a,e.nonceLength)}const s=e.tagLength;s&&o[1]!==void 0&&$(o[1]);const i=t(r,...o),c=(a,l)=>{if(l!==void 0){if(a!==2)throw new Error("cipher output not supported");$(l)}};let f=!1;return{encrypt(a,l){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,$(a),c(i.encrypt.length,l),i.encrypt(a,l)},decrypt(a,l){if($(a),s&&a.length<s)throw new Error("invalid ciphertext length: smaller than tagLength="+s);return c(i.decrypt.length,l),i.decrypt(a,l)}}}return Object.assign(n,e),n};function oe(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!Bn(t))throw new Error("invalid output, must be aligned");return t}function ie(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),c=Number(n&s),f=4,h=0;e.setUint32(t+f,i,r),e.setUint32(t+h,c,r)}function An(e,t,n){Ht(n);const r=new Uint8Array(16),o=gn(r);return ie(o,0,BigInt(t),n),ie(o,8,BigInt(e),n),r}function Bn(e){return e.byteOffset%4===0}function Rt(e){return Uint8Array.from(e)}const Ie=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Un=Ie("expand 16-byte k"),In=Ie("expand 32-byte k"),Ln=st(Un),Cn=st(In);function T(e,t){return e<<t|e>>>32-t}function Mt(e){return e.byteOffset%4===0}const bt=64,_n=16,Le=2**32-1,ce=new Uint32Array;function Sn(e,t,n,r,o,s,i,c){const f=o.length,h=new Uint8Array(bt),a=st(h),l=Mt(o)&&Mt(s),w=l?st(o):ce,g=l?st(s):ce;for(let b=0;b<f;i++){if(e(t,n,r,a,i,c),i>=Le)throw new Error("arx: counter overflow");const p=Math.min(bt,f-b);if(l&&p===bt){const y=b/4;if(b%4!==0)throw new Error("arx: invalid block position");for(let B=0,M;B<_n;B++)M=y+B,g[M]=w[M]^a[B];b+=bt;continue}for(let y=0,B;y<p;y++)B=b+y,s[B]=o[B]^h[y];b+=p}}function kn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:i}=bn({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Kt(o),Kt(i),Ht(s),Ht(n),(c,f,h,a,l=0)=>{$(c),$(f),$(h);const w=h.length;if(a===void 0&&(a=new Uint8Array(w)),$(a),Kt(l),l<0||l>=Le)throw new Error("arx: counter overflow");if(a.length<w)throw new Error(`arx: output (${a.length}) is shorter than data (${w})`);const g=[];let b=c.length,p,y;if(b===32)g.push(p=Rt(c)),y=Cn;else if(b===16&&n)p=new Uint8Array(32),p.set(c),p.set(c,16),y=Ln,g.push(p);else throw new Error(`arx: invalid 32-byte key, got length=${b}`);Mt(f)||g.push(f=Rt(f));const B=st(p);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(y,B,st(f.subarray(0,16)),B),f=f.subarray(16)}const M=16-o;if(M!==f.length)throw new Error(`arx: nonce must be ${M} or 16 bytes`);if(M!==12){const O=new Uint8Array(12);O.set(f,s?0:12-f.length),f=O,g.push(f)}const z=st(f);return Sn(e,y,B,z,h,a,l,i),yt(...g),a}}const N=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class vn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Ft(t),$(t,32);const n=N(t,0),r=N(t,2),o=N(t,4),s=N(t,6),i=N(t,8),c=N(t,10),f=N(t,12),h=N(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|i<<12)&255,this.r[5]=i>>>1&8190,this.r[6]=(i>>>14|c<<2)&8191,this.r[7]=(c>>>11|f<<5)&8065,this.r[8]=(f>>>8|h<<8)&8191,this.r[9]=h>>>5&127;for(let a=0;a<8;a++)this.pad[a]=N(t,16+2*a)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:i}=this,c=i[0],f=i[1],h=i[2],a=i[3],l=i[4],w=i[5],g=i[6],b=i[7],p=i[8],y=i[9],B=N(t,n+0),M=N(t,n+2),z=N(t,n+4),O=N(t,n+6),j=N(t,n+8),v=N(t,n+10),H=N(t,n+12),R=N(t,n+14);let C=s[0]+(B&8191),_=s[1]+((B>>>13|M<<3)&8191),S=s[2]+((M>>>10|z<<6)&8191),k=s[3]+((z>>>7|O<<9)&8191),d=s[4]+((O>>>4|j<<12)&8191),x=s[5]+(j>>>1&8191),m=s[6]+((j>>>14|v<<2)&8191),I=s[7]+((v>>>11|H<<5)&8191),E=s[8]+((H>>>8|R<<8)&8191),A=s[9]+(R>>>5|o),u=0,U=u+C*c+_*(5*y)+S*(5*p)+k*(5*b)+d*(5*g);u=U>>>13,U&=8191,U+=x*(5*w)+m*(5*l)+I*(5*a)+E*(5*h)+A*(5*f),u+=U>>>13,U&=8191;let L=u+C*f+_*c+S*(5*y)+k*(5*p)+d*(5*b);u=L>>>13,L&=8191,L+=x*(5*g)+m*(5*w)+I*(5*l)+E*(5*a)+A*(5*h),u+=L>>>13,L&=8191;let F=u+C*h+_*f+S*c+k*(5*y)+d*(5*p);u=F>>>13,F&=8191,F+=x*(5*b)+m*(5*g)+I*(5*w)+E*(5*l)+A*(5*a),u+=F>>>13,F&=8191;let P=u+C*a+_*h+S*f+k*c+d*(5*y);u=P>>>13,P&=8191,P+=x*(5*p)+m*(5*b)+I*(5*g)+E*(5*w)+A*(5*l),u+=P>>>13,P&=8191;let Z=u+C*l+_*a+S*h+k*f+d*c;u=Z>>>13,Z&=8191,Z+=x*(5*y)+m*(5*p)+I*(5*b)+E*(5*g)+A*(5*w),u+=Z>>>13,Z&=8191;let G=u+C*w+_*l+S*a+k*h+d*f;u=G>>>13,G&=8191,G+=x*c+m*(5*y)+I*(5*p)+E*(5*b)+A*(5*g),u+=G>>>13,G&=8191;let X=u+C*g+_*w+S*l+k*a+d*h;u=X>>>13,X&=8191,X+=x*f+m*c+I*(5*y)+E*(5*p)+A*(5*b),u+=X>>>13,X&=8191;let D=u+C*b+_*g+S*w+k*l+d*a;u=D>>>13,D&=8191,D+=x*h+m*f+I*c+E*(5*y)+A*(5*p),u+=D>>>13,D&=8191;let J=u+C*p+_*b+S*g+k*w+d*l;u=J>>>13,J&=8191,J+=x*a+m*h+I*f+E*c+A*(5*y),u+=J>>>13,J&=8191;let Q=u+C*y+_*p+S*b+k*g+d*w;u=Q>>>13,Q&=8191,Q+=x*l+m*a+I*h+E*f+A*c,u+=Q>>>13,Q&=8191,u=(u<<2)+u|0,u=u+U|0,U=u&8191,u=u>>>13,L+=u,s[0]=U,s[1]=L,s[2]=F,s[3]=P,s[4]=Z,s[5]=G,s[6]=X,s[7]=D,s[8]=J,s[9]=Q}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=o,o=t[c]>>>13,t[c]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let c=1;c<10;c++)r[c]=t[c]+o,o=r[c]>>>13,r[c]&=8191;r[9]-=8192;let s=(o^1)-1;for(let c=0;c<10;c++)r[c]&=s;s=~s;for(let c=0;c<10;c++)t[c]=t[c]&s|r[c];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let i=t[0]+n[0];t[0]=i&65535;for(let c=1;c<8;c++)i=(t[c]+n[c]|0)+(i>>>16)|0,t[c]=i&65535;yt(r)}update(t){se(this),t=Ft(t),$(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(r-this.pos,o-s);if(i===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){yt(this.h,this.r,this.buffer,this.pad)}digestInto(t){se(this),pn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:o}=this;if(o){for(n[o++]=1;o<16;o++)n[o]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let i=0;i<8;i++)t[s++]=r[i]>>>0,t[s++]=r[i]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Kn(e){const t=(r,o)=>e(o).update(Ft(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Tn=Kn(e=>new vn(e));function Hn(e,t,n,r,o,s=20){let i=e[0],c=e[1],f=e[2],h=e[3],a=t[0],l=t[1],w=t[2],g=t[3],b=t[4],p=t[5],y=t[6],B=t[7],M=o,z=n[0],O=n[1],j=n[2],v=i,H=c,R=f,C=h,_=a,S=l,k=w,d=g,x=b,m=p,I=y,E=B,A=M,u=z,U=O,L=j;for(let P=0;P<s;P+=2)v=v+_|0,A=T(A^v,16),x=x+A|0,_=T(_^x,12),v=v+_|0,A=T(A^v,8),x=x+A|0,_=T(_^x,7),H=H+S|0,u=T(u^H,16),m=m+u|0,S=T(S^m,12),H=H+S|0,u=T(u^H,8),m=m+u|0,S=T(S^m,7),R=R+k|0,U=T(U^R,16),I=I+U|0,k=T(k^I,12),R=R+k|0,U=T(U^R,8),I=I+U|0,k=T(k^I,7),C=C+d|0,L=T(L^C,16),E=E+L|0,d=T(d^E,12),C=C+d|0,L=T(L^C,8),E=E+L|0,d=T(d^E,7),v=v+S|0,L=T(L^v,16),I=I+L|0,S=T(S^I,12),v=v+S|0,L=T(L^v,8),I=I+L|0,S=T(S^I,7),H=H+k|0,A=T(A^H,16),E=E+A|0,k=T(k^E,12),H=H+k|0,A=T(A^H,8),E=E+A|0,k=T(k^E,7),R=R+d|0,u=T(u^R,16),x=x+u|0,d=T(d^x,12),R=R+d|0,u=T(u^R,8),x=x+u|0,d=T(d^x,7),C=C+_|0,U=T(U^C,16),m=m+U|0,_=T(_^m,12),C=C+_|0,U=T(U^C,8),m=m+U|0,_=T(_^m,7);let F=0;r[F++]=i+v|0,r[F++]=c+H|0,r[F++]=f+R|0,r[F++]=h+C|0,r[F++]=a+_|0,r[F++]=l+S|0,r[F++]=w+k|0,r[F++]=g+d|0,r[F++]=b+x|0,r[F++]=p+m|0,r[F++]=y+I|0,r[F++]=B+E|0,r[F++]=M+A|0,r[F++]=z+u|0,r[F++]=O+U|0,r[F++]=j+L|0}const Fn=kn(Hn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Rn=new Uint8Array(16),fe=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(Rn.subarray(n))},Mn=new Uint8Array(32);function ae(e,t,n,r,o){const s=e(t,n,Mn),i=Tn.create(s);o&&fe(i,o),fe(i,r);const c=An(r.length,o?o.length:0,!0);i.update(c);const f=i.digest();return yt(s,c),f}const On=e=>(t,n,r)=>({encrypt(s,i){const c=s.length;i=oe(c+16,i,!1),i.set(s);const f=i.subarray(0,-16);e(t,n,f,f,1);const h=ae(e,t,n,f,r);return i.set(h,c),yt(h),i},decrypt(s,i){i=oe(s.length-16,i,!1);const c=s.subarray(0,-16),f=s.subarray(-16),h=ae(e,t,n,c,r);if(!mn(f,h))throw new Error("invalid tag");return i.set(s.subarray(0,-16)),e(t,n,i,i,1),yt(h),i}}),pt=En({blockSize:64,nonceLength:12,tagLength:16},On(Fn));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ce=BigInt(0);function Nn(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Ce:BigInt("0x"+e)}function le(e){return ft(e),Nn(en(Uint8Array.from(e).reverse()))}function zn(e,t){return ge(e.toString(16).padStart(t*2,"0"))}function jn(e,t){return zn(e,t).reverse()}function he(e,t,n){let r;if(typeof t=="string")try{r=ge(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(ye(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}const Tt=e=>typeof e=="bigint"&&Ce<=e;function $n(e,t,n){return Tt(e)&&Tt(t)&&Tt(n)&&t<=e&&e<n}function ue(e,t,n,r){if(!$n(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Pn(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,i){const c=e[o];if(i&&c===void 0)return;const f=typeof c;if(f!==s||c===null)throw new Error(`param "${o}" is invalid: expected ${s}, got ${f}`)}Object.entries(t).forEach(([o,s])=>r(o,s,!1)),Object.entries(n).forEach(([o,s])=>r(o,s,!0))}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _e=BigInt(0);BigInt(1);function Se(e,t){const n=e%t;return n>=_e?n:t+n}function W(e,t,n){let r=e;for(;t-- >_e;)r*=r,r%=n;return r}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wt=BigInt(0),lt=BigInt(1),mt=BigInt(2);function Vn(e){return Pn(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function Wn(e){const t=Vn(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:i}=t,c=r==="x25519";if(!c&&r!=="x448")throw new Error("invalid type");const f=i||ot,h=c?255:448,a=c?32:56,l=BigInt(c?9:5),w=BigInt(c?121665:39081),g=c?mt**BigInt(254):mt**BigInt(447),b=c?BigInt(8)*mt**BigInt(251)-lt:BigInt(4)*mt**BigInt(445)-lt,p=g+b+lt,y=d=>Se(d,n),B=M(l);function M(d){return jn(y(d),a)}function z(d){const x=he("u coordinate",d,a);return c&&(x[31]&=127),y(le(x))}function O(d){return le(o(he("scalar",d,a)))}function j(d,x){const m=R(z(x),O(d));if(m===wt)throw new Error("invalid private or public key received");return M(m)}function v(d){return j(d,B)}function H(d,x,m){const I=y(d*(x-m));return x=y(x-I),m=y(m+I),{x_2:x,x_3:m}}function R(d,x){ue("u",d,wt,n),ue("scalar",x,g,p);const m=x,I=d;let E=lt,A=wt,u=d,U=lt,L=wt;for(let P=BigInt(h-1);P>=wt;P--){const Z=m>>P<L^=Z,{x_2:E,x_3:u}=H(L,E,u),{x_2:A,x_3:U}=H(L,A,U),L=Z;const G=E+A,X=y(G*G),D=E-A,J=y(D*D),Q=X-J,Ne=u+U,ze=u-U,Xt=y(ze*G),Dt=y(Ne*D),qt=Xt+Dt,Yt=Xt-Dt;u=y(qt*qt),U=y(I*y(Yt*Yt)),E=y(X*J),A=y(Q*(X+y(w*Q)))}({x_2:E,x_3:u}=H(L,E,u)),{x_2:A,x_3:U}=H(L,A,U);const F=s(A);return y(E*F)}const C=(d=f(a))=>d,_={randomSecretKey:C,randomPrivateKey:C};function S(d){const x=_.randomSecretKey(d);return{secretKey:x,publicKey:v(x)}}const k={secret:a,public:a,seed:a};return{keygen:S,getSharedSecret:(d,x)=>j(d,x),getPublicKey:d=>v(d),scalarMult:j,scalarMultBase:v,utils:_,GuBytes:B.slice(),info:{type:"montgomery",lengths:k}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);const Gn=BigInt(1),de=BigInt(2),Xn=BigInt(3),Dn=BigInt(5);BigInt(8);const ke={p:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function qn(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=ke.p,c=e*e%s*e%s,f=W(c,de,s)*c%s,h=W(f,Gn,s)*e%s,a=W(h,Dn,s)*h%s,l=W(a,t,s)*a%s,w=W(l,n,s)*l%s,g=W(w,r,s)*w%s,b=W(g,o,s)*g%s,p=W(b,o,s)*g%s,y=W(p,t,s)*a%s;return{pow_p_5_8:W(y,de,s)*e%s,b2:c}}function Yn(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ot=(()=>{const e=ke.p;return Wn({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=qn(t);return Se(W(n,Xn,e)*r,e)},adjustScalarBytes:Yn})})(),ve=!1;async function Ke(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Pt(e,t){return await Ke(async()=>{const n=Nt(e)?e:await Jn(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},ve,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMult(e,t)})}async function Bt(e){return await Ke(async()=>Pt(e,Ot.GuBytes),()=>{if(Nt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Ot.scalarMultBase(e)})}const Zn=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Jn(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([...Zn,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},ve,["deriveBits"])}function Nt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class Qn{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),tr(ht(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=ht(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:ht(this.transcript)}}}function tr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function ht(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Ut(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function zt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Te(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function er(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function nr(e,t){const n=e.getReader(),r=[];let o=0;for(;o<t;){const{done:f,value:h}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(h),o+=h.length}n.releaseLock();const s=ht(r),i=s.subarray(0,t),c=Ut(e,s.subarray(t));return{data:i,rest:c}}class Lt{args;body;constructor(t,n){this.args=t,this.body=n}}async function rr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const s of n)if(s.length===0)throw Error("invalid stanza");const r=[];for(;;){const s=await e.readLine();if(s===null)throw Error("invalid stanza");const i=Y.decode(s);if(i.length>48)throw Error("invalid stanza");if(r.push(i),i.length<48)break}const o=ht(r);return{s:new Lt(n,o)}}async function sr(e){const t=new Qn(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s:o,next:s}=await rr(t);if(o!==void 0){r.push(o);continue}if(!s.startsWith("--- "))throw Error("invalid header");const i=Y.decode(s.slice(4)),{rest:c,transcript:f}=t.close(),h=f.slice(0,f.length-1-s.length+3);return{stanzas:r,headerNoMAC:h,MAC:i,headerSize:f.length,rest:Ut(e,c)}}}function He(e){const t=[];t.push(`age-encryption.org/v1
|
|
2
2
|
`);for(const n of e){t.push("-> "+n.args.join(" ")+`
|
|
3
3
|
`);for(let r=0;r<n.body.length;r+=48){let o=r+48;o>n.body.length&&(o=n.body.length),t.push(Y.encode(n.body.subarray(r,o))+`
|
|
4
4
|
`)}n.body.length%48===0&&t.push(`
|
|
5
5
|
`)}return t.push("---"),new TextEncoder().encode(t.join(""))}function or(e,t){return ht([He(e),new TextEncoder().encode(" "+Y.encode(t)+`
|
|
6
|
-
`)])}function Ur(){const e=ot(32),t=ut.encodeFromBytes("AGE-SECRET-KEY-",e).toUpperCase();return Promise.resolve(t)}async function Ir(e){let t;if(Fe(e))t=e;else{const r=ut.decodeToBytes(e);if(!e.startsWith("AGE-SECRET-KEY-1")||r.prefix.toUpperCase()!=="AGE-SECRET-KEY-"||r.bytes.length!==32)throw Error("invalid identity");t=r.bytes}const n=await Bt(t);return ut.encodeFromBytes("age",n)}class ir{recipient;constructor(t){const n=ut.decodeToBytes(t);if(!t.startsWith("age1")||n.prefix.toLowerCase()!=="age"||n.bytes.length!==32)throw Error("invalid recipient");this.recipient=n.bytes}async wrapFileKey(t){const n=ot(32),r=await Bt(n),o=await Pt(n,this.recipient),s=new Uint8Array(r.length+this.recipient.length);s.set(r),s.set(this.recipient,r.length);const i=dt(et,o,s,"age-encryption.org/v1/X25519",32);return[new Lt(["X25519",Y.encode(r)],Vt(t,i))]}}class cr{identity;recipient;constructor(t){if(Fe(t)){this.identity=t,this.recipient=Bt(t);return}const n=ut.decodeToBytes(t);if(!t.startsWith("AGE-SECRET-KEY-1")||n.prefix.toUpperCase()!=="AGE-SECRET-KEY-"||n.bytes.length!==32)throw Error("invalid identity");this.identity=n.bytes,this.recipient=Bt(n.bytes)}async unwrapFileKey(t){for(const n of t){if(n.args.length<1||n.args[0]!=="X25519")continue;if(n.args.length!==2)throw Error("invalid X25519 stanza");const r=Y.decode(n.args[1]);if(r.length!==32)throw Error("invalid X25519 stanza");const o=await Pt(this.identity,r),s=await this.recipient,i=new Uint8Array(r.length+s.length);i.set(r),i.set(s,r.length);const c=dt(et,o,i,"age-encryption.org/v1/X25519",32),f=Wt(n.body,c);if(f!==null)return f}return null}}class fr{passphrase;logN;constructor(t,n){this.passphrase=t,this.logN=n}wrapFileKey(t){const n=ot(16),r="age-encryption.org/v1/scrypt",o=new Uint8Array(r.length+16);o.set(new TextEncoder().encode(r)),o.set(n,r.length);const s=Be(this.passphrase,o,{N:2**this.logN,r:8,p:1,dkLen:32});return[new Lt(["scrypt",Y.encode(n),this.logN.toString()],Vt(t,s))]}}class ar{passphrase;constructor(t){this.passphrase=t}unwrapFileKey(t){for(const n of t){if(n.args.length<1||n.args[0]!=="scrypt")continue;if(t.length!==1)throw Error("scrypt recipient is not the only one in the header");if(n.args.length!==3||!/^[1-9][0-9]*$/.test(n.args[2]))throw Error("invalid scrypt stanza");const r=Y.decode(n.args[1]);if(r.length!==16)throw Error("invalid scrypt stanza");const o=Number(n.args[2]);if(o>20)throw Error("scrypt work factor is too high");const s="age-encryption.org/v1/scrypt",i=new Uint8Array(s.length+16);i.set(new TextEncoder().encode(s)),i.set(r,s.length);const c=Be(this.passphrase,i,{N:2**o,r:8,p:1,dkLen:32}),f=Wt(n.body,c);if(f!==null)return f}return null}}function Vt(e,t){const n=new Uint8Array(12);return pt(t,n).encrypt(e)}function Wt(e,t){if(e.length!==32)throw Error("invalid stanza");const n=new Uint8Array(12);try{return pt(t,n).decrypt(e)}catch{return null}}function Fe(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}const it=16,
|
|
6
|
+
`)])}function Ur(){const e=ot(32),t=ut.encodeFromBytes("AGE-SECRET-KEY-",e).toUpperCase();return Promise.resolve(t)}async function Ir(e){let t;if(Fe(e))t=e;else{const r=ut.decodeToBytes(e);if(!e.startsWith("AGE-SECRET-KEY-1")||r.prefix.toUpperCase()!=="AGE-SECRET-KEY-"||r.bytes.length!==32)throw Error("invalid identity");t=r.bytes}const n=await Bt(t);return ut.encodeFromBytes("age",n)}class ir{recipient;constructor(t){const n=ut.decodeToBytes(t);if(!t.startsWith("age1")||n.prefix.toLowerCase()!=="age"||n.bytes.length!==32)throw Error("invalid recipient");this.recipient=n.bytes}async wrapFileKey(t){const n=ot(32),r=await Bt(n),o=await Pt(n,this.recipient),s=new Uint8Array(r.length+this.recipient.length);s.set(r),s.set(this.recipient,r.length);const i=dt(et,o,s,"age-encryption.org/v1/X25519",32);return[new Lt(["X25519",Y.encode(r)],Vt(t,i))]}}class cr{identity;recipient;constructor(t){if(Fe(t)){this.identity=t,this.recipient=Bt(t);return}const n=ut.decodeToBytes(t);if(!t.startsWith("AGE-SECRET-KEY-1")||n.prefix.toUpperCase()!=="AGE-SECRET-KEY-"||n.bytes.length!==32)throw Error("invalid identity");this.identity=n.bytes,this.recipient=Bt(n.bytes)}async unwrapFileKey(t){for(const n of t){if(n.args.length<1||n.args[0]!=="X25519")continue;if(n.args.length!==2)throw Error("invalid X25519 stanza");const r=Y.decode(n.args[1]);if(r.length!==32)throw Error("invalid X25519 stanza");const o=await Pt(this.identity,r),s=await this.recipient,i=new Uint8Array(r.length+s.length);i.set(r),i.set(s,r.length);const c=dt(et,o,i,"age-encryption.org/v1/X25519",32),f=Wt(n.body,c);if(f!==null)return f}return null}}class fr{passphrase;logN;constructor(t,n){this.passphrase=t,this.logN=n}wrapFileKey(t){const n=ot(16),r="age-encryption.org/v1/scrypt",o=new Uint8Array(r.length+16);o.set(new TextEncoder().encode(r)),o.set(n,r.length);const s=Be(this.passphrase,o,{N:2**this.logN,r:8,p:1,dkLen:32});return[new Lt(["scrypt",Y.encode(n),this.logN.toString()],Vt(t,s))]}}class ar{passphrase;constructor(t){this.passphrase=t}unwrapFileKey(t){for(const n of t){if(n.args.length<1||n.args[0]!=="scrypt")continue;if(t.length!==1)throw Error("scrypt recipient is not the only one in the header");if(n.args.length!==3||!/^[1-9][0-9]*$/.test(n.args[2]))throw Error("invalid scrypt stanza");const r=Y.decode(n.args[1]);if(r.length!==16)throw Error("invalid scrypt stanza");const o=Number(n.args[2]);if(o>20)throw Error("scrypt work factor is too high");const s="age-encryption.org/v1/scrypt",i=new Uint8Array(s.length+16);i.set(new TextEncoder().encode(s)),i.set(r,s.length);const c=Be(this.passphrase,i,{N:2**o,r:8,p:1,dkLen:32}),f=Wt(n.body,c);if(f!==null)return f}return null}}function Vt(e,t){const n=new Uint8Array(12);return pt(t,n).encrypt(e)}function Wt(e,t){if(e.length!==32)throw Error("invalid stanza");const n=new Uint8Array(12);try{return pt(t,n).decrypt(e)}catch{return null}}function Fe(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}const it=16,Gt=64*1024,jt=Gt+it;function lr(e){const t=new Uint8Array(12),n=()=>{for(let i=t.length-2;i>=0&&(t[i]++,t[i]===0);i--);};let r=!0;const o=new Uint8Array(jt);let s=0;return new TransformStream({transform(i,c){for(;i.length>0;){if(s===o.length){const h=pt(e,t).decrypt(o);c.enqueue(h),n(),s=0,r=!1}const f=Math.min(o.length-s,i.length);o.set(i.subarray(0,f),s),s+=f,i=i.subarray(f)}},flush(i){t[11]=1;const c=pt(e,t).decrypt(o.subarray(0,s));if(!r&&c.length===0)throw new Error("final chunk is empty");i.enqueue(c)}})}function hr(e){if(e<it)throw Error("ciphertext is too small");if(e===it)return 0;const t=Math.floor(e/jt),n=e%jt;if(0<n&&n<=it)throw Error("ciphertext size is invalid");let r=e;return r-=t*it,r-=n>0?it:0,r}function ur(e){const t=new Uint8Array(12),n=()=>{for(let s=t.length-2;s>=0&&(t[s]++,t[s]===0);s--);},r=new Uint8Array(Gt);let o=0;return new TransformStream({transform(s,i){for(;s.length>0;){if(o===r.length){const f=pt(e,t).encrypt(r);i.enqueue(f),n(),o=0}const c=Math.min(r.length-o,s.length);r.set(s.subarray(0,c),o),o+=c,s=s.subarray(c)}},flush(s){t[11]=1;const i=pt(e,t).encrypt(r.subarray(0,o));s.enqueue(i)}})}function dr(e){const t=Math.max(1,Math.ceil(e/Gt));return e+it*t}function Ct(e){if(e.length===0)throw Error("cbor: unexpected EOF");const t=e[0]>>5,n=e[0]&31;if(n<=23)return[t,n,e.subarray(1)];if(n===24){if(e.length<2)throw Error("cbor: unexpected EOF");return[t,e[1],e.subarray(2)]}if(n===25){if(e.length<3)throw Error("cbor: unexpected EOF");return[t,e[1]<<8|e[2],e.subarray(3)]}throw Error("cbor: unsupported argument encoding")}function yr(e){const[t,n,r]=Ct(e);if(t!==0)throw Error("cbor: expected unsigned integer");return[n,r]}function pr(e){const[t,n,r]=Ct(e);if(t!==2)throw Error("cbor: expected byte string");if(n>r.length)throw Error("cbor: unexpected EOF");return[r.subarray(0,n),r.subarray(n)]}function Re(e){const[t,n,r]=Ct(e);if(t!==3)throw Error("cbor: expected text string");if(n>r.length)throw Error("cbor: unexpected EOF");return[new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}).decode(r.subarray(0,n)),r.subarray(n)]}function gr(e){const[t,n,r]=Ct(e);if(t!==4)throw Error("cbor: expected array");let o=r;const s=[];for(let i=0;i<n;i++){let c;[c,o]=Re(o),s.push(c)}return[s,o]}const wr="AGE-PLUGIN-FIDO2PRF-";function xr(e){const t=ut.decodeToBytes(e);if(!e.startsWith(wr+"1"))throw Error("invalid identity");const[n,r]=yr(t.bytes);if(n!==1)throw Error("unsupported identity version");const[o,s]=pr(r),[i,c]=Re(s),[f]=gr(c);return[o,i,f]}const _t="age-encryption.org/fido2prf";class Me{credId;transports;rpId;constructor(t){if(t?.identity){const[n,r,o]=xr(t.identity);this.credId=n,this.transports=o,this.rpId=r}else this.rpId=t?.rpId}async getCredential(t){const r=(await navigator.credentials.get({publicKey:{allowCredentials:this.credId?[{id:this.credId,transports:this.transports,type:"public-key"}]:[],challenge:ot(16),extensions:{prf:{eval:br(t)}},userVerification:"required",rpId:this.rpId}})).getClientExtensionResults().prf?.results;if(r===void 0)throw Error("PRF extension not available (need macOS 15+, Chrome 132+)");return r}}class Lr extends Me{async wrapFileKey(t){const n=ot(16),r=await this.getCredential(n),o=Oe(r);return[new Lt([_t,Y.encode(n)],Vt(t,o))]}}class Cr extends Me{async unwrapFileKey(t){for(const n of t){if(n.args.length<1||n.args[0]!==_t)continue;if(n.args.length!==2)throw Error("invalid prf stanza");const r=Y.decode(n.args[1]);if(r.length!==16)throw Error("invalid prf stanza");const o=await this.getCredential(r),s=Oe(o),i=Wt(n.body,s);if(i!==null)return i}return null}}function br(e){const t=new TextEncoder().encode(_t),n=new Uint8Array(t.length+e.length+1);n.set(t,0),n[t.length]=1,n.set(e,t.length+1);const r=new Uint8Array(t.length+e.length+1);return r.set(t,0),r[t.length]=2,r.set(e,t.length+1),{first:n,second:r}}function Oe(e){if(e.second===void 0)throw Error("Missing second PRF result");const t=new Uint8Array(e.first.byteLength+e.second.byteLength);return t.set(new Uint8Array(e.first),0),t.set(new Uint8Array(e.second),e.first.byteLength),Ee(et,t,_t)}class _r{passphrase=null;scryptWorkFactor=18;recipients=[];setPassphrase(t){if(this.passphrase!==null)throw new Error("can encrypt to at most one passphrase");if(this.recipients.length!==0)throw new Error("can't encrypt to both recipients and passphrases");this.passphrase=t}setScryptWorkFactor(t){this.scryptWorkFactor=t}addRecipient(t){if(this.passphrase!==null)throw new Error("can't encrypt to both recipients and passphrases");typeof t=="string"?this.recipients.push(new ir(t)):this.recipients.push(t)}async encrypt(t){const n=ot(16),r=[];let o=this.recipients;this.passphrase!==null&&(o=[new fr(this.passphrase,this.scryptWorkFactor)]);for(const l of o)r.push(...await l.wrapFileKey(n));const s=dt(et,n,void 0,"header",32),i=gt(et,s,He(r)),c=or(r,i),f=ot(16),h=dt(et,n,f,"payload",32),a=ur(h);return t instanceof ReadableStream?Object.assign(Ut(t.pipeThrough(a),c,f),{size:l=>dr(l)+c.length+f.length}):(typeof t=="string"&&(t=new TextEncoder().encode(t)),await Te(Ut(zt(t).pipeThrough(a),c,f)))}}class Sr{identities=[];addPassphrase(t){this.identities.push(new ar(t))}addIdentity(t){typeof t=="string"||Er(t)?this.identities.push(new cr(t)):this.identities.push(t)}async decrypt(t,n){const r=t instanceof ReadableStream?t:zt(t),{fileKey:o,headerSize:s,rest:i}=await this.decryptHeaderInternal(r),{data:c,rest:f}=await nr(i,16),h=dt(et,o,c,"payload",32),a=lr(h),l=f.pipeThrough(a),w=Object.assign(l,{size:g=>hr(g-s-c.length)});return t instanceof ReadableStream?w:n==="text"?await er(l):await Te(l)}async decryptHeader(t){return(await this.decryptHeaderInternal(zt(t))).fileKey}async decryptHeaderInternal(t){const n=await sr(t),r=await this.unwrapFileKey(n.stanzas);if(r===null)throw Error("no identity matched any of the file's recipients");const o=dt(et,r,void 0,"header",32),s=gt(et,o,n.headerNoMAC);if(!mr(n.MAC,s))throw Error("invalid header HMAC");return{fileKey:r,headerSize:n.headerSize,rest:n.rest}}async unwrapFileKey(t){for(const n of this.identities){const r=await n.unwrapFileKey(t);if(r!==null)return r}return null}}function mr(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function Er(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}const kr=je({__name:"PasswordField",props:{modelValue:{},modelModifiers:{},visible:{type:Boolean,default:!1},visibleModifiers:{}},emits:["update:modelValue","update:visible"],setup(e,{expose:t}){const n=Zt(e,"modelValue"),r=Zt(e,"visible"),o=$e("textField");return t({textField:o}),(s,i)=>(Ve(),Pe(We,{ref_key:"textField",ref:o,modelValue:n.value,"onUpdate:modelValue":i[1]||(i[1]=c=>n.value=c),variant:"outlined",density:"compact",type:r.value?"text":"password"},{"append-inner":Jt(()=>[Ge(Xe,{onClick:i[0]||(i[0]=c=>r.value=!r.value)},{default:Jt(()=>[De(qe(r.value?"mdi-eye-off":"mdi-eye"),1)]),_:1})]),_:1},8,["modelValue","type"]))}});export{Sr as D,_r as E,Lr as W,kr as _,Cr as a,Ur as g,Ir as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as s,S as c}from"./
|
|
1
|
+
import{b as s,S as c}from"./ByQEjDj-.js";import"#entry";import{_ as h}from"./D12QiTSl.js";import"./DkPrE8g-.js";import{_ as f}from"./D-IcYK3n.js";import{S as y}from"./NHPpYOb8.js";import{F as P,aO as v,av as i,Z as B,W as b,G as o,a1 as d,X as p}from"./CJ9AjueP.js";const H=P({__name:"SecretsTable",props:v({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:["update:search","update:sortBy","update:page","update:itemsPerPage"],setup(r){const n=i(r,"search"),m=i(r,"sortBy"),l=i(r,"page"),g=i(r,"itemsPerPage"),u=[{...s.name,headerProps:{defaultPrimaryIcon:"mdi:key"}},s.id,{key:"owner",title:"Owner"},s.createdAt,{title:"Value",key:"value"},s.actions];return(t,a)=>(b(),B(o(c),{search:n.value,"onUpdate:search":a[0]||(a[0]=e=>n.value=e),"sort-by":m.value,"onUpdate:sortBy":a[1]||(a[1]=e=>m.value=e),page:l.value,"onUpdate:page":a[2]||(a[2]=e=>l.value=e),"items-per-page":g.value,"onUpdate:itemsPerPage":a[3]||(a[3]=e=>g.value=e),headers:u,data:t.data,loading:t.loading,"hide-header":t.hideHeader,height:t.height},{"item.owner":d(({item:e})=>[p(o(h),{item:e},null,8,["item"])]),"item.value":d(({item:e})=>[p(o(y),{"secret-id":e.id,"project-id":t.projectId},null,8,["secret-id","project-id"])]),"item.actions":d(({item:e})=>[p(o(f),{"page-name":"settings.secret-details","page-params":{projectId:t.projectId,secretId:e.id}},null,8,["page-params"])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}});export{H as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as d,S as y}from"./
|
|
1
|
+
import{b as d,S as y}from"./ByQEjDj-.js";import{S}from"./DqcsB7RK.js";import"./DkPrE8g-.js";import{f as h,u as C,m as w}from"#entry";import{F as k,r as n,j as B,Z as x,W as L,a1 as u,G as s,X as f,ai as U,b as i}from"./CJ9AjueP.js";import"./CFtPCidf.js";import"./DnodTinn.js";import"./Dj-ZGW1B.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";const W=k({__name:"project-list",setup(z){const m=h(),g=C(),j=[d.name,d.id,d.createdAt,{key:"actions",title:"Actions"}],r=n(""),P=w(r,300),l=n(),c=n(1),p=n(10),b=B(()=>{const a=P.value.toLowerCase().trim(),e=a?m.projects.filter(o=>o.id.includes(a)||o.meta.title.toLowerCase().includes(a)||o.meta.description?.toLowerCase().includes(a)):m.projects;return{items:e,total:e.length}}),v=a=>{g.push({name:"project",params:{projectId:a}})};return(a,e)=>(L(),x(s(S),{title:"Projects",icon:"mdi-folder-multiple",description:"Manage your projects and their associated instances, secrets, and settings. Projects encapsulate all configurations and data for your application."},{default:u(({height:o})=>[f(s(y),{search:s(r),"onUpdate:search":e[0]||(e[0]=t=>i(r)?r.value=t:null),"sort-by":s(l),"onUpdate:sortBy":e[1]||(e[1]=t=>i(l)?l.value=t:null),page:s(c),"onUpdate:page":e[2]||(e[2]=t=>i(c)?c.value=t:null),"items-per-page":s(p),"onUpdate:itemsPerPage":e[3]||(e[3]=t=>i(p)?p.value=t:null),headers:j,data:s(b),loading:!1,height:o},{"item.actions":u(({item:t})=>[f(U,{icon:"mdi-arrow-right",variant:"text",size:"small",onClick:A=>v(t.id)},null,8,["onClick"])]),_:2},1032,["search","sort-by","page","items-per-page","data","height"])]),_:1}))}});export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as r,_ as l}from"#entry";import{_ as m}from"./
|
|
1
|
+
import{n as r,_ as l}from"#entry";import{_ as m}from"./DnodTinn.js";import{F as f,j as p,Z as o,W as t,aP as d,a1 as n,a2 as u,a3 as g,G as c,_ as h}from"./CJ9AjueP.js";const C=f({__name:"EntityRefChip",props:{id:{},fallbackIcon:{},pageName:{},pageParams:{},meta:{},color:{},maxLength:{default:20}},setup(e){const s=()=>{r({name:e.pageName,params:e.pageParams})},i=p(()=>{const a=e.meta?.title??e.id;return a.length<=e.maxLength?a:`${a.slice(0,e.maxLength)}...`});return(a,k)=>(t(),o(d,{color:a.meta?.color??a.color,class:"font-weight-bold cursor-pointer",size:"small",onClick:s},{prepend:n(()=>[a.meta?.icon||a.fallbackIcon?(t(),o(c(m),{key:0,icon:a.fallbackIcon,"custom-icon":a.meta?.icon,color:a.meta?.iconColor,size:16,class:"mr-1"},null,8,["icon","custom-icon","color"])):h("",!0)]),default:n(()=>[u(" "+g(c(i)),1)]),_:1},8,["color"]))}}),N=l(C,[["__scopeId","data-v-4e111734"]]);export{N as E};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o={active:{color:"success",icon:"mdi-play-circle"},unavailable:{color:"secondary",icon:"mdi-close-circle"}},c={pending:{color:"warning",loading:!0},running:{color:"info",loading:!0},failing:{color:"error",icon:"mdi-alert-circle",loading:!0},completed:{color:"success",icon:"mdi-check-circle"},failed:{color:"error",icon:"mdi-close-circle"},cancelled:{color:"secondary",icon:"mdi-cancel"}},r={unknown:{color:"secondary",icon:"mdi-help-circle"},starting:{color:"warning",loading:!0},running:{color:"success",icon:"mdi-check-circle"},stopping:{color:"warning",loading:!0},stopped:{color:"secondary",icon:"mdi-stop"},error:{color:"error",icon:"mdi-alert-circle"}},e={update:{color:"primary",icon:"mdi-arrow-up-circle"},preview:{color:"secondary",icon:"mdi-eye"},destroy:{color:"error",icon:"mdi-delete-circle"},recreate:{color:"warning",icon:"mdi-refresh-circle"},refresh:{color:"success",icon:"mdi-reload"}},i={password:{color:"primary",icon:"mdi-key-variant"},passkey:{color:"success",icon:"mdi-fingerprint"}};export{c as a,e as o,o as t,i as u,r as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as h,b as r}from"./
|
|
1
|
+
import{S as h,b as r}from"./ByQEjDj-.js";import"#entry";import{_ as f}from"./D12QiTSl.js";import"./DkPrE8g-.js";import{_ as y}from"./D-IcYK3n.js";import{F as P,aO as B,av as o,Z as c,W as v,G as i,a1 as g,X as l}from"./CJ9AjueP.js";const j=P({__name:"ApiKeysTable",props:B({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:["update:search","update:sortBy","update:page","update:itemsPerPage"],setup(s){const d=o(s,"search"),p=o(s,"sortBy"),n=o(s,"page"),m=o(s,"itemsPerPage"),u=[r.name,r.id,{title:"Owner",key:"owner",sortable:!1},r.createdAt,r.actions];return(t,a)=>(v(),c(i(h),{search:d.value,"onUpdate:search":a[0]||(a[0]=e=>d.value=e),"sort-by":p.value,"onUpdate:sortBy":a[1]||(a[1]=e=>p.value=e),page:n.value,"onUpdate:page":a[2]||(a[2]=e=>n.value=e),"items-per-page":m.value,"onUpdate:itemsPerPage":a[3]||(a[3]=e=>m.value=e),headers:u,data:t.data,loading:t.loading,"hide-header":t.hideHeader,height:t.height},{"item.owner":g(({item:e})=>[l(i(f),{item:e},null,8,["item"])]),"item.actions":g(({item:e})=>[l(i(y),{"page-name":"settings.api-key-details","page-params":{projectId:t.projectId,apiKeyId:e.id}},null,8,["page-params"])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}});export{j as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as h,b as r}from"./
|
|
1
|
+
import{S as h,b as r}from"./ByQEjDj-.js";import"#entry";import{_ as f}from"./D12QiTSl.js";import"./DkPrE8g-.js";import{_ as P}from"./D-IcYK3n.js";import{F as y,aO as B,av as o,Z as c,W as v,G as i,a1 as m,X as l}from"./CJ9AjueP.js";const k=y({__name:"PagesTable",props:B({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:["update:search","update:sortBy","update:page","update:itemsPerPage"],setup(s){const d=o(s,"search"),n=o(s,"sortBy"),p=o(s,"page"),g=o(s,"itemsPerPage"),u=[r.name,r.id,{key:"owner",title:"Owner"},r.createdAt,r.actions];return(t,a)=>(v(),c(i(h),{search:d.value,"onUpdate:search":a[0]||(a[0]=e=>d.value=e),"sort-by":n.value,"onUpdate:sortBy":a[1]||(a[1]=e=>n.value=e),page:p.value,"onUpdate:page":a[2]||(a[2]=e=>p.value=e),"items-per-page":g.value,"onUpdate:itemsPerPage":a[3]||(a[3]=e=>g.value=e),headers:u,data:t.data,loading:t.loading,"hide-header":t.hideHeader,height:t.height},{"item.owner":m(({item:e})=>[l(i(f),{item:e},null,8,["item"])]),"item.actions":m(({item:e})=>[l(i(P),{"page-name":"settings.page-details","page-params":{projectId:t.projectId,pageId:e.id}},null,8,["page-params"])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}});export{k as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o,e as s}from"#entry";import{L as a,W as i,$ as t,a3 as r}from"./
|
|
1
|
+
import{_ as o,e as s}from"#entry";import{L as a,W as i,$ as t,a3 as r}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},l={class:"max-w-520px text-center"},c=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return s({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,g)=>(i(),a("div",u,[t("div",l,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.statusCode)},null,8,c),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusMessage)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},k=o(f,[["__scopeId","data-v-abec2557"]]);export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as j,aV as T,aW as E,aC as O,aX as D,aY as H,z as W,A,B as G,s as q,_ as X,k as J}from"#entry";import"./BmhnSWN5.js";import{c as K,_ as Y,a as Z,b as Q}from"./BuN5GOse.js";import{_ as U,I as tt,G as et}from"./Dqe2EjXB.js";import{I as nt}from"./BKe7h20I.js";import{F as S,j as y,aW as st,Z as v,W as m,G as t,a1 as l,X as g,u as ot,aL as _,J as at,ak as $,al as P,_ as B,a8 as F,L as it,$ as N,a3 as rt}from"./CJ9AjueP.js";import{_ as ct}from"./BDCIi1Fb.js";import{P as pt}from"./D2hOj9XC.js";import"./PZl7tHUC.js";import"./AV0MK5it.js";import"./Cvl8iHT_.js";import"./D4I3CwV0.js";import"./UlOiG1et.js";import"./DnodTinn.js";import"./CXRolcM8.js";import"./BL-2dw2H.js";const ut=S({__name:"CompositeInstanceInputNode",props:{id:{},type:{},selected:{type:Boolean},connectable:{type:[Boolean,Number,String,Function]},position:{},dimensions:{},label:{},isValidTargetPos:{type:Function},isValidSourcePos:{type:Function},parent:{},parentNodeId:{},dragging:{type:Boolean},resizing:{type:Boolean},zIndex:{},targetPosition:{},sourcePosition:{},dragHandle:{},data:{},events:{},instance:{}},setup(s){const e=j(),{instancesStore:n,libraryStore:i,stateStore:p,validationStore:a,operationsStore:o}=e,b=y(()=>p.instanceLocks.get(s.instance.id)),I=y(()=>i.library.components[s.instance.type]),r=y(()=>p.getInstanceState(s.instance.id)),C=st("contextMenu");return(d,u)=>(m(),v(t(U),{instance:d.instance,component:t(I),entities:t(i).library.entities,state:t(r),editable:t(n).instances.has(d.instance.id),"input-resolver-outputs":t(n).inputResolverOutputs,"input-resolver-dependent-map":t(n).inputResolverDependentMap,"io-type":"inputs","io-mirror":!0,"hide-show-composite":!0,"onSave:args":u[0]||(u[0]=(f,w,h)=>t(n).updateInstance(f,w,h)),"onOperation:launch":u[1]||(u[1]=f=>t(o).launchInstanceOperation(f,d.data.instance)),"onOperation:cancel":u[2]||(u[2]=f=>t(o).cancelInstanceOperation(t(r).lastOperationState.operationId,d.data.instance.id)),onContextmenu:u[3]||(u[3]=f=>t(C)?.showContextMenu(f))},{status:l(()=>[g(t(nt),{state:t(r),"expected-input-hash":t(p).inputHashOutputs.get(d.instance.id)?.inputHash,"validation-output":t(a).validationOutputs.get(d.instance.id)},null,8,["state","expected-input-hash","validation-output"])]),default:l(()=>[g(t(K),{ref_key:"contextMenu",ref:C,stores:t(e),instance:d.instance,component:t(I),state:t(r),editable:!1,locked:!!t(b)},null,8,["stores","instance","component","state","locked"])]),_:1},8,["instance","component","entities","state","editable","input-resolver-outputs","input-resolver-dependent-map"]))}}),dt=S({__name:"CompositeInstanceOutputNode",props:{id:{},type:{},selected:{type:Boolean},connectable:{type:[Boolean,Number,String,Function]},position:{},dimensions:{},label:{},isValidTargetPos:{type:Function},isValidSourcePos:{type:Function},parent:{},parentNodeId:{},dragging:{type:Boolean},resizing:{type:Boolean},zIndex:{},targetPosition:{},sourcePosition:{},dragHandle:{},data:{},events:{},instance:{}},setup(s){const{libraryStore:e}=j(),n=y(()=>e.library.components[s.instance.type]);return(i,p)=>(m(),v(t(ct),{component:t(n),subtitle:"Outputs",style:{overflow:"visible"}},{default:l(()=>[g(t(tt),{instance:i.instance,component:t(n),entities:t(e).library.entities,type:"outputs",mirror:!0},null,8,["instance","component","entities"])]),_:1},8,["component"]))}}),z=T({name:"instance",getStoreId:(s,e,n)=>`projects/${s}/composites/${e}/${n}`,create:({storeId:s,id:[e,n,i],logger:p})=>E(s,()=>{const{vueFlowStore:a,nodeFactory:o,onNodesMoved:b}=O("instance",e,n,i),{$client:I}=ot(),{instancesStore:r,stateStore:C}=D(e),d=y(()=>C.stateIdToStateMap.get(n)),u=y(()=>{const c=d.value;return c?r.instances.get(c.instanceId):void 0}),f=async()=>{p.info({projectId:e},"initializing composite instance store");const c=await I.workspace.getCompositeViewport.query({projectId:e,stateId:n});c&&(a.defaultViewport.value=c),p.info({projectId:e,stateId:n},"composite instance store initialized")},w=()=>{const c=u.value;if(!c)throw new Error(`Virtual instance not found for state: ${n}`);const M=o.createNodeFromInstance(c,{type:"inputs"}),x=r.getInstanceChildren(c.id);if(o.createNodesForModels(x,[],{readonly:!0}),c.outputs&&Object.keys(c.outputs).length>0){o.createNodeFromInstance(c,{id:"outputs",type:"outputs",readonly:!0}),o.instanceIdToNodeIdMap.set(c.id,M.id);for(const[R,L]of Object.entries(c.outputs))for(const k of L){const V=r.instances.get(k.instanceId);V&&o.createEdgeForInstanceOutput(V,R,k)}}W(a).then(()=>A(a)).then(()=>a.fitView()).then(()=>G(a,b))},h=H(async c=>{await I.workspace.setCompositeViewport.mutate({projectId:e,stateId:n,viewport:c})},1e3);return a.onViewportChange(h),{initialize:f,placeNodes:w,stateId:n,instanceState:d,instance:u,version:i}})}),lt=S({__name:"CompositeInstanceCanvas",async setup(s){let e,n;const{projectStore:i,instancesStore:p,libraryStore:a}=j(),o=z();return i.initializing?([e,n]=_(()=>q(()=>i.initialized).toBe(!0)),await e,n(),i.addLibraryRoot()):([e,n]=_(()=>i.initialize1()),await e,n(),[e,n]=_(()=>i.initialize2()),await e,n()),[e,n]=_(()=>o.initialize()),await e,n(),at(o.placeNodes),(b,I)=>(m(),v(t(et),{canvasId:["instance",t(i).projectId,t(o).stateId,t(o).version],components:t(a).library.components,entities:t(a).library.entities,"input-resolver-outputs":t(p).inputResolverOutputs,editable:""},{"node-instance":l(r=>[g(t(Q),$(P(r)),null,16)]),"node-inputs":l(r=>[t(o).instance?(m(),v(ut,F({key:0},r,{instance:t(o).instance}),null,16,["instance"])):B("",!0)]),"node-outputs":l(r=>[t(o).instance?(m(),v(dt,F({key:0},r,{instance:t(o).instance,type:"outputs"}),null,16,["instance"])):B("",!0)]),"node-hub":l(r=>[g(t(Z),$(P(r)),null,16)]),"panel-bottom-left":l(()=>[g(t(Y))]),_:1},8,["canvasId","components","entities","input-resolver-outputs"]))}}),mt=X(lt,[["__scopeId","data-v-2e3534bb"]]),ft=S({__name:"CompositeInstanceWrapper",props:{projectId:{},stateId:{},version:{}},setup(s){return O.ensureCreated("instance",s.projectId,s.stateId,s.version),z.ensureCreated(s.projectId,s.stateId,s.version),(e,n)=>(m(),v(mt,{"project-id":e.projectId,"state-id":e.stateId,version:e.version},null,8,["project-id","state-id","version"]))}}),yt={key:1,class:"d-flex justify-center align-center h-100"},vt={class:"text-center"},Ot=S({__name:"index",props:{params:{}},setup(s){const{instancesStore:e,stateStore:n}=J(s.params.projectId),i=y(()=>n.stateIdToStateMap.get(s.params.stateId)),p=y(()=>{const a=i.value;return a?e.instances.get(a.instanceId):void 0});return(a,o)=>(m(),v(t(pt),{"project-id":a.params.projectId,"can-unlock":""},{default:l(()=>[t(i)&&t(p)?(m(),v(t(ft),{key:t(e).evaluationVersion,"project-id":a.params.projectId,"state-id":a.params.stateId,version:t(e).evaluationVersion},null,8,["project-id","state-id","version"])):(m(),it("div",yt,[N("div",vt,[o[0]||(o[0]=N("h3",null,"Instance state not found",-1)),N("p",null,"No instance state found for state ID: "+rt(a.params.stateId),1)])]))]),_:1},8,["project-id"]))}});export{Ot as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ag as j,_ as y,ah as w,f as C}from"#entry";import{P as k}from"./D2hOj9XC.js";import{F as _,r as x,aW as $,j as I,L as c,W as i,X as n,aE as O,aX as S,a1 as f,$ as r,a3 as m,G as t,b as A,aA as M,aL as P,ai as T,a9 as U,af as B,Z as g}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import{a as L,o as V}from"./BQy0v27R.js";import{_ as F,a as N}from"./AV0MK5it.js";import{_ as v}from"./Dj-ZGW1B.js";import"./PZl7tHUC.js";import"./BL-2dw2H.js";import"./Cvl8iHT_.js";const z={class:"d-flex flex-column ga-4"},D={class:"d-flex align-center justify-space-between"},E={class:"text-truncate pr-2",style:{"font-size":"16px","font-weight":"500"}},R={class:"text-caption text-medium-emphasis font-mono text-truncate"},W={class:"d-flex align-center justify-space-between"},X=_({__name:"OperationCard",props:{operation:{},operationsStore:{}},setup(l){const e=x(!1),o=x(!1),a=$("contextMenu"),d=I(()=>!j(l.operation.status)),p=async s=>{a.value&&await a.value.showContextMenu(s)},u=async()=>{if(!(!d.value||o.value)){o.value=!0;try{await l.operationsStore.cancelOperation(l.operation.id),e.value=!1}finally{o.value=!1}}};return(s,h)=>(i(),c("div",null,[n(O,{width:360,class:"operation-card",color:"#2d2d2d",variant:"flat",style:{"border-radius":"4px"},onContextmenu:S(p,["prevent"])},{title:f(()=>[r("div",z,[r("div",D,[r("div",E,m(s.operation.meta.title),1),r("div",R,m(s.operation.id.slice(0,8)),1)]),r("div",W,[n(t(v),{status:s.operation.status,"status-map":t(L)},null,8,["status","status-map"]),n(t(v),{status:s.operation.type,"status-map":t(V)},null,8,["status","status-map"])])])]),_:1}),n(t(F),{ref_key:"contextMenu",ref:a,visible:t(e),"onUpdate:visible":h[0]||(h[0]=b=>A(e)?e.value=b:null),title:s.operation.meta.title,subtitle:s.operation.id},{default:f(()=>[n(M),n(t(N),{title:"Cancel",icon:"mdi-cancel",color:"error",disabled:!t(d)||t(o),loading:t(o),onClick:u},null,8,["disabled","loading"])]),_:1},8,["visible","title","subtitle"])]))}}),G=y(X,[["__scopeId","data-v-ef13af79"]]),Z={class:"d-flex flex-column pl-4 pr-4 gr-4 pt-4 align-center sidebar-container"},q={key:0,class:"d-flex text-disabled text-subtitle-1",style:{"line-height":"1"}},H={key:1,class:"d-flex text-disabled text-subtitle-1",style:{"line-height":"1"}},J={class:"d-flex flex-column gr-4 operation-list-container"},K=_({__name:"OperationList",props:{projectId:{}},async setup(l){let e,o;const a=([e,o]=P(()=>w.async(l.projectId)),e=await e,o(),e),d=async()=>{await a.launchOperation({projectId:l.projectId,meta:{title:`Auto Update ${a.instancesToAutoUpdate.length} instance(s)`,description:"The operation was started by clicking the auto update button in the operation panel."},type:"update",instanceIds:a.instancesToAutoUpdate.map(p=>p.id)})};return(p,u)=>(i(),c("div",Z,[n(T,{"prepend-icon":"mdi-auto-fix",color:"primary",size:"large",width:"360px",disabled:t(a).instancesToAutoUpdate.length===0,title:"Ебанёт?",onClick:d},{default:f(()=>[r("div",null,[u[0]||(u[0]=r("div",{class:"d-flex",style:{"line-height":"1"}},"auto update",-1)),t(a).instancesToAutoUpdate.length>0?(i(),c("div",q,m(t(a).instancesToAutoUpdate.length)+" component(s) ",1)):(i(),c("div",H," nothing to update "))])]),_:1},8,["disabled"]),r("div",J,[(i(!0),c(U,null,B(t(a).operations,s=>(i(),g(G,{key:s.id,operation:s,"operations-store":t(a)},null,8,["operation","operations-store"]))),128))])]))}}),Q=y(K,[["__scopeId","data-v-35c1dff8"]]),Y={key:1,class:"mt-4 text-center text-uppercase text-disabled"},dt=_({__name:"operations",props:{params:{}},setup(l){const e=C();return(o,a)=>t(e).focusedProjectId?(i(),g(t(k),{key:t(e).focusedProjectId,"project-id":t(e).focusedProjectId},{default:f(()=>[n(t(Q),{"project-id":t(e).focusedProjectId},null,8,["project-id"])]),_:1},8,["project-id"])):(i(),c("div",Y,"No active project"))}});export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as n,t as u,s as p}from"#entry";import{_ as f,I as k}from"./
|
|
1
|
+
import{q as n,t as u,s as p}from"#entry";import{_ as f,I as k}from"./CFtPCidf.js";import{S as _}from"./DkPrE8g-.js";import{D as h,a as y}from"./DtufO5Sm.js";import{u as M}from"./BQy0v27R.js";import{_ as I}from"./Dj-ZGW1B.js";import{F as g,aL as l,Z as w,W as C,a1 as r,G as t,X as s}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./DnodTinn.js";const $=g({__name:"[unlockMethodId]",props:{params:{}},async setup(c){let e,a;const{settingsStore:m}=n(),{projectStore:i}=n();i.initializing?([e,a]=l(()=>p(()=>i.initialized).toBe(!0)),await e,a(),i.addLibraryRoot()):([e,a]=l(()=>i.initialize1()),await e,a(),[e,a]=l(()=>i.initialize2()),await e,a());const o=([e,a]=l(()=>m.getUnlockMethodDetails(c.params.unlockMethodId)),e=await e,a(),e);if(!o)throw u({statusCode:404,statusMessage:"Unlock Method not found"});const d=[{key:"unlockMethodId",label:"Unlock Method ID"},{key:"type",label:"Type"},{key:"createdAt",label:"Created"}];return(b,D)=>(C(),w(t(h),null,{default:r(()=>[s(_,{meta:t(o).meta,"fallback-icon":"mdi-lock-outline",title:t(o).meta.title||`${t(o).type} Unlock Method`,description:t(o).meta.description},null,8,["meta","title","description"]),s(t(y),{title:"Unlock Method Details",items:d},{"item.unlockMethodId":r(()=>[s(t(k),{value:t(o).id},null,8,["value"])]),"item.type":r(()=>[s(t(I),{status:t(o).type,"status-map":t(M)},null,8,["status","status-map"])]),"item.createdAt":r(()=>[s(t(f),{value:t(o).createdAt},null,8,["value"])]),_:1})]),_:1}))}});export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as k,t as j,s as C,n as S}from"#entry";import{I as b,_ as D}from"./
|
|
1
|
+
import{q as k,t as j,s as C,n as S}from"#entry";import{I as b,_ as D}from"./CFtPCidf.js";import{S as $}from"./DkPrE8g-.js";import{D as L,a as M}from"./DtufO5Sm.js";import{_}from"./RJCesp1_.js";import{_ as A}from"./DpCgGkMV.js";import{S as U,b as v}from"./ByQEjDj-.js";import{w as W}from"./BQy0v27R.js";import{_ as z}from"./Dj-ZGW1B.js";import{_ as T,a as x}from"./D-IcYK3n.js";import{F as h,aO as w,av as f,Z as I,W as P,G as e,a1 as l,$ as B,X as r,aP as E,a2 as H,a3 as V,aL as y,aM as N}from"./CJ9AjueP.js";import"./BmhnSWN5.js";import"./PZl7tHUC.js";import"./DnodTinn.js";import"./BOoETPDV.js";const F={class:"d-flex justify-end gap-1"},q=h({__name:"WorkerVersionsTable",props:w({projectId:{},workerId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:w(["viewLogs"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(d,{emit:o}){const n=o,g=f(d,"search"),m=f(d,"sortBy"),i=f(d,"page"),c=f(d,"itemsPerPage"),t=[{title:"Status",key:"status",sortable:!1},v.name,v.id,{title:"Digest",key:"digest",sortable:!1},{title:"Enabled",key:"enabled",sortable:!1},v.createdAt,v.actions];return(p,s)=>(P(),I(e(U),{search:g.value,"onUpdate:search":s[0]||(s[0]=a=>g.value=a),"sort-by":m.value,"onUpdate:sortBy":s[1]||(s[1]=a=>m.value=a),page:i.value,"onUpdate:page":s[2]||(s[2]=a=>i.value=a),"items-per-page":c.value,"onUpdate:itemsPerPage":s[3]||(s[3]=a=>c.value=a),headers:t,data:p.data,loading:p.loading,"hide-header":p.hideHeader,height:p.height},{"item.status":l(({item:a})=>[r(e(z),{status:a.status,"status-map":e(W)},null,8,["status","status-map"])]),"item.digest":l(({item:a})=>[r(e(b),{value:a.digest,truncate:!0,"copy-full-text":"Copy full digest"},null,8,["value"])]),"item.enabled":l(({item:a})=>[r(E,{size:"small",color:a.enabled?"success":"secondary",class:"text-uppercase"},{default:l(()=>[H(V(a.enabled?"Enabled":"Disabled"),1)]),_:2},1032,["color"])]),"item.actions":l(({item:a})=>[B("div",F,[r(e(T),{"page-name":"settings.worker-version-details","page-params":{projectId:p.projectId,workerId:p.workerId,versionId:a.id}},null,8,["page-params"]),r(e(x),{icon:"mdi-console",tooltip:"View Logs",variant:"text",size:"small",onClick:u=>n("viewLogs",a.id)},null,8,["onClick"])])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}}),G={class:"text-body-2"},le=h({__name:"[workerId]",props:{params:{}},async setup(d){let o,n;const{settingsStore:g}=k(),{projectStore:m}=k();m.initializing?([o,n]=y(()=>C(()=>m.initialized).toBe(!0)),await o,n(),m.addLibraryRoot()):([o,n]=y(()=>m.initialize1()),await o,n(),[o,n]=y(()=>m.initialize2()),await o,n());const i=([o,n]=y(()=>g.getWorkerDetails(d.params.workerId)),o=await o,n(),o);if(!i)throw j({statusCode:404,statusMessage:"Worker not found"});const c=[{key:"workerId",label:"Worker ID"},{key:"identity",label:"Identity"},{key:"serviceAccount",label:"Service Account"},{key:"createdAt",label:"Created"}],t=g.versionsForWorker(d.params.workerId);t.load();const p=s=>{S({name:"worker-version-logs",params:{projectId:d.params.projectId,workerVersionId:s}})};return(s,a)=>(P(),I(e(L),null,{default:l(()=>[r($,{meta:e(i).meta,"fallback-icon":"mdi-progress-wrench",title:e(i).meta.title||e(i).identity,description:e(i).meta.description},null,8,["meta","title","description"]),r(e(M),{title:"Worker Details",items:c},{"item.workerId":l(()=>[r(e(b),{value:e(i).id},null,8,["value"])]),"item.identity":l(()=>[B("div",G,V(e(i).identity),1)]),"item.serviceAccount":l(()=>[r(e(A),{item:e(i)},null,8,["item"])]),"item.createdAt":l(()=>[r(e(D),{value:e(i).createdAt},null,8,["value"])]),_:1}),r(N,{elevation:0},{default:l(()=>[r(e(_),{title:"Worker Versions",icon:"mdi-source-branch",count:e(t).data.value.total},{default:l(()=>[r(e(q),{search:e(t).search.value,"onUpdate:search":a[0]||(a[0]=u=>e(t).search.value=u),"sort-by":e(t).sortBy.value,"onUpdate:sortBy":a[1]||(a[1]=u=>e(t).sortBy.value=u),page:e(t).page.value,"onUpdate:page":a[2]||(a[2]=u=>e(t).page.value=u),"items-per-page":e(t).itemsPerPage.value,"onUpdate:itemsPerPage":a[3]||(a[3]=u=>e(t).itemsPerPage.value=u),"project-id":s.params.projectId,"worker-id":s.params.workerId,data:e(t).data.value,loading:e(t).isLoading.value,"hide-header":!0,onViewLogs:p},null,8,["search","sort-by","page","items-per-page","project-id","worker-id","data","loading"])]),_:1},8,["count"])]),_:1})]),_:1}))}});export{le as default};
|