repr-cli 0.2.15__py3-none-any.whl → 0.2.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- repr/__init__.py +1 -1
- repr/api.py +363 -62
- repr/auth.py +47 -38
- repr/change_synthesis.py +478 -0
- repr/cli.py +4103 -267
- repr/config.py +119 -11
- repr/configure.py +889 -0
- repr/cron.py +419 -0
- repr/dashboard/__init__.py +9 -0
- repr/dashboard/build.py +126 -0
- repr/dashboard/dist/assets/index-BYFVbEev.css +1 -0
- repr/dashboard/dist/assets/index-BrrhyJFO.css +1 -0
- repr/dashboard/dist/assets/index-CcEg74ts.js +270 -0
- repr/dashboard/dist/assets/index-Cerc-iA_.js +377 -0
- repr/dashboard/dist/assets/index-CjVcBW2L.css +1 -0
- repr/dashboard/dist/assets/index-Dfl3mR5E.js +377 -0
- repr/dashboard/dist/favicon.svg +4 -0
- repr/dashboard/dist/index.html +14 -0
- repr/dashboard/manager.py +234 -0
- repr/dashboard/server.py +1298 -0
- repr/db.py +980 -0
- repr/hooks.py +3 -2
- repr/loaders/__init__.py +22 -0
- repr/loaders/base.py +156 -0
- repr/loaders/claude_code.py +287 -0
- repr/loaders/clawdbot.py +313 -0
- repr/loaders/gemini_antigravity.py +381 -0
- repr/mcp_server.py +1196 -0
- repr/models.py +503 -0
- repr/openai_analysis.py +25 -0
- repr/session_extractor.py +481 -0
- repr/storage.py +360 -0
- repr/story_synthesis.py +1296 -0
- repr/templates.py +68 -4
- repr/timeline.py +710 -0
- repr/tools.py +17 -8
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.17.dist-info}/METADATA +50 -10
- repr_cli-0.2.17.dist-info/RECORD +52 -0
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.17.dist-info}/WHEEL +1 -1
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.17.dist-info}/entry_points.txt +1 -0
- repr_cli-0.2.15.dist-info/RECORD +0 -26
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.17.dist-info}/licenses/LICENSE +0 -0
- {repr_cli-0.2.15.dist-info → repr_cli-0.2.17.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=s(o);fetch(o.href,i)}})();/**
|
|
2
|
+
* @vue/shared v3.5.27
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function Vs(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const q={},rt=[],$e=()=>{},to=()=>!1,ns=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ks=e=>e.startsWith("onUpdate:"),oe=Object.assign,Ws=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},yi=Object.prototype.hasOwnProperty,V=(e,t)=>yi.call(e,t),L=Array.isArray,_t=e=>os(e)==="[object Map]",bi=e=>os(e)==="[object Set]",j=e=>typeof e=="function",te=e=>typeof e=="string",pt=e=>typeof e=="symbol",X=e=>e!==null&&typeof e=="object",so=e=>(X(e)||j(e))&&j(e.then)&&j(e.catch),wi=Object.prototype.toString,os=e=>wi.call(e),xi=e=>os(e).slice(8,-1),_i=e=>os(e)==="[object Object]",Js=e=>te(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,St=Vs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),is=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},Si=/-\w/g,We=is(e=>e.replace(Si,t=>t.slice(1).toUpperCase())),ki=/\B([A-Z])/g,et=is(e=>e.replace(ki,"-$1").toLowerCase()),no=is(e=>e.charAt(0).toUpperCase()+e.slice(1)),ys=is(e=>e?`on${no(e)}`:""),Ke=(e,t)=>!Object.is(e,t),bs=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},oo=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ci=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let wn;const rs=()=>wn||(wn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Gs(e){if(L(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=te(n)?$i(n):Gs(n);if(o)for(const i in o)t[i]=o[i]}return t}else if(te(e)||X(e))return e}const Ei=/;(?![^(]*\))/g,Ti=/:([^]+)/,Ii=/\/\*[^]*?\*\//g;function $i(e){const t={};return e.replace(Ii,"").split(Ei).forEach(s=>{if(s){const n=s.split(Ti);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function qs(e){let t="";if(te(e))t=e;else if(L(e))for(let s=0;s<e.length;s++){const n=qs(e[s]);n&&(t+=n+" ")}else if(X(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Bi="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ai=Vs(Bi);function io(e){return!!e||e===""}/**
|
|
6
|
+
* @vue/reactivity v3.5.27
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let fe;class ro{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=fe,!t&&fe&&(this.index=(fe.scopes||(fe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=fe;try{return fe=this,t()}finally{fe=s}}}on(){++this._on===1&&(this.prevScope=fe,fe=this)}off(){this._on>0&&--this._on===0&&(fe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Fi(e){return new ro(e)}function Mi(){return fe}let G;const ws=new WeakSet;class lo{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,fe&&fe.active&&fe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ws.has(this)&&(ws.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||co(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,xn(this),uo(this);const t=G,s=ye;G=this,ye=!0;try{return this.fn()}finally{fo(this),G=t,ye=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Qs(t);this.deps=this.depsTail=void 0,xn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ws.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Bs(this)&&this.run()}get dirty(){return Bs(this)}}let ao=0,kt,Ct;function co(e,t=!1){if(e.flags|=8,t){e.next=Ct,Ct=e;return}e.next=kt,kt=e}function zs(){ao++}function Ys(){if(--ao>0)return;if(Ct){let t=Ct;for(Ct=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;kt;){let t=kt;for(kt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function uo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function fo(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),Qs(n),Ri(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function Bs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(po(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function po(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ft)||(e.globalVersion=Ft,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Bs(e))))return;e.flags|=2;const t=e.dep,s=G,n=ye;G=e,ye=!0;try{uo(e);const o=e.fn(e._value);(t.version===0||Ke(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{G=s,ye=n,fo(e),e.flags&=-3}}function Qs(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)Qs(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Ri(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let ye=!0;const ho=[];function Pe(){ho.push(ye),ye=!1}function Oe(){const e=ho.pop();ye=e===void 0?!0:e}function xn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=G;G=void 0;try{t()}finally{G=s}}}let Ft=0;class Pi{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Xs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!G||!ye||G===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==G)s=this.activeLink=new Pi(G,this),G.deps?(s.prevDep=G.depsTail,G.depsTail.nextDep=s,G.depsTail=s):G.deps=G.depsTail=s,go(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=G.depsTail,s.nextDep=void 0,G.depsTail.nextDep=s,G.depsTail=s,G.deps===s&&(G.deps=n)}return s}trigger(t){this.version++,Ft++,this.notify(t)}notify(t){zs();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Ys()}}}function go(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)go(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const As=new WeakMap,Xe=Symbol(""),Fs=Symbol(""),Mt=Symbol("");function se(e,t,s){if(ye&&G){let n=As.get(e);n||As.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Xs),o.map=n,o.key=s),o.track()}}function Re(e,t,s,n,o,i){const l=As.get(e);if(!l){Ft++;return}const a=d=>{d&&d.trigger()};if(zs(),t==="clear")l.forEach(a);else{const d=L(e),p=d&&Js(s);if(d&&s==="length"){const f=Number(n);l.forEach((w,T)=>{(T==="length"||T===Mt||!pt(T)&&T>=f)&&a(w)})}else switch((s!==void 0||l.has(void 0))&&a(l.get(s)),p&&a(l.get(Mt)),t){case"add":d?p&&a(l.get("length")):(a(l.get(Xe)),_t(e)&&a(l.get(Fs)));break;case"delete":d||(a(l.get(Xe)),_t(e)&&a(l.get(Fs)));break;case"set":_t(e)&&a(l.get(Xe));break}}Ys()}function nt(e){const t=U(e);return t===e?t:(se(t,"iterate",Mt),be(e)?t:t.map(De))}function Zs(e){return se(e=U(e),"iterate",Mt),e}function He(e,t){return Je(e)?Rt(lt(e)?De(t):t):De(t)}const Oi={__proto__:null,[Symbol.iterator](){return xs(this,Symbol.iterator,e=>He(this,e))},concat(...e){return nt(this).concat(...e.map(t=>L(t)?nt(t):t))},entries(){return xs(this,"entries",e=>(e[1]=He(this,e[1]),e))},every(e,t){return Fe(this,"every",e,t,void 0,arguments)},filter(e,t){return Fe(this,"filter",e,t,s=>s.map(n=>He(this,n)),arguments)},find(e,t){return Fe(this,"find",e,t,s=>He(this,s),arguments)},findIndex(e,t){return Fe(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Fe(this,"findLast",e,t,s=>He(this,s),arguments)},findLastIndex(e,t){return Fe(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Fe(this,"forEach",e,t,void 0,arguments)},includes(...e){return _s(this,"includes",e)},indexOf(...e){return _s(this,"indexOf",e)},join(e){return nt(this).join(e)},lastIndexOf(...e){return _s(this,"lastIndexOf",e)},map(e,t){return Fe(this,"map",e,t,void 0,arguments)},pop(){return yt(this,"pop")},push(...e){return yt(this,"push",e)},reduce(e,...t){return _n(this,"reduce",e,t)},reduceRight(e,...t){return _n(this,"reduceRight",e,t)},shift(){return yt(this,"shift")},some(e,t){return Fe(this,"some",e,t,void 0,arguments)},splice(...e){return yt(this,"splice",e)},toReversed(){return nt(this).toReversed()},toSorted(e){return nt(this).toSorted(e)},toSpliced(...e){return nt(this).toSpliced(...e)},unshift(...e){return yt(this,"unshift",e)},values(){return xs(this,"values",e=>He(this,e))}};function xs(e,t,s){const n=Zs(e),o=n[t]();return n!==e&&!be(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=s(i.value)),i}),o}const Di=Array.prototype;function Fe(e,t,s,n,o,i){const l=Zs(e),a=l!==e&&!be(e),d=l[t];if(d!==Di[t]){const w=d.apply(e,i);return a?De(w):w}let p=s;l!==e&&(a?p=function(w,T){return s.call(this,He(e,w),T,e)}:s.length>2&&(p=function(w,T){return s.call(this,w,T,e)}));const f=d.call(l,p,n);return a&&o?o(f):f}function _n(e,t,s,n){const o=Zs(e);let i=s;return o!==e&&(be(e)?s.length>3&&(i=function(l,a,d){return s.call(this,l,a,d,e)}):i=function(l,a,d){return s.call(this,l,He(e,a),d,e)}),o[t](i,...n)}function _s(e,t,s){const n=U(e);se(n,"iterate",Mt);const o=n[t](...s);return(o===-1||o===!1)&&nn(s[0])?(s[0]=U(s[0]),n[t](...s)):o}function yt(e,t,s=[]){Pe(),zs();const n=U(e)[t].apply(e,s);return Ys(),Oe(),n}const ji=Vs("__proto__,__v_isRef,__isVue"),mo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(pt));function Li(e){pt(e)||(e=String(e));const t=U(this);return se(t,"has",e),t.hasOwnProperty(e)}class vo{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(o?i?zi:xo:i?wo:bo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=L(t);if(!o){let d;if(l&&(d=Oi[s]))return d;if(s==="hasOwnProperty")return Li}const a=Reflect.get(t,s,ne(t)?t:n);if((pt(s)?mo.has(s):ji(s))||(o||se(t,"get",s),i))return a;if(ne(a)){const d=l&&Js(s)?a:a.value;return o&&X(d)?Rs(d):d}return X(a)?o?Rs(a):tn(a):a}}class yo extends vo{constructor(t=!1){super(!1,t)}set(t,s,n,o){let i=t[s];const l=L(t)&&Js(s);if(!this._isShallow){const p=Je(i);if(!be(n)&&!Je(n)&&(i=U(i),n=U(n)),!l&&ne(i)&&!ne(n))return p||(i.value=n),!0}const a=l?Number(s)<t.length:V(t,s),d=Reflect.set(t,s,n,ne(t)?t:o);return t===U(o)&&(a?Ke(n,i)&&Re(t,"set",s,n):Re(t,"add",s,n)),d}deleteProperty(t,s){const n=V(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&Re(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!pt(s)||!mo.has(s))&&se(t,"has",s),n}ownKeys(t){return se(t,"iterate",L(t)?"length":Xe),Reflect.ownKeys(t)}}class Hi extends vo{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Ni=new yo,Ui=new Hi,Vi=new yo(!0);const Ms=e=>e,Vt=e=>Reflect.getPrototypeOf(e);function Ki(e,t,s){return function(...n){const o=this.__v_raw,i=U(o),l=_t(i),a=e==="entries"||e===Symbol.iterator&&l,d=e==="keys"&&l,p=o[e](...n),f=s?Ms:t?Rt:De;return!t&&se(i,"iterate",d?Fs:Xe),oe(Object.create(p),{next(){const{value:w,done:T}=p.next();return T?{value:w,done:T}:{value:a?[f(w[0]),f(w[1])]:f(w),done:T}}})}}function Kt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Wi(e,t){const s={get(o){const i=this.__v_raw,l=U(i),a=U(o);e||(Ke(o,a)&&se(l,"get",o),se(l,"get",a));const{has:d}=Vt(l),p=t?Ms:e?Rt:De;if(d.call(l,o))return p(i.get(o));if(d.call(l,a))return p(i.get(a));i!==l&&i.get(o)},get size(){const o=this.__v_raw;return!e&&se(U(o),"iterate",Xe),o.size},has(o){const i=this.__v_raw,l=U(i),a=U(o);return e||(Ke(o,a)&&se(l,"has",o),se(l,"has",a)),o===a?i.has(o):i.has(o)||i.has(a)},forEach(o,i){const l=this,a=l.__v_raw,d=U(a),p=t?Ms:e?Rt:De;return!e&&se(d,"iterate",Xe),a.forEach((f,w)=>o.call(i,p(f),p(w),l))}};return oe(s,e?{add:Kt("add"),set:Kt("set"),delete:Kt("delete"),clear:Kt("clear")}:{add(o){!t&&!be(o)&&!Je(o)&&(o=U(o));const i=U(this);return Vt(i).has.call(i,o)||(i.add(o),Re(i,"add",o,o)),this},set(o,i){!t&&!be(i)&&!Je(i)&&(i=U(i));const l=U(this),{has:a,get:d}=Vt(l);let p=a.call(l,o);p||(o=U(o),p=a.call(l,o));const f=d.call(l,o);return l.set(o,i),p?Ke(i,f)&&Re(l,"set",o,i):Re(l,"add",o,i),this},delete(o){const i=U(this),{has:l,get:a}=Vt(i);let d=l.call(i,o);d||(o=U(o),d=l.call(i,o)),a&&a.call(i,o);const p=i.delete(o);return d&&Re(i,"delete",o,void 0),p},clear(){const o=U(this),i=o.size!==0,l=o.clear();return i&&Re(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Ki(o,e,t)}),s}function en(e,t){const s=Wi(e,t);return(n,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(V(s,o)&&o in n?s:n,o,i)}const Ji={get:en(!1,!1)},Gi={get:en(!1,!0)},qi={get:en(!0,!1)};const bo=new WeakMap,wo=new WeakMap,xo=new WeakMap,zi=new WeakMap;function Yi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Qi(e){return e.__v_skip||!Object.isExtensible(e)?0:Yi(xi(e))}function tn(e){return Je(e)?e:sn(e,!1,Ni,Ji,bo)}function Xi(e){return sn(e,!1,Vi,Gi,wo)}function Rs(e){return sn(e,!0,Ui,qi,xo)}function sn(e,t,s,n,o){if(!X(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Qi(e);if(i===0)return e;const l=o.get(e);if(l)return l;const a=new Proxy(e,i===2?n:s);return o.set(e,a),a}function lt(e){return Je(e)?lt(e.__v_raw):!!(e&&e.__v_isReactive)}function Je(e){return!!(e&&e.__v_isReadonly)}function be(e){return!!(e&&e.__v_isShallow)}function nn(e){return e?!!e.__v_raw:!1}function U(e){const t=e&&e.__v_raw;return t?U(t):e}function _o(e){return!V(e,"__v_skip")&&Object.isExtensible(e)&&oo(e,"__v_skip",!0),e}const De=e=>X(e)?tn(e):e,Rt=e=>X(e)?Rs(e):e;function ne(e){return e?e.__v_isRef===!0:!1}function Zi(e){return er(e,!1)}function er(e,t){return ne(e)?e:new tr(e,t)}class tr{constructor(t,s){this.dep=new Xs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:U(t),this._value=s?t:De(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||be(t)||Je(t);t=n?t:U(t),Ke(t,s)&&(this._rawValue=t,this._value=n?t:De(t),this.dep.trigger())}}function sr(e){return ne(e)?e.value:e}const nr={get:(e,t,s)=>t==="__v_raw"?e:sr(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return ne(o)&&!ne(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function So(e){return lt(e)?e:new Proxy(e,nr)}class or{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Xs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ft-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&G!==this)return co(this,!0),!0}get value(){const t=this.dep.track();return po(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ir(e,t,s=!1){let n,o;return j(e)?n=e:(n=e.get,o=e.set),new or(n,o,s)}const Wt={},Yt=new WeakMap;let Qe;function rr(e,t=!1,s=Qe){if(s){let n=Yt.get(s);n||Yt.set(s,n=[]),n.push(e)}}function lr(e,t,s=q){const{immediate:n,deep:o,once:i,scheduler:l,augmentJob:a,call:d}=s,p=E=>o?E:be(E)||o===!1||o===0?Ve(E,1):Ve(E);let f,w,T,m,h=!1,g=!1;if(ne(e)?(w=()=>e.value,h=be(e)):lt(e)?(w=()=>p(e),h=!0):L(e)?(g=!0,h=e.some(E=>lt(E)||be(E)),w=()=>e.map(E=>{if(ne(E))return E.value;if(lt(E))return p(E);if(j(E))return d?d(E,2):E()})):j(e)?t?w=d?()=>d(e,2):e:w=()=>{if(T){Pe();try{T()}finally{Oe()}}const E=Qe;Qe=f;try{return d?d(e,3,[m]):e(m)}finally{Qe=E}}:w=$e,t&&o){const E=w,O=o===!0?1/0:o;w=()=>Ve(E(),O)}const x=Mi(),y=()=>{f.stop(),x&&x.active&&Ws(x.effects,f)};if(i&&t){const E=t;t=(...O)=>{E(...O),y()}}let v=g?new Array(e.length).fill(Wt):Wt;const F=E=>{if(!(!(f.flags&1)||!f.dirty&&!E))if(t){const O=f.run();if(o||h||(g?O.some((z,D)=>Ke(z,v[D])):Ke(O,v))){T&&T();const z=Qe;Qe=f;try{const D=[O,v===Wt?void 0:g&&v[0]===Wt?[]:v,m];v=O,d?d(t,3,D):t(...D)}finally{Qe=z}}}else f.run()};return a&&a(F),f=new lo(w),f.scheduler=l?()=>l(F,!1):F,m=E=>rr(E,!1,f),T=f.onStop=()=>{const E=Yt.get(f);if(E){if(d)d(E,4);else for(const O of E)O();Yt.delete(f)}},t?n?F(!0):v=f.run():l?l(F.bind(null,!0),!0):f.run(),y.pause=f.pause.bind(f),y.resume=f.resume.bind(f),y.stop=y,y}function Ve(e,t=1/0,s){if(t<=0||!X(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,ne(e))Ve(e.value,t,s);else if(L(e))for(let n=0;n<e.length;n++)Ve(e[n],t,s);else if(bi(e)||_t(e))e.forEach(n=>{Ve(n,t,s)});else if(_i(e)){for(const n in e)Ve(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Ve(e[n],t,s)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.27
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function Lt(e,t,s,n){try{return n?e(...n):e()}catch(o){ls(o,t,s)}}function Be(e,t,s,n){if(j(e)){const o=Lt(e,t,s,n);return o&&so(o)&&o.catch(i=>{ls(i,t,s)}),o}if(L(e)){const o=[];for(let i=0;i<e.length;i++)o.push(Be(e[i],t,s,n));return o}}function ls(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||q;if(t){let a=t.parent;const d=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const f=a.ec;if(f){for(let w=0;w<f.length;w++)if(f[w](e,d,p)===!1)return}a=a.parent}if(i){Pe(),Lt(i,null,10,[e,d,p]),Oe();return}}ar(e,s,o,n,l)}function ar(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const ae=[];let Ee=-1;const at=[];let Ne=null,ot=0;const ko=Promise.resolve();let Qt=null;function cr(e){const t=Qt||ko;return e?t.then(this?e.bind(this):e):t}function dr(e){let t=Ee+1,s=ae.length;for(;t<s;){const n=t+s>>>1,o=ae[n],i=Pt(o);i<e||i===e&&o.flags&2?t=n+1:s=n}return t}function on(e){if(!(e.flags&1)){const t=Pt(e),s=ae[ae.length-1];!s||!(e.flags&2)&&t>=Pt(s)?ae.push(e):ae.splice(dr(t),0,e),e.flags|=1,Co()}}function Co(){Qt||(Qt=ko.then(To))}function ur(e){L(e)?at.push(...e):Ne&&e.id===-1?Ne.splice(ot+1,0,e):e.flags&1||(at.push(e),e.flags|=1),Co()}function Sn(e,t,s=Ee+1){for(;s<ae.length;s++){const n=ae[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;ae.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Eo(e){if(at.length){const t=[...new Set(at)].sort((s,n)=>Pt(s)-Pt(n));if(at.length=0,Ne){Ne.push(...t);return}for(Ne=t,ot=0;ot<Ne.length;ot++){const s=Ne[ot];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Ne=null,ot=0}}const Pt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function To(e){try{for(Ee=0;Ee<ae.length;Ee++){const t=ae[Ee];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Lt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ee<ae.length;Ee++){const t=ae[Ee];t&&(t.flags&=-2)}Ee=-1,ae.length=0,Eo(),Qt=null,(ae.length||at.length)&&To()}}let Ie=null,Io=null;function Xt(e){const t=Ie;return Ie=e,Io=e&&e.type.__scopeId||null,t}function fr(e,t=Ie,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Mn(-1);const i=Xt(t);let l;try{l=e(...o)}finally{Xt(i),n._d&&Mn(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function ze(e,t,s,n){const o=e.dirs,i=t&&t.dirs;for(let l=0;l<o.length;l++){const a=o[l];i&&(a.oldValue=i[l].value);let d=a.dir[n];d&&(Pe(),Be(d,s,8,[e.el,a,e,t]),Oe())}}function pr(e,t){if(ce){let s=ce.provides;const n=ce.parent&&ce.parent.provides;n===s&&(s=ce.provides=Object.create(n)),s[e]=t}}function Jt(e,t,s=!1){const n=hl();if(n||ct){let o=ct?ct._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&j(t)?t.call(n&&n.proxy):t}}const hr=Symbol.for("v-scx"),gr=()=>Jt(hr);function Ss(e,t,s){return $o(e,t,s)}function $o(e,t,s=q){const{immediate:n,deep:o,flush:i,once:l}=s,a=oe({},s),d=t&&n||!t&&i!=="post";let p;if(Dt){if(i==="sync"){const m=gr();p=m.__watcherHandles||(m.__watcherHandles=[])}else if(!d){const m=()=>{};return m.stop=$e,m.resume=$e,m.pause=$e,m}}const f=ce;a.call=(m,h,g)=>Be(m,f,h,g);let w=!1;i==="post"?a.scheduler=m=>{he(m,f&&f.suspense)}:i!=="sync"&&(w=!0,a.scheduler=(m,h)=>{h?m():on(m)}),a.augmentJob=m=>{t&&(m.flags|=4),w&&(m.flags|=2,f&&(m.id=f.uid,m.i=f))};const T=lr(e,t,a);return Dt&&(p?p.push(T):d&&T()),T}function mr(e,t,s){const n=this.proxy,o=te(e)?e.includes(".")?Bo(n,e):()=>n[e]:e.bind(n,n);let i;j(t)?i=t:(i=t.handler,s=t);const l=Ht(this),a=$o(o,i.bind(n),s);return l(),a}function Bo(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const vr=Symbol("_vte"),yr=e=>e.__isTeleport,br=Symbol("_leaveCb");function rn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,rn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ao(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Zt=new WeakMap;function Et(e,t,s,n,o=!1){if(L(e)){e.forEach((h,g)=>Et(h,t&&(L(t)?t[g]:t),s,n,o));return}if(Tt(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Et(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?dn(n.component):n.el,l=o?null:i,{i:a,r:d}=e,p=t&&t.r,f=a.refs===q?a.refs={}:a.refs,w=a.setupState,T=U(w),m=w===q?to:h=>V(T,h);if(p!=null&&p!==d){if(kn(t),te(p))f[p]=null,m(p)&&(w[p]=null);else if(ne(p)){p.value=null;const h=t;h.k&&(f[h.k]=null)}}if(j(d))Lt(d,a,12,[l,f]);else{const h=te(d),g=ne(d);if(h||g){const x=()=>{if(e.f){const y=h?m(d)?w[d]:f[d]:d.value;if(o)L(y)&&Ws(y,i);else if(L(y))y.includes(i)||y.push(i);else if(h)f[d]=[i],m(d)&&(w[d]=f[d]);else{const v=[i];d.value=v,e.k&&(f[e.k]=v)}}else h?(f[d]=l,m(d)&&(w[d]=l)):g&&(d.value=l,e.k&&(f[e.k]=l))};if(l){const y=()=>{x(),Zt.delete(e)};y.id=-1,Zt.set(e,y),he(y,s)}else kn(e),x()}}}function kn(e){const t=Zt.get(e);t&&(t.flags|=8,Zt.delete(e))}rs().requestIdleCallback;rs().cancelIdleCallback;const Tt=e=>!!e.type.__asyncLoader,Fo=e=>e.type.__isKeepAlive;function wr(e,t){Mo(e,"a",t)}function xr(e,t){Mo(e,"da",t)}function Mo(e,t,s=ce){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(as(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Fo(o.parent.vnode)&&_r(n,t,s,o),o=o.parent}}function _r(e,t,s,n){const o=as(t,e,n,!0);Po(()=>{Ws(n[t],o)},s)}function as(e,t,s=ce,n=!1){if(s){const o=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...l)=>{Pe();const a=Ht(s),d=Be(t,s,e,l);return a(),Oe(),d});return n?o.unshift(i):o.push(i),i}}const je=e=>(t,s=ce)=>{(!Dt||e==="sp")&&as(e,(...n)=>t(...n),s)},Sr=je("bm"),Ro=je("m"),kr=je("bu"),Cr=je("u"),Er=je("bum"),Po=je("um"),Tr=je("sp"),Ir=je("rtg"),$r=je("rtc");function Br(e,t=ce){as("ec",e,t)}const Ar=Symbol.for("v-ndc"),Ps=e=>e?ei(e)?dn(e):Ps(e.parent):null,It=oe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ps(e.parent),$root:e=>Ps(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Do(e),$forceUpdate:e=>e.f||(e.f=()=>{on(e.update)}),$nextTick:e=>e.n||(e.n=cr.bind(e.proxy)),$watch:e=>mr.bind(e)}),ks=(e,t)=>e!==q&&!e.__isScriptSetup&&V(e,t),Fr={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:i,accessCache:l,type:a,appContext:d}=e;if(t[0]!=="$"){const T=l[t];if(T!==void 0)switch(T){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return i[t]}else{if(ks(n,t))return l[t]=1,n[t];if(o!==q&&V(o,t))return l[t]=2,o[t];if(V(i,t))return l[t]=3,i[t];if(s!==q&&V(s,t))return l[t]=4,s[t];Os&&(l[t]=0)}}const p=It[t];let f,w;if(p)return t==="$attrs"&&se(e.attrs,"get",""),p(e);if((f=a.__cssModules)&&(f=f[t]))return f;if(s!==q&&V(s,t))return l[t]=4,s[t];if(w=d.config.globalProperties,V(w,t))return w[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:i}=e;return ks(o,t)?(o[t]=s,!0):n!==q&&V(n,t)?(n[t]=s,!0):V(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:i,type:l}},a){let d;return!!(s[a]||e!==q&&a[0]!=="$"&&V(e,a)||ks(t,a)||V(i,a)||V(n,a)||V(It,a)||V(o.config.globalProperties,a)||(d=l.__cssModules)&&d[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:V(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Cn(e){return L(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Os=!0;function Mr(e){const t=Do(e),s=e.proxy,n=e.ctx;Os=!1,t.beforeCreate&&En(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:l,watch:a,provide:d,inject:p,created:f,beforeMount:w,mounted:T,beforeUpdate:m,updated:h,activated:g,deactivated:x,beforeDestroy:y,beforeUnmount:v,destroyed:F,unmounted:E,render:O,renderTracked:z,renderTriggered:D,errorCaptured:Q,serverPrefetch:tt,expose:we,inheritAttrs:Le,components:Ae,directives:st,filters:ms}=t;if(p&&Rr(p,n,null),l)for(const Y in l){const W=l[Y];j(W)&&(n[Y]=W.bind(s))}if(o){const Y=o.call(s,s);X(Y)&&(e.data=tn(Y))}if(Os=!0,i)for(const Y in i){const W=i[Y],Ge=j(W)?W.bind(s,s):j(W.get)?W.get.bind(s,s):$e,Nt=!j(W)&&j(W.set)?W.set.bind(s):$e,qe=wl({get:Ge,set:Nt});Object.defineProperty(n,Y,{enumerable:!0,configurable:!0,get:()=>qe.value,set:xe=>qe.value=xe})}if(a)for(const Y in a)Oo(a[Y],n,s,Y);if(d){const Y=j(d)?d.call(s):d;Reflect.ownKeys(Y).forEach(W=>{pr(W,Y[W])})}f&&En(f,e,"c");function ie(Y,W){L(W)?W.forEach(Ge=>Y(Ge.bind(s))):W&&Y(W.bind(s))}if(ie(Sr,w),ie(Ro,T),ie(kr,m),ie(Cr,h),ie(wr,g),ie(xr,x),ie(Br,Q),ie($r,z),ie(Ir,D),ie(Er,v),ie(Po,E),ie(Tr,tt),L(we))if(we.length){const Y=e.exposed||(e.exposed={});we.forEach(W=>{Object.defineProperty(Y,W,{get:()=>s[W],set:Ge=>s[W]=Ge,enumerable:!0})})}else e.exposed||(e.exposed={});O&&e.render===$e&&(e.render=O),Le!=null&&(e.inheritAttrs=Le),Ae&&(e.components=Ae),st&&(e.directives=st),tt&&Ao(e)}function Rr(e,t,s=$e){L(e)&&(e=Ds(e));for(const n in e){const o=e[n];let i;X(o)?"default"in o?i=Jt(o.from||n,o.default,!0):i=Jt(o.from||n):i=Jt(o),ne(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[n]=i}}function En(e,t,s){Be(L(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Oo(e,t,s,n){let o=n.includes(".")?Bo(s,n):()=>s[n];if(te(e)){const i=t[e];j(i)&&Ss(o,i)}else if(j(e))Ss(o,e.bind(s));else if(X(e))if(L(e))e.forEach(i=>Oo(i,t,s,n));else{const i=j(e.handler)?e.handler.bind(s):t[e.handler];j(i)&&Ss(o,i,e)}}function Do(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,a=i.get(t);let d;return a?d=a:!o.length&&!s&&!n?d=t:(d={},o.length&&o.forEach(p=>es(d,p,l,!0)),es(d,t,l)),X(t)&&i.set(t,d),d}function es(e,t,s,n=!1){const{mixins:o,extends:i}=t;i&&es(e,i,s,!0),o&&o.forEach(l=>es(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const a=Pr[l]||s&&s[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const Pr={data:Tn,props:In,emits:In,methods:wt,computed:wt,beforeCreate:re,created:re,beforeMount:re,mounted:re,beforeUpdate:re,updated:re,beforeDestroy:re,beforeUnmount:re,destroyed:re,unmounted:re,activated:re,deactivated:re,errorCaptured:re,serverPrefetch:re,components:wt,directives:wt,watch:Dr,provide:Tn,inject:Or};function Tn(e,t){return t?e?function(){return oe(j(e)?e.call(this,this):e,j(t)?t.call(this,this):t)}:t:e}function Or(e,t){return wt(Ds(e),Ds(t))}function Ds(e){if(L(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function re(e,t){return e?[...new Set([].concat(e,t))]:t}function wt(e,t){return e?oe(Object.create(null),e,t):t}function In(e,t){return e?L(e)&&L(t)?[...new Set([...e,...t])]:oe(Object.create(null),Cn(e),Cn(t??{})):t}function Dr(e,t){if(!e)return t;if(!t)return e;const s=oe(Object.create(null),e);for(const n in t)s[n]=re(e[n],t[n]);return s}function jo(){return{app:null,config:{isNativeTag:to,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let jr=0;function Lr(e,t){return function(n,o=null){j(n)||(n=oe({},n)),o!=null&&!X(o)&&(o=null);const i=jo(),l=new WeakSet,a=[];let d=!1;const p=i.app={_uid:jr++,_component:n,_props:o,_container:null,_context:i,_instance:null,version:xl,get config(){return i.config},set config(f){},use(f,...w){return l.has(f)||(f&&j(f.install)?(l.add(f),f.install(p,...w)):j(f)&&(l.add(f),f(p,...w))),p},mixin(f){return i.mixins.includes(f)||i.mixins.push(f),p},component(f,w){return w?(i.components[f]=w,p):i.components[f]},directive(f,w){return w?(i.directives[f]=w,p):i.directives[f]},mount(f,w,T){if(!d){const m=p._ceVNode||Ze(n,o);return m.appContext=i,T===!0?T="svg":T===!1&&(T=void 0),e(m,f,T),d=!0,p._container=f,f.__vue_app__=p,dn(m.component)}},onUnmount(f){a.push(f)},unmount(){d&&(Be(a,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(f,w){return i.provides[f]=w,p},runWithContext(f){const w=ct;ct=p;try{return f()}finally{ct=w}}};return p}}let ct=null;const Hr=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${We(t)}Modifiers`]||e[`${et(t)}Modifiers`];function Nr(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||q;let o=s;const i=t.startsWith("update:"),l=i&&Hr(n,t.slice(7));l&&(l.trim&&(o=s.map(f=>te(f)?f.trim():f)),l.number&&(o=s.map(Ci)));let a,d=n[a=ys(t)]||n[a=ys(We(t))];!d&&i&&(d=n[a=ys(et(t))]),d&&Be(d,e,6,o);const p=n[a+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Be(p,e,6,o)}}const Ur=new WeakMap;function Lo(e,t,s=!1){const n=s?Ur:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const i=e.emits;let l={},a=!1;if(!j(e)){const d=p=>{const f=Lo(p,t,!0);f&&(a=!0,oe(l,f))};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!i&&!a?(X(e)&&n.set(e,null),null):(L(i)?i.forEach(d=>l[d]=null):oe(l,i),X(e)&&n.set(e,l),l)}function cs(e,t){return!e||!ns(t)?!1:(t=t.slice(2).replace(/Once$/,""),V(e,t[0].toLowerCase()+t.slice(1))||V(e,et(t))||V(e,t))}function $n(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[i],slots:l,attrs:a,emit:d,render:p,renderCache:f,props:w,data:T,setupState:m,ctx:h,inheritAttrs:g}=e,x=Xt(e);let y,v;try{if(s.shapeFlag&4){const E=o||n,O=E;y=Te(p.call(O,E,f,w,m,T,h)),v=a}else{const E=t;y=Te(E.length>1?E(w,{attrs:a,slots:l,emit:d}):E(w,null)),v=t.props?a:Vr(a)}}catch(E){$t.length=0,ls(E,e,1),y=Ze(dt)}let F=y;if(v&&g!==!1){const E=Object.keys(v),{shapeFlag:O}=F;E.length&&O&7&&(i&&E.some(Ks)&&(v=Kr(v,i)),F=ut(F,v,!1,!0))}return s.dirs&&(F=ut(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(s.dirs):s.dirs),s.transition&&rn(F,s.transition),y=F,Xt(x),y}const Vr=e=>{let t;for(const s in e)(s==="class"||s==="style"||ns(s))&&((t||(t={}))[s]=e[s]);return t},Kr=(e,t)=>{const s={};for(const n in e)(!Ks(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Wr(e,t,s){const{props:n,children:o,component:i}=e,{props:l,children:a,patchFlag:d}=t,p=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&d>=0){if(d&1024)return!0;if(d&16)return n?Bn(n,l,p):!!l;if(d&8){const f=t.dynamicProps;for(let w=0;w<f.length;w++){const T=f[w];if(l[T]!==n[T]&&!cs(p,T))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===l?!1:n?l?Bn(n,l,p):!0:!!l;return!1}function Bn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const i=n[o];if(t[i]!==e[i]&&!cs(s,i))return!0}return!1}function Jr({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const Ho={},No=()=>Object.create(Ho),Uo=e=>Object.getPrototypeOf(e)===Ho;function Gr(e,t,s,n=!1){const o={},i=No();e.propsDefaults=Object.create(null),Vo(e,t,o,i);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);s?e.props=n?o:Xi(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function qr(e,t,s,n){const{props:o,attrs:i,vnode:{patchFlag:l}}=e,a=U(o),[d]=e.propsOptions;let p=!1;if((n||l>0)&&!(l&16)){if(l&8){const f=e.vnode.dynamicProps;for(let w=0;w<f.length;w++){let T=f[w];if(cs(e.emitsOptions,T))continue;const m=t[T];if(d)if(V(i,T))m!==i[T]&&(i[T]=m,p=!0);else{const h=We(T);o[h]=js(d,a,h,m,e,!1)}else m!==i[T]&&(i[T]=m,p=!0)}}}else{Vo(e,t,o,i)&&(p=!0);let f;for(const w in a)(!t||!V(t,w)&&((f=et(w))===w||!V(t,f)))&&(d?s&&(s[w]!==void 0||s[f]!==void 0)&&(o[w]=js(d,a,w,void 0,e,!0)):delete o[w]);if(i!==a)for(const w in i)(!t||!V(t,w))&&(delete i[w],p=!0)}p&&Re(e.attrs,"set","")}function Vo(e,t,s,n){const[o,i]=e.propsOptions;let l=!1,a;if(t)for(let d in t){if(St(d))continue;const p=t[d];let f;o&&V(o,f=We(d))?!i||!i.includes(f)?s[f]=p:(a||(a={}))[f]=p:cs(e.emitsOptions,d)||(!(d in n)||p!==n[d])&&(n[d]=p,l=!0)}if(i){const d=U(s),p=a||q;for(let f=0;f<i.length;f++){const w=i[f];s[w]=js(o,d,w,p[w],e,!V(p,w))}}return l}function js(e,t,s,n,o,i){const l=e[s];if(l!=null){const a=V(l,"default");if(a&&n===void 0){const d=l.default;if(l.type!==Function&&!l.skipFactory&&j(d)){const{propsDefaults:p}=o;if(s in p)n=p[s];else{const f=Ht(o);n=p[s]=d.call(null,t),f()}}else n=d;o.ce&&o.ce._setProp(s,n)}l[0]&&(i&&!a?n=!1:l[1]&&(n===""||n===et(s))&&(n=!0))}return n}const zr=new WeakMap;function Ko(e,t,s=!1){const n=s?zr:t.propsCache,o=n.get(e);if(o)return o;const i=e.props,l={},a=[];let d=!1;if(!j(e)){const f=w=>{d=!0;const[T,m]=Ko(w,t,!0);oe(l,T),m&&a.push(...m)};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!d)return X(e)&&n.set(e,rt),rt;if(L(i))for(let f=0;f<i.length;f++){const w=We(i[f]);An(w)&&(l[w]=q)}else if(i)for(const f in i){const w=We(f);if(An(w)){const T=i[f],m=l[w]=L(T)||j(T)?{type:T}:oe({},T),h=m.type;let g=!1,x=!0;if(L(h))for(let y=0;y<h.length;++y){const v=h[y],F=j(v)&&v.name;if(F==="Boolean"){g=!0;break}else F==="String"&&(x=!1)}else g=j(h)&&h.name==="Boolean";m[0]=g,m[1]=x,(g||V(m,"default"))&&a.push(w)}}const p=[l,a];return X(e)&&n.set(e,p),p}function An(e){return e[0]!=="$"&&!St(e)}const ln=e=>e==="_"||e==="_ctx"||e==="$stable",an=e=>L(e)?e.map(Te):[Te(e)],Yr=(e,t,s)=>{if(t._n)return t;const n=fr((...o)=>an(t(...o)),s);return n._c=!1,n},Wo=(e,t,s)=>{const n=e._ctx;for(const o in e){if(ln(o))continue;const i=e[o];if(j(i))t[o]=Yr(o,i,n);else if(i!=null){const l=an(i);t[o]=()=>l}}},Jo=(e,t)=>{const s=an(t);e.slots.default=()=>s},Go=(e,t,s)=>{for(const n in t)(s||!ln(n))&&(e[n]=t[n])},Qr=(e,t,s)=>{const n=e.slots=No();if(e.vnode.shapeFlag&32){const o=t._;o?(Go(n,t,s),s&&oo(n,"_",o,!0)):Wo(t,n)}else t&&Jo(e,t)},Xr=(e,t,s)=>{const{vnode:n,slots:o}=e;let i=!0,l=q;if(n.shapeFlag&32){const a=t._;a?s&&a===1?i=!1:Go(o,t,s):(i=!t.$stable,Wo(t,o)),l=t}else t&&(Jo(e,t),l={default:1});if(i)for(const a in o)!ln(a)&&l[a]==null&&delete o[a]},he=nl;function Zr(e){return el(e)}function el(e,t){const s=rs();s.__VUE__=!0;const{insert:n,remove:o,patchProp:i,createElement:l,createText:a,createComment:d,setText:p,setElementText:f,parentNode:w,nextSibling:T,setScopeId:m=$e,insertStaticContent:h}=e,g=(c,u,b,C=null,_=null,S=null,B=void 0,$=null,I=!!u.dynamicChildren)=>{if(c===u)return;c&&!bt(c,u)&&(C=Ut(c),xe(c,_,S,!0),c=null),u.patchFlag===-2&&(I=!1,u.dynamicChildren=null);const{type:k,ref:R,shapeFlag:A}=u;switch(k){case ds:x(c,u,b,C);break;case dt:y(c,u,b,C);break;case Es:c==null&&v(u,b,C,B);break;case ve:Ae(c,u,b,C,_,S,B,$,I);break;default:A&1?O(c,u,b,C,_,S,B,$,I):A&6?st(c,u,b,C,_,S,B,$,I):(A&64||A&128)&&k.process(c,u,b,C,_,S,B,$,I,mt)}R!=null&&_?Et(R,c&&c.ref,S,u||c,!u):R==null&&c&&c.ref!=null&&Et(c.ref,null,S,c,!0)},x=(c,u,b,C)=>{if(c==null)n(u.el=a(u.children),b,C);else{const _=u.el=c.el;u.children!==c.children&&p(_,u.children)}},y=(c,u,b,C)=>{c==null?n(u.el=d(u.children||""),b,C):u.el=c.el},v=(c,u,b,C)=>{[c.el,c.anchor]=h(c.children,u,b,C,c.el,c.anchor)},F=({el:c,anchor:u},b,C)=>{let _;for(;c&&c!==u;)_=T(c),n(c,b,C),c=_;n(u,b,C)},E=({el:c,anchor:u})=>{let b;for(;c&&c!==u;)b=T(c),o(c),c=b;o(u)},O=(c,u,b,C,_,S,B,$,I)=>{if(u.type==="svg"?B="svg":u.type==="math"&&(B="mathml"),c==null)z(u,b,C,_,S,B,$,I);else{const k=c.el&&c.el._isVueCE?c.el:null;try{k&&k._beginPatch(),tt(c,u,_,S,B,$,I)}finally{k&&k._endPatch()}}},z=(c,u,b,C,_,S,B,$)=>{let I,k;const{props:R,shapeFlag:A,transition:M,dirs:P}=c;if(I=c.el=l(c.type,S,R&&R.is,R),A&8?f(I,c.children):A&16&&Q(c.children,I,null,C,_,Cs(c,S),B,$),P&&ze(c,null,C,"created"),D(I,c,c.scopeId,B,C),R){for(const J in R)J!=="value"&&!St(J)&&i(I,J,null,R[J],S,C);"value"in R&&i(I,"value",null,R.value,S),(k=R.onVnodeBeforeMount)&&Ce(k,C,c)}P&&ze(c,null,C,"beforeMount");const H=tl(_,M);H&&M.beforeEnter(I),n(I,u,b),((k=R&&R.onVnodeMounted)||H||P)&&he(()=>{k&&Ce(k,C,c),H&&M.enter(I),P&&ze(c,null,C,"mounted")},_)},D=(c,u,b,C,_)=>{if(b&&m(c,b),C)for(let S=0;S<C.length;S++)m(c,C[S]);if(_){let S=_.subTree;if(u===S||Qo(S.type)&&(S.ssContent===u||S.ssFallback===u)){const B=_.vnode;D(c,B,B.scopeId,B.slotScopeIds,_.parent)}}},Q=(c,u,b,C,_,S,B,$,I=0)=>{for(let k=I;k<c.length;k++){const R=c[k]=$?Ue(c[k]):Te(c[k]);g(null,R,u,b,C,_,S,B,$)}},tt=(c,u,b,C,_,S,B)=>{const $=u.el=c.el;let{patchFlag:I,dynamicChildren:k,dirs:R}=u;I|=c.patchFlag&16;const A=c.props||q,M=u.props||q;let P;if(b&&Ye(b,!1),(P=M.onVnodeBeforeUpdate)&&Ce(P,b,u,c),R&&ze(u,c,b,"beforeUpdate"),b&&Ye(b,!0),(A.innerHTML&&M.innerHTML==null||A.textContent&&M.textContent==null)&&f($,""),k?we(c.dynamicChildren,k,$,b,C,Cs(u,_),S):B||W(c,u,$,null,b,C,Cs(u,_),S,!1),I>0){if(I&16)Le($,A,M,b,_);else if(I&2&&A.class!==M.class&&i($,"class",null,M.class,_),I&4&&i($,"style",A.style,M.style,_),I&8){const H=u.dynamicProps;for(let J=0;J<H.length;J++){const K=H[J],de=A[K],ue=M[K];(ue!==de||K==="value")&&i($,K,de,ue,_,b)}}I&1&&c.children!==u.children&&f($,u.children)}else!B&&k==null&&Le($,A,M,b,_);((P=M.onVnodeUpdated)||R)&&he(()=>{P&&Ce(P,b,u,c),R&&ze(u,c,b,"updated")},C)},we=(c,u,b,C,_,S,B)=>{for(let $=0;$<u.length;$++){const I=c[$],k=u[$],R=I.el&&(I.type===ve||!bt(I,k)||I.shapeFlag&198)?w(I.el):b;g(I,k,R,null,C,_,S,B,!0)}},Le=(c,u,b,C,_)=>{if(u!==b){if(u!==q)for(const S in u)!St(S)&&!(S in b)&&i(c,S,u[S],null,_,C);for(const S in b){if(St(S))continue;const B=b[S],$=u[S];B!==$&&S!=="value"&&i(c,S,$,B,_,C)}"value"in b&&i(c,"value",u.value,b.value,_)}},Ae=(c,u,b,C,_,S,B,$,I)=>{const k=u.el=c?c.el:a(""),R=u.anchor=c?c.anchor:a("");let{patchFlag:A,dynamicChildren:M,slotScopeIds:P}=u;P&&($=$?$.concat(P):P),c==null?(n(k,b,C),n(R,b,C),Q(u.children||[],b,R,_,S,B,$,I)):A>0&&A&64&&M&&c.dynamicChildren&&c.dynamicChildren.length===M.length?(we(c.dynamicChildren,M,b,_,S,B,$),(u.key!=null||_&&u===_.subTree)&&qo(c,u,!0)):W(c,u,b,R,_,S,B,$,I)},st=(c,u,b,C,_,S,B,$,I)=>{u.slotScopeIds=$,c==null?u.shapeFlag&512?_.ctx.activate(u,b,C,B,I):ms(u,b,C,_,S,B,I):hn(c,u,I)},ms=(c,u,b,C,_,S,B)=>{const $=c.component=pl(c,C,_);if(Fo(c)&&($.ctx.renderer=mt),gl($,!1,B),$.asyncDep){if(_&&_.registerDep($,ie,B),!c.el){const I=$.subTree=Ze(dt);y(null,I,u,b),c.placeholder=I.el}}else ie($,c,u,b,_,S,B)},hn=(c,u,b)=>{const C=u.component=c.component;if(Wr(c,u,b))if(C.asyncDep&&!C.asyncResolved){Y(C,u,b);return}else C.next=u,C.update();else u.el=c.el,C.vnode=u},ie=(c,u,b,C,_,S,B)=>{const $=()=>{if(c.isMounted){let{next:A,bu:M,u:P,parent:H,vnode:J}=c;{const Se=zo(c);if(Se){A&&(A.el=J.el,Y(c,A,B)),Se.asyncDep.then(()=>{c.isUnmounted||$()});return}}let K=A,de;Ye(c,!1),A?(A.el=J.el,Y(c,A,B)):A=J,M&&bs(M),(de=A.props&&A.props.onVnodeBeforeUpdate)&&Ce(de,H,A,J),Ye(c,!0);const ue=$n(c),_e=c.subTree;c.subTree=ue,g(_e,ue,w(_e.el),Ut(_e),c,_,S),A.el=ue.el,K===null&&Jr(c,ue.el),P&&he(P,_),(de=A.props&&A.props.onVnodeUpdated)&&he(()=>Ce(de,H,A,J),_)}else{let A;const{el:M,props:P}=u,{bm:H,m:J,parent:K,root:de,type:ue}=c,_e=Tt(u);Ye(c,!1),H&&bs(H),!_e&&(A=P&&P.onVnodeBeforeMount)&&Ce(A,K,u),Ye(c,!0);{de.ce&&de.ce._def.shadowRoot!==!1&&de.ce._injectChildStyle(ue);const Se=c.subTree=$n(c);g(null,Se,b,C,c,_,S),u.el=Se.el}if(J&&he(J,_),!_e&&(A=P&&P.onVnodeMounted)){const Se=u;he(()=>Ce(A,K,Se),_)}(u.shapeFlag&256||K&&Tt(K.vnode)&&K.vnode.shapeFlag&256)&&c.a&&he(c.a,_),c.isMounted=!0,u=b=C=null}};c.scope.on();const I=c.effect=new lo($);c.scope.off();const k=c.update=I.run.bind(I),R=c.job=I.runIfDirty.bind(I);R.i=c,R.id=c.uid,I.scheduler=()=>on(R),Ye(c,!0),k()},Y=(c,u,b)=>{u.component=c;const C=c.vnode.props;c.vnode=u,c.next=null,qr(c,u.props,C,b),Xr(c,u.children,b),Pe(),Sn(c),Oe()},W=(c,u,b,C,_,S,B,$,I=!1)=>{const k=c&&c.children,R=c?c.shapeFlag:0,A=u.children,{patchFlag:M,shapeFlag:P}=u;if(M>0){if(M&128){Nt(k,A,b,C,_,S,B,$,I);return}else if(M&256){Ge(k,A,b,C,_,S,B,$,I);return}}P&8?(R&16&>(k,_,S),A!==k&&f(b,A)):R&16?P&16?Nt(k,A,b,C,_,S,B,$,I):gt(k,_,S,!0):(R&8&&f(b,""),P&16&&Q(A,b,C,_,S,B,$,I))},Ge=(c,u,b,C,_,S,B,$,I)=>{c=c||rt,u=u||rt;const k=c.length,R=u.length,A=Math.min(k,R);let M;for(M=0;M<A;M++){const P=u[M]=I?Ue(u[M]):Te(u[M]);g(c[M],P,b,null,_,S,B,$,I)}k>R?gt(c,_,S,!0,!1,A):Q(u,b,C,_,S,B,$,I,A)},Nt=(c,u,b,C,_,S,B,$,I)=>{let k=0;const R=u.length;let A=c.length-1,M=R-1;for(;k<=A&&k<=M;){const P=c[k],H=u[k]=I?Ue(u[k]):Te(u[k]);if(bt(P,H))g(P,H,b,null,_,S,B,$,I);else break;k++}for(;k<=A&&k<=M;){const P=c[A],H=u[M]=I?Ue(u[M]):Te(u[M]);if(bt(P,H))g(P,H,b,null,_,S,B,$,I);else break;A--,M--}if(k>A){if(k<=M){const P=M+1,H=P<R?u[P].el:C;for(;k<=M;)g(null,u[k]=I?Ue(u[k]):Te(u[k]),b,H,_,S,B,$,I),k++}}else if(k>M)for(;k<=A;)xe(c[k],_,S,!0),k++;else{const P=k,H=k,J=new Map;for(k=H;k<=M;k++){const pe=u[k]=I?Ue(u[k]):Te(u[k]);pe.key!=null&&J.set(pe.key,k)}let K,de=0;const ue=M-H+1;let _e=!1,Se=0;const vt=new Array(ue);for(k=0;k<ue;k++)vt[k]=0;for(k=P;k<=A;k++){const pe=c[k];if(de>=ue){xe(pe,_,S,!0);continue}let ke;if(pe.key!=null)ke=J.get(pe.key);else for(K=H;K<=M;K++)if(vt[K-H]===0&&bt(pe,u[K])){ke=K;break}ke===void 0?xe(pe,_,S,!0):(vt[ke-H]=k+1,ke>=Se?Se=ke:_e=!0,g(pe,u[ke],b,null,_,S,B,$,I),de++)}const vn=_e?sl(vt):rt;for(K=vn.length-1,k=ue-1;k>=0;k--){const pe=H+k,ke=u[pe],yn=u[pe+1],bn=pe+1<R?yn.el||Yo(yn):C;vt[k]===0?g(null,ke,b,bn,_,S,B,$,I):_e&&(K<0||k!==vn[K]?qe(ke,b,bn,2):K--)}}},qe=(c,u,b,C,_=null)=>{const{el:S,type:B,transition:$,children:I,shapeFlag:k}=c;if(k&6){qe(c.component.subTree,u,b,C);return}if(k&128){c.suspense.move(u,b,C);return}if(k&64){B.move(c,u,b,mt);return}if(B===ve){n(S,u,b);for(let A=0;A<I.length;A++)qe(I[A],u,b,C);n(c.anchor,u,b);return}if(B===Es){F(c,u,b);return}if(C!==2&&k&1&&$)if(C===0)$.beforeEnter(S),n(S,u,b),he(()=>$.enter(S),_);else{const{leave:A,delayLeave:M,afterLeave:P}=$,H=()=>{c.ctx.isUnmounted?o(S):n(S,u,b)},J=()=>{S._isLeaving&&S[br](!0),A(S,()=>{H(),P&&P()})};M?M(S,H,J):J()}else n(S,u,b)},xe=(c,u,b,C=!1,_=!1)=>{const{type:S,props:B,ref:$,children:I,dynamicChildren:k,shapeFlag:R,patchFlag:A,dirs:M,cacheIndex:P}=c;if(A===-2&&(_=!1),$!=null&&(Pe(),Et($,null,b,c,!0),Oe()),P!=null&&(u.renderCache[P]=void 0),R&256){u.ctx.deactivate(c);return}const H=R&1&&M,J=!Tt(c);let K;if(J&&(K=B&&B.onVnodeBeforeUnmount)&&Ce(K,u,c),R&6)vi(c.component,b,C);else{if(R&128){c.suspense.unmount(b,C);return}H&&ze(c,null,u,"beforeUnmount"),R&64?c.type.remove(c,u,b,mt,C):k&&!k.hasOnce&&(S!==ve||A>0&&A&64)?gt(k,u,b,!1,!0):(S===ve&&A&384||!_&&R&16)&>(I,u,b),C&&gn(c)}(J&&(K=B&&B.onVnodeUnmounted)||H)&&he(()=>{K&&Ce(K,u,c),H&&ze(c,null,u,"unmounted")},b)},gn=c=>{const{type:u,el:b,anchor:C,transition:_}=c;if(u===ve){mi(b,C);return}if(u===Es){E(c);return}const S=()=>{o(b),_&&!_.persisted&&_.afterLeave&&_.afterLeave()};if(c.shapeFlag&1&&_&&!_.persisted){const{leave:B,delayLeave:$}=_,I=()=>B(b,S);$?$(c.el,S,I):I()}else S()},mi=(c,u)=>{let b;for(;c!==u;)b=T(c),o(c),c=b;o(u)},vi=(c,u,b)=>{const{bum:C,scope:_,job:S,subTree:B,um:$,m:I,a:k}=c;Fn(I),Fn(k),C&&bs(C),_.stop(),S&&(S.flags|=8,xe(B,c,u,b)),$&&he($,u),he(()=>{c.isUnmounted=!0},u)},gt=(c,u,b,C=!1,_=!1,S=0)=>{for(let B=S;B<c.length;B++)xe(c[B],u,b,C,_)},Ut=c=>{if(c.shapeFlag&6)return Ut(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const u=T(c.anchor||c.el),b=u&&u[vr];return b?T(b):u};let vs=!1;const mn=(c,u,b)=>{let C;c==null?u._vnode&&(xe(u._vnode,null,null,!0),C=u._vnode.component):g(u._vnode||null,c,u,null,null,null,b),u._vnode=c,vs||(vs=!0,Sn(C),Eo(),vs=!1)},mt={p:g,um:xe,m:qe,r:gn,mt:ms,mc:Q,pc:W,pbc:we,n:Ut,o:e};return{render:mn,hydrate:void 0,createApp:Lr(mn)}}function Cs({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Ye({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function tl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function qo(e,t,s=!1){const n=e.children,o=t.children;if(L(n)&&L(o))for(let i=0;i<n.length;i++){const l=n[i];let a=o[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[i]=Ue(o[i]),a.el=l.el),!s&&a.patchFlag!==-2&&qo(l,a)),a.type===ds&&(a.patchFlag!==-1?a.el=l.el:a.__elIndex=i+(e.type===ve?1:0)),a.type===dt&&!a.el&&(a.el=l.el)}}function sl(e){const t=e.slice(),s=[0];let n,o,i,l,a;const d=e.length;for(n=0;n<d;n++){const p=e[n];if(p!==0){if(o=s[s.length-1],e[o]<p){t[n]=o,s.push(n);continue}for(i=0,l=s.length-1;i<l;)a=i+l>>1,e[s[a]]<p?i=a+1:l=a;p<e[s[i]]&&(i>0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,l=s[i-1];i-- >0;)s[i]=l,l=t[l];return s}function zo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zo(t)}function Fn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Yo(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Yo(t.subTree):null}const Qo=e=>e.__isSuspense;function nl(e,t){t&&t.pendingBranch?L(e)?t.effects.push(...e):t.effects.push(e):ur(e)}const ve=Symbol.for("v-fgt"),ds=Symbol.for("v-txt"),dt=Symbol.for("v-cmt"),Es=Symbol.for("v-stc"),$t=[];let ge=null;function ol(e=!1){$t.push(ge=e?null:[])}function il(){$t.pop(),ge=$t[$t.length-1]||null}let Ot=1;function Mn(e,t=!1){Ot+=e,e<0&&ge&&t&&(ge.hasOnce=!0)}function rl(e){return e.dynamicChildren=Ot>0?ge||rt:null,il(),Ot>0&&ge&&ge.push(e),e}function ll(e,t,s,n,o,i){return rl(r(e,t,s,n,o,i,!0))}function Xo(e){return e?e.__v_isVNode===!0:!1}function bt(e,t){return e.type===t.type&&e.key===t.key}const Zo=({key:e})=>e??null,Gt=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?te(e)||ne(e)||j(e)?{i:Ie,r:e,k:t,f:!!s}:e:null);function r(e,t=null,s=null,n=0,o=null,i=e===ve?0:1,l=!1,a=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Zo(t),ref:t&&Gt(t),scopeId:Io,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ie};return a?(cn(d,s),i&128&&e.normalize(d)):s&&(d.shapeFlag|=te(s)?8:16),Ot>0&&!l&&ge&&(d.patchFlag>0||i&6)&&d.patchFlag!==32&&ge.push(d),d}const Ze=al;function al(e,t=null,s=null,n=0,o=null,i=!1){if((!e||e===Ar)&&(e=dt),Xo(e)){const a=ut(e,t,!0);return s&&cn(a,s),Ot>0&&!i&&ge&&(a.shapeFlag&6?ge[ge.indexOf(e)]=a:ge.push(a)),a.patchFlag=-2,a}if(bl(e)&&(e=e.__vccOpts),t){t=cl(t);let{class:a,style:d}=t;a&&!te(a)&&(t.class=qs(a)),X(d)&&(nn(d)&&!L(d)&&(d=oe({},d)),t.style=Gs(d))}const l=te(e)?1:Qo(e)?128:yr(e)?64:X(e)?4:j(e)?2:0;return r(e,t,s,n,o,l,i,!0)}function cl(e){return e?nn(e)||Uo(e)?oe({},e):e:null}function ut(e,t,s=!1,n=!1){const{props:o,ref:i,patchFlag:l,children:a,transition:d}=e,p=t?dl(o||{},t):o,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&Zo(p),ref:t&&t.ref?s&&i?L(i)?i.concat(Gt(t)):[i,Gt(t)]:Gt(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ve?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:d,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ut(e.ssContent),ssFallback:e.ssFallback&&ut(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return d&&n&&rn(f,d.clone(f)),f}function le(e=" ",t=0){return Ze(ds,null,e,t)}function Te(e){return e==null||typeof e=="boolean"?Ze(dt):L(e)?Ze(ve,null,e.slice()):Xo(e)?Ue(e):Ze(ds,null,String(e))}function Ue(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ut(e)}function cn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(L(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),cn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!Uo(t)?t._ctx=Ie:o===3&&Ie&&(Ie.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else j(t)?(t={default:t,_ctx:Ie},s=32):(t=String(t),n&64?(s=16,t=[le(t)]):s=8);e.children=t,e.shapeFlag|=s}function dl(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=qs([t.class,n.class]));else if(o==="style")t.style=Gs([t.style,n.style]);else if(ns(o)){const i=t[o],l=n[o];l&&i!==l&&!(L(i)&&i.includes(l))&&(t[o]=i?[].concat(i,l):l)}else o!==""&&(t[o]=n[o])}return t}function Ce(e,t,s,n=null){Be(e,t,7,[s,n])}const ul=jo();let fl=0;function pl(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||ul,i={uid:fl++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ro(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ko(n,o),emitsOptions:Lo(n,o),emit:null,emitted:null,propsDefaults:q,inheritAttrs:n.inheritAttrs,ctx:q,data:q,props:q,attrs:q,slots:q,refs:q,setupState:q,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Nr.bind(null,i),e.ce&&e.ce(i),i}let ce=null;const hl=()=>ce||Ie;let ts,Ls;{const e=rs(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),i=>{o.length>1?o.forEach(l=>l(i)):o[0](i)}};ts=t("__VUE_INSTANCE_SETTERS__",s=>ce=s),Ls=t("__VUE_SSR_SETTERS__",s=>Dt=s)}const Ht=e=>{const t=ce;return ts(e),e.scope.on(),()=>{e.scope.off(),ts(t)}},Rn=()=>{ce&&ce.scope.off(),ts(null)};function ei(e){return e.vnode.shapeFlag&4}let Dt=!1;function gl(e,t=!1,s=!1){t&&Ls(t);const{props:n,children:o}=e.vnode,i=ei(e);Gr(e,n,i,t),Qr(e,o,s||t);const l=i?ml(e,t):void 0;return t&&Ls(!1),l}function ml(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Fr);const{setup:n}=s;if(n){Pe();const o=e.setupContext=n.length>1?yl(e):null,i=Ht(e),l=Lt(n,e,0,[e.props,o]),a=so(l);if(Oe(),i(),(a||e.sp)&&!Tt(e)&&Ao(e),a){if(l.then(Rn,Rn),t)return l.then(d=>{Pn(e,d)}).catch(d=>{ls(d,e,0)});e.asyncDep=l}else Pn(e,l)}else ti(e)}function Pn(e,t,s){j(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:X(t)&&(e.setupState=So(t)),ti(e)}function ti(e,t,s){const n=e.type;e.render||(e.render=n.render||$e);{const o=Ht(e);Pe();try{Mr(e)}finally{Oe(),o()}}}const vl={get(e,t){return se(e,"get",""),e[t]}};function yl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,vl),slots:e.slots,emit:e.emit,expose:t}}function dn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(So(_o(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in It)return It[s](e)},has(t,s){return s in t||s in It}})):e.proxy}function bl(e){return j(e)&&"__vccOpts"in e}const wl=(e,t)=>ir(e,t,Dt),xl="3.5.27";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.27
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let Hs;const On=typeof window<"u"&&window.trustedTypes;if(On)try{Hs=On.createPolicy("vue",{createHTML:e=>e})}catch{}const si=Hs?e=>Hs.createHTML(e):e=>e,_l="http://www.w3.org/2000/svg",Sl="http://www.w3.org/1998/Math/MathML",Me=typeof document<"u"?document:null,Dn=Me&&Me.createElement("template"),kl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?Me.createElementNS(_l,e):t==="mathml"?Me.createElementNS(Sl,e):s?Me.createElement(e,{is:s}):Me.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>Me.createTextNode(e),createComment:e=>Me.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Me.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,i){const l=s?s.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===i||!(o=o.nextSibling)););else{Dn.innerHTML=si(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Dn.content;if(n==="svg"||n==="mathml"){const d=a.firstChild;for(;d.firstChild;)a.appendChild(d.firstChild);a.removeChild(d)}t.insertBefore(a,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Cl=Symbol("_vtc");function El(e,t,s){const n=e[Cl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const jn=Symbol("_vod"),Tl=Symbol("_vsh"),Il=Symbol(""),$l=/(?:^|;)\s*display\s*:/;function Bl(e,t,s){const n=e.style,o=te(s);let i=!1;if(s&&!o){if(t)if(te(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&qt(n,a,"")}else for(const l in t)s[l]==null&&qt(n,l,"");for(const l in s)l==="display"&&(i=!0),qt(n,l,s[l])}else if(o){if(t!==s){const l=n[Il];l&&(s+=";"+l),n.cssText=s,i=$l.test(s)}}else t&&e.removeAttribute("style");jn in e&&(e[jn]=i?n.display:"",e[Tl]&&(n.display="none"))}const Ln=/\s*!important$/;function qt(e,t,s){if(L(s))s.forEach(n=>qt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Al(e,t);Ln.test(s)?e.setProperty(et(n),s.replace(Ln,""),"important"):e[n]=s}}const Hn=["Webkit","Moz","ms"],Ts={};function Al(e,t){const s=Ts[t];if(s)return s;let n=We(t);if(n!=="filter"&&n in e)return Ts[t]=n;n=no(n);for(let o=0;o<Hn.length;o++){const i=Hn[o]+n;if(i in e)return Ts[t]=i}return t}const Nn="http://www.w3.org/1999/xlink";function Un(e,t,s,n,o,i=Ai(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Nn,t.slice(6,t.length)):e.setAttributeNS(Nn,t,s):s==null||i&&!io(s)?e.removeAttribute(t):e.setAttribute(t,i?"":pt(s)?String(s):s)}function Vn(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?si(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,d=s==null?e.type==="checkbox"?"on":"":String(s);(a!==d||!("_value"in e))&&(e.value=d),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=io(s):s==null&&a==="string"?(s="",l=!0):a==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(o||t)}function Fl(e,t,s,n){e.addEventListener(t,s,n)}function Ml(e,t,s,n){e.removeEventListener(t,s,n)}const Kn=Symbol("_vei");function Rl(e,t,s,n,o=null){const i=e[Kn]||(e[Kn]={}),l=i[t];if(n&&l)l.value=n;else{const[a,d]=Pl(t);if(n){const p=i[t]=jl(n,o);Fl(e,a,p,d)}else l&&(Ml(e,a,l,d),i[t]=void 0)}}const Wn=/(?:Once|Passive|Capture)$/;function Pl(e){let t;if(Wn.test(e)){t={};let n;for(;n=e.match(Wn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):et(e.slice(2)),t]}let Is=0;const Ol=Promise.resolve(),Dl=()=>Is||(Ol.then(()=>Is=0),Is=Date.now());function jl(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Be(Ll(n,s.value),t,5,[n])};return s.value=e,s.attached=Dl(),s}function Ll(e,t){if(L(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const Jn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Hl=(e,t,s,n,o,i)=>{const l=o==="svg";t==="class"?El(e,n,l):t==="style"?Bl(e,s,n):ns(t)?Ks(t)||Rl(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Nl(e,t,n,l))?(Vn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Un(e,t,n,l,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!te(n))?Vn(e,We(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Un(e,t,n,l))};function Nl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Jn(t)&&j(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Jn(t)&&te(s)?!1:t in e}const Ul=oe({patchProp:Hl},kl);let Gn;function Vl(){return Gn||(Gn=Zr(Ul))}const Kl=(...e)=>{const t=Vl().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Jl(n);if(!o)return;const i=t._component;!j(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=s(o,!1,Wl(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t};function Wl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Jl(e){return te(e)?document.querySelector(e):e}/*!
|
|
18
|
+
* pinia v2.3.1
|
|
19
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/const Gl=Symbol();var qn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(qn||(qn={}));function ql(){const e=Fi(!0),t=e.run(()=>Zi({}));let s=[],n=[];const o=_o({install(i){o._a=i,i.provide(Gl,o),i.config.globalProperties.$pinia=o,n.forEach(l=>s.push(l)),n=[]},use(i){return this._a?s.push(i):n.push(i),this},_p:s,_a:null,_e:e,_s:new Map,state:t});return o}function zl(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return`hsl(${Math.abs(t)%360}, 70%, 45%)`}function Yl(e){if(!e)return"";let t=e.replace(/^(feat|chore|docs|fix|refactor|style|test|perf|ci|build)(\(.*\))?!?:?\s*/i,"");return t.charAt(0).toUpperCase()+t.slice(1)}function Ns(e){if(!e)return"";const t=document.createElement("div");return t.textContent=e,t.innerHTML}function Ql(e,t){if(!t||!e)return Ns(e);const s=Ns(e);try{const n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return s.replace(n,'<span class="highlight">$1</span>')}catch{return s}}function Xl(e){const t=Math.floor((new Date-e)/1e3);if(t<60)return"Just now";const s=Math.floor(t/60);if(s<60)return s+"m";const n=Math.floor(s/60);return n<24?n+"h":Math.floor(n/24)+"d"}function Zl(e,t="success"){const s=document.querySelector(".toast");s&&s.remove();const n=document.createElement("div");n.className=`toast ${t}`,n.textContent=e,document.body.appendChild(n),setTimeout(()=>n.remove(),3e3)}function ea(){const e=document.querySelector(".sidebar"),t=document.querySelector(".sidebar-overlay");e.classList.toggle("open"),t.classList.toggle("open")}function ta(){"Notification"in window&&Notification.permission==="default"&&Notification.requestPermission()}function sa(e,t={}){"Notification"in window&&Notification.permission==="granted"&&new Notification(e,t)}window.toggleSidebar=ea;function na(e){const t=document.getElementById(e);t&&(t.classList.add("open"),document.body.style.overflow="hidden")}function oa(e){const t=document.getElementById(e);t&&(t.classList.remove("open"),document.body.style.overflow="")}window.openModal=na;window.closeModal=oa;Object.assign(window,{stringToColor:zl,cleanTitle:Yl,escapeHtml:Ns,highlightText:Ql,timeSince:Xl,showToast:Zl,requestNotificationPermission:ta,notify:sa});const ee="";async function Z(e,t={},s=2){for(let n=0;n<=s;n++)try{const o=await fetch(e,t);if(!o.ok&&n<s){await new Promise(i=>setTimeout(i,1e3*(n+1)));continue}return o}catch(o){if(n===s)throw o;await new Promise(i=>setTimeout(i,1e3*(n+1)))}}async function ia(){try{return await(await Z(`${ee}/api/status`)).json()}catch(e){throw console.error("Failed to fetch status:",e),e}}async function ra(){try{return await(await Z(`${ee}/api/stories`)).json()}catch(e){throw console.error("Failed to fetch stories:",e),e}}async function la(){try{return await(await Z(`${ee}/api/config`)).json()}catch(e){throw console.error("Failed to fetch config:",e),e}}async function aa(e){try{const t=await Z(`${ee}/api/config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to save config");return await t.json()}catch(t){throw console.error("Failed to update config:",t),t}}async function ca(){try{return await(await Z(`${ee}/api/repos`)).json()}catch(e){throw console.error("Failed to fetch repos:",e),e}}async function da(e){try{return await(await Z(`${ee}/api/repos/add`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})).json()}catch(t){throw console.error("Failed to add repo:",t),t}}async function ua(e){try{return await(await Z(`${ee}/api/repos/remove`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})).json()}catch(t){throw console.error("Failed to remove repo:",t),t}}async function fa(e){try{return await(await Z(`${ee}/api/repos/pause`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})).json()}catch(t){throw console.error("Failed to pause repo:",t),t}}async function pa(e){try{return await(await Z(`${ee}/api/repos/resume`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})).json()}catch(t){throw console.error("Failed to resume repo:",t),t}}async function ha(e,t){try{return await(await Z(`${ee}/api/repos/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,name:t})})).json()}catch(s){throw console.error("Failed to rename repo:",s),s}}async function ga(){try{return await(await Z(`${ee}/api/cron`)).json()}catch(e){throw console.error("Failed to fetch cron status:",e),e}}async function ma(){try{return await(await Z(`${ee}/api/generate`,{method:"POST"})).json()}catch(e){throw console.error("Failed to trigger generation:",e),e}}async function va(){try{return await(await Z(`${ee}/api/auth`)).json()}catch(e){throw console.error("Failed to fetch auth status:",e),e}}async function ya(){try{return await(await Z(`${ee}/api/auth/login`,{method:"POST"})).json()}catch(e){throw console.error("Failed to start login:",e),e}}async function ba(){try{return await(await Z(`${ee}/api/auth/login/status`)).json()}catch(e){throw console.error("Failed to poll login status:",e),e}}async function wa(){try{return await(await Z(`${ee}/api/auth/login/cancel`,{method:"POST"})).json()}catch(e){throw console.error("Failed to cancel login:",e),e}}async function xa(){try{return await(await Z(`${ee}/api/auth/logout`,{method:"POST"})).json()}catch(e){throw console.error("Failed to logout:",e),e}}async function _a(){try{return await(await Z(`${ee}/api/username`)).json()}catch(e){throw console.error("Failed to fetch username info:",e),e}}async function Sa(e){try{return await(await Z(`${ee}/api/username/claim`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e})})).json()}catch(t){throw console.error("Failed to claim username:",t),t}}Object.assign(window,{fetchWithRetry:Z,getStatus:ia,getStories:ra,getConfig:la,updateConfig:aa,getRepos:ca,addRepo:da,removeRepo:ua,pauseRepo:fa,resumeRepo:pa,renameRepo:ha,getCronStatus:ga,triggerGeneration:ma,getAuthStatus:va,startLogin:ya,pollLoginStatus:ba,cancelLogin:wa,logout:xa,getUsernameInfo:_a,claimUsername:Sa});class ni{constructor(){this.state={stories:[],repos:[],config:null,cronStatus:null,currentRepo:"all",searchQuery:"",currentMainView:"stories",currentSettingsTab:"form",configDirty:!1,previousView:"view-main"},this.subscribers=[]}get(t){return t?this.state[t]:this.state}update(t,s){const n=this.state[t];this.state[t]=s,this.subscribers.forEach(o=>o(t,s,n))}batchUpdate(t){Object.entries(t).forEach(([s,n])=>{this.state[s]=n}),this.subscribers.forEach(s=>s("batch",t,null))}subscribe(t){return this.subscribers.push(t),()=>{const s=this.subscribers.indexOf(t);s>-1&&this.subscribers.splice(s,1)}}reset(){this.state={stories:[],repos:[],config:null,cronStatus:null,currentRepo:"all",searchQuery:"",currentMainView:"stories",currentSettingsTab:"form",configDirty:!1,previousView:"view-main"},this.subscribers.forEach(t=>t("reset",this.state,null))}}const Bt=new ni;Bt.initRouter=function(){window.addEventListener("popstate",e=>{const t=e.state;if(!t){Bt.update("currentMainView","stories"),switchMainView("stories",!1),zn();return}t.view==="detail"&&t.storyId?Bt.get("stories").find(o=>o.id===t.storyId)&&openStory(null,t.storyId,!1):t.view==="profile"&&t.repoName?openProfile(null,t.repoName,!1):t.view==="user"&&t.authorName?openUser(null,t.authorName,t.authorEmail||"",!1):t.view==="main"&&(zn(),t.mainView&&switchMainView(t.mainView,!1))})};Bt.pushHistory=function(e,t,s){history.pushState(e,t,s)};function zn(){document.getElementById("view-main").style.display=""}window.store=Bt;window.State=ni;const Us="repr-dashboard-theme";function ka(){const e=localStorage.getItem(Us);if(e)At(e);else{const t=window.matchMedia("(prefers-color-scheme: dark)").matches;At(t?"dark":"light")}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{localStorage.getItem(Us)||At(t.matches?"dark":"light")})}function At(e){document.documentElement.setAttribute("data-theme",e),oi(e)}function Ca(){const t=document.documentElement.getAttribute("data-theme")==="dark"?"light":"dark";At(t),localStorage.setItem(Us,t),showToast(`${t==="dark"?"Dark":"Light"} mode enabled`,"success")}function Ea(){return document.documentElement.getAttribute("data-theme")||"light"}function oi(e){const t=document.getElementById("theme-toggle");if(t){const s=t.querySelector(".theme-toggle-icon");s&&(s.textContent=e==="dark"?"☀":"☾")}}window.toggleTheme=Ca;Object.assign(window,{initTheme:ka,setTheme:At,getTheme:Ea,updateThemeToggleIcon:oi});let me=-1,ss=!1;function Ta(){document.addEventListener("keydown",Ia)}function Ia(e){if((e.metaKey||e.ctrlKey)&&e.key==="k"){e.preventDefault(),Yn();return}if(e.target.tagName==="INPUT"||e.target.tagName==="TEXTAREA"){if(e.key==="Escape"){e.target.blur();return}return}if(ss){(e.key==="Escape"||e.key==="?")&&(ri(),e.preventDefault());return}switch(e.key){case"/":e.preventDefault(),Yn();break;case"j":e.preventDefault(),$a();break;case"k":e.preventDefault(),Ba();break;case"Enter":me>=0&&(e.preventDefault(),Aa());break;case"Escape":e.preventDefault(),Fa();break;case"r":case"R":e.preventDefault(),refreshStories();break;case"?":e.preventDefault(),Ma();break}}function Yn(){const e=document.getElementById("search-input");e&&(e.focus(),showToast("Search focused (type to filter, Esc to clear)","success"))}function $a(){const e=us();e.length&&(me=Math.min(me+1,e.length-1),ii(e))}function Ba(){const e=us();e.length&&(me=Math.max(me-1,0),ii(e))}function us(){return Array.from(document.querySelectorAll(".post-card"))}function ii(e){e.forEach((t,s)=>{t.classList.toggle("selected",s===me),s===me&&t.scrollIntoView({behavior:"smooth",block:"center"})})}function Aa(){const e=us();if(me>=0&&me<e.length){const s=e[me].id.replace("post-","");s&&openStory({stopPropagation:()=>{}},s)}}function Fa(){const e=document.getElementById("view-detail"),t=document.getElementById("view-profile");if((e==null?void 0:e.style.display)!=="none"||(t==null?void 0:t.style.display)!=="none"){goBack();return}const s=document.getElementById("search-input");if(s&&s.value){s.value="",store.update("searchQuery",""),filterAndRenderStories();return}me>=0&&(me=-1,us().forEach(o=>o.classList.remove("selected")))}function Ma(){if(ss)return;ss=!0;const e=document.createElement("div");e.id="keyboard-shortcuts-modal",e.className="keyboard-modal",e.innerHTML=`
|
|
22
|
+
<div class="keyboard-modal-backdrop" onclick="hideKeyboardShortcuts()"></div>
|
|
23
|
+
<div class="keyboard-modal-content">
|
|
24
|
+
<div class="keyboard-modal-header">
|
|
25
|
+
<h3>Keyboard Shortcuts</h3>
|
|
26
|
+
<button class="keyboard-modal-close" onclick="hideKeyboardShortcuts()">×</button>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="keyboard-shortcuts-list">
|
|
29
|
+
<div class="shortcut-row">
|
|
30
|
+
<kbd>/</kbd>
|
|
31
|
+
<span>Focus search</span>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="shortcut-row">
|
|
34
|
+
<kbd>j</kbd>
|
|
35
|
+
<span>Next story</span>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="shortcut-row">
|
|
38
|
+
<kbd>k</kbd>
|
|
39
|
+
<span>Previous story</span>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="shortcut-row">
|
|
42
|
+
<kbd>Enter</kbd>
|
|
43
|
+
<span>Open selected story</span>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="shortcut-row">
|
|
46
|
+
<kbd>Esc</kbd>
|
|
47
|
+
<span>Close / Clear search / Reset</span>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="shortcut-row">
|
|
50
|
+
<kbd>r</kbd>
|
|
51
|
+
<span>Refresh stories</span>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="shortcut-row">
|
|
54
|
+
<kbd>?</kbd>
|
|
55
|
+
<span>Show this help</span>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
`,document.body.appendChild(e)}function ri(){const e=document.getElementById("keyboard-shortcuts-modal");e&&(e.remove(),ss=!1)}Object.assign(window,{initKeyboard:Ta,hideKeyboardShortcuts:ri});const $s=[{id:"mock-new-1",repo_name:"repr",author_name:"Mendrika Ramarlina",handle:"pumpfun-trader",verified:!0,signature_status:"all_verified",signed_count:5,total_commits:5,category:"feature",title:"Integrate real-time monitoring system with 6-stage pipeline",problem:"The system lacked real-time market tracking and structured lifecycle management for tokens beyond the initial screening phase.",approach:`Before:
|
|
60
|
+
[Screening]
|
|
61
|
+
|
|
62
|
+
After:
|
|
63
|
+
[Helius WS] --> [Bonding Stream]
|
|
64
|
+
|
|
|
65
|
+
v
|
|
66
|
+
[SQLite DB] <--- [Monitor Service]
|
|
67
|
+
|
|
|
68
|
+
v
|
|
69
|
+
[Dashboard] <--- [Socket.io]`,created_at:new Date(Date.now()-1e3*60*60*24).toISOString(),technologies:["websockets","socket.io","sqlite"],diagram:"const STAGES = ['screening', 'monitoring', 'post-graduation', 'entry-watch', 'holding', 'dropped'];",files:["src/monitor.ts","src/pipeline.ts"]},{id:"mock-new-2",repo_name:"repr-dashboard",author_name:"Mendrika Ramarlina",handle:"pumpfun-trader",verified:!0,category:"feature",title:"SSE-powered screening dashboard",problem:"The long-running screening process was opaque, and there was no interface to view enriched data.",created_at:new Date(Date.now()-1e3*60*60*25).toISOString(),technologies:["server-sent-events(sse)","express.js","rest-api"],files:["dashboard/server.js"]},{id:"mock-1",repo_name:"cli",author_name:"mendrika",verified:!0,signature_status:"all_verified",signed_count:3,total_commits:3,category:"feature",title:"Restore dashboard diff functionality and improve branch suggestions",problem:"The dashboard lacked diff visualization, and internal models required refactoring to support better branch suggestions.",approach:"Executed a refactor of core data models and synthesis logic to improve code representation, then restored the diff view in the dashboard.",created_at:new Date(Date.now()-1e3*60*60*2).toISOString(),technologies:["Python","SQLite","Jinja2"],lessons:["Separating the 'Synthesis' logic from the 'Presentation' logic made the diff rendering 3x faster."],files:["src/dashboard.py","templates/index.html"],implementation_details:["Refactored `DiffGenerator` class to handle binary files gracefully.","Updated Jinja2 templates to loop through file deltas.","Added caching layer for diffs larger than 1MB."],key_snippets:[{file_path:"src/dashboard.py",line_count:15,content:`def get_diff(self, file_path):
|
|
70
|
+
# Check cache first
|
|
71
|
+
if file_path in self.cache:
|
|
72
|
+
return self.cache[file_path]
|
|
73
|
+
|
|
74
|
+
# Generate diff
|
|
75
|
+
diff = git.diff(file_path)
|
|
76
|
+
return diff`}]},{id:"mock-2",repo_name:"repr",author_name:"johndoe",verified:!1,signature_status:"unsigned",signed_count:0,total_commits:2,category:"chore",title:"docs: update CLI usage messages for clarity",problem:"The previous usage messages were too generic and lacked context for specific arguments.",approach:"Updated help strings in Typer/Click definitions to include examples.",created_at:new Date(Date.now()-1e3*60*60*5).toISOString(),technologies:["Python","Typer"],files:["cli/main.py"]},{id:"mock-3",repo_name:"agent-core",author_name:"alice",verified:!1,signature_status:"partially_signed",signed_count:2,total_commits:4,category:"bugfix",title:"Fix memory leak in background worker",problem:"The worker process was consuming increasing RAM over long execution periods.",approach:"Identified a circular reference in the Task object. Implemented weak references for parent links.",created_at:new Date(Date.now()-1e3*60*60*24).toISOString(),technologies:["Rust","Tokio"],diagram:`Task -> (strong) -> Context -> (strong) -> Task [LEAK]
|
|
77
|
+
|
|
78
|
+
Fix:
|
|
79
|
+
Task -> (strong) -> Context -> (weak) -> Task`}];async function li(){Va();try{const[i,l]=await Promise.all([getStatus(),getStories(),window.loadRepos?window.loadRepos():Promise.resolve()]);document.getElementById("status-text").innerText=`${i.count} stories · ${i.repos} repos`,store.update("stories",l.stories),Qn(l.stories,i.repos)}catch(i){console.warn("Using mock data:",i),store.update("stories",$s),document.getElementById("status-text").innerText=`${$s.length} stories · Demo Mode`,Qn($s,3)}Oa(),Ra(),fs(),store.initRouter&&store.initRouter();const e=new URLSearchParams(window.location.search),t=e.get("view"),s=e.get("profile"),n=e.get("user"),o=e.get("story");o?ai(null,o,!1):s?ci(null,s,!1):n?di(null,decodeURIComponent(n),"",!1):t&&["stories","settings","llm","privacy","repos","cron"].includes(t)&&switchMainView(t,!1)}function Qn(e,t){const s=document.getElementById("stat-total-stories"),n=document.getElementById("stat-total-repos");s&&(s.textContent=e.length),n&&(n.textContent=t)}function Ra(){const e=document.getElementById("recommended-repos");if(!e)return;const t=store.get("repos")||[],s=document.getElementById("show-more-repos-btn");if(t.length===0){e.innerHTML='<div class="loading-text">No repositories tracked</div>',s&&(s.style.display="none");return}const n=[...t].sort((o,i)=>{var d,p;const l=((d=o.project)==null?void 0:d.name)||o.path.split("/").pop(),a=((p=i.project)==null?void 0:p.name)||i.path.split("/").pop();return l.localeCompare(a)});s&&(s.style.display=n.length>3?"block":"none",e.classList.remove("expanded"),s.textContent="Show more"),e.innerHTML=n.map(o=>{var f;const i=((f=o.project)==null?void 0:f.name)||o.origin_name||o.path.split("/").pop(),l=stringToColor(i),a=i.substring(0,1).toUpperCase(),p=(store.get("stories")||[]).filter(w=>w.repo_name===i).length;return`
|
|
80
|
+
<div class="widget-item" onclick="openProfile(event, '${escapeHtml(i)}')">
|
|
81
|
+
<div class="widget-item-avatar" style="background: ${l}">${a}</div>
|
|
82
|
+
<div class="widget-item-info">
|
|
83
|
+
<div class="widget-item-name">${escapeHtml(i)}</div>
|
|
84
|
+
<div class="widget-item-subtitle">${p} stories</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
`}).join("")}function Pa(){const e=document.getElementById("recommended-repos"),t=document.getElementById("show-more-repos-btn");!e||!t||(e.classList.toggle("expanded"),e.classList.contains("expanded")?t.textContent="Show less":t.textContent="Show more")}function Oa(){const e=document.getElementById("repo-tabs");if(!e)return;store.get("stories");const t={};let s='<div class="repo-tab active" data-repo="all">All</div>';Object.entries(t).sort((n,o)=>o[1]-n[1]).forEach(([n,o])=>{s+=`<div class="repo-tab" data-repo="${n}">${n}</div>`}),e.innerHTML=s,e.querySelectorAll(".repo-tab").forEach(n=>{n.onclick=()=>{e.querySelectorAll(".repo-tab").forEach(o=>o.classList.remove("active")),n.classList.add("active"),store.update("currentRepo",n.dataset.repo),fs()}})}function fs(){const e=store.get("stories"),t=store.get("currentRepo"),s=store.get("searchQuery");let n=e;t!=="all"&&(n=n.filter(o=>o.repo_name===t)),s&&(n=n.filter(o=>[o.title,o.repo_name,o.category,o.post_body,o.problem,o.approach,...o.technologies||[],...o.files||[]].join(" ").toLowerCase().includes(s))),ps(n)}function Da(e){const t=new Date,s=new Date(e),n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),o=new Date(s.getFullYear(),s.getMonth(),s.getDate()),i=Math.floor((n-o)/(1e3*60*60*24));if(i===0)return"Today";if(i===1)return"Yesterday";if(i<7)return"This Week";const l={month:"short",day:"numeric"};return s.getFullYear()!==t.getFullYear()&&(l.year="numeric"),s.toLocaleDateString("en-US",l)}function ja(e){const t={};e.forEach(o=>{const i=o.started_at||o.created_at,l=Da(i);t[l]||(t[l]=[]),t[l].push(o)});const s=["Today","Yesterday","This Week"],n=Object.keys(t).sort((o,i)=>{const l=s.indexOf(o),a=s.indexOf(i);return l!==-1&&a!==-1?l-a:l!==-1?-1:a!==-1?1:new Date(t[i][0].started_at||t[i][0].created_at)-new Date(t[o][0].started_at||t[o][0].created_at)});return{groups:t,labels:n}}function ps(e,t="feed",s={}){const n=document.getElementById(t),o=store.get("searchQuery");if(!e||!e.length){o?n.innerHTML=`
|
|
88
|
+
<div class="empty-state">
|
|
89
|
+
<div class="empty-state-title">No matches found</div>
|
|
90
|
+
<div style="font-size: 14px;">Try adjusting your search query or filters</div>
|
|
91
|
+
<button class="btn btn-secondary" onclick="document.getElementById('search-input').value=''; store.update('searchQuery', ''); filterAndRenderStories();" style="margin-top: 16px;">Clear Search</button>
|
|
92
|
+
</div>`:n.innerHTML=`
|
|
93
|
+
<div class="empty-state">
|
|
94
|
+
<div class="empty-state-title">Your timeline is empty</div>
|
|
95
|
+
<div style="font-size: 14px;">Run your first generation to see your development story</div>
|
|
96
|
+
<button class="btn btn-primary" onclick="triggerGenerationClick()" style="margin-top: 16px;">Generate Now</button>
|
|
97
|
+
</div>`;return}if(o){n.innerHTML=e.map(d=>Xn(d,o,s)).join("");return}const{groups:i,labels:l}=ja(e);let a="";l.forEach(d=>{const p=i[d];a+=`
|
|
98
|
+
<div class="date-header">
|
|
99
|
+
<span class="date-header-label">${d}</span>
|
|
100
|
+
</div>
|
|
101
|
+
${p.map(f=>Xn(f,o,s)).join("")}
|
|
102
|
+
`}),n.innerHTML=a}function Xn(e,t,s={}){const n=timeSince(new Date(e.started_at||e.created_at)),o=e.category||"chore",i=e.repo_name||"cli";let l=e.author_name||e.username||"unknown";const a=e.verified||!1;highlightText(cleanTitle(e.title),t),e.post_body&&highlightText(e.post_body,t);const d=e.problem?highlightText(e.problem,t):"",p=e.approach?highlightText(e.approach,t):"";let f=stringToColor(l),w=l.substring(0,1).toUpperCase(),T=highlightText(l,t),m=e.handle?`/r/${e.handle}`:`/r/${i}`;const h=a?'<span class="verified-badge" title="GPG signed commits">✓</span>':"",g=e.author_email||"",x=g?un(g,80):null,y=x?`<img src="${x}" alt="${escapeHtml(l)}" style="width:100%;height:100%;border-radius:50%;object-fit:cover;">`:w,v=[];e.technologies&&e.technologies.length&&e.technologies.slice(0,3).forEach(z=>v.push(z.toLowerCase().replace(/\s+/g,"")));const F=v.length?v.map(z=>`<span class="hashtag" onclick="filterByTag(event, '${z}')">#${highlightText(z,t)}</span>`).join(" "):"",E=p||d;let O="";return e.diagram&&(O+=`<div class="post-media"><pre class="post-diagram">${escapeHtml(e.diagram)}</pre></div>`),e.show&&(O+=`<div class="post-media"><pre class="post-output">${escapeHtml(e.show)}</pre></div>`),`
|
|
103
|
+
<article class="post-card" id="post-${e.id}" onclick="openStory(event, '${e.id}')">
|
|
104
|
+
<div class="post-card-header">
|
|
105
|
+
<div class="post-avatar" style="background:${x?"transparent":f}; cursor: pointer;" onclick="openUser(event, '${escapeHtml(e.author_name||l)}', '${escapeHtml(g)}')">${y}</div>
|
|
106
|
+
<div class="post-header-info">
|
|
107
|
+
<div class="post-header-author">
|
|
108
|
+
<span class="post-author" onclick="openUser(event, '${escapeHtml(e.author_name||l)}', '${escapeHtml(e.author_email||"")}')">${T}${h}</span>
|
|
109
|
+
<span class="post-meta-sep">·</span>
|
|
110
|
+
<span class="post-handle" onclick="openProfile(event, '${i}')">${m}</span>
|
|
111
|
+
<span class="post-meta-sep">·</span>
|
|
112
|
+
<span class="category-meta ${o}">${o}</span>
|
|
113
|
+
<span class="post-meta-sep">·</span>
|
|
114
|
+
<span class="post-time">${n}</span>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<div class="post-content-full">
|
|
120
|
+
<div class="post-text">${E?`${E}`:""}</div>
|
|
121
|
+
${O}
|
|
122
|
+
${F?`<div class="post-tags">${F}</div>`:""}
|
|
123
|
+
<div class="post-actions">
|
|
124
|
+
<div class="post-action" title="Comment">
|
|
125
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
126
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
|
127
|
+
</svg>
|
|
128
|
+
<span></span>
|
|
129
|
+
</div>
|
|
130
|
+
<div class="post-action" title="Repost">
|
|
131
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
132
|
+
<polyline points="17 1 21 5 17 9"></polyline>
|
|
133
|
+
<path d="M3 11V9a4 4 0 0 1 4-4h14"></path>
|
|
134
|
+
<polyline points="7 23 3 19 7 15"></polyline>
|
|
135
|
+
<path d="M21 13v2a4 4 0 0 1-4 4H3"></path>
|
|
136
|
+
</svg>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="post-action" title="Like">
|
|
139
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
140
|
+
<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>
|
|
141
|
+
</svg>
|
|
142
|
+
</div>
|
|
143
|
+
<div class="post-action" title="Share">
|
|
144
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
145
|
+
<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path>
|
|
146
|
+
<polyline points="16 6 12 2 8 6"></polyline>
|
|
147
|
+
<line x1="12" y1="2" x2="12" y2="15"></line>
|
|
148
|
+
</svg>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</article >
|
|
153
|
+
`}function ai(e,t,s=!0){const o=store.get("stories").find(D=>D.id===t);if(!o)return;s&&(window.lastScrollY=window.scrollY,document.getElementById("view-profile").style.display==="block"?store.update("previousView","view-profile"):document.getElementById("view-user").style.display==="block"?store.update("previousView","view-user"):store.update("previousView","view-main"),store.pushHistory({view:"detail",storyId:t},`Repr - ${cleanTitle(o.title)} `,` ? story = ${t} `)),["stories","settings","llm","privacy","repos","cron","profile","user"].forEach(D=>{const Q=document.getElementById("view-"+D);Q&&(Q.style.display="none")}),document.getElementById("view-detail").style.display="block",window.scrollTo(0,0);const i=document.getElementById("detail-content"),l=timeSince(new Date(o.started_at||o.created_at)),a=o.category||"update",d=o.repo_name||"cli",p=o.author_name||o.username||"unknown",f=o.verified||!1,w=cleanTitle(o.title),T=f?'<span class="verified-badge" title="GPG signed commits">✓</span>':"";o.signature_status&&(f||o.signature_status,o.signed_count!==void 0&&`${o.signed_count}${o.total_commits}`),o.technologies&&o.technologies.length&&`${o.technologies.map(D=>`<span class="skill-tag">${escapeHtml(D)}</span>`).join("")}`;const m=o.show?`<div class="snippet-block" style="margin-top:16px"><div class="snippet-header">Output</div><div class="snippet-code"><pre>${escapeHtml(o.show)}</pre></div></div>`:"",h=o.diagram?`<div class="diagram-block"><pre>${escapeHtml(o.diagram)}</pre></div>`:"",g=o.files&&o.files.length?`<div class="section-subtitle">Files Touched</div>
|
|
154
|
+
<div class="files-row">
|
|
155
|
+
${o.files.map(D=>`<span class="file-tag">${escapeHtml(D.split("/").pop())}</span>`).join("")}
|
|
156
|
+
</div>`:"",x=o.key_snippets&&o.key_snippets.length?`<div class="section-subtitle">Key Snippets</div>
|
|
157
|
+
${o.key_snippets.map(D=>`
|
|
158
|
+
<div class="snippet-block">
|
|
159
|
+
<div class="snippet-header">${escapeHtml(D.file_path)}</div>
|
|
160
|
+
<div class="snippet-code"><pre>${escapeHtml(D.content)}</pre></div>
|
|
161
|
+
</div>
|
|
162
|
+
`).join("")} `:"",y=o.file_changes&&o.file_changes.length?`<div class="section-subtitle">File Changes</div>
|
|
163
|
+
<ul style="padding-left:16px; color:var(--text-secondary); font-size:15px; margin-bottom: 24px; list-style: none;">
|
|
164
|
+
${o.file_changes.map(D=>{const Q=D.file_path||D.path||"unknown",tt=D.change_type||"modified",we=D.insertions||0,Le=D.deletions||0,Ae=[];we>0&&Ae.push(`<span style="color: var(--green);">+${we}</span>`),Le>0&&Ae.push(`<span style="color: var(--red);">-${Le}</span>`);const st=Ae.length>0?Ae.join("/"):"0 changes";return`<li style="margin-bottom: 4px; font-family: var(--font-mono); font-size: 13px;">
|
|
165
|
+
<span style="color: var(--text-muted);">[${tt}]</span> ${escapeHtml(Q.split("/").pop())}
|
|
166
|
+
<span style="margin-left: 8px; font-size: 12px;">${st}</span>
|
|
167
|
+
</li>`}).join("")}
|
|
168
|
+
</ul>`:"",v=stringToColor(p),F=p.substring(0,2).toUpperCase(),E=o.author_email||"",O=un(E,96),z=O?`<img src="${O}" alt="${escapeHtml(p)}" style="width:100%;height:100%;border-radius:50%;object-fit:cover;">`:F;i.innerHTML=`
|
|
169
|
+
<div class="post-detail" >
|
|
170
|
+
<div class="post-detail-header">
|
|
171
|
+
<div class="post-avatar" style="background:${O?"transparent":v}; width: 48px; height: 48px; font-size: 18px;" onclick="openUser(event, '${escapeHtml(p)}', '${escapeHtml(E)}')">${z}</div>
|
|
172
|
+
<div class="post-detail-author-info">
|
|
173
|
+
<div class="post-author" onclick="openUser(event, '${escapeHtml(p)}', '${escapeHtml(E)}')" style="font-size: 16px;">${escapeHtml(p)}${T}</div>
|
|
174
|
+
<div class="post-handle" onclick="openProfile(event, '${d}')" style="font-size: 15px;">@${d} · ${l}</div>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="post-detail-category">
|
|
177
|
+
<span class="category ${a}">${a}</span>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<div class="post-detail-body">
|
|
182
|
+
<h1 class="post-detail-title">${escapeHtml(w)}</h1>
|
|
183
|
+
${o.problem?`<div class="post-detail-text" style="font-size: 18px; color: var(--text-primary); margin-bottom: 24px;">${escapeHtml(o.problem)}</div>`:""}
|
|
184
|
+
${o.post_body?`<div class="post-detail-text" style="font-size: 18px; color: var(--text-primary); margin-bottom: 24px; line-height: 1.6;">${escapeHtml(o.post_body)}</div>`:""}
|
|
185
|
+
|
|
186
|
+
${o.what?`<div class="section-subtitle">What</div><div class="post-detail-text" style="font-size: 16px;">${escapeHtml(o.what)}</div>`:""}
|
|
187
|
+
${o.value?`<div class="section-subtitle">Value</div><div class="post-detail-text" style="font-size: 16px;">${escapeHtml(o.value)}</div>`:""}
|
|
188
|
+
|
|
189
|
+
${o.decisions&&o.decisions.length?`
|
|
190
|
+
<div class="section-subtitle">Decisions</div>
|
|
191
|
+
<ul class="detail-list">
|
|
192
|
+
${o.decisions.map(D=>`<li>${escapeHtml(D)}</li>`).join("")}
|
|
193
|
+
</ul>
|
|
194
|
+
`:""}
|
|
195
|
+
|
|
196
|
+
${o.insight?`
|
|
197
|
+
<div class="insight-box" style="margin-top: 24px;">
|
|
198
|
+
<div class="insight-label">Insight</div>
|
|
199
|
+
<div class="insight-text">${escapeHtml(o.insight)}</div>
|
|
200
|
+
</div>
|
|
201
|
+
`:""}
|
|
202
|
+
|
|
203
|
+
${m}
|
|
204
|
+
${h}
|
|
205
|
+
|
|
206
|
+
${o.lessons&&o.lessons.length?`
|
|
207
|
+
<div class="insight-box" style="margin-top: 32px;">
|
|
208
|
+
<div class="insight-label">Key Insight</div>
|
|
209
|
+
${o.lessons.map(D=>`<div class="insight-text">${escapeHtml(D)}</div>`).join("")}
|
|
210
|
+
</div>
|
|
211
|
+
`:""}
|
|
212
|
+
|
|
213
|
+
${o.implementation_details&&o.implementation_details.length?`
|
|
214
|
+
<div class="section-subtitle">Implementation</div>
|
|
215
|
+
<ul class="detail-list">
|
|
216
|
+
${o.implementation_details.map(D=>`<li>${escapeHtml(D)}</li>`).join("")}
|
|
217
|
+
</ul>
|
|
218
|
+
`:""}
|
|
219
|
+
|
|
220
|
+
${g}
|
|
221
|
+
${x}
|
|
222
|
+
${y}
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
<div class="post-detail-footer">
|
|
226
|
+
<div class="post-actions" style="max-width: none; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 32px;">
|
|
227
|
+
<!-- Same actions as card -->
|
|
228
|
+
<div class="post-action">
|
|
229
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/></svg>
|
|
230
|
+
<span>${o.total_commits||""}</span>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="post-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg></div>
|
|
233
|
+
<div class="post-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg></div>
|
|
234
|
+
<div class="post-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line></svg></div>
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
`}function ci(e,t,s=!0){e&&e.stopPropagation(),s&&(window.lastScrollY=window.scrollY,store.update("previousView","view-profile"),store.pushHistory({view:"profile",repoName:t},`Repr - @${t} `,` ? profile = ${t} `)),["stories","settings","llm","privacy","repos","cron","detail","user"].forEach(h=>{const g=document.getElementById("view-"+h);g&&(g.style.display="none")}),document.getElementById("view-profile").style.display="block",window.scrollTo(0,0);const n=stringToColor(t),o=t.substring(0,1).toUpperCase(),i=document.getElementById("profile-view-avatar");i.style.background=n,i.textContent=o,document.getElementById("profile-view-name").textContent=t,document.getElementById("profile-nav-name").textContent=t,document.getElementById("profile-view-handle").textContent="@"+t;const l=Math.abs(stringToColor(t+"1").hashCode()||0)%360,a=Math.abs(stringToColor(t+"2").hashCode()||0)%360;document.getElementById("profile-cover").style.background=`linear - gradient(135deg, hsl(${l}, 70 %, 80 %) 0 %, hsl(${a}, 70 %, 85 %) 100 %)`;const p=store.get("stories").filter(h=>h.repo_name===t),f=p.reduce((h,g)=>h+(g.total_commits||0),0),w=new Set(p.map(h=>h.author_name)).size;document.getElementById("profile-stories-count").textContent=p.length,document.getElementById("profile-commits-count").textContent=f,document.getElementById("profile-contributors-count").textContent=w,document.getElementById("profile-stats-count").textContent=`+ ${w} contributors`;const T=p[0],m=T?timeSince(new Date(T.started_at||T.created_at)):"a while ago";document.getElementById("profile-view-bio").textContent=`Repository tracked by Repr.Active ${m}. Contains ${p.length} stories.`,ps(p,"profile-feed",{})}function La(e){function t(v,F){return v<<F|v>>>32-F}function s(v,F){const E=(v&65535)+(F&65535);return(v>>16)+(F>>16)+(E>>16)<<16|E&65535}function n(v,F,E){return v&F|~v&E}function o(v,F,E){return v&E|F&~E}function i(v,F,E){return v^F^E}function l(v,F,E){return F^(v|~E)}function a(v,F,E,O,z,D,Q){return s(t(s(s(v,n(F,E,O)),s(z,Q)),D),F)}function d(v,F,E,O,z,D,Q){return s(t(s(s(v,o(F,E,O)),s(z,Q)),D),F)}function p(v,F,E,O,z,D,Q){return s(t(s(s(v,i(F,E,O)),s(z,Q)),D),F)}function f(v,F,E,O,z,D,Q){return s(t(s(s(v,l(F,E,O)),s(z,Q)),D),F)}function w(v){const F=(v.length+8>>6)+1,E=Array(F*16).fill(0);for(let O=0;O<v.length;O++)E[O>>2]|=v.charCodeAt(O)<<O%4*8;return E[v.length>>2]|=128<<v.length%4*8,E[F*16-2]=v.length*8,E}function T(v){let F="";for(let E=0;E<4;E++)F+=(v>>E*8&255).toString(16).padStart(2,"0");return F}const m=w(e);let h=1732584193,g=4023233417,x=2562383102,y=271733878;for(let v=0;v<m.length;v+=16){const F=h,E=g,O=x,z=y;h=a(h,g,x,y,m[v],7,3614090360),y=a(y,h,g,x,m[v+1],12,3905402710),x=a(x,y,h,g,m[v+2],17,606105819),g=a(g,x,y,h,m[v+3],22,3250441966),h=a(h,g,x,y,m[v+4],7,4118548399),y=a(y,h,g,x,m[v+5],12,1200080426),x=a(x,y,h,g,m[v+6],17,2821735955),g=a(g,x,y,h,m[v+7],22,4249261313),h=a(h,g,x,y,m[v+8],7,1770035416),y=a(y,h,g,x,m[v+9],12,2336552879),x=a(x,y,h,g,m[v+10],17,4294925233),g=a(g,x,y,h,m[v+11],22,2304563134),h=a(h,g,x,y,m[v+12],7,1804603682),y=a(y,h,g,x,m[v+13],12,4254626195),x=a(x,y,h,g,m[v+14],17,2792965006),g=a(g,x,y,h,m[v+15],22,1236535329),h=d(h,g,x,y,m[v+1],5,4129170786),y=d(y,h,g,x,m[v+6],9,3225465664),x=d(x,y,h,g,m[v+11],14,643717713),g=d(g,x,y,h,m[v],20,3921069994),h=d(h,g,x,y,m[v+5],5,3593408605),y=d(y,h,g,x,m[v+10],9,38016083),x=d(x,y,h,g,m[v+15],14,3634488961),g=d(g,x,y,h,m[v+4],20,3889429448),h=d(h,g,x,y,m[v+9],5,568446438),y=d(y,h,g,x,m[v+14],9,3275163606),x=d(x,y,h,g,m[v+3],14,4107603335),g=d(g,x,y,h,m[v+8],20,1163531501),h=d(h,g,x,y,m[v+13],5,2850285829),y=d(y,h,g,x,m[v+2],9,4243563512),x=d(x,y,h,g,m[v+7],14,1735328473),g=d(g,x,y,h,m[v+12],20,2368359562),h=p(h,g,x,y,m[v+5],4,4294588738),y=p(y,h,g,x,m[v+8],11,2272392833),x=p(x,y,h,g,m[v+11],16,1839030562),g=p(g,x,y,h,m[v+14],23,4259657740),h=p(h,g,x,y,m[v+1],4,2763975236),y=p(y,h,g,x,m[v+4],11,1272893353),x=p(x,y,h,g,m[v+7],16,4139469664),g=p(g,x,y,h,m[v+10],23,3200236656),h=p(h,g,x,y,m[v+13],4,681279174),y=p(y,h,g,x,m[v],11,3936430074),x=p(x,y,h,g,m[v+3],16,3572445317),g=p(g,x,y,h,m[v+6],23,76029189),h=p(h,g,x,y,m[v+9],4,3654602809),y=p(y,h,g,x,m[v+12],11,3873151461),x=p(x,y,h,g,m[v+15],16,530742520),g=p(g,x,y,h,m[v+2],23,3299628645),h=f(h,g,x,y,m[v],6,4096336452),y=f(y,h,g,x,m[v+7],10,1126891415),x=f(x,y,h,g,m[v+14],15,2878612391),g=f(g,x,y,h,m[v+5],21,4237533241),h=f(h,g,x,y,m[v+12],6,1700485571),y=f(y,h,g,x,m[v+3],10,2399980690),x=f(x,y,h,g,m[v+10],15,4293915773),g=f(g,x,y,h,m[v+1],21,2240044497),h=f(h,g,x,y,m[v+8],6,1873313359),y=f(y,h,g,x,m[v+15],10,4264355552),x=f(x,y,h,g,m[v+6],15,2734768916),g=f(g,x,y,h,m[v+13],21,1309151649),h=f(h,g,x,y,m[v+4],6,4149444226),y=f(y,h,g,x,m[v+11],10,3174756917),x=f(x,y,h,g,m[v+2],15,718787259),g=f(g,x,y,h,m[v+9],21,3951481745),h=s(h,F),g=s(g,E),x=s(x,O),y=s(y,z)}return T(h)+T(g)+T(x)+T(y)}function un(e,t=134){return e?`https://www.gravatar.com/avatar/${La(e.trim().toLowerCase())}?s=${t}&d=identicon`:null}function di(e,t,s,n=!0){e&&e.stopPropagation(),n&&(window.lastScrollY=window.scrollY,store.update("previousView","view-user"),store.pushHistory({view:"user",authorName:t},`Repr - ${t}`,`?user=${encodeURIComponent(t)}`)),["stories","settings","llm","privacy","repos","cron","detail","profile"].forEach(x=>{const y=document.getElementById("view-"+x);y&&(y.style.display="none")}),document.getElementById("view-user").style.display="block",window.scrollTo(0,0);const o=stringToColor(t),i=t.substring(0,1).toUpperCase(),l=document.getElementById("user-view-avatar"),a=un(s);a?(l.innerHTML=`<img src="${a}" alt="${escapeHtml(t)}" style="width:100%;height:100%;border-radius:50%;object-fit:cover;">`,l.style.background="transparent"):(l.innerHTML=i,l.style.background=o),document.getElementById("user-view-name").textContent=t,document.getElementById("user-nav-name").textContent=t,document.getElementById("user-view-handle").textContent="@"+t.toLowerCase().replace(/\s+/g,"");const d=Math.abs((t+"1").hashCode()||0)%360,p=Math.abs((t+"2").hashCode()||0)%360;document.getElementById("user-cover").style.background=`linear-gradient(135deg, hsl(${d}, 60%, 75%) 0%, hsl(${p}, 60%, 80%) 100%)`;const w=store.get("stories").filter(x=>x.author_name===t),T=w.reduce((x,y)=>x+(y.total_commits||0),0),m=new Set(w.map(x=>x.repo_name)).size;document.getElementById("user-stories-count").textContent=w.length,document.getElementById("user-commits-count").textContent=T,document.getElementById("user-contributors-count").textContent=m,document.getElementById("user-stats-count").textContent=`+${m} repos`;const h=w[0],g=h?timeSince(new Date(h.started_at||h.created_at)):"a while ago";document.getElementById("user-view-bio").textContent=`Developer tracked by Repr. Active ${g}. ${w.length} stories across ${m} repositories.`,ps(w,"user-feed",{})}String.prototype.hashCode=function(){let e=0,t,s;if(this.length===0)return e;for(t=0;t<this.length;t++)s=this.charCodeAt(t),e=(e<<5)-e+s,e|=0;return e};function Ha(){const e=document.getElementById("view-profile"),t=document.getElementById("view-user"),s=document.getElementById("view-detail");e&&(e.style.display="none"),t&&(t.style.display="none"),s&&(s.style.display="none"),document.getElementById("view-stories").style.display="block",history.replaceState({view:"main",mainView:"stories"},"Repr",window.location.pathname),window.lastScrollY&&window.scrollTo(0,window.lastScrollY)}async function Na(){showToast("Refreshing...","success"),await li()}async function Ua(){if(confirm("Start generating stories now? This will run in the background."))try{(await triggerGeneration()).success?showToast("Generation started","success"):showToast("Failed to start generation","error")}catch{showToast("Error triggering generation","error")}}function Va(e="feed",t=3){const s=document.getElementById(e);if(!s)return;let n="";for(let o=0;o<t;o++)n+=`
|
|
239
|
+
<div class="skeleton-card">
|
|
240
|
+
<div class="skeleton-avatar skeleton"></div>
|
|
241
|
+
<div class="skeleton-body">
|
|
242
|
+
<div class="skeleton-header skeleton"></div>
|
|
243
|
+
<div class="skeleton-title skeleton"></div>
|
|
244
|
+
<div class="skeleton-text skeleton"></div>
|
|
245
|
+
<div class="skeleton-text skeleton" style="width: 60%"></div>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
`;s.innerHTML=n}function Ka(e,t){e&&e.stopPropagation();const s=document.getElementById("search-input");s.value=t,store.update("searchQuery",t.toLowerCase()),fs(),switchMainView("stories",!1)}window.openStory=ai;window.openProfile=ci;window.openUser=di;window.filterByTag=Ka;window.triggerGenerationClick=Ua;window.goBack=Ha;window.refreshStories=Na;window.toggleSubscribedRepos=Pa;Object.assign(window,{initStories:li,renderStories:ps,filterAndRenderStories:fs});function Wa(e,t=!0){store.update("currentMainView",e),t&&store.pushHistory({view:"main",mainView:e},`Repr - ${e.charAt(0).toUpperCase()+e.slice(1)}`,`?view=${e}`),document.querySelectorAll(".sidebar-item").forEach(o=>{o.classList.toggle("active",o.dataset.view===e)}),document.querySelectorAll(".mobile-nav-item").forEach(o=>{const i=o.querySelector("span:last-child").textContent.toLowerCase();o.classList.toggle("active",e.startsWith(i))}),document.querySelector(".sidebar").classList.contains("open")&&toggleSidebar(),["stories","settings","llm","privacy","repos","cron","detail","profile"].forEach(o=>{const i=document.getElementById("view-"+o);i&&(i.style.display="none")});const n=document.getElementById("view-"+e);n&&(n.style.display="block"),["settings","llm","privacy","cron"].includes(e)&&!store.get("config")&&ui(),e==="repos"&&loadRepos(),e==="cron"&&Qa()}function Ja(e){if(store.update("currentSettingsTab",e),document.querySelectorAll(".settings-nav-item").forEach(t=>{t.classList.toggle("active",t.dataset.tab===e)}),document.getElementById("settings-form").style.display=e==="form"?"block":"none",document.getElementById("settings-json").style.display=e==="json"?"block":"none",e==="json"){const t=store.get("config");t&&(document.getElementById("json-editor").value=JSON.stringify(t,null,2))}}async function ui(){try{const e=await getConfig();store.batchUpdate({config:e,configDirty:!1}),fi(e),document.getElementById("json-editor").value=JSON.stringify(e,null,2),gs()}catch{showToast("Failed to load config","error")}}function fi(e){var t,s,n,o,i,l,a,d,p,f,w,T,m,h,g,x,y,v,F;document.getElementById("llm-default").value=((t=e.llm)==null?void 0:t.default)||"local",document.getElementById("llm-local-provider").value=((s=e.llm)==null?void 0:s.local_provider)||"",document.getElementById("llm-local-model").value=((n=e.llm)==null?void 0:n.local_model)||"",document.getElementById("llm-local-url").value=((o=e.llm)==null?void 0:o.local_api_url)||"",document.getElementById("gen-batch-size").value=((i=e.generation)==null?void 0:i.batch_size)||5,document.getElementById("gen-max-commits").value=((l=e.generation)==null?void 0:l.max_commits_per_batch)||50,document.getElementById("gen-template").value=((a=e.generation)==null?void 0:a.default_template)||"resume",document.getElementById("gen-auto-hook").checked=((d=e.generation)==null?void 0:d.auto_generate_on_hook)||!1,document.getElementById("privacy-local-only").checked=((p=e.privacy)==null?void 0:p.lock_local_only)||!1,document.getElementById("privacy-redact-paths").checked=((f=e.llm)==null?void 0:f.cloud_redact_paths)!==!1,document.getElementById("privacy-redact-emails").checked=((w=e.llm)==null?void 0:w.cloud_redact_emails)||!1,document.getElementById("privacy-send-diffs").checked=((T=e.llm)==null?void 0:T.cloud_send_diffs)||!1,document.getElementById("privacy-visibility").value=((m=e.privacy)==null?void 0:m.profile_visibility)||"public",document.getElementById("cron-interval").value=((h=e.cron)==null?void 0:h.interval_hours)||4,document.getElementById("cron-min-commits").value=((g=e.cron)==null?void 0:g.min_commits)||3,document.getElementById("cron-installed").checked=((x=e.cron)==null?void 0:x.installed)||!1,document.getElementById("cron-paused").checked=((y=e.cron)==null?void 0:y.paused)||!1,Zn("default-paths-container",((v=e.settings)==null?void 0:v.default_paths)||["~/code"],"path"),Zn("skip-patterns-container",((F=e.settings)==null?void 0:F.skip_patterns)||[],"pattern")}function Ga(){const e=JSON.parse(JSON.stringify(store.get("config")));return e.llm=e.llm||{},e.llm.default=document.getElementById("llm-default").value,e.llm.local_provider=document.getElementById("llm-local-provider").value||null,e.llm.local_model=document.getElementById("llm-local-model").value||null,e.llm.local_api_url=document.getElementById("llm-local-url").value||null,e.generation=e.generation||{},e.generation.batch_size=parseInt(document.getElementById("gen-batch-size").value)||5,e.generation.max_commits_per_batch=parseInt(document.getElementById("gen-max-commits").value)||50,e.generation.default_template=document.getElementById("gen-template").value,e.generation.auto_generate_on_hook=document.getElementById("gen-auto-hook").checked,e.privacy=e.privacy||{},e.privacy.lock_local_only=document.getElementById("privacy-local-only").checked,e.privacy.profile_visibility=document.getElementById("privacy-visibility").value,e.llm.cloud_redact_paths=document.getElementById("privacy-redact-paths").checked,e.llm.cloud_redact_emails=document.getElementById("privacy-redact-emails").checked,e.llm.cloud_send_diffs=document.getElementById("privacy-send-diffs").checked,e.cron=e.cron||{},e.cron.interval_hours=parseInt(document.getElementById("cron-interval").value)||4,e.cron.min_commits=parseInt(document.getElementById("cron-min-commits").value)||3,e.cron.installed=document.getElementById("cron-installed").checked,e.cron.paused=document.getElementById("cron-paused").checked,e.settings=e.settings||{},e.settings.default_paths=eo("default-paths-container"),e.settings.skip_patterns=eo("skip-patterns-container"),e}async function qa(){try{const e=Ga();await updateConfig(e),store.batchUpdate({config:e,configDirty:!1}),gs(),showToast("Configuration saved","success")}catch{showToast("Failed to save config","error")}}async function za(){try{const e=document.getElementById("json-editor").value,t=JSON.parse(e);await updateConfig(t),store.batchUpdate({config:t,configDirty:!1}),fi(t),gs(),showToast("Configuration saved","success")}catch(e){e instanceof SyntaxError?showToast("Invalid JSON syntax","error"):showToast("Failed to save config","error")}}function Ya(){try{const e=document.getElementById("json-editor"),t=JSON.parse(e.value);e.value=JSON.stringify(t,null,2)}catch{showToast("Invalid JSON - cannot format","error")}}function hs(){store.update("configDirty",!0),gs()}function gs(){const e=store.get("configDirty");["save-btn","save-json-btn","save-llm-btn","save-privacy-btn","save-cron-btn"].forEach(s=>{const n=document.getElementById(s);n&&(n.disabled=!e)})}async function Qa(){try{const e=await getCronStatus();store.update("cronStatus",e),Xa(e)}catch{document.getElementById("cron-status").innerHTML='<div class="loading-text">Failed to load cron status</div>'}}function Xa(e){const t=document.getElementById("cron-status");let s="Not installed",n="inactive";e.installed&&(e.paused?(s="Paused",n="paused"):(s="Active",n="active")),t.innerHTML=`
|
|
249
|
+
<div class="cron-status-row">
|
|
250
|
+
<span class="cron-status-label">Status</span>
|
|
251
|
+
<span class="cron-status-value ${n}">${s}</span>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="cron-status-row">
|
|
254
|
+
<span class="cron-status-label">Interval</span>
|
|
255
|
+
<span class="cron-status-value">${e.interval_hours?e.interval_hours+" hours":"Not set"}</span>
|
|
256
|
+
</div>
|
|
257
|
+
<div class="cron-status-row">
|
|
258
|
+
<span class="cron-status-label">Min Commits</span>
|
|
259
|
+
<span class="cron-status-value">${e.min_commits||"Not set"}</span>
|
|
260
|
+
</div>
|
|
261
|
+
`}function Zn(e,t,s){const n=document.getElementById(e),o=n.querySelector("input");n.querySelectorAll(".tag-item").forEach(i=>i.remove()),t.forEach(i=>{const l=document.createElement("span");l.className="tag-item",l.innerHTML=`${escapeHtml(i)}<span class="tag-remove" onclick="removeTag(this, '${s}')">×</span>`,n.insertBefore(l,o)})}function eo(e){const t=document.getElementById(e);return Array.from(t.querySelectorAll(".tag-item")).map(s=>s.textContent.slice(0,-1))}function Za(e,t){e.parentElement.remove(),hs()}function ec(e){if(e.key==="Enter"){e.preventDefault();const t=e.target,s=t.value.trim();if(s){const n=t.parentElement,o=document.createElement("span");o.className="tag-item",o.innerHTML=`${escapeHtml(s)}<span class="tag-remove" onclick="removeTag(this, 'path')">×</span>`,n.insertBefore(o,t),t.value="",hs()}}}function tc(e){if(e.key==="Enter"){e.preventDefault();const t=e.target,s=t.value.trim();if(s){const n=t.parentElement,o=document.createElement("span");o.className="tag-item",o.innerHTML=`${escapeHtml(s)}<span class="tag-remove" onclick="removeTag(this, 'pattern')">×</span>`,n.insertBefore(o,t),t.value="",hs()}}}window.switchMainView=Wa;window.loadConfig=ui;window.saveConfig=qa;window.saveJsonConfig=za;window.formatJson=Ya;window.switchSettingsTab=Ja;Object.assign(window,{handlePathInput:ec,handlePatternInput:tc,removeTag:Za,markConfigDirty:hs});async function ht(){try{const e=await getRepos();store.update("repos",e.repos||[]),sc()}catch{document.getElementById("repos-list").innerHTML='<div class="loading-text">Failed to load repositories</div>'}}function sc(){const e=store.get("repos"),t=document.getElementById("repos-list");if(!e.length){t.innerHTML=`
|
|
262
|
+
<div class="empty-state">
|
|
263
|
+
<div class="empty-state-title">No repositories tracked</div>
|
|
264
|
+
<div>Add a repository path above to start tracking</div>
|
|
265
|
+
</div>`;return}t.innerHTML=e.map(s=>{var w;const o=((w=s.project)==null?void 0:w.name)||""||s.origin_name||s.path.split("/").pop(),i=s.paused,l=!s.exists,a=s.hook_installed;let d="active";l?d="missing":i&&(d="paused");const p=s.origin?lc(s.origin):null,f=escapeHtml(s.path).replace(/'/g,"\\'");return`
|
|
266
|
+
<div class="repo-item ${i?"paused":""} ${l?"missing":""}">
|
|
267
|
+
<div class="repo-info">
|
|
268
|
+
<div class="repo-name-row">
|
|
269
|
+
<span class="repo-name" id="repo-name-${f}" onclick="editRepoName('${f}')">${escapeHtml(o)}</span>
|
|
270
|
+
<button class="repo-edit-btn" onclick="editRepoName('${f}')" title="Edit name">✎</button>
|
|
271
|
+
${p?`<a href="${escapeHtml(p)}" target="_blank" rel="noopener noreferrer" class="repo-link" title="Open repository"><span class="repo-link-icon">↗</span></a>`:""}
|
|
272
|
+
</div>
|
|
273
|
+
<div class="repo-path">${escapeHtml(s.path)}</div>
|
|
274
|
+
<div class="repo-status">
|
|
275
|
+
<span class="repo-badge ${d}">${l?"Missing":i?"Paused":"Active"}</span>
|
|
276
|
+
${a?'<span class="repo-badge hook">Hook</span>':""}
|
|
277
|
+
${s.last_sync?`<span style="font-size: 11px; color: var(--text-muted);">Last sync: ${new Date(s.last_sync).toLocaleDateString()}</span>`:""}
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
<div class="repo-actions">
|
|
281
|
+
${i?`<button class="repo-action-btn" onclick="resumeRepoClick('${f}')">Resume</button>`:`<button class="repo-action-btn" onclick="pauseRepoClick('${f}')">Pause</button>`}
|
|
282
|
+
<button class="repo-action-btn danger" onclick="removeRepoClick('${f}')">Remove</button>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
`}).join("")}async function nc(){const e=document.getElementById("add-repo-path"),t=e.value.trim();if(!t){showToast("Please enter a repository path","error");return}try{const s=await addRepo(t);s.success?(e.value="",showToast("Repository added","success"),ht()):showToast(s.error||"Failed to add repository","error")}catch{showToast("Failed to add repository","error")}}async function oc(e){if(confirm("Remove this repository from tracking?"))try{(await removeRepo(e)).success?(showToast("Repository removed","success"),ht()):showToast("Failed to remove repository","error")}catch{showToast("Failed to remove repository","error")}}async function ic(e){try{(await pauseRepo(e)).success?(showToast("Repository paused","success"),ht()):showToast("Failed to pause repository","error")}catch{showToast("Failed to pause repository","error")}}async function rc(e){try{(await resumeRepo(e)).success?(showToast("Repository resumed","success"),ht()):showToast("Failed to resume repository","error")}catch{showToast("Failed to resume repository","error")}}function lc(e){if(!e)return null;if(e.startsWith("http://")||e.startsWith("https://"))return e;const t=e.match(/^git@([^:]+):(.+?)(\.git)?$/);if(t){const n=t[1],o=t[2];return`https://${n}/${o}`}const s=e.match(/^git:\/\/(.+?)(\.git)?$/);return s?`https://${s[1]}`:e}function ac(e){var l;const s=store.get("repos").find(a=>a.path===e);if(!s)return;const n=((l=s.project)==null?void 0:l.name)||s.origin_name||s.path.split("/").pop();document.getElementById("edit-repo-modal");const o=document.getElementById("edit-repo-name-input"),i=document.getElementById("edit-repo-path-input");o.value=n,i.value=e,openModal("edit-repo-modal"),setTimeout(()=>{o.focus(),o.select()},100)}async function cc(){const e=document.getElementById("edit-repo-name-input"),t=document.getElementById("edit-repo-path-input"),s=e.value.trim(),n=t.value;if(s===""){showToast("Name cannot be empty","error");return}const o=document.getElementById("save-repo-btn"),i=o.textContent;o.disabled=!0,o.textContent="Saving...";try{const l=await renameRepo(n,s);l.success?(showToast("Project renamed","success"),closeModal("edit-repo-modal"),ht()):showToast(l.error||"Failed to rename project","error")}catch{showToast("Failed to rename project","error")}finally{o.disabled=!1,o.textContent=i}}window.addRepoClick=nc;window.editRepoName=ac;window.saveRepoEdit=cc;Object.assign(window,{loadRepos:ht,removeRepoClick:oc,pauseRepoClick:ic,resumeRepoClick:rc});let N={authenticated:!1,user:null,loginFlow:null,usernameInfo:null,polling:!1,modalOpen:!1},zt=null;async function dc(){if(!document.getElementById("auth-modal")){const e=document.createElement("div");e.id="auth-modal",e.className="auth-modal",e.addEventListener("click",t=>{t.stopPropagation()}),document.body.appendChild(e)}await fn(),ft()}async function fn(){try{const e=await window.getAuthStatus();if(N.authenticated=e.authenticated,N.user=e.user,e.authenticated){const t=await window.getUsernameInfo();N.usernameInfo=t}}catch(e){console.error("Failed to fetch auth status:",e)}}function ft(){var t;const e=document.getElementById("auth-section");if(e)if(N.authenticated&&N.user){const s=(t=N.usernameInfo)!=null&&t.claimed?`@${N.usernameInfo.remote_username}`:N.user.email;e.innerHTML=`
|
|
286
|
+
<div class="auth-connected">
|
|
287
|
+
<div class="auth-user">
|
|
288
|
+
<span class="auth-icon">
|
|
289
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
290
|
+
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
|
291
|
+
<circle cx="12" cy="7" r="4"></circle>
|
|
292
|
+
</svg>
|
|
293
|
+
</span>
|
|
294
|
+
<span class="auth-name" title="${N.user.email}">${s}</span>
|
|
295
|
+
</div>
|
|
296
|
+
<button class="auth-logout-btn" onclick="handleLogout()" title="Disconnect">
|
|
297
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
298
|
+
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
|
|
299
|
+
<polyline points="16 17 21 12 16 7"></polyline>
|
|
300
|
+
<line x1="21" y1="12" x2="9" y2="12"></line>
|
|
301
|
+
</svg>
|
|
302
|
+
</button>
|
|
303
|
+
</div>
|
|
304
|
+
`}else e.innerHTML=`
|
|
305
|
+
<button class="auth-connect-btn" onclick="handleStartLogin()">
|
|
306
|
+
<span class="auth-icon">
|
|
307
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
308
|
+
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path>
|
|
309
|
+
<polyline points="10 17 15 12 10 7"></polyline>
|
|
310
|
+
<line x1="15" y1="12" x2="3" y2="12"></line>
|
|
311
|
+
</svg>
|
|
312
|
+
</span>
|
|
313
|
+
Connect to repr.dev
|
|
314
|
+
</button>
|
|
315
|
+
`}function pi(){const e=document.getElementById("auth-modal");e&&(N.modalOpen=!0,e.classList.add("open"),document.body.style.overflow="hidden",pn())}function jt(){console.log("closeAuthModal called",new Error().stack);const e=document.getElementById("auth-modal");e&&(N.modalOpen=!1,it=!1,e.classList.remove("open"),document.body.style.overflow="")}function pn(){const e=document.getElementById("auth-modal");if(e)if(N.loginFlow&&N.loginFlow.showError){const t=N.loginFlow.message||"An error occurred";e.innerHTML=`
|
|
316
|
+
<div class="auth-modal-content" onclick="event.stopPropagation()">
|
|
317
|
+
<button class="auth-modal-close" onclick="handleCancelLogin()">
|
|
318
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
319
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
320
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
321
|
+
</svg>
|
|
322
|
+
</button>
|
|
323
|
+
<div class="auth-modal-header">
|
|
324
|
+
<div class="auth-modal-icon auth-modal-icon-error">
|
|
325
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
326
|
+
<circle cx="12" cy="12" r="10"></circle>
|
|
327
|
+
<line x1="15" y1="9" x2="9" y2="15"></line>
|
|
328
|
+
<line x1="9" y1="9" x2="15" y2="15"></line>
|
|
329
|
+
</svg>
|
|
330
|
+
</div>
|
|
331
|
+
<h2>Connection Failed</h2>
|
|
332
|
+
<p>${t}</p>
|
|
333
|
+
</div>
|
|
334
|
+
<div class="auth-modal-footer">
|
|
335
|
+
<button class="auth-cancel-btn" onclick="handleCancelLogin()">Close</button>
|
|
336
|
+
<button class="auth-retry-btn" onclick="handleRetryLogin()">Try Again</button>
|
|
337
|
+
</div>
|
|
338
|
+
</div>
|
|
339
|
+
`}else N.loginFlow&&N.loginFlow.status==="pending"&&(e.innerHTML=`
|
|
340
|
+
<div class="auth-modal-content" onclick="event.stopPropagation()">
|
|
341
|
+
<button class="auth-modal-close" onclick="handleCancelLogin()">
|
|
342
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
343
|
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
344
|
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
345
|
+
</svg>
|
|
346
|
+
</button>
|
|
347
|
+
<div class="auth-modal-header">
|
|
348
|
+
<div class="auth-modal-icon">
|
|
349
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
350
|
+
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path>
|
|
351
|
+
<polyline points="10 17 15 12 10 7"></polyline>
|
|
352
|
+
<line x1="15" y1="12" x2="3" y2="12"></line>
|
|
353
|
+
</svg>
|
|
354
|
+
</div>
|
|
355
|
+
<h2>Connect to repr.dev</h2>
|
|
356
|
+
<p>Enter the code below at the verification page</p>
|
|
357
|
+
</div>
|
|
358
|
+
<div class="auth-modal-body">
|
|
359
|
+
<div class="auth-code">${N.loginFlow.user_code}</div>
|
|
360
|
+
<a href="${N.loginFlow.verification_url}" target="_blank" class="auth-verify-btn">
|
|
361
|
+
Open Verification Page
|
|
362
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
363
|
+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
|
|
364
|
+
<polyline points="15 3 21 3 21 9"></polyline>
|
|
365
|
+
<line x1="10" y1="14" x2="21" y2="3"></line>
|
|
366
|
+
</svg>
|
|
367
|
+
</a>
|
|
368
|
+
<div class="auth-modal-status">
|
|
369
|
+
<span class="auth-spinner"></span>
|
|
370
|
+
Waiting for authorization...
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
<div class="auth-modal-footer">
|
|
374
|
+
<button class="auth-cancel-btn" onclick="handleCancelLogin()">Cancel</button>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
`)}let it=!1;async function hi(){if(it||N.modalOpen){console.log("Login already in progress, ignoring");return}it=!0;try{console.log("Starting login flow...");const e=await window.startLogin();console.log("Login flow response:",e),N.loginFlow=e,e.status==="pending"?(pi(),uc()):(console.warn("Unexpected flow status:",e.status),it=!1)}catch(e){console.error("Failed to start login:",e),alert("Failed to start login: "+e.message),it=!1}}function uc(){N.polling||(N.polling=!0,zt=setInterval(async()=>{try{console.log("Polling login status...");const e=await window.pollLoginStatus();console.log("Poll response:",e),N.loginFlow=e,e.status==="completed"?(xt(),jt(),await fn(),ft()):e.status==="error"||e.status==="expired"||e.status==="denied"?(console.log("Error status:",e.status,e.message),xt(),N.loginFlow={...e,showError:!0},pn()):e.status==="no_flow"&&(xt(),jt(),N.loginFlow=null,ft())}catch(e){console.error("Polling error:",e),xt()}},5e3))}function xt(){N.polling=!1,zt&&(clearInterval(zt),zt=null)}async function fc(){xt(),jt();try{await window.cancelLogin()}catch{}N.loginFlow=null,ft()}async function pc(){try{await window.cancelLogin()}catch{}N.loginFlow=null,it=!1,jt(),await hi()}async function hc(){try{await window.logout(),N.authenticated=!1,N.user=null,N.usernameInfo=null,ft()}catch(e){console.error("Failed to logout:",e)}}Object.assign(window,{initAuth:dc,refreshAuthStatus:fn,renderAuthSection:ft,openAuthModal:pi,closeAuthModal:jt,renderAuthModal:pn,handleStartLogin:hi,handleCancelLogin:fc,handleRetryLogin:pc,handleLogout:hc});const gc={__name:"App",setup(e){return Ro(()=>{/(Mac|iPhone|iPad|iPod)/i.test(navigator.platform)||document.body.classList.add("is-windows"),window.initTheme&&window.initTheme(),window.initKeyboard&&window.initKeyboard();const t=document.getElementById("search-input");t&&t.addEventListener("input",s=>{window.store&&(window.store.update("searchQuery",s.target.value.trim().toLowerCase()),window.filterAndRenderStories&&window.filterAndRenderStories())}),window.initStories&&window.initStories(),window.initAuth&&window.initAuth()}),(t,s)=>(ol(),ll(ve,null,[s[0]||(s[0]=r("div",{class:"dashboard",id:"view-main"},[r("div",{class:"sidebar-overlay",onclick:"toggleSidebar()"}),r("aside",{class:"sidebar"},[r("div",{class:"sidebar-header"},[r("div",{class:"sidebar-logo"},[r("div",{class:"sidebar-avatar"},"R"),r("div",null,[r("div",{class:"sidebar-title"},"Repr"),r("div",{class:"sidebar-subtitle"},"Dashboard")])])]),r("nav",{class:"sidebar-nav"},[r("div",{class:"sidebar-section"},[r("div",{class:"sidebar-section-title"},"Overview"),r("div",{class:"sidebar-item active","data-view":"stories",onclick:"switchMainView('stories')",role:"button","aria-label":"View Stories"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),r("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})])]),le(" Stories ")]),r("div",{class:"sidebar-item","data-view":"repos",onclick:"switchMainView('repos')",role:"button","aria-label":"View Repositories"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})])]),le(" Repositories ")])]),r("div",{class:"sidebar-section"},[r("div",{class:"sidebar-section-title"},"Configuration"),r("div",{class:"sidebar-item","data-view":"settings",onclick:"switchMainView('settings')",role:"button","aria-label":"Settings"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("circle",{cx:"12",cy:"12",r:"3"}),r("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})])]),le(" Settings ")]),r("div",{class:"sidebar-item","data-view":"llm",onclick:"switchMainView('llm')",role:"button","aria-label":"LLM Configuration"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("path",{d:"M12 2a10 10 0 0 1 10 10 10 10 0 0 1-10 10 10 10 0 0 1-10-10 10 10 0 0 1 10-10z"}),r("path",{d:"M8 14s1.5 2 4 2 4-2 4-2"}),r("line",{x1:"9",y1:"9",x2:"9.01",y2:"9"}),r("line",{x1:"15",y1:"9",x2:"15.01",y2:"9"})])]),le(" LLM ")]),r("div",{class:"sidebar-item","data-view":"privacy",onclick:"switchMainView('privacy')",role:"button","aria-label":"Privacy Settings"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),r("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})])]),le(" Privacy ")]),r("div",{class:"sidebar-item","data-view":"cron",onclick:"switchMainView('cron')",role:"button","aria-label":"Cron Settings"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("circle",{cx:"12",cy:"12",r:"10"}),r("polyline",{points:"12 6 12 12 16 14"})])]),le(" Cron ")])])]),r("div",{id:"auth-section",class:"auth-section"}),r("div",{class:"sidebar-footer"},[r("div",{class:"sidebar-status"},[r("span",{class:"status-dot"}),r("span",{id:"status-text"},"Loading...")]),r("div",{class:"sidebar-item theme-toggle-compact",id:"theme-toggle",onclick:"toggleTheme()"},[r("span",{class:"sidebar-icon theme-toggle-icon"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})])]),le(" Toggle Theme ")])])]),r("main",{class:"main-content"},[r("div",{class:"main-layout"},[r("div",{class:"feed-column"},[r("div",{id:"view-stories"},[r("div",{class:"tabs-bar"},[r("div",{class:"mobile-menu-toggle",onclick:"toggleSidebar()"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),r("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),r("line",{x1:"3",y1:"18",x2:"21",y2:"18"})])]),r("div",{class:"search-container"},[r("div",{class:"search-icon"},[r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21-4.35-4.35"})])]),r("input",{type:"text",id:"search-input",class:"search-input",placeholder:"Search stories..."}),r("kbd",{class:"search-shortcut"},[r("span",{class:"search-shortcut-mod"}),le("K")])])]),r("div",{class:"feed-wrapper"},[r("div",{class:"feed",id:"feed"})])]),r("div",{id:"view-detail",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"back-button",onclick:"goBack()"},[r("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[r("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),r("polyline",{points:"12 19 5 12 12 5"})])]),r("div",{class:"view-title"},"Post")]),r("div",{id:"detail-content"})]),r("div",{id:"view-profile",style:{display:"none"}},[r("div",{class:"profile-container"},[r("div",{class:"profile-header-nav"},[r("div",{class:"back-button",onclick:"goBack()"},[r("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[r("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),r("polyline",{points:"12 19 5 12 12 5"})])]),r("div",{class:"profile-nav-title",id:"profile-nav-name"},"Profile")]),r("div",{class:"profile-cover",id:"profile-cover"}),r("div",{class:"profile-content"},[r("div",{class:"profile-top-section"},[r("div",{class:"profile-avatar-wrapper"},[r("div",{class:"profile-avatar-large",id:"profile-view-avatar"},"R")]),r("div",{class:"profile-actions"})]),r("div",{class:"profile-details"},[r("div",{class:"profile-name-row"},[r("h1",{id:"profile-view-name"},"Repo Name"),r("span",{class:"verified-badge-large",id:"profile-verified-badge",style:{display:"none"}},[r("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[r("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})])])]),r("div",{class:"profile-handle",id:"profile-view-handle"},"@repo"),r("div",{class:"profile-bio",id:"profile-view-bio"}," Repository timeline and activity. "),r("div",{class:"profile-metadata-row"},[r("div",{class:"profile-pill"},[r("span",{class:"pill-icon"},"📦"),r("span",{id:"profile-repo-link"},"Repository")]),r("div",{class:"profile-pill"},[r("span",{class:"pill-icon"},"🔗"),r("span",{id:"profile-web-link"},"Website")]),r("div",{class:"profile-pill-count",id:"profile-stats-count"},"+2")]),r("div",{class:"profile-stats-row"},[r("span",{class:"stat-item"},[r("strong",{id:"profile-stories-count"},"0"),le(),r("span",{class:"stat-label"},"Stories")]),r("span",{class:"stat-item"},[r("strong",{id:"profile-commits-count"},"0"),le(),r("span",{class:"stat-label"},"Commits")]),r("span",{class:"stat-item"},[r("strong",{id:"profile-contributors-count"},"0"),le(),r("span",{class:"stat-label"},"Contributors")])])]),r("div",{class:"feed-container",style:{"padding-top":"0"}},[r("div",{class:"feed",id:"profile-feed"})])])])]),r("div",{id:"view-user",style:{display:"none"}},[r("div",{class:"profile-container"},[r("div",{class:"profile-header-nav"},[r("div",{class:"back-button",onclick:"goBack()"},[r("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[r("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),r("polyline",{points:"12 19 5 12 12 5"})])]),r("div",{class:"profile-nav-title",id:"user-nav-name"},"User Profile")]),r("div",{class:"profile-cover",id:"user-cover"}),r("div",{class:"profile-content"},[r("div",{class:"profile-top-section"},[r("div",{class:"profile-avatar-wrapper"},[r("div",{class:"profile-avatar-large",id:"user-view-avatar"},"U")]),r("div",{class:"profile-actions"})]),r("div",{class:"profile-details"},[r("div",{class:"profile-name-row"},[r("h1",{id:"user-view-name"},"User Name"),r("span",{class:"verified-badge-large",id:"user-verified-badge",style:{display:"none"}},[r("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[r("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})])])]),r("div",{class:"profile-handle",id:"user-view-handle"},"@user"),r("div",{class:"profile-bio",id:"user-view-bio"}," User activity. "),r("div",{class:"profile-metadata-row"},[r("div",{class:"profile-pill"},[r("span",{class:"pill-icon"},"📦"),r("span",{id:"user-repo-link"},"Github")]),r("div",{class:"profile-pill"},[r("span",{class:"pill-icon"},"🔗"),r("span",{id:"user-web-link"},"Website")]),r("div",{class:"profile-pill-count",id:"user-stats-count"},"+2")]),r("div",{class:"profile-stats-row"},[r("span",{class:"stat-item"},[r("strong",{id:"user-stories-count"},"0"),le(),r("span",{class:"stat-label"},"Stories")]),r("span",{class:"stat-item"},[r("strong",{id:"user-commits-count"},"0"),le(),r("span",{class:"stat-label"},"Commits")]),r("span",{class:"stat-item"},[r("strong",{id:"user-contributors-count"},"0"),le(),r("span",{class:"stat-label"},"Repos")])])]),r("div",{class:"feed-container",style:{"padding-top":"0"}},[r("div",{class:"feed",id:"user-feed"})])])])]),r("div",{id:"view-settings",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"view-title"},"Settings")]),r("div",{class:"content-body"},[r("div",{class:"settings-container"},[r("nav",{class:"settings-nav"},[r("div",{class:"settings-nav-item active","data-tab":"form",onclick:"switchSettingsTab('form')"},"Form"),r("div",{class:"settings-nav-item","data-tab":"json",onclick:"switchSettingsTab('json')"},"JSON")]),r("div",{id:"settings-form",class:"settings-content"},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Generation"),r("div",{class:"settings-row"},[r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Commits per Story"),r("input",{type:"number",class:"settings-input",id:"gen-batch-size",min:"1",max:"50",oninput:"markConfigDirty()"}),r("div",{class:"settings-hint"},"How many commits to group into a single story")]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Max Commits per Batch"),r("input",{type:"number",class:"settings-input",id:"gen-max-commits",min:"1",max:"200",oninput:"markConfigDirty()"})])]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Default Template"),r("select",{class:"settings-select",id:"gen-template",onchange:"markConfigDirty()"},[r("option",{value:"resume"},"Resume"),r("option",{value:"technical"},"Technical"),r("option",{value:"narrative"},"Narrative")])]),r("div",{class:"settings-checkbox-row"},[r("input",{type:"checkbox",class:"settings-checkbox",id:"gen-auto-hook",onchange:"markConfigDirty()"}),r("label",{class:"settings-checkbox-label",for:"gen-auto-hook"},"Auto-generate on git hook")])]),r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Paths"),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Default Scan Paths"),r("div",{class:"tags-input",id:"default-paths-container"},[r("input",{type:"text",placeholder:"Add path and press Enter",onkeydown:"handlePathInput(event)"})]),r("div",{class:"settings-hint"},"Directories to scan for git repositories")]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Skip Patterns"),r("div",{class:"tags-input",id:"skip-patterns-container"},[r("input",{type:"text",placeholder:"Add pattern and press Enter",onkeydown:"handlePatternInput(event)"})]),r("div",{class:"settings-hint"},"Directory names to skip when scanning")])]),r("div",{class:"btn-row"},[r("button",{class:"btn btn-primary",onclick:"saveConfig()",id:"save-btn",disabled:""},"Save Changes"),r("button",{class:"btn btn-secondary",onclick:"loadConfig()"},"Reset")])]),r("div",{id:"settings-json",class:"settings-content",style:{display:"none"}},[r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Raw Configuration (JSON)"),r("textarea",{class:"json-editor",id:"json-editor",oninput:"markConfigDirty()"}),r("div",{class:"settings-hint"},"Edit the raw JSON configuration. Be careful with syntax.")]),r("div",{class:"btn-row"},[r("button",{class:"btn btn-primary",onclick:"saveJsonConfig()",id:"save-json-btn",disabled:""},"Save JSON"),r("button",{class:"btn btn-secondary",onclick:"loadConfig()"},"Reset"),r("button",{class:"btn btn-secondary",onclick:"formatJson()"},"Format")])])])])]),r("div",{id:"view-llm",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"view-title"},"LLM Configuration")]),r("div",{class:"content-body"},[r("div",{class:"settings-container"},[r("div",{class:"settings-content"},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Mode"),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Default Mode"),r("select",{class:"settings-select",id:"llm-default",onchange:"markConfigDirty()"},[r("option",{value:"local"},"Local (Ollama/LM Studio)"),r("option",{value:"cloud"},"Cloud (repr.dev)"),r("option",{value:"byok:openai"},"BYOK: OpenAI"),r("option",{value:"byok:anthropic"},"BYOK: Anthropic"),r("option",{value:"byok:groq"},"BYOK: Groq"),r("option",{value:"byok:together"},"BYOK: Together AI")])])]),r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Local Provider"),r("div",{class:"settings-row"},[r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Provider"),r("select",{class:"settings-select",id:"llm-local-provider",onchange:"markConfigDirty()"},[r("option",{value:""},"Not configured"),r("option",{value:"ollama"},"Ollama"),r("option",{value:"lmstudio"},"LM Studio"),r("option",{value:"custom"},"Custom")])]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Model"),r("input",{type:"text",class:"settings-input",id:"llm-local-model",placeholder:"e.g., llama3.2",oninput:"markConfigDirty()"})])]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"API URL"),r("input",{type:"text",class:"settings-input",id:"llm-local-url",placeholder:"http://localhost:11434/v1",oninput:"markConfigDirty()"})])]),r("div",{class:"btn-row"},[r("button",{class:"btn btn-primary",onclick:"saveConfig()",id:"save-llm-btn",disabled:""},"Save Changes"),r("button",{class:"btn btn-secondary",onclick:"loadConfig()"},"Reset")])])])])]),r("div",{id:"view-privacy",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"view-title"},"Privacy")]),r("div",{class:"content-body"},[r("div",{class:"settings-container"},[r("div",{class:"settings-content"},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Data Sharing"),r("div",{class:"settings-checkbox-row"},[r("input",{type:"checkbox",class:"settings-checkbox",id:"privacy-local-only",onchange:"markConfigDirty()"}),r("label",{class:"settings-checkbox-label",for:"privacy-local-only"},"Lock to local-only mode")]),r("div",{class:"settings-checkbox-row"},[r("input",{type:"checkbox",class:"settings-checkbox",id:"privacy-send-diffs",onchange:"markConfigDirty()"}),r("label",{class:"settings-checkbox-label",for:"privacy-send-diffs"},"Send diffs to cloud")])]),r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Profile"),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Profile Visibility"),r("select",{class:"settings-select",id:"privacy-visibility",onchange:"markConfigDirty()"},[r("option",{value:"public"},"Public"),r("option",{value:"unlisted"},"Unlisted"),r("option",{value:"private"},"Private")])])]),r("div",{class:"btn-row"},[r("button",{class:"btn btn-primary",onclick:"saveConfig()",id:"save-privacy-btn",disabled:""},"Save Changes"),r("button",{class:"btn btn-secondary",onclick:"loadConfig()"},"Reset")])])])])]),r("div",{id:"view-repos",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"view-title"},"Explore")]),r("div",{class:"content-body"},[r("div",{class:"settings-container"},[r("div",{class:"settings-content"},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Add Repository"),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Repository Path"),r("div",{style:{display:"flex",gap:"12px"}},[r("input",{type:"text",class:"settings-input",id:"add-repo-path",placeholder:"~/code/my-project",style:{flex:"1"}}),r("button",{class:"btn btn-primary",onclick:"addRepoClick()"},"Add")])])]),r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Tracked Repositories"),r("div",{id:"repos-list",class:"repos-list"},[r("div",{class:"loading-text"},"Loading repositories...")])])])])])]),r("div",{id:"view-cron",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"view-title"},"Activity")]),r("div",{class:"content-body"},[r("div",{class:"settings-container"},[r("div",{class:"settings-content"},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Status"),r("div",{id:"cron-status",class:"cron-status-box"},[r("div",{class:"loading-text"},"Loading cron status...")])])])])])])]),r("aside",{class:"right-sidebar"},[r("div",{class:"widget"},[r("h3",{class:"widget-title"},"Subscribed Repositories"),r("div",{id:"recommended-repos",class:"widget-list"},[r("div",{class:"loading-text"},"Loading repos...")]),r("button",{class:"btn-text",id:"show-more-repos-btn",onclick:"toggleSubscribedRepos()"},"Show more")]),r("div",{class:"widget"},[r("h3",{class:"widget-title"},"Statistics"),r("div",{class:"stats-grid"},[r("div",{class:"stat-box"},[r("div",{class:"stat-label"},"Total Stories"),r("div",{class:"stat-value",id:"stat-total-stories"},"0")]),r("div",{class:"stat-box"},[r("div",{class:"stat-label"},"Active Repos"),r("div",{class:"stat-value",id:"stat-total-repos"},"0")])])]),r("footer",{class:"right-sidebar-footer"},[r("nav",null,[r("a",{href:"#"},"Terms"),r("a",{href:"#"},"Privacy"),r("a",{href:"#"},"Cookies"),r("span",null,"© 2026 Repr")])])])])])],-1)),s[1]||(s[1]=r("div",{class:"modal-overlay",id:"edit-repo-modal",onclick:"if(event.target === this) closeModal('edit-repo-modal')"},[r("div",{class:"modal-container"},[r("div",{class:"modal-header"},[r("h3",{class:"modal-title"},"Edit Repository"),r("button",{class:"modal-close",onclick:"closeModal('edit-repo-modal')"},"×")]),r("div",{class:"modal-body"},[r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Project Name"),r("div",{class:"editable-field-container"},[r("input",{type:"text",class:"settings-input",id:"edit-repo-name-input",placeholder:"Project Name",onkeydown:"if(event.key === 'Enter') saveRepoEdit()"}),r("span",{class:"editable-field-icon"},"✎")]),r("div",{class:"settings-hint"},"This name will be used in the timeline and stories")]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Path"),r("input",{type:"text",class:"settings-input",id:"edit-repo-path-input",readonly:"",style:{background:"var(--surface-hover)",color:"var(--text-muted)",cursor:"not-allowed"}})])]),r("div",{class:"modal-footer"},[r("button",{class:"btn btn-secondary",onclick:"closeModal('edit-repo-modal')"},"Cancel"),r("button",{class:"btn btn-primary",id:"save-repo-btn",onclick:"saveRepoEdit()"},"Save Changes")])])],-1))],64))}},gi=Kl(gc);gi.use(ql());gi.mount("#app");
|