studiograph 1.2.0-beta.9 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -18
- package/dist/agent/orchestrator.d.ts +56 -0
- package/dist/agent/orchestrator.js +167 -22
- package/dist/agent/orchestrator.js.map +1 -1
- package/dist/agent/prompts/system.md +51 -63
- package/dist/agent/skill-loader.js +8 -0
- package/dist/agent/skill-loader.js.map +1 -1
- package/dist/agent/skills/entity-schema.md +4 -19
- package/dist/agent/skills/gather-context.md +1 -1
- package/dist/agent/tools/graph-tools.d.ts +41 -1
- package/dist/agent/tools/graph-tools.js +133 -57
- package/dist/agent/tools/graph-tools.js.map +1 -1
- package/dist/agent/tools/ops-tools.js +82 -0
- package/dist/agent/tools/ops-tools.js.map +1 -1
- package/dist/agent/tools/permission-tools.d.ts +90 -0
- package/dist/agent/tools/permission-tools.js +207 -0
- package/dist/agent/tools/permission-tools.js.map +1 -0
- package/dist/agent/tools/sync-tools.js +2 -2
- package/dist/agent/tools/sync-tools.js.map +1 -1
- package/dist/auth/github.d.ts +1 -1
- package/dist/auth/github.js +21 -13
- package/dist/auth/github.js.map +1 -1
- package/dist/cli/commands/access.d.ts +11 -0
- package/dist/cli/commands/access.js +156 -0
- package/dist/cli/commands/access.js.map +1 -0
- package/dist/cli/commands/app.js +25 -2
- package/dist/cli/commands/app.js.map +1 -1
- package/dist/cli/commands/clear.d.ts +5 -0
- package/dist/cli/commands/clear.js +36 -0
- package/dist/cli/commands/clear.js.map +1 -0
- package/dist/cli/commands/clone.js +3 -3
- package/dist/cli/commands/clone.js.map +1 -1
- package/dist/cli/commands/collection.d.ts +10 -0
- package/dist/cli/commands/collection.js +187 -0
- package/dist/cli/commands/collection.js.map +1 -0
- package/dist/cli/commands/commit.js +2 -1
- package/dist/cli/commands/commit.js.map +1 -1
- package/dist/cli/commands/config.d.ts +100 -0
- package/dist/cli/commands/config.js +1 -1
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/deploy.js +10 -1
- package/dist/cli/commands/deploy.js.map +1 -1
- package/dist/cli/commands/index.js +1 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.js +32 -40
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/join.d.ts +0 -6
- package/dist/cli/commands/join.js +26 -111
- package/dist/cli/commands/join.js.map +1 -1
- package/dist/cli/commands/lint.js +1 -2
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/mcp.js +6 -5
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/org.d.ts +10 -0
- package/dist/cli/commands/org.js +132 -0
- package/dist/cli/commands/org.js.map +1 -0
- package/dist/cli/commands/orphans.js +1 -2
- package/dist/cli/commands/orphans.js.map +1 -1
- package/dist/cli/commands/provision.js +3 -3
- package/dist/cli/commands/provision.js.map +1 -1
- package/dist/cli/commands/resolve.d.ts +8 -0
- package/dist/cli/commands/resolve.js +85 -0
- package/dist/cli/commands/resolve.js.map +1 -0
- package/dist/cli/commands/serve.js +55 -25
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/start.js +22 -205
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/sync.js +53 -8
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/cli/commands/team.d.ts +12 -0
- package/dist/cli/commands/team.js +185 -0
- package/dist/cli/commands/team.js.map +1 -0
- package/dist/cli/index.js +41 -34
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/scaffolding.d.ts +5 -3
- package/dist/cli/scaffolding.js +191 -97
- package/dist/cli/scaffolding.js.map +1 -1
- package/dist/cli/setup-wizard.js +20 -10
- package/dist/cli/setup-wizard.js.map +1 -1
- package/dist/cli/sync-review-interactive.js +1 -1
- package/dist/cli/sync-review-interactive.js.map +1 -1
- package/dist/core/graph.d.ts +5 -10
- package/dist/core/graph.js +84 -85
- package/dist/core/graph.js.map +1 -1
- package/dist/core/migration-runner.d.ts +42 -0
- package/dist/core/migration-runner.js +232 -0
- package/dist/core/migration-runner.js.map +1 -0
- package/dist/core/migration-types.d.ts +101 -0
- package/dist/core/migration-types.js +21 -0
- package/dist/core/migration-types.js.map +1 -0
- package/dist/core/migrations/20260219-formalize-memory-location.d.ts +2 -0
- package/dist/core/migrations/20260219-formalize-memory-location.js +35 -0
- package/dist/core/migrations/20260219-formalize-memory-location.js.map +1 -0
- package/dist/core/migrations/20260220-add-workspace-metadata.d.ts +12 -0
- package/dist/core/migrations/20260220-add-workspace-metadata.js +65 -0
- package/dist/core/migrations/20260220-add-workspace-metadata.js.map +1 -0
- package/dist/core/migrations/20260220-add-workspace-readme.d.ts +11 -0
- package/dist/core/migrations/20260220-add-workspace-readme.js +82 -0
- package/dist/core/migrations/20260220-add-workspace-readme.js.map +1 -0
- package/dist/core/migrations/20260220-migrate-yaml-to-json.d.ts +9 -0
- package/dist/core/migrations/20260220-migrate-yaml-to-json.js +64 -0
- package/dist/core/migrations/20260220-migrate-yaml-to-json.js.map +1 -0
- package/dist/core/migrations/index.d.ts +11 -0
- package/dist/core/migrations/index.js +23 -0
- package/dist/core/migrations/index.js.map +1 -0
- package/dist/core/types.d.ts +19 -34
- package/dist/core/types.js +3 -21
- package/dist/core/types.js.map +1 -1
- package/dist/core/user-config.d.ts +27 -0
- package/dist/core/user-config.js +51 -0
- package/dist/core/user-config.js.map +1 -1
- package/dist/core/validation.d.ts +978 -2182
- package/dist/core/validation.js +242 -397
- package/dist/core/validation.js.map +1 -1
- package/dist/core/workspace-manager.d.ts +32 -31
- package/dist/core/workspace-manager.js +171 -186
- package/dist/core/workspace-manager.js.map +1 -1
- package/dist/core/workspace.d.ts +0 -5
- package/dist/core/workspace.js +33 -101
- package/dist/core/workspace.js.map +1 -1
- package/dist/lib/lib/utils.d.ts +2 -0
- package/dist/lib/lib/utils.js +6 -0
- package/dist/lib/lib/utils.js.map +1 -0
- package/dist/mcp/tools.js +13 -13
- package/dist/mcp/tools.js.map +1 -1
- package/dist/server/chrome/chrome.css +562 -0
- package/dist/server/chrome/chrome.js +540 -0
- package/dist/server/index.js +163 -10
- package/dist/server/index.js.map +1 -1
- package/dist/server/plugin-loader.d.ts +7 -0
- package/dist/server/plugin-loader.js +9 -1
- package/dist/server/plugin-loader.js.map +1 -1
- package/dist/server/routes/chat.d.ts +3 -2
- package/dist/server/routes/chat.js +67 -16
- package/dist/server/routes/chat.js.map +1 -1
- package/dist/server/routes/git-api.d.ts +9 -0
- package/dist/server/routes/git-api.js +82 -0
- package/dist/server/routes/git-api.js.map +1 -0
- package/dist/server/routes/graph-api.d.ts +2 -2
- package/dist/server/routes/graph-api.js +267 -3
- package/dist/server/routes/graph-api.js.map +1 -1
- package/dist/server/routes/permissions-api.d.ts +9 -0
- package/dist/server/routes/permissions-api.js +176 -0
- package/dist/server/routes/permissions-api.js.map +1 -0
- package/dist/server/routes/workspace-api.d.ts +9 -0
- package/dist/server/routes/workspace-api.js +283 -0
- package/dist/server/routes/workspace-api.js.map +1 -0
- package/dist/services/assets/base.d.ts +2 -2
- package/dist/services/assets/base.js +4 -4
- package/dist/services/assets/base.js.map +1 -1
- package/dist/services/assets/index.d.ts +6 -6
- package/dist/services/assets/index.js +12 -12
- package/dist/services/assets/index.js.map +1 -1
- package/dist/services/git.d.ts +35 -0
- package/dist/services/git.js +93 -0
- package/dist/services/git.js.map +1 -1
- package/dist/services/github-provisioner.js +1 -2
- package/dist/services/github-provisioner.js.map +1 -1
- package/dist/services/github-service.d.ts +99 -0
- package/dist/services/github-service.js +310 -0
- package/dist/services/github-service.js.map +1 -0
- package/dist/services/markdown.js +4 -9
- package/dist/services/markdown.js.map +1 -1
- package/dist/services/memory-service.d.ts +4 -0
- package/dist/services/memory-service.js +13 -1
- package/dist/services/memory-service.js.map +1 -1
- package/dist/services/sync/commit.d.ts +2 -0
- package/dist/services/sync/commit.js +21 -6
- package/dist/services/sync/commit.js.map +1 -1
- package/dist/services/sync/graphrag-indexer.js +2 -2
- package/dist/services/sync/graphrag-indexer.js.map +1 -1
- package/dist/utils/git.d.ts +5 -0
- package/dist/utils/git.js +10 -0
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/merge-resolver.d.ts +33 -8
- package/dist/utils/merge-resolver.js +157 -55
- package/dist/utils/merge-resolver.js.map +1 -1
- package/dist/utils/preflight.d.ts +1 -1
- package/dist/utils/preflight.js +1 -1
- package/dist/web/_app/env.js +1 -0
- package/dist/web/_app/immutable/assets/0.CDbX4Cwz.css +1 -0
- package/dist/web/_app/immutable/assets/2.DRHi7ABa.css +1 -0
- package/dist/web/_app/immutable/assets/3.BJy7pVXi.css +1 -0
- package/dist/web/_app/immutable/assets/4.Ad16uh9o.css +1 -0
- package/dist/web/_app/immutable/assets/5.BhKgiXd2.css +1 -0
- package/dist/web/_app/immutable/assets/6.CeHKR5ZY.css +1 -0
- package/dist/web/_app/immutable/assets/AppShell.CJtUfb0N.css +1 -0
- package/dist/web/_app/immutable/assets/ChatPanel.RFD5GGYI.css +1 -0
- package/dist/web/_app/immutable/assets/editor.CPAf2SRV.css +1 -0
- package/dist/web/_app/immutable/chunks/3_5VIr68.js +1 -0
- package/dist/web/_app/immutable/chunks/4QY4j-jX.js +1 -0
- package/dist/web/_app/immutable/chunks/BB_5th5W.js +3383 -0
- package/dist/web/_app/immutable/chunks/BButMJ6M.js +1 -0
- package/dist/web/_app/immutable/chunks/BiubvAUI.js +2 -0
- package/dist/web/_app/immutable/chunks/CAXuTUkp.js +1 -0
- package/dist/web/_app/immutable/chunks/CQENNNNl.js +6 -0
- package/dist/web/_app/immutable/chunks/CUzqHQY_.js +1 -0
- package/dist/web/_app/immutable/chunks/CV8ganSj.js +23 -0
- package/dist/web/_app/immutable/chunks/CYrVHOHA.js +1 -0
- package/dist/web/_app/immutable/chunks/CqkleIqs.js +1 -0
- package/dist/web/_app/immutable/chunks/DKyztuK9.js +1 -0
- package/dist/web/_app/immutable/chunks/DdNsM6oV.js +64 -0
- package/dist/web/_app/immutable/chunks/Dh_H7Owr.js +18 -0
- package/dist/web/_app/immutable/chunks/DnlgZ_Tk.js +5 -0
- package/dist/web/_app/immutable/chunks/DtVH--hH.js +6 -0
- package/dist/web/_app/immutable/chunks/F20aIBpJ.js +1 -0
- package/dist/web/_app/immutable/chunks/PPVm8Dsz.js +1 -0
- package/dist/web/_app/immutable/chunks/WSUKABI_.js +1 -0
- package/dist/web/_app/immutable/chunks/YFT1281h.js +2 -0
- package/dist/web/_app/immutable/chunks/aosHekRC.js +1 -0
- package/dist/web/_app/immutable/chunks/fwnBoL5x.js +1 -0
- package/dist/web/_app/immutable/chunks/hHxe9oXh.js +1 -0
- package/dist/web/_app/immutable/entry/app.BFVUP2fV.js +2 -0
- package/dist/web/_app/immutable/entry/start.BqsXHYP6.js +1 -0
- package/dist/web/_app/immutable/nodes/0.DQ5KdeNU.js +1 -0
- package/dist/web/_app/immutable/nodes/1.DwnzyOvm.js +1 -0
- package/dist/web/_app/immutable/nodes/2.FZxrWJeh.js +1 -0
- package/dist/web/_app/immutable/nodes/3.CQVWlbKr.js +1 -0
- package/dist/web/_app/immutable/nodes/4.CEh40Z_h.js +16 -0
- package/dist/web/_app/immutable/nodes/5.D_QsCLEf.js +4 -0
- package/dist/web/_app/immutable/nodes/6.CndEQ0o5.js +2 -0
- package/dist/web/_app/version.json +1 -0
- package/dist/web/index.html +43 -0
- package/package.json +21 -3
- package/dist/agent/skills/bundled/enrich-entities.md +0 -124
- package/dist/agent/skills/bundled/gather-context.md +0 -46
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Bt=Array.isArray,Gt=Array.prototype.indexOf,ie=Array.prototype.includes,Vn=Array.from,Un=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertyDescriptors,zt=Object.prototype,$t=Array.prototype,ot=Object.getPrototypeOf,et=Object.isExtensible;function Bn(e){return typeof e=="function"}const Xt=()=>{};function Gn(e){return e()}function Zt(e){for(var t=0;t<e.length;t++)e[t]()}function ut(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Kn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const m=2,ae=4,le=8,He=1<<24,$=16,L=32,X=64,Wt=128,O=512,E=1024,T=2048,F=4096,P=8192,V=16384,ve=32768,Ae=65536,tt=1<<17,Jt=1<<18,de=1<<19,ct=1<<20,zn=1<<25,re=65536,Me=1<<21,qe=1<<22,U=1<<23,te=Symbol("$state"),$n=Symbol("legacy props"),Xn=Symbol(""),W=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Wn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Jn=1,ke=3,_t=8;function Ve(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Qt(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Qn(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function en(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function tn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function nn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function rn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function er(){throw new Error("https://svelte.dev/e/hydration_failed")}function tr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function sn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function an(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function nr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const rr=1,sr=2,ar=4,fr=8,ir=16,lr=1,or=2,ur=4,cr=8,_r=16,vr=1,dr=2,ln="[",on="[!",hr="[?",un="]",Ue={},b=Symbol(),cn="http://www.w3.org/1999/xhtml",pr="http://www.w3.org/2000/svg",wr="http://www.w3.org/1998/Math/MathML",yr="@attach";function Be(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Er(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function br(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let G=!1;function mr(e){G=e}let S;function oe(e){if(e===null)throw Be(),Ue;return S=e}function gr(){return oe(Z(S))}function Tr(e){if(G){if(Z(S)!==null)throw Be(),Ue;S=e}}function Ar(e=1){if(G){for(var t=e,n=S;t--;)n=Z(n);S=n}}function xr(e=!0){for(var t=0,n=S;;){if(n.nodeType===_t){var r=n.data;if(r===un){if(t===0)return n;t-=1}else(r===ln||r===on||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=Z(n);e&&n.remove(),n=s}}function Sr(e){if(!e||e.nodeType!==_t)throw Be(),Ue;return e.data}function vt(e){return e===this.v}function _n(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function dt(e){return!_n(e,this.v)}let Ee=!1;function Rr(){Ee=!0}let p=null;function xe(e){p=e}function Nr(e){return Oe().get(e)}function kr(e,t){return Oe().set(e,t),t}function Or(e){return Oe().has(e)}function Dr(){return Oe()}function Cr(e,t=!1,n){p={p,i:!1,c:null,e:null,s:e,x:null,l:Ee&&!t?{s:null,u:null,$:[]}:null}}function Ir(e){var t=p,n=t.e;if(n!==null){t.e=null;for(var r of n)Dt(r)}return t.i=!0,p=t.p,{}}function be(){return!Ee||p!==null&&p.l===null}function Oe(e){return p===null&&Ve(),p.c??=new Map(vn(p)||void 0)}function vn(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let J=[];function ht(){var e=J;J=[],Zt(e)}function Pe(e){if(J.length===0&&!we){var t=J;queueMicrotask(()=>{t===J&&ht()})}J.push(e)}function dn(){for(;J.length>0;)ht()}function hn(e){var t=d;if(t===null)return v.f|=U,e;if((t.f&ve)===0&&(t.f&ae)===0)throw e;Se(e,t)}function Se(e,t){for(;t!==null;){if((t.f&Wt)!==0){if((t.f&ve)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const pn=-7169;function y(e,t){e.f=e.f&pn|t}function Ge(e){(e.f&O)!==0||e.deps===null?y(e,E):y(e,F)}function pt(e){if(e!==null)for(const t of e)(t.f&m)===0||(t.f&re)===0||(t.f^=re,pt(t.deps))}function wn(e,t,n){(e.f&T)!==0?t.add(e):(e.f&F)!==0&&n.add(e),pt(e.deps),y(e,E)}const ge=new Set;let w=null,nt=null,I=null,A=[],De=null,we=!1,ue=null;class fe{current=new Map;previous=new Map;#t=new Set;#s=new Set;#r=0;#a=0;#f=null;#i=new Set;#n=new Set;#e=new Map;is_fork=!1;#l=!1;#o(){return this.is_fork||this.#a>0}skip_effect(t){this.#e.has(t)||this.#e.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#e.get(t);if(n){this.#e.delete(t);for(var r of n.d)y(r,T),Y(r);for(r of n.m)y(r,F),Y(r)}}process(t){A=[],this.apply();var n=ue=[],r=[];for(const s of t)this.#u(s,n,r);if(ue=null,this.#o()){this.#c(r),this.#c(n);for(const[s,a]of this.#e)bt(s,a)}else{nt=this,w=null;for(const s of this.#t)s(this);this.#t.clear(),this.#r===0&&this.#_(),rt(r),rt(n),this.#i.clear(),this.#n.clear(),nt=null,this.#f?.resolve()}I=null}#u(t,n,r){t.f^=E;for(var s=t.first;s!==null;){var a=s.f,l=(a&(L|X))!==0,o=l&&(a&E)!==0,f=o||(a&P)!==0||this.#e.has(s);if(!f&&s.fn!==null){l?s.f^=E:(a&ae)!==0?n.push(s):me(s)&&((a&$)!==0&&this.#n.add(s),_e(s));var i=s.first;if(i!==null){s=i;continue}}for(;s!==null;){var u=s.next;if(u!==null){s=u;break}s=s.parent}}}#c(t){for(var n=0;n<t.length;n+=1)wn(t[n],this.#i,this.#n)}capture(t,n){n!==b&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&U)===0&&(this.current.set(t,t.v),I?.set(t,t.v))}activate(){w=this,this.apply()}deactivate(){w===this&&(w=null,I=null)}flush(){if(A.length>0)w=this,wt();else if(this.#r===0&&!this.is_fork){for(const t of this.#t)t(this);this.#t.clear(),this.#_(),this.#f?.resolve()}this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#_(){if(ge.size>1){this.previous.clear();var t=w,n=I,r=!0;for(const a of ge){if(a===this){r=!1;continue}const l=[];for(const[f,i]of this.current){if(a.current.has(f))if(r&&i!==a.current.get(f))a.current.set(f,i);else continue;l.push(f)}if(l.length===0)continue;const o=[...a.current.keys()].filter(f=>!this.current.has(f));if(o.length>0){var s=A;A=[];const f=new Set,i=new Map;for(const u of l)yt(u,o,f,i);if(A.length>0){w=a,a.apply();for(const u of A)a.#u(u,[],[]);a.deactivate()}A=s}}w=t,I=n}this.#e.clear(),ge.delete(this)}increment(t){this.#r+=1,t&&(this.#a+=1)}decrement(t){this.#r-=1,t&&(this.#a-=1),!this.#l&&(this.#l=!0,Pe(()=>{this.#l=!1,this.#o()?A.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#i)this.#n.delete(t),y(t,T),Y(t);for(const t of this.#n)y(t,F),Y(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#f??=ut()).promise}static ensure(){if(w===null){const t=w=new fe;ge.add(w),we||Pe(()=>{w===t&&t.flush()})}return w}apply(){}}function yn(e){var t=we;we=!0;try{for(var n;;){if(dn(),A.length===0&&(w?.flush(),A.length===0))return De=null,n;wt()}}finally{we=t}}function wt(){var e=null;try{for(var t=0;A.length>0;){var n=fe.ensure();if(t++>1e3){var r,s;En()}n.process(A),B.clear()}}finally{A=[],De=null,ue=null}}function En(){try{rn()}catch(e){Se(e,De)}}let j=null;function rt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|P))===0&&me(r)&&(j=new Set,_e(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&It(r),j?.size>0)){B.clear();for(const s of j){if((s.f&(V|P))!==0)continue;const a=[s];let l=s.parent;for(;l!==null;)j.has(l)&&(j.delete(l),a.push(l)),l=l.parent;for(let o=a.length-1;o>=0;o--){const f=a[o];(f.f&(V|P))===0&&_e(f)}}j.clear()}}j=null}}function yt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const a=s.f;(a&m)!==0?yt(s,t,n,r):(a&(qe|$))!==0&&(a&T)===0&&Et(s,t,r)&&(y(s,T),Y(s))}}function Et(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(ie.call(t,s))return!0;if((s.f&m)!==0&&Et(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Y(e){var t=De=e,n=t.b;if(n?.is_pending&&(e.f&(ae|le|He))!==0&&(e.f&ve)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(ue!==null&&t===d&&(e.f&le)===0)return;if((r&(X|L))!==0){if((r&E)===0)return;t.f^=E}}A.push(t)}function bt(e,t){if(!((e.f&L)!==0&&(e.f&E)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&F)!==0&&t.m.push(e),y(e,E);for(var n=e.first;n!==null;)bt(n,t),n=n.next}}function mt(e,t,n,r){const s=be()?Ke:gn;var a=e.filter(c=>!c.settled);if(n.length===0&&a.length===0){r(t.map(s));return}var l=d,o=bn(),f=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(c=>c.promise)):null;function i(c){o();try{r(c)}catch(_){(l.f&V)===0&&Se(_,l)}Fe()}if(n.length===0){f.then(()=>i(t.map(s)));return}function u(){o(),Promise.all(n.map(c=>mn(c))).then(c=>i([...t.map(s),...c])).catch(c=>Se(c,l))}f?f.then(u):u()}function bn(){var e=d,t=v,n=p,r=w;return function(a=!0){ce(e),z(t),xe(n),a&&r?.activate()}}function Fe(e=!0){ce(null),z(null),xe(null),e&&w?.deactivate()}function gt(){var e=d.b,t=w,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Ke(e){var t=m|T,n=v!==null&&(v.f&m)!==0?v:null;return d!==null&&(d.f|=de),{ctx:p,deps:null,effects:null,equals:vt,f:t,fn:e,reactions:null,rv:0,v:b,wv:0,parent:n??d,ac:null}}function mn(e,t,n){d===null&&Qt();var s=void 0,a=$e(b),l=!v,o=new Map;return Mn(()=>{var f=ut();s=f.promise;try{Promise.resolve(e()).then(f.resolve,f.reject).finally(Fe)}catch(_){f.reject(_),Fe()}var i=w;if(l){var u=gt();o.get(i)?.reject(W),o.delete(i),o.set(i,f)}const c=(_,g=void 0)=>{if(i.activate(),g)g!==W&&(a.f|=U,je(a,g));else{(a.f&U)!==0&&(a.f^=U),je(a,_);for(const[h,C]of o){if(o.delete(h),h===i)break;C.reject(W)}}u&&u()};f.promise.then(c,_=>c(null,_||"unknown"))}),Cn(()=>{for(const f of o.values())f.reject(W)}),new Promise(f=>{function i(u){function c(){u===s?f(a):i(s)}u.then(c,c)}i(s)})}function Mr(e){const t=Ke(e);return Ft(t),t}function gn(e){const t=Ke(e);return t.equals=dt,t}function Tn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)K(t[n])}}function An(e){for(var t=e.parent;t!==null;){if((t.f&m)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function ze(e){var t,n=d;ce(An(e));try{e.f&=~re,Tn(e),t=Ht(e)}finally{ce(n)}return t}function Tt(e){var t=ze(e);if(!e.equals(t)&&(e.wv=jt(),(!w?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){y(e,E);return}se||(I!==null?(Ot()||w?.is_fork)&&I.set(e,t):Ge(e))}function xn(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(W),t.teardown=Xt,t.ac=null,ye(t,0),We(t))}function At(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&_e(t)}let Le=new Set;const B=new Map;let xt=!1;function $e(e,t){var n={f:0,v:e,reactions:null,equals:vt,rv:0,wv:0};return n}function H(e,t){const n=$e(e);return Ft(n),n}function Pr(e,t=!1,n=!0){const r=$e(e);return t||(r.equals=dt),Ee&&n&&p!==null&&p.l!==null&&(p.l.s??=[]).push(r),r}function q(e,t,n=!1){v!==null&&(!M||(v.f&tt)!==0)&&be()&&(v.f&(m|$|qe|tt))!==0&&(D===null||!ie.call(D,e))&&fn();let r=n?he(t):t;return je(e,r)}function je(e,t){if(!e.equals(t)){var n=e.v;se?B.set(e,t):B.set(e,n),e.v=t;var r=fe.ensure();if(r.capture(e,n),(e.f&m)!==0){const s=e;(e.f&T)!==0&&ze(s),Ge(s)}e.wv=jt(),St(e,T),be()&&d!==null&&(d.f&E)!==0&&(d.f&(L|X))===0&&(k===null?jn([e]):k.push(e)),!r.is_fork&&Le.size>0&&!xt&&Sn()}return t}function Sn(){xt=!1;for(const e of Le)(e.f&E)!==0&&y(e,F),me(e)&&_e(e);Le.clear()}function Fr(e,t=1){var n=ee(e),r=t===1?n++:n--;return q(e,n),r}function Ie(e){q(e,e.v+1)}function St(e,t){var n=e.reactions;if(n!==null)for(var r=be(),s=n.length,a=0;a<s;a++){var l=n[a],o=l.f;if(!(!r&&l===d)){var f=(o&T)===0;if(f&&y(l,t),(o&m)!==0){var i=l;I?.delete(i),(o&re)===0&&(o&O&&(l.f|=re),St(i,F))}else f&&((o&$)!==0&&j!==null&&j.add(l),Y(l))}}}function he(e){if(typeof e!="object"||e===null||te in e)return e;const t=ot(e);if(t!==zt&&t!==$t)return e;var n=new Map,r=Bt(e),s=H(0),a=ne,l=o=>{if(ne===a)return o();var f=v,i=ne;z(null),lt(a);var u=o();return z(f),lt(i),u};return r&&n.set("length",H(e.length)),new Proxy(e,{defineProperty(o,f,i){(!("value"in i)||i.configurable===!1||i.enumerable===!1||i.writable===!1)&&sn();var u=n.get(f);return u===void 0?l(()=>{var c=H(i.value);return n.set(f,c),c}):q(u,i.value,!0),!0},deleteProperty(o,f){var i=n.get(f);if(i===void 0){if(f in o){const u=l(()=>H(b));n.set(f,u),Ie(s)}}else q(i,b),Ie(s);return!0},get(o,f,i){if(f===te)return e;var u=n.get(f),c=f in o;if(u===void 0&&(!c||pe(o,f)?.writable)&&(u=l(()=>{var g=he(c?o[f]:b),h=H(g);return h}),n.set(f,u)),u!==void 0){var _=ee(u);return _===b?void 0:_}return Reflect.get(o,f,i)},getOwnPropertyDescriptor(o,f){var i=Reflect.getOwnPropertyDescriptor(o,f);if(i&&"value"in i){var u=n.get(f);u&&(i.value=ee(u))}else if(i===void 0){var c=n.get(f),_=c?.v;if(c!==void 0&&_!==b)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return i},has(o,f){if(f===te)return!0;var i=n.get(f),u=i!==void 0&&i.v!==b||Reflect.has(o,f);if(i!==void 0||d!==null&&(!u||pe(o,f)?.writable)){i===void 0&&(i=l(()=>{var _=u?he(o[f]):b,g=H(_);return g}),n.set(f,i));var c=ee(i);if(c===b)return!1}return u},set(o,f,i,u){var c=n.get(f),_=f in o;if(r&&f==="length")for(var g=i;g<c.v;g+=1){var h=n.get(g+"");h!==void 0?q(h,b):g in o&&(h=l(()=>H(b)),n.set(g+"",h))}if(c===void 0)(!_||pe(o,f)?.writable)&&(c=l(()=>H(void 0)),q(c,he(i)),n.set(f,c));else{_=c.v!==b;var C=l(()=>he(i));q(c,C)}var Je=Reflect.getOwnPropertyDescriptor(o,f);if(Je?.set&&Je.set.call(u,i),!_){if(r&&typeof f=="string"){var Qe=n.get("length"),Ce=Number(f);Number.isInteger(Ce)&&Ce>=Qe.v&&q(Qe,Ce+1)}Ie(s)}return!0},ownKeys(o){ee(s);var f=Reflect.ownKeys(o).filter(c=>{var _=n.get(c);return _===void 0||_.v!==b});for(var[i,u]of n)u.v!==b&&!(i in o)&&f.push(i);return f},setPrototypeOf(){an()}})}function st(e){try{if(e!==null&&typeof e=="object"&&te in e)return e[te]}catch{}return e}function Lr(e,t){return Object.is(st(e),st(t))}var at,Rn,Nn,Rt,Nt;function jr(){if(at===void 0){at=window,Rn=document,Nn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Rt=pe(t,"firstChild").get,Nt=pe(t,"nextSibling").get,et(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),et(n)&&(n.__t=void 0)}}function Re(e=""){return document.createTextNode(e)}function Ne(e){return Rt.call(e)}function Z(e){return Nt.call(e)}function Yr(e,t){if(!G)return Ne(e);var n=Ne(S);if(n===null)n=S.appendChild(Re());else if(t&&n.nodeType!==ke){var r=Re();return n?.before(r),oe(r),r}return t&&Xe(n),oe(n),n}function Hr(e,t=!1){if(!G){var n=Ne(e);return n instanceof Comment&&n.data===""?Z(n):n}if(t){if(S?.nodeType!==ke){var r=Re();return S?.before(r),oe(r),r}Xe(S)}return S}function qr(e,t=1,n=!1){let r=G?S:e;for(var s;t--;)s=r,r=Z(r);if(!G)return r;if(n){if(r?.nodeType!==ke){var a=Re();return r===null?s?.after(a):r.before(a),oe(a),a}Xe(r)}return oe(r),r}function kn(e){e.textContent=""}function Vr(){return!1}function Ur(e,t,n){return document.createElementNS(t??cn,e,void 0)}function Xe(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===ke;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Br(e,t){if(t){const n=document.body;e.autofocus=!0,Pe(()=>{document.activeElement===n&&e.focus()})}}function Gr(e){G&&Ne(e)!==null&&kn(e)}let ft=!1;function On(){ft||(ft=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Ze(e){var t=v,n=d;z(null),ce(null);try{return e()}finally{z(t),ce(n)}}function Kr(e,t,n,r=n){e.addEventListener(t,()=>Ze(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),On()}function kt(e){d===null&&(v===null&&nn(),tn()),se&&en()}function Dn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function N(e,t){var n=d;n!==null&&(n.f&P)!==0&&(e|=P);var r={ctx:p,deps:null,nodes:null,f:e|T|O,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},s=r;if((e&ae)!==0)ue!==null?ue.push(r):Y(r);else if(t!==null){try{_e(r)}catch(l){throw K(r),l}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&de)===0&&(s=s.first,(e&$)!==0&&(e&Ae)!==0&&s!==null&&(s.f|=Ae))}if(s!==null&&(s.parent=n,n!==null&&Dn(s,n),v!==null&&(v.f&m)!==0&&(e&X)===0)){var a=v;(a.effects??=[]).push(s)}return r}function Ot(){return v!==null&&!M}function Cn(e){const t=N(le,null);return y(t,E),t.teardown=e,t}function In(e){kt();var t=d.f,n=!v&&(t&L)!==0&&(t&ve)===0;if(n){var r=p;(r.e??=[]).push(e)}else return Dt(e)}function Dt(e){return N(ae|ct,e)}function zr(e){return kt(),N(le|ct,e)}function $r(e){fe.ensure();const t=N(X|de,e);return()=>{K(t)}}function Xr(e){fe.ensure();const t=N(X|de,e);return(n={})=>new Promise(r=>{n.outro?Ln(t,()=>{K(t),r(void 0)}):(K(t),r(void 0))})}function Zr(e){return N(ae,e)}function Mn(e){return N(qe|de,e)}function Wr(e,t=0){return N(le|t,e)}function Jr(e,t=[],n=[],r=[]){mt(r,t,n,s=>{N(le,()=>e(...s.map(ee)))})}function Qr(e,t=[],n=[],r=[]){if(n.length>0||r.length>0)var s=gt();mt(r,t,n,a=>{N(ae,()=>e(...a.map(ee))),s&&s()})}function es(e,t=0){var n=N($|t,e);return n}function ts(e,t=0){var n=N(He|t,e);return n}function ns(e){return N(L|de,e)}function Ct(e){var t=e.teardown;if(t!==null){const n=se,r=v;it(!0),z(null);try{t.call(null)}finally{it(n),z(r)}}}function We(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Ze(()=>{s.abort(W)});var r=n.next;(n.f&X)!==0?n.parent=null:K(n,t),n=r}}function Pn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&L)===0&&K(t),t=n}}function K(e,t=!0){var n=!1;(t||(e.f&Jt)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Fn(e.nodes.start,e.nodes.end),n=!0),We(e,t&&!n),ye(e,0),y(e,V);var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)a.stop();Ct(e);var s=e.parent;s!==null&&s.first!==null&&It(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Fn(e,t){for(;e!==null;){var n=e===t?null:Z(e);e.remove(),e=n}}function It(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Ln(e,t,n=!0){var r=[];Mt(e,r,!0);var s=()=>{n&&K(e),t&&t()},a=r.length;if(a>0){var l=()=>--a||s();for(var o of r)o.out(l)}else s()}function Mt(e,t,n){if((e.f&P)===0){e.f^=P;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var s=e.first;s!==null;){var a=s.next,l=(s.f&Ae)!==0||(s.f&L)!==0&&(e.f&$)!==0;Mt(s,t,l?n:!1),s=a}}}function rs(e){Pt(e,!0)}function Pt(e,t){if((e.f&P)!==0){e.f^=P,(e.f&E)===0&&(y(e,T),Y(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Ae)!==0||(n.f&L)!==0;Pt(n,s?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(const l of a)(l.is_global||t)&&l.in()}}function ss(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Z(n);t.append(n),n=s}}let Te=!1,se=!1;function it(e){se=e}let v=null,M=!1;function z(e){v=e}let d=null;function ce(e){d=e}let D=null;function Ft(e){v!==null&&(D===null?D=[e]:D.push(e))}let x=null,R=0,k=null;function jn(e){k=e}let Lt=1,Q=0,ne=Q;function lt(e){ne=e}function jt(){return++Lt}function me(e){var t=e.f;if((t&T)!==0)return!0;if(t&m&&(e.f&=~re),(t&F)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var a=n[s];if(me(a)&&Tt(a),a.wv>e.wv)return!0}(t&O)!==0&&I===null&&y(e,E)}return!1}function Yt(e,t,n=!0){var r=e.reactions;if(r!==null&&!(D!==null&&ie.call(D,e)))for(var s=0;s<r.length;s++){var a=r[s];(a.f&m)!==0?Yt(a,t,!1):t===a&&(n?y(a,T):(a.f&E)!==0&&y(a,F),Y(a))}}function Ht(e){var t=x,n=R,r=k,s=v,a=D,l=p,o=M,f=ne,i=e.f;x=null,R=0,k=null,v=(i&(L|X))===0?e:null,D=null,xe(e.ctx),M=!1,ne=++Q,e.ac!==null&&(Ze(()=>{e.ac.abort(W)}),e.ac=null);try{e.f|=Me;var u=e.fn,c=u();e.f|=ve;var _=e.deps,g=w?.is_fork;if(x!==null){var h;if(g||ye(e,R),_!==null&&R>0)for(_.length=R+x.length,h=0;h<x.length;h++)_[R+h]=x[h];else e.deps=_=x;if(Ot()&&(e.f&O)!==0)for(h=R;h<_.length;h++)(_[h].reactions??=[]).push(e)}else!g&&_!==null&&R<_.length&&(ye(e,R),_.length=R);if(be()&&k!==null&&!M&&_!==null&&(e.f&(m|F|T))===0)for(h=0;h<k.length;h++)Yt(k[h],e);if(s!==null&&s!==e){if(Q++,s.deps!==null)for(let C=0;C<n;C+=1)s.deps[C].rv=Q;if(t!==null)for(const C of t)C.rv=Q;k!==null&&(r===null?r=k:r.push(...k))}return(e.f&U)!==0&&(e.f^=U),c}catch(C){return hn(C)}finally{e.f^=Me,x=t,R=n,k=r,v=s,D=a,xe(l),M=o,ne=f}}function Yn(e,t){let n=t.reactions;if(n!==null){var r=Gt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&m)!==0&&(x===null||!ie.call(x,t))){var a=t;(a.f&O)!==0&&(a.f^=O,a.f&=~re),Ge(a),xn(a),ye(a,0)}}function ye(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Yn(e,n[r])}function _e(e){var t=e.f;if((t&V)===0){y(e,E);var n=d,r=Te;d=e,Te=!0;try{(t&($|He))!==0?Pn(e):We(e),Ct(e);var s=Ht(e);e.teardown=typeof s=="function"?s:null,e.wv=Lt;var a}finally{Te=r,d=n}}}async function as(){await Promise.resolve(),yn()}function fs(){return fe.ensure().settled()}function ee(e){var t=e.f,n=(t&m)!==0;if(v!==null&&!M){var r=d!==null&&(d.f&V)!==0;if(!r&&(D===null||!ie.call(D,e))){var s=v.deps;if((v.f&Me)!==0)e.rv<Q&&(e.rv=Q,x===null&&s!==null&&s[R]===e?R++:x===null?x=[e]:x.push(e));else{(v.deps??=[]).push(e);var a=e.reactions;a===null?e.reactions=[v]:ie.call(a,v)||a.push(v)}}}if(se&&B.has(e))return B.get(e);if(n){var l=e;if(se){var o=l.v;return((l.f&E)===0&&l.reactions!==null||Vt(l))&&(o=ze(l)),B.set(l,o),o}var f=(l.f&O)===0&&!M&&v!==null&&(Te||(v.f&O)!==0),i=(l.f&ve)===0;me(l)&&(f&&(l.f|=O),Tt(l)),f&&!i&&(At(l),qt(l))}if(I?.has(e))return I.get(e);if((e.f&U)!==0)throw e.v;return e.v}function qt(e){if(e.f|=O,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&m)!==0&&(t.f&O)===0&&(At(t),qt(t))}function Vt(e){if(e.v===b)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(B.has(t)||(t.f&m)!==0&&Vt(t))return!0;return!1}function Ut(e){var t=M;try{return M=!0,e()}finally{M=t}}function is(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(te in e)Ye(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&te in n&&Ye(n)}}}function Ye(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ye(e[r],t)}catch{}const n=ot(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Kt(n);for(let s in r){const a=r[s].get;if(a)try{a.call(e)}catch{}}}}}function Hn(e){p===null&&Ve(),Ee&&p.l!==null?qn(p).m.push(e):In(()=>{const t=Ut(e);if(typeof t=="function")return t})}function ls(e){p===null&&Ve(),Hn(()=>()=>Ut(e))}function qn(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{Rn as $,In as A,Ut as B,Zt as C,Gn as D,Ae as E,ee as F,is as G,ln as H,Ke as I,Rr as J,Jt as K,de as L,_t as M,Z as N,Ne as O,H as P,he as Q,kr as R,Hn as S,q as T,Qr as U,Hr as V,Fr as W,at as X,Mr as Y,Ot as Z,Wr as _,gr as a,ot as a$,$e as a0,Ie as a1,Pe as a2,d as a3,Wt as a4,on as a5,hr as a6,fe as a7,y as a8,T as a9,tr as aA,se as aB,V as aC,_r as aD,cr as aE,Ee as aF,or as aG,lr as aH,gn as aI,yn as aJ,Un as aK,Pr as aL,as as aM,Cn as aN,Ze as aO,Ur as aP,Nn as aQ,vr as aR,dr as aS,ve as aT,ke as aU,Xe as aV,ts as aW,Bt as aX,Er as aY,Lr as aZ,cn as a_,Y as aa,F as ab,wn as ac,ce as ad,z as ae,xe as af,hn as ag,v as ah,je as ai,Se as aj,nr as ak,br as al,jr as am,Ue as an,er as ao,kn as ap,Xr as aq,Vn as ar,un as as,Be as at,Zr as au,te as av,ur as aw,Bn as ax,$n as ay,pe as az,es as b,mt as b0,yr as b1,Wn as b2,Br as b3,b as b4,On as b5,Xn as b6,Kt as b7,Fn as b8,pr as b9,wr as ba,Gr as bb,ls as bc,Qn as bd,ar as be,sr as bf,rr as bg,ir as bh,zn as bi,P as bj,L as bk,fr as bl,Jn as bm,Kr as bn,nt as bo,Kn as bp,Xt as bq,be as br,ne as bs,Or as bt,Dr as bu,$r as bv,_n as bw,fs as bx,oe as c,mr as d,S as e,rs as f,K as g,G as h,Re as i,ns as j,w as k,Vr as l,ss as m,Cr as n,Nr as o,Ln as p,Ir as q,Sr as r,xr as s,Yr as t,qr as u,Ar as v,Tr as w,Jr as x,p as y,zr as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aN as x,a2 as A,aO as P,aK as C,ae as b,ad as y,ah as I,a3 as g,aP as R,i as m,O as p,aQ as V,aR as D,aS as W,h as d,e as i,aT as $,a as M,M as B,aU as H,c as U,aV as j}from"./fwnBoL5x.js";function re(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const q=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function ae(e){return q.includes(e)}const F={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function ne(e){return e=e.toLowerCase(),F[e]??e}const G=["touchstart","touchmove"];function oe(e){return G.includes(e)}const X=["textarea","script","style","title"];function se(e){return X.includes(e)}const f=Symbol("events"),z=new Set,K=new Set;function L(e,t,r,o={}){function n(a){if(o.capture||Q.call(t,a),!a.cancelBubble)return P(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?A(()=>{t.addEventListener(e,n,o)}):t.addEventListener(e,n,o),n}function ie(e,t,r,o={}){var n=L(t,e,r,o);return()=>{e.removeEventListener(t,n,o)}}function ue(e,t,r,o,n){var a={capture:o,passive:n},s=L(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&x(()=>{t.removeEventListener(e,s,a)})}function le(e,t,r){(t[f]??={})[e]=r}function ce(e){for(var t=0;t<e.length;t++)z.add(e[t]);for(var r of K)r(e)}let N=null;function Q(e){var t=this,r=t.ownerDocument,o=e.type,n=e.composedPath?.()||[],a=n[0]||e.target;N=e;var s=0,c=N===e&&e[f];if(c){var u=n.indexOf(c);if(u!==-1&&(t===document||t===window)){e[f]=t;return}var w=n.indexOf(t);if(w===-1)return;u<=w&&(s=u)}if(a=n[s]||e.target,a!==t){C(e,"currentTarget",{configurable:!0,get(){return a||r}});var O=I,k=g;b(null),y(null);try{for(var _,E=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var T=a[f]?.[o];T!=null&&(!a.disabled||e.target===a)&&T.call(a,e)}catch(v){_?E.push(v):_=v}if(e.cancelBubble||h===t||h===null)break;a=h}if(_){for(let v of E)queueMicrotask(()=>{throw v});throw _}}finally{e[f]=t,delete e.currentTarget,b(O),y(k)}}}const J=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Y(e){return J?.createHTML(e)??e}function S(e){var t=R("template");return t.innerHTML=Y(e.replaceAll("<!>","<!---->")),t.content}function l(e,t){var r=g;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function de(e,t){var r=(t&D)!==0,o=(t&W)!==0,n,a=!e.startsWith("<!>");return()=>{if(d)return l(i,null),i;n===void 0&&(n=S(a?e:"<!>"+e),r||(n=p(n)));var s=o||V?document.importNode(n,!0):n.cloneNode(!0);if(r){var c=p(s),u=s.lastChild;l(c,u)}else l(s,s);return s}}function Z(e,t,r="svg"){var o=!e.startsWith("<!>"),n=`<${r}>${o?e:"<!>"+e}</${r}>`,a;return()=>{if(d)return l(i,null),i;if(!a){var s=S(n),c=p(s);a=p(c)}var u=a.cloneNode(!0);return l(u,u),u}}function fe(e,t){return Z(e,t,"svg")}function _e(e=""){if(!d){var t=m(e+"");return l(t,t),t}var r=i;return r.nodeType!==H?(r.before(r=m()),U(r)):j(r),l(r,r),r}function ve(){if(d)return l(i,null),i;var e=document.createDocumentFragment(),t=document.createComment(""),r=m();return e.append(t,r),l(t,r),e}function pe(e,t){if(d){var r=g;((r.f&$)===0||r.nodes.end===null)&&(r.nodes.end=i),M();return}e!==null&&e.before(t)}function he(){if(d&&i&&i.nodeType===B&&i.textContent?.startsWith("$")){const e=i.textContent.substring(1);return M(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}const ee="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ee);export{pe as a,z as b,l as c,ve as d,ue as e,de as f,ce as g,Q as h,oe as i,le as j,re as k,L as l,ae as m,ne as n,se as o,fe as p,ie as q,K as r,he as s,_e as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DQ5KdeNU.js","../chunks/hHxe9oXh.js","../chunks/fwnBoL5x.js","../chunks/YFT1281h.js","../chunks/3_5VIr68.js","../assets/0.CDbX4Cwz.css","../nodes/1.DwnzyOvm.js","../chunks/CAXuTUkp.js","../chunks/BiubvAUI.js","../chunks/DKyztuK9.js","../nodes/2.FZxrWJeh.js","../chunks/BButMJ6M.js","../chunks/CV8ganSj.js","../assets/AppShell.CJtUfb0N.css","../chunks/DdNsM6oV.js","../assets/ChatPanel.RFD5GGYI.css","../assets/2.DRHi7ABa.css","../nodes/3.CQVWlbKr.js","../chunks/CQENNNNl.js","../chunks/F20aIBpJ.js","../chunks/PPVm8Dsz.js","../assets/editor.CPAf2SRV.css","../assets/3.BJy7pVXi.css","../nodes/4.CEh40Z_h.js","../chunks/CqkleIqs.js","../assets/4.Ad16uh9o.css","../nodes/5.D_QsCLEf.js","../assets/5.BhKgiXd2.css","../nodes/6.CndEQ0o5.js","../assets/6.CeHKR5ZY.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as l}from"../chunks/PPVm8Dsz.js";import{T as E,ay as F,F as m,aJ as G,aK as J,aL as K,n as B,z as H,A as N,S as Q,aM as U,V as y,u as W,q as X,P as b,t as Z,w as $,x as tt,Y as p}from"../chunks/fwnBoL5x.js";import{h as et,m as rt,u as at,s as st}from"../chunks/BiubvAUI.js";import{a as h,d as P,f as w,t as ot}from"../chunks/hHxe9oXh.js";import{p as O,i as R,b as x}from"../chunks/BButMJ6M.js";import{c as A}from"../chunks/F20aIBpJ.js";function nt(s){return class extends it{constructor(t){super({component:s,...t})}}}class it{#e;#t;constructor(t){var a=new Map,n=(e,r)=>{var c=K(r,!1,!1);return a.set(e,c),c};const i=new Proxy({...t.props||{},$$events:{}},{get(e,r){return m(a.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===F?!0:(m(a.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,c){return E(a.get(r)??n(r,c),c),Reflect.set(e,r,c)}});this.#t=(t.hydrate?et:rt)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&G(),this.#e=i.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||J(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(i,e)},this.#t.$destroy=()=>{at(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const n=(...i)=>a.call(this,...i);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}const Et={};var ct=w('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),mt=w("<!> <!>",1);function ut(s,t){B(t,!0);let a=O(t,"components",23,()=>[]),n=O(t,"data_0",3,null),i=O(t,"data_1",3,null);H(()=>t.stores.page.set(t.page)),N(()=>{t.stores,t.page,t.constructors,a(),t.form,n(),i(),t.stores.page.notify()});let e=b(!1),r=b(!1),c=b(null);Q(()=>{const o=t.stores.page.subscribe(()=>{m(e)&&(E(r,!0),U().then(()=>{E(c,document.title||"untitled page",!0)}))});return E(e,!0),o});const I=p(()=>t.constructors[1]);var L=mt(),T=y(L);{var j=o=>{const u=p(()=>t.constructors[0]);var d=P(),v=y(d);A(v,()=>m(u),(_,f)=>{x(f(_,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(g,_t)=>{var V=P(),M=y(V);A(M,()=>m(I),(Y,q)=>{x(q(Y,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),z=>a()[1]=z,()=>a()?.[1])}),h(g,V)},$$slots:{default:!0}}),g=>a()[0]=g,()=>a()?.[0])}),h(o,d)},k=o=>{const u=p(()=>t.constructors[0]);var d=P(),v=y(d);A(v,()=>m(u),(_,f)=>{x(f(_,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),g=>a()[0]=g,()=>a()?.[0])}),h(o,d)};R(T,o=>{t.constructors[1]?o(j):o(k,!1)})}var C=W(T,2);{var S=o=>{var u=ct(),d=Z(u);{var v=_=>{var f=ot();tt(()=>st(f,m(c))),h(_,f)};R(d,_=>{m(r)&&_(v)})}$(u),h(o,u)};R(C,o=>{m(e)&&o(S)})}h(s,L),X()}const bt=nt(ut),pt=[()=>l(()=>import("../nodes/0.DQ5KdeNU.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>l(()=>import("../nodes/1.DwnzyOvm.js"),__vite__mapDeps([6,1,2,7,8,9]),import.meta.url),()=>l(()=>import("../nodes/2.FZxrWJeh.js"),__vite__mapDeps([10,1,2,7,8,11,4,12,3,9,13,14,15,16]),import.meta.url),()=>l(()=>import("../nodes/3.CQVWlbKr.js"),__vite__mapDeps([17,3,2,4,1,8,11,12,9,7,13,14,15,18,19,20,21,22]),import.meta.url),()=>l(()=>import("../nodes/4.CEh40Z_h.js"),__vite__mapDeps([23,3,2,4,1,8,11,12,9,7,13,14,15,18,19,20,21,24,25]),import.meta.url),()=>l(()=>import("../nodes/5.D_QsCLEf.js"),__vite__mapDeps([26,3,2,4,1,8,11,12,9,7,13,27]),import.meta.url),()=>l(()=>import("../nodes/6.CndEQ0o5.js"),__vite__mapDeps([28,3,2,4,1,11,12,9,8,7,13,14,15,20,29]),import.meta.url)],Pt=[],Ot={"/":[2],"/graph":[6],"/[repo]/[type]/[id]":[3],"/[repo]/[type]/[id]/edit":[5],"/[repo]/[type]/[id]/[...path]":[4]},D={handleError:(({error:s})=>{console.error(s)}),reroute:(()=>{}),transport:{}},dt=Object.fromEntries(Object.entries(D.transport).map(([s,t])=>[s,t.decode])),Rt=Object.fromEntries(Object.entries(D.transport).map(([s,t])=>[s,t.encode])),xt=!1,At=(s,t)=>dt[s](t);export{At as decode,dt as decoders,Ot as dictionary,Rt as encoders,xt as hash,D as hooks,Et as matchers,pt as nodes,bt as root,Pt as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,a as r}from"../chunks/DKyztuK9.js";export{o as load_css,r as start};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v,f as E}from"../chunks/hHxe9oXh.js";import{i as S,b as w,K as O,L as x,h as c,M as C,N as g,d as u,c as h,e as b,O as k,n as F,P as f,Q as I,R as p,A as T,F as a,S as A,x as M,q as D,T as n,U as N,t as R,w as q,$ as L}from"../chunks/fwnBoL5x.js";import{s as P,w as y,g as V,a as $}from"../chunks/YFT1281h.js";function H(d,l){let o=null,t=c;var i;if(c){o=b;for(var e=k(document.head);e!==null&&(e.nodeType!==C||e.data!==d);)e=g(e);if(e===null)u(!1);else{var s=g(e);e.remove(),h(s)}}c||(i=document.head.appendChild(S()));try{w(()=>l(i),O|x)}finally{t&&(u(!0),h(o))}}var K=E('<div style="display: contents;"><!></div>');function B(d,l){F(l,!0);const o=typeof localStorage<"u"?localStorage.getItem("theme"):null;let t=f(I(o==="light"?"light":"dark"));p("theme",{get current(){return a(t)},toggle(){n(t,a(t)==="dark"?"light":"dark",!0),localStorage.setItem("theme",a(t))}});const e=typeof localStorage<"u"?localStorage.getItem("chatOpen"):null;let s=f(e==="true");p("chat",{get open(){return a(s)},toggle(){n(s,!a(s)),localStorage.setItem("chatOpen",String(a(s)))},close(){n(s,!1),localStorage.setItem("chatOpen","false")}}),T(()=>{document.documentElement.setAttribute("data-theme",a(t))}),A(()=>{y.load(),V.refreshAll(),window.addEventListener("sg-theme-change",m=>{n(t,m.detail,!0)})});var r=K();H("12qhfyh",m=>{N(()=>{L.title=(y.name||"Studiograph")??""})});var _=R(r);P(_,()=>l.children),q(r),M(()=>$(r,"data-theme",a(t))),v(d,r),D()}export{B as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,f as h}from"../chunks/hHxe9oXh.js";import{i as g}from"../chunks/CAXuTUkp.js";import{n as l,V as v,x as d,q as x,t as a,w as e,u as _}from"../chunks/fwnBoL5x.js";import{s as o}from"../chunks/BiubvAUI.js";import{s as $,p}from"../chunks/DKyztuK9.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=h("<h1> </h1> <p> </p>",1);function y(i,f){l(f,!1),g();var t=b(),r=v(t),n=a(r,!0);e(r);var s=_(r,2),c=a(s,!0);e(s),d(()=>{o(n,m.status),o(c,m.error?.message)}),u(i,t),x()}export{y as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v,f as d}from"../chunks/hHxe9oXh.js";import{i as b}from"../chunks/CAXuTUkp.js";import{n as y,o as C,q as S,t,u as l,v as V,w as e,x as k}from"../chunks/fwnBoL5x.js";import{s as A}from"../chunks/BiubvAUI.js";import{i as m}from"../chunks/BButMJ6M.js";import{n as P,A as q}from"../chunks/CV8ganSj.js";import{V as E,C as L}from"../chunks/DdNsM6oV.js";import{w as p}from"../chunks/YFT1281h.js";var T=d('<h2 class="svelte-1uha8ag"> </h2>'),W=d('<div class="content-row svelte-1uha8ag"><div class="entity-area svelte-1uha8ag"><!> <div class="welcome svelte-1uha8ag"><!> <p class="svelte-1uha8ag">Select an entity from the sidebar to get started.</p></div></div> <!></div>');function K(c,f){y(f,!1);const h=C("chat");P.showEntity(),b(),q(c,{children:(g,j)=>{var o=W(),s=t(o),i=t(s);E(i,{activeView:"entity"});var n=l(i,2),u=t(n);{var _=a=>{var r=T(),$=t(r);e(r),k(()=>A($,`Welcome to ${(p.name||"Studiograph")??""}`)),v(a,r)};m(u,a=>{p.nameLoaded&&a(_)})}V(2),e(n),e(s);var w=l(s,2);{var x=a=>{L(a,{})};m(w,a=>{h.open&&a(x)})}e(o),v(g,o)},$$slots:{default:!0}}),S()}export{K as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as lt,g as vt,w as z,c as ut,b as ft,a as yt}from"../chunks/YFT1281h.js";import{e as mt,a as y,f as _}from"../chunks/hHxe9oXh.js";import{n as _t,o as ht,P as m,Q as gt,A as Q,F as a,T as c,W as pt,q as bt,X as xt,t as v,u,Y as E,V as Ct,w as l,x as K}from"../chunks/fwnBoL5x.js";import{s as M}from"../chunks/BiubvAUI.js";import{i as w}from"../chunks/BButMJ6M.js";import{n as I,A as kt,e as wt,i as St}from"../chunks/CV8ganSj.js";import{g as X}from"../chunks/DKyztuK9.js";import{c as At,V as Pt,C as Tt}from"../chunks/DdNsM6oV.js";import{e as o,I as Et,C as Kt,t as Mt}from"../chunks/CQENNNNl.js";const It=async({params:S,fetch:t})=>{const{repo:C,type:h,id:g}=S,p=await lt(C,h,g);return{repo:C,type:h,id:g,entity:p}},Gt=Object.freeze(Object.defineProperty({__proto__:null,load:It},Symbol.toStringTag,{value:"Module"}));var Ot=_('<span class="bc-sep svelte-1dc9loe">/</span>'),Vt=_("<!><span> </span>",1),Ft=_('<span class="status-text saving svelte-1dc9loe">Saving...</span>'),Rt=_('<span class="status-text error svelte-1dc9loe"> </span>'),jt=_('<a class="action-btn open-app svelte-1dc9loe"> </a>'),Dt=_('<div class="content-row svelte-1dc9loe"><div class="entity-area svelte-1dc9loe"><!> <div class="editor-bar svelte-1dc9loe"><div class="breadcrumb-path svelte-1dc9loe"></div> <div class="editor-actions svelte-1dc9loe"><!> <!></div></div> <div class="document-scroll svelte-1dc9loe"><!> <!></div></div> <!></div>');function Jt(S,t){_t(t,!0);const C=ht("chat"),h=E(()=>z.getAppForEntityType(t.data.entity.document?.frontmatter?.entity_type??t.data.type)),g=E(()=>()=>{const e=t.data.entity.path;if(e){const r=e.lastIndexOf(`/${t.data.repo}/`);if(r>=0)return e.substring(r+1).split("/")}return[t.data.repo,t.data.id,"main.md"]});let p=m(""),d=m(gt({})),O=m(0);const Y=E(()=>Mt(a(d)));let k=m(""),V=m(0),F=m(0);Q(()=>{const e=`${t.data.repo}/${t.data.type}/${t.data.id}`,r=vt.revertCount,i=At.mutationCount;(e!==a(k)||r!==a(V)||i!==a(F))&&(a(k)&&e!==a(k)&&o.flush(),c(k,e),c(V,r,!0),c(F,i,!0),c(p,(t.data.entity.document?.content??"").trim(),!0),c(d,{...t.data.entity.document?.frontmatter??t.data.entity.data??{}},!0),pt(O),o.reset())}),Q(()=>{I.select(t.data.repo,t.data.type,t.data.id),I.showEntity()});function B(e){c(p,e,!0),o.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{content:e})}function G(e,r){c(d,{...a(d),[e]:r},!0),o.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:a(d)})}function J(e){const{[e]:r,...i}=a(d);c(d,i,!0),o.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:a(d)})}function N(e,r){c(d,{...a(d),[e]:r},!0),o.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:a(d)})}function U(e,r){o.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:a(d)})}function Z(e){for(const r of z.repos){const i=r.entities.find(b=>b.id===e);if(i){X(`/${r.name}/${i.entityType}/${i.id}`);return}}}function $(e){(e.metaKey||e.ctrlKey)&&e.key==="s"&&(e.preventDefault(),o.flush()),e.key==="Escape"&&!(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)&&(o.flush(),I.deselect(),X("/"))}mt("keydown",xt,$),kt(S,{children:(e,r)=>{var i=Dt(),b=v(i),R=v(b);Pt(R,{activeView:"entity"});var A=u(R,2),P=v(A);wt(P,21,()=>a(g)(),St,(n,s,f)=>{var W=Vt(),q=Ct(W);{var it=x=>{var ct=Ot();y(x,ct)};w(q,x=>{f>0&&x(it)})}var T=u(q),st=v(T,!0);l(T),K(x=>{ft(T,1,x,"svelte-1dc9loe"),M(st,a(s))},[()=>ut(f===a(g)().length-1?"bc-current":"bc-segment")]),y(n,W)}),l(P);var j=u(P,2),D=v(j);{var tt=n=>{var s=Ft();y(n,s)},et=n=>{var s=Rt(),f=v(s,!0);l(s),K(()=>M(f,o.error)),y(n,s)};w(D,n=>{o.saving?n(tt):o.error&&n(et,1)})}var at=u(D,2);{var nt=n=>{var s=jt(),f=v(s);l(s),K(()=>{yt(s,"href",`/${t.data.repo??""}/${t.data.type??""}/${t.data.id??""}/edit`),M(f,`Open in ${a(h).name??""} →`)}),y(n,s)};w(at,n=>{a(h)&&n(nt)})}l(j),l(A);var H=u(A,2),L=v(H);Et(L,{get properties(){return a(Y)},editable:!0,onedit:G,onremove:J,onadd:N,ontypechange:U});var rt=u(L,2);Kt(rt,{get content(){return a(p)},readonly:!1,onchange:B,onsave:()=>o.flush(),onwikilinkclick:Z,get resetKey(){return a(O)}}),l(H),l(b);var ot=u(b,2);{var dt=n=>{Tt(n,{})};w(ot,n=>{C.open&&n(dt)})}l(i),y(e,i)},$$slots:{default:!0}}),bt()}export{Jt as component,Gt as universal};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{d as Qt,r as jt,e as zt,b as Jt,c as Zt,w as Vt}from"../chunks/YFT1281h.js";import{g as Yt,j as ht,a as nt,f as it,e as Xt}from"../chunks/hHxe9oXh.js";import{n as Nt,P as yt,Q as Dt,A as Ft,t as U,u as X,F as l,w as z,x as At,T as N,v as Gt,q as Bt,o as $t,W as te,Y as Rt,X as ee,V as re}from"../chunks/fwnBoL5x.js";import{s as Mt}from"../chunks/BiubvAUI.js";import{i as Et,b as ne}from"../chunks/BButMJ6M.js";import{e as St,X as qt,i as Ot,P as Kt,n as It,A as ie}from"../chunks/CV8ganSj.js";import{g as se}from"../chunks/DKyztuK9.js";import{V as ae,C as oe}from"../chunks/DdNsM6oV.js";import{e as ft,I as le,C as ue,t as he}from"../chunks/CQENNNNl.js";import{g as fe}from"../chunks/CqkleIqs.js";const de=async({params:O})=>{const{repo:v,type:w,id:a,path:F}=O,W=await Qt(v,w,a,F);return{repo:v,type:w,id:a,filePath:F,fileName:F.split("/").pop()??F,content:W}},Ie=Object.freeze(Object.defineProperty({__proto__:null,load:de},Symbol.toStringTag,{value:"Module"}));var xt={exports:{}};var ce=xt.exports,Wt;function pe(){return Wt||(Wt=1,(function(O,v){((w,a)=>{O.exports=a()})(ce,function w(){var a=typeof self<"u"?self:typeof window<"u"?window:a!==void 0?a:{},F,W=!a.document&&!!a.postMessage,H=a.IS_PAPA_WORKER||!1,J={},dt=0,d={};function Z(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var r=lt(e);r.chunkSize=parseInt(r.chunkSize),e.step||e.chunk||(r.chunkSize=null),this._handle=new vt(r),(this._handle.streamer=this)._config=r}).call(this,t),this.parseChunk=function(e,r){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let y=this._config.newline;y||(i=this._config.quoteChar||'"',y=this._handle.guessLineEndings(e,i)),e=[...e.split(y).slice(s)].join(y)}this.isFirstChunk&&m(this._config.beforeFirstChunk)&&(i=this._config.beforeFirstChunk(e))!==void 0&&(e=i),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e,i=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=i.meta.cursor,s=(this._finished||(this._partialLine=s.substring(e-this._baseIndex),this._baseIndex=e),i&&i.data&&(this._rowCount+=i.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),H)a.postMessage({results:i,workerId:d.WORKER_ID,finished:s});else if(m(this._config.chunk)&&!r){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=i=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!s||!m(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||i&&i.meta.paused||this._nextChunk(),i}this._halted=!0},this._sendError=function(e){m(this._config.error)?this._config.error(e):H&&this._config.error&&a.postMessage({workerId:d.WORKER_ID,error:e,finished:!1})}}function $(t){var e;(t=t||{}).chunkSize||(t.chunkSize=d.RemoteChunkSize),Z.call(this,t),this._nextChunk=W?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(r){this._input=r,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),W||(e.onload=b(this._chunkLoaded,this),e.onerror=b(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!W),this._config.downloadRequestHeaders){var r,s=this._config.downloadRequestHeaders;for(r in s)e.setRequestHeader(r,s[r])}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+i));try{e.send(this._config.downloadRequestBody)}catch(y){this._chunkError(y.message)}W&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=(r=>(r=r.getResponseHeader("Content-Range"))!==null?parseInt(r.substring(r.lastIndexOf("/")+1)):-1)(e),this.parseChunk(e.responseText)))},this._chunkError=function(r){r=e.statusText||r,this._sendError(new Error(r))}}function st(t){(t=t||{}).chunkSize||(t.chunkSize=d.LocalChunkSize),Z.call(this,t);var e,r,s=typeof FileReader<"u";this.stream=function(i){this._input=i,r=i.slice||i.webkitSlice||i.mozSlice,s?((e=new FileReader).onload=b(this._chunkLoaded,this),e.onerror=b(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var i=this._input,y=(this._config.chunkSize&&(y=Math.min(this._start+this._config.chunkSize,this._input.size),i=r.call(i,this._start,y)),e.readAsText(i,this._config.encoding));s||this._chunkLoaded({target:{result:y}})},this._chunkLoaded=function(i){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(i.target.result)},this._chunkError=function(){this._sendError(e.error)}}function at(t){var e;Z.call(this,t=t||{}),this.stream=function(r){return e=r,this._nextChunk()},this._nextChunk=function(){var r,s;if(!this._finished)return r=this._config.chunkSize,e=r?(s=e.substring(0,r),e.substring(r)):(s=e,""),this._finished=!e,this.parseChunk(s)}}function L(t){Z.call(this,t=t||{});var e=[],r=!0,s=!1;this.pause=function(){Z.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){Z.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(i){this._input=i,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):r=!0},this._streamData=b(function(i){try{e.push(typeof i=="string"?i:i.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(y){this._streamError(y)}},this),this._streamError=b(function(i){this._streamCleanUp(),this._sendError(i)},this),this._streamEnd=b(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=b(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function vt(t){var e,r,s,i,y=Math.pow(2,53),M=-y,u=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,h=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,n=this,R=0,f=0,q=!1,_=!1,c=[],o={data:[],errors:[],meta:{}};function D(k){return t.skipEmptyLines==="greedy"?k.join("").trim()==="":k.length===1&&k[0].length===0}function g(){if(o&&s&&(B("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+d.DefaultDelimiter+"'"),s=!1),t.skipEmptyLines&&(o.data=o.data.filter(function(p){return!D(p)})),A()){let p=function(j,K){m(t.transformHeader)&&(j=t.transformHeader(j,K)),c.push(j)};if(o)if(Array.isArray(o.data[0])){for(var k=0;A()&&k<o.data.length;k++)o.data[k].forEach(p);o.data.splice(0,1)}else o.data.forEach(p)}function C(p,j){for(var K=t.header?{}:[],x=0;x<p.length;x++){var T=x,S=p[x],S=((G,E)=>(I=>(t.dynamicTypingFunction&&t.dynamicTyping[I]===void 0&&(t.dynamicTyping[I]=t.dynamicTypingFunction(I)),(t.dynamicTyping[I]||t.dynamicTyping)===!0))(G)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((I=>{if(u.test(I)&&(I=parseFloat(I),M<I&&I<y))return 1})(E)?parseFloat(E):h.test(E)?new Date(E):E===""?null:E):E)(T=t.header?x>=c.length?"__parsed_extra":c[x]:T,S=t.transform?t.transform(S,T):S);T==="__parsed_extra"?(K[T]=K[T]||[],K[T].push(S)):K[T]=S}return t.header&&(x>c.length?B("FieldMismatch","TooManyFields","Too many fields: expected "+c.length+" fields but parsed "+x,f+j):x<c.length&&B("FieldMismatch","TooFewFields","Too few fields: expected "+c.length+" fields but parsed "+x,f+j)),K}var P;o&&(t.header||t.dynamicTyping||t.transform)&&(P=1,!o.data.length||Array.isArray(o.data[0])?(o.data=o.data.map(C),P=o.data.length):o.data=C(o.data,0),t.header&&o.meta&&(o.meta.fields=c),f+=P)}function A(){return t.header&&c.length===0}function B(k,C,P,p){k={type:k,code:C,message:P},p!==void 0&&(k.row=p),o.errors.push(k)}m(t.step)&&(i=t.step,t.step=function(k){o=k,A()?g():(g(),o.data.length!==0&&(R+=k.data.length,t.preview&&R>t.preview?r.abort():(o.data=o.data[0],i(o,n))))}),this.parse=function(k,C,P){var p=t.quoteChar||'"',p=(t.newline||(t.newline=this.guessLineEndings(k,p)),s=!1,t.delimiter?m(t.delimiter)&&(t.delimiter=t.delimiter(k),o.meta.delimiter=t.delimiter):((p=((j,K,x,T,S)=>{var G,E,I,gt;S=S||[","," ","|",";",d.RECORD_SEP,d.UNIT_SEP];for(var kt=0;kt<S.length;kt++){for(var tt,wt=S[kt],V=0,et=0,Q=0,Y=(I=void 0,new mt({comments:T,delimiter:wt,newline:K,preview:10}).parse(j)),ut=0;ut<Y.data.length;ut++)x&&D(Y.data[ut])?Q++:(tt=Y.data[ut].length,et+=tt,I===void 0?I=tt:0<tt&&(V+=Math.abs(tt-I),I=tt));0<Y.data.length&&(et/=Y.data.length-Q),(E===void 0||V<=E)&&(gt===void 0||gt<et)&&1.99<et&&(E=V,G=wt,gt=et)}return{successful:!!(t.delimiter=G),bestDelimiter:G}})(k,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=p.bestDelimiter:(s=!0,t.delimiter=d.DefaultDelimiter),o.meta.delimiter=t.delimiter),lt(t));return t.preview&&t.header&&p.preview++,e=k,r=new mt(p),o=r.parse(e,C,P),g(),q?{meta:{paused:!0}}:o||{meta:{paused:!1}}},this.paused=function(){return q},this.pause=function(){q=!0,r.abort(),e=m(t.chunk)?"":e.substring(r.getCharIndex())},this.resume=function(){n.streamer._halted?(q=!1,n.streamer.parseChunk(e,!0)):setTimeout(n.resume,3)},this.aborted=function(){return _},this.abort=function(){_=!0,r.abort(),o.meta.aborted=!0,m(t.complete)&&t.complete(o),e=""},this.guessLineEndings=function(j,p){j=j.substring(0,1048576);var p=new RegExp(ot(p)+"([^]*?)"+ot(p),"gm"),P=(j=j.replace(p,"")).split("\r"),p=j.split(`
|
|
2
|
+
`),j=1<p.length&&p[0].length<P[0].length;if(P.length===1||j)return`
|
|
3
|
+
`;for(var K=0,x=0;x<P.length;x++)P[x][0]===`
|
|
4
|
+
`&&K++;return K>=P.length/2?`\r
|
|
5
|
+
`:"\r"}}function ot(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mt(t){var e=(t=t||{}).delimiter,r=t.newline,s=t.comments,i=t.step,y=t.preview,M=t.fastMode,u=null,h=!1,n=t.quoteChar==null?'"':t.quoteChar,R=n;if(t.escapeChar!==void 0&&(R=t.escapeChar),(typeof e!="string"||-1<d.BAD_DELIMITERS.indexOf(e))&&(e=","),s===e)throw new Error("Comment character same as delimiter");s===!0?s="#":(typeof s!="string"||-1<d.BAD_DELIMITERS.indexOf(s))&&(s=!1),r!==`
|
|
6
|
+
`&&r!=="\r"&&r!==`\r
|
|
7
|
+
`&&(r=`
|
|
8
|
+
`);var f=0,q=!1;this.parse=function(_,c,o){if(typeof _!="string")throw new Error("Input must be a string");var D=_.length,g=e.length,A=r.length,B=s.length,k=m(i),C=[],P=[],p=[],j=f=0;if(!_)return V();if(M||M!==!1&&_.indexOf(n)===-1){for(var K=_.split(r),x=0;x<K.length;x++){if(p=K[x],f+=p.length,x!==K.length-1)f+=r.length;else if(o)return V();if(!s||p.substring(0,B)!==s){if(k){if(C=[],gt(p.split(e)),et(),q)return V()}else gt(p.split(e));if(y&&y<=x)return C=C.slice(0,y),V(!0)}}return V()}for(var T=_.indexOf(e,f),S=_.indexOf(r,f),G=new RegExp(ot(R)+ot(n),"g"),E=_.indexOf(n,f);;)if(_[f]===n)for(E=f,f++;;){if((E=_.indexOf(n,E+1))===-1)return o||P.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:C.length,index:f}),tt();if(E===D-1)return tt(_.substring(f,E).replace(G,n));if(n===R&&_[E+1]===R)E++;else if(n===R||E===0||_[E-1]!==R){T!==-1&&T<E+1&&(T=_.indexOf(e,E+1));var I=kt((S=S!==-1&&S<E+1?_.indexOf(r,E+1):S)===-1?T:Math.min(T,S));if(_.substr(E+1+I,g)===e){p.push(_.substring(f,E).replace(G,n)),_[f=E+1+I+g]!==n&&(E=_.indexOf(n,f)),T=_.indexOf(e,f),S=_.indexOf(r,f);break}if(I=kt(S),_.substring(E+1+I,E+1+I+A)===r){if(p.push(_.substring(f,E).replace(G,n)),wt(E+1+I+A),T=_.indexOf(e,f),E=_.indexOf(n,f),k&&(et(),q))return V();if(y&&C.length>=y)return V(!0);break}P.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:C.length,index:f}),E++}}else if(s&&p.length===0&&_.substring(f,f+B)===s){if(S===-1)return V();f=S+A,S=_.indexOf(r,f),T=_.indexOf(e,f)}else if(T!==-1&&(T<S||S===-1))p.push(_.substring(f,T)),f=T+g,T=_.indexOf(e,f);else{if(S===-1)break;if(p.push(_.substring(f,S)),wt(S+A),k&&(et(),q))return V();if(y&&C.length>=y)return V(!0)}return tt();function gt(Q){C.push(Q),j=f}function kt(Q){var Y=0;return Y=Q!==-1&&(Q=_.substring(E+1,Q))&&Q.trim()===""?Q.length:Y}function tt(Q){return o||(Q===void 0&&(Q=_.substring(f)),p.push(Q),f=D,gt(p),k&&et()),V()}function wt(Q){f=Q,gt(p),p=[],S=_.indexOf(r,f)}function V(Q){if(t.header&&!c&&C.length&&!h){var Y=C[0],ut=Object.create(null),Tt=new Set(Y);let Lt=!1;for(let bt=0;bt<Y.length;bt++){let rt=Y[bt];if(ut[rt=m(t.transformHeader)?t.transformHeader(rt,bt):rt]){let Ct,Pt=ut[rt];for(;Ct=rt+"_"+Pt,Pt++,Tt.has(Ct););Tt.add(Ct),Y[bt]=Ct,ut[rt]++,Lt=!0,(u=u===null?{}:u)[Ct]=rt}else ut[rt]=1,Y[bt]=rt;Tt.add(rt)}Lt&&console.warn("Duplicate headers found and renamed."),h=!0}return{data:C,errors:P,meta:{delimiter:e,linebreak:r,aborted:q,truncated:!!Q,cursor:j+(c||0),renamedHeaders:u}}}function et(){i(V()),C=[],P=[]}},this.abort=function(){q=!0},this.getCharIndex=function(){return f}}function ct(t){var e=t.data,r=J[e.workerId],s=!1;if(e.error)r.userError(e.error,e.file);else if(e.results&&e.results.data){var i={abort:function(){s=!0,pt(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_t,resume:_t};if(m(r.userStep)){for(var y=0;y<e.results.data.length&&(r.userStep({data:e.results.data[y],errors:e.results.errors,meta:e.results.meta},i),!s);y++);delete e.results}else m(r.userChunk)&&(r.userChunk(e.results,i,e.file),delete e.results)}e.finished&&!s&&pt(e.workerId,e.results)}function pt(t,e){var r=J[t];m(r.userComplete)&&r.userComplete(e),r.terminate(),delete J[t]}function _t(){throw new Error("Not implemented.")}function lt(t){if(typeof t!="object"||t===null)return t;var e,r=Array.isArray(t)?[]:{};for(e in t)r[e]=lt(t[e]);return r}function b(t,e){return function(){t.apply(e,arguments)}}function m(t){return typeof t=="function"}return d.parse=function(t,e){var r=(e=e||{}).dynamicTyping||!1;if(m(r)&&(e.dynamicTypingFunction=r,r={}),e.dynamicTyping=r,e.transform=!!m(e.transform)&&e.transform,!e.worker||!d.WORKERS_SUPPORTED)return r=null,d.NODE_STREAM_INPUT,typeof t=="string"?(t=(s=>s.charCodeAt(0)!==65279?s:s.slice(1))(t),r=new(e.download?$:at)(e)):t.readable===!0&&m(t.read)&&m(t.on)?r=new L(e):(a.File&&t instanceof File||t instanceof Object)&&(r=new st(e)),r.stream(t);(r=(()=>{var s;return!!d.WORKERS_SUPPORTED&&(s=(()=>{var i=a.URL||a.webkitURL||null,y=w.toString();return d.BLOB_URL||(d.BLOB_URL=i.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",y,")();"],{type:"text/javascript"})))})(),(s=new a.Worker(s)).onmessage=ct,s.id=dt++,J[s.id]=s)})()).userStep=e.step,r.userChunk=e.chunk,r.userComplete=e.complete,r.userError=e.error,e.step=m(e.step),e.chunk=m(e.chunk),e.complete=m(e.complete),e.error=m(e.error),delete e.worker,r.postMessage({input:t,config:e,workerId:r.id})},d.unparse=function(t,e){var r=!1,s=!0,i=",",y=`\r
|
|
9
|
+
`,M='"',u=M+M,h=!1,n=null,R=!1,f=((()=>{if(typeof e=="object"){if(typeof e.delimiter!="string"||d.BAD_DELIMITERS.filter(function(c){return e.delimiter.indexOf(c)!==-1}).length||(i=e.delimiter),typeof e.quotes!="boolean"&&typeof e.quotes!="function"&&!Array.isArray(e.quotes)||(r=e.quotes),typeof e.skipEmptyLines!="boolean"&&typeof e.skipEmptyLines!="string"||(h=e.skipEmptyLines),typeof e.newline=="string"&&(y=e.newline),typeof e.quoteChar=="string"&&(M=e.quoteChar),typeof e.header=="boolean"&&(s=e.header),Array.isArray(e.columns)){if(e.columns.length===0)throw new Error("Option columns is empty");n=e.columns}e.escapeChar!==void 0&&(u=e.escapeChar+M),e.escapeFormulae instanceof RegExp?R=e.escapeFormulae:typeof e.escapeFormulae=="boolean"&&e.escapeFormulae&&(R=/^[=+\-@\t\r].*$/)}})(),new RegExp(ot(M),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return q(null,t,h);if(typeof t[0]=="object")return q(n||Object.keys(t[0]),t,h)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||n),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),q(t.fields||[],t.data||[],h);throw new Error("Unable to serialize unrecognized input");function q(c,o,D){var g="",A=(typeof c=="string"&&(c=JSON.parse(c)),typeof o=="string"&&(o=JSON.parse(o)),Array.isArray(c)&&0<c.length),B=!Array.isArray(o[0]);if(A&&s){for(var k=0;k<c.length;k++)0<k&&(g+=i),g+=_(c[k],k);0<o.length&&(g+=y)}for(var C=0;C<o.length;C++){var P=(A?c:o[C]).length,p=!1,j=A?Object.keys(o[C]).length===0:o[C].length===0;if(D&&!A&&(p=D==="greedy"?o[C].join("").trim()==="":o[C].length===1&&o[C][0].length===0),D==="greedy"&&A){for(var K=[],x=0;x<P;x++){var T=B?c[x]:x;K.push(o[C][T])}p=K.join("").trim()===""}if(!p){for(var S=0;S<P;S++){0<S&&!j&&(g+=i);var G=A&&B?c[S]:S;g+=_(o[C][G],S)}C<o.length-1&&(!D||0<P&&!j)&&(g+=y)}}return g}function _(c,o){var D,g;return c==null?"":c.constructor===Date?JSON.stringify(c).slice(1,25):(g=!1,R&&typeof c=="string"&&R.test(c)&&(c="'"+c,g=!0),D=c.toString().replace(f,u),(g=g||r===!0||typeof r=="function"&&r(c,o)||Array.isArray(r)&&r[o]||((A,B)=>{for(var k=0;k<B.length;k++)if(-1<A.indexOf(B[k]))return!0;return!1})(D,d.BAD_DELIMITERS)||-1<D.indexOf(i)||D.charAt(0)===" "||D.charAt(D.length-1)===" ")?M+D+M:D)}},d.RECORD_SEP="",d.UNIT_SEP="",d.BYTE_ORDER_MARK="\uFEFF",d.BAD_DELIMITERS=["\r",`
|
|
10
|
+
`,'"',d.BYTE_ORDER_MARK],d.WORKERS_SUPPORTED=!W&&!!a.Worker,d.NODE_STREAM_INPUT=1,d.LocalChunkSize=10485760,d.RemoteChunkSize=5242880,d.DefaultDelimiter=",",d.Parser=mt,d.ParserHandle=vt,d.NetworkStreamer=$,d.FileStreamer=st,d.StringStreamer=at,d.ReadableStreamStreamer=L,a.jQuery&&((F=a.jQuery).fn.parse=function(t){var e=t.config||{},r=[];return this.each(function(y){if(!(F(this).prop("tagName").toUpperCase()==="INPUT"&&F(this).attr("type").toLowerCase()==="file"&&a.FileReader)||!this.files||this.files.length===0)return!0;for(var M=0;M<this.files.length;M++)r.push({file:this.files[M],inputElem:this,instanceConfig:F.extend({},e)})}),s(),this;function s(){if(r.length===0)m(t.complete)&&t.complete();else{var y,M,u,h,n=r[0];if(m(t.before)){var R=t.before(n.file,n.inputElem);if(typeof R=="object"){if(R.action==="abort")return y="AbortError",M=n.file,u=n.inputElem,h=R.reason,void(m(t.error)&&t.error({name:y},M,u,h));if(R.action==="skip")return void i();typeof R.config=="object"&&(n.instanceConfig=F.extend(n.instanceConfig,R.config))}else if(R==="skip")return void i()}var f=n.instanceConfig.complete;n.instanceConfig.complete=function(q){m(f)&&f(q,n.file,n.inputElem),i()},d.parse(n.file,n.instanceConfig)}}function i(){r.splice(0,1),s()}}),H&&(a.onmessage=function(t){t=t.data,d.WORKER_ID===void 0&&t&&(d.WORKER_ID=t.workerId),typeof t.input=="string"?a.postMessage({workerId:d.WORKER_ID,results:d.parse(t.input,t.config),finished:!0}):(a.File&&t.input instanceof File||t.input instanceof Object)&&(t=d.parse(t.input,t.config))&&a.postMessage({workerId:d.WORKER_ID,results:t,finished:!0})}),($.prototype=Object.create(Z.prototype)).constructor=$,(st.prototype=Object.create(Z.prototype)).constructor=st,(at.prototype=Object.create(at.prototype)).constructor=at,(L.prototype=Object.create(Z.prototype)).constructor=L,d})})(xt)),xt.exports}var _e=pe();const Ut=fe(_e);var ge=it('<button class="col-delete-btn svelte-63hltt" title="Delete column"><!></button>'),ve=it('<th class="svelte-63hltt"><input class="cell-input header-input svelte-63hltt"/> <!></th>'),me=it('<td class="svelte-63hltt"><input class="cell-input svelte-63hltt"/></td>'),ye=it('<tr class="svelte-63hltt"><td class="row-num svelte-63hltt"></td><!><td class="actions svelte-63hltt"><button class="delete-btn svelte-63hltt" title="Delete row"><!></button></td></tr>'),ke=it('<div class="csv-editor svelte-63hltt"><div class="table-scroll svelte-63hltt"><table class="svelte-63hltt"><thead><tr><th class="row-num svelte-63hltt"></th><!><th class="col-add svelte-63hltt"><button class="col-add-btn svelte-63hltt" title="Add column"><!></button></th></tr></thead><tbody></tbody></table></div> <div class="csv-footer svelte-63hltt"><button class="add-row-btn svelte-63hltt"><!> <span>Add row</span></button></div></div>');function be(O,v){Nt(v,!0);let w=yt(Dt([])),a=yt(Dt([])),F=yt(void 0);function W(u){const h=Ut.parse(u.trim(),{header:!1,skipEmptyLines:!0});h.data.length>0?(N(w,h.data[0],!0),N(a,h.data.slice(1),!0)):(N(w,[],!0),N(a,[],!0))}W(v.content),Ft(()=>{W(v.content)});function H(){return Ut.unparse([l(w),...l(a)])}function J(){v.onchange?.(H())}function dt(u,h,n){l(a)[u][h]=n,N(a,[...l(a)],!0),J()}function d(u,h){l(w)[u]=h,N(w,[...l(w)],!0),J()}function Z(){N(a,[...l(a),l(w).map(()=>"")],!0),J(),L(l(a).length-1,0)}function $(u){N(a,l(a).filter((h,n)=>n!==u),!0),J()}function st(){const u=`col${l(w).length+1}`;N(w,[...l(w),u],!0),N(a,l(a).map(h=>[...h,""]),!0),J(),requestAnimationFrame(()=>{const h=l(F)?.querySelector(`thead th:nth-child(${l(w).length+1}) input`);h&&(h.focus(),h.select())})}function at(u){l(w).length<=1||(N(w,l(w).filter((h,n)=>n!==u),!0),N(a,l(a).map(h=>h.filter((n,R)=>R!==u)),!0),J())}function L(u,h){requestAnimationFrame(()=>{if(!l(F))return;let n=null;u<0?n=l(F).querySelector(`thead th:nth-child(${h+2}) input`):n=l(F).querySelector(`tbody tr:nth-child(${u+1}) td:nth-child(${h+2}) input`),n&&(n.focus(),n.select())})}function vt(u,h,n){if(u.key==="Tab"){u.preventDefault(),u.shiftKey?n>0?L(h,n-1):h>0?L(h-1,l(w).length-1):h===0&&L(-1,l(w).length-1):n<l(w).length-1?L(h,n+1):h<l(a).length-1?L(h+1,0):h===l(a).length-1&&Z();return}if(u.key==="Enter"){u.preventDefault(),u.shiftKey?h>0?L(h-1,n):L(-1,n):h<l(a).length-1?L(h+1,n):Z();return}if(u.key==="Escape"){u.target.blur();return}}function ot(u,h){if(u.key==="Tab"){u.preventDefault(),u.shiftKey?h>0&&L(-1,h-1):h<l(w).length-1?L(-1,h+1):l(a).length>0&&L(0,0);return}if(u.key==="Enter"){u.preventDefault(),l(a).length>0?L(0,h):Z();return}if(u.key==="Escape"){u.target.blur();return}}function mt(u){(u.metaKey||u.ctrlKey)&&u.key==="s"&&(u.preventDefault(),v.onsave?.())}var ct=ke(),pt=U(ct),_t=U(pt),lt=U(_t),b=U(lt),m=X(U(b));St(m,17,()=>l(w),Ot,(u,h,n)=>{var R=ve(),f=U(R);jt(f);var q=X(f,2);{var _=c=>{var o=ge(),D=U(o);qt(D,{size:12}),z(o),ht("click",o,()=>at(n)),nt(c,o)};Et(q,c=>{l(w).length>1&&c(_)})}z(R),At(()=>zt(f,l(h))),ht("input",f,c=>d(n,c.currentTarget.value)),ht("keydown",f,c=>ot(c,n)),nt(u,R)});var t=X(m),e=U(t),r=U(e);Kt(r,{size:14}),z(e),z(t),z(b),z(lt);var s=X(lt);St(s,21,()=>l(a),Ot,(u,h,n)=>{var R=ye(),f=U(R);f.textContent=n+1;var q=X(f);St(q,17,()=>l(h),Ot,(D,g,A)=>{var B=me(),k=U(B);jt(k),z(B),At(()=>zt(k,l(g))),ht("input",k,C=>dt(n,A,C.currentTarget.value)),ht("keydown",k,C=>vt(C,n,A)),nt(D,B)});var _=X(q),c=U(_),o=U(c);qt(o,{size:12}),z(c),z(_),z(R),ht("click",c,()=>$(n)),nt(u,R)}),z(s),z(_t),ne(_t,u=>N(F,u),()=>l(F)),z(pt);var i=X(pt,2),y=U(i),M=U(y);Kt(M,{size:14}),Gt(2),z(y),z(i),z(ct),ht("keydown",ct,mt),ht("click",e,st),ht("click",y,Z),nt(O,ct),Bt()}Yt(["keydown","input","click"]);function Ee(O){if(!O.startsWith("---"))return{frontmatter:{},content:O};const v=O.indexOf(`
|
|
11
|
+
---`,3);if(v===-1)return{frontmatter:{},content:O};const w=O.slice(4,v),a=O.slice(v+4).replace(/^\n/,"");try{return{frontmatter:we(w),content:a}}catch{return{frontmatter:{},content:O}}}function we(O){const v={},w=O.split(`
|
|
12
|
+
`);let a=0;for(;a<w.length;){const F=w[a];if(!F.trim()||F.trim().startsWith("#")){a++;continue}const W=F.match(/^([a-zA-Z_][a-zA-Z0-9_-]*):\s*(.*)/);if(!W){a++;continue}const H=W[1],J=W[2].trim();if(!J&&a+1<w.length&&w[a+1]?.match(/^\s+-\s/)){const dt=[];for(a++;a<w.length&&w[a].match(/^\s+-\s/);){const d=w[a].match(/^\s+-\s+(.*)/);d&&dt.push(Ht(d[1].trim())),a++}v[H]=dt;continue}v[H]=Ce(J),a++}return v}function Ht(O){return O.startsWith("'")&&O.endsWith("'")||O.startsWith('"')&&O.endsWith('"')?O.slice(1,-1):O}function Ce(O){if(!O)return"";const v=Ht(O);return v==="true"?!0:v==="false"?!1:v==="null"||v==="~"?null:O===v&&/^-?\d+(\.\d+)?$/.test(O)?Number(O):v}var Re=it('<span class="bc-sep svelte-xtfs5g">/</span>'),Se=it("<!><span> </span>",1),Oe=it('<span class="status-text saving svelte-xtfs5g">Saving...</span>'),xe=it('<span class="status-text error svelte-xtfs5g"> </span>'),Ae=it('<div class="content-row svelte-xtfs5g"><div class="entity-area svelte-xtfs5g"><!> <div class="editor-bar svelte-xtfs5g"><div class="breadcrumb-path svelte-xtfs5g"></div> <div class="editor-actions svelte-xtfs5g"><!></div></div> <div class="document-scroll svelte-xtfs5g"><!> <!></div></div> <!></div>');function We(O,v){Nt(v,!0);const w=$t("chat"),a=Rt(()=>v.data.fileName.endsWith(".csv")),F=Rt(()=>v.data.fileName.endsWith(".md"));let W=yt(""),H=yt(Dt({})),J=yt(0);const dt=Rt(()=>he(l(H))),d=Rt(()=>Object.keys(l(H)).length>0),Z=Rt(()=>[v.data.repo,v.data.id,...v.data.filePath.split("/")]);let $=yt("");Ft(()=>{const b=`${v.data.repo}/${v.data.type}/${v.data.id}/${v.data.filePath}`;if(b!==l($)){if(l($)&&ft.flush(),N($,b),l(F)||l(a)){const m=Ee(v.data.content);N(H,{...m.frontmatter},!0),N(W,m.content,!0)}else N(H,{},!0),N(W,v.data.content,!0);te(J),ft.reset()}}),Ft(()=>{It.select(v.data.repo,v.data.type,v.data.id,v.data.filePath),It.showEntity()});function st(b){return/[\[\]{}'":,#|>&*!?]/.test(b)||/^\s|\s$/.test(b)}function at(){if(l(d)){const b=[];for(const[m,t]of Object.entries(l(H)))if(Array.isArray(t)){b.push(`${m}:`);for(const e of t){const r=String(e);b.push(` - ${st(r)?`'${r}'`:r}`)}}else{const e=String(t??"");b.push(`${m}: ${st(e)?`'${e}'`:e}`)}return`---
|
|
13
|
+
${b.join(`
|
|
14
|
+
`)}
|
|
15
|
+
---
|
|
16
|
+
${l(W)}`}return l(W)}function L(){const b=at();ft.scheduleContentFileSave(v.data.repo,v.data.type,v.data.id,v.data.filePath,b)}function vt(b){N(W,b,!0),L()}function ot(b,m){N(H,{...l(H),[b]:m},!0),L()}function mt(b){const{[b]:m,...t}=l(H);N(H,t,!0),L()}function ct(b,m){N(H,{...l(H),[b]:m},!0),L()}function pt(b,m){L()}function _t(b){for(const m of Vt.repos){const t=m.entities.find(e=>e.id===b);if(t){se(`/${m.name}/${t.entityType}/${t.id}`);return}}}function lt(b){(b.metaKey||b.ctrlKey)&&b.key==="s"&&(b.preventDefault(),ft.flush())}Xt("keydown",ee,lt),ie(O,{children:(b,m)=>{var t=Ae(),e=U(t),r=U(e);ae(r,{activeView:"entity"});var s=X(r,2),i=U(s);St(i,21,()=>l(Z),Ot,(g,A,B)=>{var k=Se(),C=re(k);{var P=K=>{var x=Re();nt(K,x)};Et(C,K=>{B>0&&K(P)})}var p=X(C),j=U(p,!0);z(p),At(()=>{Jt(p,1,Zt(B===l(Z).length-1?"bc-current":"bc-segment"),"svelte-xtfs5g"),Mt(j,l(A))}),nt(g,k)}),z(i);var y=X(i,2),M=U(y);{var u=g=>{var A=Oe();nt(g,A)},h=g=>{var A=xe(),B=U(A,!0);z(A),At(()=>Mt(B,ft.error)),nt(g,A)};Et(M,g=>{ft.saving?g(u):ft.error&&g(h,1)})}z(y),z(s);var n=X(s,2),R=U(n);{var f=g=>{le(g,{get properties(){return l(dt)},editable:!0,onedit:ot,onremove:mt,onadd:ct,ontypechange:pt})};Et(R,g=>{l(d)&&g(f)})}var q=X(R,2);{var _=g=>{be(g,{get content(){return l(W)},onchange:vt,onsave:()=>ft.flush()})},c=g=>{ue(g,{get content(){return l(W)},readonly:!1,onchange:vt,onsave:()=>ft.flush(),onwikilinkclick:_t,get resetKey(){return l(J)}})};Et(q,g=>{l(a)?g(_):g(c,!1)})}z(n),z(e);var o=X(e,2);{var D=g=>{oe(g,{})};Et(o,g=>{w.open&&g(D)})}z(t),nt(b,t)},$$slots:{default:!0}}),Bt()}export{We as component,Ie as universal};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{f as dt,b as G,w as ut}from"../chunks/YFT1281h.js";import{a as k,f as M,d as ft}from"../chunks/hHxe9oXh.js";import{n as Z,A as $,S as mt,t as H,u as T,F as v,w as F,x as I,q as tt,P as J,T as S,V as ht,Y as vt}from"../chunks/fwnBoL5x.js";import{s as et}from"../chunks/BiubvAUI.js";import{b as Q,i as O}from"../chunks/BButMJ6M.js";import{n as X,A as yt}from"../chunks/CV8ganSj.js";import{g as pt}from"../chunks/DKyztuK9.js";const bt=async({params:g})=>{const{repo:o,type:l,id:c}=g,f=await dt(o,l,c);return{repo:o,type:l,id:c,entity:f}},Ht=Object.freeze(Object.defineProperty({__proto__:null,load:bt},Symbol.toStringTag,{value:"Module"}));var gt=M('<div class="loading-indicator svelte-1fltv0h">Loading editor...</div>'),wt=M('<div class="error-indicator svelte-1fltv0h"> </div>'),_t=M('<div><div class="header-mount svelte-1fltv0h"></div> <!> <!> <div></div></div>');function At(g,o){Z(o,!0);let l,c,f=J(!0),m=J(null),p=[],b=[],w=[],d={},y=[],h=null,_=null,A=0;function j(){const e=window.StudioChrome,i=document.querySelector(".sg-chrome-overflow-menu");if(i&&(i.innerHTML=""),e&&(e.clearViewAction(),e.clearSaveHandlers()),_&&(_.el.removeEventListener("click",_.handler,!0),_=null),e){e.unmountHeader();for(const{event:r,fn:s}of w)e.off(r,s)}w=[];for(const r of p)r.remove();p=[];for(const r of b)r.remove();b=[],h&&(h.remove(),h=null);for(const[r,s]of Object.entries(d))s===void 0?document.body.removeAttribute(r):document.body.setAttribute(r,s);d={};for(const r of y)document.body.classList.remove(r);y=[],c&&(c.innerHTML="")}async function q(){const e=++A;S(f,!0),S(m,null),j();try{const i=`${o.appMountPath}/edit/${encodeURIComponent(o.repo)}/${encodeURIComponent(o.entityId)}`,r=await fetch(i);if(!r.ok)throw new Error(`Failed to load editor: ${r.status}`);if(e!==A)return;const s=await r.text(),P=new DOMParser().parseFromString(s,"text/html"),at=P.querySelectorAll('link[rel="stylesheet"]');for(const t of at){if(t.href.includes("chrome.css"))continue;let n=t.getAttribute("href")||"";n&&!n.startsWith("http")&&!n.startsWith("/")&&(n=`${o.appMountPath}/${n}`);const a=document.createElement("link");a.rel="stylesheet",a.href=n,document.head.appendChild(a),p.push(a)}const it=P.querySelectorAll("head style");for(const t of it){const n=document.createElement("style");n.textContent=t.textContent,document.head.appendChild(n),p.push(n)}h=document.createElement("style"),h.textContent=`
|
|
2
|
+
body.sg-chrome-active { height: auto !important; }
|
|
3
|
+
body.sg-chrome-active > :not(.sg-chrome-header):not(.sg-chrome-footer) { overflow: visible !important; }
|
|
4
|
+
`,document.head.appendChild(h);const L=P.body;for(const t of Array.from(L.attributes))t.name.startsWith("data-")&&(d[t.name]=document.body.getAttribute(t.name)??void 0,document.body.setAttribute(t.name,t.value));const st=Array.from(L.classList);for(const t of st)t!=="sg-chrome-active"&&(document.body.classList.contains(t)||(document.body.classList.add(t),y.push(t)));const ct=L.querySelectorAll("script"),R=[],K=[];for(const t of ct){if(t.src){const n=t.getAttribute("src")||"";if(n.includes("chrome.js"))continue;let a=n;a&&!a.startsWith("http")&&!a.startsWith("/")&&(a=`${o.appMountPath}/${a}`),R.push(a)}else t.textContent&&K.push(t.textContent);t.remove()}c.innerHTML=L.innerHTML;const u=window.StudioChrome;if(u){u.updateBreadcrumb(o.repo,o.entityId),u.mountHeader(l);const t=document.body.dataset.sgViewUrl,n=document.body.dataset.sgViewLabel;t?u.setViewAction(t,n):u.clearViewAction();const a=l.querySelector(".sg-chrome-back");if(a){const N=Y=>{Y.preventDefault(),Y.stopPropagation(),pt(`/${o.repo}/${o.entityType}/${o.entityId}`)};a.addEventListener("click",N,!0),_={el:a,handler:N}}}let E=null;u&&(E=u.on,u.on=function(t,n){w.push({event:t,fn:n}),E.call(this,t,n)});const lt=`?_v=${Date.now()}`;for(const t of R){if(e!==A)return;await ot(t+lt)}for(const t of K){if(e!==A)return;const n=document.createElement("script");n.textContent=t,document.body.appendChild(n),b.push(n)}u&&E&&(u.on=E),S(f,!1)}catch(i){if(e!==A)return;S(m,i.message||"Failed to load editor",!0),S(f,!1)}}function ot(e){return new Promise((i,r)=>{const s=document.createElement("script");s.src=e,s.onload=()=>i(),s.onerror=()=>r(new Error(`Failed to load script: ${e}`)),document.body.appendChild(s),b.push(s)})}let x="";$(()=>{const e=`${o.appMountPath}|${o.repo}|${o.entityId}`;x&&x!==e&&c&&q(),x=e}),mt(()=>(q(),j));var C=_t();let V;var B=H(C);Q(B,e=>l=e,()=>l);var W=T(B,2);{var nt=e=>{var i=gt();k(e,i)};O(W,e=>{v(f)&&e(nt)})}var U=T(W,2);{var rt=e=>{var i=wt(),r=H(i,!0);F(i),I(()=>et(r,v(m))),k(e,i)};O(U,e=>{v(m)&&e(rt)})}var D=T(U,2);let z;Q(D,e=>c=e,()=>c),F(C),I(()=>{V=G(C,1,"editor-frame svelte-1fltv0h",null,V,{loading:v(f)}),z=G(D,1,"editor-container svelte-1fltv0h",null,z,{hidden:v(f)||!!v(m)})}),k(g,C),tt()}var St=M('<div class="no-editor svelte-bzivfp"> </div>');function Ft(g,o){Z(o,!0);const l=vt(()=>ut.getAppForEntityType(o.data.type));$(()=>{X.select(o.data.repo,o.data.type,o.data.id),X.showEntity()}),yt(g,{showSidebar:!1,children:(c,f)=>{var m=ft(),p=ht(m);{var b=d=>{At(d,{get appMountPath(){return v(l).mountPath},get repo(){return o.data.repo},get entityId(){return o.data.id},get entityType(){return o.data.type}})},w=d=>{var y=St(),h=H(y);F(y),I(()=>et(h,`No app editor available for entity type "${o.data.type??""}"`)),k(d,y)};O(p,d=>{v(l)?d(b):d(w,!1)})}k(c,m)},$$slots:{default:!0}}),tt()}export{Ft as component,Ht as universal};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BB_5th5W.js","../chunks/PPVm8Dsz.js","../chunks/CqkleIqs.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as Te,b as De,j as ee,w as ne}from"../chunks/YFT1281h.js";import{g as Se,j as Tt,a as Vt,f as Wt,e as ie}from"../chunks/hHxe9oXh.js";import{n as he,o as de,A as xt,F as D,Y as mt,S as Ee,bc as ze,x as re,q as ge,t as st,u as zt,w as it,T as Dt,P as oe}from"../chunks/fwnBoL5x.js";import{p as St,b as Pe,i as ke}from"../chunks/BButMJ6M.js";import{c as wt,e as Fe,i as Re,n as Ht,A as Oe}from"../chunks/CV8ganSj.js";import{V as je,c as Ge,C as Le}from"../chunks/DdNsM6oV.js";import{_ as Xe}from"../chunks/PPVm8Dsz.js";import{s as ae}from"../chunks/BiubvAUI.js";import{g as Ye}from"../chunks/DKyztuK9.js";function He(){return Te("/api/graph")}const Ve=async()=>({graphData:await He()}),Hn=Object.freeze(Object.defineProperty({__proto__:null,load:Ve},Symbol.toStringTag,{value:"Module"}));function Ue(t,e){var n,i=1;t==null&&(t=0),e==null&&(e=0);function r(){var o,c=n.length,d,w=0,a=0;for(o=0;o<c;++o)d=n[o],w+=d.x,a+=d.y;for(w=(w/c-t)*i,a=(a/c-e)*i,o=0;o<c;++o)d=n[o],d.x-=w,d.y-=a}return r.initialize=function(o){n=o},r.x=function(o){return arguments.length?(t=+o,r):t},r.y=function(o){return arguments.length?(e=+o,r):e},r.strength=function(o){return arguments.length?(i=+o,r):i},r}function Be(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return pe(this.cover(e,n),e,n,t)}function pe(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,o=t._root,c={data:i},d=t._x0,w=t._y0,a=t._x1,y=t._y1,_,x,l,b,f,s,u,g;if(!o)return t._root=c,t;for(;o.length;)if((f=e>=(_=(d+a)/2))?d=_:a=_,(s=n>=(x=(w+y)/2))?w=x:y=x,r=o,!(o=o[u=s<<1|f]))return r[u]=c,t;if(l=+t._x.call(null,o.data),b=+t._y.call(null,o.data),e===l&&n===b)return c.next=o,r?r[u]=c:t._root=c,t;do r=r?r[u]=new Array(4):t._root=new Array(4),(f=e>=(_=(d+a)/2))?d=_:a=_,(s=n>=(x=(w+y)/2))?w=x:y=x;while((u=s<<1|f)===(g=(b>=x)<<1|l>=_));return r[g]=o,r[u]=c,t}function We(t){var e,n,i=t.length,r,o,c=new Array(i),d=new Array(i),w=1/0,a=1/0,y=-1/0,_=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(c[n]=r,d[n]=o,r<w&&(w=r),r>y&&(y=r),o<a&&(a=o),o>_&&(_=o));if(w>y||a>_)return this;for(this.cover(w,a).cover(y,_),n=0;n<i;++n)pe(this,c[n],d[n],t[n]);return this}function Qe(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,r=this._x1,o=this._y1;if(isNaN(n))r=(n=Math.floor(t))+1,o=(i=Math.floor(e))+1;else{for(var c=r-n||1,d=this._root,w,a;n>t||t>=r||i>e||e>=o;)switch(a=(e<i)<<1|t<n,w=new Array(4),w[a]=d,d=w,c*=2,a){case 0:r=n+c,o=i+c;break;case 1:n=r-c,o=i+c;break;case 2:r=n+c,i=o-c;break;case 3:n=r-c,i=o-c;break}this._root&&this._root.length&&(this._root=d)}return this._x0=n,this._y0=i,this._x1=r,this._y1=o,this}function Ke(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function Je(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function B(t,e,n,i,r){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=r}function Ze(t,e,n){var i,r=this._x0,o=this._y0,c,d,w,a,y=this._x1,_=this._y1,x=[],l=this._root,b,f;for(l&&x.push(new B(l,r,o,y,_)),n==null?n=1/0:(r=t-n,o=e-n,y=t+n,_=e+n,n*=n);b=x.pop();)if(!(!(l=b.node)||(c=b.x0)>y||(d=b.y0)>_||(w=b.x1)<r||(a=b.y1)<o))if(l.length){var s=(c+w)/2,u=(d+a)/2;x.push(new B(l[3],s,u,w,a),new B(l[2],c,u,s,a),new B(l[1],s,d,w,u),new B(l[0],c,d,s,u)),(f=(e>=u)<<1|t>=s)&&(b=x[x.length-1],x[x.length-1]=x[x.length-1-f],x[x.length-1-f]=b)}else{var g=t-+this._x.call(null,l.data),M=e-+this._y.call(null,l.data),p=g*g+M*M;if(p<n){var I=Math.sqrt(n=p);r=t-I,o=e-I,y=t+I,_=e+I,i=l.data}}return i}function qe(t){if(isNaN(y=+this._x.call(null,t))||isNaN(_=+this._y.call(null,t)))return this;var e,n=this._root,i,r,o,c=this._x0,d=this._y0,w=this._x1,a=this._y1,y,_,x,l,b,f,s,u;if(!n)return this;if(n.length)for(;;){if((b=y>=(x=(c+w)/2))?c=x:w=x,(f=_>=(l=(d+a)/2))?d=l:a=l,e=n,!(n=n[s=f<<1|b]))return this;if(!n.length)break;(e[s+1&3]||e[s+2&3]||e[s+3&3])&&(i=e,u=s)}for(;n.data!==t;)if(r=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,r?(o?r.next=o:delete r.next,this):e?(o?e[s]=o:delete e[s],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(i?i[u]=n:this._root=n),this):(this._root=o,this)}function $e(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function tn(){return this._root}function en(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function nn(t){var e=[],n,i=this._root,r,o,c,d,w;for(i&&e.push(new B(i,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(i=n.node,o=n.x0,c=n.y0,d=n.x1,w=n.y1)&&i.length){var a=(o+d)/2,y=(c+w)/2;(r=i[3])&&e.push(new B(r,a,y,d,w)),(r=i[2])&&e.push(new B(r,o,y,a,w)),(r=i[1])&&e.push(new B(r,a,c,d,y)),(r=i[0])&&e.push(new B(r,o,c,a,y))}return this}function rn(t){var e=[],n=[],i;for(this._root&&e.push(new B(this._root,this._x0,this._y0,this._x1,this._y1));i=e.pop();){var r=i.node;if(r.length){var o,c=i.x0,d=i.y0,w=i.x1,a=i.y1,y=(c+w)/2,_=(d+a)/2;(o=r[0])&&e.push(new B(o,c,d,y,_)),(o=r[1])&&e.push(new B(o,y,d,w,_)),(o=r[2])&&e.push(new B(o,c,_,y,a)),(o=r[3])&&e.push(new B(o,y,_,w,a))}n.push(i)}for(;i=n.pop();)t(i.node,i.x0,i.y0,i.x1,i.y1);return this}function on(t){return t[0]}function an(t){return arguments.length?(this._x=t,this):this._x}function sn(t){return t[1]}function ln(t){return arguments.length?(this._y=t,this):this._y}function Qt(t,e,n){var i=new Kt(e??on,n??sn,NaN,NaN,NaN,NaN);return t==null?i:i.addAll(t)}function Kt(t,e,n,i,r,o){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=r,this._y1=o,this._root=void 0}function se(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var W=Qt.prototype=Kt.prototype;W.copy=function(){var t=new Kt(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,i;if(!e)return t;if(!e.length)return t._root=se(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var r=0;r<4;++r)(i=e.source[r])&&(i.length?n.push({source:i,target:e.target[r]=new Array(4)}):e.target[r]=se(i));return t};W.add=Be;W.addAll=We;W.cover=Qe;W.data=Ke;W.extent=Je;W.find=Ze;W.remove=qe;W.removeAll=$e;W.root=tn;W.size=en;W.visit=nn;W.visitAfter=rn;W.x=an;W.y=ln;function lt(t){return function(){return t}}function rt(t){return(t()-.5)*1e-6}function fn(t){return t.x+t.vx}function cn(t){return t.y+t.vy}function un(t){var e,n,i,r=1,o=1;typeof t!="function"&&(t=lt(t==null?1:+t));function c(){for(var a,y=e.length,_,x,l,b,f,s,u=0;u<o;++u)for(_=Qt(e,fn,cn).visitAfter(d),a=0;a<y;++a)x=e[a],f=n[x.index],s=f*f,l=x.x+x.vx,b=x.y+x.vy,_.visit(g);function g(M,p,I,k,G){var F=M.data,Q=M.r,R=f+Q;if(F){if(F.index>x.index){var L=l-F.x-F.vx,tt=b-F.y-F.vy,H=L*L+tt*tt;H<R*R&&(L===0&&(L=rt(i),H+=L*L),tt===0&&(tt=rt(i),H+=tt*tt),H=(R-(H=Math.sqrt(H)))/H*r,x.vx+=(L*=H)*(R=(Q*=Q)/(s+Q)),x.vy+=(tt*=H)*R,F.vx-=L*(R=1-R),F.vy-=tt*R)}return}return p>l+R||k<l-R||I>b+R||G<b-R}}function d(a){if(a.data)return a.r=n[a.data.index];for(var y=a.r=0;y<4;++y)a[y]&&a[y].r>a.r&&(a.r=a[y].r)}function w(){if(e){var a,y=e.length,_;for(n=new Array(y),a=0;a<y;++a)_=e[a],n[_.index]=+t(_,a,e)}}return c.initialize=function(a,y){e=a,i=y,w()},c.iterations=function(a){return arguments.length?(o=+a,c):o},c.strength=function(a){return arguments.length?(r=+a,c):r},c.radius=function(a){return arguments.length?(t=typeof a=="function"?a:lt(+a),w(),c):t},c}function hn(t){return t.index}function le(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function dn(t){var e=hn,n=_,i,r=lt(30),o,c,d,w,a,y=1;t==null&&(t=[]);function _(s){return 1/Math.min(d[s.source.index],d[s.target.index])}function x(s){for(var u=0,g=t.length;u<y;++u)for(var M=0,p,I,k,G,F,Q,R;M<g;++M)p=t[M],I=p.source,k=p.target,G=k.x+k.vx-I.x-I.vx||rt(a),F=k.y+k.vy-I.y-I.vy||rt(a),Q=Math.sqrt(G*G+F*F),Q=(Q-o[M])/Q*s*i[M],G*=Q,F*=Q,k.vx-=G*(R=w[M]),k.vy-=F*R,I.vx+=G*(R=1-R),I.vy+=F*R}function l(){if(c){var s,u=c.length,g=t.length,M=new Map(c.map((I,k)=>[e(I,k,c),I])),p;for(s=0,d=new Array(u);s<g;++s)p=t[s],p.index=s,typeof p.source!="object"&&(p.source=le(M,p.source)),typeof p.target!="object"&&(p.target=le(M,p.target)),d[p.source.index]=(d[p.source.index]||0)+1,d[p.target.index]=(d[p.target.index]||0)+1;for(s=0,w=new Array(g);s<g;++s)p=t[s],w[s]=d[p.source.index]/(d[p.source.index]+d[p.target.index]);i=new Array(g),b(),o=new Array(g),f()}}function b(){if(c)for(var s=0,u=t.length;s<u;++s)i[s]=+n(t[s],s,t)}function f(){if(c)for(var s=0,u=t.length;s<u;++s)o[s]=+r(t[s],s,t)}return x.initialize=function(s,u){c=s,a=u,l()},x.links=function(s){return arguments.length?(t=s,l(),x):t},x.id=function(s){return arguments.length?(e=s,x):e},x.iterations=function(s){return arguments.length?(y=+s,x):y},x.strength=function(s){return arguments.length?(n=typeof s=="function"?s:lt(+s),b(),x):n},x.distance=function(s){return arguments.length?(r=typeof s=="function"?s:lt(+s),f(),x):r},x}var gn={value:()=>{}};function ve(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Et(n)}function Et(t){this._=t}function pn(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Et.prototype=ve.prototype={constructor:Et,on:function(t,e){var n=this._,i=pn(t+"",n),r,o=-1,c=i.length;if(arguments.length<2){for(;++o<c;)if((r=(t=i[o]).type)&&(r=vn(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<c;)if(r=(t=i[o]).type)n[r]=fe(n[r],t.name,e);else if(e==null)for(r in n)n[r]=fe(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Et(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,o;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,r=o.length;i<r;++i)o[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};function vn(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function fe(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=gn,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var dt=0,Mt=0,_t=0,ye=1e3,Pt,bt,kt=0,ft=0,Ft=0,It=typeof performance=="object"&&performance.now?performance:Date,xe=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function we(){return ft||(xe(yn),ft=It.now()+Ft)}function yn(){ft=0}function Ut(){this._call=this._time=this._next=null}Ut.prototype=_e.prototype={constructor:Ut,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?we():+n)+(e==null?0:+e),!this._next&&bt!==this&&(bt?bt._next=this:Pt=this,bt=this),this._call=t,this._time=n,Bt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bt())}};function _e(t,e,n){var i=new Ut;return i.restart(t,e,n),i}function xn(){we(),++dt;for(var t=Pt,e;t;)(e=ft-t._time)>=0&&t._call.call(void 0,e),t=t._next;--dt}function ce(){ft=(kt=It.now())+Ft,dt=Mt=0;try{xn()}finally{dt=0,_n(),ft=0}}function wn(){var t=It.now(),e=t-kt;e>ye&&(Ft-=e,kt=t)}function _n(){for(var t,e=Pt,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Pt=n);bt=t,Bt(i)}function Bt(t){if(!dt){Mt&&(Mt=clearTimeout(Mt));var e=t-ft;e>24?(t<1/0&&(Mt=setTimeout(ce,t-It.now()-Ft)),_t&&(_t=clearInterval(_t))):(_t||(kt=It.now(),_t=setInterval(wn,ye)),dt=1,xe(ce))}}const mn=1664525,Mn=1013904223,ue=4294967296;function bn(){let t=1;return()=>(t=(mn*t+Mn)%ue)/ue}function In(t){return t.x}function Cn(t){return t.y}var Nn=10,An=Math.PI*(3-Math.sqrt(5));function Tn(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),o=0,c=.6,d=new Map,w=_e(_),a=ve("tick","end"),y=bn();t==null&&(t=[]);function _(){x(),a.call("tick",e),n<i&&(w.stop(),a.call("end",e))}function x(f){var s,u=t.length,g;f===void 0&&(f=1);for(var M=0;M<f;++M)for(n+=(o-n)*r,d.forEach(function(p){p(n)}),s=0;s<u;++s)g=t[s],g.fx==null?g.x+=g.vx*=c:(g.x=g.fx,g.vx=0),g.fy==null?g.y+=g.vy*=c:(g.y=g.fy,g.vy=0);return e}function l(){for(var f=0,s=t.length,u;f<s;++f){if(u=t[f],u.index=f,u.fx!=null&&(u.x=u.fx),u.fy!=null&&(u.y=u.fy),isNaN(u.x)||isNaN(u.y)){var g=Nn*Math.sqrt(.5+f),M=f*An;u.x=g*Math.cos(M),u.y=g*Math.sin(M)}(isNaN(u.vx)||isNaN(u.vy))&&(u.vx=u.vy=0)}}function b(f){return f.initialize&&f.initialize(t,y),f}return l(),e={tick:x,restart:function(){return w.restart(_),e},stop:function(){return w.stop(),e},nodes:function(f){return arguments.length?(t=f,l(),d.forEach(b),e):t},alpha:function(f){return arguments.length?(n=+f,e):n},alphaMin:function(f){return arguments.length?(i=+f,e):i},alphaDecay:function(f){return arguments.length?(r=+f,e):+r},alphaTarget:function(f){return arguments.length?(o=+f,e):o},velocityDecay:function(f){return arguments.length?(c=1-f,e):1-c},randomSource:function(f){return arguments.length?(y=f,d.forEach(b),e):y},force:function(f,s){return arguments.length>1?(s==null?d.delete(f):d.set(f,b(s)),e):d.get(f)},find:function(f,s,u){var g=0,M=t.length,p,I,k,G,F;for(u==null?u=1/0:u*=u,g=0;g<M;++g)G=t[g],p=f-G.x,I=s-G.y,k=p*p+I*I,k<u&&(F=G,u=k);return F},on:function(f,s){return arguments.length>1?(a.on(f,s),e):a.on(f)}}}function Dn(){var t,e,n,i,r=lt(-30),o,c=1,d=1/0,w=.81;function a(l){var b,f=t.length,s=Qt(t,In,Cn).visitAfter(_);for(i=l,b=0;b<f;++b)e=t[b],s.visit(x)}function y(){if(t){var l,b=t.length,f;for(o=new Array(b),l=0;l<b;++l)f=t[l],o[f.index]=+r(f,l,t)}}function _(l){var b=0,f,s,u=0,g,M,p;if(l.length){for(g=M=p=0;p<4;++p)(f=l[p])&&(s=Math.abs(f.value))&&(b+=f.value,u+=s,g+=s*f.x,M+=s*f.y);l.x=g/u,l.y=M/u}else{f=l,f.x=f.data.x,f.y=f.data.y;do b+=o[f.data.index];while(f=f.next)}l.value=b}function x(l,b,f,s){if(!l.value)return!0;var u=l.x-e.x,g=l.y-e.y,M=s-b,p=u*u+g*g;if(M*M/w<p)return p<d&&(u===0&&(u=rt(n),p+=u*u),g===0&&(g=rt(n),p+=g*g),p<c&&(p=Math.sqrt(c*p)),e.vx+=u*l.value*i/p,e.vy+=g*l.value*i/p),!0;if(l.length||p>=d)return;(l.data!==e||l.next)&&(u===0&&(u=rt(n),p+=u*u),g===0&&(g=rt(n),p+=g*g),p<c&&(p=Math.sqrt(c*p)));do l.data!==e&&(M=o[l.data.index]*i/p,e.vx+=u*M,e.vy+=g*M);while(l=l.next)}return a.initialize=function(l,b){t=l,n=b,y()},a.strength=function(l){return arguments.length?(r=typeof l=="function"?l:lt(+l),y(),a):r},a.distanceMin=function(l){return arguments.length?(c=l*l,a):Math.sqrt(c)},a.distanceMax=function(l){return arguments.length?(d=l*l,a):Math.sqrt(d)},a.theta=function(l){return arguments.length?(w=l*l,a):Math.sqrt(w)},a}var Sn=Wt('<div><span class="legend-dot svelte-1i33fky"></span> <span class="legend-label svelte-1i33fky"> </span> <span class="legend-count svelte-1i33fky"> </span></div>'),En=Wt('<div class="graph-view svelte-1i33fky"><div class="canvas-wrap svelte-1i33fky"><div class="legend-panel svelte-1i33fky"></div></div></div>');function zn(t,e){he(e,!0);let n=St(e,"selectedEntityId",3,null),i=St(e,"filteredIds",3,null),r=St(e,"sidebarHoveredId",3,null),o=St(e,"highlightedIds",3,null);function c(h){return e.nameMap?.get(h)??h.replace(/-/g," ").replace(/\b\w/g,m=>m.toUpperCase())}const d=de("theme"),w=mt(()=>d.current==="light"?{default:14211288,dim:15263976,conn:12632256,labelText:1710623}:{default:2763306,dim:1315860,conn:4210752,labelText:15592943}),a=mt(()=>d.current==="light"?16316666:592139),y=.75;xt(()=>{d.current,K&&(K.style.fill=D(w).labelText);const h=D(Lt);for(const m of l)wt(m.type)===vt&&(m.color=h);X()}),xt(()=>{i(),X()}),xt(()=>{o(),X()}),xt(()=>{n(),X()}),xt(()=>{const h=r();if(h){const m=l.find(v=>v.id===h)??null;p=m,Ot(),J=m?1:0}else I||(J=0);X()});let _,x=null,l=[],b=[],f=!1,s=0,u=0,g=0,M=1,p=null,I=null,k=oe(!1),G=0,F=0,Q=0,R=0,L=new Set,tt=!1,H=oe(null),nt=0,J=0;const Jt=4;let V=null,gt=null,pt=null,Ct=null,Zt=new Map,q=null,K=null,$=null;function me(h){return Math.max(2,Math.min(2*Math.sqrt(h+1),10))}function Rt(h,m){const v=_.getBoundingClientRect();return{x:(h-v.left-u)/M,y:(m-v.top-g)/M}}function qt(h,m){for(let v=l.length-1;v>=0;v--){const C=l[v],S=h-C.x,P=m-C.y,E=(C.r*1.5+4)/M;if(S*S+P*P<=E*E)return C}return null}function Ot(){const h=p??null;if(L.clear(),!!h){L.add(h.id);for(const m of b)m.source.id===h.id&&L.add(m.target.id),m.target.id===h.id&&L.add(m.source.id)}}function $t(){if(l.length===0||!_)return;let h=1/0,m=-1/0,v=1/0,C=-1/0,S=0;for(const z of l)z.x<h&&(h=z.x),z.x>m&&(m=z.x),z.y<v&&(v=z.y),z.y>C&&(C=z.y),z.r>S&&(S=z.r);const P=_.clientWidth,E=_.clientHeight,O=m-h,U=C-v;if(O===0||U===0)return;const et=(60+S)*2;M=Math.min((P-et)/O,(E-et)/U,3),u=P/2-(h+m)/2*M,g=E/2-(v+C)/2*M,X()}function X(){f=!0,s=0}function jt(h){return parseInt(h.replace("#",""),16)}function ot(h,m,v){const C=(h>>16&255)+v*((m>>16&255)-(h>>16&255)),S=(h>>8&255)+v*((m>>8&255)-(h>>8&255)),P=(h&255)+v*((m&255)-(h&255));return Math.round(C)<<16|Math.round(S)<<8|Math.round(P)}function Me(){if(!$||!gt||!pt)return;gt.clear(),pt.clear();const m=p!==null,v=nt,C=D(H),S=o(),P=i(),E=D(w).default,O=D(w).dim,U=D(w).conn;for(let et=0;et<b.length;et++){const z=b[et],ct=z.source.x*M+u,A=z.source.y*M+g,N=z.target.x*M+u,yt=z.target.y*M+g,ut=m&&v>.01&&L.has(z.source.id)&&L.has(z.target.id);let j=E;m&&v>.01?j=ut?ot(E,U,v):ot(E,O,v):(C!==null||S!==null||P!==null)&&(j=O);const Z=ut?pt:gt;Z.setStrokeStyle({width:1,color:j,alpha:1}),Z.moveTo(ct,A),Z.lineTo(N,yt),Z.stroke()}}function be(){if(!$)return;const h=p,m=h!==null,v=nt,C=D(H),S=o(),P=i(),E=!h&&n()?l.find(A=>A.id===n())??null:null,O=new Set;if(E){O.add(E.id);for(const A of b)A.source.id===E.id&&O.add(A.target.id),A.target.id===E.id&&O.add(A.source.id)}for(const A of l){const N=Zt.get(A.id);if(!N)continue;const yt=A.x*M+u,ut=A.y*M+g;N.position.set(yt,ut),N.scale.set(A.r/50),N.alpha=1;const j=jt(A.color);if(E&&!h){const Z=O.has(A.id);N.tint=Z?j:ot(j,D(a),y),N.zIndex=A===E?2:Z?1:0}else{const Z=A===h,At=m&&L.has(A.id),T=C!==null&&(C==="other"?wt(A.type)===vt:A.type===C);if(Z&&v>.01)N.tint=j,N.scale.set(A.r*(1+v*.4)/50),N.zIndex=2;else if(At)N.tint=j,N.zIndex=1;else if(C!==null)N.tint=T?j:ot(j,D(a),y),N.zIndex=T?1:0;else if(S!==null){const Y=S.has(A.id),ht=Y?v*y:y;N.tint=ot(j,D(a),ht),N.zIndex=Y?1:0}else if(P!==null){const Y=P.has(A.id),ht=Y?v*y:y;N.tint=ot(j,D(a),ht),N.zIndex=Y?1:0}else N.tint=ot(j,D(a),v*y),N.zIndex=0}}const U=h??E,et=h?v>.01:!!E;if(U&&et&&q){q.visible=!0;const A=U.x*M+u,N=U.y*M+g;q.position.set(A,N),q.scale.set(U.r*5/64),q.alpha=h?v*.25:.25,q.tint=jt(U.color)}else q&&(q.visible=!1);const z=h??E,ct=h?v>.01:!!E;if(z&&ct&&K){const A=z.x*M+u,N=z.y*M+g;K.text=c(z.id),K.style.fontSize=12,K.position.set(A,N+z.r+8),K.alpha=h?v:1,K.visible=!0}else K&&(K.visible=!1)}let Nt=!1;function Ie(h){if(h.button!==0)return;Nt=!1;const m=Rt(h.clientX,h.clientY),v=qt(m.x,m.y);v?(I=v,tt=!0,v.fx=v.x,v.fy=v.y,x?.alphaTarget(.3).restart(),X()):(Dt(k,!0),G=h.clientX,F=h.clientY,Q=u,R=g),_.setPointerCapture(h.pointerId),window.addEventListener("pointerup",Gt,{once:!0})}function Ce(h){if(I){Nt=!0;const m=Rt(h.clientX,h.clientY);I.fx=m.x,I.fy=m.y,X()}else if(D(k))Nt=!0,u=Q+(h.clientX-G),g=R+(h.clientY-F),X();else{const m=Rt(h.clientX,h.clientY),v=qt(m.x,m.y);v?v!==p?(p&&(nt=.15),p=v,Ot(),J=1,_.style.cursor="pointer",X()):J!==1&&(J=1,_.style.cursor="pointer",X()):J!==0&&(J=0,_.style.cursor="grab",X())}}function Gt(h){if(!I&&!D(k))return;window.removeEventListener("pointerup",Gt);const m=Nt;if(I){const v=I;I.fx=null,I.fy=null,x?.alphaTarget(0),I=null,J=0,X(),m||Ye(`/${v.repo}/${v.type}/${v.id}`)}else D(k)&&Dt(k,!1);try{_.releasePointerCapture(h.pointerId)}catch{}}const vt="#5c5c66",Ne="#b0b0b8",Lt=mt(()=>d.current==="light"?Ne:vt),Ae=mt(()=>{const h=new Map;for(const C of e.graphData.nodes)h.set(C.type,(h.get(C.type)??0)+1);const m=[];let v=0;for(const[C,S]of h){const P=wt(C);P===vt?v+=S:m.push({name:C,color:P,count:S})}return m.sort((C,S)=>S.count-C.count),v>0&&m.push({name:"other",color:D(Lt),count:v}),m});Ee(async()=>{$=await Xe(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url),V=new $.Application,await V.init({antialias:!0,resolution:window.devicePixelRatio||1,autoDensity:!0,backgroundAlpha:0,resizeTo:_}),_.insertBefore(V.canvas,_.firstChild),V.canvas.style.position="absolute",V.canvas.style.inset="0",gt=new $.Graphics,V.stage.addChild(gt),pt=new $.Graphics,V.stage.addChild(pt),Ct=new $.Container,Ct.sortableChildren=!0,V.stage.addChild(Ct);const h=document.createElement("canvas");h.width=128,h.height=128;const m=h.getContext("2d"),v=m.createRadialGradient(64,64,0,64,64,64);v.addColorStop(0,"rgba(255,255,255,0.5)"),v.addColorStop(1,"rgba(255,255,255,0)"),m.fillStyle=v,m.fillRect(0,0,128,128);const C=$.Texture.from(h);q=new $.Sprite(C),q.anchor.set(.5),q.visible=!1,V.stage.addChild(q);const S=document.createElement("canvas");S.width=100,S.height=100;const P=S.getContext("2d");P.beginPath(),P.arc(50,50,48,0,Math.PI*2),P.fillStyle="#ffffff",P.fill();const E=$.Texture.from(S),O=new Map;for(const T of e.graphData.edges)O.set(T.source,(O.get(T.source)??0)+1),O.set(T.target,(O.get(T.target)??0)+1);const U=new Map,z=3600*e.graphData.nodes.length,ct=Math.sqrt(z);l=e.graphData.nodes.map(T=>{const Y=O.get(T.id)??0,ht={id:T.id,type:T.type,repo:T.repo,color:wt(T.type)===vt?D(Lt):wt(T.type),weight:Y,x:(Math.random()-.5)*ct,y:(Math.random()-.5)*ct,vx:0,vy:0,r:me(Y)};return U.set(T.id,ht),ht});for(const T of l){const Y=new $.Sprite(E);Y.anchor.set(.5),Y.tint=jt(T.color),Ct.addChild(Y),Zt.set(T.id,Y)}K=new $.Text({text:"",style:{fontFamily:"Inter, system-ui, sans-serif",fontWeight:"500",fontSize:12,fill:D(w).labelText,align:"center"}}),K.anchor.set(.5,0),K.visible=!1,V.stage.addChild(K);const A=e.graphData.edges.map(T=>({source:T.source,target:T.target})),N=l.length,yt=N>200?-3e3:N>50?-2e3:-1e3,ut=N>200?400:N>50?300:250,j=dn(A).id(T=>T.id).distance(ut);x=Tn(l).force("link",j).force("charge",Dn().strength(yt).distanceMin(40).distanceMax(2e3)).force("center",Ue(0,0).strength(.03)).force("collide",un().radius(T=>T.r*4+20).strength(.7).iterations(2)).velocityDecay(.4).alpha(1).on("tick",()=>{tt||$t(),X()}),b=j.links();let Z=0;V.ticker.add(()=>{const T=performance.now(),Y=Z?Math.min((T-Z)/1e3,.05):.016;Z=T,nt<J?(nt=Math.min(J,nt+Jt*Y),f=!0):nt>J&&(nt=Math.max(J,nt-Jt*Y),f=!0),nt===0&&J===0&&p&&!I&&(p=null,Ot(),f=!0),(f||s<120)&&(Me(),be(),f=!1,s++)});const At=new ResizeObserver(()=>{V.renderer.resize(_.clientWidth,_.clientHeight),$t()});return At.observe(_),()=>{At.disconnect()}}),ze(()=>{x?.stop(),V&&(V.destroy(!0,{children:!0}),V=null)});var Xt=En(),at=st(Xt);let te;var Yt=st(at);Fe(Yt,21,()=>D(Ae),Re,(h,m)=>{var v=Sn();let C;var S=st(v);let P;var E=zt(S,2),O=st(E,!0);it(E);var U=zt(E,2),et=st(U,!0);it(U),it(v),re(()=>{C=De(v,1,"legend-item svelte-1i33fky",null,C,{"legend-item-active":D(H)===D(m).name}),P=ee(S,"",P,{background:D(m).color}),ae(O,D(m).name),ae(et,D(m).count)}),ie("mouseenter",v,()=>{Dt(H,D(m).name,!0),X()}),ie("mouseleave",v,()=>{Dt(H,null),X()}),Vt(h,v)}),it(Yt),it(at),Pe(at,h=>_=h,()=>_),it(Xt),re(()=>te=ee(at,"",te,{cursor:D(k)?"grabbing":"grab"})),Tt("pointerdown",at,Ie),Tt("pointermove",at,Ce),Tt("pointerup",at,Gt),Tt("pointerdown",Yt,h=>h.stopPropagation()),Vt(t,Xt),ge()}Se(["pointerdown","pointermove","pointerup"]);var Pn=Wt('<div class="content-row svelte-315y67"><div class="graph-area svelte-315y67"><!> <!></div> <!></div>');function Vn(t,e){he(e,!0);const n=de("chat");Ht.showGraph();const i=mt(()=>{const r=new Map;for(const o of ne.repos)for(const c of o.entities)r.set(c.id,c.title);return r});Oe(t,{children:(r,o)=>{var c=Pn(),d=st(c),w=st(d);je(w,{activeView:"graph"});var a=zt(w,2);zn(a,{get graphData(){return e.data.graphData},get selectedEntityId(){return Ht.selectedId},get nameMap(){return D(i)},get filteredIds(){return ne.filteredIds},get sidebarHoveredId(){return Ht.hoveredEntityId},get highlightedIds(){return Ge.highlightedIds}}),it(d);var y=zt(d,2);{var _=x=>{Le(x,{})};ke(y,x=>{n.open&&x(_)})}it(c),Vt(r,c)},$$slots:{default:!0}}),ge()}export{Vn as component,Hn as universal};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"1773072087333"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
7
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
8
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
9
|
+
<link rel="stylesheet" href="/api/chrome/chrome.css">
|
|
10
|
+
<link href="/_app/immutable/entry/start.BqsXHYP6.js" rel="modulepreload">
|
|
11
|
+
<link href="/_app/immutable/chunks/DKyztuK9.js" rel="modulepreload">
|
|
12
|
+
<link href="/_app/immutable/chunks/fwnBoL5x.js" rel="modulepreload">
|
|
13
|
+
<link href="/_app/immutable/entry/app.BFVUP2fV.js" rel="modulepreload">
|
|
14
|
+
<link href="/_app/immutable/chunks/PPVm8Dsz.js" rel="modulepreload">
|
|
15
|
+
<link href="/_app/immutable/chunks/BiubvAUI.js" rel="modulepreload">
|
|
16
|
+
<link href="/_app/immutable/chunks/hHxe9oXh.js" rel="modulepreload">
|
|
17
|
+
<link href="/_app/immutable/chunks/BButMJ6M.js" rel="modulepreload">
|
|
18
|
+
<link href="/_app/immutable/chunks/3_5VIr68.js" rel="modulepreload">
|
|
19
|
+
<link href="/_app/immutable/chunks/F20aIBpJ.js" rel="modulepreload">
|
|
20
|
+
|
|
21
|
+
</head>
|
|
22
|
+
<body data-sveltekit-preload-data="hover" data-sg-workspace="true">
|
|
23
|
+
<div style="display: contents">
|
|
24
|
+
<script>
|
|
25
|
+
{
|
|
26
|
+
__sveltekit_1iniha6 = {
|
|
27
|
+
base: ""
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const element = document.currentScript.parentElement;
|
|
31
|
+
|
|
32
|
+
Promise.all([
|
|
33
|
+
import("/_app/immutable/entry/start.BqsXHYP6.js"),
|
|
34
|
+
import("/_app/immutable/entry/app.BFVUP2fV.js")
|
|
35
|
+
]).then(([kit, app]) => {
|
|
36
|
+
kit.start(app, element);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
</div>
|
|
41
|
+
<script src="/api/chrome/chrome.js"></script>
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studiograph",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Team-based AI agent platform with Git-backed knowledge graphs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/studiograph/studiograph"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://studiograph.dev",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=20"
|
|
14
|
+
},
|
|
7
15
|
"bin": {
|
|
8
16
|
"studiograph": "dist/cli/index.js"
|
|
9
17
|
},
|
|
@@ -12,11 +20,14 @@
|
|
|
12
20
|
"README.md"
|
|
13
21
|
],
|
|
14
22
|
"scripts": {
|
|
15
|
-
"build": "node --max-old-space-size=8192 node_modules/typescript/bin/tsc && mkdir -p dist/agent/prompts dist/agent/skills && cp src/agent/prompts/*.md dist/agent/prompts/ && cp src/agent/skills/*.md dist/agent/skills/",
|
|
23
|
+
"build": "node --max-old-space-size=8192 node_modules/typescript/bin/tsc && mkdir -p dist/agent/prompts dist/agent/skills dist/server/chrome && cp src/agent/prompts/*.md dist/agent/prompts/ && cp src/agent/skills/*.md dist/agent/skills/ && cp src/server/chrome/* dist/server/chrome/",
|
|
24
|
+
"build:web": "cd web && npm run build",
|
|
25
|
+
"build:all": "npm run build && npm run build:web",
|
|
16
26
|
"dev": "tsc --watch",
|
|
27
|
+
"dev:web": "cd web && npm run dev",
|
|
17
28
|
"test": "vitest",
|
|
18
29
|
"lint": "eslint src --ext .ts",
|
|
19
|
-
"prepublishOnly": "npm run build"
|
|
30
|
+
"prepublishOnly": "npm run build:all"
|
|
20
31
|
},
|
|
21
32
|
"keywords": [
|
|
22
33
|
"ai",
|
|
@@ -34,7 +45,9 @@
|
|
|
34
45
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
35
46
|
"@aws-sdk/client-s3": "^3.500.0",
|
|
36
47
|
"@clack/prompts": "^0.7.0",
|
|
48
|
+
"@fastify/cookie": "^11.0.2",
|
|
37
49
|
"@fastify/cors": "^10.1.0",
|
|
50
|
+
"@fastify/multipart": "^9.4.0",
|
|
38
51
|
"@lancedb/lancedb": "^0.26.2",
|
|
39
52
|
"@mariozechner/pi-agent-core": "^0.54.2",
|
|
40
53
|
"@mariozechner/pi-ai": "^0.54.2",
|
|
@@ -57,11 +70,16 @@
|
|
|
57
70
|
"picocolors": "^1.1.1",
|
|
58
71
|
"zod": "^3.22.4"
|
|
59
72
|
},
|
|
73
|
+
"optionalDependencies": {
|
|
74
|
+
"playwright": "^1.58.2"
|
|
75
|
+
},
|
|
60
76
|
"devDependencies": {
|
|
61
77
|
"@types/node": "^20.11.0",
|
|
62
78
|
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
63
79
|
"@typescript-eslint/parser": "^6.19.0",
|
|
80
|
+
"clsx": "^2.1.1",
|
|
64
81
|
"eslint": "^8.56.0",
|
|
82
|
+
"tailwind-merge": "^3.5.0",
|
|
65
83
|
"typescript": "^5.3.3",
|
|
66
84
|
"vitest": "^1.2.0"
|
|
67
85
|
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: enrich-entities
|
|
3
|
-
description: Proactively suggest enrichment for incomplete entities using context
|
|
4
|
-
loading: eager
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Entity Enrichment
|
|
8
|
-
|
|
9
|
-
When you discover incomplete entities (missing recommended fields), proactively suggest enrichment using contextual inference.
|
|
10
|
-
|
|
11
|
-
## When to Enrich
|
|
12
|
-
|
|
13
|
-
**Proactive discovery:**
|
|
14
|
-
- User asks to "clean up" or "enrich" entities
|
|
15
|
-
- You call `lint_entities` and find incomplete records
|
|
16
|
-
- You fetch an entity and notice missing recommended fields
|
|
17
|
-
|
|
18
|
-
**During normal work:**
|
|
19
|
-
- User asks about a specific entity and you notice gaps
|
|
20
|
-
- You're creating related entities and spot incomplete references
|
|
21
|
-
|
|
22
|
-
## How to Enrich
|
|
23
|
-
|
|
24
|
-
### 1. Discover gaps
|
|
25
|
-
Use `lint_entities` to find incomplete entities:
|
|
26
|
-
```
|
|
27
|
-
lint_entities({ entityType: "project" })
|
|
28
|
-
→ 12 projects missing client, start_date, or end_date
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### 2. Gather context for each incomplete entity
|
|
32
|
-
- **Fetch the entity:** `get_entity({ entityId: "..." })`
|
|
33
|
-
- **Find related entities:** `get_backlinks({ entityId: "..." })`
|
|
34
|
-
- **Search for references:** Look in meeting notes, proposals, briefs
|
|
35
|
-
- **Check memory:** Review past conversations about this entity
|
|
36
|
-
|
|
37
|
-
### 3. Infer missing values from context
|
|
38
|
-
|
|
39
|
-
**Missing client:**
|
|
40
|
-
- Search entity markdown body for `[[client-name]]` wikilinks
|
|
41
|
-
- Check backlinks from meetings, proposals, deals
|
|
42
|
-
- Look for client mentions in related artifacts
|
|
43
|
-
|
|
44
|
-
**Missing dates:**
|
|
45
|
-
- Extract from related meetings (kickoff = start_date)
|
|
46
|
-
- Check proposal expected_start or contract signed_date
|
|
47
|
-
- Look for date mentions in project description
|
|
48
|
-
|
|
49
|
-
**Missing relationships:**
|
|
50
|
-
- Scan for wikilinks in markdown body
|
|
51
|
-
- Check what entities reference this one (backlinks)
|
|
52
|
-
- Infer from entity type (artifact → deliverable → project)
|
|
53
|
-
|
|
54
|
-
### 4. Suggest, don't assume
|
|
55
|
-
Always confirm before updating:
|
|
56
|
-
|
|
57
|
-
> "I notice this project is missing a client. I see Meridian Health mentioned in 3 related meetings and the project brief. Should I add `client: [[meridian-rebrand]]`?"
|
|
58
|
-
|
|
59
|
-
Wait for user confirmation, then call `update_entity`.
|
|
60
|
-
|
|
61
|
-
## Example Workflows
|
|
62
|
-
|
|
63
|
-
**Batch enrichment:**
|
|
64
|
-
```
|
|
65
|
-
User: "Help me fill in missing clients for incomplete projects"
|
|
66
|
-
|
|
67
|
-
You:
|
|
68
|
-
1. lint_entities({ entityType: "project" }) → 8 missing client
|
|
69
|
-
2. For each project:
|
|
70
|
-
- get_entity() → read markdown body
|
|
71
|
-
- get_backlinks() → find meetings, proposals
|
|
72
|
-
- Search for client wikilinks
|
|
73
|
-
- Suggest: "Add client: [[acme]]?" → confirm → update
|
|
74
|
-
3. Report: "Enriched 6/8 projects. 2 need manual review (no clear client in context)."
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**Focused enrichment:**
|
|
78
|
-
```
|
|
79
|
-
User: "Fill in missing deal values"
|
|
80
|
-
|
|
81
|
-
You:
|
|
82
|
-
1. lint_entities({ entityType: "deal" }) → 5 deals missing deal_value
|
|
83
|
-
2. For each deal:
|
|
84
|
-
- get_backlinks() → find related proposal
|
|
85
|
-
- get_entity() on proposal → extract fees
|
|
86
|
-
- Suggest: "This deal's proposal shows $50k. Add deal_value: 50000?" → confirm → update
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Inline during work:**
|
|
90
|
-
```
|
|
91
|
-
User: "Show me the Acme project"
|
|
92
|
-
|
|
93
|
-
You:
|
|
94
|
-
1. get_entity({ entityId: "acme-rebrand" })
|
|
95
|
-
2. Notice missing: client, start_date
|
|
96
|
-
3. Get context: search for Acme client entity, check proposal
|
|
97
|
-
4. Suggest inline: "This project is missing a client and start date. I found the Acme client entity and a proposal dated 2026-01-15. Should I add those?"
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Guidelines
|
|
101
|
-
|
|
102
|
-
**Do:**
|
|
103
|
-
- Use multiple context sources (backlinks, search, memory, markdown body)
|
|
104
|
-
- Present evidence: "I see X mentioned in 3 meetings"
|
|
105
|
-
- Batch similar fields: "Should I add client and start_date?"
|
|
106
|
-
- Report progress: "Enriched 8/12, 4 need review"
|
|
107
|
-
|
|
108
|
-
**Don't:**
|
|
109
|
-
- Update without confirmation
|
|
110
|
-
- Guess when evidence is weak ("I'm not sure which client this is")
|
|
111
|
-
- Over-enrich — only fill recommended fields that are clearly missing
|
|
112
|
-
- Make up data — if no context exists, say so: "I couldn't find a clear client reference. Would you like to specify it?"
|
|
113
|
-
|
|
114
|
-
## Priority Fields
|
|
115
|
-
|
|
116
|
-
Focus enrichment on high-value semantic fields:
|
|
117
|
-
1. **Relationships** — client, project, deliverable (wikilinks)
|
|
118
|
-
2. **Dates** — start_date, due_date, expected_close
|
|
119
|
-
3. **People** — assignee, decision_makers, attendees
|
|
120
|
-
4. **Values** — deal_value, fees, budget
|
|
121
|
-
|
|
122
|
-
Low-priority (often intentionally omitted):
|
|
123
|
-
- Tags, notes, optional descriptions
|
|
124
|
-
- Status (user may want to set this themselves)
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gather-context
|
|
3
|
-
description: Gather full context on named entities before taking action
|
|
4
|
-
loading: eager
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Context Gathering
|
|
8
|
-
|
|
9
|
-
When a user references a specific named entity in their request, gather full context before proceeding:
|
|
10
|
-
|
|
11
|
-
## When to Gather Context
|
|
12
|
-
|
|
13
|
-
User mentions a specific entity by name:
|
|
14
|
-
- "Help me write a proposal for Acme"
|
|
15
|
-
- "Create a deck for the FII10 project"
|
|
16
|
-
- "What's the status of the Meridian Health deliverables?"
|
|
17
|
-
- "Find all open tasks for the Terra Finance project"
|
|
18
|
-
|
|
19
|
-
## What to Gather
|
|
20
|
-
|
|
21
|
-
1. **Fetch the named entity** — use `get_entity` to load the full record
|
|
22
|
-
2. **Pull related entities** — use `get_backlinks` to find connections:
|
|
23
|
-
- For clients: related projects, deals, contacts, proposals
|
|
24
|
-
- For projects: client, deliverables, artifacts, meetings, decisions, tasks
|
|
25
|
-
- For deals: client, contacts, proposal documents
|
|
26
|
-
3. **Check recent activity** — search for recent meetings, decisions, or tasks related to the entity
|
|
27
|
-
4. **Load memory context** — check if there's relevant session memory about this entity
|
|
28
|
-
|
|
29
|
-
## Example Flow
|
|
30
|
-
|
|
31
|
-
User: "Help me write a proposal for Acme"
|
|
32
|
-
|
|
33
|
-
**Before writing anything:**
|
|
34
|
-
1. `get_entity({ repo: "clients", entityType: "client", entityId: "acme" })`
|
|
35
|
-
2. `get_backlinks({ repo: "clients", entityType: "client", entityId: "acme" })`
|
|
36
|
-
3. `search_entities({ query: "Acme", entityTypes: ["deal", "project", "person", "proposal"] })`
|
|
37
|
-
4. Review memory for past Acme conversations
|
|
38
|
-
|
|
39
|
-
**Then proceed** with full context to draft the proposal.
|
|
40
|
-
|
|
41
|
-
## Important
|
|
42
|
-
|
|
43
|
-
- Don't make assumptions about entity details — fetch them first
|
|
44
|
-
- A few seconds gathering context saves minutes of back-and-forth
|
|
45
|
-
- If the entity doesn't exist, offer to create it before proceeding
|
|
46
|
-
- Present a brief context summary to the user before taking action: "I see Acme is a prospect with two past deals and three contacts on file. Let me draft a proposal..."
|