@highstate/designer 0.9.21 → 0.9.23
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/{DEkEne1_.js → B0DwtIiW.js} +1 -1
- package/.output/public/_nuxt/{CEFQZJTy.js → B189csPj.js} +1 -1
- package/.output/public/_nuxt/{BElWqKFK.js → B5Eo-Ujz.js} +1 -1
- package/.output/public/_nuxt/{Ccxf70XJ.js → B5LlFtQf.js} +1 -1
- package/.output/public/_nuxt/{CmuRgu4O.js → B9mqi9z7.js} +1 -1
- package/.output/public/_nuxt/{BwzWClQo.js → B9t6gCA0.js} +1 -1
- package/.output/public/_nuxt/{K7mdFSQD.js → BF7lERe4.js} +1 -1
- package/.output/public/_nuxt/{DqHZqf4r.js → BIUo-Bxf.js} +1 -1
- package/.output/public/_nuxt/{BG77JRvd.js → BIaCZ37Q.js} +1 -1
- package/.output/public/_nuxt/{DUPtXNCV.js → BR84xh6o.js} +1 -1
- package/.output/public/_nuxt/{un-_PcAo.js → BRz27G3j.js} +1 -1
- package/.output/public/_nuxt/{Dvr3wuZa.js → BTHtjCvv.js} +1 -1
- package/.output/public/_nuxt/{SAlV5_cT.js → BWTftWoG.js} +1 -1
- package/.output/public/_nuxt/{DRzHUuts.js → BdBhgVvK.js} +1 -1
- package/.output/public/_nuxt/{D5PsJ332.js → BflOb3zh.js} +1 -1
- package/.output/public/_nuxt/{DljtJUzO.js → BjfuCvsP.js} +1 -1
- package/.output/public/_nuxt/{pGIbX2RQ.js → BkGCFSTP.js} +1 -1
- package/.output/public/_nuxt/{DlgqOs51.js → Bkak_ypl.js} +40 -40
- package/.output/public/_nuxt/{DUcPQWXO.js → BoC8E-T9.js} +1 -1
- package/.output/public/_nuxt/{CKzYRRNc.js → BpPu1KhW.js} +1 -1
- package/.output/public/_nuxt/{DCUYnw8H.js → BuEUFExJ.js} +1 -1
- package/.output/public/_nuxt/{rmtV6Y0T.js → Bv2mtDTo.js} +1 -1
- package/.output/public/_nuxt/{BVAgVeex.js → BvMxGlog.js} +1 -1
- package/.output/public/_nuxt/{CTv1udg1.js → BxRWCLFh.js} +1 -1
- package/.output/public/_nuxt/{CwG_vXR4.js → Bzy3U_4D.js} +1 -1
- package/.output/public/_nuxt/{CYlq2lca.js → C2OahqVS.js} +1 -1
- package/.output/public/_nuxt/{DdEkqLVb.js → C2nQTzN4.js} +1 -1
- package/.output/public/_nuxt/{CqQ7SoEc.js → C4_hyZfA.js} +1 -1
- package/.output/public/_nuxt/{DRbOBnYP.js → C53Fxxsk.js} +1 -1
- package/.output/public/_nuxt/{BhSkG2vO.js → CCWo5rW7.js} +1 -1
- package/.output/public/_nuxt/{DIndX_i2.js → CPa4tq4x.js} +1 -1
- package/.output/public/_nuxt/{BJKzranL.js → CW46IvFj.js} +1 -1
- package/.output/public/_nuxt/{cf-ossUw.js → CWazJ566.js} +1 -1
- package/.output/public/_nuxt/{pD_CwtY4.js → CcdbamqU.js} +1 -1
- package/.output/public/_nuxt/{DlUEcgLY.js → CdAJz8Zf.js} +1 -1
- package/.output/public/_nuxt/{Dp61CxCP.js → CgrnwBjj.js} +1 -1
- package/.output/public/_nuxt/{16S73JW8.js → ChL5CFGQ.js} +1 -1
- package/.output/public/_nuxt/{DLPcFaxm.js → ChgcJmVR.js} +1 -1
- package/.output/public/_nuxt/{4xMt1p0i.js → CxOwNk56.js} +1 -1
- package/.output/public/_nuxt/{BZHZ48I0.js → Cz0mhusi.js} +1 -1
- package/.output/public/_nuxt/{Ct0zHWLj.js → D8BPl5Ng.js} +1 -1
- package/.output/public/_nuxt/{Cl-6nwYp.js → DATYi_ZW.js} +1 -1
- package/.output/public/_nuxt/{30BaVrUW.js → DGGZlK_j.js} +1 -1
- package/.output/public/_nuxt/{CRUo-mN3.js → DKuR9WtZ.js} +1 -1
- package/.output/public/_nuxt/{C6uyQOiX.js → DcuosykK.js} +1 -1
- package/.output/public/_nuxt/{CIUVrxWu.js → DeoaNYc1.js} +1 -1
- package/.output/public/_nuxt/{D2m36GEB.js → DeupYvpN.js} +1 -1
- package/.output/public/_nuxt/{DJF4kszA.js → Dfmtf7xs.js} +1 -1
- package/.output/public/_nuxt/{CmFtdvwG.js → DgGsslqu.js} +1 -1
- package/.output/public/_nuxt/{CoKQIzln.js → DoW4m9dD.js} +1 -1
- package/.output/public/_nuxt/{CFUixvV0.js → DoodpQpa.js} +1 -1
- package/.output/public/_nuxt/{DwnIsmZ-.js → DqjoH-x_.js} +1 -1
- package/.output/public/_nuxt/{ngiZ_K3q.js → DqrkUst7.js} +1 -1
- package/.output/public/_nuxt/{KGX_yR9z.js → DrqQhYAT.js} +1 -1
- package/.output/public/_nuxt/{B3nLPexT.js → EPq4mQZK.js} +1 -1
- package/.output/public/_nuxt/{DKH4orv1.js → EozEqmut.js} +1 -1
- package/.output/public/_nuxt/{asZV6334.js → Jx-0SCro.js} +1 -1
- package/.output/public/_nuxt/{DMGzSUEV.js → K9ySVciZ.js} +1 -1
- package/.output/public/_nuxt/{DSvoz_Rr.js → LfqdzYdw.js} +1 -1
- package/.output/public/_nuxt/{uwIuMFjJ.js → LzkmrMfu.js} +1 -1
- package/.output/public/_nuxt/{0vdwhauO.js → TwvQJIWC.js} +1 -1
- package/.output/public/_nuxt/{Ca9HO25U.js → V5hR3Nor.js} +1 -1
- package/.output/public/_nuxt/{B0nz2Zze.js → b-Mr8ypy.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/59532fa9-bbe6-423e-8fdc-69d5821c94aa.json +1 -0
- package/.output/public/_nuxt/{B5zoSt72.js → f9NuEumg.js} +1 -1
- package/.output/public/_nuxt/{graph-resolver-r_0JlXH_.js → graph-resolver-3Wc6wUO6.js} +40 -40
- package/.output/public/_nuxt/{_4xG4Sg4.js → iZKo0eie.js} +1 -1
- package/.output/server/index.mjs +1214 -1214
- package/package.json +5 -5
- package/.output/public/_nuxt/builds/meta/c2b04ef2-f7ef-48dc-aa48-5d4dfa26c410.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{V as vt}from"./
|
|
1
|
+
import{V as vt}from"./DoW4m9dD.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"./Bkak_ypl.js";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"./B9WOzG0F.js";import"./BIUo-Bxf.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{aU as V,aV as $,aW as B,aB as C,aX as A,s as x,l as K,z as L,B as U,au as k,q as G,aY as q,v as O,k as W}from"./
|
|
1
|
+
import{aU as V,aV as $,aW as B,aB as C,aX as A,s as x,l as K,z as L,B as U,au as k,q as G,aY as q,v as O,k as W}from"./Bkak_ypl.js";import"./SQImb3Xm.js";import{_ as X,a as J,b as Y}from"./BR84xh6o.js";import{a as Z,g as Q,i as ee}from"./oZs8U75K.js";import{a as te,G as ne}from"./K9ySVciZ.js";import{F,Z as P,W as S,aE as oe,a1 as g,$ as ae,X as v,u as re,aL as _,J as ie,G as p,ak as M,al as R}from"./B9WOzG0F.js";import{P as se}from"./DcuosykK.js";import"./0A0GXgOL.js";import"./CcdbamqU.js";import"./B9mqi9z7.js";import"./BoC8E-T9.js";import"./B9t6gCA0.js";import"./B189csPj.js";import"./DoW4m9dD.js";import"./DoodpQpa.js";const ue=F({__name:"ExtraElementPanel",setup(I){const i=c=>{Z(c.dataTransfer)};return(c,n)=>(S(),P(oe,null,{default:g(()=>[ae("div",{draggable:"true",style:{cursor:"grab"},onDragstart:i},[v(te)],32)]),_:1}))}}),T=V({name:"project-panel",getStoreId:I=>`projects/${I}/panel`,create:({storeId:I,id:[i],logger:c})=>$(I,()=>{const{instancesStore:n}=B(i),{vueFlowStore:u,nodeFactory:a,onHubMoved:w,onInstanceMoved:h,onHubNodeDeleted:j,onInstanceNodeDeleted:l,onNodesMoved:f}=C("project",i),{$client:d}=re(),y=A(async e=>{await d.workspace.setProjectViewport.mutate({projectId:i,viewport:e})},1e3);u.onViewportChange(y);const H=async()=>{K.info({projectId:i},"initializing project panel store");const e=await d.workspace.getProjectViewport.query({projectId:i});e&&(u.defaultViewport.value=e)},N=async()=>{a.createNodesForModels(n.getProjectInstances(),[...n.hubs.values()]),L(u).then(()=>U(u,f))};h(e=>{n.patchInstance(e,["position"])}),w(e=>{n.patchHub(e,["position"])}),j(e=>{n.deleteHub(e.data.hub,!e.data.blueprint)}),l(e=>{n.deleteInstance(e.data.instance,!e.data.blueprint)});const D=e=>{const{inputInstance:t,outputInstance:o,inputHub:r,outputHub:s,outputKey:b,inputKey:m}=k(u,e);if(t&&o)return n.addInstanceInput(t,m,{instanceId:o.id,output:b});if(s&&t&&m)return n.addInstanceHubInput(t,m,{hubId:s.id});if(s&&t)return n.addInstanceInjectionInput(t,{hubId:s.id});if(o&&r)return n.addHubInput(r,{instanceId:o.id,output:b});if(s&&r)return n.addHubInjectionInput(r,{hubId:s.id});throw c.error({msg:"unexpected connection while adding",connection:e,inputInstance:t,outputInstance:o,inputHub:r,outputHub:s,outputKey:b,inputKey:m}),new Error("Invalid connection")},z=e=>{const{inputInstance:t,outputInstance:o,inputHub:r,outputHub:s,outputKey:b,inputKey:m}=k(u,e);if(t&&o)return n.removeInstanceInput(t,m,{instanceId:o.id,output:b});if(s&&t&&m)return n.removeInstanceHubInput(t,m,{hubId:s.id});if(s&&t)return n.removeInstanceInjectionInput(t,{hubId:s.id});if(o&&r)return n.removeHubInput(r,{instanceId:o.id,output:b});if(s&&r)return n.removeHubInjectionInput(r,{hubId:s.id});throw c.error({msg:"unexpected connection while removing",edge:e,inputInstance:t,outputInstance:o,inputHub:r,outputHub:s,outputKey:b,inputKey:m}),new Error("Invalid connection")};u.onConnect(D);let E=!1;return u.onEdgeUpdate(async({edge:e,connection:t})=>{E=!0,await z(e),await D(t)}),u.onEdgeUpdateEnd(async({edge:e})=>{try{if(E)return;await z(e)}finally{E=!1}}),n.onInstanceInputAdded(({instance:e,inputName:t,input:o})=>{a.createEdgeForInstanceInput(e,t,o)}),n.onInstanceHubInputAdded(({instance:e,inputName:t,input:o})=>{a.createEdgeForInstanceHubInput(e,t,o)}),n.onInstanceInjectionInputAdded(({instance:e,input:t})=>{a.createEdgeForInstanceInjectionInput(e,t)}),n.onHubInputAdded(({hub:e,input:t})=>{a.createEdgeForHubInput(e,t)}),n.onHubInjectionInputAdded(({hub:e,input:t})=>{a.createEdgeForHubInjectionInput(e,t)}),n.onInstanceInputRemoved(({instance:e,inputName:t,input:o})=>{a.removeEdgeForInstanceInput(e,t,o)}),n.onInstanceHubInputRemoved(({instance:e,inputName:t,input:o})=>{a.removeEdgeForInstanceHubInput(e,t,o)}),n.onInstanceInjectionInputRemoved(({instance:e,input:t})=>{a.removeEdgeForInstanceInjectionInput(e,t)}),n.onHubInputRemoved(({hub:e,input:t})=>{a.removeEdgeForHubInput(e,t)}),n.onHubInjectionInputRemoved(({hub:e,input:t})=>{a.removeEdgeForHubInjectionInput(e,t)}),n.onInstanceNameChanged(({oldId:e,newId:t})=>{const o=a.instanceIdToNodeIdMap.get(e);a.instanceIdToNodeIdMap.set(t,o),a.instanceIdToNodeIdMap.delete(e),u.updateNodeData(o,{})}),n.onInstanceCreated(async({instance:e,blueprint:t})=>{const o=a.createNodeFromInstance(e,{blueprint:t});await x(u.areNodesInitialized).toBe(!0),t||u.updateNode(o.id,r=>{const s={x:r.position.x-r.dimensions.width/2,y:r.position.y-r.dimensions.height/2};return e.position=s,{position:s}})}),n.onHubCreated(async({hub:e,blueprint:t})=>{a.createNodeFromHub(e,{blueprint:t}),await x(u.areNodesInitialized).toBe(!0),t||u.updateNode(e.id,o=>{const r={x:o.position.x-o.dimensions.width/2,y:o.position.y-o.dimensions.height/2};return e.position=r,{position:r}})}),{initialize:H,placeNodes:N}})}),ce=F({__name:"ProjectCanvas",async setup(I){let i,c;const n=C(),u=T(),{projectStore:a,instancesStore:w,libraryStore:h}=G();a.initializing?([i,c]=_(()=>x(()=>a.initialized).toBe(!0)),await i,c(),a.addLibraryRoot()):([i,c]=_(()=>a.initialize1()),await i,c(),[i,c]=_(()=>a.initialize2()),await i,c()),[i,c]=_(()=>u.initialize()),await i,c(),ie(u.placeNodes);const j=l=>{if(l.preventDefault(),!l.dataTransfer||n.blueprint)return;let f;const d=Q(l.dataTransfer);if(d){const y=w.getNextInstanceName(d),H=q(d,y),N=h.library.components[d];f={boundary:{width:360,height:260},instances:[{id:H,name:y,type:d,kind:N.kind,position:{x:0,y:0}}],hubs:[]}}else if(ee(l.dataTransfer))f={boundary:{width:74,height:74},instances:[],hubs:[{id:O.createId(),position:{x:0,y:0}}]};else return;n.blueprint=f};return(l,f)=>(S(),P(p(ne),{canvasId:["project",p(a).projectId],components:p(h).library.components,entities:p(h).library.entities,"input-resolver-outputs":p(w).inputResolverOutputs,editable:"",onDragover:j},{"node-instance":g(d=>[v(p(Y),M(R(d)),null,16)]),"node-hub":g(d=>[v(p(J),M(R(d)),null,16)]),"panel-bottom-left":g(()=>[v(p(X))]),"panel-bottom-right":g(()=>[v(p(ue))]),_:1},8,["canvasId","components","entities","input-resolver-outputs"]))}}),Ne=F({__name:"index",props:{params:{}},setup(I){return W(I.params.projectId),C.ensureCreated("project",I.params.projectId),T.ensureCreated(I.params.projectId),(i,c)=>(S(),P(p(se),{"project-id":i.params.projectId,"can-unlock":""},{default:g(()=>[v(p(ce))]),_:1},8,["project-id"]))}});export{Ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as n,t as g,s as p}from"./
|
|
1
|
+
import{q as n,t as g,s as p}from"./Bkak_ypl.js";import{S as u,_,I as f}from"./BIUo-Bxf.js";import{D as y,a as I}from"./C2nQTzN4.js";import{F as b,aL as s,Z as w,W as C,a1 as o,G as e,X as l,$ as D,a3 as h}from"./B9WOzG0F.js";import"./SQImb3Xm.js";import"./0A0GXgOL.js";import"./B9mqi9z7.js";import"./PcM58xPJ.js";const k={class:"text-body-2"},j=b({__name:"[triggerId]",props:{params:{}},async setup(m){let t,a;const{settingsStore:d}=n(),{projectStore:r}=n();r.initializing?([t,a]=s(()=>p(()=>r.initialized).toBe(!0)),await t,a(),r.addLibraryRoot()):([t,a]=s(()=>r.initialize1()),await t,a(),[t,a]=s(()=>r.initialize2()),await t,a());const i=([t,a]=s(()=>d.getTriggerDetails(m.params.triggerId)),t=await t,a(),t);if(!i)throw g({statusCode:404,statusMessage:"Trigger not found"});const c=[{key:"triggerId",label:"Trigger ID"},{key:"name",label:"Name"},{key:"createdAt",label:"Created"}];return(S,T)=>(C(),w(e(y),null,{default:o(()=>[l(u,{meta:e(i).meta,"fallback-icon":"mdi-lightning-bolt",title:e(i).meta.title||e(i).name||"Unnamed Trigger",description:e(i).meta.description},null,8,["meta","title","description"]),l(e(I),{title:"Trigger Details",items:c},{"item.triggerId":o(()=>[l(e(f),{value:e(i).id},null,8,["value"])]),"item.name":o(()=>[D("div",k,h(e(i).name||"N/A"),1)]),"item.createdAt":o(()=>[l(e(_),{value:e(i).createdAt},null,8,["value"])]),_:1})]),_:1}))}});export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as y}from"./
|
|
1
|
+
import{q as y}from"./Bkak_ypl.js";import{_ as g}from"./TwvQJIWC.js";import{E as k}from"./BF7lERe4.js";import{F as I,j as m,Z as s,W as o,G as l,aP as p,a1 as a,a2 as r,X as d,a0 as f}from"./B9WOzG0F.js";const C=I({__name:"InstanceRefChip",props:{item:{}},setup(c){const{instancesStore:t,libraryStore:e,stateStore:_}=y(),i=m(()=>{const n=_.stateIdToStateMap.get(c.item.stateId);return n?t.instances.get(n.instanceId):null}),u=m(()=>i.value?e.library.components[i.value.type]?.meta??null:null),v=m(()=>i.value?{title:i.value.name,icon:u.value?.icon,iconColor:u.value?.iconColor}:null);return(n,b)=>(o(),s(l(k),{id:n.item.stateId,meta:l(v),"fallback-icon":"mdi-cube-outline","page-name":"settings.instance-details","page-params":{stateId:n.item.stateId}},null,8,["id","meta","page-params"]))}}),V=I({__name:"OwnerRefChip",props:{item:{}},setup(c){return(t,e)=>t.item.stateId?(o(),s(l(C),{key:0,item:{stateId:t.item.stateId}},null,8,["item"])):t.item.serviceAccountId?(o(),s(l(g),{key:1,item:{serviceAccountId:t.item.serviceAccountId,serviceAccountMeta:t.item.serviceAccountMeta}},null,8,["item"])):t.item.systemName?(o(),s(p,{key:2,color:"info",variant:"flat",size:"small",class:"font-weight-bold"},{prepend:a(()=>[d(f,{class:"mr-1"},{default:a(()=>e[0]||(e[0]=[r("mdi-crown")])),_:1,__:[0]})]),default:a(()=>[e[1]||(e[1]=r(" system "))]),_:1,__:[1]})):(o(),s(p,{key:3,color:"secondary",variant:"flat",size:"small",class:"font-weight-bold"},{prepend:a(()=>[d(f,{class:"mr-1"},{default:a(()=>e[2]||(e[2]=[r("mdi-help-circle")])),_:1,__:[2]})]),default:a(()=>[e[3]||(e[3]=r(" unknown "))]),_:1,__:[3]}))}});export{V as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aT as P}from"./
|
|
1
|
+
import{aT as P}from"./Bkak_ypl.js";import{F,H as y,C as S,j as m,O as H,w as g,r as j,J as I,n as N}from"./B9WOzG0F.js";var T=Object.defineProperty,W=Object.defineProperties,z=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,b=(e,t,a)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,h=(e,t)=>{for(var a in t||(t={}))A.call(t,a)&&b(e,a,t[a]);if(V)for(var a of V(t))B.call(t,a)&&b(e,a,t[a]);return e},J=(e,t)=>W(e,z(t));const _={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}};function q(e,t){const a=m(()=>{const{width:r,height:i}=e;return J(h({},_.wrapper),{width:r,height:i})}),l=m(()=>h(h({},_.fullWidth),!t.value&&_.hide));return{wrapperStyle:a,containerStyle:l}}function G(){const e=S(P.__getMonacoInstance()),t=j(!1);let a;return I(()=>{e.value||(a=P.init(),a.then(r=>e.value=r).catch(r=>{r?.type!=="cancelation"&&(t.value=!0,console.error("Monaco initialization error:",r))}))}),{monacoRef:e,unload:()=>a?.cancel(),isLoadFailed:t}}function $(e){return typeof e=="function"?e():e}function M(e){return e===void 0}function L(e,t,a,l){return K(e,l)||Q(e,t,a,l)}function K(e,t){return e.editor.getModel(k(e,t))}function Q(e,t,a,l){return e.editor.createModel(t,a,l?k(e,l):void 0)}function k(e,t){return e.Uri.parse(t)}var X=Object.defineProperty,E=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,C=(e,t,a)=>t in e?X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,R=(e,t)=>{for(var a in t||(t={}))Y.call(t,a)&&C(e,a,t[a]);if(E)for(var a of E(t))Z.call(t,a)&&C(e,a,t[a]);return e};const ee={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"};var ue=F({name:"VueMonacoEditor",model:{prop:"value",event:"update:value"},props:{defaultValue:String,defaultPath:String,defaultLanguage:String,value:String,language:String,path:String,theme:{type:String,default:"vs"},line:Number,options:{type:Object,default:()=>({})},overrideServices:{type:Object,default:()=>({})},saveViewState:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:String},emits:["update:value","beforeMount","mount","change","validate"],setup(e,t){const a=new Map,l=S(null),{monacoRef:r,unload:i,isLoadFailed:o}=G(),{editorRef:n}=te(t,e,r,l),{disposeValidator:v}=ae(t,e,r,n),s=m(()=>!!r.value&&!!n.value),{wrapperStyle:d,containerStyle:O}=q(e,s);return H(()=>{var u,c;(u=v.value)==null||u.call(v),n.value?((c=n.value.getModel())==null||c.dispose(),n.value.dispose()):i()}),g([()=>e.path,()=>e.value,()=>e.language,()=>e.line],([u,c,p,f],[w,re,U,x])=>{if(s.value){if(u!==w){const D=L(r.value,c||e.defaultValue||"",p||e.defaultLanguage||"",u||e.defaultPath||"");e.saveViewState&&a.set(w,n.value.saveViewState()),n.value.setModel(D),e.saveViewState&&n.value.restoreViewState(a.get(u)),M(f)||n.value.revealLine(f);return}n.value.getValue()!==c&&n.value.setValue(c),p!==U&&r.value.editor.setModelLanguage(n.value.getModel(),p),!M(f)&&f!==x&&n.value.revealLine(f)}}),g(()=>e.options,u=>n.value&&n.value.updateOptions(u),{deep:!0}),g(()=>e.theme,u=>r.value&&r.value.editor.setTheme(u)),{containerRef:l,isEditorReady:s,isLoadFailed:o,wrapperStyle:d,containerStyle:O}},render(){const{$slots:e,isEditorReady:t,isLoadFailed:a,wrapperStyle:l,containerStyle:r,className:i}=this;return y("div",{style:l},[!t&&y("div",{style:ee},a?e.failure?$(e.failure):"load failed":e.default?$(e.default):"loading..."),y("div",{ref:"containerRef",key:"monaco_editor_container",style:r,class:i})])}});function te({emit:e},t,a,l){const r=S(null);I(()=>{const o=g(a,()=>{l.value&&a.value&&(N(()=>o()),i())},{immediate:!0})});function i(){var o;if(!l.value||!a.value||r.value)return;e("beforeMount",a.value);const n=t.path||t.defaultPath,v=L(a.value,t.value||t.defaultValue||"",t.language||t.defaultLanguage||"",n||"");r.value=a.value.editor.create(l.value,R({model:v,theme:t.theme,automaticLayout:!0,autoIndent:"brackets",formatOnPaste:!0,formatOnType:!0},t.options),t.overrideServices),(o=r.value)==null||o.onDidChangeModelContent(s=>{const d=r.value.getValue();d!==t.value&&(e("update:value",d),e("change",d,s))}),r.value&&!M(t.line)&&r.value.revealLine(t.line),e("mount",r.value,a.value)}return{editorRef:r}}function ae({emit:e},t,a,l){const r=j(null),i=g([a,l],()=>{if(a.value&&l.value){N(()=>i());const o=a.value.editor.onDidChangeMarkers(n=>{var v,s;const d=(s=(v=l.value)==null?void 0:v.getModel())==null?void 0:s.uri;if(d&&n.find(u=>u.path===d.path)){const u=a.value.editor.getModelMarkers({resource:d});e("validate",u)}});r.value=()=>o?.dispose()}});return{disposeValidator:r}}export{ue as V};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ai as Y,aj as ut}from"./DlgqOs51.js";import{F as je,av as Zt,aX as $e,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"./B9WOzG0F.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 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),$(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 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)=>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 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"./Bkak_ypl.js";import{F as je,av as Zt,aX as $e,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"./B9WOzG0F.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 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),$(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 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)=>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 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
|
|
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(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as h,b as r}from"./
|
|
1
|
+
import{S as h,b as r}from"./ChL5CFGQ.js";import"./Bkak_ypl.js";import{_ as f}from"./DgGsslqu.js";import"./BIUo-Bxf.js";import{_ as y}from"./DGGZlK_j.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"./B9WOzG0F.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{q as n,s as d}from"./
|
|
1
|
+
import{q as n,s as d}from"./Bkak_ypl.js";import"./BIUo-Bxf.js";import{S as u}from"./LzkmrMfu.js";import{_ as m}from"./BWTftWoG.js";import{F as g,aL as c,Z as l,W as v,a1 as A,G as t,X as f}from"./B9WOzG0F.js";import"./SQImb3Xm.js";import"./0A0GXgOL.js";import"./B9mqi9z7.js";import"./PcM58xPJ.js";import"./ChL5CFGQ.js";import"./DGGZlK_j.js";const C=g({__name:"index",async setup(y){let r,s;const{settingsStore:e}=n(),{projectStore:a}=n();return a.initializing?([r,s]=c(()=>d(()=>a.initialized).toBe(!0)),await r,s(),a.addLibraryRoot()):([r,s]=c(()=>a.initialize1()),await r,s(),[r,s]=c(()=>a.initialize2()),await r,s()),e.serviceAccounts.load(),(P,i)=>(v(),l(t(u),{title:"Service Accounts",icon:"mdi-account-circle",description:"Manage the service accounts that provide authentication and authorization for your project."},{default:A(({height:p})=>[f(t(m),{search:t(e).serviceAccounts.search,"onUpdate:search":i[0]||(i[0]=o=>t(e).serviceAccounts.search=o),"sort-by":t(e).serviceAccounts.sortBy,"onUpdate:sortBy":i[1]||(i[1]=o=>t(e).serviceAccounts.sortBy=o),page:t(e).serviceAccounts.page,"onUpdate:page":i[2]||(i[2]=o=>t(e).serviceAccounts.page=o),"items-per-page":t(e).serviceAccounts.itemsPerPage,"onUpdate:itemsPerPage":i[3]||(i[3]=o=>t(e).serviceAccounts.itemsPerPage=o),"project-id":t(a).projectId,data:t(e).serviceAccounts.data,loading:t(e).serviceAccounts.isLoading,height:p},null,8,["search","sort-by","page","items-per-page","project-id","data","loading","height"])]),_:1}))}});export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as y,b as s}from"./
|
|
1
|
+
import{S as y,b as s}from"./ChL5CFGQ.js";import"./Bkak_ypl.js";import{_ as f}from"./DgGsslqu.js";import{I as h}from"./BIUo-Bxf.js";import{_ as P}from"./DGGZlK_j.js";import{F as c,aO as v,av as i,Z as B,W as b,G as o,a1 as d,X as n}from"./B9WOzG0F.js";const j=c({__name:"WorkersTable",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 l=i(r,"search"),p=i(r,"sortBy"),m=i(r,"page"),g=i(r,"itemsPerPage"),u=[s.name,s.id,{key:"identity",title:"Identity"},{key:"owner",title:"Owner"},s.createdAt,s.actions];return(t,a)=>(b(),B(o(y),{search:l.value,"onUpdate:search":a[0]||(a[0]=e=>l.value=e),"sort-by":p.value,"onUpdate:sortBy":a[1]||(a[1]=e=>p.value=e),page:m.value,"onUpdate:page":a[2]||(a[2]=e=>m.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.identity":d(({item:e})=>[n(o(h),{value:e.identity,truncate:!1,"copy-full-text":"Copy full identity"},null,8,["value"])]),"item.owner":d(({item:e})=>[n(o(f),{item:e},null,8,["item"])]),"item.actions":d(({item:e})=>[n(o(P),{"page-name":"settings.worker-details","page-params":{projectId:t.projectId,workerId: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{q as n,s as d}from"./
|
|
1
|
+
import{q as n,s as d}from"./Bkak_ypl.js";import"./BIUo-Bxf.js";import{S as y}from"./LzkmrMfu.js";import{_ as g}from"./DqjoH-x_.js";import{F as l,aL as p,Z as c,W as u,a1 as K,G as e,X as f}from"./B9WOzG0F.js";import"./SQImb3Xm.js";import"./0A0GXgOL.js";import"./B9mqi9z7.js";import"./PcM58xPJ.js";import"./ChL5CFGQ.js";import"./DgGsslqu.js";import"./TwvQJIWC.js";import"./BF7lERe4.js";import"./DGGZlK_j.js";const I=l({__name:"index",async setup(P){let o,r;const{settingsStore:t}=n(),{projectStore:s}=n();return s.initializing?([o,r]=p(()=>d(()=>s.initialized).toBe(!0)),await o,r(),s.addLibraryRoot()):([o,r]=p(()=>s.initialize1()),await o,r(),[o,r]=p(()=>s.initialize2()),await o,r()),t.apiKeys.load(),(_,i)=>(u(),c(e(y),{title:"API Keys",icon:"mdi-key-variant",description:"Manage the API keys that provide programmatic access to your project resources."},{default:K(({height:m})=>[f(e(g),{search:e(t).apiKeys.search,"onUpdate:search":i[0]||(i[0]=a=>e(t).apiKeys.search=a),"sort-by":e(t).apiKeys.sortBy,"onUpdate:sortBy":i[1]||(i[1]=a=>e(t).apiKeys.sortBy=a),page:e(t).apiKeys.page,"onUpdate:page":i[2]||(i[2]=a=>e(t).apiKeys.page=a),"items-per-page":e(t).apiKeys.itemsPerPage,"onUpdate:itemsPerPage":i[3]||(i[3]=a=>e(t).apiKeys.itemsPerPage=a),"project-id":e(s).projectId,data:e(t).apiKeys.data,loading:e(t).apiKeys.isLoading,height:m},null,8,["search","sort-by","page","items-per-page","project-id","data","loading","height"])]),_:1}))}});export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as c,t as g,s as w}from"./
|
|
1
|
+
import{q as c,t as g,s as w}from"./Bkak_ypl.js";import{S as k,_ as u,I as v}from"./BIUo-Bxf.js";import{D as I,a as S}from"./C2nQTzN4.js";import{a as b}from"./gt3opOQe.js";import{_ as x}from"./PcM58xPJ.js";import{F as A,aL as l,Z as d,W as p,a1 as i,G as e,X as s,L as C,aP as D,a2 as O,a3 as z}from"./B9WOzG0F.js";import"./SQImb3Xm.js";import"./0A0GXgOL.js";import"./B9mqi9z7.js";const T={key:1,class:"text-caption text-medium-emphasis"},q=A({__name:"[operationId]",props:{params:{}},async setup(m){let a,r;const{settingsStore:f}=c(),{projectStore:o}=c();o.initializing?([a,r]=l(()=>w(()=>o.initialized).toBe(!0)),await a,r(),o.addLibraryRoot()):([a,r]=l(()=>o.initialize1()),await a,r(),[a,r]=l(()=>o.initialize2()),await a,r());const t=([a,r]=l(()=>f.getOperationDetails(m.params.operationId)),a=await a,r(),a);if(!t)throw g({statusCode:404,statusMessage:"Operation not found"});const y=[{key:"operationId",label:"Operation ID"},{key:"type",label:"Type"},{key:"status",label:"Status"},{key:"startedAt",label:"Started"},{key:"finishedAt",label:"Finished"}],_=n=>{switch(n){case"update":return"mdi-update";case"preview":return"mdi-eye";case"destroy":return"mdi-delete";case"recreate":return"mdi-refresh";case"refresh":return"mdi-refresh";default:return"mdi-cog"}},h=n=>{switch(n){case"update":return"primary";case"preview":return"info";case"destroy":return"error";case"recreate":return"warning";case"refresh":return"success";default:return"grey"}};return(n,B)=>(p(),d(e(I),null,{default:i(()=>[s(k,{meta:e(t).meta,"fallback-icon":"mdi-cog",title:e(t).meta.title||`${e(t).type} Operation`,description:e(t).meta.description},null,8,["meta","title","description"]),s(e(S),{title:"Operation Details",items:y},{"item.operationId":i(()=>[s(e(v),{value:e(t).id},null,8,["value"])]),"item.type":i(()=>[s(D,{color:h(e(t).type),"prepend-icon":_(e(t).type),variant:"flat",size:"small",class:"text-capitalize"},{default:i(()=>[O(z(e(t).type),1)]),_:1},8,["color","prepend-icon"])]),"item.status":i(()=>[s(e(x),{status:e(t).status,"status-map":e(b)},null,8,["status","status-map"])]),"item.startedAt":i(()=>[s(e(u),{value:e(t).startedAt},null,8,["value"])]),"item.finishedAt":i(()=>[e(t).finishedAt?(p(),d(e(u),{key:0,value:e(t).finishedAt},null,8,["value"])):(p(),C("div",T,"Not finished"))]),_:1})]),_:1}))}});export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as C,a_ as L,s as g,a$ as M,q as T,k as z}from"./
|
|
1
|
+
import{g as C,a_ as L,s as g,a$ as M,q as T,k as z}from"./Bkak_ypl.js";import{G as P}from"./BoC8E-T9.js";import{C as _,r as W,u as j,v as h,F as x,aL as f,Z as S,W as A,a1 as D,G as k,X as H}from"./B9WOzG0F.js";import{P as N}from"./DcuosykK.js";import"./SQImb3Xm.js";import"./0A0GXgOL.js";import"./DoodpQpa.js";function G(){return navigator.userAgent.includes("Mac")}function R(a,t){const e=_(null),s=_(null),u=W(!1),{$client:r}=j(),l=C(),w=async d=>{e.value=d;async function i(n,o){if(o==="restart"){if(u.value)return;u.value=!0,e.value.writeln(">>> Restarting terminal session... <<<");const m=await r.terminal.getOrCreateTerminalSession.mutate({projectId:a,terminalId:s.value.terminalId});l.closeTerminalPanel(a,s.value.id),l.openTerminalPanel(a,m.id)}else(G()?n.metaKey:n.ctrlKey)&&window.open(o,"_blank")}const c={activate:(n,o)=>{i(n,o)},hover:(n,o,m)=>{},leave:(n,o,m)=>{},allowNonHttpProtocols:!0},p=new L.WebLinksAddon(i,c);e.value.loadAddon(p),e.value.options.linkHandler=c,await $();const{unsubscribe:v}=r.terminal.watchSession.subscribe({projectId:a,sessionId:t},{onData(n){if(s.value=n,n.finishedAt){const b=`\x1B[1m\x1B[33m${`>>> Terminal session finished at ${new Date(n.finishedAt).toLocaleString("en-US")} <<<`}\x1B[0m`,B="\x1B]8;;restart\x1B\\>>> Click here to restart <<<\x1B]8;;\x1B\\";e.value.writeln(""),e.value.writeln(b),e.value.writeln(B),v()}}});h(v),await g(s).not.toBeNull(),s.value.finishedAt||(y(),e.value.focus())},$=async()=>{const d=await r.terminal.getSessionHistory.query({projectId:a,sessionId:t});for(const i of d)e.value.write(i.content)},y=()=>{const i=`${location.protocol==="https:"?"wss":"ws"}://${location.host}`,c=new WebSocket(`${i}/api/projects/${a}/terminal-sessions/${t}?screenSize=${e.value.cols}x${e.value.rows}`),p=new M.AttachAddon(c);e.value.loadAddon(p),h(()=>c.close())};return{initialize:w,session:s}}const q=x({__name:"TerminalSession",props:{sessionId:{}},async setup(a){let t,e;const{projectStore:s}=T();s.initializing?([t,e]=f(()=>g(()=>s.initialized).toBe(!0)),await t,e(),s.addLibraryRoot()):([t,e]=f(()=>s.initialize1()),await t,e(),[t,e]=f(()=>s.initialize2()),await t,e());const{initialize:u}=R(s.projectId,a.sessionId),r=l=>{u(l)};return(l,w)=>(A(),S(P,{onLoad:r}))}}),Z=x({__name:"[sessionId]",props:{params:{}},setup(a){return z(a.params.projectId),(t,e)=>(A(),S(k(N),{"project-id":t.params.projectId,"can-unlock":""},{default:D(()=>[H(k(q),{"session-id":t.params.sessionId},null,8,["session-id"])]),_:1},8,["project-id"]))}});export{Z as default};
|