diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json new file mode 100644 index 0000000..c5f3675 --- /dev/null +++ b/.obsidian/community-plugins.json @@ -0,0 +1,3 @@ +[ + "git-obsi-sync" +] \ No newline at end of file diff --git a/.obsidian/plugins/git-obsi-sync/data.json b/.obsidian/plugins/git-obsi-sync/data.json new file mode 100644 index 0000000..0b567fa --- /dev/null +++ b/.obsidian/plugins/git-obsi-sync/data.json @@ -0,0 +1,14 @@ +{ + "githubToken": "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", + "githubUsername": "EinsamerWolfDH", + "repoName": "obsidian-hermes", + "autoSync": true, + "syncIntervalMs": 3000, + "excludePatterns": [ + ".obsidian/workspace", + ".obsidian/workspace.json", + ".obsidian/plugins/*/data.json" + ], + "lastSyncTime": 1784804279229, + "commitMessageTemplate": "sync: {{datetime}}" +} \ No newline at end of file diff --git a/.obsidian/plugins/git-obsi-sync/main.js b/.obsidian/plugins/git-obsi-sync/main.js new file mode 100644 index 0000000..10e54ba --- /dev/null +++ b/.obsidian/plugins/git-obsi-sync/main.js @@ -0,0 +1,112 @@ +/* obsidian-multisync */ +var Wu=Object.create;var Ir=Object.defineProperty;var Vu=Object.getOwnPropertyDescriptor;var Xu=Object.getOwnPropertyNames;var Yu=Object.getPrototypeOf,Ku=Object.prototype.hasOwnProperty;var O=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qu=(t,e)=>{for(var r in e)Ir(t,r,{get:e[r],enumerable:!0})},Ja=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Xu(e))!Ku.call(t,n)&&n!==r&&Ir(t,n,{get:()=>e[n],enumerable:!(i=Vu(e,n))||i.enumerable});return t};var Gt=(t,e,r)=>(r=t!=null?Wu(Yu(t)):{},Ja(e||!t||!t.__esModule?Ir(r,"default",{value:t,enumerable:!0}):r,t)),Ju=t=>Ja(Ir({},"__esModule",{value:!0}),t);var ho=O((fg,uo)=>{"use strict";var lt=function(t){if(t=t||{},this.Promise=t.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=t.domainReentrant||!1,this.domainReentrant){if(typeof process=="undefined"||typeof process.domain=="undefined")throw new Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=t.timeout||lt.DEFAULT_TIMEOUT,this.maxOccupationTime=t.maxOccupationTime||lt.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=t.maxExecutionTime||lt.DEFAULT_MAX_EXECUTION_TIME,t.maxPending===1/0||Number.isInteger(t.maxPending)&&t.maxPending>=0?this.maxPending=t.maxPending:this.maxPending=lt.DEFAULT_MAX_PENDING};lt.DEFAULT_TIMEOUT=0;lt.DEFAULT_MAX_OCCUPATION_TIME=0;lt.DEFAULT_MAX_EXECUTION_TIME=0;lt.DEFAULT_MAX_PENDING=1e3;lt.prototype.acquire=function(t,e,r,i){if(Array.isArray(t))return this._acquireBatch(t,e,r,i);if(typeof e!="function")throw new Error("You must pass a function to execute");var n=null,a=null,o=null;typeof r!="function"&&(i=r,r=null,o=new this.Promise(function(v,k){n=v,a=k})),i=i||{};var s=!1,l=null,c=null,f=null,d=this,u=function(v,k,S){c&&(clearTimeout(c),c=null),f&&(clearTimeout(f),f=null),v&&(d.queues[t]&&d.queues[t].length===0&&delete d.queues[t],d.domainReentrant&&delete d.domains[t]),s||(o?k?a(k):n(S):typeof r=="function"&&r(k,S),s=!0),v&&d.queues[t]&&d.queues[t].length>0&&d.queues[t].shift()()},h=function(v){if(s)return u(v);l&&(clearTimeout(l),l=null),d.domainReentrant&&v&&(d.domains[t]=process.domain);var k=i.maxExecutionTime||d.maxExecutionTime;if(k&&(f=setTimeout(function(){d.queues[t]&&u(v,new Error("Maximum execution time is exceeded "+t))},k)),e.length===1){var S=!1;try{e(function(x,T){S||(S=!0,u(v,x,T))})}catch(x){S||(S=!0,u(v,x))}}else d._promiseTry(function(){return e()}).then(function(x){u(v,void 0,x)},function(x){u(v,x)})};d.domainReentrant&&process.domain&&(h=process.domain.bind(h));var m=i.maxPending||d.maxPending;if(!d.queues[t])d.queues[t]=[],h(!0);else if(d.domainReentrant&&process.domain&&process.domain===d.domains[t])h(!1);else if(d.queues[t].length>=m)u(!1,new Error("Too many pending tasks in queue "+t));else{var g=function(){h(!0)};i.skipQueue?d.queues[t].unshift(g):d.queues[t].push(g);var y=i.timeout||d.timeout;y&&(l=setTimeout(function(){l=null,u(!1,new Error("async-lock timed out in queue "+t))},y))}var b=i.maxOccupationTime||d.maxOccupationTime;if(b&&(c=setTimeout(function(){d.queues[t]&&u(!1,new Error("Maximum occupation time is exceeded in queue "+t))},b)),o)return o};lt.prototype._acquireBatch=function(t,e,r,i){typeof r!="function"&&(i=r,r=null);var n=this,a=function(s,l){return function(c){n.acquire(s,l,c,i)}},o=t.reduceRight(function(s,l){return a(l,s)},e);if(typeof r=="function")o(r);else return new this.Promise(function(s,l){o.length===1?o(function(c,f){c?l(c):s(f)}):s(o())})};lt.prototype.isBusy=function(t){return t?!!this.queues[t]:Object.keys(this.queues).length>0};lt.prototype._promiseTry=function(t){try{return this.Promise.resolve(t())}catch(e){return this.Promise.reject(e)}};uo.exports=lt});var wo=O((lg,po)=>{"use strict";po.exports=ho()});var mo=O((ug,cn)=>{typeof Object.create=="function"?cn.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:cn.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Ur=O((fn,yo)=>{var Fr=require("buffer"),$t=Fr.Buffer;function go(t,e){for(var r in t)e[r]=t[r]}$t.from&&$t.alloc&&$t.allocUnsafe&&$t.allocUnsafeSlow?yo.exports=Fr:(go(Fr,fn),fn.Buffer=ee);function ee(t,e,r){return $t(t,e,r)}ee.prototype=Object.create($t.prototype);go($t,ee);ee.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return $t(t,e,r)};ee.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=$t(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};ee.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return $t(t)};ee.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Fr.SlowBuffer(t)}});var _o=O((dg,bo)=>{var ed={}.toString;bo.exports=Array.isArray||function(t){return ed.call(t)=="[object Array]"}});var ye=O((hg,vo)=>{"use strict";vo.exports=TypeError});var ln=O((pg,xo)=>{"use strict";xo.exports=Object});var So=O((wg,Eo)=>{"use strict";Eo.exports=Error});var Ao=O((mg,ko)=>{"use strict";ko.exports=EvalError});var $o=O((gg,To)=>{"use strict";To.exports=RangeError});var Ro=O((yg,Oo)=>{"use strict";Oo.exports=ReferenceError});var un=O((bg,Io)=>{"use strict";Io.exports=SyntaxError});var Co=O((_g,Po)=>{"use strict";Po.exports=URIError});var Do=O((vg,Bo)=>{"use strict";Bo.exports=Math.abs});var Fo=O((xg,No)=>{"use strict";No.exports=Math.floor});var jo=O((Eg,Uo)=>{"use strict";Uo.exports=Math.max});var zo=O((Sg,Mo)=>{"use strict";Mo.exports=Math.min});var Ho=O((kg,Lo)=>{"use strict";Lo.exports=Math.pow});var qo=O((Ag,Go)=>{"use strict";Go.exports=Math.round});var Wo=O((Tg,Zo)=>{"use strict";Zo.exports=Number.isNaN||function(e){return e!==e}});var Xo=O(($g,Vo)=>{"use strict";var rd=Wo();Vo.exports=function(e){return rd(e)||e===0?e:e<0?-1:1}});var Ko=O((Og,Yo)=>{"use strict";Yo.exports=Object.getOwnPropertyDescriptor});var be=O((Rg,Qo)=>{"use strict";var jr=Ko();if(jr)try{jr([],"length")}catch(t){jr=null}Qo.exports=jr});var Xe=O((Ig,Jo)=>{"use strict";var Mr=Object.defineProperty||!1;if(Mr)try{Mr({},"a",{value:1})}catch(t){Mr=!1}Jo.exports=Mr});var dn=O((Pg,ts)=>{"use strict";ts.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[r]=n;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==n||s.enumerable!==!0)return!1}return!0}});var is=O((Cg,rs)=>{"use strict";var es=typeof Symbol!="undefined"&&Symbol,id=dn();rs.exports=function(){return typeof es!="function"||typeof Symbol!="function"||typeof es("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:id()}});var hn=O((Bg,ns)=>{"use strict";ns.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var pn=O((Dg,as)=>{"use strict";var nd=ln();as.exports=nd.getPrototypeOf||null});var cs=O((Ng,ss)=>{"use strict";var ad="Function.prototype.bind called on incompatible ",od=Object.prototype.toString,sd=Math.max,cd="[object Function]",os=function(e,r){for(var i=[],n=0;n{"use strict";var ud=cs();fs.exports=Function.prototype.bind||ud});var zr=O((Ug,ls)=>{"use strict";ls.exports=Function.prototype.call});var Lr=O((jg,us)=>{"use strict";us.exports=Function.prototype.apply});var hs=O((Mg,ds)=>{"use strict";ds.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var wn=O((zg,ps)=>{"use strict";var dd=_e(),hd=Lr(),pd=zr(),wd=hs();ps.exports=wd||dd.call(pd,hd)});var Hr=O((Lg,ws)=>{"use strict";var md=_e(),gd=ye(),yd=zr(),bd=wn();ws.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new gd("a function is required");return bd(md,yd,e)}});var vs=O((Hg,_s)=>{"use strict";var _d=Hr(),ms=be(),ys;try{ys=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var mn=!!ys&&ms&&ms(Object.prototype,"__proto__"),bs=Object,gs=bs.getPrototypeOf;_s.exports=mn&&typeof mn.get=="function"?_d([mn.get]):typeof gs=="function"?function(e){return gs(e==null?e:bs(e))}:!1});var gn=O((Gg,ks)=>{"use strict";var xs=hn(),Es=pn(),Ss=vs();ks.exports=xs?function(e){return xs(e)}:Es?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return Es(e)}:Ss?function(e){return Ss(e)}:null});var Ts=O((qg,As)=>{"use strict";var vd=Function.prototype.call,xd=Object.prototype.hasOwnProperty,Ed=_e();As.exports=Ed.call(vd,xd)});var _n=O((Zg,Cs)=>{"use strict";var N,Sd=ln(),kd=So(),Ad=Ao(),Td=$o(),$d=Ro(),Se=un(),Ee=ye(),Od=Co(),Rd=Do(),Id=Fo(),Pd=jo(),Cd=zo(),Bd=Ho(),Dd=qo(),Nd=Xo(),Is=Function,yn=function(t){try{return Is('"use strict"; return ('+t+").constructor;")()}catch(e){}},Ye=be(),Fd=Xe(),bn=function(){throw new Ee},Ud=Ye?function(){try{return arguments.callee,bn}catch(t){try{return Ye(arguments,"callee").get}catch(e){return bn}}}():bn,ve=is()(),V=gn(),jd=pn(),Md=hn(),Ps=Lr(),Ke=zr(),xe={},zd=typeof Uint8Array=="undefined"||!V?N:V(Uint8Array),re={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?N:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?N:ArrayBuffer,"%ArrayIteratorPrototype%":ve&&V?V([][Symbol.iterator]()):N,"%AsyncFromSyncIteratorPrototype%":N,"%AsyncFunction%":xe,"%AsyncGenerator%":xe,"%AsyncGeneratorFunction%":xe,"%AsyncIteratorPrototype%":xe,"%Atomics%":typeof Atomics=="undefined"?N:Atomics,"%BigInt%":typeof BigInt=="undefined"?N:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?N:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?N:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?N:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":kd,"%eval%":eval,"%EvalError%":Ad,"%Float16Array%":typeof Float16Array=="undefined"?N:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?N:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?N:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?N:FinalizationRegistry,"%Function%":Is,"%GeneratorFunction%":xe,"%Int8Array%":typeof Int8Array=="undefined"?N:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?N:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?N:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ve&&V?V(V([][Symbol.iterator]())):N,"%JSON%":typeof JSON=="object"?JSON:N,"%Map%":typeof Map=="undefined"?N:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!ve||!V?N:V(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Sd,"%Object.getOwnPropertyDescriptor%":Ye,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?N:Promise,"%Proxy%":typeof Proxy=="undefined"?N:Proxy,"%RangeError%":Td,"%ReferenceError%":$d,"%Reflect%":typeof Reflect=="undefined"?N:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?N:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!ve||!V?N:V(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?N:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ve&&V?V(""[Symbol.iterator]()):N,"%Symbol%":ve?Symbol:N,"%SyntaxError%":Se,"%ThrowTypeError%":Ud,"%TypedArray%":zd,"%TypeError%":Ee,"%Uint8Array%":typeof Uint8Array=="undefined"?N:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?N:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?N:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?N:Uint32Array,"%URIError%":Od,"%WeakMap%":typeof WeakMap=="undefined"?N:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?N:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?N:WeakSet,"%Function.prototype.call%":Ke,"%Function.prototype.apply%":Ps,"%Object.defineProperty%":Fd,"%Object.getPrototypeOf%":jd,"%Math.abs%":Rd,"%Math.floor%":Id,"%Math.max%":Pd,"%Math.min%":Cd,"%Math.pow%":Bd,"%Math.round%":Dd,"%Math.sign%":Nd,"%Reflect.getPrototypeOf%":Md};if(V)try{null.error}catch(t){$s=V(V(t)),re["%Error.prototype%"]=$s}var $s,Ld=function t(e){var r;if(e==="%AsyncFunction%")r=yn("async function () {}");else if(e==="%GeneratorFunction%")r=yn("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=yn("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&V&&(r=V(n.prototype))}return re[e]=r,r},Os={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qe=_e(),Gr=Ts(),Hd=Qe.call(Ke,Array.prototype.concat),Gd=Qe.call(Ps,Array.prototype.splice),Rs=Qe.call(Ke,String.prototype.replace),qr=Qe.call(Ke,String.prototype.slice),qd=Qe.call(Ke,RegExp.prototype.exec),Zd=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Wd=/\\(\\)?/g,Vd=function(e){var r=qr(e,0,1),i=qr(e,-1);if(r==="%"&&i!=="%")throw new Se("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new Se("invalid intrinsic syntax, expected opening `%`");var n=[];return Rs(e,Zd,function(a,o,s,l){n[n.length]=s?Rs(l,Wd,"$1"):o||a}),n},Xd=function(e,r){var i=e,n;if(Gr(Os,i)&&(n=Os[i],i="%"+n[0]+"%"),Gr(re,i)){var a=re[i];if(a===xe&&(a=Ld(i)),typeof a=="undefined"&&!r)throw new Ee("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new Se("intrinsic "+e+" does not exist!")};Cs.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Ee("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ee('"allowMissing" argument must be a boolean');if(qd(/^%?[^%]*%?$/,e)===null)throw new Se("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=Vd(e),n=i.length>0?i[0]:"",a=Xd("%"+n+"%",r),o=a.name,s=a.value,l=!1,c=a.alias;c&&(n=c[0],Gd(i,Hd([0,1],c)));for(var f=1,d=!0;f=i.length){var g=Ye(s,u);d=!!g,d&&"get"in g&&!("originalValue"in g.get)?s=g.get:s=s[u]}else d=Gr(s,u),s=s[u];d&&!l&&(re[o]=s)}}return s}});var vn=O((Wg,Ns)=>{"use strict";var Bs=_n(),Ds=Hr(),Yd=Ds([Bs("%String.prototype.indexOf%")]);Ns.exports=function(e,r){var i=Bs(e,!!r);return typeof i=="function"&&Yd(e,".prototype.")>-1?Ds([i]):i}});var Ms=O((Vg,js)=>{"use strict";var Us=Function.prototype.toString,ke=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,En,Zr;if(typeof ke=="function"&&typeof Object.defineProperty=="function")try{En=Object.defineProperty({},"length",{get:function(){throw Zr}}),Zr={},ke(function(){throw 42},null,En)}catch(t){t!==Zr&&(ke=null)}else ke=null;var Kd=/^\s*class\b/,Sn=function(e){try{var r=Us.call(e);return Kd.test(r)}catch(i){return!1}},xn=function(e){try{return Sn(e)?!1:(Us.call(e),!0)}catch(r){return!1}},Wr=Object.prototype.toString,Qd="[object Object]",Jd="[object Function]",th="[object GeneratorFunction]",eh="[object HTMLAllCollection]",rh="[object HTML document.all class]",ih="[object HTMLCollection]",nh=typeof Symbol=="function"&&!!Symbol.toStringTag,ah=!(0 in[,]),kn=function(){return!1};typeof document=="object"&&(Fs=document.all,Wr.call(Fs)===Wr.call(document.all)&&(kn=function(e){if((ah||!e)&&(typeof e=="undefined"||typeof e=="object"))try{var r=Wr.call(e);return(r===eh||r===rh||r===ih||r===Qd)&&e("")==null}catch(i){}return!1}));var Fs;js.exports=ke?function(e){if(kn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{ke(e,null,En)}catch(r){if(r!==Zr)return!1}return!Sn(e)&&xn(e)}:function(e){if(kn(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(nh)return xn(e);if(Sn(e))return!1;var r=Wr.call(e);return r!==Jd&&r!==th&&!/^\[object HTML/.test(r)?!1:xn(e)}});var Hs=O((Xg,Ls)=>{"use strict";var oh=Ms(),sh=Object.prototype.toString,zs=Object.prototype.hasOwnProperty,ch=function(e,r,i){for(var n=0,a=e.length;n=3&&(n=i),uh(e)?ch(e,r,n):typeof e=="string"?fh(e,r,n):lh(e,r,n)}});var qs=O((Yg,Gs)=>{"use strict";Gs.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var Ws=O((Kg,Zs)=>{"use strict";var An=qs(),dh=typeof globalThis=="undefined"?global:globalThis;Zs.exports=function(){for(var e=[],r=0;r{"use strict";var Vs=Xe(),hh=un(),Ae=ye(),Xs=be();Ys.exports=function(e,r,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Ae("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Ae("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ae("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ae("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ae("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ae("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!Xs&&Xs(e,r);if(Vs)Vs(e,r,{configurable:o===null&&l?l.configurable:!o,enumerable:n===null&&l?l.enumerable:!n,value:i,writable:a===null&&l?l.writable:!a});else if(s||!n&&!a&&!o)e[r]=i;else throw new hh("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var tc=O((Jg,Js)=>{"use strict";var Tn=Xe(),Qs=function(){return!!Tn};Qs.hasArrayLengthDefineBug=function(){if(!Tn)return null;try{return Tn([],"length",{value:1}).length!==1}catch(e){return!0}};Js.exports=Qs});var ac=O((ty,nc)=>{"use strict";var ph=_n(),ec=Ks(),wh=tc()(),rc=be(),ic=ye(),mh=ph("%Math.floor%");nc.exports=function(e,r){if(typeof e!="function")throw new ic("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||mh(r)!==r)throw new ic("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,a=!0;if("length"in e&&rc){var o=rc(e,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(a=!1)}return(n||a||!i)&&(wh?ec(e,"length",r,!0,!0):ec(e,"length",r)),e}});var sc=O((ey,oc)=>{"use strict";var gh=_e(),yh=Lr(),bh=wn();oc.exports=function(){return bh(gh,yh,arguments)}});var lc=O((ry,Vr)=>{"use strict";var _h=ac(),cc=Xe(),vh=Hr(),fc=sc();Vr.exports=function(e){var r=vh(arguments),i=1+e.length-(arguments.length-1);return _h(r,i>0?i:0,!0)};cc?cc(Vr.exports,"apply",{value:fc}):Vr.exports.apply=fc});var dc=O((iy,uc)=>{"use strict";var xh=dn();uc.exports=function(){return xh()&&!!Symbol.toStringTag}});var gc=O((ny,mc)=>{"use strict";var Kr=Hs(),Eh=Ws(),hc=lc(),On=vn(),Yr=be(),Xr=gn(),Sh=On("Object.prototype.toString"),wc=dc()(),pc=typeof globalThis=="undefined"?global:globalThis,$n=Eh(),Rn=On("String.prototype.slice"),kh=On("Array.prototype.indexOf",!0)||function(e,r){for(var i=0;i-1?r:r!=="Object"?!1:Th(e)}return Yr?Ah(e):null}});var bc=O((ay,yc)=>{"use strict";var $h=gc();yc.exports=function(e){return!!$h(e)}});var vc=O((oy,_c)=>{"use strict";var Oh=ye(),Rh=vn(),Ih=Rh("TypedArray.prototype.buffer",!0),Ph=bc();_c.exports=Ih||function(e){if(!Ph(e))throw new Oh("Not a Typed Array");return e.buffer}});var Sc=O((sy,Ec)=>{"use strict";var vt=Ur().Buffer,Ch=_o(),Bh=vc(),Dh=ArrayBuffer.isView||function(e){try{return Bh(e),!0}catch(r){return!1}},Nh=typeof Uint8Array!="undefined",xc=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined",Fh=xc&&(vt.prototype instanceof Uint8Array||vt.TYPED_ARRAY_SUPPORT);Ec.exports=function(e,r){if(vt.isBuffer(e))return e.constructor&&!("isBuffer"in e)?vt.from(e):e;if(typeof e=="string")return vt.from(e,r);if(xc&&Dh(e)){if(e.byteLength===0)return vt.alloc(0);if(Fh){var i=vt.from(e.buffer,e.byteOffset,e.byteLength);if(i.byteLength===e.byteLength)return i}var n=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=vt.from(n);if(a.length===e.byteLength)return a}if(Nh&&e instanceof Uint8Array)return vt.from(e);var o=Ch(e);if(o)for(var s=0;s255||~~l!==l)throw new RangeError("Array items must be numbers in the range 0-255.")}if(o||vt.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return vt.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var Ac=O((cy,kc)=>{"use strict";var Uh=Ur().Buffer,jh=Sc();function Jr(t,e){this._block=Uh.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}Jr.prototype.update=function(t,e){t=jh(t,e||"utf8");for(var r=this._block,i=this._blockSize,n=t.length,a=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a};Jr.prototype._update=function(){throw new Error("_update must be implemented by subclass")};kc.exports=Jr});var Oc=O((fy,$c)=>{"use strict";var Mh=mo(),Tc=Ac(),zh=Ur().Buffer,Lh=[1518500249,1859775393,-1894007588,-899497514],Hh=new Array(80);function Je(){this.init(),this._w=Hh,Tc.call(this,64,56)}Mh(Je,Tc);Je.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Gh(t){return t<<1|t>>>31}function qh(t){return t<<5|t>>>27}function Zh(t){return t<<30|t>>>2}function Wh(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}Je.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,o=this._e|0,s=0;s<16;++s)e[s]=t.readInt32BE(s*4);for(;s<80;++s)e[s]=Gh(e[s-3]^e[s-8]^e[s-14]^e[s-16]);for(var l=0;l<80;++l){var c=~~(l/20),f=qh(r)+Wh(c,i,n,a)+o+e[l]+Lh[c]|0;o=a,a=n,n=Zh(i),i=r,r=f}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=o+this._e|0};Je.prototype._hash=function(){var t=zh.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};$c.exports=Je});var Ic=O(In=>{var Rc;(function(t){typeof DO_NOT_EXPORT_CRC=="undefined"?typeof In=="object"?t(In):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(Rc={}):t(Rc={})})(function(t){t.version="1.2.2";function e(){for(var p=0,_=new Array(256),w=0;w!=256;++w)p=w,p=p&1?-306674912^p>>>1:p>>>1,p=p&1?-306674912^p>>>1:p>>>1,p=p&1?-306674912^p>>>1:p>>>1,p=p&1?-306674912^p>>>1:p>>>1,p=p&1?-306674912^p>>>1:p>>>1,p=p&1?-306674912^p>>>1:p>>>1,p=p&1?-306674912^p>>>1:p>>>1,p=p&1?-306674912^p>>>1:p>>>1,_[w]=p;return typeof Int32Array!="undefined"?new Int32Array(_):_}var r=e();function i(p){var _=0,w=0,A=0,E=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(A=0;A!=256;++A)E[A]=p[A];for(A=0;A!=256;++A)for(w=p[A],_=256+A;_<4096;_+=256)w=E[_]=w>>>8^p[w&255];var $=[];for(A=1;A!=16;++A)$[A-1]=typeof Int32Array!="undefined"?E.subarray(A*256,A*256+256):E.slice(A*256,A*256+256);return $}var n=i(r),a=n[0],o=n[1],s=n[2],l=n[3],c=n[4],f=n[5],d=n[6],u=n[7],h=n[8],m=n[9],g=n[10],y=n[11],b=n[12],v=n[13],k=n[14];function S(p,_){for(var w=_^-1,A=0,E=p.length;A>>8^r[(w^p.charCodeAt(A++))&255];return~w}function x(p,_){for(var w=_^-1,A=p.length-15,E=0;E>8&255]^b[p[E++]^w>>16&255]^y[p[E++]^w>>>24]^g[p[E++]]^m[p[E++]]^h[p[E++]]^u[p[E++]]^d[p[E++]]^f[p[E++]]^c[p[E++]]^l[p[E++]]^s[p[E++]]^o[p[E++]]^a[p[E++]]^r[p[E++]];for(A+=15;E>>8^r[(w^p[E++])&255];return~w}function T(p,_){for(var w=_^-1,A=0,E=p.length,$=0,R=0;A>>8^r[(w^$)&255]:$<2048?(w=w>>>8^r[(w^(192|$>>6&31))&255],w=w>>>8^r[(w^(128|$&63))&255]):$>=55296&&$<57344?($=($&1023)+64,R=p.charCodeAt(A++)&1023,w=w>>>8^r[(w^(240|$>>8&7))&255],w=w>>>8^r[(w^(128|$>>2&63))&255],w=w>>>8^r[(w^(128|R>>6&15|($&3)<<4))&255],w=w>>>8^r[(w^(128|R&63))&255]):(w=w>>>8^r[(w^(224|$>>12&15))&255],w=w>>>8^r[(w^(128|$>>6&63))&255],w=w>>>8^r[(w^(128|$&63))&255]);return~w}t.table=r,t.bstr=S,t.buf=x,t.str=T})});var Ft=O(et=>{"use strict";var Vh=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function Xh(t,e){return Object.prototype.hasOwnProperty.call(t,e)}et.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)Xh(r,i)&&(t[i]=r[i])}}return t};et.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var Yh={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray){t.set(e.subarray(r,r+i),n);return}for(var a=0;a{"use strict";var Qh=Ft(),Jh=4,Pc=0,Cc=1,tp=2;function $e(t){for(var e=t.length;--e>=0;)t[e]=0}var ep=0,jc=1,rp=2,ip=3,np=258,Un=29,ar=256,er=ar+1+Un,Te=30,jn=19,Mc=2*er+1,ie=15,Pn=16,ap=7,Mn=256,zc=16,Lc=17,Hc=18,Nn=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ti=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],op=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Gc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],sp=512,Ut=new Array((er+2)*2);$e(Ut);var tr=new Array(Te*2);$e(tr);var rr=new Array(sp);$e(rr);var ir=new Array(np-ip+1);$e(ir);var zn=new Array(Un);$e(zn);var ei=new Array(Te);$e(ei);function Cn(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}var qc,Zc,Wc;function Bn(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function Vc(t){return t<256?rr[t]:rr[256+(t>>>7)]}function nr(t,e){t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255}function st(t,e,r){t.bi_valid>Pn-r?(t.bi_buf|=e<>Pn-t.bi_valid,t.bi_valid+=r-Pn):(t.bi_buf|=e<>>=1,r<<=1;while(--e>0);return r>>>1}function cp(t){t.bi_valid===16?(nr(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)}function fp(t,e){var r=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,a=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,l=e.stat_desc.max_length,c,f,d,u,h,m,g=0;for(u=0;u<=ie;u++)t.bl_count[u]=0;for(r[t.heap[t.heap_max]*2+1]=0,c=t.heap_max+1;cl&&(u=l,g++),r[f*2+1]=u,!(f>i)&&(t.bl_count[u]++,h=0,f>=s&&(h=o[f-s]),m=r[f*2],t.opt_len+=m*(u+h),a&&(t.static_len+=m*(n[f*2+1]+h)));if(g!==0){do{for(u=l-1;t.bl_count[u]===0;)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[l]--,g-=2}while(g>0);for(u=l;u!==0;u--)for(f=t.bl_count[u];f!==0;)d=t.heap[--c],!(d>i)&&(r[d*2+1]!==u&&(t.opt_len+=(u-r[d*2+1])*r[d*2],r[d*2+1]=u),f--)}}function Yc(t,e,r){var i=new Array(ie+1),n=0,a,o;for(a=1;a<=ie;a++)i[a]=n=n+r[a-1]<<1;for(o=0;o<=e;o++){var s=t[o*2+1];s!==0&&(t[o*2]=Xc(i[s]++,s))}}function lp(){var t,e,r,i,n,a=new Array(ie+1);for(r=0,i=0;i>=7;i8?nr(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function up(t,e,r,i){Qc(t),i&&(nr(t,r),nr(t,~r)),Qh.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function Bc(t,e,r,i){var n=e*2,a=r*2;return t[n]>1;o>=1;o--)Dn(t,r,o);c=a;do o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Dn(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=s,r[c*2]=r[o*2]+r[s*2],t.depth[c]=(t.depth[o]>=t.depth[s]?t.depth[o]:t.depth[s])+1,r[o*2+1]=r[s*2+1]=c,t.heap[1]=c++,Dn(t,r,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],fp(t,e),Yc(r,l,t.bl_count)}function Nc(t,e,r){var i,n=-1,a,o=e[0*2+1],s=0,l=7,c=4;for(o===0&&(l=138,c=3),e[(r+1)*2+1]=65535,i=0;i<=r;i++)a=o,o=e[(i+1)*2+1],!(++s=3&&t.bl_tree[Gc[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e}function hp(t,e,r,i){var n;for(st(t,e-257,5),st(t,r-1,5),st(t,i-4,4),n=0;n>>=1)if(e&1&&t.dyn_ltree[r*2]!==0)return Pc;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return Cc;for(r=32;r0?(t.strm.data_type===tp&&(t.strm.data_type=pp(t)),Fn(t,t.l_desc),Fn(t,t.d_desc),o=dp(t),n=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&e!==-1?Jc(t,e,r,i):t.strategy===Jh||a===n?(st(t,(jc<<1)+(i?1:0),3),Dc(t,Ut,tr)):(st(t,(rp<<1)+(i?1:0),3),hp(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),Dc(t,t.dyn_ltree,t.dyn_dtree)),Kc(t),i&&Qc(t)}function yp(t,e,r){return t.pending_buf[t.d_buf+t.last_lit*2]=e>>>8&255,t.pending_buf[t.d_buf+t.last_lit*2+1]=e&255,t.pending_buf[t.l_buf+t.last_lit]=r&255,t.last_lit++,e===0?t.dyn_ltree[r*2]++:(t.matches++,e--,t.dyn_ltree[(ir[r]+ar+1)*2]++,t.dyn_dtree[Vc(e)*2]++),t.last_lit===t.lit_bufsize-1}Oe._tr_init=wp;Oe._tr_stored_block=Jc;Oe._tr_flush_block=gp;Oe._tr_tally=yp;Oe._tr_align=mp});var Ln=O((hy,ef)=>{"use strict";function bp(t,e,r,i){for(var n=t&65535|0,a=t>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+e[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521}return n|a<<16|0}ef.exports=bp});var Hn=O((py,rf)=>{"use strict";function _p(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;e[r]=t}return e}var vp=_p();function xp(t,e,r,i){var n=vp,a=i+r;t^=-1;for(var o=i;o>>8^n[(t^e[o])&255];return t^-1}rf.exports=xp});var ri=O((wy,nf)=>{"use strict";nf.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var hf=O(Pt=>{"use strict";var rt=Ft(),mt=tf(),cf=Ln(),qt=Hn(),Ep=ri(),se=0,Sp=1,kp=3,Yt=4,af=5,It=0,of=1,gt=-2,Ap=-3,Gn=-5,Tp=-1,$p=1,ii=2,Op=3,Rp=4,Ip=0,Pp=2,si=8,Cp=9,Bp=15,Dp=8,Np=29,Fp=256,Zn=Fp+1+Np,Up=30,jp=19,Mp=2*Zn+1,zp=15,U=3,Vt=258,xt=Vt+U+1,Lp=32,ci=42,Wn=69,ni=73,ai=91,oi=103,ne=113,sr=666,Z=1,cr=2,ae=3,Pe=4,Hp=3;function Xt(t,e){return t.msg=Ep[e],e}function sf(t){return(t<<1)-(t>4?9:0)}function Wt(t){for(var e=t.length;--e>=0;)t[e]=0}function Zt(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),r!==0&&(rt.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,e.pending===0&&(e.pending_out=0))}function Y(t,e){mt._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Zt(t.strm)}function j(t,e){t.pending_buf[t.pending++]=e}function or(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255}function Gp(t,e,r,i){var n=t.avail_in;return n>i&&(n=i),n===0?0:(t.avail_in-=n,rt.arraySet(e,t.input,t.next_in,n,r),t.state.wrap===1?t.adler=cf(t.adler,e,n,r):t.state.wrap===2&&(t.adler=qt(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)}function ff(t,e){var r=t.max_chain_length,i=t.strstart,n,a,o=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-xt?t.strstart-(t.w_size-xt):0,c=t.window,f=t.w_mask,d=t.prev,u=t.strstart+Vt,h=c[i+o-1],m=c[i+o];t.prev_length>=t.good_match&&(r>>=2),s>t.lookahead&&(s=t.lookahead);do if(n=e,!(c[n+o]!==m||c[n+o-1]!==h||c[n]!==c[i]||c[++n]!==c[i+1])){i+=2,n++;do;while(c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&io){if(t.match_start=e,o=a,a>=s)break;h=c[i+o-1],m=c[i+o]}}while((e=d[e&f])>l&&--r!==0);return o<=t.lookahead?o:t.lookahead}function oe(t){var e=t.w_size,r,i,n,a,o;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-xt)){rt.arraySet(t.window,t.window,e,e,0),t.match_start-=e,t.strstart-=e,t.block_start-=e,i=t.hash_size,r=i;do n=t.head[--r],t.head[r]=n>=e?n-e:0;while(--i);i=e,r=i;do n=t.prev[--r],t.prev[r]=n>=e?n-e:0;while(--i);a+=e}if(t.strm.avail_in===0)break;if(i=Gp(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=i,t.lookahead+t.insert>=U)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(oe(t),t.lookahead===0&&e===se)return Z;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((t.strstart===0||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,Y(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-xt&&(Y(t,!1),t.strm.avail_out===0))return Z}return t.insert=0,e===Yt?(Y(t,!0),t.strm.avail_out===0?ae:Pe):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out===0),Z)}function qn(t,e){for(var r,i;;){if(t.lookahead=U&&(t.ins_h=(t.ins_h<=U)if(i=mt._tr_tally(t,t.strstart-t.match_start,t.match_length-U),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=U){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=U&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=U-1)),t.prev_length>=U&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-U,i=mt._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-U),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=n&&(t.ins_h=(t.ins_h<=U&&t.strstart>0&&(n=t.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=t.strstart+Vt;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=U?(r=mt._tr_tally(t,1,t.match_length-U),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=mt._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Y(t,!1),t.strm.avail_out===0))return Z}return t.insert=0,e===Yt?(Y(t,!0),t.strm.avail_out===0?ae:Pe):t.last_lit&&(Y(t,!1),t.strm.avail_out===0)?Z:cr}function Wp(t,e){for(var r;;){if(t.lookahead===0&&(oe(t),t.lookahead===0)){if(e===se)return Z;break}if(t.match_length=0,r=mt._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Y(t,!1),t.strm.avail_out===0))return Z}return t.insert=0,e===Yt?(Y(t,!0),t.strm.avail_out===0?ae:Pe):t.last_lit&&(Y(t,!1),t.strm.avail_out===0)?Z:cr}function Rt(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}var Ie;Ie=[new Rt(0,0,0,0,qp),new Rt(4,4,8,4,qn),new Rt(4,5,16,8,qn),new Rt(4,6,32,32,qn),new Rt(4,4,16,16,Re),new Rt(8,16,32,32,Re),new Rt(8,16,128,128,Re),new Rt(8,32,128,256,Re),new Rt(32,128,258,1024,Re),new Rt(32,258,258,4096,Re)];function Vp(t){t.window_size=2*t.w_size,Wt(t.head),t.max_lazy_match=Ie[t.level].max_lazy,t.good_match=Ie[t.level].good_length,t.nice_match=Ie[t.level].nice_length,t.max_chain_length=Ie[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=U-1,t.match_available=0,t.ins_h=0}function Xp(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=si,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new rt.Buf16(Mp*2),this.dyn_dtree=new rt.Buf16((2*Up+1)*2),this.bl_tree=new rt.Buf16((2*jp+1)*2),Wt(this.dyn_ltree),Wt(this.dyn_dtree),Wt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new rt.Buf16(zp+1),this.heap=new rt.Buf16(2*Zn+1),Wt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new rt.Buf16(2*Zn+1),Wt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function lf(t){var e;return!t||!t.state?Xt(t,gt):(t.total_in=t.total_out=0,t.data_type=Pp,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ci:ne,t.adler=e.wrap===2?0:1,e.last_flush=se,mt._tr_init(e),It)}function uf(t){var e=lf(t);return e===It&&Vp(t.state),e}function Yp(t,e){return!t||!t.state||t.state.wrap!==2?gt:(t.state.gzhead=e,It)}function df(t,e,r,i,n,a){if(!t)return gt;var o=1;if(e===Tp&&(e=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>Cp||r!==si||i<8||i>15||e<0||e>9||a<0||a>Rp)return Xt(t,gt);i===8&&(i=9);var s=new Xp;return t.state=s,s.strm=t,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<af||e<0)return t?Xt(t,gt):gt;if(i=t.state,!t.output||!t.input&&t.avail_in!==0||i.status===sr&&e!==Yt)return Xt(t,t.avail_out===0?Gn:gt);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===ci)if(i.wrap===2)t.adler=0,j(i,31),j(i,139),j(i,8),i.gzhead?(j(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),j(i,i.gzhead.time&255),j(i,i.gzhead.time>>8&255),j(i,i.gzhead.time>>16&255),j(i,i.gzhead.time>>24&255),j(i,i.level===9?2:i.strategy>=ii||i.level<2?4:0),j(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(j(i,i.gzhead.extra.length&255),j(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=qt(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Wn):(j(i,0),j(i,0),j(i,0),j(i,0),j(i,0),j(i,i.level===9?2:i.strategy>=ii||i.level<2?4:0),j(i,Hp),i.status=ne);else{var o=si+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=ii||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=Lp),o+=31-o%31,i.status=ne,or(i,o),i.strstart!==0&&(or(i,t.adler>>>16),or(i,t.adler&65535)),t.adler=1}if(i.status===Wn)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=qt(t.adler,i.pending_buf,i.pending-n,n)),Zt(t),n=i.pending,i.pending===i.pending_buf_size));)j(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=qt(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=ni)}else i.status=ni;if(i.status===ni)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=qt(t.adler,i.pending_buf,i.pending-n,n)),Zt(t),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindexn&&(t.adler=qt(t.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=ai)}else i.status=ai;if(i.status===ai)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=qt(t.adler,i.pending_buf,i.pending-n,n)),Zt(t),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindexn&&(t.adler=qt(t.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=oi)}else i.status=oi;if(i.status===oi&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Zt(t),i.pending+2<=i.pending_buf_size&&(j(i,t.adler&255),j(i,t.adler>>8&255),t.adler=0,i.status=ne)):i.status=ne),i.pending!==0){if(Zt(t),t.avail_out===0)return i.last_flush=-1,It}else if(t.avail_in===0&&sf(e)<=sf(r)&&e!==Yt)return Xt(t,Gn);if(i.status===sr&&t.avail_in!==0)return Xt(t,Gn);if(t.avail_in!==0||i.lookahead!==0||e!==se&&i.status!==sr){var l=i.strategy===ii?Wp(i,e):i.strategy===Op?Zp(i,e):Ie[i.level].func(i,e);if((l===ae||l===Pe)&&(i.status=sr),l===Z||l===ae)return t.avail_out===0&&(i.last_flush=-1),It;if(l===cr&&(e===Sp?mt._tr_align(i):e!==af&&(mt._tr_stored_block(i,0,0,!1),e===kp&&(Wt(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Zt(t),t.avail_out===0))return i.last_flush=-1,It}return e!==Yt?It:i.wrap<=0?of:(i.wrap===2?(j(i,t.adler&255),j(i,t.adler>>8&255),j(i,t.adler>>16&255),j(i,t.adler>>24&255),j(i,t.total_in&255),j(i,t.total_in>>8&255),j(i,t.total_in>>16&255),j(i,t.total_in>>24&255)):(or(i,t.adler>>>16),or(i,t.adler&65535)),Zt(t),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?It:of)}function Jp(t){var e;return!t||!t.state?gt:(e=t.state.status,e!==ci&&e!==Wn&&e!==ni&&e!==ai&&e!==oi&&e!==ne&&e!==sr?Xt(t,gt):(t.state=null,e===ne?Xt(t,Ap):It))}function tw(t,e){var r=e.length,i,n,a,o,s,l,c,f;if(!t||!t.state||(i=t.state,o=i.wrap,o===2||o===1&&i.status!==ci||i.lookahead))return gt;for(o===1&&(t.adler=cf(t.adler,e,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(Wt(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new rt.Buf8(i.w_size),rt.arraySet(f,e,r-i.w_size,i.w_size,0),e=f,r=i.w_size),s=t.avail_in,l=t.next_in,c=t.input,t.avail_in=r,t.next_in=0,t.input=e,oe(i);i.lookahead>=U;){n=i.strstart,a=i.lookahead-(U-1);do i.ins_h=(i.ins_h<{"use strict";var fi=Ft(),pf=!0,wf=!0;try{String.fromCharCode.apply(null,[0])}catch(t){pf=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){wf=!1}var fr=new fi.Buf8(256);for(jt=0;jt<256;jt++)fr[jt]=jt>=252?6:jt>=248?5:jt>=240?4:jt>=224?3:jt>=192?2:1;var jt;fr[254]=fr[254]=1;Ce.string2buf=function(t){var e,r,i,n,a,o=t.length,s=0;for(n=0;n>>6,e[a++]=128|r&63):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|r&63):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|r&63);return e};function mf(t,e){if(e<65534&&(t.subarray&&wf||!t.subarray&&pf))return String.fromCharCode.apply(null,fi.shrinkBuf(t,e));for(var r="",i=0;i4){s[i++]=65533,r+=a-1;continue}for(n&=a===2?31:a===3?15:7;a>1&&r1){s[i++]=65533;continue}n<65536?s[i++]=n:(n-=65536,s[i++]=55296|n>>10&1023,s[i++]=56320|n&1023)}return mf(s,i)};Ce.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&(t[r]&192)===128;)r--;return r<0||r===0?e:r+fr[t[r]]>e?r:e}});var Xn=O((yy,gf)=>{"use strict";function ew(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}gf.exports=ew});var vf=O(dr=>{"use strict";var lr=hf(),ur=Ft(),Kn=Vn(),Qn=ri(),rw=Xn(),_f=Object.prototype.toString,iw=0,Yn=4,Be=0,yf=1,bf=2,nw=-1,aw=0,ow=8;function ce(t){if(!(this instanceof ce))return new ce(t);this.options=ur.assign({level:nw,method:ow,chunkSize:16384,windowBits:15,memLevel:8,strategy:aw,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new rw,this.strm.avail_out=0;var r=lr.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Be)throw new Error(Qn[r]);if(e.header&&lr.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(typeof e.dictionary=="string"?i=Kn.string2buf(e.dictionary):_f.call(e.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(e.dictionary):i=e.dictionary,r=lr.deflateSetDictionary(this.strm,i),r!==Be)throw new Error(Qn[r]);this._dict_set=!0}}ce.prototype.push=function(t,e){var r=this.strm,i=this.options.chunkSize,n,a;if(this.ended)return!1;a=e===~~e?e:e===!0?Yn:iw,typeof t=="string"?r.input=Kn.string2buf(t):_f.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new ur.Buf8(i),r.next_out=0,r.avail_out=i),n=lr.deflate(r,a),n!==yf&&n!==Be)return this.onEnd(n),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(a===Yn||a===bf))&&(this.options.to==="string"?this.onData(Kn.buf2binstring(ur.shrinkBuf(r.output,r.next_out))):this.onData(ur.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&n!==yf);return a===Yn?(n=lr.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Be):(a===bf&&(this.onEnd(Be),r.avail_out=0),!0)};ce.prototype.onData=function(t){this.chunks.push(t)};ce.prototype.onEnd=function(t){t===Be&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ur.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function Jn(t,e){var r=new ce(e);if(r.push(t,!0),r.err)throw r.msg||Qn[r.err];return r.result}function sw(t,e){return e=e||{},e.raw=!0,Jn(t,e)}function cw(t,e){return e=e||{},e.gzip=!0,Jn(t,e)}dr.Deflate=ce;dr.deflate=Jn;dr.deflateRaw=sw;dr.gzip=cw});var Ef=O((_y,xf)=>{"use strict";var li=30,fw=12;xf.exports=function(e,r){var i,n,a,o,s,l,c,f,d,u,h,m,g,y,b,v,k,S,x,T,p,_,w,A,E;i=e.state,n=e.next_in,A=e.input,a=n+(e.avail_in-5),o=e.next_out,E=e.output,s=o-(r-e.avail_out),l=o+(e.avail_out-257),c=i.dmax,f=i.wsize,d=i.whave,u=i.wnext,h=i.window,m=i.hold,g=i.bits,y=i.lencode,b=i.distcode,v=(1<>>24,m>>>=x,g-=x,x=S>>>16&255,x===0)E[o++]=S&65535;else if(x&16){T=S&65535,x&=15,x&&(g>>=x,g-=x),g<15&&(m+=A[n++]<>>24,m>>>=x,g-=x,x=S>>>16&255,x&16){if(p=S&65535,x&=15,gc){e.msg="invalid distance too far back",i.mode=li;break t}if(m>>>=x,g-=x,x=o-s,p>x){if(x=p-x,x>d&&i.sane){e.msg="invalid distance too far back",i.mode=li;break t}if(_=0,w=h,u===0){if(_+=f-x,x2;)E[o++]=w[_++],E[o++]=w[_++],E[o++]=w[_++],T-=3;T&&(E[o++]=w[_++],T>1&&(E[o++]=w[_++]))}else{_=o-p;do E[o++]=E[_++],E[o++]=E[_++],E[o++]=E[_++],T-=3;while(T>2);T&&(E[o++]=E[_++],T>1&&(E[o++]=E[_++]))}}else if(x&64){e.msg="invalid distance code",i.mode=li;break t}else{S=b[(S&65535)+(m&(1<>3,n-=T,g-=T<<3,m&=(1<{"use strict";var Sf=Ft(),De=15,kf=852,Af=592,Tf=0,ta=1,$f=2,lw=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],uw=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],dw=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],hw=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Of.exports=function(e,r,i,n,a,o,s,l){var c=l.bits,f=0,d=0,u=0,h=0,m=0,g=0,y=0,b=0,v=0,k=0,S,x,T,p,_,w=null,A=0,E,$=new Sf.Buf16(De+1),R=new Sf.Buf16(De+1),B=null,H=0,ht,W,tt;for(f=0;f<=De;f++)$[f]=0;for(d=0;d=1&&$[h]===0;h--);if(m>h&&(m=h),h===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,l.bits=1,0;for(u=1;u0&&(e===Tf||h!==1))return-1;for(R[1]=0,f=1;fkf||e===$f&&v>Af)return 1;for(;;){ht=f-y,s[d]E?(W=B[H+s[d]],tt=w[A+s[d]]):(W=96,tt=0),S=1<>y)+x]=ht<<24|W<<16|tt|0;while(x!==0);for(S=1<>=1;if(S!==0?(k&=S-1,k+=S):k=0,d++,--$[f]===0){if(f===h)break;f=r[i+s[d]]}if(f>m&&(k&p)!==T){for(y===0&&(y=m),_+=u,g=f-y,b=1<kf||e===$f&&v>Af)return 1;T=k&p,a[T]=m<<24|g<<16|_-o|0}}return k!==0&&(a[_+k]=f-y<<24|64<<16|0),l.bits=m,0}});var ul=O(Et=>{"use strict";var ut=Ft(),oa=Ln(),Ct=Hn(),pw=Ef(),hr=Rf(),ww=0,rl=1,il=2,If=4,mw=5,ui=6,fe=0,gw=1,yw=2,yt=-2,nl=-3,sa=-4,bw=-5,Pf=8,al=1,Cf=2,Bf=3,Df=4,Nf=5,Ff=6,Uf=7,jf=8,Mf=9,zf=10,pi=11,Mt=12,ea=13,Lf=14,ra=15,Hf=16,Gf=17,qf=18,Zf=19,di=20,hi=21,Wf=22,Vf=23,Xf=24,Yf=25,Kf=26,ia=27,Qf=28,Jf=29,z=30,ca=31,_w=32,vw=852,xw=592,Ew=15,Sw=Ew;function tl(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function kw(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new ut.Buf16(320),this.work=new ut.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ol(t){var e;return!t||!t.state?yt:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=al,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new ut.Buf32(vw),e.distcode=e.distdyn=new ut.Buf32(xw),e.sane=1,e.back=-1,fe)}function sl(t){var e;return!t||!t.state?yt:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,ol(t))}function cl(t,e){var r,i;return!t||!t.state||(i=t.state,e<0?(r=0,e=-e):(r=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?yt:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,sl(t))}function fl(t,e){var r,i;return t?(i=new kw,t.state=i,i.window=null,r=cl(t,e),r!==fe&&(t.state=null),r):yt}function Aw(t){return fl(t,Sw)}var el=!0,na,aa;function Tw(t){if(el){var e;for(na=new ut.Buf32(512),aa=new ut.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(hr(rl,t.lens,0,288,na,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;hr(il,t.lens,0,32,aa,0,t.work,{bits:5}),el=!1}t.lencode=na,t.lenbits=9,t.distcode=aa,t.distbits=5}function ll(t,e,r,i){var n,a=t.state;return a.window===null&&(a.wsize=1<=a.wsize?(ut.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),ut.arraySet(a.window,e,r-i,n,a.wnext),i-=n,i?(ut.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=Ct(r.check,w,2,0),c=0,f=0,r.mode=Cf;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=z;break}if((c&15)!==Pf){t.msg="unknown compression method",r.mode=z;break}if(c>>>=4,f-=4,p=(c&15)+8,r.wbits===0)r.wbits=p;else if(p>r.wbits){t.msg="invalid window size",r.mode=z;break}r.dmax=1<>8&1),r.flags&512&&(w[0]=c&255,w[1]=c>>>8&255,r.check=Ct(r.check,w,2,0)),c=0,f=0,r.mode=Bf;case Bf:for(;f<32;){if(s===0)break t;s--,c+=i[a++]<>>8&255,w[2]=c>>>16&255,w[3]=c>>>24&255,r.check=Ct(r.check,w,4,0)),c=0,f=0,r.mode=Df;case Df:for(;f<16;){if(s===0)break t;s--,c+=i[a++]<>8),r.flags&512&&(w[0]=c&255,w[1]=c>>>8&255,r.check=Ct(r.check,w,2,0)),c=0,f=0,r.mode=Nf;case Nf:if(r.flags&1024){for(;f<16;){if(s===0)break t;s--,c+=i[a++]<>>8&255,r.check=Ct(r.check,w,2,0)),c=0,f=0}else r.head&&(r.head.extra=null);r.mode=Ff;case Ff:if(r.flags&1024&&(h=r.length,h>s&&(h=s),h&&(r.head&&(p=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),ut.arraySet(r.head.extra,i,a,h,p)),r.flags&512&&(r.check=Ct(r.check,i,h,a)),s-=h,a+=h,r.length-=h),r.length))break t;r.length=0,r.mode=Uf;case Uf:if(r.flags&2048){if(s===0)break t;h=0;do p=i[a+h++],r.head&&p&&r.length<65536&&(r.head.name+=String.fromCharCode(p));while(p&&h>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=Mt;break;case zf:for(;f<32;){if(s===0)break t;s--,c+=i[a++]<>>=f&7,f-=f&7,r.mode=ia;break}for(;f<3;){if(s===0)break t;s--,c+=i[a++]<>>=1,f-=1,c&3){case 0:r.mode=Lf;break;case 1:if(Tw(r),r.mode=di,e===ui){c>>>=2,f-=2;break t}break;case 2:r.mode=Gf;break;case 3:t.msg="invalid block type",r.mode=z}c>>>=2,f-=2;break;case Lf:for(c>>>=f&7,f-=f&7;f<32;){if(s===0)break t;s--,c+=i[a++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=z;break}if(r.length=c&65535,c=0,f=0,r.mode=ra,e===ui)break t;case ra:r.mode=Hf;case Hf:if(h=r.length,h){if(h>s&&(h=s),h>l&&(h=l),h===0)break t;ut.arraySet(n,i,a,h,o),s-=h,a+=h,l-=h,o+=h,r.length-=h;break}r.mode=Mt;break;case Gf:for(;f<14;){if(s===0)break t;s--,c+=i[a++]<>>=5,f-=5,r.ndist=(c&31)+1,c>>>=5,f-=5,r.ncode=(c&15)+4,c>>>=4,f-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=z;break}r.have=0,r.mode=qf;case qf:for(;r.have>>=3,f-=3}for(;r.have<19;)r.lens[$[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},_=hr(ww,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,_){t.msg="invalid code lengths set",r.mode=z;break}r.have=0,r.mode=Zf;case Zf:for(;r.have>>24,v=y>>>16&255,k=y&65535,!(b<=f);){if(s===0)break t;s--,c+=i[a++]<>>=b,f-=b,r.lens[r.have++]=k;else{if(k===16){for(E=b+2;f>>=b,f-=b,r.have===0){t.msg="invalid bit length repeat",r.mode=z;break}p=r.lens[r.have-1],h=3+(c&3),c>>>=2,f-=2}else if(k===17){for(E=b+3;f>>=b,f-=b,p=0,h=3+(c&7),c>>>=3,f-=3}else{for(E=b+7;f>>=b,f-=b,p=0,h=11+(c&127),c>>>=7,f-=7}if(r.have+h>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=z;break}for(;h--;)r.lens[r.have++]=p}}if(r.mode===z)break;if(r.lens[256]===0){t.msg="invalid code -- missing end-of-block",r.mode=z;break}if(r.lenbits=9,A={bits:r.lenbits},_=hr(rl,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,_){t.msg="invalid literal/lengths set",r.mode=z;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},_=hr(il,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,_){t.msg="invalid distances set",r.mode=z;break}if(r.mode=di,e===ui)break t;case di:r.mode=hi;case hi:if(s>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=a,t.avail_in=s,r.hold=c,r.bits=f,pw(t,u),o=t.next_out,n=t.output,l=t.avail_out,a=t.next_in,i=t.input,s=t.avail_in,c=r.hold,f=r.bits,r.mode===Mt&&(r.back=-1);break}for(r.back=0;y=r.lencode[c&(1<>>24,v=y>>>16&255,k=y&65535,!(b<=f);){if(s===0)break t;s--,c+=i[a++]<>S)],b=y>>>24,v=y>>>16&255,k=y&65535,!(S+b<=f);){if(s===0)break t;s--,c+=i[a++]<>>=S,f-=S,r.back+=S}if(c>>>=b,f-=b,r.back+=b,r.length=k,v===0){r.mode=Kf;break}if(v&32){r.back=-1,r.mode=Mt;break}if(v&64){t.msg="invalid literal/length code",r.mode=z;break}r.extra=v&15,r.mode=Wf;case Wf:if(r.extra){for(E=r.extra;f>>=r.extra,f-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Vf;case Vf:for(;y=r.distcode[c&(1<>>24,v=y>>>16&255,k=y&65535,!(b<=f);){if(s===0)break t;s--,c+=i[a++]<>S)],b=y>>>24,v=y>>>16&255,k=y&65535,!(S+b<=f);){if(s===0)break t;s--,c+=i[a++]<>>=S,f-=S,r.back+=S}if(c>>>=b,f-=b,r.back+=b,v&64){t.msg="invalid distance code",r.mode=z;break}r.offset=k,r.extra=v&15,r.mode=Xf;case Xf:if(r.extra){for(E=r.extra;f>>=r.extra,f-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=z;break}r.mode=Yf;case Yf:if(l===0)break t;if(h=u-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=z;break}h>r.wnext?(h-=r.wnext,m=r.wsize-h):m=r.wnext-h,h>r.length&&(h=r.length),g=r.window}else g=n,m=o-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do n[o++]=g[m++];while(--h);r.length===0&&(r.mode=hi);break;case Kf:if(l===0)break t;n[o++]=r.length,l--,r.mode=hi;break;case ia:if(r.wrap){for(;f<32;){if(s===0)break t;s--,c|=i[a++]<{"use strict";dl.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var pl=O((Sy,hl)=>{"use strict";function Pw(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}hl.exports=Pw});var ml=O(wr=>{"use strict";var Ne=ul(),pr=Ft(),wi=Vn(),G=fa(),la=ri(),Cw=Xn(),Bw=pl(),wl=Object.prototype.toString;function le(t){if(!(this instanceof le))return new le(t);this.options=pr.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Cw,this.strm.avail_out=0;var r=Ne.inflateInit2(this.strm,e.windowBits);if(r!==G.Z_OK)throw new Error(la[r]);if(this.header=new Bw,Ne.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=wi.string2buf(e.dictionary):wl.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=Ne.inflateSetDictionary(this.strm,e.dictionary),r!==G.Z_OK)))throw new Error(la[r])}le.prototype.push=function(t,e){var r=this.strm,i=this.options.chunkSize,n=this.options.dictionary,a,o,s,l,c,f=!1;if(this.ended)return!1;o=e===~~e?e:e===!0?G.Z_FINISH:G.Z_NO_FLUSH,typeof t=="string"?r.input=wi.binstring2buf(t):wl.call(t)==="[object ArrayBuffer]"?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new pr.Buf8(i),r.next_out=0,r.avail_out=i),a=Ne.inflate(r,G.Z_NO_FLUSH),a===G.Z_NEED_DICT&&n&&(a=Ne.inflateSetDictionary(this.strm,n)),a===G.Z_BUF_ERROR&&f===!0&&(a=G.Z_OK,f=!1),a!==G.Z_STREAM_END&&a!==G.Z_OK)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(r.avail_out===0||a===G.Z_STREAM_END||r.avail_in===0&&(o===G.Z_FINISH||o===G.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=wi.utf8border(r.output,r.next_out),l=r.next_out-s,c=wi.buf2string(r.output,s),r.next_out=l,r.avail_out=i-l,l&&pr.arraySet(r.output,r.output,s,l,0),this.onData(c)):this.onData(pr.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(f=!0)}while((r.avail_in>0||r.avail_out===0)&&a!==G.Z_STREAM_END);return a===G.Z_STREAM_END&&(o=G.Z_FINISH),o===G.Z_FINISH?(a=Ne.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===G.Z_OK):(o===G.Z_SYNC_FLUSH&&(this.onEnd(G.Z_OK),r.avail_out=0),!0)};le.prototype.onData=function(t){this.chunks.push(t)};le.prototype.onEnd=function(t){t===G.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=pr.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function ua(t,e){var r=new le(e);if(r.push(t,!0),r.err)throw r.msg||la[r.err];return r.result}function Dw(t,e){return e=e||{},e.raw=!0,ua(t,e)}wr.Inflate=le;wr.inflate=ua;wr.inflateRaw=Dw;wr.ungzip=ua});var bl=O((Ay,yl)=>{"use strict";var Nw=Ft().assign,Fw=vf(),Uw=ml(),jw=fa(),gl={};Nw(gl,Fw,Uw,jw);yl.exports=gl});var xl=O((Ty,vl)=>{"use strict";var _l=(t,e)=>function(...r){let i=e.promiseModule;return new i((n,a)=>{e.multiArgs?r.push((...o)=>{e.errorFirst?o[0]?a(o):(o.shift(),n(o)):n(o)}):e.errorFirst?r.push((o,s)=>{o?a(o):n(s)}):r.push(n),t.apply(this,r)})};vl.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);let r=typeof t;if(!(t!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${t===null?"null":r}\``);let i=a=>{let o=s=>typeof s=="string"?a===s:s.test(a);return e.include?e.include.some(o):!e.exclude.some(o)},n;r==="function"?n=function(...a){return e.excludeMain?t(...a):_l(t,e).apply(this,a)}:n=Object.create(Object.getPrototypeOf(t));for(let a in t){let o=t[a];n[a]=typeof o=="function"&&i(a)?_l(o,e):o}return n}});var Il=O(($y,Rl)=>{function El(t){return Array.isArray(t)?t:[t]}var pa="",Sl=" ",da="\\",Mw=/^\s+$/,zw=/(?:[^\\]|^)\\$/,Lw=/^\\!/,Hw=/^\\#/,Gw=/\r?\n/g,qw=/^\.*\/|^\.+$/,ha="/",Tl="node-ignore";typeof Symbol!="undefined"&&(Tl=Symbol.for("node-ignore"));var kl=Tl,Zw=(t,e,r)=>Object.defineProperty(t,e,{value:r}),Ww=/([0-z])-([0-z])/g,$l=()=>!1,Vw=t=>t.replace(Ww,(e,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?e:pa),Xw=t=>{let{length:e}=t;return t.slice(0,e-e%2)},Yw=[[/^\uFEFF/,()=>pa],[/((?:\\\\)*?)(\\?\s+)$/,(t,e,r)=>e+(r.indexOf("\\")===0?Sl:pa)],[/(\\+?)\s/g,(t,e)=>{let{length:r}=e;return e.slice(0,r-r%2)+Sl}],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,r)=>e+6{let i=r.replace(/\\\*/g,"[^\\/]*");return e+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>da],[/\\\\/g,()=>da],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,r,i,n)=>e===da?`\\[${r}${Xw(i)}${n}`:n==="]"&&i.length%2===0?`[${Vw(r)}${i}]`:"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],Al=Object.create(null),Kw=(t,e)=>{let r=Al[t];return r||(r=Yw.reduce((i,[n,a])=>i.replace(n,a.bind(t)),t),Al[t]=r),e?new RegExp(r,"i"):new RegExp(r)},ga=t=>typeof t=="string",Qw=t=>t&&ga(t)&&!Mw.test(t)&&!zw.test(t)&&t.indexOf("#")!==0,Jw=t=>t.split(Gw),wa=class{constructor(e,r,i,n){this.origin=e,this.pattern=r,this.negative=i,this.regex=n}},t0=(t,e)=>{let r=t,i=!1;t.indexOf("!")===0&&(i=!0,t=t.substr(1)),t=t.replace(Lw,"!").replace(Hw,"#");let n=Kw(t,e);return new wa(r,t,i,n)},e0=(t,e)=>{throw new e(t)},zt=(t,e,r)=>ga(t)?t?zt.isNotRelative(t)?r(`path should be a \`path.relative()\`d string, but got "${e}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${e}\``,TypeError),Ol=t=>qw.test(t);zt.isNotRelative=Ol;zt.convert=t=>t;var ma=class{constructor({ignorecase:e=!0,ignoreCase:r=e,allowRelativePaths:i=!1}={}){Zw(this,kl,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[kl]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(Qw(e)){let r=t0(e,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(e){return this._added=!1,El(ga(e)?Jw(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,r){let i=!1,n=!1;return this._rules.forEach(a=>{let{negative:o}=a;if(n===o&&i!==n||o&&!i&&!n&&!r)return;a.regex.test(e)&&(i=!o,n=o)}),{ignored:i,unignored:n}}_test(e,r,i,n){let a=e&&zt.convert(e);return zt(a,e,this._allowRelativePaths?$l:e0),this._t(a,r,i,n)}_t(e,r,i,n){if(e in r)return r[e];if(n||(n=e.split(ha)),n.pop(),!n.length)return r[e]=this._testOne(e,i);let a=this._t(n.join(ha)+ha,r,i,n);return r[e]=a.ignored?a:this._testOne(e,i)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return El(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},mi=t=>new ma(t),r0=t=>zt(t&&zt.convert(t),t,$l);mi.isPathValid=r0;mi.default=mi;Rl.exports=mi;if(typeof process!="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let t=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");zt.convert=t;let e=/^[a-z]:\//i;zt.isNotRelative=r=>e.test(r)||Ol(r)}});var Cl=O((Oy,Pl)=>{"use strict";function i0(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bt(t,e,r){return e=e instanceof RegExp?e:new RegExp(i0(e),"g"),t.replace(e,r)}var n0={clean:function(e){if(typeof e!="string")throw new Error("Expected a string, received: "+e);return e=Bt(e,"./","/"),e=Bt(e,"..","."),e=Bt(e," ","-"),e=Bt(e,/^[~^:?*\\\-]/g,""),e=Bt(e,/[~^:?*\\]/g,"-"),e=Bt(e,/[~^:?*\\\-]$/g,""),e=Bt(e,"@{","-"),e=Bt(e,/\.$/g,""),e=Bt(e,/\/$/g,""),e=Bt(e,/\.lock$/g,""),e}};Pl.exports=n0});var Dl=O((Ry,Bl)=>{Bl.exports=function(t,e){var r=t,i=e,n=r.length,a=i.length,o=!1,s=null,l=n+1,c=[],f=[],d=[],u="",h=-1,m=0,g=1,y,b,v=function(){n>=a&&(y=r,b=n,r=i,i=y,n=a,a=b,o=!0,l=n+1)},k=function(p,_,w){return{x:p,y:_,k:w}},S=function(p,_){return{elem:p,t:_}},x=function(p,_,w){var A,E,$;for(_>w?A=c[p-1+l]:A=c[p+1+l],$=Math.max(_,w),E=$-p;E=0;--$)for(;AE-A?(o?d[d.length]=new S(i[E],h):d[d.length]=new S(i[E],g),++w,++E):p[$].y-p[$].x=p+1;--B)w[B+l]=x(B,w[B-1+l]+1,w[B+1+l]);w[p+l]=x(p,w[p-1+l]+1,w[p+1+l])}while(w[p+l]!==a);for(s=p+2*A,E=c[p+l],$=[];E!==-1;)$[$.length]=new k(f[E].x,f[E].y,null),E=f[E].k;T($)}}}});var Ul=O((Iy,Fl)=>{var a0=Dl();function o0(t,e){var r=new a0(t,e);r.compose();for(var i=r.getses(),n,a,o=t.length-1,s=e.length-1,l=i.length-1;l>=0;--l)i[l].t===r.SES_COMMON?(a?(a.chain={file1index:o,file2index:s,chain:null},a=a.chain):(n={file1index:o,file2index:s,chain:null},a=n),o--,s--):i[l].t===r.SES_DELETE?o--:i[l].t===r.SES_ADD&&s--;var c={file1index:-1,file2index:-1,chain:null};return a?(a.chain=c,n):c}function Nl(t,e){for(var r=[],i=t.length,n=e.length,a=o0(t,e);a!==null;a=a.chain){var o=i-a.file1index-1,s=n-a.file2index-1;i=a.file1index,n=a.file2index,(o||s)&&r.push({file1:[i+1,o],file2:[n+1,s]})}return r.reverse(),r}function s0(t,e,r){var i,n=Nl(e,t),a=Nl(e,r),o=[];function s(R,B){o.push([R.file1[0],B,R.file1[1],R.file2[0],R.file2[1]])}for(i=0;ic&&(l.push([1,c,R-c]),c=R)}for(var d=0;dg)break;g=Math.max(g,b+y[2]),d++}if(f(m),u==d)h[4]>0&&l.push([h[1],h[3],h[4]]);else{var v={0:[t.length,-1,e.length,-1],2:[r.length,-1,e.length,-1]};for(i=u;i<=d;i++){h=o[i];var k=h[1],S=v[k],x=h[0],T=x+h[2],p=h[3],_=p+h[4];S[0]=Math.min(p,S[0]),S[1]=Math.max(_,S[1]),S[2]=Math.min(x,S[2]),S[3]=Math.max(T,S[3])}var w=v[0][0]+(m-v[0][2]),A=v[0][1]+(g-v[0][3]),E=v[2][0]+(m-v[2][2]),$=v[2][1]+(g-v[2][3]);l.push([-1,w,A-w,m,g-m,E,$-E])}c=g}return f(e.length),l}function c0(t,e,r){var i=[],n=[t,e,r],a=s0(t,e,r),o=[];function s(){o.length&&i.push({ok:o}),o=[]}function l(h){for(var m=0;mJi});module.exports=Ju(qm);var at=require("obsidian");var to={githubToken:"",githubUsername:"",repoName:"",autoSync:!0,syncIntervalMs:3e3,excludePatterns:[".obsidian/workspace",".obsidian/workspace.json",".obsidian/plugins/*/data.json"],lastSyncTime:0,commitMessageTemplate:"sync: {{datetime}}"};var ot=require("obsidian");var on=require("obsidian");var nn="Ov23liN8a7D1bDe2571X",eo="https://github.com/login/device/code",ro="https://github.com/login/oauth/access_token",an="https://api.github.com";var Pr="ObsidianMultiSync",Cr="sync@obsidian.local";var wt="main";async function io(){let t=await(0,on.requestUrl)({url:eo,method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:`client_id=${nn}&scope=repo`,throw:!1});if(t.status!==200)throw new Error(`GitHub Device Flow failed: ${t.status}`);return t.json}async function no(t,e,r,i){let n=Date.now()+r*1e3,a=e*1e3;return new Promise((o,s)=>{let l=async()=>{if(Date.now()>n){s(new Error("Device code expired. Please try connecting again."));return}i==null||i();let f=(await(0,on.requestUrl)({url:ro,method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},body:`client_id=${nn}&device_code=${t}&grant_type=urn:ietf:params:oauth:grant-type:device_code`,throw:!1})).json;if(f.access_token){o(f.access_token);return}switch(f.error){case"authorization_pending":setTimeout(l,a);break;case"slow_down":a+=5e3,setTimeout(l,a);break;case"expired_token":s(new Error("Code expired. Please reconnect."));break;case"access_denied":s(new Error("Access denied. You cancelled the authorization."));break;default:s(new Error(`Unknown error: ${f.error}`))}};setTimeout(l,a)})}var sn=require("obsidian");async function ao(t,e,r={}){var n,a;let i=await(0,sn.requestUrl)({url:`${an}${t}`,method:(n=r.method)!=null?n:"GET",headers:{Authorization:`Bearer ${e}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","Content-Type":"application/json"},body:r.body?JSON.stringify(r.body):void 0,throw:!1});if(i.status>=400){let o=i.json;throw new Error(`GitHub API error ${i.status}: ${(a=o.message)!=null?a:"unknown"}`)}return i.json}async function oo(t){return ao("/user",t)}async function so(t,e,r){return(await(0,sn.requestUrl)({url:`${an}/repos/${e}/${r}`,method:"GET",headers:{Authorization:`Bearer ${t}`,Accept:"application/vnd.github+json"},throw:!1})).status===200}async function co(t,e,r){return ao("/user/repos",t,{method:"POST",body:{name:e,description:r,private:!0,auto_init:!1}})}function fo(t){return`obsidian-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}`}var Br=class extends ot.PluginSettingTab{constructor(e,r){super(e,r),this.plugin=r}display(){let{containerEl:e}=this;e.empty(),e.createEl("h2",{text:"MultiSync Settings"});let r=this.plugin.settings;if(e.createEl("h3",{text:"GitHub Account"}),r.githubToken&&r.githubUsername?(new ot.Setting(e).setName("Connected account").setDesc(`Signed in as @${r.githubUsername}`).addButton(i=>i.setButtonText("Disconnect").setWarning().onClick(async()=>{r.githubToken="",r.githubUsername="",r.repoName="",await this.plugin.saveSettings(),this.display(),new ot.Notice("Disconnected from GitHub.")})),new ot.Setting(e).setName("Vault repo").setDesc(`github.com/${r.githubUsername}/${r.repoName}`)):new ot.Setting(e).setName("Connect GitHub account").setDesc("Authorise MultiSync to access your private repos. Opens a browser window.").addButton(i=>{i.setButtonText("Connect GitHub").setCta().onClick(async()=>{await this.startDeviceFlow(i)})}),e.createEl("h3",{text:"Sync Options"}),new ot.Setting(e).setName("Auto-sync").setDesc("Automatically sync when files are modified.").addToggle(i=>i.setValue(r.autoSync).onChange(async n=>{r.autoSync=n,await this.plugin.saveSettings()})),new ot.Setting(e).setName("Sync debounce (ms)").setDesc("Wait this many milliseconds after the last edit before syncing.").addSlider(i=>i.setLimits(1e3,1e4,500).setValue(r.syncIntervalMs).setDynamicTooltip().onChange(async n=>{r.syncIntervalMs=n,await this.plugin.saveSettings()})),new ot.Setting(e).setName("Excluded patterns").setDesc("One pattern per line. These files will never be synced.").addTextArea(i=>i.setValue(r.excludePatterns.join(` +`)).onChange(async n=>{r.excludePatterns=n.split(` +`).map(a=>a.trim()).filter(Boolean),await this.plugin.saveSettings()})),e.createEl("h3",{text:"Manual Sync"}),new ot.Setting(e).setName("Sync now").setDesc("Immediately push all local changes and pull remote changes.").addButton(i=>i.setButtonText("Sync Now").onClick(async()=>{await this.plugin.triggerManualSync()})),r.lastSyncTime>0){let i=new Date(r.lastSyncTime).toLocaleString();e.createEl("p",{text:`Last synced: ${i}`,cls:"setting-item-description"})}}async startDeviceFlow(e){var r;e.setButtonText("Connecting\u2026").setDisabled(!0);try{let i=await io(),n=this.containerEl.createDiv({cls:"multisync-device-modal"});n.style.cssText="background:var(--background-secondary);border-radius:8px;padding:16px;margin-top:12px;text-align:center;",n.createEl("p",{text:"Open this URL in your browser and enter the code below:"});let a=n.createEl("a",{text:i.verification_uri,href:i.verification_uri});a.style.display="block";let o=n.createEl("h1",{text:i.user_code,cls:"multisync-user-code"});o.style.cssText="font-size:2rem;letter-spacing:0.25em;font-weight:700;color:var(--text-normal);background:var(--background-primary);border:2px solid var(--interactive-accent);border-radius:6px;padding:8px 24px;display:inline-block;margin:12px auto;font-family:monospace;",n.createEl("p",{text:"Waiting for you to approve in the browser\u2026",cls:"setting-item-description"}),e.setButtonText("Cancel").setDisabled(!1),window.open(i.verification_uri,"_blank");let s=await no(i.device_code,i.interval,i.expires_in);n.remove();let l=await oo(s);this.plugin.settings.githubToken=s,this.plugin.settings.githubUsername=l.login,await this.plugin.initializeRepo(s,l.login),await this.plugin.saveSettings(),new ot.Notice(`Connected as @${l.login}. Vault syncing started!`),this.display()}catch(i){let n=i instanceof Error?i.message:String(i);(r=this.containerEl.querySelector(".multisync-device-modal"))==null||r.remove(),new ot.Notice(`Connection failed: ${n}`),e.setButtonText("Connect GitHub").setDisabled(!1)}}};var td={idle:"\u2713 MultiSync",pulling:"\u2193 Syncing\u2026",pushing:"\u2191 Syncing\u2026",conflict:"\u26A0 Conflict",error:"\u2717 Sync Error",connecting:"\u2026 Connecting"},Dr=class{constructor(e){this.el=e.addStatusBarItem(),this.el.style.cursor="pointer",this.set("idle")}set(e,r){let i=td[e];this.el.setText(r?`${i}: ${r}`:i),this.el.setAttribute("data-sync-status",e)}onClick(e){this.el.addEventListener("click",e)}};var ge=require("obsidian");function lo(t){var a,o;let e=t.ours.split(` +`),r=t.theirs.split(` +`),i=Math.max(e.length,r.length),n=[];for(let s=0;s0?n.join(` +`):"(files are identical \u2014 safe to accept either)"}var Nr=class extends ge.Modal{constructor(r,i,n){super(r);this.currentIndex=0;this.conflicts=i,this.onResolve=n,this.component=new ge.Component}onOpen(){this.component.load(),this.renderCurrent()}onClose(){this.component.unload(),this.contentEl.empty()}renderCurrent(){let r=this.conflicts[this.currentIndex],{contentEl:i}=this;i.empty(),i.createEl("h2",{text:`Sync Conflict (${this.currentIndex+1} / ${this.conflicts.length})`}),i.createEl("p",{text:`File: ${r.path}`,cls:"conflict-filepath"});let n=i.createEl("pre",{cls:"conflict-diff"});n.style.cssText="background:var(--background-secondary);padding:8px;border-radius:4px;overflow:auto;max-height:180px;font-size:12px;",n.textContent=lo(r);let a=i.createDiv({cls:"conflict-columns"});a.style.cssText="display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0;";let o=a.createDiv();o.createEl("h4",{text:"Your version (this device)"});let s=o.createEl("pre");s.style.cssText="background:#1a3a1a;padding:8px;border-radius:4px;overflow:auto;max-height:260px;font-size:11px;white-space:pre-wrap;",s.textContent=r.ours.slice(0,2e3)+(r.ours.length>2e3?` +\u2026(truncated)`:"");let l=a.createDiv();l.createEl("h4",{text:"Remote version (other device)"});let c=l.createEl("pre");c.style.cssText="background:#1a1a3a;padding:8px;border-radius:4px;overflow:auto;max-height:260px;font-size:11px;white-space:pre-wrap;",c.textContent=r.theirs.slice(0,2e3)+(r.theirs.length>2e3?` +\u2026(truncated)`:""),new ge.Setting(i).addButton(f=>f.setButtonText("Keep Mine").onClick(async()=>{await this.resolve(r,r.ours)})).addButton(f=>f.setButtonText("Keep Theirs").setCta().onClick(async()=>{await this.resolve(r,r.theirs)})).addButton(f=>f.setButtonText("Open in Editor").onClick(()=>{this.close(),this.app.workspace.openLinkText(r.path,"",!0)}))}async resolve(r,i){await this.onResolve(r.path,i),this.currentIndex++,this.currentIndex=this.buffer.length}tell(){return this._start}seek(e){this._start=e}slice(e){let r=this.buffer.slice(this._start,this._start+e);return this._start+=e,r}toString(e,r){let i=this.buffer.toString(e,this._start,this._start+r);return this._start+=r,i}write(e,r,i){let n=this.buffer.write(e,this._start,r,i);return this._start+=r,n}copy(e,r,i){let n=e.copy(this.buffer,this._start,r,i);return this._start+=n,n}readUInt8(){let e=this.buffer.readUInt8(this._start);return this._start+=1,e}writeUInt8(e){let r=this.buffer.writeUInt8(e,this._start);return this._start+=1,r}readUInt16BE(){let e=this.buffer.readUInt16BE(this._start);return this._start+=2,e}writeUInt16BE(e){let r=this.buffer.writeUInt16BE(e,this._start);return this._start+=2,r}readUInt32BE(){let e=this.buffer.readUInt32BE(this._start);return this._start+=4,e}writeUInt32BE(e){let r=this.buffer.writeUInt32BE(e,this._start);return this._start+=4,r}};function Wi(t,e){return-(te)}function lu(t,e){return Wi(t.path,e.path)}function uu(t){let e=t>0?t>>12:0;e!==4&&e!==8&&e!==10&&e!==14&&(e=8);let r=t&511;return r&73?r=493:r=420,e!==8&&(r=0),(e<<12)+r}var Dt=2**32;function jl(t,e,r,i){if(t!==void 0&&e!==void 0)return[t,e];r===void 0&&(r=i.valueOf());let n=Math.floor(r/1e3),a=(r-n*1e3)*1e6;return[n,a]}function Me(t){let[e,r]=jl(t.ctimeSeconds,t.ctimeNanoseconds,t.ctimeMs,t.ctime),[i,n]=jl(t.mtimeSeconds,t.mtimeNanoseconds,t.mtimeMs,t.mtime);return{ctimeSeconds:e%Dt,ctimeNanoseconds:r%Dt,mtimeSeconds:i%Dt,mtimeNanoseconds:n%Dt,dev:t.dev%Dt,ino:t.ino%Dt,mode:uu(t.mode%Dt),uid:t.uid%Dt,gid:t.gid%Dt,size:t.size>-1?t.size%Dt:0}}function f0(t){let e="";for(let r of new Uint8Array(t))r<16&&(e+="0"),e+=r.toString(16);return e}var ya=null;async function Qt(t){return ya===null&&(ya=await u0()),ya?du(t):l0(t)}function l0(t){return new Xa.default().update(t).digest("hex")}async function du(t){let e=await crypto.subtle.digest("SHA-1",t);return f0(e)}async function u0(){try{return await du(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709"}catch(t){}return!1}function d0(t){return{assumeValid:!!(t&32768),extended:!!(t&16384),stage:(t&12288)>>12,nameLength:t&4095}}function h0(t){let e=t.flags;return e.extended=!1,e.nameLength=Math.min(Buffer.from(t.path).length,4095),(e.assumeValid?32768:0)+(e.extended?16384:0)+((e.stage&3)<<12)+(e.nameLength&4095)}var Oa=class t{constructor(e,r){this._dirty=!1,this._unmergedPaths=r||new Set,this._entries=e||new Map}_addEntry(e){if(e.flags.stage===0)e.stages=[e],this._entries.set(e.path,e),this._unmergedPaths.delete(e.path);else{let r=this._entries.get(e.path);r||(this._entries.set(e.path,e),r=e),r.stages[e.flags.stage]=e,this._unmergedPaths.add(e.path)}}static async from(e){if(Buffer.isBuffer(e))return t.fromBuffer(e);if(e===null)return new t(null);throw new I("invalid type passed to GitIndex.from")}static async fromBuffer(e){if(e.length===0)throw new I("Index file is empty (.git/index)");let r=new t,i=new bt(e),n=i.toString("utf8",4);if(n!=="DIRC")throw new I(`Invalid dircache magic file number: ${n}`);let a=await Qt(e.slice(0,-20)),o=e.slice(-20).toString("hex");if(o!==a)throw new I(`Invalid checksum in GitIndex buffer: expected ${o} but saw ${a}`);let s=i.readUInt32BE();if(s!==2)throw new I(`Unsupported dircache version: ${s}`);let l=i.readUInt32BE(),c=0;for(;!i.eof()&&ce.stages.length>1?e.stages.filter(r=>r):e)}*[Symbol.iterator](){for(let e of this.entries)yield e}insert({filepath:e,stats:r,oid:i,stage:n=0}){r||(r={ctimeSeconds:0,ctimeNanoseconds:0,mtimeSeconds:0,mtimeNanoseconds:0,dev:0,ino:0,mode:0,uid:0,gid:0,size:0}),r=Me(r);let a=Buffer.from(e),o={ctimeSeconds:r.ctimeSeconds,ctimeNanoseconds:r.ctimeNanoseconds,mtimeSeconds:r.mtimeSeconds,mtimeNanoseconds:r.mtimeNanoseconds,dev:r.dev,ino:r.ino,mode:r.mode||33188,uid:r.uid,gid:r.gid,size:r.size,path:e,oid:i,flags:{assumeValid:!1,extended:!1,stage:n,nameLength:a.length<4095?a.length:4095},stages:[]};this._addEntry(o),this._dirty=!0}delete({filepath:e}){if(this._entries.has(e))this._entries.delete(e);else for(let r of this._entries.keys())r.startsWith(e+"/")&&this._entries.delete(r);this._unmergedPaths.has(e)&&this._unmergedPaths.delete(e),this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}has({filepath:e}){return this._entries.has(e)}render(){return this.entries.map(e=>`${e.mode.toString(8)} ${e.oid} ${e.path}`).join(` +`)}static async _entryToBuffer(e){let r=Buffer.from(e.path),i=Math.ceil((62+r.length+1)/8)*8,n=Buffer.alloc(i),a=new bt(n),o=Me(e);return a.writeUInt32BE(o.ctimeSeconds),a.writeUInt32BE(o.ctimeNanoseconds),a.writeUInt32BE(o.mtimeSeconds),a.writeUInt32BE(o.mtimeNanoseconds),a.writeUInt32BE(o.dev),a.writeUInt32BE(o.ino),a.writeUInt32BE(o.mode),a.writeUInt32BE(o.uid),a.writeUInt32BE(o.gid),a.writeUInt32BE(o.size),a.write(e.oid,20,"hex"),a.writeUInt16BE(h0(e)),a.write(e.path,r.length,"utf8"),n}async toObject(){let e=Buffer.alloc(12),r=new bt(e);r.write("DIRC",4,"utf8"),r.writeUInt32BE(2),r.writeUInt32BE(this.entriesFlat.length);let i=[];for(let s of this.entries)if(i.push(t._entryToBuffer(s)),s.stages.length>1)for(let l of s.stages)l&&l!==s&&i.push(t._entryToBuffer(l));i=await Promise.all(i);let n=Buffer.concat(i),a=Buffer.concat([e,n]),o=await Qt(a);return Buffer.concat([a,Buffer.from(o,"hex")])}};function Ra(t,e,r=!0,i=!0){let n=Me(t),a=Me(e);return r&&n.mode!==a.mode||n.mtimeSeconds!==a.mtimeSeconds||n.ctimeSeconds!==a.ctimeSeconds||n.uid!==a.uid||n.gid!==a.gid||i&&n.ino!==a.ino||n.size!==a.size}var ba=null,_a=Symbol("IndexCache");function p0(){return{map:new Map,stats:new Map}}async function w0(t,e,r){let[i,n]=await Promise.all([t.lstat(e),t.read(e)]),a=await Oa.from(n);r.map.set(e,a),r.stats.set(e,i)}async function m0(t,e,r){let i=r.stats.get(e);if(i===void 0)return!0;if(i===null)return!1;let n=await t.lstat(e);return n===null?!1:Ra(i,n)}var _t=class{static async acquire({fs:e,gitdir:r,cache:i,allowUnmerged:n=!0},a){i[_a]||(i[_a]=p0());let o=`${r}/index`;ba===null&&(ba=new yr.default({maxPending:1/0}));let s,l=[];return await ba.acquire(o,async()=>{let c=i[_a];await m0(e,o,c)&&await w0(e,o,c);let f=c.map.get(o);if(l=f.unmergedPaths,l.length&&!n)throw new bi(l);if(s=await a(f),f._dirty){let d=await f.toObject();await e.write(o,d),c.stats.set(o,await e.lstat(o)),f._dirty=!1}}),s}};function _i(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e>-1&&(t=t.slice(e+1)),t}function ze(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e===-1?".":e===0?"/":t.slice(0,e)}function hu(t){let e=new Map,r=function(n){if(!e.has(n)){let a={type:"tree",fullpath:n,basename:_i(n),metadata:{},children:[]};e.set(n,a),a.parent=r(ze(n)),a.parent&&a.parent!==a&&a.parent.children.push(a)}return e.get(n)},i=function(n,a){if(!e.has(n)){let o={type:"blob",fullpath:n,basename:_i(n),metadata:a,parent:r(ze(n)),children:[]};o.parent&&o.parent.children.push(o),e.set(n,o)}return e.get(n)};r(".");for(let n of t)i(n.path,n);return e}function g0(t){switch(t){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new I(`Unexpected GitTree entry mode: ${t.toString(8)}`)}var Ia=class{constructor({fs:e,gitdir:r,cache:i}){this.treePromise=_t.acquire({fs:e,gitdir:r,cache:i},async function(a){return hu(a.entries)});let n=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return n.type(this)}async mode(){return n.mode(this)}async stat(){return n.stat(this)}async content(){return n.content(this)}async oid(){return n.oid(this)}}}async readdir(e){let r=e._fullpath,n=(await this.treePromise).get(r);if(!n||n.type==="blob")return null;if(n.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);let a=n.children.map(o=>o.fullpath);return a.sort(Wi),a}async type(e){return e._type===!1&&await e.stat(),e._type}async mode(e){return e._mode===!1&&await e.stat(),e._mode}async stat(e){if(e._stat===!1){let i=(await this.treePromise).get(e._fullpath);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${e._fullpath}'`);let n=i.type==="tree"?{}:Me(i.metadata);e._type=i.type==="tree"?"tree":g0(n.mode),e._mode=n.mode,i.type==="tree"?e._stat=void 0:e._stat=n}return e._stat}async content(e){}async oid(e){if(e._oid===!1){let i=(await this.treePromise).get(e._fullpath);e._oid=i.metadata.oid}return e._oid}},Vi=Symbol("GitWalkSymbol");function pu(){let t=Object.create(null);return Object.defineProperty(t,Vi,{value:function({fs:e,gitdir:r,cache:i}){return new Ia({fs:e,gitdir:r,cache:i})}}),Object.freeze(t),t}var ct=class t extends F{constructor(e){super(`Could not find ${e}.`),this.code=this.name=t.code,this.data={what:e}}};ct.code="NotFoundError";var Nt=class t extends F{constructor(e,r,i,n){super(`Object ${e} ${n?`at ${n}`:""}was anticipated to be a ${i} but it is a ${r}.`),this.code=this.name=t.code,this.data={oid:e,actual:r,expected:i,filepath:n}}};Nt.code="ObjectTypeError";var he=class t extends F{constructor(e){super(`Expected a 40-char hex object id but saw "${e}".`),this.code=this.name=t.code,this.data={value:e}}};he.code="InvalidOidError";var vi=class t extends F{constructor(e){super(`Could not find a fetch refspec for remote "${e}". Make sure the config file has an entry like the following: +[remote "${e}"] + fetch = +refs/heads/*:refs/remotes/origin/* +`),this.code=this.name=t.code,this.data={remote:e}}};vi.code="NoRefspecError";var xi=class t{constructor(e){if(this.refs=new Map,this.parsedConfig=[],e){let r=null;this.parsedConfig=e.trim().split(` +`).map(i=>{if(/^\s*#/.test(i))return{line:i,comment:!0};let n=i.indexOf(" ");if(i.startsWith("^")){let a=i.slice(1);return this.refs.set(r+"^{}",a),{line:i,ref:r,peeled:a}}else{let a=i.slice(0,n);return r=i.slice(n+1),this.refs.set(r,a),{line:i,ref:r,oid:a}}})}return this}static from(e){return new t(e)}delete(e){this.parsedConfig=this.parsedConfig.filter(r=>r.ref!==e),this.refs.delete(e)}toString(){return this.parsedConfig.map(({line:e})=>e).join(` +`)+` +`}},Ei=class t{constructor({remotePath:e,localPath:r,force:i,matchPrefix:n}){Object.assign(this,{remotePath:e,localPath:r,force:i,matchPrefix:n})}static from(e){let[r,i,n,a,o]=e.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),s=r==="+",l=n==="*";if(l!==(o==="*"))throw new I("Invalid refspec");return new t({remotePath:i,localPath:a,force:s,matchPrefix:l})}translate(e){if(this.matchPrefix){if(e.startsWith(this.remotePath))return this.localPath+e.replace(this.remotePath,"")}else if(e===this.remotePath)return this.localPath;return null}reverseTranslate(e){if(this.matchPrefix){if(e.startsWith(this.localPath))return this.remotePath+e.replace(this.localPath,"")}else if(e===this.localPath)return this.remotePath;return null}},Pa=class t{constructor(e=[]){this.rules=e}static from(e){let r=[];for(let i of e)r.push(Ei.from(i));return new t(r)}add(e){let r=Ei.from(e);this.rules.push(r)}translate(e){let r=[];for(let i of this.rules)for(let n of e){let a=i.translate(n);a&&r.push([n,a])}return r}translateOne(e){let r=null;for(let i of this.rules){let n=i.translate(e);n&&(r=n)}return r}localNamespaces(){return this.rules.filter(e=>e.matchPrefix).map(e=>e.localPath.replace(/\/$/,""))}};function y0(t,e){let r=t.replace(/\^\{\}$/,""),i=e.replace(/\^\{\}$/,""),n=-(ri);return n===0?t.endsWith("^{}")?1:-1:n}function b0(t,e){let r="",i=0,n=-1,a=0,o="\0";for(let s=0;s<=t.length;++s){if(s2){let l=r.lastIndexOf("/");l===-1?(r="",i=0):(r=r.slice(0,l),i=r.length-1-r.lastIndexOf("/")),n=s,a=0;continue}else if(r.length!==0){r="",i=0,n=s,a=0;continue}}e&&(r+=r.length>0?"/..":"..",i=2)}else r.length>0?r+="/"+t.slice(n+1,s):r=t.slice(n+1,s),i=s-n-1;n=s,a=0}else o==="."&&a!==-1?++a:a=-1}return r}function _0(t){if(!t.length)return".";let e=t[0]==="/",r=t.at(-1)==="/";return t=b0(t,!e),t.length?(r&&(t+="/"),e?`/${t}`:t):e?"/":r?"./":"."}function P(...t){if(t.length===0)return".";let e;for(let r=0;r0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":_0(e)}var v0=t=>{if(typeof t=="number")return t;t=t.toLowerCase();let e=parseInt(t);return t.endsWith("k")&&(e*=1024),t.endsWith("m")&&(e*=1024*1024),t.endsWith("g")&&(e*=1024*1024*1024),e},mr=t=>{if(typeof t=="boolean")return t;if(t=t.trim().toLowerCase(),t==="true"||t==="yes"||t==="on")return!0;if(t==="false"||t==="no"||t==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${t}`)},Ml={core:{filemode:mr,bare:mr,logallrefupdates:mr,symlinks:mr,ignorecase:mr,bigFileThreshold:v0}},x0=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,E0=/^[A-Za-z0-9-.]+$/,S0=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,k0=/^[A-Za-z][A-Za-z-]*$/,A0=/^(.*?)( *[#;].*)$/,T0=t=>{let e=x0.exec(t);if(e!=null){let[r,i]=e.slice(1);return[r,i]}return null},$0=t=>{let e=S0.exec(t);if(e!=null){let[r,i="true"]=e.slice(1),n=O0(i),a=R0(n);return[r,a]}return null},O0=t=>{let e=A0.exec(t);if(e==null)return t;let[r,i]=e.slice(1);return zl(r)&&zl(i)?`${r}${i}`:r},zl=t=>(t.match(/(?:^|[^\\])"/g)||[]).length%2!==0,R0=t=>t.split("").reduce((e,r,i,n)=>{let a=r==='"'&&n[i-1]!=="\\",o=r==="\\"&&n[i+1]==='"';return a||o?e:e+r},""),Ll=t=>t!=null?t.toLowerCase():null,Ca=(t,e,r)=>[Ll(t),e,Ll(r)].filter(i=>i!=null).join("."),Hl=t=>{let e=t.split("."),r=e.shift(),i=e.pop(),n=e.length?e.join("."):void 0;return{section:r,subsection:n,name:i,path:Ca(r,n,i),sectionPath:Ca(r,n,null),isSection:!!r}},I0=(t,e)=>t.reduce((r,i,n)=>e(i)?n:r,-1),Ba=class t{constructor(e){let r=null,i=null;this.parsedConfig=e?e.split(` +`).map(n=>{let a=null,o=null,s=n.trim(),l=T0(s),c=l!=null;if(c)[r,i]=l;else{let d=$0(s);d!=null&&([a,o]=d)}let f=Ca(r,i,a);return{line:n,isSection:c,section:r,subsection:i,name:a,value:o,path:f}}):[]}static from(e){return new t(e)}async get(e,r=!1){let i=Hl(e).path,n=this.parsedConfig.filter(a=>a.path===i).map(({section:a,name:o,value:s})=>{let l=Ml[a]&&Ml[a][o];return l?l(s):s});return r?n:n.pop()}async getall(e){return this.get(e,!0)}async getSubsections(e){return this.parsedConfig.filter(r=>r.isSection&&r.section===e).map(r=>r.subsection)}async deleteSection(e,r){this.parsedConfig=this.parsedConfig.filter(i=>!(i.section===e&&i.subsection===r))}async append(e,r){return this.set(e,r,!0)}async set(e,r,i=!1){let{section:n,subsection:a,name:o,path:s,sectionPath:l,isSection:c}=Hl(e),f=I0(this.parsedConfig,d=>d.path===s);if(r==null)f!==-1&&this.parsedConfig.splice(f,1);else if(f!==-1){let d=this.parsedConfig[f],u=Object.assign({},d,{name:o,value:r,modified:!0});i?this.parsedConfig.splice(f+1,0,u):this.parsedConfig[f]=u}else{let d=this.parsedConfig.findIndex(h=>h.path===l),u={section:n,subsection:a,name:o,value:r,modified:!0,path:s};if(E0.test(n)&&k0.test(o))if(d>=0)this.parsedConfig.splice(d+1,0,u);else{let h={isSection:c,section:n,subsection:a,modified:!0,path:l};this.parsedConfig.push(h,u)}}}toString(){return this.parsedConfig.map(({line:e,section:r,subsection:i,name:n,value:a,modified:o=!1})=>o?n!=null&&a!=null?typeof a=="string"&&/[#;]/.test(a)?` ${n} = "${a}"`:` ${n} = ${a}`:i!=null?`[${r} "${i}"]`:`[${r}]`:e).join(` +`)}},J=class{static async get({fs:e,gitdir:r}){let i=await e.read(`${r}/config`,{encoding:"utf8"});return Ba.from(i)}static async save({fs:e,gitdir:r,config:i}){await e.write(`${r}/config`,i.toString(),{encoding:"utf8"})}},gi=t=>[`${t}`,`refs/${t}`,`refs/tags/${t}`,`refs/heads/${t}`,`refs/remotes/${t}`,`refs/remotes/${t}/HEAD`],P0=["config","description","index","shallow","commondir"],va;async function Kt(t,e){return va===void 0&&(va=new yr.default),va.acquire(t,e)}var D=class t{static async updateRemoteRefs({fs:e,gitdir:r,remote:i,refs:n,symrefs:a,tags:o,refspecs:s=void 0,prune:l=!1,pruneTags:c=!1}){for(let y of n.values())if(!y.match(/[0-9a-f]{40}/))throw new he(y);let f=await J.get({fs:e,gitdir:r});if(!s){if(s=await f.getall(`remote.${i}.fetch`),s.length===0)throw new vi(i);s.unshift(`+HEAD:refs/remotes/${i}/HEAD`)}let d=Pa.from(s),u=new Map;if(c){let y=await t.listRefs({fs:e,gitdir:r,filepath:"refs/tags"});await t.deleteRefs({fs:e,gitdir:r,refs:y.map(b=>`refs/tags/${b}`)})}if(o){for(let y of n.keys())if(y.startsWith("refs/tags")&&!y.endsWith("^{}")&&!await t.exists({fs:e,gitdir:r,ref:y})){let b=n.get(y);u.set(y,b)}}let h=d.translate([...n.keys()]);for(let[y,b]of h){let v=n.get(y);u.set(b,v)}let m=d.translate([...a.keys()]);for(let[y,b]of m){let v=a.get(y),k=d.translateOne(v);k&&u.set(b,`ref: ${k}`)}let g=[];if(l){for(let y of d.localNamespaces()){let b=(await t.listRefs({fs:e,gitdir:r,filepath:y})).map(v=>`${y}/${v}`);for(let v of b)u.has(v)||g.push(v)}g.length>0&&await t.deleteRefs({fs:e,gitdir:r,refs:g})}for(let[y,b]of u)await Kt(y,async()=>e.write(P(r,y),`${b.trim()} +`,"utf8"));return{pruned:g}}static async writeRef({fs:e,gitdir:r,ref:i,value:n}){if(!n.match(/[0-9a-f]{40}/))throw new he(n);await Kt(i,async()=>e.write(P(r,i),`${n.trim()} +`,"utf8"))}static async writeSymbolicRef({fs:e,gitdir:r,ref:i,value:n}){await Kt(i,async()=>e.write(P(r,i),`ref: ${n.trim()} +`,"utf8"))}static async deleteRef({fs:e,gitdir:r,ref:i}){return t.deleteRefs({fs:e,gitdir:r,refs:[i]})}static async deleteRefs({fs:e,gitdir:r,refs:i}){await Promise.all(i.map(s=>e.rm(P(r,s))));let n=await Kt("packed-refs",async()=>e.read(`${r}/packed-refs`,{encoding:"utf8"})),a=xi.from(n),o=a.refs.size;for(let s of i)a.refs.has(s)&&a.delete(s);a.refs.sizee.write(`${r}/packed-refs`,n,{encoding:"utf8"})))}static async resolve({fs:e,gitdir:r,ref:i,depth:n=void 0}){if(n!==void 0&&(n--,n===-1))return i;if(i.startsWith("ref: "))return i=i.slice(5),t.resolve({fs:e,gitdir:r,ref:i,depth:n});if(i.length===40&&/[0-9a-f]{40}/.test(i))return i;let a=await t.packedRefs({fs:e,gitdir:r}),o=gi(i).filter(s=>!P0.includes(s));for(let s of o){let l=await Kt(s,async()=>await e.read(`${r}/${s}`,{encoding:"utf8"})||a.get(s));if(l)return t.resolve({fs:e,gitdir:r,ref:l.trim(),depth:n})}throw new ct(i)}static async exists({fs:e,gitdir:r,ref:i}){try{return await t.expand({fs:e,gitdir:r,ref:i}),!0}catch(n){return!1}}static async expand({fs:e,gitdir:r,ref:i}){if(i.length===40&&/[0-9a-f]{40}/.test(i))return i;let n=await t.packedRefs({fs:e,gitdir:r}),a=gi(i);for(let o of a)if(await Kt(o,async()=>e.exists(`${r}/${o}`))||n.has(o))return o;throw new ct(i)}static async expandAgainstMap({ref:e,map:r}){let i=gi(e);for(let n of i)if(await r.has(n))return n;throw new ct(e)}static resolveAgainstMap({ref:e,fullref:r=e,depth:i=void 0,map:n}){if(i!==void 0&&(i--,i===-1))return{fullref:r,oid:e};if(e.startsWith("ref: "))return e=e.slice(5),t.resolveAgainstMap({ref:e,fullref:r,depth:i,map:n});if(e.length===40&&/[0-9a-f]{40}/.test(e))return{fullref:r,oid:e};let a=gi(e);for(let o of a){let s=n.get(o);if(s)return t.resolveAgainstMap({ref:s.trim(),fullref:o,depth:i,map:n})}throw new ct(e)}static async packedRefs({fs:e,gitdir:r}){let i=await Kt("packed-refs",async()=>e.read(`${r}/packed-refs`,{encoding:"utf8"}));return xi.from(i).refs}static async listRefs({fs:e,gitdir:r,filepath:i}){let n=t.packedRefs({fs:e,gitdir:r}),a=null;try{a=await e.readdirDeep(`${r}/${i}`),a=a.map(o=>o.replace(`${r}/${i}/`,""))}catch(o){a=[]}for(let o of(await n).keys())o.startsWith(i)&&(o=o.replace(i+"/",""),a.includes(o)||a.push(o));return a.sort(y0),a}static async listBranches({fs:e,gitdir:r,remote:i}){return i?t.listRefs({fs:e,gitdir:r,filepath:`refs/remotes/${i}`}):t.listRefs({fs:e,gitdir:r,filepath:"refs/heads"})}static async listTags({fs:e,gitdir:r}){return(await t.listRefs({fs:e,gitdir:r,filepath:"refs/tags"})).filter(n=>!n.endsWith("^{}"))}};function C0(t,e){return Wi(Gl(t),Gl(e))}function Gl(t){return t.mode==="040000"?t.path+"/":t.path}function wu(t){switch(t){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new I(`Unexpected GitTree entry mode: ${t}`)}function B0(t){let e=[],r=0;for(;r`${e.mode} ${e.type} ${e.oid} ${e.path}`).join(` +`)}toObject(){let e=[...this._entries];return e.sort(C0),Buffer.concat(e.map(r=>{let i=Buffer.from(r.mode.replace(/^0/,"")),n=Buffer.from(" "),a=Buffer.from(r.path,"utf8"),o=Buffer.from([0]),s=Buffer.from(r.oid,"hex");return Buffer.concat([i,n,a,o,s])}))}entries(){return this._entries}*[Symbol.iterator](){for(let e of this._entries)yield e}},Le=class{static wrap({type:e,object:r}){let i=`${e} ${r.length}\0`,n=i.length,a=n+r.length,o=new Uint8Array(a);for(let s=0;s>=1,n+=8;return i}function Wl(t,e){let r=t.readUInt8(),i=128,n=15,a=112;if(r&i){let o=Zl(t,r&n,4),s=Zl(t,(r&a)>>4,3);return s===0&&(s=65536),e.slice(o,o+s)}else return t.slice(r)}function j0(t){let e=[t];return{next(){return Promise.resolve({done:e.length===0,value:e.pop()})},return(){return e=[],{}},[Symbol.asyncIterator](){return this}}}function mu(t){return t[Symbol.asyncIterator]?t[Symbol.asyncIterator]():t[Symbol.iterator]?t[Symbol.iterator]():t.next?t:j0(t)}var Si=class{constructor(e){if(typeof Buffer=="undefined")throw new Error("Missing Buffer dependency");this.stream=mu(e),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(e){if(!this.eof())return this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e),this.buffer.slice(this.undoCursor,this.cursor)}async skip(e){this.eof()||(this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:e,value:r}=await this.stream.next();return e&&(this._ended=!0,!r)?Buffer.alloc(0):(r&&(r=Buffer.from(r)),r)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(e){this.undoCursor=this.cursor,this.cursor+=e,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(e){if(this._ended)return;let r=[this.buffer];for(;this.cursor+e>M0(r);){let i=await this._next();if(this._ended)break;r.push(i)}this.buffer=Buffer.concat(r)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}};function M0(t){return t.reduce((e,r)=>e+r.length,0)}async function z0(t,e){let r=new Si(t),i=await r.read(4);if(i=i.toString("utf8"),i!=="PACK")throw new I(`Invalid PACK header '${i}'`);let n=await r.read(4);if(n=n.readUInt32BE(0),n!==2)throw new I(`Invalid packfile version: ${n}`);let a=await r.read(4);if(a=a.readUInt32BE(0),!(a<1))for(;!r.eof()&&a--;){let o=r.tell(),{type:s,length:l,ofs:c,reference:f}=await L0(r),d=new Zi.default.Inflate;for(;!d.result;){let u=await r.chunk();if(!u)break;if(d.push(u,!1),d.err)throw new I(`Pako error: ${d.msg}`);if(d.result){if(d.result.length!==l)throw new I("Inflated object size is different from that stated in packfile.");await r.undo(),await r.read(u.length-d.strm.avail_in);let h=r.tell();await e({data:d.result,type:s,num:a,offset:o,end:h,reference:f,ofs:c})}}}}async function L0(t){let e=await t.byte(),r=e>>4&7,i=e&15;if(e&128){let o=4;do e=await t.byte(),i|=(e&127)<n+1<<7|a,-1)}function Z0(t,e){let r=e,i=4,n=null;do n=t.readUInt8(),r|=(n&127)<2048*1024*1024)throw new I("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");i.seek(i.tell()+4*255);let o=i.readUInt32BE(),s=[];for(let f=0;f{f===null&&(f=S);let x=Math.floor((f-S)*100/f);x!==d&&i&&await i({phase:"Receiving objects",loaded:f-S,total:f}),d=x,b=n[b],["commit","tree","blob","tag"].includes(b)?a[k]={type:b,offset:k}:b==="ofs-delta"?a[k]={type:b,offset:k}:b==="ref-delta"&&(a[k]={type:b,offset:k})});let u=Object.keys(a).map(Number);for(let[y,b]of u.entries()){let v=y+1===u.length?e.byteLength-20:u[y+1],k=a[b],S=ou.default.buf(e.slice(b,v))>>>0;k.end=v,k.crc=S}let h=new t({pack:Promise.resolve(e),packfileSha:o,crcs:l,hashes:s,offsets:c,getExternalRefDelta:r});d=null;let m=0,g=[0,0,0,0,0,0,0,0,0,0,0,0];for(let y in a){y=Number(y);let b=Math.floor(m*100/f);b!==d&&i&&await i({phase:"Resolving deltas",loaded:m,total:f}),m++,d=b;let v=a[y];if(!v.oid)try{h.readDepth=0,h.externalReadDepth=0;let{type:k,object:S}=await h.readSlice({start:y});g[h.readDepth]+=1;let x=await Qt(Le.wrap({type:k,object:S}));v.oid=x,s.push(x),c.set(x,y),l[x]=v.crc}catch(k){continue}}return s.sort(),h}async toBuffer(){let e=[],r=(c,f)=>{e.push(Buffer.from(c,f))};r("ff744f63","hex"),r("00000002","hex");let i=new bt(Buffer.alloc(256*4));for(let c=0;c<256;c++){let f=0;for(let d of this.hashes)parseInt(d.slice(0,2),16)<=c&&f++;i.writeUInt32BE(f)}e.push(i.buffer);for(let c of this.hashes)r(c,"hex");let n=new bt(Buffer.alloc(this.hashes.length*4));for(let c of this.hashes)n.writeUInt32BE(this.crcs[c]);e.push(n.buffer);let a=new bt(Buffer.alloc(this.hashes.length*4));for(let c of this.hashes)a.writeUInt32BE(this.offsets.get(c));e.push(a.buffer),r(this.packfileSha,"hex");let o=Buffer.concat(e),s=await Qt(o),l=Buffer.alloc(20);return l.write(s,"hex"),Buffer.concat([o,l])}async load({pack:e}){this.pack=e}async unload(){this.pack=null}async read({oid:e}){if(!this.offsets.get(e)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(e);throw new I(`Could not read object ${e} from packfile`)}let r=this.offsets.get(e);return this.readSlice({start:r})}async readSlice({start:e}){if(this.offsetCache[e])return Object.assign({},this.offsetCache[e]);this.readDepth++;let r={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"},i=await this.pack;if(!i)throw new I("Could not read packfile data. The packfile may be missing, corrupted, or too large to read into memory.");let n=i.slice(e),a=new bt(n),o=a.readUInt8(),s=o&112,l=r[s];if(l===void 0)throw new I("Unrecognized type: 0b"+s.toString(2));let c=o&15,f=c;o&128&&(f=Z0(a,c));let u=null,h=null;if(l==="ofs_delta"){let g=q0(a),y=e-g;({object:u,type:l}=await this.readSlice({start:y}))}if(l==="ref_delta"){let g=a.slice(20).toString("hex");({object:u,type:l}=await this.read({oid:g}))}let m=n.slice(a.tell());if(h=Buffer.from(await gu(m)),h.byteLength!==f)throw new I(`Packfile told us object would have length ${f} but it had length ${h.byteLength}`);return u&&(h=Buffer.from(U0(h,u))),this.readDepth>3&&(this.offsetCache[e]={type:l,object:h}),{type:l,format:"content",object:h}}},yi=Symbol("PackfileCache");async function W0({fs:t,filename:e,getExternalRefDelta:r,emitter:i,emitterPrefix:n}){let a=await t.read(e);return ki.fromIdx({idx:a,getExternalRefDelta:r})}function yu({fs:t,cache:e,filename:r,getExternalRefDelta:i,emitter:n,emitterPrefix:a}){e[yi]||(e[yi]=new Map);let o=e[yi].get(r);return o||(o=W0({fs:t,filename:r,getExternalRefDelta:i,emitter:n,emitterPrefix:a}),e[yi].set(r,o)),o}async function V0(t,{start:e=0,end:r=t.length}={}){return Qt(t.subarray(e,r))}async function X0({fs:t,cache:e,gitdir:r,oid:i,format:n="content",getExternalRefDelta:a}){let o=await t.readdir(P(r,"objects/pack"));o=o.filter(s=>s.endsWith(".idx"));for(let s of o){let l=`${r}/objects/pack/${s}`,c=await yu({fs:t,cache:e,filename:l,getExternalRefDelta:a});if(c.error)throw new I(c.error);if(c.offsets.has(i)){let f=l.replace(/idx$/,"pack");c.pack||(c.pack=t.read(f));let d=await c.pack;if(!d)throw c.pack=null,new I(`Could not read packfile at ${f}. The file may be missing, corrupted, or too large to read into memory.`);if(!c._checksumVerified){let h=c.packfileSha,m=d.subarray(-20),g=Array.from(m).map(b=>b.toString(16).padStart(2,"0")).join("");if(g!==h)throw new I(`Packfile trailer mismatch: expected ${h}, got ${g}. The packfile may be corrupted.`);let y=await V0(d,{start:0,end:d.length-20});if(y!==h)throw new I(`Packfile payload corrupted: calculated ${y} but expected ${h}. The packfile may have been tampered with.`);c._checksumVerified=!0}let u=await c.read({oid:i,getExternalRefDelta:a});return u.format="content",u.source=`objects/pack/${s.replace(/idx$/,"pack")}`,u}}return null}async function K({fs:t,cache:e,gitdir:r,oid:i,format:n="content"}){let a=f=>K({fs:t,cache:e,gitdir:r,oid:f}),o;if(i==="4b825dc642cb6eb9a060e54bf8d69288fbee4904"&&(o={format:"wrapped",object:Buffer.from("tree 0\0")}),o||(o=await F0({fs:t,gitdir:r,oid:i})),!o){if(o=await X0({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:a}),!o)throw new ct(i);return o}if(n==="deflated"||(o.format==="deflated"&&(o.object=Buffer.from(await gu(o.object)),o.format="wrapped"),n==="wrapped"))return o;let s=await Qt(o.object);if(s!==i)throw new I(`SHA check failed! Expected ${i}, computed ${s}`);let{object:l,type:c}=Le.unwrap(o.object);if(o.type=c,o.object=l,o.format="content",n==="content")return o;throw new I(`invalid requested format "${n}"`)}var Ai=class t extends F{constructor(e,r,i=!0){super(`Failed to create ${e} at ${r} because it already exists.${i?` (Hint: use 'force: true' parameter to overwrite existing ${e}.)`:""}`),this.code=this.name=t.code,this.data={noun:e,where:r,canForce:i}}};Ai.code="AlreadyExistsError";var Da=class t extends F{constructor(e,r,i){super(`Found multiple ${e} matching "${r}" (${i.join(", ")}). Use a longer abbreviation length to disambiguate them.`),this.code=this.name=t.code,this.data={nouns:e,short:r,matches:i}}};Da.code="AmbiguousError";var Ti=class t extends F{constructor(e){super(`Your local changes to the following files would be overwritten by checkout: ${e.join(", ")}`),this.code=this.name=t.code,this.data={filepaths:e}}};Ti.code="CheckoutConflictError";var Na=class t extends F{constructor(e,r){super(`Cannot cherry-pick merge commit ${e}. Merge commits have ${r} parents and require specifying which parent to use as the base.`),this.code=this.name=t.code,this.data={oid:e,parentCount:r}}};Na.code="CherryPickMergeCommitError";var Fa=class t extends F{constructor(e){super(`Cannot cherry-pick root commit ${e}. Root commits have no parents.`),this.code=this.name=t.code,this.data={oid:e}}};Fa.code="CherryPickRootCommitError";var $i=class t extends F{constructor(e,r){super(`Failed to checkout "${e}" because commit ${r} is not available locally. Do a git fetch to make the branch available locally.`),this.code=this.name=t.code,this.data={ref:e,oid:r}}};$i.code="CommitNotFetchedError";var Oi=class t extends F{constructor(){super("Empty response from git server."),this.code=this.name=t.code,this.data={}}};Oi.code="EmptyServerResponseError";var Ri=class t extends F{constructor(){super("A simple fast-forward merge was not possible."),this.code=this.name=t.code,this.data={}}};Ri.code="FastForwardError";var Ii=class t extends F{constructor(e,r){super(`One or more branches were not updated: ${e}`),this.code=this.name=t.code,this.data={prettyDetails:e,result:r}}};Ii.code="GitPushError";var _r=class t extends F{constructor(e,r,i){super(`HTTP Error: ${e} ${r}`),this.code=this.name=t.code,this.data={statusCode:e,statusMessage:r,response:i}}};_r.code="HttpError";var vr=class t extends F{constructor(e){let r="invalid filepath";e==="leading-slash"||e==="trailing-slash"?r='"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.':e==="directory"&&(r='"filepath" should not be a directory.'),super(r),this.code=this.name=t.code,this.data={reason:e}}};vr.code="InvalidFilepathError";var Pi=class t extends F{constructor(e,r){super(`"${e}" would be an invalid git reference. (Hint: a valid alternative would be "${r}".)`),this.code=this.name=t.code,this.data={ref:e,suggestion:r}}};Pi.code="InvalidRefNameError";var Ci=class t extends F{constructor(e){super(`Maximum search depth of ${e} exceeded.`),this.code=this.name=t.code,this.data={depth:e}}};Ci.code="MaxDepthError";var xr=class t extends F{constructor(){super("Merges with conflicts are not supported yet."),this.code=this.name=t.code,this.data={}}};xr.code="MergeNotSupportedError";var Er=class t extends F{constructor(e,r,i,n){super(`Automatic merge failed with one or more merge conflicts in the following files: ${e.toString()}. Fix conflicts then commit the result.`),this.code=this.name=t.code,this.data={filepaths:e,bothModified:r,deleteByUs:i,deleteByTheirs:n}}};Er.code="MergeConflictError";var pe=class t extends F{constructor(e){super(`No name was provided for ${e} in the argument or in the .git/config file.`),this.code=this.name=t.code,this.data={role:e}}};pe.code="MissingNameError";var St=class t extends F{constructor(e){super(`The function requires a "${e}" parameter but none was provided.`),this.code=this.name=t.code,this.data={parameter:e}}};St.code="MissingParameterError";var He=class t extends F{constructor(e){super('There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more'),this.code=this.name=t.code,this.data={errors:e},this.errors=e}};He.code="MultipleGitError";var Ge=class t extends F{constructor(e,r){super(`Expected "${e}" but received "${r}".`),this.code=this.name=t.code,this.data={expected:e,actual:r}}};Ge.code="ParseError";var Sr=class t extends F{constructor(e){let r="";e==="not-fast-forward"?r=" because it was not a simple fast-forward":e==="tag-exists"&&(r=" because tag already exists"),super(`Push rejected${r}. Use "force: true" to override.`),this.code=this.name=t.code,this.data={reason:e}}};Sr.code="PushRejectedError";var de=class t extends F{constructor(e,r){super(`Remote does not support the "${e}" so the "${r}" parameter cannot be used.`),this.code=this.name=t.code,this.data={capability:e,parameter:r}}};de.code="RemoteCapabilityError";var Bi=class t extends F{constructor(e,r){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${e}`),this.code=this.name=t.code,this.data={preview:e,response:r}}};Bi.code="SmartHttpError";var Di=class t extends F{constructor(e,r,i){super(`Git remote "${e}" uses an unrecognized transport protocol: "${r}"`),this.code=this.name=t.code,this.data={url:e,transport:r,suggestion:i}}};Di.code="UnknownTransportError";var Ni=class t extends F{constructor(e){super(`Cannot parse remote URL: "${e}"`),this.code=this.name=t.code,this.data={url:e}}};Ni.code="UrlParseError";var kr=class t extends F{constructor(){super("The operation was canceled."),this.code=this.name=t.code,this.data={}}};kr.code="UserCanceledError";var Ua=class t extends F{constructor(e){super(`Could not merge index: Entry for '${e}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged changes.`),this.code=this.name=t.code,this.data={filepath:e}}};Ua.code="IndexResetError";var Fi=class t extends F{constructor(e){super(`"${e}" does not point to any commit. You're maybe working on a repository with no commits yet. `),this.code=this.name=t.code,this.data={ref:e}}};Fi.code="NoCommitError";function ja({name:t,email:e,timestamp:r,timezoneOffset:i}){return i=Y0(i),`${t} <${e}> ${r} ${i}`}function Y0(t){let e=K0(Q0(t));t=Math.abs(t);let r=Math.floor(t/60);t-=r*60;let i=String(r),n=String(t);return i.length<2&&(i="0"+i),n.length<2&&(n="0"+n),(e===-1?"-":"+")+i+n}function K0(t){return Math.sign(t)||(Object.is(t,-0)?-1:1)}function Q0(t){return t===0?t:-t}function Lt(t){return t=t.replace(/\r/g,""),t=t.replace(/^\n+/,""),t=t.replace(/\n+$/,"")+` +`,t}function Ui(t){let[,e,r,i,n]=t.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:e,email:r,timestamp:Number(i),timezoneOffset:J0(n)}}function J0(t){let[,e,r,i]=t.match(/(\+|-)(\d\d)(\d\d)/);return i=(e==="+"?1:-1)*(Number(r)*60+Number(i)),tm(i)}function tm(t){return t===0?t:-t}var we=class t{constructor(e){if(typeof e=="string")this._tag=e;else if(Buffer.isBuffer(e))this._tag=e.toString("utf8");else if(typeof e=="object")this._tag=t.render(e);else throw new I("invalid type passed to GitAnnotatedTag constructor")}static from(e){return new t(e)}static render(e){return`object ${e.object} +type ${e.type} +tag ${e.tag} +tagger ${ja(e.tagger)} + +${e.message} +${e.gpgsig?e.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(` + +`))}message(){let e=this.withoutSignature();return e.slice(e.indexOf(` + +`)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let e=this.justHeaders().split(` +`),r=[];for(let n of e)n[0]===" "?r[r.length-1]+=` +`+n.slice(1):r.push(n);let i={};for(let n of r){let a=n.slice(0,n.indexOf(" ")),o=n.slice(n.indexOf(" ")+1);Array.isArray(i[a])?i[a].push(o):i[a]=o}return i.tagger&&(i.tagger=Ui(i.tagger)),i.committer&&(i.committer=Ui(i.committer)),i}withoutSignature(){let e=Lt(this._tag);return e.indexOf(` +-----BEGIN PGP SIGNATURE-----`)===-1?e:e.slice(0,e.lastIndexOf(` +-----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(` +-----BEGIN PGP SIGNATURE-----`)===-1)return;let e=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return Lt(e)}payload(){return this.withoutSignature()+` +`}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(e,r,i){let n=e.payload(),{signature:a}=await r({payload:n,secretKey:i});a=Lt(a);let o=n+a;return t.from(o)}};function Ea(t){return t.trim().split(` +`).map(e=>" "+e).join(` +`)+` +`}function em(t){return t.split(` +`).map(e=>e.replace(/^ /,"")).join(` +`)}var kt=class t{constructor(e){if(typeof e=="string")this._commit=e;else if(Buffer.isBuffer(e))this._commit=e.toString("utf8");else if(typeof e=="object")this._commit=t.render(e);else throw new I("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:e,signature:r}){let i=t.justHeaders(e),n=t.justMessage(e),a=Lt(i+` +gpgsig`+Ea(r)+` +`+n);return new t(a)}static from(e){return new t(e)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return t.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(e){return Lt(e.slice(e.indexOf(` + +`)+2))}static justHeaders(e){return e.slice(0,e.indexOf(` + +`))}parseHeaders(){let e=t.justHeaders(this._commit).split(` +`),r=[];for(let n of e)n[0]===" "?r[r.length-1]+=` +`+n.slice(1):r.push(n);let i={parent:[]};for(let n of r){let a=n.slice(0,n.indexOf(" ")),o=n.slice(n.indexOf(" ")+1);Array.isArray(i[a])?i[a].push(o):i[a]=o}return i.author&&(i.author=Ui(i.author)),i.committer&&(i.committer=Ui(i.committer)),i}static renderHeaders(e){let r="";if(e.tree?r+=`tree ${e.tree} +`:r+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 +`,e.parent){if(e.parent.length===void 0)throw new I("commit 'parent' property should be an array");for(let a of e.parent)r+=`parent ${a} +`}let i=e.author;r+=`author ${ja(i)} +`;let n=e.committer||e.author;return r+=`committer ${ja(n)} +`,e.gpgsig&&(r+="gpgsig"+Ea(e.gpgsig)),r}static render(e){return t.renderHeaders(e)+` +`+Lt(e.message)}render(){return this._commit}withoutSignature(){let e=Lt(this._commit);if(e.indexOf(` +gpgsig`)===-1)return e;let r=e.slice(0,e.indexOf(` +gpgsig`)),i=e.slice(e.indexOf(`-----END PGP SIGNATURE----- +`)+28);return Lt(r+` +`+i)}isolateSignature(){let e=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return em(e)}static async sign(e,r,i){let n=e.withoutSignature(),a=t.justMessage(e._commit),{signature:o}=await r({payload:n,secretKey:i});o=Lt(o);let l=t.justHeaders(e._commit)+` +gpgsig`+Ea(o)+` +`+a;return t.from(l)}};async function ji({fs:t,cache:e,gitdir:r,oid:i}){if(i==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:Ht.from([]),oid:i};let{type:n,object:a}=await K({fs:t,cache:e,gitdir:r,oid:i});if(n==="tag")return i=we.from(a).parse().object,ji({fs:t,cache:e,gitdir:r,oid:i});if(n==="commit")return i=kt.from(a).parse().tree,ji({fs:t,cache:e,gitdir:r,oid:i});if(n!=="tree")throw new Nt(i,n,"tree");return{tree:Ht.from(a),oid:i}}var Ma=class{constructor({fs:e,gitdir:r,ref:i,cache:n}){this.fs=e,this.cache=n,this.gitdir=r,this.mapPromise=(async()=>{let o=new Map,s;try{s=await D.resolve({fs:e,gitdir:r,ref:i})}catch(c){c instanceof ct&&(s="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let l=await ji({fs:e,cache:this.cache,gitdir:r,oid:s});return l.type="tree",l.mode="40000",o.set(".",l),o})();let a=this;this.ConstructEntry=class{constructor(s){this._fullpath=s,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(e){let r=e._fullpath,{fs:i,cache:n,gitdir:a}=this,o=await this.mapPromise,s=o.get(r);if(!s)throw new Error(`No obj for ${r}`);let l=s.oid;if(!l)throw new Error(`No oid for obj ${JSON.stringify(s)}`);if(s.type!=="tree")return null;let{type:c,object:f}=await K({fs:i,cache:n,gitdir:a,oid:l});if(c!==s.type)throw new Nt(l,c,s.type);let d=Ht.from(f);for(let u of d)o.set(P(r,u.path),u);return d.entries().map(u=>P(r,u.path))}async type(e){if(e._type===!1){let r=await this.mapPromise,{type:i}=r.get(e._fullpath);e._type=i}return e._type}async mode(e){if(e._mode===!1){let r=await this.mapPromise,{mode:i}=r.get(e._fullpath);e._mode=uu(parseInt(i,8))}return e._mode}async stat(e){}async content(e){if(e._content===!1){let r=await this.mapPromise,{fs:i,cache:n,gitdir:a}=this,s=r.get(e._fullpath).oid,{type:l,object:c}=await K({fs:i,cache:n,gitdir:a,oid:s});l!=="blob"?e._content=void 0:e._content=new Uint8Array(c)}return e._content}async oid(e){if(e._oid===!1){let i=(await this.mapPromise).get(e._fullpath);e._oid=i.oid}return e._oid}};function Fe({ref:t="HEAD"}={}){let e=Object.create(null);return Object.defineProperty(e,Vi,{value:function({fs:r,gitdir:i,cache:n}){return new Ma({fs:r,gitdir:i,ref:t,cache:n})}}),Object.freeze(e),e}var za=class{constructor({fs:e,dir:r,gitdir:i,cache:n,refresh:a=!0}){this.fs=e,this.cache=n,this.dir=r,this.gitdir=i,this.refresh=a,this.config=null;let o=this;this.ConstructEntry=class{constructor(l){this._fullpath=l,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return o.type(this)}async mode(){return o.mode(this)}async stat(){return o.stat(this)}async content(){return o.content(this)}async oid(){return o.oid(this)}}}async readdir(e){let r=e._fullpath,{fs:i,dir:n}=this,a=await i.readdir(P(n,r));return a===null?null:a.map(o=>P(r,o))}async type(e){return e._type===!1&&await e.stat(),e._type}async mode(e){return e._mode===!1&&await e.stat(),e._mode}async stat(e){if(e._stat===!1){let{fs:r,dir:i}=this,n=await r.lstat(`${i}/${e._fullpath}`);if(!n)throw new Error(`ENOENT: no such file or directory, lstat '${e._fullpath}'`);let a=n.isDirectory()?"tree":"blob";a==="blob"&&!n.isFile()&&!n.isSymbolicLink()&&(a="special"),e._type=a,n=Me(n),e._mode=n.mode,n.size===-1&&e._actualSize&&(n.size=e._actualSize),e._stat=n}return e._stat}async content(e){if(e._content===!1){let{fs:r,dir:i,gitdir:n}=this;if(await e.type()==="tree")e._content=void 0;else{let a;if(await e.mode()>>12===10)a=await r.readlink(`${i}/${e._fullpath}`);else{let s=await(await this._getGitConfig(r,n)).get("core.autocrlf");a=await r.read(`${i}/${e._fullpath}`,{autocrlf:s})}e._actualSize=a.length,e._stat&&e._stat.size===-1&&(e._stat.size=e._actualSize),e._content=new Uint8Array(a)}}return e._content}async oid(e){if(e._oid===!1){let r=this,{fs:i,gitdir:n,cache:a}=this,o;await _t.acquire({fs:i,gitdir:n,cache:a},async function(s){let l=s.entriesMap.get(e._fullpath),c=await e.stat(),d=await(await r._getGitConfig(i,n)).get("core.filemode"),u=typeof process!="undefined"?process.platform!=="win32":!0;if(!l||Ra(c,l,d,u)){let h=await e.content();h===void 0?o=void 0:(o=await Qt(Le.wrap({type:"blob",object:h})),r.refresh&&l&&o===l.oid&&(!d||c.mode===l.mode)&&Ra(c,l,d,u)&&s.insert({filepath:e._fullpath,stats:c,oid:o}))}else o=l.oid}),e._oid=o}return e._oid}async _getGitConfig(e,r){return this.config?this.config:(this.config=await J.get({fs:e,gitdir:r}),this.config)}};function bu({refresh:t=!0}={}){let e=Object.create(null);return Object.defineProperty(e,Vi,{value:function({fs:r,dir:i,gitdir:n,cache:a}){return new za({fs:r,dir:i,gitdir:n,cache:a,refresh:t})}}),Object.freeze(e),e}function rm(t,e){let r=e-t;return Array.from({length:r},(i,n)=>t+n)}var _u=typeof Array.prototype.flat=="undefined"?t=>t.reduce((e,r)=>e.concat(r),[]):t=>t.flat(),La=class{constructor(){this.value=null}consider(e){e!=null&&(this.value===null?this.value=e:ec,reduce:o=async(l,c)=>{let f=_u(c);return l!==void 0&&f.unshift(l),f},iterate:s=(l,c)=>Promise.all([...c].map(l))}){let l=n.map(h=>h[Vi]({fs:t,dir:r,gitdir:i,cache:e})),c=new Array(l.length).fill("."),f=rm(0,l.length),d=async h=>{f.forEach(y=>{let b=h[y];h[y]=b&&new l[y].ConstructEntry(b)});let g=(await Promise.all(f.map(y=>{let b=h[y];return b?l[y].readdir(b):[]}))).map(y=>(y===null?[]:y)[Symbol.iterator]());return{entries:h,children:im(g)}},u=async h=>{let{entries:m,children:g}=await d(h),y=m.find(v=>v&&v._fullpath)._fullpath,b=await a(y,m);if(b!==null){let v=await s(u,g);return v=v.filter(k=>k!==void 0),o(b,v)}};return u(c)}async function Ha(t,e){let r=await t.readdir(e);r==null?await t.rm(e):r.length?await Promise.all(r.map(i=>{let n=P(e,i);return t.lstat(n).then(a=>{if(a)return a.isDirectory()?Ha(t,n):t.rm(n)})})).then(()=>t.rmdir(e)):await t.rmdir(e)}function nm(t){return am(t)&&Vl(t.then)&&Vl(t.catch)}function am(t){return t&&typeof t=="object"}function Vl(t){return typeof t=="function"}function Xl(t){return nm((r=>{try{return r.readFile().catch(i=>i)}catch(i){return i}})(t))}var Yl=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function Kl(t,e){if(Xl(e))for(let r of Yl)t[`_${r}`]=e[r].bind(e);else for(let r of Yl)t[`_${r}`]=(0,gr.default)(e[r].bind(e));Xl(e)?(e.cp&&(t._cp=e.cp.bind(e)),e.rm?t._rm=e.rm.bind(e):e.rmdir.length>1?t._rm=e.rmdir.bind(e):t._rm=Ha.bind(null,t)):(e.cp&&(t._cp=(0,gr.default)(e.cp.bind(e))),e.rm?t._rm=(0,gr.default)(e.rm.bind(e)):e.rmdir.length>2?t._rm=(0,gr.default)(e.rmdir.bind(e)):t._rm=Ha.bind(null,t))}var nt=class{constructor(e){if(typeof e._original_unwrapped_fs!="undefined")return e;let r=Object.getOwnPropertyDescriptor(e,"promises");r&&r.enumerable?Kl(this,e.promises):Kl(this,e),this._original_unwrapped_fs=e}async exists(e,r={}){try{return await this._stat(e),!0}catch(i){if(i.code==="ENOENT"||i.code==="ENOTDIR"||(i.code||"").includes("ENS"))return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',i),i}}async read(e,r={}){try{let i=await this._readFile(e,r);if(r.autocrlf==="true")try{i=new TextDecoder("utf8",{fatal:!0}).decode(i),i=i.replace(/\r\n/g,` +`),i=new TextEncoder().encode(i)}catch(n){}return typeof i!="string"&&(i=Buffer.from(i)),i}catch(i){return null}}async write(e,r,i={}){try{await this._writeFile(e,r,i)}catch(n){await this.mkdir(ze(e)),await this._writeFile(e,r,i)}}async mkdir(e,r=!1){try{await this._mkdir(e)}catch(i){if(i===null||i.code==="EEXIST")return;if(r)throw i;if(i.code==="ENOENT"){let n=ze(e);if(n==="."||n==="/"||n===e)throw i;await this.mkdir(n),await this.mkdir(e,!0)}}}async rm(e){try{await this._unlink(e)}catch(r){if(r.code!=="ENOENT")throw r}}async rmdir(e,r){try{r&&r.recursive?await this._rm(e,r):await this._rmdir(e)}catch(i){if(i.code!=="ENOENT")throw i}}async readdir(e){try{let r=await this._readdir(e);return r.sort(Wi),r}catch(r){return r.code==="ENOTDIR"?null:[]}}async readdirDeep(e){let r=await this._readdir(e);return(await Promise.all(r.map(async n=>{let a=e+"/"+n;return(await this._stat(a)).isDirectory()?this.readdirDeep(a):a}))).reduce((n,a)=>n.concat(a),[])}async lstat(e){try{return await this._lstat(e)}catch(r){if(r.code==="ENOENT"||(r.code||"").includes("ENS"))return null;throw r}}async readlink(e,r={encoding:"buffer"}){try{let i=await this._readlink(e,r);return Buffer.isBuffer(i)?i:Buffer.from(i)}catch(i){if(i.code==="ENOENT"||(i.code||"").includes("ENS"))return null;throw i}}async writelink(e,r){return this._symlink(r.toString("utf8"),e)}};function C(t,e){if(e===void 0)throw new St(t)}function om(t){return t.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(t)}async function dt({fsp:t,dotgit:e}){C("fsp",t),C("dotgit",e);let r=await t._stat(e).catch(()=>({isFile:()=>!1,isDirectory:()=>!1}));return r.isDirectory()?e:r.isFile()?t._readFile(e,"utf8").then(i=>i.trimRight().substr(8)).then(i=>om(i)?i:P(ze(e),i)):e}async function Ql(t,e){return!t&&!e?!1:t&&!e||!t&&e?!0:!(await t.type()==="tree"&&await e.type()==="tree"||await t.type()===await e.type()&&await t.mode()===await e.mode()&&await t.oid()===await e.oid())}var zi=class{static async isIgnored({fs:e,dir:r,gitdir:i=P(r,".git"),filepath:n}){if(_i(n)===".git")return!0;if(n===".")return!1;let a="",o=P(i,"info","exclude");await e.exists(o)&&(a=await e.read(o,"utf8"));let s=[{gitignore:P(r,".gitignore"),filepath:n}],l=n.split("/").filter(Boolean);for(let f=1;f{let d=await(await J.get({fs:s,gitdir:l})).get("core.autocrlf");return Ga({dir:e,gitdir:l,fs:s,filepath:i,index:c,force:a,parallel:o,autocrlf:d})})}catch(s){throw s.caller="git.add",s}}async function Ga({dir:t,gitdir:e,fs:r,filepath:i,index:n,force:a,parallel:o,autocrlf:s}){i=Array.isArray(i)?i:[i];let l=i.map(async u=>{if(!a&&await zi.isIgnored({fs:r,dir:t,gitdir:e,filepath:u}))return;let h=await r.lstat(P(t,u));if(!h)throw new ct(u);if(h.isDirectory()){let m=await r.readdir(P(t,u));if(o){let g=m.map(y=>Ga({dir:t,gitdir:e,fs:r,filepath:[P(u,y)],index:n,force:a,parallel:o,autocrlf:s}));await Promise.all(g)}else for(let g of m)await Ga({dir:t,gitdir:e,fs:r,filepath:[P(u,g)],index:n,force:a,parallel:o,autocrlf:s})}else{let m=h.isSymbolicLink()?await r.readlink(P(t,u)).then(lm):await r.read(P(t,u),{autocrlf:s});if(m===null)throw new ct(u);let g=await Ar({fs:r,gitdir:e,type:"blob",object:m});n.insert({filepath:u,stats:h,oid:g})}}),c=await Promise.allSettled(l),f=c.filter(u=>u.status==="rejected").map(u=>u.reason);if(f.length>1)throw new He(f);if(f.length===1)throw f[0];return c.filter(u=>u.status==="fulfilled"&&u.value).map(u=>u.value)}async function Li({fs:t,gitdir:e,path:r}){return(await J.get({fs:t,gitdir:e})).get(r)}function xu(t,...e){for(let r of e)if(r)for(let i of Object.keys(r)){let n=r[i];n!==void 0&&(t[i]=n)}return t}async function qa({fs:t,gitdir:e,author:r,commit:i}){let n=Math.floor(Date.now()/1e3),a={name:await Li({fs:t,gitdir:e,path:"user.name"}),email:await Li({fs:t,gitdir:e,path:"user.email"})||"",timestamp:n,timezoneOffset:new Date(n*1e3).getTimezoneOffset()},o=xu({},a,i?i.author:void 0,r);if(o.name!==void 0)return o}async function Za({fs:t,gitdir:e,author:r,committer:i,commit:n}){let a=Math.floor(Date.now()/1e3),o={name:await Li({fs:t,gitdir:e,path:"user.name"}),email:await Li({fs:t,gitdir:e,path:"user.email"})||"",timestamp:a,timezoneOffset:new Date(a*1e3).getTimezoneOffset()},s=xu({},o,n?n.committer:void 0,r,i);if(s.name!==void 0)return s}async function Eu({fs:t,cache:e,gitdir:r,oid:i}){let{type:n,object:a}=await K({fs:t,cache:e,gitdir:r,oid:i});if(n==="tag")return i=we.from(a).parse().object,Eu({fs:t,cache:e,gitdir:r,oid:i});if(n!=="commit")throw new Nt(i,n,"commit");return{commit:kt.from(a),oid:i}}async function um({fs:t,cache:e,gitdir:r,oid:i}){let{commit:n,oid:a}=await Eu({fs:t,cache:e,gitdir:r,oid:i});return{oid:a,commit:n.parse(),payload:n.withoutSignature()}}async function Su({fs:t,cache:e,onSign:r,gitdir:i,message:n,author:a,committer:o,signingKey:s,amend:l=!1,dryRun:c=!1,noUpdateBranch:f=!1,ref:d,parent:u,tree:h}){let m=!1,g=!1;d||(g=!(await t.read(`${i}/HEAD`,{encoding:"utf8"})).startsWith("ref:"),d=await D.resolve({fs:t,gitdir:i,ref:"HEAD",depth:2}));let y,b;try{y=await D.resolve({fs:t,gitdir:i,ref:d}),b=await um({fs:t,gitdir:i,oid:y,cache:{}})}catch(S){m=!0}if(l&&m)throw new Fi(d);let v=l?await qa({fs:t,gitdir:i,author:a,commit:b.commit}):await qa({fs:t,gitdir:i,author:a});if(!v)throw new pe("author");let k=l?await Za({fs:t,gitdir:i,author:v,committer:o,commit:b.commit}):await Za({fs:t,gitdir:i,author:v,committer:o});if(!k)throw new pe("committer");return _t.acquire({fs:t,gitdir:i,cache:e,allowUnmerged:!1},async function(S){let T=hu(S.entries).get(".");if(h||(h=await ku({fs:t,gitdir:i,inode:T,dryRun:c})),u?u=await Promise.all(u.map(w=>D.resolve({fs:t,gitdir:i,ref:w}))):l?u=b.commit.parent:u=y?[y]:[],!n)if(l)n=b.commit.message;else throw new St("message");let p=kt.from({tree:h,parent:u,author:v,committer:k,message:n});s&&(p=await kt.sign(p,r,s));let _=await Ar({fs:t,gitdir:i,type:"commit",object:p.toObject(),dryRun:c});return!f&&!c&&await D.writeRef({fs:t,gitdir:i,ref:g?"HEAD":d,value:_}),_})}async function ku({fs:t,gitdir:e,inode:r,dryRun:i}){let n=r.children;for(let l of n)l.type==="tree"&&(l.metadata.mode="040000",l.metadata.oid=await ku({fs:t,gitdir:e,inode:l,dryRun:i}));let a=n.map(l=>({mode:l.metadata.mode,path:l.basename,oid:l.metadata.oid,type:l.type})),o=Ht.from(a);return await Ar({fs:t,gitdir:e,type:"tree",object:o.toObject(),dryRun:i})}async function dm({fs:t,cache:e,gitdir:r,oid:i,filepath:n}){if(n.startsWith("/"))throw new vr("leading-slash");if(n.endsWith("/"))throw new vr("trailing-slash");let a=i,o=await ji({fs:t,cache:e,gitdir:r,oid:i}),s=o.tree;if(n==="")i=o.oid;else{let l=n.split("/");i=await Au({fs:t,cache:e,gitdir:r,tree:s,pathArray:l,oid:a,filepath:n})}return i}async function Au({fs:t,cache:e,gitdir:r,tree:i,pathArray:n,oid:a,filepath:o}){let s=n.shift();for(let l of i)if(l.path===s){if(n.length===0)return l.oid;{let{type:c,object:f}=await K({fs:t,cache:e,gitdir:r,oid:l.oid});if(c!=="tree")throw new Nt(a,c,"tree",o);return i=Ht.from(f),Au({fs:t,cache:e,gitdir:r,tree:i,pathArray:n,oid:a,filepath:o})}}throw new ct(`file or directory found at "${a}:${o}"`)}var hm=/(^|[/.])([/.]|$)|^@$|@{|[\x00-\x20\x7f~^:?*[\\]|\.lock(\/|$)/;function pm(t,e){if(typeof t!="string")throw new TypeError("Reference name must be a string");return!hm.test(t)&&(!!e||t.includes("/"))}async function Tu({fs:t,gitdir:e,remote:r,url:i,force:n}){if(!pm(r,!0))throw new Pi(r,cu.default.clean(r));let a=await J.get({fs:t,gitdir:e});if(!n&&(await a.getSubsections("remote")).includes(r)&&i!==await a.get(`remote.${r}.url`))throw new Ai("remote",r);await a.set(`remote.${r}.url`,i),await a.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),await J.save({fs:t,gitdir:e,config:a})}async function $u({fs:t,dir:e,gitdir:r=P(e,".git"),remote:i,url:n,force:a=!1}){try{C("fs",t),C("gitdir",r),C("remote",i),C("url",n);let o=new nt(t),s=await dt({fsp:o,dotgit:r});return await Tu({fs:o,gitdir:s,remote:i,url:n,force:a})}catch(o){throw o.caller="git.addRemote",o}}var Ou=(t,e)=>t==="."||e==null||e.length===0||e==="."?!0:e.length>=t.length?e.startsWith(t):t.startsWith(e);async function wm({fs:t,cache:e,onProgress:r,onPostCheckout:i,dir:n,gitdir:a,remote:o,ref:s,filepaths:l,noCheckout:c,noUpdateHead:f,dryRun:d,force:u,track:h=!0,nonBlocking:m=!1,batchSize:g=100}){let y;if(i)try{y=await D.resolve({fs:t,gitdir:a,ref:"HEAD"})}catch(v){y="0000000000000000000000000000000000000000"}let b;try{b=await D.resolve({fs:t,gitdir:a,ref:s})}catch(v){if(s==="HEAD")throw v;let k=`${o}/${s}`;if(b=await D.resolve({fs:t,gitdir:a,ref:k}),h){let S=await J.get({fs:t,gitdir:a});await S.set(`branch.${s}.remote`,o),await S.set(`branch.${s}.merge`,`refs/heads/${s}`),await J.save({fs:t,gitdir:a,config:S})}await D.writeRef({fs:t,gitdir:a,ref:`refs/heads/${s}`,value:b})}if(!c){let v;try{v=await mm({fs:t,cache:e,onProgress:r,dir:n,gitdir:a,ref:s,force:u,filepaths:l})}catch(p){throw p instanceof ct&&p.data.what===b?new $i(s,b):p}let k=v.filter(([p])=>p==="conflict").map(([p,_])=>_);if(k.length>0)throw new Ti(k);let S=v.filter(([p])=>p==="error").map(([p,_])=>_);if(S.length>0)throw new I(S.join(", "));if(d){i&&await i({previousHead:y,newHead:b,type:l!=null&&l.length>0?"file":"branch"});return}let x=0,T=v.length;if(await _t.acquire({fs:t,gitdir:a,cache:e},async function(p){await Promise.all(v.filter(([_])=>_==="delete"||_==="delete-index").map(async function([_,w]){let A=`${n}/${w}`;_==="delete"&&await t.rm(A),p.delete({filepath:w}),r&&await r({phase:"Updating workdir",loaded:++x,total:T})}))}),await _t.acquire({fs:t,gitdir:a,cache:e},async function(p){for(let[_,w]of v)if(_==="rmdir"||_==="rmdir-index"){let A=`${n}/${w}`;try{_==="rmdir"&&await t.rmdir(A),p.delete({filepath:w}),r&&await r({phase:"Updating workdir",loaded:++x,total:T})}catch(E){if(E.code==="ENOTEMPTY")console.log(`Did not delete ${w} because directory is not empty`);else throw E}}}),await Promise.all(v.filter(([p])=>p==="mkdir"||p==="mkdir-index").map(async function([p,_]){let w=`${n}/${_}`;await t.mkdir(w),r&&await r({phase:"Updating workdir",loaded:++x,total:T})})),m){let p=v.filter(([w])=>w==="create"||w==="create-index"||w==="update"||w==="mkdir-index"),_=await Jl("Update Working Dir",p.map(([w,A,E,$,R])=>()=>ym({fs:t,cache:e,gitdir:a,dir:n},[w,A,E,$,R])),r,g);await _t.acquire({fs:t,gitdir:a,cache:e,allowUnmerged:!0},async function(w){await Jl("Update Index",_.map(([A,E,$])=>()=>gm({index:w,fullpath:A,oid:E,stats:$})),r,g)})}else await _t.acquire({fs:t,gitdir:a,cache:e,allowUnmerged:!0},async function(p){var A,E;let _=await Promise.allSettled(v.filter(([$])=>$==="create"||$==="create-index"||$==="update"||$==="mkdir-index").map(async function([$,R,B,H,ht]){let W=`${n}/${R}`;if($!=="create-index"&&$!=="mkdir-index"){let{object:Jt}=await K({fs:t,cache:e,gitdir:a,oid:B});if(ht&&await t.rm(W),H===33188)await t.write(W,Jt);else if(H===33261)await t.write(W,Jt,{mode:511});else if(H===40960)await t.writelink(W,Jt);else throw new I(`Invalid mode 0o${H.toString(8)} detected in blob ${B}`)}let tt=await t.lstat(W);H===33261&&(tt.mode=493),$==="mkdir-index"&&(tt.mode=57344),p.insert({filepath:R,stats:tt,oid:B}),r&&await r({phase:"Updating workdir",loaded:++x,total:T})})),w=[];for(let $ of _)$.status==="rejected"&&(w.push($.reason),console.error("[isomorphic-git checkout] task rejected:",(E=(A=$.reason)==null?void 0:A.stack)!=null?E:$.reason));if(w.length>0)throw new He(w)});i&&await i({previousHead:y,newHead:b,type:l!=null&&l.length>0?"file":"branch"})}if(!f){let v=await D.expand({fs:t,gitdir:a,ref:s});v.startsWith("refs/heads")?await D.writeSymbolicRef({fs:t,gitdir:a,ref:"HEAD",value:v}):await D.writeRef({fs:t,gitdir:a,ref:"HEAD",value:b})}}async function mm({fs:t,cache:e,onProgress:r,dir:i,gitdir:n,ref:a,force:o,filepaths:s}){let l=0;return Mi({fs:t,cache:e,dir:i,gitdir:n,trees:[Fe({ref:a}),bu(),pu()],map:async function(c,[f,d,u]){if(c===".")return;if(s&&!s.some(m=>Ou(c,m)))return null;switch(r&&await r({phase:"Analyzing workdir",loaded:++l}),[!!u,!!f,!!d].map(Number).join("")){case"000":return;case"001":return o&&s&&s.includes(c)?["delete",c]:void 0;case"010":switch(await f.type()){case"tree":return["mkdir",c];case"blob":return["create",c,await f.oid(),await f.mode()];case"commit":return["mkdir-index",c,await f.oid(),await f.mode()];default:return["error",`new entry Unhandled type ${await f.type()}`]}case"011":switch(`${await f.type()}-${await d.type()}`){case"tree-tree":return;case"tree-blob":case"blob-tree":return["conflict",c];case"blob-blob":return await f.oid()!==await d.oid()?o?["update",c,await f.oid(),await f.mode(),await f.mode()!==await d.mode()]:["conflict",c]:await f.mode()!==await d.mode()?o?["update",c,await f.oid(),await f.mode(),!0]:["conflict",c]:["create-index",c,await f.oid(),await f.mode()];case"commit-tree":return;case"commit-blob":return["conflict",c];default:return["error",`new entry Unhandled type ${f.type}`]}case"100":return["delete-index",c];case"101":switch(await u.type()){case"tree":return["rmdir-index",c];case"blob":return await u.oid()!==await d.oid()?o?["delete",c]:["conflict",c]:["delete",c];case"commit":return["rmdir-index",c];default:return["error",`delete entry Unhandled type ${await u.type()}`]}case"110":case"111":switch(`${await u.type()}-${await f.type()}`){case"tree-tree":return;case"blob-blob":{if(await u.oid()===await f.oid()&&await u.mode()===await f.mode()&&!o)return;if(d){if(await d.oid()!==await u.oid()&&await d.oid()!==await f.oid())return o?["update",c,await f.oid(),await f.mode(),await f.mode()!==await d.mode()]:["conflict",c]}else if(o)return["update",c,await f.oid(),await f.mode(),await f.mode()!==await u.mode()];return await f.mode()!==await u.mode()?["update",c,await f.oid(),await f.mode(),!0]:await f.oid()!==await u.oid()?["update",c,await f.oid(),await f.mode(),!1]:void 0}case"tree-blob":return["update-dir-to-blob",c,await f.oid()];case"blob-tree":return["update-blob-to-tree",c];case"commit-commit":return["mkdir-index",c,await f.oid(),await f.mode()];default:return["error",`update entry Unhandled type ${await u.type()}-${await f.type()}`]}}},reduce:async function(c,f){return f=_u(f),c?c&&c[0]==="rmdir"?(f.push(c),f):(f.unshift(c),f):f}})}async function gm({index:t,fullpath:e,stats:r,oid:i}){try{t.insert({filepath:e,stats:r,oid:i})}catch(n){console.warn(`Error inserting ${e} into index:`,n)}}async function ym({fs:t,cache:e,gitdir:r,dir:i},[n,a,o,s,l]){let c=`${i}/${a}`;if(n!=="create-index"&&n!=="mkdir-index"){let{object:d}=await K({fs:t,cache:e,gitdir:r,oid:o});if(l&&await t.rm(c),s===33188)await t.write(c,d);else if(s===33261)await t.write(c,d,{mode:511});else if(s===40960)await t.writelink(c,d);else throw new I(`Invalid mode 0o${s.toString(8)} detected in blob ${o}`)}let f=await t.lstat(c);return s===33261&&(f.mode=493),n==="mkdir-index"&&(f.mode=57344),[a,o,f]}async function Jl(t,e,r,i){let n=[],a=[];for(let o=0;oc());(await Promise.allSettled(s)).forEach(c=>{var f,d;c.status==="fulfilled"?n.push(c.value):(a.push(c.reason),console.error(`[isomorphic-git ${t}] task rejected:`,(d=(f=c.reason)==null?void 0:f.stack)!=null?d:c.reason))}),r&&await r({phase:"Updating workdir",loaded:o+s.length,total:e.length})}if(a.length>0)throw new He(a);return n}var ka=/^.*(\r?\n|$)/gm;function bm({branches:t,contents:e}){let r=t[1],i=t[2],n=e[0],a=e[1],o=e[2],s=a.match(ka),l=n.match(ka),c=o.match(ka),f=(0,fu.default)(s,l,c),d=7,u="",h=!0;for(let m of f)m.ok&&(u+=m.ok.join("")),m.conflict&&(h=!1,u+=`${"<".repeat(d)} ${r} +`,u+=m.conflict.a.join(""),u+=`${"=".repeat(d)} +`,u+=m.conflict.b.join(""),u+=`${">".repeat(d)} ${i} +`);return{cleanMerge:h,mergedText:u}}async function _m({fs:t,cache:e,dir:r,gitdir:i=P(r,".git"),index:n,ourOid:a,baseOid:o,theirOid:s,ourName:l="ours",baseName:c="base",theirName:f="theirs",dryRun:d=!1,abortOnConflict:u=!0,mergeDriver:h}){let m=Fe({ref:a}),g=Fe({ref:o}),y=Fe({ref:s}),b=[],v=[],k=[],S=[],x=await Mi({fs:t,cache:e,dir:r,gitdir:i,trees:[m,g,y],map:async function(T,[p,_,w]){let A=_i(T),E=await Ql(p,_),$=await Ql(w,_);switch(`${E}-${$}`){case"false-false":return{mode:await _.mode(),path:A,oid:await _.oid(),type:await _.type()};case"false-true":return!w&&await p.type()==="tree"?{mode:await p.mode(),path:A,oid:await p.oid(),type:await p.type()}:w?{mode:await w.mode(),path:A,oid:await w.oid(),type:await w.type()}:void 0;case"true-false":return!p&&await w.type()==="tree"?{mode:await w.mode(),path:A,oid:await w.oid(),type:await w.type()}:p?{mode:await p.mode(),path:A,oid:await p.oid(),type:await p.type()}:void 0;case"true-true":{if(p&&w&&await p.type()==="tree"&&await w.type()==="tree")return{mode:await p.mode(),path:A,oid:await p.oid(),type:"tree"};if(p&&w&&await p.type()==="blob"&&await w.type()==="blob")return vm({fs:t,gitdir:i,path:A,ours:p,base:_,theirs:w,ourName:l,baseName:c,theirName:f,mergeDriver:h}).then(async R=>{if(R.cleanMerge)u||n.insert({filepath:T,oid:R.mergeResult.oid,stage:0});else if(b.push(T),v.push(T),!u){let B="";_&&await _.type()==="blob"&&(B=await _.oid());let H=await p.oid(),ht=await w.oid();n.delete({filepath:T}),B&&n.insert({filepath:T,oid:B,stage:1}),n.insert({filepath:T,oid:H,stage:2}),n.insert({filepath:T,oid:ht,stage:3})}return R.mergeResult});if(_&&!p&&w&&await _.type()==="blob"&&await w.type()==="blob"){if(b.push(T),k.push(T),!u){let R=await _.oid(),B=await w.oid();n.delete({filepath:T}),n.insert({filepath:T,oid:R,stage:1}),n.insert({filepath:T,oid:B,stage:3})}return{mode:await w.mode(),oid:await w.oid(),type:"blob",path:A}}if(_&&p&&!w&&await _.type()==="blob"&&await p.type()==="blob"){if(b.push(T),S.push(T),!u){let R=await _.oid(),B=await p.oid();n.delete({filepath:T}),n.insert({filepath:T,oid:R,stage:1}),n.insert({filepath:T,oid:B,stage:2})}return{mode:await p.mode(),oid:await p.oid(),type:"blob",path:A}}if(_&&!p&&!w&&(await _.type()==="blob"||await _.type()==="tree"))return;throw new xr}}},reduce:b.length!==0&&(!r||u)?void 0:async(T,p)=>{let _=p.filter(Boolean);if(T&&!(T&&T.type==="tree"&&_.length===0&&T.path!==".")){if(_.length>0||T.path==="."&&_.length===0){let A=new Ht(_).toObject(),E=await Ar({fs:t,gitdir:i,type:"tree",object:A,dryRun:d});T.oid=E}return T}}});return b.length!==0?(r&&!u&&await Mi({fs:t,cache:e,dir:r,gitdir:i,trees:[Fe({ref:x.oid})],map:async function(T,[p]){let _=`${r}/${T}`;if(await p.type()==="blob"){let w=await p.mode(),A=new TextDecoder().decode(await p.content());await t.write(_,A,{mode:w})}return!0}}),new Er(b,v,k,S)):x.oid}async function vm({fs:t,gitdir:e,path:r,ours:i,base:n,theirs:a,ourName:o,theirName:s,baseName:l,dryRun:c,mergeDriver:f=bm}){let d="blob",u="100755",h="",m="";n&&await n.type()==="blob"&&(u=await n.mode(),h=await n.oid(),m=Buffer.from(await n.content()).toString("utf8"));let g=u===await i.mode()?await a.mode():await i.mode();if(await i.oid()===await a.oid())return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await i.oid(),type:d}};if(await i.oid()===h)return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await a.oid(),type:d}};if(await a.oid()===h)return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await i.oid(),type:d}};let y=Buffer.from(await i.content()).toString("utf8"),b=Buffer.from(await a.content()).toString("utf8"),{mergedText:v,cleanMerge:k}=await f({branches:[l,o,s],contents:[m,y,b],path:r}),S=await Ar({fs:t,gitdir:e,type:"blob",object:Buffer.from(v,"utf8"),dryRun:c});return{cleanMerge:k,mergeResult:{mode:g,path:r,oid:S,type:d}}}var xm=/^refs\/(heads\/|tags\/|remotes\/)?(.*)/;function Ue(t){let e=xm.exec(t);return e?e[1]==="remotes/"&&t.endsWith("/HEAD")?e[2].slice(0,-5):e[2]:t}async function Ya({fs:t,gitdir:e,fullname:r=!1,test:i=!1}){let n=await D.resolve({fs:t,gitdir:e,ref:"HEAD",depth:2});if(i)try{await D.resolve({fs:t,gitdir:e,ref:n})}catch(a){return}if(n.startsWith("refs/"))return r?n:Ue(n)}function Em(t){return t=t.replace(/^git@([^:]+):/,"https://$1/"),t=t.replace(/^ssh:\/\//,"https://"),t}function Ru({username:t="",password:e=""}){return`Basic ${Buffer.from(`${t}:${e}`).toString("base64")}`}async function Tr(t,e){let r=mu(t);for(;;){let{value:i,done:n}=await r.next();if(i&&await e(i),n)break}r.return&&r.return()}async function Wa(t){let e=0,r=[];await Tr(t,a=>{r.push(a),e+=a.byteLength});let i=new Uint8Array(e),n=0;for(let a of r)i.set(a,n),n+=a.byteLength;return i}function tu(t){let e=t.match(/^https?:\/\/([^/]+)@/);if(e==null)return{url:t,auth:{}};e=e[1];let[r,i]=e.split(":");return t=t.replace(`${e}@`,""),{url:t,auth:{username:r,password:i}}}function Va(t,e){let r=e.toString(16);return"0".repeat(t-r.length)+r}var it=class{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(e){typeof e=="string"&&(e=Buffer.from(e));let r=e.length+4,i=Va(4,r);return Buffer.concat([Buffer.from(i,"utf8"),e])}static streamReader(e){let r=new Si(e);return async function(){try{let n=await r.read(4);if(n==null)return!0;if(n=parseInt(n.toString("utf8"),16),n===0||n===1)return null;let a=await r.read(n-4);return a==null?!0:a}catch(n){return e.error=n,!0}}}};async function eu(t){let e={},r;for(;r=await t(),r!==!0;){if(r===null)continue;r=r.toString("utf8").replace(/\n$/,"");let i=r.indexOf("=");if(i>-1){let n=r.slice(0,i),a=r.slice(i+1);e[n]=a}else e[r]=!0}return{protocolVersion:2,capabilities2:e}}async function ru(t,{service:e}){let r=new Set,i=new Map,n=new Map,a=it.streamReader(t),o=await a();for(;o===null;)o=await a();if(o===!0)throw new Oi;if(o.includes("version 2"))return eu(a);if(o.toString("utf8").replace(/\n$/,"")!==`# service=${e}`)throw new Ge(`# service=${e}\\n`,o.toString("utf8"));let s=await a();for(;s===null;)s=await a();if(s===!0)return{capabilities:r,refs:i,symrefs:n};if(s=s.toString("utf8"),s.includes("version 2"))return eu(a);let[l,c]=Aa(s,"\0","\\x00");if(c.split(" ").map(f=>r.add(f)),l!=="0000000000000000000000000000000000000000 capabilities^{}"){let[f,d]=Aa(l," "," ");for(i.set(d,f);;){let u=await a();if(u===!0)break;if(u!==null){let[h,m]=Aa(u.toString("utf8")," "," ");i.set(m,h)}}}for(let f of r)if(f.startsWith("symref=")){let d=f.match(/symref=([^:]+):(.*)/);d.length===3&&n.set(d[1],d[2])}return{protocolVersion:1,capabilities:r,refs:i,symrefs:n}}function Aa(t,e,r){let i=t.trim().split(e);if(i.length!==2)throw new Ge(`Two strings separated by '${r}'`,t.toString("utf8"));return i}var iu=(t,e)=>t.endsWith("?")?`${t}${e}`:`${t}/${e.replace(/^https?:\/\//,"")}`,nu=(t,e)=>{(e.username||e.password)&&(t.Authorization=Ru(e)),e.headers&&Object.assign(t,e.headers)},Ta=async t=>{try{let e=Buffer.from(await Wa(t.body)),r=e.toString("utf8");return{preview:r.length<256?r:r.slice(0,256)+"...",response:r,data:e}}catch(e){return{}}},Hi=class{static async capabilities(){return["discover","connect"]}static async discover({http:e,onProgress:r,onAuth:i,onAuthSuccess:n,onAuthFailure:a,corsProxy:o,service:s,url:l,headers:c,protocolVersion:f}){let{url:d,auth:u}=tu(l),h=o?iu(o,d):d;(u.username||u.password)&&(c.Authorization=Ru(u)),f===2&&(c["Git-Protocol"]="version=2");let m,g,y=!1;do if(m=await e.request({onProgress:r,method:"GET",url:`${h}/info/refs?service=${s}`,headers:c}),g=!1,m.statusCode===401||m.statusCode===203){let b=y?a:i;if(b){if(u=await b(d,{...u,headers:{...c}}),u&&u.cancel)throw new kr;u&&(nu(c,u),y=!0,g=!0)}}else m.statusCode===200&&y&&n&&await n(d,u);while(g);if(m.statusCode!==200){let{response:b}=await Ta(m);throw new _r(m.statusCode,m.statusMessage,b)}if(m.headers["content-type"]===`application/x-${s}-advertisement`){let b=await ru(m.body,{service:s});return b.auth=u,b}else{let{preview:b,response:v,data:k}=await Ta(m);try{let S=await ru([k],{service:s});return S.auth=u,S}catch(S){throw new Bi(b,v)}}}static async connect({http:e,onProgress:r,corsProxy:i,service:n,url:a,auth:o,body:s,headers:l}){let c=tu(a);c&&(a=c.url),i&&(a=iu(i,a)),l["content-type"]=`application/x-${n}-request`,l.accept=`application/x-${n}-result`,nu(l,o);let f=await e.request({onProgress:r,method:"POST",url:`${a}/${n}`,body:s,headers:l});if(f.statusCode!==200){let{response:d}=Ta(f);throw new _r(f.statusCode,f.statusMessage,d)}return f}},Gi=class{static getRemoteHelperFor({url:e}){let r=new Map;r.set("http",Hi),r.set("https",Hi);let i=Sm({url:e});if(!i)throw new Ni(e);if(r.has(i.transport))return r.get(i.transport);throw new Di(e,i.transport,i.transport==="ssh"?Em(e):void 0)}};function Sm({url:t}){if(t.startsWith("git@"))return{transport:"ssh",address:t};let e=t.match(/(\w+)(:\/\/|::)(.*)/);if(e!==null){if(e[2]==="://")return{transport:e[1],address:e[0]};if(e[2]==="::")return{transport:e[1],address:e[3]}}}var ue=null,qe=class{static async read({fs:e,gitdir:r}){ue===null&&(ue=new yr.default);let i=P(r,"shallow"),n=new Set;return await ue.acquire(i,async function(){let a=await e.read(i,{encoding:"utf8"});if(a===null||a.trim()==="")return n;a.trim().split(` +`).map(o=>n.add(o))}),n}static async write({fs:e,gitdir:r,oids:i}){ue===null&&(ue=new yr.default);let n=P(r,"shallow");if(i.size>0){let a=[...i].join(` +`)+` +`;await ue.acquire(n,async function(){await e.write(n,a,{encoding:"utf8"})})}else await ue.acquire(n,async function(){await e.rm(n)})}};async function km({fs:t,gitdir:e,oid:r}){let i=`objects/${r.slice(0,2)}/${r.slice(2)}`;return t.exists(`${e}/${i}`)}async function Am({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:n}){let a=await t.readdir(P(r,"objects/pack"));a=a.filter(o=>o.endsWith(".idx"));for(let o of a){let s=`${r}/objects/pack/${o}`,l=await yu({fs:t,cache:e,filename:s,getExternalRefDelta:n});if(l.error)throw new I(l.error);if(l.offsets.has(i))return!0}return!1}async function au({fs:t,cache:e,gitdir:r,oid:i,format:n="content"}){let a=s=>K({fs:t,cache:e,gitdir:r,oid:s}),o=await km({fs:t,gitdir:r,oid:i});return o||(o=await Am({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:a})),o}function Tm(t){let n="5041434b"+"00000002"+"00000000";return t.slice(0,12).toString("hex")===n}function Iu(t,e){let r=t.map(i=>i.split("=",1)[0]);return e.filter(i=>{let n=i.split("=",1)[0];return r.includes(n)})}var Pu={name:"isomorphic-git",version:"1.38.1",agent:"git/isomorphic-git@1.38.1"},je=class{constructor(){this._queue=[]}write(e){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let r=this._waiting;this._waiting=null,r({value:e})}else this._queue.push(e)}end(){if(this._ended=!0,this._waiting){let e=this._waiting;this._waiting=null,e({done:!0})}}destroy(e){this.error=e,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(e=>{this._waiting=e})}};function $m(t){let e=t.indexOf("\r"),r=t.indexOf(` +`);return e===-1&&r===-1?-1:e===-1?r+1:r===-1?e+1:r===e+1?r+1:Math.min(e,r)+1}function Cu(t){let e=new je,r="";return(async()=>(await Tr(t,i=>{for(i=i.toString("utf8"),r+=i;;){let n=$m(r);if(n===-1)break;e.write(r.slice(0,n)),r=r.slice(n)}}),r.length>0&&e.write(r),e.end()))(),e}var qi=class{static demux(e){let r=it.streamReader(e),i=new je,n=new je,a=new je,o=async function(){let s=await r();if(s===null)return o();if(s===!0){i.end(),a.end(),e.error?n.destroy(e.error):n.end();return}switch(s[0]){case 1:{n.write(s.slice(1));break}case 2:{a.write(s.slice(1));break}case 3:{let l=s.slice(1);a.write(l),i.end(),a.end(),n.destroy(new Error(l.toString("utf8")));return}default:i.write(s)}o()};return o(),{packetlines:i,packfile:n,progress:a}}};async function Om(t){let{packetlines:e,packfile:r,progress:i}=qi.demux(t),n=[],a=[],o=[],s=!1,l=!1;return new Promise((c,f)=>{Tr(e,d=>{let u=d.toString("utf8").trim();if(u.startsWith("shallow")){let h=u.slice(-41).trim();h.length!==40&&f(new he(h)),n.push(h)}else if(u.startsWith("unshallow")){let h=u.slice(-41).trim();h.length!==40&&f(new he(h)),a.push(h)}else if(u.startsWith("ACK")){let[,h,m]=u.split(" ");o.push({oid:h,status:m}),m||(l=!0)}else u.startsWith("NAK")?(s=!0,l=!0):(l=!0,s=!0);l&&(t.error?f(t.error):c({shallows:n,unshallows:a,acks:o,nak:s,packfile:r,progress:i}))}).finally(()=>{l||(t.error?f(t.error):c({shallows:n,unshallows:a,acks:o,nak:s,packfile:r,progress:i}))})})}function Rm({capabilities:t=[],wants:e=[],haves:r=[],shallows:i=[],depth:n=null,since:a=null,exclude:o=[]}){let s=[];e=[...new Set(e)];let l=` ${t.join(" ")}`;for(let c of e)s.push(it.encode(`want ${c}${l} +`)),l="";for(let c of i)s.push(it.encode(`shallow ${c} +`));n!==null&&s.push(it.encode(`deepen ${n} +`)),a!==null&&s.push(it.encode(`deepen-since ${Math.floor(a.valueOf()/1e3)} +`));for(let c of o)s.push(it.encode(`deepen-not ${c} +`));s.push(it.flush());for(let c of r)s.push(it.encode(`have ${c} +`));return s.push(it.encode(`done +`)),s}async function Bu({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:a,onAuthSuccess:o,onAuthFailure:s,gitdir:l,ref:c,remoteRef:f,remote:d,url:u,corsProxy:h,depth:m=null,since:g=null,exclude:y=[],relative:b=!1,tags:v=!1,singleBranch:k=!1,headers:S={},prune:x=!1,pruneTags:T=!1}){let p=c||await Ya({fs:t,gitdir:l,test:!0}),_=await J.get({fs:t,gitdir:l}),w=d||p&&await _.get(`branch.${p}.remote`)||"origin",A=u||await _.get(`remote.${w}.url`);if(typeof A=="undefined")throw new St("remote OR url");let E=f||p&&await _.get(`branch.${p}.merge`)||c||"HEAD";h===void 0&&(h=await _.get("http.corsProxy"));let $=Gi.getRemoteHelperFor({url:A}),R=await $.discover({http:r,onAuth:a,onAuthSuccess:o,onAuthFailure:s,corsProxy:h,service:"git-upload-pack",url:A,headers:S,protocolVersion:1}),B=R.auth,H=R.refs;if(H.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(m!==null&&!R.capabilities.has("shallow"))throw new de("shallow","depth");if(g!==null&&!R.capabilities.has("deepen-since"))throw new de("deepen-since","since");if(y.length>0&&!R.capabilities.has("deepen-not"))throw new de("deepen-not","exclude");if(b===!0&&!R.capabilities.has("deepen-relative"))throw new de("deepen-relative","relative");let{oid:ht,fullref:W}=D.resolveAgainstMap({ref:E,map:H});for(let M of H.keys())M===W||M==="HEAD"||M.startsWith("refs/heads/")||v&&M.startsWith("refs/tags/")||H.delete(M);let tt=Iu([...R.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${Pu.agent}`]);b&&tt.push("deepen-relative");let Jt=k?[ht]:H.values(),tn=k?[p]:await D.listRefs({fs:t,gitdir:l,filepath:"refs"}),ft=[];for(let M of tn)try{M=await D.expand({fs:t,gitdir:l,ref:M});let X=await D.resolve({fs:t,gitdir:l,ref:M});await au({fs:t,cache:e,gitdir:l,oid:X})&&ft.push(X)}catch(X){}ft=[...new Set(ft)];let L=await qe.read({fs:t,gitdir:l}),At=R.capabilities.has("shallow")?[...L]:[],Q=Rm({capabilities:tt,wants:Jt,haves:ft,shallows:At,depth:m,since:g,exclude:y}),Ze=Buffer.from(await Wa(Q)),te=await $.connect({http:r,onProgress:i,corsProxy:h,service:"git-upload-pack",url:A,auth:B,body:[Ze],headers:S}),q=await Om(te.body);te.headers&&(q.headers=te.headers);for(let M of q.shallows)if(!L.has(M))try{let{object:X}=await K({fs:t,cache:e,gitdir:l,oid:M}),pt=new kt(X),Tt=await Promise.all(pt.headers().parent.map(Ve=>au({fs:t,cache:e,gitdir:l,oid:Ve})));Tt.length===0||Tt.every(Ve=>Ve)||L.add(M)}catch(X){L.add(M)}for(let M of q.unshallows)L.delete(M);if(await qe.write({fs:t,gitdir:l,oids:L}),k){let M=new Map([[W,ht]]),X=new Map,pt=10,Tt=W;for(;pt--;){let rn=R.symrefs.get(Tt);if(rn===void 0)break;X.set(Tt,rn),Tt=rn}let en=H.get(Tt);en&&M.set(Tt,en);let{pruned:Ve}=await D.updateRemoteRefs({fs:t,gitdir:l,remote:w,refs:M,symrefs:X,tags:v,prune:x});x&&(q.pruned=Ve)}else{let{pruned:M}=await D.updateRemoteRefs({fs:t,gitdir:l,remote:w,refs:H,symrefs:R.symrefs,tags:v,prune:x,pruneTags:T});x&&(q.pruned=M)}if(q.HEAD=R.symrefs.get("HEAD"),q.HEAD===void 0){let{oid:M}=D.resolveAgainstMap({ref:"HEAD",map:H});for(let[X,pt]of H.entries())if(X!=="HEAD"&&pt===M){q.HEAD=X;break}}let Zu=W.startsWith("refs/tags")?"tag":"branch";if(q.FETCH_HEAD={oid:ht,description:`${Zu} '${Ue(W)}' of ${A}`},i||n){let M=Cu(q.progress);Tr(M,async X=>{if(n&&await n(X),i){let pt=X.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);pt&&await i({phase:pt[1].trim(),loaded:parseInt(pt[2],10),total:parseInt(pt[3],10)})}})}let Rr=Buffer.from(await Wa(q.packfile));if(te.body.error)throw te.body.error;let Qa=Rr.slice(-20).toString("hex"),We={defaultBranch:q.HEAD,fetchHead:q.FETCH_HEAD.oid,fetchHeadDescription:q.FETCH_HEAD.description};if(q.headers&&(We.headers=q.headers),x&&(We.pruned=q.pruned),Qa!==""&&!Tm(Rr)){We.packfile=`objects/pack/pack-${Qa}.pack`;let M=P(l,We.packfile);await t.write(M,Rr);let X=Tt=>K({fs:t,cache:e,gitdir:l,oid:Tt}),pt=await ki.fromPack({pack:Rr,getExternalRefDelta:X,onProgress:i});await t.write(M.replace(/\.pack$/,".idx"),await pt.toBuffer())}return We}async function Du({fs:t,bare:e=!1,dir:r,gitdir:i=e?r:P(r,".git"),defaultBranch:n="master"}){if(await t.exists(i+"/config"))return;let a=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];a=a.map(o=>i+"/"+o);for(let o of a)await t.mkdir(o);await t.write(i+"/config",`[core] + repositoryformatversion = 0 + filemode = false + bare = ${e} +`+(e?"":` logallrefupdates = true +`)+` symlinks = false + ignorecase = true +`),await t.write(i+"/HEAD",`ref: refs/heads/${n} +`)}async function Im({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:a,onAuthSuccess:o,onAuthFailure:s,onPostCheckout:l,dir:c,gitdir:f,url:d,corsProxy:u,ref:h,remote:m,depth:g,since:y,exclude:b,relative:v,singleBranch:k,noCheckout:S,noTags:x,headers:T,nonBlocking:p,batchSize:_=100}){try{if(await Du({fs:t,gitdir:f}),await Tu({fs:t,gitdir:f,remote:m,url:d,force:!1}),u){let E=await J.get({fs:t,gitdir:f});await E.set("http.corsProxy",u),await J.save({fs:t,gitdir:f,config:E})}let{defaultBranch:w,fetchHead:A}=await Bu({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:a,onAuthSuccess:o,onAuthFailure:s,gitdir:f,ref:h,remote:m,corsProxy:u,depth:g,since:y,exclude:b,relative:v,singleBranch:k,headers:T,tags:!x});if(A===null)return;h=h||w,h=h.replace("refs/heads/",""),await wm({fs:t,cache:e,onProgress:i,onPostCheckout:l,dir:c,gitdir:f,ref:h,remote:m,noCheckout:S,nonBlocking:p,batchSize:_})}catch(w){throw await t.rmdir(f,{recursive:!0,maxRetries:10}).catch(()=>{}),w}}async function Nu({fs:t,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:a,onAuthFailure:o,onPostCheckout:s,dir:l,gitdir:c=P(l,".git"),url:f,corsProxy:d=void 0,ref:u=void 0,remote:h="origin",depth:m=void 0,since:g=void 0,exclude:y=[],relative:b=!1,singleBranch:v=!1,noCheckout:k=!1,noTags:S=!1,headers:x={},cache:T={},nonBlocking:p=!1,batchSize:_=100}){try{C("fs",t),C("http",e),C("gitdir",c),k||C("dir",l),C("url",f);let w=new nt(t),A=await dt({fsp:w,dotgit:c});return await Im({fs:w,cache:T,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:a,onAuthFailure:o,onPostCheckout:s,dir:l,gitdir:A,url:f,corsProxy:d,ref:u,remote:h,depth:m,since:g,exclude:y,relative:b,singleBranch:v,noCheckout:k,noTags:S,headers:x,nonBlocking:p,batchSize:_})}catch(w){throw w.caller="git.clone",w}}async function $r({fs:t,onSign:e,dir:r,gitdir:i=P(r,".git"),message:n,author:a,committer:o,signingKey:s,amend:l=!1,dryRun:c=!1,noUpdateBranch:f=!1,ref:d,parent:u,tree:h,cache:m={}}){try{C("fs",t),l||C("message",n),s&&C("onSign",e);let g=new nt(t),y=await dt({fsp:g,dotgit:i});return await Su({fs:g,cache:m,onSign:e,gitdir:y,message:n,author:a,committer:o,signingKey:s,amend:l,dryRun:c,noUpdateBranch:f,ref:d,parent:u,tree:h})}catch(g){throw g.caller="git.commit",g}}async function Pm({fs:t,gitdir:e,remote:r}){let i=await J.get({fs:t,gitdir:e});await i.deleteSection("remote",r),await J.save({fs:t,gitdir:e,config:i})}async function Fu({fs:t,dir:e,gitdir:r=P(e,".git"),remote:i}){try{C("fs",t),C("remote",i);let n=new nt(t),a=await dt({fsp:n,dotgit:r});return await Pm({fs:n,gitdir:a,remote:i})}catch(n){throw n.caller="git.deleteRemote",n}}async function Uu({fs:t,cache:e,gitdir:r,oids:i}){let n={},a=i.length,o=i.map((s,l)=>({index:l,oid:s}));for(;o.length;){let s=new Set;for(let{oid:c,index:f}of o)n[c]||(n[c]=new Set),n[c].add(f),n[c].size===a&&s.add(c);if(s.size>0)return[...s];let l=new Map;for(let{oid:c,index:f}of o)try{let{object:d}=await K({fs:t,cache:e,gitdir:r,oid:c}),u=kt.from(d),{parent:h}=u.parseHeaders();for(let m of h)(!n[m]||!n[m].has(f))&&l.set(m+":"+f,{oid:m,index:f})}catch(d){}o=Array.from(l.values())}return[]}async function Cm({fs:t,cache:e,dir:r,gitdir:i,ours:n,theirs:a,fastForward:o=!0,fastForwardOnly:s=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:f=!0,message:d,author:u,committer:h,signingKey:m,onSign:g,mergeDriver:y,allowUnrelatedHistories:b=!1}){n===void 0&&(n=await Ya({fs:t,gitdir:i,fullname:!0})),n=await D.expand({fs:t,gitdir:i,ref:n}),a=await D.expand({fs:t,gitdir:i,ref:a});let v=await D.resolve({fs:t,gitdir:i,ref:n}),k=await D.resolve({fs:t,gitdir:i,ref:a}),S=await Uu({fs:t,cache:e,gitdir:i,oids:[v,k]});if(S.length!==1)if(S.length===0&&b)S.push("4b825dc642cb6eb9a060e54bf8d69288fbee4904");else throw new xr;let x=S[0];if(x===k)return{oid:v,alreadyMerged:!0};if(o&&x===v)return!l&&!c&&await D.writeRef({fs:t,gitdir:i,ref:n,value:k}),{oid:k,fastForward:!0};{if(s)throw new Ri;let T=await _t.acquire({fs:t,gitdir:i,cache:e,allowUnmerged:!1},async _=>_m({fs:t,cache:e,dir:r,gitdir:i,index:_,ourOid:v,theirOid:k,baseOid:x,ourName:Ue(n),baseName:"base",theirName:Ue(a),dryRun:l,abortOnConflict:f,mergeDriver:y}));if(T instanceof Er)throw T;return d||(d=`Merge branch '${Ue(a)}' into ${Ue(n)}`),{oid:await Su({fs:t,cache:e,gitdir:i,message:d,ref:n,tree:T,parent:[v,k],author:u,committer:h,signingKey:m,onSign:g,dryRun:l,noUpdateBranch:c}),tree:T,mergeCommit:!0}}}async function ju({fs:t,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:a,onAuthFailure:o,dir:s,gitdir:l=P(s,".git"),ref:c,remote:f,remoteRef:d,url:u,corsProxy:h,depth:m=null,since:g=null,exclude:y=[],relative:b=!1,tags:v=!1,singleBranch:k=!1,headers:S={},prune:x=!1,pruneTags:T=!1,cache:p={}}){try{C("fs",t),C("http",e),C("gitdir",l);let _=new nt(t),w=await dt({fsp:_,dotgit:l});return await Bu({fs:_,cache:p,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:a,onAuthFailure:o,gitdir:w,ref:c,remote:f,remoteRef:d,url:u,corsProxy:h,depth:m,since:g,exclude:y,relative:b,tags:v,singleBranch:k,headers:S,prune:x,pruneTags:T})}catch(_){throw _.caller="git.fetch",_}}async function Mu({fs:t,bare:e=!1,dir:r,gitdir:i=e?r:P(r,".git"),defaultBranch:n="master"}){try{C("fs",t),C("gitdir",i),e||C("dir",r);let a=new nt(t),o=await dt({fsp:a,dotgit:i});return await Du({fs:a,bare:e,dir:r,gitdir:o,defaultBranch:n})}catch(a){throw a.caller="git.init",a}}async function Bm({fs:t,cache:e,gitdir:r,oid:i,ancestor:n,depth:a}){let o=await qe.read({fs:t,gitdir:r});if(!i)throw new St("oid");if(!n)throw new St("ancestor");if(i===n)return!1;let s=[i],l=new Set,c=0;for(;s.length;){if(c++===a)throw new Ci(a);let f=s.shift(),{type:d,object:u}=await K({fs:t,cache:e,gitdir:r,oid:f});if(d!=="commit")throw new Nt(f,d,"commit");let h=kt.from(u).parse();for(let m of h.parent)if(m===n)return!0;if(!o.has(f))for(let m of h.parent)l.has(m)||(s.push(m),l.add(m))}return!1}async function Ka({fs:t,onSign:e,dir:r,gitdir:i=P(r,".git"),ours:n,theirs:a,fastForward:o=!0,fastForwardOnly:s=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:f=!0,message:d,author:u,committer:h,signingKey:m,cache:g={},mergeDriver:y,allowUnrelatedHistories:b=!1}){try{C("fs",t),m&&C("onSign",e);let v=new nt(t),k=await dt({fsp:v,dotgit:i}),S=await qa({fs:v,gitdir:k,author:u});if(!S&&(!s||!o))throw new pe("author");let x=await Za({fs:v,gitdir:k,author:S,committer:h});if(!x&&(!s||!o))throw new pe("committer");return await Cm({fs:v,cache:g,dir:r,gitdir:k,ours:n,theirs:a,fastForward:o,fastForwardOnly:s,dryRun:l,noUpdateBranch:c,abortOnConflict:f,message:d,author:S,committer:x,signingKey:m,onSign:e,mergeDriver:y,allowUnrelatedHistories:b})}catch(v){throw v.caller="git.merge",v}}var Dm={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function Nm({fs:t,cache:e,dir:r,gitdir:i=P(r,".git"),oids:n}){let a=new Xa.default,o=[];function s(f,d){let u=Buffer.from(f,d);o.push(u),a.update(u)}async function l({stype:f,object:d}){let u=Dm[f],h=d.length,m=h>15?128:0,g=h&15;h=h>>>4;let y=(m|u|g).toString(16);for(s(y,"hex");m;)m=h>127?128:0,y=m|h&127,s(Va(2,y),"hex"),h=h>>>7;s(Buffer.from(await vu(d)))}s("PACK"),s("00000002","hex"),s(Va(8,n.length),"hex");for(let f of n){let{type:d,object:u}=await K({fs:t,cache:e,gitdir:i,oid:f});await l({write:s,object:u,stype:d})}let c=a.digest();return o.push(c),o}async function Fm({fs:t,cache:e,dir:r,gitdir:i=P(r,".git"),start:n,finish:a}){let o=await qe.read({fs:t,gitdir:i}),s=new Set,l=new Set;for(let d of n)s.add(await D.resolve({fs:t,gitdir:i,ref:d}));for(let d of a)try{let u=await D.resolve({fs:t,gitdir:i,ref:d});l.add(u)}catch(u){}let c=new Set;async function f(d){c.add(d);let{type:u,object:h}=await K({fs:t,cache:e,gitdir:i,oid:d});if(u==="tag"){let g=we.from(h).headers().object;return f(g)}if(u!=="commit")throw new Nt(d,u,"commit");if(!o.has(d)){let g=kt.from(h).headers().parent;for(d of g)!l.has(d)&&!c.has(d)&&await f(d)}}for(let d of s)await f(d);return c}async function $a({fs:t,cache:e,dir:r,gitdir:i=P(r,".git"),oids:n}){let a=new Set;async function o(s){if(a.has(s))return;a.add(s);let{type:l,object:c}=await K({fs:t,cache:e,gitdir:i,oid:s});if(l==="tag"){let d=we.from(c).headers().object;await o(d)}else if(l==="commit"){let d=kt.from(c).headers().tree;await o(d)}else if(l==="tree"){let f=Ht.from(c);for(let d of f)d.type==="blob"&&a.add(d.oid),d.type==="tree"&&await o(d.oid)}}for(let s of n)await o(s);return a}async function Um(t){let e={},r="",i=it.streamReader(t),n=await i();for(;n!==!0;)n!==null&&(r+=n.toString("utf8")+` +`),n=await i();let a=r.toString("utf8").split(` +`);if(n=a.shift(),!n.startsWith("unpack "))throw new Ge('unpack ok" or "unpack [error message]',n);e.ok=n==="unpack ok",e.ok||(e.error=n.slice(7)),e.refs={};for(let o of a){if(o.trim()==="")continue;let s=o.slice(0,2),l=o.slice(3),c=l.indexOf(" ");c===-1&&(c=l.length);let f=l.slice(0,c),d=l.slice(c+1);e.refs[f]={ok:s==="ok",error:d}}return e}async function jm({capabilities:t=[],triplets:e=[]}){let r=[],i=`\0 ${t.join(" ")}`;for(let n of e)r.push(it.encode(`${n.oldoid} ${n.oid} ${n.fullRef}${i} +`)),i="";return r.push(it.flush()),r}async function Mm({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:a,onAuthSuccess:o,onAuthFailure:s,onPrePush:l,gitdir:c,ref:f,remoteRef:d,remote:u,url:h,force:m=!1,delete:g=!1,corsProxy:y,headers:b={}}){let v=f||await Ya({fs:t,gitdir:c});if(typeof v=="undefined")throw new St("ref");let k=await J.get({fs:t,gitdir:c});u=u||await k.get(`branch.${v}.pushRemote`)||await k.get("remote.pushDefault")||await k.get(`branch.${v}.remote`)||"origin";let S=h||await k.get(`remote.${u}.pushurl`)||await k.get(`remote.${u}.url`);if(typeof S=="undefined")throw new St("remote OR url");let x=d||await k.get(`branch.${v}.merge`);if(typeof S=="undefined")throw new St("remoteRef");y===void 0&&(y=await k.get("http.corsProxy"));let T=await D.expand({fs:t,gitdir:c,ref:v}),p=g?"0000000000000000000000000000000000000000":await D.resolve({fs:t,gitdir:c,ref:T}),_=Gi.getRemoteHelperFor({url:S}),w=await _.discover({http:r,onAuth:a,onAuthSuccess:o,onAuthFailure:s,corsProxy:y,service:"git-receive-pack",url:S,headers:b,protocolVersion:1}),A=w.auth,E;if(!x)E=T;else try{E=await D.expandAgainstMap({ref:x,map:w.refs})}catch(L){if(L instanceof ct)E=x.startsWith("refs/")?x:`refs/heads/${x}`;else throw L}let $=w.refs.get(E)||"0000000000000000000000000000000000000000";if(l&&!await l({remote:u,url:S,localRef:{ref:g?"(delete)":T,oid:p},remoteRef:{ref:E,oid:$}}))throw new kr;let R=!w.capabilities.has("no-thin"),B=new Set;if(!g){let L=[...w.refs.values()],At=new Set;if($!=="0000000000000000000000000000000000000000"){let Q=await Uu({fs:t,cache:e,gitdir:c,oids:[p,$]});for(let Ze of Q)L.push(Ze);R&&(At=await $a({fs:t,cache:e,gitdir:c,oids:Q}))}if(!L.includes(p)){let Q=await Fm({fs:t,cache:e,gitdir:c,start:[p],finish:L});B=await $a({fs:t,cache:e,gitdir:c,oids:Q})}if(R){try{let Q=await D.resolve({fs:t,gitdir:c,ref:`refs/remotes/${u}/HEAD`,depth:2}),{oid:Ze}=await D.resolveAgainstMap({ref:Q.replace(`refs/remotes/${u}/`,""),fullref:Q,map:w.refs}),te=[Ze];for(let q of await $a({fs:t,cache:e,gitdir:c,oids:te}))At.add(q)}catch(Q){}for(let Q of At)B.delete(Q)}if(p===$&&(m=!0),!m){if(T.startsWith("refs/tags")&&$!=="0000000000000000000000000000000000000000")throw new Sr("tag-exists");if(p!=="0000000000000000000000000000000000000000"&&$!=="0000000000000000000000000000000000000000"&&!await Bm({fs:t,cache:e,gitdir:c,oid:p,ancestor:$,depth:-1}))throw new Sr("not-fast-forward")}}let H=Iu([...w.capabilities],["report-status","side-band-64k",`agent=${Pu.agent}`]),ht=await jm({capabilities:H,triplets:[{oldoid:$,oid:p,fullRef:E}]}),W=g?[]:await Nm({fs:t,cache:e,gitdir:c,oids:[...B]}),tt=await _.connect({http:r,onProgress:i,corsProxy:y,service:"git-receive-pack",url:S,auth:A,headers:b,body:[...ht,...W]}),{packfile:Jt,progress:tn}=await qi.demux(tt.body);if(n){let L=Cu(tn);Tr(L,async At=>{await n(At)})}let ft=await Um(Jt);if(tt.headers&&(ft.headers=tt.headers),u&&ft.ok&&ft.refs[E].ok&&!T.startsWith("refs/tags")){let L=`refs/remotes/${u}/${E.replace("refs/heads","")}`;g?await D.deleteRef({fs:t,gitdir:c,ref:L}):await D.writeRef({fs:t,gitdir:c,ref:L,value:p})}if(ft.ok&&Object.values(ft.refs).every(L=>L.ok))return ft;{let L=Object.entries(ft.refs).filter(([At,Q])=>!Q.ok).map(([At,Q])=>` + - ${At}: ${Q.error}`).join("");throw new Ii(L,ft)}}async function Yi({fs:t,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:a,onAuthFailure:o,onPrePush:s,dir:l,gitdir:c=P(l,".git"),ref:f,remoteRef:d,remote:u="origin",url:h,force:m=!1,delete:g=!1,corsProxy:y,headers:b={},cache:v={}}){try{C("fs",t),C("http",e),C("gitdir",c);let k=new nt(t),S=await dt({fsp:k,dotgit:c});return await Mm({fs:k,cache:v,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:a,onAuthFailure:o,onPrePush:s,gitdir:S,ref:f,remoteRef:d,remote:u,url:h,force:m,delete:g,corsProxy:y,headers:b})}catch(k){throw k.caller="git.push",k}}async function zu({fs:t,cache:e,gitdir:r,oid:i}){let{type:n,object:a}=await K({fs:t,cache:e,gitdir:r,oid:i});if(n==="tag")return i=we.from(a).parse().object,zu({fs:t,cache:e,gitdir:r,oid:i});if(n!=="blob")throw new Nt(i,n,"blob");return{oid:i,blob:new Uint8Array(a)}}async function zm({fs:t,cache:e,gitdir:r,oid:i,filepath:n=void 0}){return n!==void 0&&(i=await dm({fs:t,cache:e,gitdir:r,oid:i,filepath:n})),await zu({fs:t,cache:e,gitdir:r,oid:i})}async function Lu({fs:t,dir:e,gitdir:r=P(e,".git"),oid:i,filepath:n,cache:a={}}){try{C("fs",t),C("gitdir",r),C("oid",i);let o=new nt(t),s=await dt({fsp:o,dotgit:r});return await zm({fs:o,cache:a,gitdir:s,oid:i,filepath:n})}catch(o){throw o.caller="git.readBlob",o}}async function Hu({fs:t,dir:e,gitdir:r=P(e,".git"),filepath:i,cache:n={}}){try{C("fs",t),C("gitdir",r),C("filepath",i);let a=new nt(t),o=await dt({fsp:a,dotgit:r});await _t.acquire({fs:a,gitdir:o,cache:n},async function(s){s.delete({filepath:i})})}catch(a){throw a.caller="git.remove",a}}async function me({fs:t,dir:e,gitdir:r=P(e,".git"),ref:i,depth:n}){try{C("fs",t),C("gitdir",r),C("ref",i);let a=new nt(t),o=await dt({fsp:a,dotgit:r});return await D.resolve({fs:a,gitdir:o,ref:i,depth:n})}catch(a){throw a.caller="git.resolveRef",a}}async function Ki({fs:t,dir:e,gitdir:r=P(e,".git"),ref:i="HEAD",filepaths:n=["."],filter:a,cache:o={},ignored:s=!1,refresh:l=!0}){try{C("fs",t),C("gitdir",r),C("ref",i);let c=new nt(t),f=await dt({fsp:c,dotgit:r});return await Mi({fs:c,cache:o,dir:e,gitdir:f,trees:[Fe({ref:i}),bu({refresh:l}),pu()],map:async function(d,[u,h,m]){if(!u&&!m&&h&&!s&&await zi.isIgnored({fs:c,dir:e,filepath:d})||!n.some(_=>Ou(d,_)))return null;if(a&&!a(d))return;let[g,y,b]=await Promise.all([u&&u.type(),h&&h.type(),m&&m.type()]),v=[g,y,b].includes("blob");if((g==="tree"||g==="special")&&!v)return;if(g==="commit")return null;if((y==="tree"||y==="special")&&!v)return;if(b==="commit")return null;if((b==="tree"||b==="special")&&!v)return;let k=g==="blob"?await u.oid():void 0,S=b==="blob"?await m.oid():void 0,x;g!=="blob"&&y==="blob"&&b!=="blob"?x="42":y==="blob"&&(x=await h.oid());let T=[void 0,k,x,S],p=T.map(_=>T.indexOf(_));return p.shift(),[d,...p]}})}catch(c){throw c.caller="git.statusMatrix",c}}var qu=require("obsidian");function Gu(t,e){function r(n){let a=n.replace(/\\/g,"/"),o=e.replace(/\\/g,"/").replace(/\/$/,"");return a.startsWith(o+"/")?a.slice(o.length+1):a}let i={async readFile(n,a){try{let o=await t.readBinary(r(n));return(a==null?void 0:a.encoding)==="utf8"?Buffer.from(o).toString("utf8"):Buffer.from(o)}catch(o){let s=new Error(`ENOENT: no such file or directory, open '${n}'`);throw s.code="ENOENT",s}},async writeFile(n,a){let o=r(n),s=o.split("/");if(s.length>1){let l=s.slice(0,-1).join("/");try{await t.mkdir(l)}catch(c){}}if(typeof a=="string")await t.write(o,a);else{let l=Buffer.isBuffer(a)?a:Buffer.from(a);await t.writeBinary(o,l.buffer.slice(l.byteOffset,l.byteOffset+l.byteLength))}},async unlink(n){try{await t.remove(r(n))}catch(a){}},async readdir(n){try{let a=await t.list(r(n)),o=a.files.map(l=>l.split("/").pop());return[...a.folders.map(l=>l.split("/").pop()),...o]}catch(a){let o=new Error(`ENOENT: no such file or directory, scandir '${n}'`);throw o.code="ENOENT",o}},async mkdir(n,a){try{await t.mkdir(r(n))}catch(o){}},async rmdir(n){},async stat(n){var a,o,s;try{let l=await t.stat(r(n));if(!l)throw new Error("no stat");let c=l.type!=="file";return{type:c?"dir":"file",mode:c?16877:33188,size:(a=l.size)!=null?a:0,ino:0,mtimeMs:(o=l.mtime)!=null?o:Date.now(),ctimeMs:(s=l.ctime)!=null?s:Date.now(),uid:1,gid:1,dev:1,isFile:()=>!c,isDirectory:()=>c,isSymbolicLink:()=>!1}}catch(l){let c=new Error(`ENOENT: no such file or directory, stat '${n}'`);throw c.code="ENOENT",c}},async lstat(n){return i.stat(n)},async readlink(n){throw Object.assign(new Error(`EINVAL: readlink not supported '${n}'`),{code:"EINVAL"})},async symlink(){throw Object.assign(new Error("EINVAL: symlink not supported"),{code:"EINVAL"})},async chmod(){}};return{promises:i}}var Hm={async request({url:t,method:e,headers:r,body:i}){let n;if(i){let l=[];for await(let u of i)l.push(u);let c=l.reduce((u,h)=>u+h.length,0),f=new Uint8Array(c),d=0;for(let u of l)f.set(u,d),d+=u.length;n=f.buffer}let a=await(0,qu.requestUrl)({url:t,method:e,headers:r,body:n,throw:!1}),o=a.arrayBuffer;async function*s(){yield new Uint8Array(o)}return{url:t,method:e,statusCode:a.status,statusMessage:"OK",body:s(),headers:a.headers}}},Or=class{constructor(e,r,i,n,a){this.fs=Gu(e,r),this.dir=r,this.token=i,this.username=n,this.remoteUrl=`https://github.com/${n}/${a}.git`}gitOpts(){return{fs:this.fs,http:Hm,dir:this.dir,author:{name:Pr,email:Cr}}}netOpts(){let e=this.token,r=this.username;return{...this.gitOpts(),url:this.remoteUrl,onAuth:()=>({username:r,password:e}),onAuthFailure:()=>{throw new Error("GitHub authentication failed. Please reconnect your account in MultiSync settings.")}}}async isInitialized(){try{return await me({fs:this.fs,dir:this.dir,ref:"HEAD"}),!0}catch(e){return!1}}async hasLocalBranch(){try{return await me({fs:this.fs,dir:this.dir,ref:wt}),!0}catch(e){return!1}}async safeFetch(){try{return await ju({...this.netOpts(),ref:wt,singleBranch:!0}),await me({fs:this.fs,dir:this.dir,ref:"FETCH_HEAD"})}catch(e){return null}}async clone(){return await Nu({...this.netOpts(),singleBranch:!0,depth:1}),this.hasLocalBranch()}async initAndPush(e){await this.isInitialized()||await Mu({fs:this.fs,dir:this.dir,defaultBranch:wt});for(let n of e)try{await Xi({fs:this.fs,dir:this.dir,filepath:n})}catch(a){}await this.hasLocalBranch()?(await Ki({fs:this.fs,dir:this.dir})).some(([,o,s,l])=>o!==1||s!==1||l!==1)&&await $r({...this.gitOpts(),message:"sync: initial vault snapshot"}):await $r({...this.gitOpts(),message:"sync: initial vault snapshot"});try{await Fu({fs:this.fs,dir:this.dir,remote:"origin"})}catch(n){}await $u({fs:this.fs,dir:this.dir,remote:"origin",url:this.remoteUrl}),await Yi({...this.netOpts(),ref:wt,force:!1})}async sync(e){let r=[];try{for(let a of e)try{await Xi({fs:this.fs,dir:this.dir,filepath:a})}catch(o){try{await Hu({fs:this.fs,dir:this.dir,filepath:a})}catch(s){}}let i;try{i=(await Ki({fs:this.fs,dir:this.dir})).some(([,o,s,l])=>o!==1||s!==1||l!==1)}catch(a){i=e.length>0}if(i){let a=new Date().toISOString().replace("T"," ").slice(0,19);await $r({...this.gitOpts(),message:`sync: ${a}`})}let n=await this.safeFetch();if(n&&await this.hasLocalBranch()){let a=await me({fs:this.fs,dir:this.dir,ref:wt});n!==a&&await Ka({fs:this.fs,dir:this.dir,ours:wt,theirs:n,author:{name:Pr,email:Cr},message:"sync: merge remote changes",fastForwardOnly:!1})}if(await this.hasLocalBranch()){let a=await Ki({fs:this.fs,dir:this.dir});for(let[o,s,l,c]of a)if(c===2||s===0&&l===2&&c===0){let f=await this.readFileContent(o),d=await this.readRemoteFileContent(o);r.push({path:o,ours:f,theirs:d})}}return r.length===0&&await this.hasLocalBranch()&&await Yi({...this.netOpts(),ref:wt}),{success:r.length===0,conflictFiles:r}}catch(i){let n=i instanceof Error?i.message:String(i);return{success:!1,conflictFiles:[],error:n}}}async resolveConflict(e,r){let i=`${this.dir}/${e}`;await this.fs.promises.writeFile(i,r),await Xi({fs:this.fs,dir:this.dir,filepath:e}),await $r({...this.gitOpts(),message:`sync: resolve conflict in ${e}`}),await Yi({...this.netOpts(),ref:wt})}async pull(){if(!await this.hasLocalBranch())return;let e=await this.safeFetch();if(!e)return;let r=await me({fs:this.fs,dir:this.dir,ref:wt});e!==r&&await Ka({fs:this.fs,dir:this.dir,ours:wt,theirs:e,author:{name:Pr,email:Cr},message:"sync: merge remote changes",fastForwardOnly:!1})}async readFileContent(e){try{return await this.fs.promises.readFile(`${this.dir}/${e}`,{encoding:"utf8"})}catch(r){return""}}async readRemoteFileContent(e){try{let r=await me({fs:this.fs,dir:this.dir,ref:`refs/remotes/origin/${wt}`}),{blob:i}=await Lu({fs:this.fs,dir:this.dir,oid:r,filepath:e});return new TextDecoder().decode(i)}catch(r){return""}}};var Qi=class{constructor(e,r){this.pendingFiles=new Set;this.debounceTimer=null;this.running=!1;this.gitSync=e,this.onStatus=r}enqueue(e){this.pendingFiles.add(e),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flush(),3e3)}async flushNow(){return this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.flush()}async flush(){if(this.running||this.pendingFiles.size===0)return null;this.running=!0;let e=[...this.pendingFiles];this.pendingFiles.clear();try{this.onStatus("pushing");let r=await this.gitSync.sync(e);return r.conflictFiles.length>0?this.onStatus("conflict"):r.success?this.onStatus("idle"):this.onStatus("error",r.error),r}catch(r){let i=r instanceof Error?r.message:String(r);return this.onStatus("error",i),{success:!1,conflictFiles:[],error:i}}finally{this.running=!1,this.pendingFiles.size>0&&setTimeout(()=>this.flush(),500)}}};var Ji=class extends at.Plugin{constructor(){super(...arguments);this.gitSync=null;this.syncQueue=null}async onload(){await this.loadSettings(),this.statusBar=new Dr(this),this.statusBar.onClick(()=>this.triggerManualSync()),this.addSettingTab(new Br(this.app,this)),this.addCommand({id:"sync-now",name:"Sync vault now",callback:()=>this.triggerManualSync()}),this.settings.githubToken&&this.settings.githubUsername&&this.settings.repoName&&await this.bootSyncEngine(),this.app.workspace.onLayoutReady(async()=>{if(this.gitSync){this.setStatus("pulling");try{await this.gitSync.pull(),this.setStatus("idle")}catch(r){this.setStatus("error","Pull failed on open")}}}),this.registerEvent(this.app.vault.on("modify",r=>{r instanceof at.TFile&&(!this.syncQueue||!this.settings.autoSync||this.isExcluded(r.path)||this.syncQueue.enqueue(r.path))})),this.registerEvent(this.app.vault.on("create",r=>{r instanceof at.TFile&&(!this.syncQueue||!this.settings.autoSync||this.isExcluded(r.path)||this.syncQueue.enqueue(r.path))})),this.registerEvent(this.app.vault.on("delete",r=>{r instanceof at.TFile&&(!this.syncQueue||!this.settings.autoSync||this.syncQueue.enqueue(r.path))})),this.registerEvent(this.app.vault.on("rename",(r,i)=>{!this.syncQueue||!this.settings.autoSync||this.syncQueue.enqueue(i)}))}async onunload(){this.syncQueue&&await this.syncQueue.flushNow()}async loadSettings(){this.settings=Object.assign({},to,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}setStatus(r,i){this.statusBar.set(r,i)}async initializeRepo(r,i){var u;this.setStatus("connecting");let n=this.app.vault.getName(),a=fo(n);this.settings.repoName=a;let o=this.app.vault.adapter,s=(u=o.basePath)!=null?u:"",l=new Or(o,s,r,i,a),c=await so(r,i,a),f=await l.isInitialized(),d=()=>this.app.vault.getFiles().map(h=>h.path).filter(h=>!this.isExcluded(h));c?f?new at.Notice(`Reconnected to: ${i}/${a}`):await l.clone()?new at.Notice(`Cloned repo: ${i}/${a}`):(await l.initAndPush(d()),new at.Notice(`Initialised repo: ${i}/${a}`)):(await co(r,a,`Obsidian vault: ${n}`),await l.initAndPush(d()),new at.Notice(`Created private repo: ${i}/${a}`)),this.settings.lastSyncTime=Date.now(),await this.saveSettings(),await this.bootSyncEngine(),this.setStatus("idle")}async bootSyncEngine(){var s;let{githubToken:r,githubUsername:i,repoName:n}=this.settings;if(!r||!i||!n)return;let a=this.app.vault.adapter,o=(s=a.basePath)!=null?s:"";this.gitSync=new Or(a,o,r,i,n),this.syncQueue=new Qi(this.gitSync,(l,c)=>{this.setStatus(l,c),l==="idle"&&(this.settings.lastSyncTime=Date.now(),this.saveSettings())})}async triggerManualSync(){if(!this.gitSync){new at.Notice("MultiSync: not connected. Please connect your GitHub account in settings.");return}this.setStatus("pulling");try{let r=this.app.vault.getFiles().map(n=>n.path).filter(n=>!this.isExcluded(n)),i=await this.gitSync.sync(r);i.conflictFiles.length>0?(this.setStatus("conflict"),this.showConflictModal(i.conflictFiles)):i.success?(this.settings.lastSyncTime=Date.now(),await this.saveSettings(),this.setStatus("idle"),new at.Notice("Vault synced successfully.")):(this.setStatus("error",i.error),new at.Notice(`Sync error: ${i.error}`))}catch(r){let i=r instanceof Error?r.message:String(r);this.setStatus("error",i),new at.Notice(`Sync failed: ${i}`)}}showConflictModal(r){new Nr(this.app,r,async(i,n)=>{await this.gitSync.resolveConflict(i,n),this.settings.lastSyncTime=Date.now(),await this.saveSettings(),this.setStatus("idle")}).open()}isExcluded(r){return this.settings.excludePatterns.some(i=>{let a=i.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${a}$`).test(r)})}}; +/*! Bundled license information: + +safe-buffer/index.js: + (*! safe-buffer. MIT License. Feross Aboukhadijeh *) + +crc-32/crc32.js: + (*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *) + +isomorphic-git/index.js: + (*! + * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements. + * SPDX-License-Identifier: LGPL-3.0-or-later + * Copyright (c) James Prevett and other ZenFS contributors. + *) +*/ + +/* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/git-obsi-sync/manifest.json b/.obsidian/plugins/git-obsi-sync/manifest.json new file mode 100644 index 0000000..09f1fdf --- /dev/null +++ b/.obsidian/plugins/git-obsi-sync/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "git-obsi-sync", + "name": "Git Sync", + "version": "1.0.0", + "minAppVersion": "1.0.0", + "description": "Sync your vault across all devices using your own GitHub account. Free forever.", + "author": "Livan Kumar", + "authorUrl": "https://github.com/livan116", + "fundingUrl": "", + "isDesktopOnly": false +} diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 1fd0494..a4adfab 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -184,6 +184,19 @@ }, "active": "6b81c26511b53323", "lastOpenFiles": [ + "Brain/log/2026-07-23.a0360993.md", + "Brain/log/2026-07-23.a0360993.jsonl", + "Brain/bases/projects.base", + "Brain/active.md", + "Brain/log.lock", + "Brain/log/2026-07-20.a0360993.md", + "Brain/log/2026-07-20.a0360993.jsonl", + "Brain/bases/people.base", + "Brain/inbox/sig-2026-07-19-server-port-map-2.md", + "Brain/preferences/pref-server-port-map.md", + "Brain/inbox/sig-2026-07-19-server-port-map.md", + "Brain/log/2026-07-19.a0360993.md", + "Brain/log/2026-07-19.a0360993.jsonl", "Brain/log/2026-07-18.a0360993.md", "Brain/log/2026-07-18.a0360993.jsonl", "Brain/preferences/pref-vps-plan-august-2026.md", @@ -205,20 +218,7 @@ "Templates/analysis_options_README.md", "Notizen/Slash-Commands.md", "Brain/pinned.md", - "Brain/INDEX.md", - "Brain/active.md", - "Brain/preferences/pref-save-more-often.md", - "Brain/preferences/pref-meriting-ai-personal.md", - "Brain/log/2026-07-09.a0360993.md", "Brain/bases/tasks.base", - "Brain/bases/projects.base", - "Brain/bases/people.base", - "Brain/bases/daily.base", - "Brain/preferences/pref-default-model-deepseek.md", - "Brain/inbox/sig-2026-07-12-default-model-deepseek.md", - "Projects", - "Brain/log/2026-07-10.a0360993.jsonl", - "Brain/log.lock", - "Notizen" + "Brain/bases/daily.base" ] } \ No newline at end of file diff --git a/.open-second-brain/brain.sqlite b/.open-second-brain/brain.sqlite index de4e115..da3e5a3 100644 Binary files a/.open-second-brain/brain.sqlite and b/.open-second-brain/brain.sqlite differ diff --git a/.open-second-brain/brain.sqlite-shm b/.open-second-brain/brain.sqlite-shm deleted file mode 100644 index fe9ac28..0000000 Binary files a/.open-second-brain/brain.sqlite-shm and /dev/null differ diff --git a/.open-second-brain/brain.sqlite-wal b/.open-second-brain/brain.sqlite-wal deleted file mode 100644 index e69de29..0000000 diff --git a/.stfolder/syncthing-folder-abde28.txt b/.stfolder/syncthing-folder-abde28.txt new file mode 100644 index 0000000..b4a88ad --- /dev/null +++ b/.stfolder/syncthing-folder-abde28.txt @@ -0,0 +1,5 @@ +# This directory is a Syncthing folder marker. +# Do not delete. + +folderID: hermes-brain +created: 2026-07-22T23:45:09+02:00 diff --git a/.stignore b/.stignore new file mode 100644 index 0000000..5f8e67f --- /dev/null +++ b/.stignore @@ -0,0 +1,4 @@ +// Von Hermes auf Server nicht syncen +.hermes +.obsidian +.trash diff --git a/Brain/.artifacts/run-1207-mrqw73j4/c5f549c9943e6647.json b/Brain/.artifacts/run-1014-mrwgstia/45f0f56d62977f35.json similarity index 89% rename from Brain/.artifacts/run-1207-mrqw73j4/c5f549c9943e6647.json rename to Brain/.artifacts/run-1014-mrwgstia/45f0f56d62977f35.json index 3af3f66..feb0cc9 100644 --- a/Brain/.artifacts/run-1207-mrqw73j4/c5f549c9943e6647.json +++ b/Brain/.artifacts/run-1014-mrwgstia/45f0f56d62977f35.json @@ -1,5 +1,17 @@ { "items": [ + { + "body": "## Origin\n\n- [[sig-2026-07-19-server-port-map]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-19-server-port-map]]" + ], + "id": "pref-server-port-map", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-server-port-map.md", + "tier": "supporting", + "tokens": 12, + "trimmed": false + }, { "body": "## Origin\n\n- [[sig-2026-07-18-vps-plan-august-2026]]", "epistemic": "observed", @@ -99,6 +111,6 @@ ], "max_tokens": 1024, "skipped": [], - "tokens_used": 101, + "tokens_used": 113, "vault_path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes" } \ No newline at end of file diff --git a/Brain/.artifacts/run-1207-mrqw73j4/c6497f2f689d463c.json b/Brain/.artifacts/run-1309-mrwh167p/45f0f56d62977f35.json similarity index 84% rename from Brain/.artifacts/run-1207-mrqw73j4/c6497f2f689d463c.json rename to Brain/.artifacts/run-1309-mrwh167p/45f0f56d62977f35.json index 68f69ea..feb0cc9 100644 --- a/Brain/.artifacts/run-1207-mrqw73j4/c6497f2f689d463c.json +++ b/Brain/.artifacts/run-1309-mrwh167p/45f0f56d62977f35.json @@ -1,5 +1,17 @@ { "items": [ + { + "body": "## Origin\n\n- [[sig-2026-07-19-server-port-map]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-19-server-port-map]]" + ], + "id": "pref-server-port-map", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-server-port-map.md", + "tier": "supporting", + "tokens": 12, + "trimmed": false + }, { "body": "## Origin\n\n- [[sig-2026-07-18-vps-plan-august-2026]]", "epistemic": "observed", @@ -49,12 +61,15 @@ "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-12-default-model-deepseek]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-12-default-model-deepseek]]" + ], "id": "pref-default-model-deepseek", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-default-model-deepseek.md", "tier": "supporting", - "tokens": 0, + "tokens": 14, "trimmed": false }, { @@ -96,6 +111,6 @@ ], "max_tokens": 1024, "skipped": [], - "tokens_used": 87, + "tokens_used": 113, "vault_path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes" } \ No newline at end of file diff --git a/Brain/.artifacts/run-1207-mrqw73j4/e8bc0fd7b72f644c.json b/Brain/.artifacts/run-2702-mrwjkw80/45f0f56d62977f35.json similarity index 55% rename from Brain/.artifacts/run-1207-mrqw73j4/e8bc0fd7b72f644c.json rename to Brain/.artifacts/run-2702-mrwjkw80/45f0f56d62977f35.json index b94a76e..feb0cc9 100644 --- a/Brain/.artifacts/run-1207-mrqw73j4/e8bc0fd7b72f644c.json +++ b/Brain/.artifacts/run-2702-mrwjkw80/45f0f56d62977f35.json @@ -1,80 +1,116 @@ { "items": [ { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-19-server-port-map]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-19-server-port-map]]" + ], + "id": "pref-server-port-map", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-server-port-map.md", + "tier": "supporting", + "tokens": 12, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-18-vps-plan-august-2026]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-18-vps-plan-august-2026]]" + ], "id": "pref-vps-plan-august-2026", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-vps-plan-august-2026.md", "tier": "supporting", - "tokens": 0, + "tokens": 13, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-16-tts-german-writing]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-tts-german-writing]]" + ], "id": "pref-tts-german-writing", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-tts-german-writing.md", "tier": "supporting", - "tokens": 0, + "tokens": 13, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-16-check-system-time]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-check-system-time]]" + ], "id": "pref-check-system-time", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-check-system-time.md", "tier": "supporting", - "tokens": 0, + "tokens": 13, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-16-auto-brain-load]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-auto-brain-load]]" + ], "id": "pref-auto-brain-load", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-auto-brain-load.md", "tier": "supporting", - "tokens": 0, + "tokens": 12, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-12-default-model-deepseek]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-12-default-model-deepseek]]" + ], "id": "pref-default-model-deepseek", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-default-model-deepseek.md", "tier": "supporting", - "tokens": 0, + "tokens": 14, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-09-meriting-ai-personal]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-meriting-ai-personal]]" + ], "id": "pref-meriting-ai-personal", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-meriting-ai-personal.md", "tier": "supporting", - "tokens": 0, + "tokens": 13, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-09-brain-index]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-brain-index]]" + ], "id": "pref-brain-index", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-brain-index.md", "tier": "supporting", - "tokens": 0, + "tokens": 11, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-09-save-more-often]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-save-more-often]]" + ], "id": "pref-save-more-often", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-save-more-often.md", "tier": "supporting", - "tokens": 0, + "tokens": 12, "trimmed": false } ], "max_tokens": 1024, "skipped": [], - "tokens_used": 0, + "tokens_used": 113, "vault_path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes" } \ No newline at end of file diff --git a/Brain/.artifacts/run-42043-mrpi942z/e8bc0fd7b72f644c.json b/Brain/.artifacts/run-42043-mrpi942z/e8bc0fd7b72f644c.json deleted file mode 100644 index b94a76e..0000000 --- a/Brain/.artifacts/run-42043-mrpi942z/e8bc0fd7b72f644c.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "items": [ - { - "body": "", - "epistemic": "observed", - "id": "pref-vps-plan-august-2026", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-vps-plan-august-2026.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-tts-german-writing", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-tts-german-writing.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-check-system-time", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-check-system-time.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-auto-brain-load", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-auto-brain-load.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-default-model-deepseek", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-default-model-deepseek.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-meriting-ai-personal", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-meriting-ai-personal.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-brain-index", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-brain-index.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-save-more-often", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-save-more-often.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - } - ], - "max_tokens": 1024, - "skipped": [], - "tokens_used": 0, - "vault_path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes" -} \ No newline at end of file diff --git a/Brain/.artifacts/run-42043-mrpi942z/f9b39e21aeb74288.json b/Brain/.artifacts/run-42043-mrpi942z/f9b39e21aeb74288.json deleted file mode 100644 index a09b0c2..0000000 --- a/Brain/.artifacts/run-42043-mrpi942z/f9b39e21aeb74288.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "items": [ - { - "body": "", - "epistemic": "observed", - "id": "pref-tts-german-writing", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-tts-german-writing.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-check-system-time", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-check-system-time.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-auto-brain-load", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-auto-brain-load.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-default-model-deepseek", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-default-model-deepseek.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-meriting-ai-personal", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-meriting-ai-personal.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-brain-index", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-brain-index.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - }, - { - "body": "", - "epistemic": "observed", - "id": "pref-save-more-often", - "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-save-more-often.md", - "tier": "supporting", - "tokens": 0, - "trimmed": false - } - ], - "max_tokens": 1024, - "skipped": [], - "tokens_used": 0, - "vault_path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes" -} \ No newline at end of file diff --git a/Brain/.artifacts/run-1145-mrqvvjdc/e8bc0fd7b72f644c.json b/Brain/.artifacts/run-4262-mrwnaz34/45f0f56d62977f35.json similarity index 55% rename from Brain/.artifacts/run-1145-mrqvvjdc/e8bc0fd7b72f644c.json rename to Brain/.artifacts/run-4262-mrwnaz34/45f0f56d62977f35.json index b94a76e..feb0cc9 100644 --- a/Brain/.artifacts/run-1145-mrqvvjdc/e8bc0fd7b72f644c.json +++ b/Brain/.artifacts/run-4262-mrwnaz34/45f0f56d62977f35.json @@ -1,80 +1,116 @@ { "items": [ { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-19-server-port-map]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-19-server-port-map]]" + ], + "id": "pref-server-port-map", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-server-port-map.md", + "tier": "supporting", + "tokens": 12, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-18-vps-plan-august-2026]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-18-vps-plan-august-2026]]" + ], "id": "pref-vps-plan-august-2026", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-vps-plan-august-2026.md", "tier": "supporting", - "tokens": 0, + "tokens": 13, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-16-tts-german-writing]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-tts-german-writing]]" + ], "id": "pref-tts-german-writing", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-tts-german-writing.md", "tier": "supporting", - "tokens": 0, + "tokens": 13, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-16-check-system-time]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-check-system-time]]" + ], "id": "pref-check-system-time", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-check-system-time.md", "tier": "supporting", - "tokens": 0, + "tokens": 13, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-16-auto-brain-load]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-auto-brain-load]]" + ], "id": "pref-auto-brain-load", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-auto-brain-load.md", "tier": "supporting", - "tokens": 0, + "tokens": 12, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-12-default-model-deepseek]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-12-default-model-deepseek]]" + ], "id": "pref-default-model-deepseek", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-default-model-deepseek.md", "tier": "supporting", - "tokens": 0, + "tokens": 14, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-09-meriting-ai-personal]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-meriting-ai-personal]]" + ], "id": "pref-meriting-ai-personal", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-meriting-ai-personal.md", "tier": "supporting", - "tokens": 0, + "tokens": 13, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-09-brain-index]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-brain-index]]" + ], "id": "pref-brain-index", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-brain-index.md", "tier": "supporting", - "tokens": 0, + "tokens": 11, "trimmed": false }, { - "body": "", + "body": "## Origin\n\n- [[sig-2026-07-09-save-more-often]]", "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-save-more-often]]" + ], "id": "pref-save-more-often", "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-save-more-often.md", "tier": "supporting", - "tokens": 0, + "tokens": 12, "trimmed": false } ], "max_tokens": 1024, "skipped": [], - "tokens_used": 0, + "tokens_used": 113, "vault_path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes" } \ No newline at end of file diff --git a/Brain/.artifacts/run-5706-mrxbt03p/45f0f56d62977f35.json b/Brain/.artifacts/run-5706-mrxbt03p/45f0f56d62977f35.json new file mode 100644 index 0000000..feb0cc9 --- /dev/null +++ b/Brain/.artifacts/run-5706-mrxbt03p/45f0f56d62977f35.json @@ -0,0 +1,116 @@ +{ + "items": [ + { + "body": "## Origin\n\n- [[sig-2026-07-19-server-port-map]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-19-server-port-map]]" + ], + "id": "pref-server-port-map", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-server-port-map.md", + "tier": "supporting", + "tokens": 12, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-18-vps-plan-august-2026]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-18-vps-plan-august-2026]]" + ], + "id": "pref-vps-plan-august-2026", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-vps-plan-august-2026.md", + "tier": "supporting", + "tokens": 13, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-16-tts-german-writing]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-tts-german-writing]]" + ], + "id": "pref-tts-german-writing", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-tts-german-writing.md", + "tier": "supporting", + "tokens": 13, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-16-check-system-time]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-check-system-time]]" + ], + "id": "pref-check-system-time", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-check-system-time.md", + "tier": "supporting", + "tokens": 13, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-16-auto-brain-load]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-auto-brain-load]]" + ], + "id": "pref-auto-brain-load", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-auto-brain-load.md", + "tier": "supporting", + "tokens": 12, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-12-default-model-deepseek]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-12-default-model-deepseek]]" + ], + "id": "pref-default-model-deepseek", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-default-model-deepseek.md", + "tier": "supporting", + "tokens": 14, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-09-meriting-ai-personal]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-meriting-ai-personal]]" + ], + "id": "pref-meriting-ai-personal", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-meriting-ai-personal.md", + "tier": "supporting", + "tokens": 13, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-09-brain-index]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-brain-index]]" + ], + "id": "pref-brain-index", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-brain-index.md", + "tier": "supporting", + "tokens": 11, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-09-save-more-often]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-save-more-often]]" + ], + "id": "pref-save-more-often", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-save-more-often.md", + "tier": "supporting", + "tokens": 12, + "trimmed": false + } + ], + "max_tokens": 1024, + "skipped": [], + "tokens_used": 113, + "vault_path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes" +} \ No newline at end of file diff --git a/Brain/.artifacts/run-989-mrwgrv2a/45f0f56d62977f35.json b/Brain/.artifacts/run-989-mrwgrv2a/45f0f56d62977f35.json new file mode 100644 index 0000000..feb0cc9 --- /dev/null +++ b/Brain/.artifacts/run-989-mrwgrv2a/45f0f56d62977f35.json @@ -0,0 +1,116 @@ +{ + "items": [ + { + "body": "## Origin\n\n- [[sig-2026-07-19-server-port-map]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-19-server-port-map]]" + ], + "id": "pref-server-port-map", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-server-port-map.md", + "tier": "supporting", + "tokens": 12, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-18-vps-plan-august-2026]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-18-vps-plan-august-2026]]" + ], + "id": "pref-vps-plan-august-2026", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-vps-plan-august-2026.md", + "tier": "supporting", + "tokens": 13, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-16-tts-german-writing]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-tts-german-writing]]" + ], + "id": "pref-tts-german-writing", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-tts-german-writing.md", + "tier": "supporting", + "tokens": 13, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-16-check-system-time]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-check-system-time]]" + ], + "id": "pref-check-system-time", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-check-system-time.md", + "tier": "supporting", + "tokens": 13, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-16-auto-brain-load]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-16-auto-brain-load]]" + ], + "id": "pref-auto-brain-load", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-auto-brain-load.md", + "tier": "supporting", + "tokens": 12, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-12-default-model-deepseek]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-12-default-model-deepseek]]" + ], + "id": "pref-default-model-deepseek", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-default-model-deepseek.md", + "tier": "supporting", + "tokens": 14, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-09-meriting-ai-personal]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-meriting-ai-personal]]" + ], + "id": "pref-meriting-ai-personal", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-meriting-ai-personal.md", + "tier": "supporting", + "tokens": 13, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-09-brain-index]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-brain-index]]" + ], + "id": "pref-brain-index", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-brain-index.md", + "tier": "supporting", + "tokens": 11, + "trimmed": false + }, + { + "body": "## Origin\n\n- [[sig-2026-07-09-save-more-often]]", + "epistemic": "observed", + "evidence_refs": [ + "[[sig-2026-07-09-save-more-often]]" + ], + "id": "pref-save-more-often", + "path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes/Brain/preferences/pref-save-more-often.md", + "tier": "supporting", + "tokens": 12, + "trimmed": false + } + ], + "max_tokens": 1024, + "skipped": [], + "tokens_used": 113, + "vault_path": "/Users/baka/Library/Mobile Documents/iCloud~md~obsidian/Documents/Hermes" +} \ No newline at end of file diff --git a/Brain/inbox/melo-next-steps.md b/Brain/inbox/melo-next-steps.md new file mode 100644 index 0000000..ceab581 --- /dev/null +++ b/Brain/inbox/melo-next-steps.md @@ -0,0 +1,87 @@ +# Melo App – Nächste Schritte + +--- + +## 1. Neue Abhängigkeiten installieren + +```bash +cd ~/Projects/melo_app +flutter pub add http +flutter pub add crypto +``` + +## 2. Navidrome auf dem Server starten + +Per SSH auf Aingrad: + +```bash +sudo bash /home/dustin/setup-melo-server.sh +# Danach NEUES Terminal-Fenster (Docker-Gruppe) +# Prüfen: docker ps +``` + +## 3. Navidrome User anlegen + +`https://musik.baka-net.de` → ersten Admin-User anlegen + +## 4. Musik auf Server + +In `/home/dustin/musik/songs/` legen. Navidrome scannt alle 10 Min. + +## 5. Server-Sync in App aktivieren + +`lib/screens/home_screen.dart` Zeile ~255: +```dart +// ALT: +MeloHeader(onDownload: _zeigeDownloadDialog, onSearch: _zeigeSuche), + +// NEU: +MeloHeader(onDownload: _zeigeDownloadDialog, onSearch: _zeigeSuche, onServer: _zeigeServerBrowser), +``` + +## 6. Widgets aktivieren (optional) + +In derselben Datei Kommentare entfernen bei: +- `RecentWidget(...)` – Zuletzt gehört +- `TagStatsWidget(...)` – Tag-Statistiken + +## 7. App bauen + +```bash +flutter build apk --release +``` + +--- + +**Neue App-Dateien:** +- `lib/services/navidrome_service.dart` +- `lib/widgets/navidrome_browser.dart` +- `lib/widgets/recent_widget.dart` +- `lib/widgets/tag_stats_widget.dart` + +--- + +## 8. SSH-Zugriff von Server auf Mac einrichten + +Damit Hermes vom Server aus auf deinem Mac arbeiten kann (z.B. Flutter build): + +```bash +# Auf dem Mac: SSH-Key erstellen (falls nicht vorhanden) +ssh-keygen -t ed25519 -C "aingrad->mac" +cat ~/.ssh/id_ed25519.pub + +# Output in ~/.ssh/authorized_keys auf dem Mac hinzufügen + +# Dann auf Aingrad testen: +ssh dustin@mac.local "echo funktioniert" +``` + +**Für remote SSH:** Mac braucht eine feste IP oder du nutzt `mac.baka-net.de` über Caddy/Tailscale. + +**Alternativ (einfacher):** Wenn du Tailscale auf beiden Geräten installierst: +```bash +# Beide Geräte: tailscale installieren +# Mac: tailscale up +# Aingrad: tailscale up +# Dann: ssh dustin@mac-tailscale-hostname +``` diff --git a/Brain/inbox/sig-2026-07-23-o2b-server-setup.md b/Brain/inbox/sig-2026-07-23-o2b-server-setup.md new file mode 100644 index 0000000..f29b05b --- /dev/null +++ b/Brain/inbox/sig-2026-07-23-o2b-server-setup.md @@ -0,0 +1,10 @@ +--- +kind: brain-signal +id: sig-2026-07-23-o2b-server-setup +created_at: "2026-07-23T11:12:15.445Z" +tags: [brain, brain/signal, brain/topic/o2b-server-setup] +topic: o2b-server-setup +signal: positive +agent: hermes-main +principle: "O2B Memory Provider auf dem Server ist aktiv und funktionsfähig. Suche und Notizen-Funktion über CLI verfügbar. Vault wird per Syncthing mit Mac synchronisiert." +--- diff --git a/Brain/inbox/sig-2026-07-23-server-port-map.md b/Brain/inbox/sig-2026-07-23-server-port-map.md new file mode 100644 index 0000000..cffb93a --- /dev/null +++ b/Brain/inbox/sig-2026-07-23-server-port-map.md @@ -0,0 +1,10 @@ +--- +kind: brain-signal +id: sig-2026-07-23-server-port-map +created_at: "2026-07-23T11:14:32.960Z" +tags: [brain, brain/signal, brain/topic/server-port-map] +topic: server-port-map +signal: positive +agent: hermes-main +principle: "Server-Port-Map in pref-server-port-map gespeichert. Wichtige Ports: 22 SSH, 80/443 Caddy, 8008 Synapse (localhost), 8384 Syncthing WebUI, 22000 Syncthing Transfer, 2019 Caddy Admin." +--- diff --git a/Brain/log/2026-07-23.013d10a8.jsonl b/Brain/log/2026-07-23.013d10a8.jsonl new file mode 100644 index 0000000..30f31fa --- /dev/null +++ b/Brain/log/2026-07-23.013d10a8.jsonl @@ -0,0 +1,13 @@ +{"ts":"2026-07-23T11:12:04Z","kind":"note","payload":{"text":"Test: O2B Setup auf Server läuft 2026-07-23_13:12","agent":"agent"}} +{"ts":"2026-07-23T11:12:12Z","kind":"note","payload":{"text":"O2B Memory Provider auf Server Aingrad aktiviert. Vault per Syncthing mit Mac synchronisiert. Hermes kann jetzt brain_search, brain_note und brain_context nutzen. Bun installiert, o2b CLI in ~/.local/bin. 44 Dokumente indiziert.","agent":"hermes-main"}} +{"ts":"2026-07-23T11:12:15Z","kind":"feedback","payload":{"signal":"[[sig-2026-07-23-o2b-server-setup]]","topic":"o2b-server-setup","sign":"positive","agent":"hermes-main"}} +{"ts":"2026-07-23T11:14:07Z","kind":"note","payload":{"text":"Server Aingrad (159.195.51.99) - Netcup RS 1000 G12, Ubuntu 24.04, Domain baka-net.de. Hostname: Aingrad. 251GB SSD (6GB used, 235GB frei). IPs: 159.195.51.99 (IPv4). Läuft seit 1h (heute neugestartet).","agent":"hermes-main"}} +{"ts":"2026-07-23T11:14:10Z","kind":"note","payload":{"text":"Matrix Synapse als Docker Container auf localhost:8008. Config in /home/dustin/synapse/. registration_shared_secret: melo-reg-2026. Users: @baka (Admin), @hermes (Bot).","agent":"hermes-main"}} +{"ts":"2026-07-23T11:14:13Z","kind":"note","payload":{"text":"Caddy v2.9.1 als Reverse Proxy fuer baka-net.de und matrix.baka-net.de. baka-net.de zeigt auf /var/www/seite/. matrix.baka-net.de proxied zu localhost:8008 (Synapse).","agent":"hermes-main"}} +{"ts":"2026-07-23T11:14:18Z","kind":"note","payload":{"text":"Hermes Agent v0.19.0 Gateway auf Aingrad. Installiert in /home/dustin/hermes-agent/ (venv, kein Docker). Python 3.12.3. Config in /home/dustin/.hermes/config.yaml. Provider: DeepSeek V4 Flash. Matrix-Token in .hermes.env.","agent":"hermes-main"}} +{"ts":"2026-07-23T11:14:20Z","kind":"note","payload":{"text":"Docker Engine 29.1.3 laeuft, aber user dustin NICHT in docker group. Einziger aktiver Container: synapse (matrixdotorg/synapse). Syncthing und fail2ban als systemd-Services.","agent":"hermes-main"}} +{"ts":"2026-07-23T11:14:21Z","kind":"note","payload":{"text":"Syncthing systemd-Service aktiv. Sync-Port 22000, Web UI auf localhost:8384. hermes-vault wird per Syncthing mit Mac synchronisiert. .stfolder und .stignore vorhanden in /home/dustin/hermes-vault/.","agent":"hermes-main"}} +{"ts":"2026-07-23T11:14:22Z","kind":"note","payload":{"text":"Open Second Brain v1.26.1 als Hermes Plugin und Memory Provider aktiv. Vault: /home/dustin/hermes-vault/. o2b CLI in ~/.local/bin/. Bun installiert unter ~/.bun/. 44 Dokumente indiziert, 9 Preferences aktiv, 14 Signale verarbeitet.","agent":"hermes-main"}} +{"ts":"2026-07-23T11:14:23Z","kind":"note","payload":{"text":"TODO Server: Docker-Gruppe fuer dustin einrichten, OBSIDIAN_VAULT_PATH in .hermes.env auf Server-Pfad updaten. Geplant: Upgrade auf RS 2000 G12 ab August 2026, dann alles in Docker. Keine Projekte auf Server (nur Mac). Kein Ollama.","agent":"hermes-main"}} +{"ts":"2026-07-23T11:14:32Z","kind":"feedback","payload":{"signal":"[[sig-2026-07-23-server-port-map]]","topic":"server-port-map","sign":"positive","agent":"hermes-main"}} +{"ts":"2026-07-23T13:12:03Z","kind":"note","payload":{"text":"Telegram als Primary-Channel aktiviert. Telegram-Plugin enabled, simplex-chat Daemon gestoppt + Plugin disabled. Matrix bleibt als Backup aktiv. Gateway wird neugestartet fuer Telegram.","agent":"hermes-main"}} diff --git a/Brain/log/2026-07-23.013d10a8.md b/Brain/log/2026-07-23.013d10a8.md new file mode 100644 index 0000000..80b9d6c --- /dev/null +++ b/Brain/log/2026-07-23.013d10a8.md @@ -0,0 +1,63 @@ +--- +kind: brain-log +date: 2026-07-23 +tags: [brain, brain/log] +--- + +# Brain log — 2026-07-23 + +## 11:12:04Z — note +- text: Test: O2B Setup auf Server läuft 2026-07-23_13:12 +- agent: agent + +## 11:12:12Z — note +- text: O2B Memory Provider auf Server Aingrad aktiviert. Vault per Syncthing mit Mac synchronisiert. Hermes kann jetzt brain_search, brain_note und brain_context nutzen. Bun installiert, o2b CLI in ~/.local/bin. 44 Dokumente indiziert. +- agent: hermes-main + +## 11:12:15Z — feedback +- signal: [[sig-2026-07-23-o2b-server-setup]] +- topic: o2b-server-setup +- sign: positive +- agent: hermes-main + +## 11:14:07Z — note +- text: Server Aingrad (159.195.51.99) - Netcup RS 1000 G12, Ubuntu 24.04, Domain baka-net.de. Hostname: Aingrad. 251GB SSD (6GB used, 235GB frei). IPs: 159.195.51.99 (IPv4). Läuft seit 1h (heute neugestartet). +- agent: hermes-main + +## 11:14:10Z — note +- text: Matrix Synapse als Docker Container auf localhost:8008. Config in /home/dustin/synapse/. registration_shared_secret: melo-reg-2026. Users: @baka (Admin), @hermes (Bot). +- agent: hermes-main + +## 11:14:13Z — note +- text: Caddy v2.9.1 als Reverse Proxy fuer baka-net.de und matrix.baka-net.de. baka-net.de zeigt auf /var/www/seite/. matrix.baka-net.de proxied zu localhost:8008 (Synapse). +- agent: hermes-main + +## 11:14:18Z — note +- text: Hermes Agent v0.19.0 Gateway auf Aingrad. Installiert in /home/dustin/hermes-agent/ (venv, kein Docker). Python 3.12.3. Config in /home/dustin/.hermes/config.yaml. Provider: DeepSeek V4 Flash. Matrix-Token in .hermes.env. +- agent: hermes-main + +## 11:14:20Z — note +- text: Docker Engine 29.1.3 laeuft, aber user dustin NICHT in docker group. Einziger aktiver Container: synapse (matrixdotorg/synapse). Syncthing und fail2ban als systemd-Services. +- agent: hermes-main + +## 11:14:21Z — note +- text: Syncthing systemd-Service aktiv. Sync-Port 22000, Web UI auf localhost:8384. hermes-vault wird per Syncthing mit Mac synchronisiert. .stfolder und .stignore vorhanden in /home/dustin/hermes-vault/. +- agent: hermes-main + +## 11:14:22Z — note +- text: Open Second Brain v1.26.1 als Hermes Plugin und Memory Provider aktiv. Vault: /home/dustin/hermes-vault/. o2b CLI in ~/.local/bin/. Bun installiert unter ~/.bun/. 44 Dokumente indiziert, 9 Preferences aktiv, 14 Signale verarbeitet. +- agent: hermes-main + +## 11:14:23Z — note +- text: TODO Server: Docker-Gruppe fuer dustin einrichten, OBSIDIAN_VAULT_PATH in .hermes.env auf Server-Pfad updaten. Geplant: Upgrade auf RS 2000 G12 ab August 2026, dann alles in Docker. Keine Projekte auf Server (nur Mac). Kein Ollama. +- agent: hermes-main + +## 11:14:32Z — feedback +- signal: [[sig-2026-07-23-server-port-map]] +- topic: server-port-map +- sign: positive +- agent: hermes-main + +## 13:12:03Z — note +- text: Telegram als Primary-Channel aktiviert. Telegram-Plugin enabled, simplex-chat Daemon gestoppt + Plugin disabled. Matrix bleibt als Backup aktiv. Gateway wird neugestartet fuer Telegram. +- agent: hermes-main diff --git a/Brain/metrics/index.jsonl b/Brain/metrics/index.jsonl index 9ae2ce5..1217e37 100644 --- a/Brain/metrics/index.jsonl +++ b/Brain/metrics/index.jsonl @@ -1 +1,2 @@ {"schema":"o2b.metrics.v1","surface":"index","run_at":"2026-07-09T14:02:54.872Z","payload":{"added":3,"updated":0,"deleted":0,"alias_resolved":0,"relation_violations":0,"tier_drift":0}} +{"schema":"o2b.metrics.v1","surface":"index","run_at":"2026-07-23T11:12:04.985Z","payload":{"added":42,"updated":1,"deleted":1,"alias_resolved":0,"relation_violations":0,"tier_drift":0}} diff --git a/Brain/search/activation-state.json b/Brain/search/activation-state.json new file mode 100644 index 0000000..8407375 --- /dev/null +++ b/Brain/search/activation-state.json @@ -0,0 +1,504 @@ +{ + "version": 1, + "events": 6, + "updatedAt": "2026-07-23T12:47:03.764Z", + "paths": { + "Brain/INDEX.md": { + "strength": 0.3, + "lastAccessAt": 1784810823764, + "accessCount": 3 + }, + "Brain/_BRAIN.md": { + "strength": 0.1, + "lastAccessAt": 1784805125422, + "accessCount": 1 + }, + "Brain/active.md": { + "strength": 0.1, + "lastAccessAt": 1784805125265, + "accessCount": 1 + }, + "Brain/inbox/sig-2026-07-09-brain-index.md": { + "strength": 0.1, + "lastAccessAt": 1784805125422, + "accessCount": 1 + }, + "Brain/inbox/sig-2026-07-09-meriting-ai-personal.md": { + "strength": 0.1, + "lastAccessAt": 1784805125422, + "accessCount": 1 + }, + "Brain/inbox/sig-2026-07-09-save-more-often.md": { + "strength": 0.1, + "lastAccessAt": 1784805125422, + "accessCount": 1 + }, + "Brain/inbox/sig-2026-07-16-auto-brain-load.md": { + "strength": 0.1, + "lastAccessAt": 1784805125422, + "accessCount": 1 + }, + "Brain/inbox/sig-2026-07-16-check-system-time.md": { + "strength": 0.1, + "lastAccessAt": 1784805125422, + "accessCount": 1 + }, + "Brain/inbox/sig-2026-07-18-vps-plan-august-2026.md": { + "strength": 0.1, + "lastAccessAt": 1784805125265, + "accessCount": 1 + }, + "Brain/inbox/sig-2026-07-19-server-port-map-2.md": { + "strength": 0.1, + "lastAccessAt": 1784805125265, + "accessCount": 1 + }, + "Brain/inbox/sig-2026-07-19-server-port-map.md": { + "strength": 0.1, + "lastAccessAt": 1784805125265, + "accessCount": 1 + }, + "Brain/log/2026-07-09.a0360993.md": { + "strength": 0.2, + "lastAccessAt": 1784810821353, + "accessCount": 2 + }, + "Brain/log/2026-07-16.a0360993.md": { + "strength": 0.1, + "lastAccessAt": 1784810821353, + "accessCount": 1 + }, + "Brain/log/2026-07-17.a0360993.md": { + "strength": 0.1, + "lastAccessAt": 1784810822564, + "accessCount": 1 + }, + "Brain/log/2026-07-19.a0360993.md": { + "strength": 0.1, + "lastAccessAt": 1784805125265, + "accessCount": 1 + }, + "Brain/log/2026-07-20.a0360993.md": { + "strength": 0.2, + "lastAccessAt": 1784810822564, + "accessCount": 2 + }, + "Brain/log/2026-07-23.013d10a8.md": { + "strength": 0.2, + "lastAccessAt": 1784805125422, + "accessCount": 2 + }, + "Brain/log/2026-07-23.a0360993.md": { + "strength": 0.1, + "lastAccessAt": 1784805125265, + "accessCount": 1 + }, + "Brain/pinned.md": { + "strength": 0.2, + "lastAccessAt": 1784810823764, + "accessCount": 2 + }, + "Brain/preferences/pref-auto-brain-load.md": { + "strength": 0.1, + "lastAccessAt": 1784805125422, + "accessCount": 1 + }, + "Brain/preferences/pref-brain-index.md": { + "strength": 0.1, + "lastAccessAt": 1784805125422, + "accessCount": 1 + }, + "Brain/preferences/pref-server-port-map.md": { + "strength": 0.1, + "lastAccessAt": 1784805125265, + "accessCount": 1 + }, + "Soul.md": { + "strength": 0.1, + "lastAccessAt": 1784810815823, + "accessCount": 1 + } + }, + "coAccess": [ + { + "a": "Brain/INDEX.md", + "b": "Brain/log/2026-07-09.a0360993.md", + "count": 2 + }, + { + "a": "Brain/INDEX.md", + "b": "Brain/pinned.md", + "count": 2 + }, + { + "a": "Brain/_BRAIN.md", + "b": "Brain/inbox/sig-2026-07-09-brain-index.md", + "count": 1 + }, + { + "a": "Brain/_BRAIN.md", + "b": "Brain/inbox/sig-2026-07-09-meriting-ai-personal.md", + "count": 1 + }, + { + "a": "Brain/_BRAIN.md", + "b": "Brain/inbox/sig-2026-07-09-save-more-often.md", + "count": 1 + }, + { + "a": "Brain/_BRAIN.md", + "b": "Brain/inbox/sig-2026-07-16-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/_BRAIN.md", + "b": "Brain/inbox/sig-2026-07-16-check-system-time.md", + "count": 1 + }, + { + "a": "Brain/_BRAIN.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/_BRAIN.md", + "b": "Brain/preferences/pref-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/_BRAIN.md", + "b": "Brain/preferences/pref-brain-index.md", + "count": 1 + }, + { + "a": "Brain/active.md", + "b": "Brain/inbox/sig-2026-07-18-vps-plan-august-2026.md", + "count": 1 + }, + { + "a": "Brain/active.md", + "b": "Brain/inbox/sig-2026-07-19-server-port-map-2.md", + "count": 1 + }, + { + "a": "Brain/active.md", + "b": "Brain/inbox/sig-2026-07-19-server-port-map.md", + "count": 1 + }, + { + "a": "Brain/active.md", + "b": "Brain/log/2026-07-19.a0360993.md", + "count": 1 + }, + { + "a": "Brain/active.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/active.md", + "b": "Brain/log/2026-07-23.a0360993.md", + "count": 1 + }, + { + "a": "Brain/active.md", + "b": "Brain/preferences/pref-server-port-map.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-brain-index.md", + "b": "Brain/inbox/sig-2026-07-09-meriting-ai-personal.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-brain-index.md", + "b": "Brain/inbox/sig-2026-07-09-save-more-often.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-brain-index.md", + "b": "Brain/inbox/sig-2026-07-16-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-brain-index.md", + "b": "Brain/inbox/sig-2026-07-16-check-system-time.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-brain-index.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-brain-index.md", + "b": "Brain/preferences/pref-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-brain-index.md", + "b": "Brain/preferences/pref-brain-index.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-meriting-ai-personal.md", + "b": "Brain/inbox/sig-2026-07-09-save-more-often.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-meriting-ai-personal.md", + "b": "Brain/inbox/sig-2026-07-16-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-meriting-ai-personal.md", + "b": "Brain/inbox/sig-2026-07-16-check-system-time.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-meriting-ai-personal.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-meriting-ai-personal.md", + "b": "Brain/preferences/pref-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-meriting-ai-personal.md", + "b": "Brain/preferences/pref-brain-index.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-save-more-often.md", + "b": "Brain/inbox/sig-2026-07-16-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-save-more-often.md", + "b": "Brain/inbox/sig-2026-07-16-check-system-time.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-save-more-often.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-save-more-often.md", + "b": "Brain/preferences/pref-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-09-save-more-often.md", + "b": "Brain/preferences/pref-brain-index.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-16-auto-brain-load.md", + "b": "Brain/inbox/sig-2026-07-16-check-system-time.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-16-auto-brain-load.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-16-auto-brain-load.md", + "b": "Brain/preferences/pref-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-16-auto-brain-load.md", + "b": "Brain/preferences/pref-brain-index.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-16-check-system-time.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-16-check-system-time.md", + "b": "Brain/preferences/pref-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-16-check-system-time.md", + "b": "Brain/preferences/pref-brain-index.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-18-vps-plan-august-2026.md", + "b": "Brain/inbox/sig-2026-07-19-server-port-map-2.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-18-vps-plan-august-2026.md", + "b": "Brain/inbox/sig-2026-07-19-server-port-map.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-18-vps-plan-august-2026.md", + "b": "Brain/log/2026-07-19.a0360993.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-18-vps-plan-august-2026.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-18-vps-plan-august-2026.md", + "b": "Brain/log/2026-07-23.a0360993.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-18-vps-plan-august-2026.md", + "b": "Brain/preferences/pref-server-port-map.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-19-server-port-map-2.md", + "b": "Brain/inbox/sig-2026-07-19-server-port-map.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-19-server-port-map-2.md", + "b": "Brain/log/2026-07-19.a0360993.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-19-server-port-map-2.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-19-server-port-map-2.md", + "b": "Brain/log/2026-07-23.a0360993.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-19-server-port-map-2.md", + "b": "Brain/preferences/pref-server-port-map.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-19-server-port-map.md", + "b": "Brain/log/2026-07-19.a0360993.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-19-server-port-map.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-19-server-port-map.md", + "b": "Brain/log/2026-07-23.a0360993.md", + "count": 1 + }, + { + "a": "Brain/inbox/sig-2026-07-19-server-port-map.md", + "b": "Brain/preferences/pref-server-port-map.md", + "count": 1 + }, + { + "a": "Brain/INDEX.md", + "b": "Brain/log/2026-07-16.a0360993.md", + "count": 1 + }, + { + "a": "Brain/INDEX.md", + "b": "Brain/log/2026-07-20.a0360993.md", + "count": 1 + }, + { + "a": "Brain/INDEX.md", + "b": "Soul.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-09.a0360993.md", + "b": "Brain/log/2026-07-16.a0360993.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-09.a0360993.md", + "b": "Brain/log/2026-07-20.a0360993.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-09.a0360993.md", + "b": "Brain/pinned.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-09.a0360993.md", + "b": "Soul.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-16.a0360993.md", + "b": "Brain/pinned.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-17.a0360993.md", + "b": "Brain/log/2026-07-20.a0360993.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-19.a0360993.md", + "b": "Brain/log/2026-07-23.013d10a8.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-19.a0360993.md", + "b": "Brain/log/2026-07-23.a0360993.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-19.a0360993.md", + "b": "Brain/preferences/pref-server-port-map.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-20.a0360993.md", + "b": "Soul.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-23.013d10a8.md", + "b": "Brain/log/2026-07-23.a0360993.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-23.013d10a8.md", + "b": "Brain/preferences/pref-auto-brain-load.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-23.013d10a8.md", + "b": "Brain/preferences/pref-brain-index.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-23.013d10a8.md", + "b": "Brain/preferences/pref-server-port-map.md", + "count": 1 + }, + { + "a": "Brain/log/2026-07-23.a0360993.md", + "b": "Brain/preferences/pref-server-port-map.md", + "count": 1 + }, + { + "a": "Brain/preferences/pref-auto-brain-load.md", + "b": "Brain/preferences/pref-brain-index.md", + "count": 1 + } + ] +} diff --git a/Brain/search/activation/1784805125265-33b0c265.json b/Brain/search/activation/1784805125265-33b0c265.json new file mode 100644 index 0000000..e9a5bbe --- /dev/null +++ b/Brain/search/activation/1784805125265-33b0c265.json @@ -0,0 +1,14 @@ +{ + "ts": 1784805125265, + "queryHash": "40ac3dd2", + "paths": [ + "Brain/inbox/sig-2026-07-19-server-port-map-2.md", + "Brain/log/2026-07-23.a0360993.md", + "Brain/log/2026-07-19.a0360993.md", + "Brain/preferences/pref-server-port-map.md", + "Brain/inbox/sig-2026-07-18-vps-plan-august-2026.md", + "Brain/inbox/sig-2026-07-19-server-port-map.md", + "Brain/log/2026-07-23.013d10a8.md", + "Brain/active.md" + ] +} diff --git a/Brain/search/activation/1784805125422-e41e206e.json b/Brain/search/activation/1784805125422-e41e206e.json new file mode 100644 index 0000000..7f41c9c --- /dev/null +++ b/Brain/search/activation/1784805125422-e41e206e.json @@ -0,0 +1,15 @@ +{ + "ts": 1784805125422, + "queryHash": "832891f3", + "paths": [ + "Brain/inbox/sig-2026-07-09-brain-index.md", + "Brain/_BRAIN.md", + "Brain/inbox/sig-2026-07-16-auto-brain-load.md", + "Brain/log/2026-07-23.013d10a8.md", + "Brain/inbox/sig-2026-07-09-save-more-often.md", + "Brain/preferences/pref-brain-index.md", + "Brain/preferences/pref-auto-brain-load.md", + "Brain/inbox/sig-2026-07-09-meriting-ai-personal.md", + "Brain/inbox/sig-2026-07-16-check-system-time.md" + ] +} diff --git a/Brain/search/activation/1784810815823-e6f48caf.json b/Brain/search/activation/1784810815823-e6f48caf.json new file mode 100644 index 0000000..947957f --- /dev/null +++ b/Brain/search/activation/1784810815823-e6f48caf.json @@ -0,0 +1,10 @@ +{ + "ts": 1784810815823, + "queryHash": "aa504874", + "paths": [ + "Soul.md", + "Brain/log/2026-07-09.a0360993.md", + "Brain/log/2026-07-20.a0360993.md", + "Brain/INDEX.md" + ] +} diff --git a/Brain/search/activation/1784810821353-416403f0.json b/Brain/search/activation/1784810821353-416403f0.json new file mode 100644 index 0000000..f8bf701 --- /dev/null +++ b/Brain/search/activation/1784810821353-416403f0.json @@ -0,0 +1,10 @@ +{ + "ts": 1784810821353, + "queryHash": "f7b18c82", + "paths": [ + "Brain/INDEX.md", + "Brain/pinned.md", + "Brain/log/2026-07-16.a0360993.md", + "Brain/log/2026-07-09.a0360993.md" + ] +} diff --git a/Brain/search/activation/1784810822564-dd35cafe.json b/Brain/search/activation/1784810822564-dd35cafe.json new file mode 100644 index 0000000..3734f25 --- /dev/null +++ b/Brain/search/activation/1784810822564-dd35cafe.json @@ -0,0 +1,8 @@ +{ + "ts": 1784810822564, + "queryHash": "9feaf6da", + "paths": [ + "Brain/log/2026-07-20.a0360993.md", + "Brain/log/2026-07-17.a0360993.md" + ] +} diff --git a/Brain/search/activation/1784810823764-cb1bdfde.json b/Brain/search/activation/1784810823764-cb1bdfde.json new file mode 100644 index 0000000..05449ad --- /dev/null +++ b/Brain/search/activation/1784810823764-cb1bdfde.json @@ -0,0 +1,8 @@ +{ + "ts": 1784810823764, + "queryHash": "aecf3588", + "paths": [ + "Brain/INDEX.md", + "Brain/pinned.md" + ] +} diff --git a/Notizen/Gehalt Juli 2026.md b/Notizen/Gehalt Juli 2026.md new file mode 100644 index 0000000..2dd0165 --- /dev/null +++ b/Notizen/Gehalt Juli 2026.md @@ -0,0 +1,70 @@ +# Gehalt Juli 2026 – Freilichtmuseum Molfsee + +**Stand:** 24.07.2026 +**Name:** Dustin Hähnel +**Position:** Service, LMV Jahr100 Haus +**Ort:** Hamburger Landstr. 97, 24113 Molfsee + +--- + +## 📊 Arbeitszeit Juli + +| Wert | | +|------|---| +| Arbeitstage | 20 Tage | +| Stunden gesamt | **158 Stunden** | +| Stundenlohn | **15,10 €** | +| Brutto | **2.385,80 €** | + +--- + +## 💰 Netto-Berechnung (Auszahlung 15.08.) + +| Posten | Betrag | +|--------|:------:| +| **Brutto** | **2.385,80 €** | +| | | +| **Steuern (SK1, christlich, SH)** | | +| Lohnsteuer | −85,00 € | +| Kirchensteuer (9%) | −7,65 € | +| | | +| **Sozialabgaben (AOK Nordwest)** | | +| KV (AOK Nordwest, ~8,225%) | −196,23 € | +| PV (4,0%, keine Kinder) | −95,43 € | +| RV (9,3%) | −221,88 € | +| AV (1,3%) | −31,02 € | +| | | +| **────────────────** | **────────** | +| **Netto** | **~1.748,59 €** | + +**Steuern + Abgaben gesamt:** ~637 € (26,7 %) + +--- + +## 📅 Arbeitstage im Detail + +| Datum | Uhrzeit | Std | +|-------|---------|:---:| +| Do 02.07. | 09:30–18:30 | 8,5 | +| Fr 03.07. | 09:30–18:30 | 8,5 | +| Sa 04.07. | 09:30–18:30 | 8,5 | +| So 05.07. | 09:30–18:30 | 8,5 | +| Di 07.07. | 09:30–18:30 | 8,5 | +| Mi 08.07. | 09:30–18:30 | 8,5 | +| Fr 10.07. | 09:30–18:30 | 8,5 | +| Sa 11.07. | 09:30–18:30 | 8,5 | +| So 12.07. | 09:30–18:30 | 8,5 | +| Di 14.07. | 14:00–18:30 | 4,5 | +| Mi 15.07. | 14:00–18:30 | 4,5 | +| Fr 17.07. | 09:30–18:30 | 8,5 | +| Sa 18.07. | 14:00–18:30 | 4,5 | +| So 19.07. | 09:30–18:30 | 8,5 | +| Di 21.07. | 09:30–18:30 | 8,5 | +| Mi 22.07. | 09:30–18:30 | 8,5 | +| Fr 24.07. | 09:30–18:30 | 8,5 | +| Sa 25.07. | 09:30–18:30 | 8,5 | +| Do 30.07. | 09:30–18:30 | 8,5 | +| Fr 31.07. | 09:30–18:30 | 8,5 | + +**Abwesenheiten:** Keine Urlaubstage, keine Kranktage +**Pause:** 30 Min (bezahlt) diff --git a/Notizen/Server Aingrad - Komplette Übersicht.md b/Notizen/Server Aingrad - Komplette Übersicht.md new file mode 100644 index 0000000..85edc65 --- /dev/null +++ b/Notizen/Server Aingrad - Komplette Übersicht.md @@ -0,0 +1,210 @@ +# Server Aingrad – Komplette Übersicht + +> Stand: 24.07.2026 +> IP: 159.195.51.99 +> ZeroTier: 10.19.81.21 +> System: Ubuntu 24.04 LTS, 4 Kerne, 8 GB RAM, 251 GB SSD +> Domain: baka-net.de + +--- + +## 🔝 Die wichtigsten Befehle (täglich) + +```bash +# SSH zum Server +ssh dustin@159.195.51.99 + +# Docker-Container anzeigen +docker ps + +# Logs eines Containers +docker logs + +# Server neustarten +sudo reboot + +# Festplattenplatz prüfen +df -h + +# RAM/Nutzung prüfen +free -m + +# Hermes Gateway neustarten +systemctl --user restart hermes-gateway +``` + +--- + +## 🔒 1. Firewall (UFW) – Port-Freigaben + +**Status:** `sudo ufw status` + +| Erlaubt für | Port | Erklärung | +|-------------|------|-----------| +| SSH | 22/tcp | Server-Zugriff | +| Web (Caddy) | 80, 443/tcp | Websites + SSL | +| Syncthing | 22000/tcp+udp | Datei-Sync | +| ZeroTier | 9993/udp | VPN-Netzwerk | +| ZeroTier-Intern | Alle Ports auf `zt+` | Zugriff über sicheres VPN | + +--- + +## 📦 2. Docker-Container + +```bash +docker ps # Laufende Container anzeigen +docker ps -a # Alle Container (auch gestoppte) +docker logs -f # Live-Logs anzeigen +docker restart # Container neustarten +docker stop # Container stoppen +docker system prune -af # Ungenutzte Docker-Daten löschen +``` + +### Aktive Container + +| Container | Port | Zweck | +|-----------|------|-------| +| **gitea** | `127.0.0.1:3000` | Eigenes Git-System (git.baka-net.de) | +| **synapse** | `127.0.0.1:8008` | Matrix-Chat-Server (matrix.baka-net.de) | +| **anisette** | `127.0.0.1:6969` | Anisette-V3 für iOS-Sideloading (anisette.baka-net.de) | + +--- + +## 🌐 3. Caddy-Webserver (Domain-Routing) + +**Konfiguration:** `/etc/caddy/Caddyfile` + +```bash +caddy reload # Konfiguration neu laden +systemctl restart caddy # Caddy neustarten +journalctl -u caddy -n 50 # Letzte 50 Log-Einträge +``` + +| Domain | Weiterleitung auf | +|--------|-------------------| +| baka-net.de | Statische Webseite | +| matrix.baka-net.de | localhost:8008 (Synapse) | +| git.baka-net.de | localhost:3000 (Gitea) | +| anisette.baka-net.de | localhost:6969 (Anisette-V3) | + +--- + +## 🧰 4. Installierte Entwickler-Tools + +```bash +# Flutter & Dart (Android/iOS App-Entwicklung) +export PATH="$HOME/development/flutter/bin:$PATH" +flutter doctor # Status prüfen +flutter build apk --release --split-per-abi # APK bauen + +# Android SDK +export ANDROID_HOME="$HOME/development/android-sdk" +sdkmanager --list_installed # Installierte SDK-Versionen + +# Java +java -version # OpenJDK 17 +``` + +--- + +## 🛡️ 5. Security-Tools + +### Gitleaks – Findet Secrets in Git-Repos +```bash +# Aktuelles Repo scannen +gitleaks detect --source /pfad/zum/repo --verbose + +# Nur geänderte Dateien vor Commit prüfen +gitleaks detect --source . --log-level debug + +# Komplette Git-Historie durchsuchen +gitleaks detect --source /pfad/zum/repo --no-git +``` + +### Trivy – Schwachstellen-Scanner +```bash +# Repository scannen +trivy repo https://github.com/user/repo + +# Dateisystem scannen +trivy fs /pfad/zum/repo + +# Docker-Image scannen +trivy image alpine:latest +``` + +### Semgrep – Statische Code-Analyse (SAST) +```bash +# Projekt analysieren +semgrep --config=auto /pfad/zum/projekt + +# Nach Sicherheitslücken suchen +semgrep --config=p/default /pfad/zum/projekt + +# Nur bestimmte Regeln +semgrep --config=p/docker-security /pfad +``` + +--- + +## 🌐 6. Website-Klon-Tools + +### HTTrack – Komplette Webseiten kopieren +```bash +# Komplette Seite runterladen +httrack "https://example.com" -O /home/dustin/archiv/seite --depth=3 + +# Nur eine Seite + Ressourcen +httrack "https://example.com/seite.html" -O /home/dustin/archiv/seite --depth=1 + +# Mit Benutzername/Passwort +httrack "https://user:pass@example.com" -O /home/dustin/archiv/seite +``` + +--- + +## 🔄 7. Automatische Backups (Cron - 04:00 Uhr) + +```bash +# Backup-Skript manuell ausführen +sudo /home/dustin/scripts/backup_and_cleanup.sh + +# Backup-Ordner prüfen +ls -lh /home/dustin/Sync/backups/ + +# Crontab anzeigen +sudo crontab -l +``` + +**Sichert automatisch:** Gitea-Daten + Synapse-Datenbank +**Bereinigt:** Docker-Müll (`system prune`) +**Backup-Ziel:** `/home/dustin/Sync/backups/` (7 Tage Aufbewahrung) + +--- + +## 🧪 8. Weitere Tools + +| Tool | Befehl | Zweck | +|------|--------|-------| +| ZeroTier | `zerotier-cli listnetworks` | VPN-Status prüfen | +| Syncthing | `systemctl status syncthing@dustin` | Sync-Dienst prüfen | +| ADB | `adb devices` | Android-Geräte-Liste | +| Flutter | `flutter build apk --release --split-per-abi` | APK bauen | + +--- + +## 📁 Wichtige Pfade + +| Pfad | Inhalt | +|------|--------| +| `/home/dustin/` | Benutzer-Home | +| `/home/dustin/git/` | Git-Repos | +| `/home/dustin/git/melo_app/` | Melo App Quellcode | +| `/home/dustin/development/` | Flutter + Android SDK | +| `/home/dustin/hermes-vault/` | Notizen (Obsidian) | +| `/home/dustin/.hermes/` | Hermes-Konfiguration | +| `/home/dustin/scripts/` | Eigene Skripte | +| `/home/dustin/Sync/` | Syncthing-Synchronisation | +| `/home/dustin/Sync/backups/` | Backup-Archive | +| `/home/dustin/musik/` | Musik-Ordner | +| `/etc/caddy/Caddyfile` | Caddy-Konfiguration | diff --git a/Notizen/Seven Deadly Sins Origin - Guide.md b/Notizen/Seven Deadly Sins Origin - Guide.md new file mode 100644 index 0000000..f29bd76 --- /dev/null +++ b/Notizen/Seven Deadly Sins Origin - Guide.md @@ -0,0 +1,466 @@ +# 🎮 Seven Deadly Sins: Origin — Der ultimative Guide + +> **Stand:** Juli 2026 | **Sprache:** Deutsch | **Spiel:** Seven Deadly Sins: Origin (Open-World Gacha RPG) + +--- + +## 📋 Inhaltsverzeichnis + +1. [💎 Wichtige Items & Wo herbekommen](#-wichtige-items--wo-herbekommen) +2. [⏰ Cooldowns & Resets](#-cooldowns--resets) +3. [📈 Stark werden — Progression Guide](#-stark-werden--progression-guide) +4. [🎁 Aktuelle Codes (Juli 2026)](#-aktuelle-codes-juli-2026) +5. [🔄 Tägliche Routine](#-tägliche-routine) +6. [⚔️ Team-Zusammenstellung für Anfänger](#️-team-zusammenstellung-für-anfänger) +7. [🛡️ Equipment-System](#️-equipment-system) +8. [⚠️ Häufige Fehler & Was NICHT verschwenden](#️-häufige-fehler--was-nicht-verschwenden) + +--- + +## 💎 Wichtige Items & Wo herbekommen + +### ⭐ Star Fragments (Sternenfragmente) + +**Wofür?** +- Helden-Beschwörungen (Hero Draw) +- Limitierte Banner ziehen +- Premium-Währung des Spiels — das wertvollste Gut! + +**Wo farmen?** +| Quelle | Menge | Frequenz | +|--------|-------|----------| +| 📜 Tägliche Quests | ~30-50 | Täglich | +| 🏆 PvP-Rangbelohnungen | 50-200 | Wöchentlich | +| 🗺️ Story-Missionen (Erstbelohnung) | 10-30 pro Mission | Einmalig | +| 🎯 Achievements | 50-500 | Einmalig | +| 🏰 Weltboss-Raids | 20-60 | Täglich | +| 🎪 Events | Variabel | Saisonal | +| 📦 Cube-System | 30-100 | Nach Keys | +| 💳 Battle Pass (kostenlos) | 100-300 | Pro Season | +| 🎁 Codes (siehe unten) | 50-200 | Bei Release | + +> 💡 **Tipp:** Star Fragments NIE für Standard-Banner verschwenden! Immer für limitierte/pity-Banner sparen! + +--- + +### 🎫 Hero Draw Tickets + +#### Normale Draw Tickets +| Quelle | Menge | +|--------|-------| +| 📜 Tägliche Logins | 1 alle 2-3 Tage | +| 🗺️ Story-Fortschritt | 1-3 pro Kapitel | +| 🎯 Daily Missions (alle abschließen) | 1 | +| 🏪 Event-Shop | 3-5 pro Event | +| 🎁 Codes | 1-3 | + +#### Premium Draw Tickets (seltener!) +| Quelle | Menge | +|--------|-------| +| 🏆 Wöchentliche Rangbelohnung | 1-2 | +| 🎪 Große Events | 3-5 | +| 💎 Meilenstein-Belohnungen | 1-3 | +| 🎁 Spezielle Codes | 1-3 | +| 💳 Battle Pass (Premium) | 5-10 | + +--- + +### 🔨 Enhancement Stones (Verstärkungssteine) + +**Wofür?** Ausrüstung leveln und verstärken. + +| Quelle | Menge | Frequenz | +|--------|-------|----------| +| ⛏️ Enhancement-Dungeon | 20-50 | 3x täglich | +| 🗺️ Story-Missionen | 5-15 | Wiederholbar | +| 🏪 Gildenshop | 30 | Wöchentlich | +| 🎯 Daily Missions | 10 | Täglich | +| 🌍 Open-World Bosse | 5-10 | Unbegrenzt | +| 📦 Cube-Belohnungen | 10-30 | Nach Keys | +| ♻️ Unerwünschte Ausrüstung zerlegen | Variabel | Jederzeit | + +> 💡 **Bester Farm-Spot:** Enhancement-Dungeon auf höchster Stufe + Open-World Bosse in Liones! + +--- + +### 💠 Refinement Stones (Veredelungssteine) + +**Wofür?** Ausrüstungs-Substats verbessern und rerollen. + +| Quelle | Menge | Frequenz | +|--------|-------|----------| +| 💠 Refinement-Dungeon | 10-20 | 2x täglich | +| 🏪 PvP-Shop | 15 | Wöchentlich | +| 🐉 Drachen-Raids | 5-15 | Täglich | +| 🎪 Event-Belohnungen | 20-50 | Saisonal | +| 📦 High-Level Cubes | 10-25 | Nach Keys | + +> ⚠️ **Wichtig:** Refinement Stones sind ENDGAME-Ressourcen. Erst ab goldener/legendärer Ausrüstung verwenden! + +--- + +### 💰 Gold / EXP + +#### Gold-Farming +| Methode | Ertrag | Priorität | +|---------|--------|-----------| +| 💰 Gold-Dungeon | 50.000-200.000 | ⭐⭐⭐ Täglich machen! | +| 🗺️ Story-Wiederholung | 5.000-15.000 | ⭐⭐ | +| 🎯 Daily Missions | 10.000-30.000 | ⭐⭐⭐ | +| 🏪 Gildenquests | 20.000 | ⭐⭐ | +| 📦 Cube-System | 30.000-100.000 | ⭐⭐ | +| ♻️ Items verkaufen | Variabel | ⭐ | + +#### EXP-Farming +| Methode | Ertrag | Priorität | +|---------|--------|-----------| +| 📚 EXP-Dungeon | 50.000-200.000 EXP | ⭐⭐⭐ Täglich! | +| 🗺️ Story (Erstbelohnung) | Hoch | ⭐⭐⭐ | +| 🌍 Open-World Grinding | Mittel | ⭐⭐ | +| 🍖 EXP-Tränke (Alchemie) | Hoch | ⭐⭐ | + +> 💡 **Beste Routine:** Gold-Dungeon + EXP-Dungeon JEDEN TAG machen, das summiert sich massiv! + +--- + +### 🔑 Cube Keys (Würfelschlüssel) + +**Wofür?** Öffnen von Cubes (Würfeln), die zufällige Belohnungen enthalten: +- Star Fragments +- Enhancement Stones +- Refinement Stones +- Gold +- Seltene Materialien +- Ausrüstung + +**Wo bekommen?** +| Quelle | Menge | +|--------|-------| +| 📜 Tägliche Logins | 1-3 | +| 🎯 Daily Missions | 1-2 | +| 🏪 Event-Shop | 5-10 | +| 🎁 Codes | 3-5 | +| 🗺️ Versteckte Quests | 1-3 | +| 🏆 Achievements | 3-10 | + +> 💡 Cubes NUR mit Keys öffnen, niemals Star Fragments dafür ausgeben! + +--- + +### 🔮 Special Items für Aufstieg & Evolution + +| Item | Wofür? | Wo bekommen? | +|------|--------|--------------| +| 🌟 **Awakening Crystals** | Helden erwecken (Sterne erhöhen) | Boss-Raids, Event-Shop | +| 📜 **Skill Tomes** | Fähigkeiten leveln | Gilden-Raids, PvP-Shop | +| 💎 **Evolution Stones** | Helden weiterentwickeln | Element-Dungeons (täglich rotierend) | +| 🏅 **Limit Break Materials** | Levelcap erhöhen | Weltbosse, Spezial-Dungeons | +| 🔴 **Red Demon Horns** | SSR-Helden aufstieg | Red Demon Raid | +| 🔵 **Blue Demon Wings** | SSR-Helden aufstieg | Blue Demon Raid | +| ⚪ **Gray Demon Hearts** | SSR-Helden aufstieg | Gray Demon Raid | + +--- + +## ⏰ Cooldowns & Resets + +### 🌅 Tägliche Resets +| Was? | Reset-Zeit | Limit | +|------|------------|-------| +| 🎯 Daily Missions | 05:00 UTC | 1x täglich | +| 📜 Login-Belohnung | 05:00 UTC | 1x täglich | +| ⛏️ Enhancement-Dungeon | 05:00 UTC | 3x täglich | +| 💠 Refinement-Dungeon | 05:00 UTC | 2x täglich | +| 💰 Gold-Dungeon | 05:00 UTC | 2x täglich | +| 📚 EXP-Dungeon | 05:00 UTC | 2x täglich | +| 🐉 Drachen-Raids | 05:00 UTC | 3x täglich | +| 👹 Dämonen-Raids | 05:00 UTC | 3x täglich | +| 🏪 Shop-Refresh (Gilde) | 05:00 UTC | — | +| 🌍 Weltboss-Spawn | Verschiedene Zeiten | 3-5x täglich | +| 🤝 Freundes-AP senden | 05:00 UTC | 1x täglich | +| 🎪 Event-Quests | 05:00 UTC | Event-abhängig | + +### 📅 Wöchentliche Resets +| Was? | Reset-Tag | Limit | +|------|-----------|-------| +| 🏆 PvP-Rangbelohnung | Montag 05:00 UTC | 1x wöchentlich | +| 🏪 Gildenshop | Montag 05:00 UTC | — | +| 🐉 Großer Drachen-Raid | Samstag/Sonntag | 2x Wochenende | +| 🎯 Wöchentliche Missionen | Montag 05:00 UTC | 1x wöchentlich | +| 🎪 Event-Shop | Event-Ende | Event-abhängig | +| 📦 Cube-Reset (Belohnungen) | Täglich + Wöchentlich | Variabel | + +### 🔄 Events & Rotationen +| Typ | Dauer | Rhythmus | +|-----|-------|----------| +| 🎪 Saisonale Events | 2-4 Wochen | Alle 1-2 Monate | +| 🎯 Spezial-Banner | 1-3 Wochen | Rotierend | +| 🏪 Event-Shop | 2-4 Wochen | Parallel zu Events | +| 🎁 Login-Events | 7-14 Tage | Monatlich | +| 🌟 Doppel-Belohnungs-Wochenende | 3 Tage | 1x pro Monat | +| ⚔️ Gilden-Kriege | 1 Woche | Saisonal | + +--- + +## 📈 Stark werden — Progression Guide + +### 🔝 Prioritäten-Liste (Was zuerst leveln?) + +``` +1️⃣ Haupt-Team auf Max-Level bringen +2️⃣ Ausrüstung auf +9 (mindestens) +3️⃣ Fähigkeiten der Main-DPS leveln +4️⃣ Helden erwecken (Awakening/Sterne) +5️⃣ Ausrüstung auf +12 (Endgame +15) +6️⃣ Substats rerollen (Refinement) +7️⃣ Synergie-Helden leveln +8️⃣ Limit Break für Levelcap-Erweiterung +9️⃣ Ultimative Fähigkeiten freischalten +🔟 PvP-Team optimieren +``` + +### 🎖️ Beste Helden/Rollen (Meta — Juli 2026) + +#### S-Tier (MUST-HAVE) +| Held | Rolle | Stärke | +|------|-------|--------| +| 🔥 **Meliodas (Assault Mode)** | DPS | Wahnsinniger Burst-Schaden | +| ⚡ **Escanor (The One)** | DPS | Unaufhaltsam im Ultimate | +| 🌙 **Zeldris (Ominous Nebula)** | DPS/Debuffer | AOE + Kontrolle | +| 🛡️ **Goddess Elizabeth** | Support/Heiler | Beste Heilerin im Spiel | + +#### A-Tier (Sehr stark) +| Held | Rolle | Stärke | +|------|-------|--------| +| 🗡️ **King (Chastiefol)** | DPS/Controller | Vielseitig + Heilung | +| 💀 **Gowther (Invasion)** | Support | Unverzichtbar für Rank-Up | +| 🌊 **Merlin (Infinity)** | DPS/Support | Schilde + Burst | +| ⚔️ **Diane (Drole's Dance)** | Tank | Bester Tank + AOE | +| 🌑 **Estarossa** | DPS | Counter-Spezialist | + +#### B-Tier (Gute F2P-Optionen) +| Held | Rolle | Stärke | +|------|-------|--------| +| 🗡️ **Howzer** | DPS | AOE-Farming-König | +| 🛡️ **Gilthunder** | Support | ATK-Buff fürs Team | +| 💪 **Ban** | Bruiser | Lebensraub + Durability | +| 🎯 **Jericho** | Single-Target DPS | Boss-Killer | + +### ⚔️ Team-Zusammenstellung für Anfänger + +**Grundregel:** 1 DPS + 1 Sub-DPS + 1 Support + 1 Flex + +#### 🥇 Bestes Anfänger-Team (F2P-freundlich) +``` +🔥 Haupt-DPS: Meliodas / Escanor (vom Starter-Banner) +🗡️ Sub-DPS: King / Howzer +💚 Support/Heiler: Elizabeth / Gilthunder +🛡️ Flex (Tank): Diane / Ban +``` + +#### 🎯 Synergie-Kombos +| Combo | Helden | Effekt | +|-------|--------|--------| +| ⚡ Burst-Combo | Escanor + Gowther | Rank-Up → Ultimate = Oneshot | +| 🔥 Debuff-Combo | Zeldris + Estarossa | Gegner debuffen → Burst | +| 🛡️ Turtle-Combo | Diane + Elizabeth | Unzerstörbare Defensive | +| 🌪️ AOE-Farm | Howzer + King | Schnelles Story-Farming | + +--- + +## 🛡️ Equipment-System + +### Ausrüstungstypen +| Typ | Slot | Haupteffekt | +|-----|------|-------------| +| ⚔️ Waffe | 1 | ATK (Angriff) | +| 🛡️ Rüstung | 2 | DEF (Verteidigung) | +| 👑 Helm | 3 | HP (Lebenspunkte) | +| 💍 Ring | 4 | ATK oder DEF | +| 📿 Amulett | 5 | HP oder Crit | +| 👢 Stiefel | 6 | Speed oder ATK | + +### Seltenheitsstufen +| Stufe | Farbe | Maximale Verstärkung | Substat-Slots | +|-------|-------|---------------------|---------------| +| ⬜ Common | Grau | +3 | 0 | +| 🟩 Uncommon | Grün | +6 | 1 | +| 🟦 Rare | Blau | +9 | 2 | +| 🟪 Heroic | Lila | +12 | 3 | +| 🟨 Legendary | Gold | +15 | 4 | + +> ⚠️ **Regel:** NIEMALS Common/Uncommon verstärken. Rare nur bis +6 im Notfall. Ressourcen für Heroic+ sparen! + +### Set-Boni (wichtigste) + +| Set | 2er-Bonus | 4er-Bonus | +|-----|-----------|-----------| +| ⚔️ **Angriff** | ATK +15% | — | +| 💥 **Kritisch** | Crit-Rate +10% | Crit-DMG +25% | +| 🛡️ **Verteidigung** | DEF +15% | — | +| ❤️ **Leben** | HP +15% | — | +| ⚡ **Geschwindigkeit** | Speed +10% | — | +| 🔥 **Zerstörung** | — | Ignoriert 30% DEF | +| 💀 **Lebensraub** | Lifesteal +10% | — | + +### Wann welche Sets? + +| Rolle | Empfohlenes Set | Grund | +|-------|-----------------|-------| +| 🔥 DPS | Angriff (4) + Kritisch (2) | Maximaler Schaden | +| ⚡ Speed-DPS | Geschwindigkeit (4) + Angriff (2) | Zuerst dran | +| 🛡️ Tank | Verteidigung (4) + Leben (2) | Max Tankiness | +| 💚 Heiler | Leben (4) + Verteidigung (2) | Überleben + Heilung | +| 💀 Debuffer | Geschwindigkeit (4) + Effekttreffer (2) | Debuffs landen | + +--- + +## 🎁 Aktuelle Codes (Juli 2026) + +> 🔥 **Diese Codes funktionieren Stand Juli 2026! Sofort einlösen!** + +| Code | Belohnung | +|------|-----------| +| `100DAYCELEBRATION` | 🎫 Regular Hero Draw Ticket x3 | +| `WELCOMEORIGIN` | 🎫 Tickets + Ressourcen-Paket | +| `goatsinisgoat` | ⭐ Star Fragments + 🔑 Cube Keys | +| `PECCATUMLIBIDINIS` | ⭐ Star Fragments | +| `gowtherisback` | ⭐ Star Fragments + 💰 Gold | + +### 📝 Codes einlösen — So geht's: + +1. 🎮 Spiel öffnen +2. ⚙️ Einstellungen (Zahnrad-Icon) → "Code einlösen" +3. 📋 Code EXAKT eingeben (Groß-/Kleinschreibung beachten!) +4. ✅ Bestätigen → Belohnung erscheint im Postfach + +> ⚠️ **Wichtig:** Codes haben ein Ablaufdatum! Sofort einlösen, nicht aufschieben! + +--- + +## 🔄 Tägliche Routine + +### 🌅 JEDEN TAG (Daily Checklist) + +``` +☐ 📜 Login-Belohnung abholen +☐ 🎯 ALLE Daily Missions abschließen +☐ ⛏️ Enhancement-Dungeon (3x) +☐ 💰 Gold-Dungeon (2x) +☐ 📚 EXP-Dungeon (2x) +☐ 💠 Refinement-Dungeon (2x) +☐ 🐉 Drachen-Raids (3x) +☐ 👹 Dämonen-Raids (3x, deinem Level entsprechend) +☐ 🤝 Freundes-AP senden + empfangen +☐ 🏪 Gildenshop checken + spenden +☐ 🎪 Event-Quests (falls aktiv) +☐ 🌍 Weltbosse (Timer checken!) +☐ 📦 Cube-Öffnungen (wenn Keys da) +☐ 🗺️ 3-5 Story-Missionen wiederholen (Gold/EXP farmen) +``` + +**⏱️ Zeitaufwand:** ca. 45-60 Minuten + +### 📅 DIESE WOCHE priorisieren (Juli 2026) + +``` +🔥 PRIORITÄT 1: Codes einlösen! + → 100DAYCELEBRATION, WELCOMEORIGIN, goatsinisgoat, + PECCATUMLIBIDINIS, gowtherisback + +🔥 PRIORITÄT 2: 100-Tage-Event abschließen + → Alle Event-Missionen machen für maximale Belohnungen + +🔥 PRIORITÄT 3: Hauptteam auf Max-Level + → EXP-Dungeon täglich, Story pushen + +🔥 PRIORITÄT 4: Ausrüstung auf +9 + → Enhancement-Dungeon täglich farmen + +🔥 PRIORITÄT 5: PvP-Rang verbessern + → Vor Montag-Reset hoch pushen für bessere Belohnungen! +``` + +### 📊 Wöchentlicher Fahrplan + +| Tag | Fokus | +|-----|-------| +| 🟢 **Montag** | Reset-Tag! Alle Wöchentlichen Quests starten. PvP-Belohnung abholen. | +| 🔵 **Dienstag** | Story-Fortschritt. Hauptteam leveln. | +| 🟣 **Mittwoch** | Ausrüstung farmen. Enhancement + Refinement Dungeons. | +| 🟡 **Donnerstag** | Dämonen-Raids für Aufstiegsmaterialien. | +| 🔴 **Freitag** | Gilden-Quests + Weltbosse. | +| 🟠 **Samstag** | Großes Farm-Wochenende! Doppel-Belohnungen nutzen! | +| 🟢 **Sonntag** | PvP pushen vor Reset. Alles abschließen was noch offen ist. | + +--- + +## ⚠️ Häufige Fehler & Was NICHT verschwenden + +### ❌ Absolute No-Gos + +| Fehler | Warum schlimm? | Was stattdessen tun? | +|--------|---------------|---------------------| +| ⭐ Star Fragments für Standard-Banner | Verschwendung! Kaum Wert. | Nur für limitierte/Pity-Banner sparen | +| 🔨 Enhancement Stones auf graue/grüne Items | Bringt nichts, wird ersetzt | Mindestens blaue/rare Ausrüstung | +| 💠 Refinement Stones auf Items unter Lila | Pure Ressourcenverschwendung | Nur für Heroic (lila) oder Legendary | +| 📦 Cubes mit Star Fragments öffnen | Teuer und ineffizient | Nur mit Cube Keys öffnen! | +| 🎫 Premium Tickets auf filler Banner | Verpasste Chance auf Meta-Helden | Sparen für S-Tier Banner | +| 💰 Gold für unnötigen Shop-Kram | Gold wird später knapp | Nur Kern-Upgrades kaufen | +| 🔮 Dupe-SSR als EXP verfüttern | Dupes sind wertvoll für Awakening | Immer für Limit Break / Awakening aufheben | +| ⏰ Tägliche Dungeons skippen | Verpasster Fortschritt summiert sich | Jeden Tag machen, Routine aufbauen! | + +### 🟢 Empfehlungen für F2P-Spieler + +1. **Geduld haben!** Das Spiel ist ein Marathon, kein Sprint. +2. **Star Fragments horten** bis ein META-breaking Banner kommt. +3. **Täglich alles machen** — die kleinen Belohnungen addieren sich. +4. **Einer guten Gilde beitreten** — Gilden-Belohnungen sind massiv. +5. **PvP NICHT ignorieren** — selbst niedrige Ränge geben gute wöchentliche Belohnungen. +6. **Nicht jeden Held leveln** — Fokus auf 4-6 Kernhelden. +7. **Codes sofort einlösen** — viele laufen schnell ab! + +--- + +## 📊 Ressourcen-Management Cheat Sheet + +``` +┌─────────────────────────────────────────────────────────┐ +│ TÄGLICH │ +│ ✅ Enhancement-Dungeon (3x) ⭐ Höchste Priorität │ +│ ✅ Gold-Dungeon (2x) ⭐ Höchste Priorität │ +│ ✅ EXP-Dungeon (2x) ⭐ Höchste Priorität │ +│ ✅ Daily Missions (alle) ⭐ Höchste Priorität │ +│ ✅ Dämonen-Raids (3x) 🔶 Mittlere Priorität │ +│ ✅ Drachen-Raids (3x) 🔶 Mittlere Priorität │ +│ ✅ Weltbosse 🔶 Mittlere Priorität │ +│ ✅ Refinement-Dungeon (2x) 🔹 Niedrig (Endgame) │ +└─────────────────────────────────────────────────────────┘ + +┌─────────────────────────────────────────────────────────┐ +│ WOCHENTLICH │ +│ ✅ PvP-Rang pushen ⭐ Vor Montag-Reset! │ +│ ✅ Gildenshop leeren ⭐ Kostenlose Items │ +│ ✅ Gilden-Beitrag leisten ⭐ Für Gilden-Münzen │ +│ ✅ Wochen-Missionen abschließen ⭐ Gute Belohnungen │ +│ ✅ Doppel-Belohnungs-Event ⭐ Priorität nutzen! │ +└─────────────────────────────────────────────────────────┘ +``` + +--- + +## 🎯 Quick-Reference: "Was soll ich jetzt tun?" + +| Dein Level | Deine Priorität | +|------------|-----------------| +| 🆕 **1-30** (Anfänger) | Story pushen, Hauptteam finden, Tägliche Quests | +| 📗 **31-50** (Fortgeschritten) | Ausrüstung +9, Fähigkeiten leveln, Gilden beitreten | +| 📘 **51-70** (Erfahren) | Ausrüstung +12, Substats optimieren, PvP fokussieren | +| 📕 **71+** (Endgame) | Refinement, Meta-Teams bauen, Raids, PvP-Top-Ränge | + +--- + +> 🔖 **Letzte Aktualisierung:** Juli 2026 +> 🎮 **Spiel:** Seven Deadly Sins: Origin +> 👤 **Erstellt für:** Baka's Vault + +*Bei neuen Codes oder Meta-Änderungen diesen Guide updaten!*