tarsk 0.5.78 → 0.5.80
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/dist/bundled-skills/skill-creator/eval-viewer/generate_review.js +183 -95
- package/dist/bundled-skills/skill-creator/scripts/__tests__/improve_description.test.js +77 -0
- package/dist/bundled-skills/skill-creator/scripts/__tests__/package_skill.test.js +203 -0
- package/dist/bundled-skills/skill-creator/scripts/__tests__/run_eval.test.js +125 -0
- package/dist/bundled-skills/skill-creator/scripts/__tests__/utils.test.js +149 -0
- package/dist/bundled-skills/skill-creator/scripts/aggregate_benchmark.js +2 -0
- package/dist/bundled-skills/skill-creator/scripts/improve_description.js +42 -22
- package/dist/bundled-skills/skill-creator/scripts/package_skill.js +68 -40
- package/dist/bundled-skills/skill-creator/scripts/run_eval.js +60 -32
- package/dist/bundled-skills/skill-creator/scripts/run_loop.js +224 -150
- package/dist/bundled-skills/skill-creator/scripts/utils.js +71 -41
- package/dist/index.js +267445 -257080
- package/dist/node_modules/@libsql/darwin-x64/README.md +3 -0
- package/dist/node_modules/@libsql/darwin-x64/index.node +0 -0
- package/dist/node_modules/@libsql/darwin-x64/package.json +36 -0
- package/dist/public/assets/account-view-DVfacvrH.js +1 -0
- package/dist/public/assets/alert-dialog-DTxl_mXc.js +7 -0
- package/dist/public/assets/api-B_ZIptgC.js +2 -0
- package/dist/public/assets/{async-error-boundary-Dll_zcqr.js → async-error-boundary-DmJy8jgz.js} +1 -1
- package/dist/public/assets/browser-tab-BZSxX4fR.js +12 -0
- package/dist/public/assets/{button-B5aMz2Rk.js → button-DhxraVUW.js} +1 -1
- package/dist/public/assets/{card-DRr14MEQ.js → card-DZy9jCWQ.js} +1 -1
- package/dist/public/assets/chat-dock-context-DhO-jYMh.js +1 -0
- package/dist/public/assets/{commit-dialog-C-JfaoS6.js → commit-dialog-D0z3emO_.js} +1 -1
- package/dist/public/assets/{commit-error-dialog-VXqZLeta.js → commit-error-dialog-CVSOwpqp.js} +1 -1
- package/dist/public/assets/{commit-method-fields-DAd1unUF.js → commit-method-fields-C7Du43jy.js} +1 -1
- package/dist/public/assets/conversation-history-view-CkI6-Hvt.js +1 -0
- package/dist/public/assets/create-project-dialog-Ciiyx0LH.js +2 -0
- package/dist/public/assets/{create-repo-dialog-mBGGkX-g.js → create-repo-dialog-lS-Tko1c.js} +1 -1
- package/dist/public/assets/delete-confirm-dialog-Ciwqi6ts.js +1 -0
- package/dist/public/assets/diff-view-DKEDlvjR.js +4 -0
- package/dist/public/assets/{dist-COfI64N5.js → dist-BZmr2Qex.js} +1 -1
- package/dist/public/assets/{dist-DwblUvSf.js → dist-Bihbg_hO.js} +1 -1
- package/dist/public/assets/{dist-TCNzmc2V.js → dist-BkOEUrQf.js} +1 -1
- package/dist/public/assets/{dist-DDYi9MQo.js → dist-CA_zFhwJ.js} +1 -1
- package/dist/public/assets/dist-DZtmmQ-F.js +2 -0
- package/dist/public/assets/{dist-sThe8WYP.js → dist-Dj1qT-gv.js} +1 -1
- package/dist/public/assets/{dist-CWYnBq-n.js → dist-aB1qUwWW.js} +1 -1
- package/dist/public/assets/{dist-T8-4ZfS0.js → dist-iDwSbcD5.js} +1 -1
- package/dist/public/assets/{es2015-Bu0NIPbn.js → es2015-B0KHrBGH.js} +1 -1
- package/dist/public/assets/{explorer-monaco-editor-q8CnSwWA.js → explorer-monaco-editor-YoaTqh0f.js} +1 -1
- package/dist/public/assets/explorer-tab-view-DlBIsvNp.js +2 -0
- package/dist/public/assets/explorer-tree-BWb4wB5M.js +1 -0
- package/dist/public/assets/explorer-view-qOBi4ACi.js +76 -0
- package/dist/public/assets/{git-history-dialog-XEr5pugf.js → git-history-dialog-DOcupC-P.js} +1 -1
- package/dist/public/assets/index-B3oaBks2.css +1 -0
- package/dist/public/assets/index-DdJcjvu2.js +112 -0
- package/dist/public/assets/{lucide-react-B-115rul.js → lucide-react-CNNzKD4G.js} +1 -1
- package/dist/public/assets/{model-list-controls-DAZM0NBC.js → model-list-controls-DOpHpzG8.js} +1 -1
- package/dist/public/assets/onboarding-dialog-CfkWB6ST.js +1 -0
- package/dist/public/assets/{pill-tabs-QsjH027B.js → pill-tabs-CiONEGsi.js} +1 -1
- package/dist/public/assets/{progress-indicator-C01aPXIe.js → progress-indicator-C7Kj9U3t.js} +1 -1
- package/dist/public/assets/project-coding-view-CrOGfL2D.js +1 -0
- package/dist/public/assets/{project-danger-zone-view-BaSu793w.js → project-danger-zone-view-BfHTp5LI.js} +1 -1
- package/dist/public/assets/project-env-vars-view-QrpeAxIt.js +1 -0
- package/dist/public/assets/project-model-aliases-view-D_pamHsA.js +1 -0
- package/dist/public/assets/project-settings-view-C04tQu0x.js +1 -0
- package/dist/public/assets/project-tools-view-0j2uWvRy.js +1 -0
- package/dist/public/assets/providers-list-view-4pcZxBFJ.js +1 -0
- package/dist/public/assets/pull-request-dialog-HXBislex.js +1 -0
- package/dist/public/assets/{pull-with-changes-dialog-DDp_srHq.js → pull-with-changes-dialog-CFLl2SQP.js} +1 -1
- package/dist/public/assets/{push-before-pr-dialog-Bt0BChlV.js → push-before-pr-dialog-CD1rZKan.js} +1 -1
- package/dist/public/assets/{scroll-area-DwRwR2nQ.js → scroll-area-BQ9bdsVQ.js} +1 -1
- package/dist/public/assets/settings-general-tabs-view-CKaL-A9_.js +2 -0
- package/dist/public/assets/settings-general-view-ybttpP37.js +1 -0
- package/dist/public/assets/settings-list-n-CrPPNl.js +1 -0
- package/dist/public/assets/settings-logs-view-CFD-_MKT.js +5 -0
- package/dist/public/assets/settings-mcp-servers-view-kTpnzhrf.js +5 -0
- package/dist/public/assets/settings-models-view-RmIvRn-i.js +1 -0
- package/dist/public/assets/settings-plugins-view-fSxDPjsF.js +2 -0
- package/dist/public/assets/settings-providers-view-Bj4-iemE.js +2 -0
- package/dist/public/assets/settings-setup-view-ORNCF3ma.js +2 -0
- package/dist/public/assets/settings-skills-view-Dl38QbWw.js +2 -0
- package/dist/public/assets/settings-slack-view-Dx4Pdxjq.js +1 -0
- package/dist/public/assets/settings-slash-commands-view-CSm-ZqwM.js +1 -0
- package/dist/public/assets/settings-statistics-view-B8YLP2Nb.js +1 -0
- package/dist/public/assets/settings-storage-view-Cnmt9-0H.js +1 -0
- package/dist/public/assets/settings-subagents-view-Be7aa0Va.js +2 -0
- package/dist/public/assets/settings-system-prompt-view-KlPFbkat.js +1 -0
- package/dist/public/assets/{settings-tab-bar-DAHxT5KE.js → settings-tab-bar-BJtpuIky.js} +1 -1
- package/dist/public/assets/settings-view-dchqYhRC.js +2 -0
- package/dist/public/assets/{slug-utils-BQZ6c2py.js → slug-utils-Ccbyp4Mu.js} +1 -1
- package/dist/public/assets/store-D4D62vkY.js +9 -0
- package/dist/public/assets/{table-7hMwxpkF.js → table-DCmeRDBK.js} +1 -1
- package/dist/public/assets/tasks-view-CRBklv4O.js +1 -0
- package/dist/public/assets/{terminal-panel-BNOIOh8z.js → terminal-panel-DlfAu8U1.js} +2 -2
- package/dist/public/assets/{toggle-group-UiksQ0n9.js → toggle-group-Dl5P_F6a.js} +1 -1
- package/dist/public/assets/{tooltip-Dvmz78Z_.js → tooltip-Cg_EhO9M.js} +1 -1
- package/dist/public/assets/{use-active-dock-panel-instance-2LfvItRH.js → use-active-dock-panel-instance-iaFSG9kX.js} +1 -1
- package/dist/public/assets/use-git-check-BfkMHX3g.js +1 -0
- package/dist/public/assets/use-installed-ai-files-BtR-wIuu.js +1 -0
- package/dist/public/assets/use-settings-page-loading-CpaBd260.js +1 -0
- package/dist/public/assets/use-toast-xpb5jNtN.js +1 -0
- package/dist/public/assets/{useBaseQuery-D5as4SgS.js → useBaseQuery-ChJtNS_3.js} +1 -1
- package/dist/public/assets/utils-BCj_kT9l.js +1 -0
- package/dist/public/assets/{web-B9ndApmi.js → web-BC7Gc4bP.js} +1 -1
- package/dist/public/assets/{web-DyqJbQ3L.js → web-BGZnt3gU.js} +1 -1
- package/dist/public/assets/{web-gEWIDddb.js → web-BdHVYPFA.js} +1 -1
- package/dist/public/assets/{web-BkuMY08B.js → web-C5YunZdw.js} +1 -1
- package/dist/public/browser-preview-rpc.js +123 -68
- package/dist/public/index.html +25 -23
- package/dist/scaffold-templates.json +1 -1
- package/package.json +6 -5
- package/dist/public/assets/account-view-Bzv2EHnc.js +0 -1
- package/dist/public/assets/api-OO3KSG8d.js +0 -2
- package/dist/public/assets/browser-tab-Cwa1TB3I.js +0 -12
- package/dist/public/assets/chat-dock-context-Cnq0BWgm.js +0 -1
- package/dist/public/assets/context-menu-BKOotkeD.js +0 -1
- package/dist/public/assets/conversation-history-view-CcdQRxoP.js +0 -1
- package/dist/public/assets/create-project-dialog-D1VaSgqh.js +0 -2
- package/dist/public/assets/delete-confirm-dialog-Cx9nT7Xd.js +0 -1
- package/dist/public/assets/diff-view-CyOnLSEA.js +0 -4
- package/dist/public/assets/dist-DNkA3vYh.js +0 -2
- package/dist/public/assets/explorer-tab-view-G2HmkQyY.js +0 -2
- package/dist/public/assets/explorer-tree-DAuc2Npx.js +0 -1
- package/dist/public/assets/explorer-view-BDMlnV3f.js +0 -76
- package/dist/public/assets/index-C4WzOmf3.css +0 -1
- package/dist/public/assets/index-DD_a7tQU.js +0 -3665
- package/dist/public/assets/onboarding-dialog-Dd9hiOOf.js +0 -1
- package/dist/public/assets/project-coding-view-DbKI7sbW.js +0 -1
- package/dist/public/assets/project-env-vars-view-BB66j52E.js +0 -1
- package/dist/public/assets/project-model-aliases-view-o1-Z2es5.js +0 -1
- package/dist/public/assets/project-settings-view-BKjvtOtk.js +0 -1
- package/dist/public/assets/project-tools-view-CZbblznF.js +0 -1
- package/dist/public/assets/providers-list-view-ChY2DXYc.js +0 -1
- package/dist/public/assets/pull-request-dialog-BZgY4vrw.js +0 -1
- package/dist/public/assets/settings-general-tabs-view-BH7AaXyP.js +0 -2
- package/dist/public/assets/settings-general-view-B-t99LmD.js +0 -1
- package/dist/public/assets/settings-list-Dn4CHP4Z.js +0 -1
- package/dist/public/assets/settings-logs-view-BCRjz-Fr.js +0 -5
- package/dist/public/assets/settings-mcp-servers-view-xv9D4DPO.js +0 -5
- package/dist/public/assets/settings-models-view-rUeqlE4k.js +0 -1
- package/dist/public/assets/settings-plugins-view-qnWmII61.js +0 -2
- package/dist/public/assets/settings-providers-view-DsxTdBEQ.js +0 -2
- package/dist/public/assets/settings-setup-view-ew5KW8gL.js +0 -2
- package/dist/public/assets/settings-skills-view-C4NxP4gI.js +0 -3
- package/dist/public/assets/settings-slack-view-BNT5ervf.js +0 -1
- package/dist/public/assets/settings-slash-commands-view-CE7FT3dB.js +0 -1
- package/dist/public/assets/settings-statistics-view-jKPoSWBs.js +0 -1
- package/dist/public/assets/settings-storage-view-C_Rs-9Hw.js +0 -1
- package/dist/public/assets/settings-subagents-view-DHVSAmCY.js +0 -2
- package/dist/public/assets/settings-system-prompt-view-B_nF2HUy.js +0 -1
- package/dist/public/assets/settings-view-BY6OO-xy.js +0 -2
- package/dist/public/assets/store-B7EgrEO7.js +0 -9
- package/dist/public/assets/tasks-view-Dc7sthjm.js +0 -1
- package/dist/public/assets/use-installed-ai-files-BkpswqGI.js +0 -1
- package/dist/public/assets/use-settings-page-loading-BTySlInF.js +0 -1
- package/dist/public/assets/utils-B-qS8qMg.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,o as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{Lt as i,R as a,ft as o}from"./dist-DZtmmQ-F.js";import{t as s}from"./utils-BCj_kT9l.js";import{Jt as c,_t as l,dn as u,dt as d,gn as f,nn as p}from"./lucide-react-CNNzKD4G.js";import{t as m}from"./button-DhxraVUW.js";import{$t as h,a as g}from"./api-B_ZIptgC.js";import{St as _}from"./index-DdJcjvu2.js";var v=t(),y=e(n(),1),b=r(),x=a(`app.git-setup-guide`);function S(e){let t=(0,v.c)(4),{version:n}=e,r,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,b.jsx)(f,{className:`h-5 w-5 text-green-600 flex-shrink-0 mt-0.5`}),a=(0,b.jsx)(`p`,{className:s(i.label,`text-green-900`),children:`Git is installed`}),t[0]=r,t[1]=a):(r=t[0],a=t[1]);let o=n?`Detected Git ${n}. `:``,c;return t[2]===o?c=t[3]:(c=(0,b.jsxs)(_,{variant:`success`,className:`mb-0 flex items-start gap-3`,children:[r,(0,b.jsxs)(`div`,{children:[a,(0,b.jsxs)(`p`,{className:i.bodyMuted,children:[o,`You're all set to use Git features in Tarsk.`]})]})]}),t[2]=o,t[3]=c),c}function C(e){let t=(0,v.c)(27),{platform:n,plan:r,checking:a,onCheckAgain:c,className:l}=e,f;t[0]===l?f=t[1]:(f=s(`mb-0 flex items-start gap-3`,l),t[0]=l,t[1]=f);let p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,b.jsx)(u,{className:`h-5 w-5 text-yellow-600 flex-shrink-0 mt-0.5`}),t[2]=p):p=t[2];let h,g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,b.jsx)(`p`,{className:i.label,children:`Git is not installed`}),g=s(i.bodyMuted,`mt-1`),t[3]=h,t[4]=g):(h=t[3],g=t[4]);let y=o[n],x;t[5]===y?x=t[6]:(x=(0,b.jsxs)(`p`,{className:g,children:[`Git is required for some features in Tarsk. Run the command below for`,` `,y,`, then check again.`]}),t[5]=y,t[6]=x);let S;t[7]===r?S=t[8]:(S=(0,b.jsx)(w,{plan:r}),t[7]=r,t[8]=S);let C;t[9]===a?C=t[10]:(C=a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d,{className:`h-4 w-4 animate-spin`}),`Checking...`]}):`Check again`,t[9]=a,t[10]=C);let T;t[11]!==a||t[12]!==c||t[13]!==C?(T=(0,b.jsx)(m,{variant:`outline`,size:`sm`,onClick:c,disabled:a,className:`gap-2`,children:C}),t[11]=a,t[12]=c,t[13]=C,t[14]=T):T=t[14];let E=r?.url??null,O;t[15]===E?O=t[16]:(O=(0,b.jsx)(D,{url:E}),t[15]=E,t[16]=O);let k;t[17]!==O||t[18]!==T?(k=(0,b.jsxs)(`div`,{className:`mt-3 flex items-center gap-3`,children:[T,O]}),t[17]=O,t[18]=T,t[19]=k):k=t[19];let A;t[20]!==k||t[21]!==x||t[22]!==S?(A=(0,b.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[h,x,S,k]}),t[20]=k,t[21]=x,t[22]=S,t[23]=A):A=t[23];let j;return t[24]!==f||t[25]!==A?(j=(0,b.jsxs)(_,{variant:`hint`,className:f,children:[p,A]}),t[24]=f,t[25]=A,t[26]=j):j=t[26],j}function w(e){let t=(0,v.c)(11),{plan:n}=e;if(!n)return null;let r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=s(i.labelMuted,`mb-2`),t[0]=r):r=t[0];let a;t[1]===n.label?a=t[2]:(a=(0,b.jsxs)(`p`,{className:r,children:[`Install with `,n.label]}),t[1]=n.label,t[2]=a);let o;t[3]===n.command?o=t[4]:(o=n.command?(0,b.jsx)(E,{command:n.command}):(0,b.jsx)(`p`,{className:i.bodyMuted,children:`No install command was detected for your system — use the download link below.`}),t[3]=n.command,t[4]=o);let c;t[5]===n.notes?c=t[6]:(c=n.notes.map(T),t[5]=n.notes,t[6]=c);let l;return t[7]!==a||t[8]!==o||t[9]!==c?(l=(0,b.jsxs)(`div`,{className:`mt-3 rounded-lg border border-border bg-background p-3`,children:[a,o,c]}),t[7]=a,t[8]=o,t[9]=c,t[10]=l):l=t[10],l}function T(e){return(0,b.jsxs)(`p`,{className:s(i.caption,`mt-2 flex items-start gap-1.5`),children:[(0,b.jsx)(l,{className:`h-3 w-3 mt-0.5 flex-shrink-0`}),e]},e)}function E(e){let t=(0,v.c)(15),{command:n}=e,[r,i]=(0,y.useState)(!1),a;t[0]===n?a=t[1]:(a=async function(){try{await navigator.clipboard.writeText(n),i(!0),window.setTimeout(()=>i(!1),2e3)}catch(e){let t=e;x.error(`Failed to copy git install command:`,t)}},t[0]=n,t[1]=a);let o=a,s;t[2]===n?s=t[3]:(s=(0,b.jsx)(`code`,{className:`flex-1 min-w-0 break-all rounded-md bg-muted px-3 py-2 font-mono`,children:n}),t[2]=n,t[3]=s);let c;t[4]===o?c=t[5]:(c=()=>void o(),t[4]=o,t[5]=c);let l=r?`Copied`:`Copy command`,u;t[6]===r?u=t[7]:(u=r?(0,b.jsx)(f,{className:`h-4 w-4 text-green-600`}):(0,b.jsx)(p,{className:`h-4 w-4`}),t[6]=r,t[7]=u);let d;t[8]!==c||t[9]!==l||t[10]!==u?(d=(0,b.jsx)(m,{variant:`ghost`,size:`icon-sm`,onClick:c,"aria-label":l,children:u}),t[8]=c,t[9]=l,t[10]=u,t[11]=d):d=t[11];let h;return t[12]!==s||t[13]!==d?(h=(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s,d]}),t[12]=s,t[13]=d,t[14]=h):h=t[14],h}function D(e){let t=(0,v.c)(7),{url:n}=e;if(!n)return null;let r;t[0]===n?r=t[1]:(r=function(e){e.preventDefault(),h(n??``)},t[0]=n,t[1]=r);let a=r,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=s(i.caption,`text-brand hover:underline inline-flex items-center gap-1`),t[2]=o):o=t[2];let l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,b.jsx)(c,{className:`h-3 w-3`}),t[3]=l):l=t[3];let u;return t[4]!==a||t[5]!==n?(u=(0,b.jsxs)(`a`,{href:n,onClick:a,className:o,children:[`Download installer `,l]}),t[4]=a,t[5]=n,t[6]=u):u=t[6],u}var O=a(`app.use-git-check`),k=4e3;function A(e={}){let{enabled:t=!0,pollWhileMissing:n=!0}=e,[r,i]=(0,y.useState)(null),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),l=(0,y.useRef)(!1),u=(0,y.useCallback)(async(e={})=>{if(!l.current){l.current=!0,e.silent||o(!0);try{i(await g())}catch(e){O.error(`Failed to check git installation:`,e),i(e=>e??{gitInstalled:!1,version:null,platform:`unknown`,install:null})}finally{l.current=!1,e.silent||o(!1),c(!0)}}},[]),d=(0,y.useRef)(u);return(0,y.useEffect)(()=>{d.current=u},[u]),(0,y.useEffect)(()=>{t&&d.current()},[t]),(0,y.useEffect)(()=>{if(!t||!n||r?.gitInstalled!==!1)return;let e=window.setInterval(()=>{d.current({silent:!0})},k);return()=>{window.clearInterval(e)}},[t,n,r]),{gitInstalled:r?.gitInstalled??null,version:r?.version??null,platform:r?.platform??`unknown`,plan:r?.install??null,loading:a,hasChecked:s,check:u}}export{S as n,C as r,A as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t}from"./react-vendor-Ee0-5T4I.js";import{n,r,tt as i}from"./store-D4D62vkY.js";import{F as a,Ut as o,j as s,wt as c}from"./api-B_ZIptgC.js";import{n as l}from"./explorer-tab-context-BxUVwWQQ.js";import{t as u}from"./use-toast-xpb5jNtN.js";import{$n as d,Wn as f}from"./index-DdJcjvu2.js";var p=e(t(),1),m=new Map;function h(e){let t=m.get(e);return t===void 0?null:t}function g(e,t){m.set(e,t)}function _(e){return m.has(e)}function v(e,t){return`installed-ai-files:${e}:${t??``}`}function y(e){return e===null?null:h(e)}function b(e,t,n){if(e===null)return[];let r=t(e.projectNodes),i=new Set(r.map(e=>e.path));for(let n of t(e.threadNodes))i.has(n.path)||r.push(n);return n&&(r=[...r].sort((e,t)=>e.name.localeCompare(t.name))),r}function x(e){let t=e.children??[];return[e.type,e.path,e.name,e.virtual?`v`:``,e.description??``,e.disableModelInvocation?`dmi`:``,t.map(x)].flat(2).join(`~`)}function S(e,t){return new Set(e.map(e=>`${e.path}${t}`))}async function C(e){try{return await o(e)}catch{return[]}}async function w(e,t){return{projectNodes:await c(e),threadNodes:t===null?[]:await C(t)}}function T(e){return`${e.projectNodes.map(x).join(`|`)}#${e.threadNodes.map(x).join(`|`)}`}function E(e,t){if(e.current!==null)return;let n=y(t);e.current=n===null?null:T(n)}function D({findItems:e,installedPathSuffix:t=``,explorerPathSuffix:o=``,sortByName:c=!1,removedToastTitle:m}){let h=n(),x=r(e=>e.projects),C=r(e=>e.selectedProjectId),D=r(e=>e.selectedThreadId),{handleSelectThread:O}=f(),{openChatDockPanel:k}=d(),{setPendingExplorerPath:A,triggerExplorerRefresh:j,setExplorerClearPath:M}=l(),N=C===null?null:v(C,D??null),[P,F]=(0,p.useState)(N),[I,L]=(0,p.useState)(()=>b(y(N),e,c)),[R,z]=(0,p.useState)(()=>N!==null&&!_(N)),[B,V]=(0,p.useState)(null),[H,U]=(0,p.useState)(!1),[W,G]=(0,p.useState)(()=>S(I,t)),K=(0,p.useRef)(null),q=(0,p.useRef)(0),J=(0,p.useCallback)(function(n){let r=b(n,e,c);L(r),G(S(r,t))},[e,t,c]),Y=(0,p.useCallback)(function(e,t){let n=T(t);n!==K.current&&(K.current=n,g(e,t),J(t))},[J]),X=(0,p.useCallback)(async()=>{if(!C){z(!1);return}let e=q.current+=1,t=v(C,D??null);E(K,t);try{let n=await w(C,D??null);e===q.current&&Y(t,n)}catch{e===q.current&&K.current===null&&J(null)}finally{e===q.current&&z(!1)}},[C,D,Y,J]);return(0,p.useLayoutEffect)(()=>{if(P===N)return;F(N),q.current+=1;let e=y(N);K.current=e===null?null:T(e),J(e),z(N!==null&&e===null)},[P,N,J]),(0,p.useEffect)(()=>{X()},[X]),{selectedProjectId:C,selectedThreadId:D,items:I,loading:R,deleteConfirm:B,setDeleteConfirm:V,deleting:H,installedFilePaths:W,setInstalledFilePaths:G,loadItems:X,handleDelete:(0,p.useCallback)(async e=>{if(!C)return;let n=e.name,r=e.path;U(!0);try{try{await s(C,r)}catch{if(D)await a(D,r);else throw Error(`No thread selected to delete from`)}M(r),j(),G(e=>{let n=new Set(e);return n.delete(`${r}${t}`),n}),u({title:m,description:n}),V(null),await X()}catch(e){u({title:`Error`,description:e instanceof Error?e.message:`Failed to remove item`,variant:`destructive`})}finally{U(!1)}},[C,D,X,j,M,t,m]),handleOpenInExplorer:(0,p.useCallback)(e=>{if(!C)return;let t=x.find(e=>e.projectId===C);if(t){if(h({type:i.OpenProjectPanel,projectId:C}),!t.threads.some(e=>e.threadId===D)){let e=t.threads.find(e=>e.isSelected)??t.threads[0]??null;e&&O(C,e.threadId)}A(`${e}${o}`),k(`explorer`)}},[C,D,x,h,O,A,k,o]),triggerExplorerRefresh:j}}export{g as i,_ as n,h as r,D as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,o as n}from"./react-vendor-Ee0-5T4I.js";var r=t(),i=e(n(),1);function a(e,t){let n=(0,r.c)(10),a;n[0]===t?a=n[1]:(a=t.some(Boolean),n[0]=t,n[1]=a);let o=a,[s,c]=(0,i.useState)(o),l=(0,i.useRef)(o),u=(0,i.useRef)(e),d,f;n[2]===e?(d=n[3],f=n[4]):(d=()=>{u.current!==e&&(u.current=e,l.current=!0,c(!0))},f=[e],n[2]=e,n[3]=d,n[4]=f),(0,i.useEffect)(d,f);let p;n[5]===o?p=n[6]:(p=()=>{o||!l.current||(l.current=!1,c(!1))},n[5]=o,n[6]=p);let m;return n[7]!==o||n[8]!==e?(m=[o,e],n[7]=o,n[8]=e,n[9]=m):m=n[9],(0,i.useEffect)(p,m),s}export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,o as n}from"./react-vendor-Ee0-5T4I.js";var r=t(),i=e(n(),1),a=1,o=1e3,s=0;function c(){return s=(s+1)%(2**53-1),s.toString()}var l=new Map,u=e=>{if(l.has(e))return;let t=setTimeout(()=>{l.delete(e),m({type:`REMOVE_TOAST`,toastId:e})},o);l.set(e,t)},d=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,a)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?u(n):e.toasts.forEach(e=>{u(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},f=[],p={toasts:[]};function m(e){p=d(p,e),f.forEach(e=>{e(p)})}function h({...e}){let t=c(),n=e=>m({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>m({type:`DISMISS_TOAST`,toastId:t});return m({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function g(){let e=(0,r.c)(4),[t,n]=i.useState(p),a,o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>(f.push(n),()=>{let e=f.indexOf(n);e>-1&&f.splice(e,1)}),o=[],e[0]=a,e[1]=o):(a=e[0],o=e[1]),i.useEffect(a,o);let s;return e[2]===t?s=e[3]:(s={...t,toast:h,dismiss:_},e[2]=t,e[3]=s),s}function _(e){return m({type:`DISMISS_TOAST`,toastId:e})}export{g as n,h as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{a as r}from"./chat-dock-context-Cnq0BWgm.js";var i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},a=new class extends i{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},o={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},s=new class{#e=o;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function c(e){setTimeout(e,0)}var l=typeof window>`u`||`Deno`in globalThis;function u(){}function d(e,t){return typeof e==`function`?e(t):e}function f(e){return typeof e==`number`&&e>=0&&e!==1/0}function p(e,t){return Math.max(e+(t||0)-Date.now(),0)}function m(e,t){return typeof e==`function`?e(t):e}function h(e,t){return typeof e==`function`?e(t):e}function g(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==v(o,t.options))return!1}else if(!b(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function _(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(y(t.options.mutationKey)!==y(a))return!1}else if(!b(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function v(e,t){return(t?.queryKeyHashFn||y)(e)}function y(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function b(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>b(e[n],t[n])):!1}var x=Object.prototype.hasOwnProperty;function S(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=w(e)&&w(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:x.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=S(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function ee(e){return new Promise(t=>{s.setTimeout(t,e)})}function D(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:S(e,t)}function te(e){return e}function O(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ne(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var k=Symbol();function A(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===k?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function j(e,t){return typeof e==`function`?e(...t):!!e}function re(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var M=(()=>{let e=()=>l;return{isServer(){return e()},setIsServer(t){e=t}}})();function N(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ie=c;function ae(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ie,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=ae(),F=new class extends i{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function oe(e){return Math.min(1e3*2**e,3e4)}function I(e){return(e??`online`)===`online`?F.isOnline():!0}var L=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R(e){let t=!1,n=0,r,i=N(),o=()=>i.status!==`pending`,s=t=>{if(!o()){let n=new L(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>a.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),d=()=>I(e.networkMode)&&e.canRun(),f=e=>{o()||(r?.(),i.resolve(e))},p=e=>{o()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(o()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),h=()=>{if(o())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(o())return;let i=e.retry??(M.isServer()?0:3),a=e.retryDelay??oe,s=typeof a==`function`?a(n,r):a,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),ee(s).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var z=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),f(this.gcTime)&&(this.#e=s.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(M.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(s.clearTimeout(this.#e),this.#e=void 0)}};function se(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{re(e,()=>t.signal,()=>n=!0)},u=A(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?ne:O;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?V:B,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:B(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function B(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function V(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ce(e,t){return t?B(e,t)!=null:!1}function le(e,t){return!t||!e.getPreviousPageParam?!1:V(e,t)!=null}var H=class extends z{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=G(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=G(this.options);e.data!==void 0&&(this.setState(W(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=D(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(u).catch(u):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>h(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===k||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>m(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!p(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=A(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?se(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=R({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof L&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof L){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...U(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...W(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function U(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function W(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function G(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ue=class extends i{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=N(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),K(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return q(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return q(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof h(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!C(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&J(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||h(this.options.enabled,this.#t)!==h(t.enabled,this.#t)||m(this.options.staleTime,this.#t)!==m(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||h(this.options.enabled,this.#t)!==h(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return fe(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(u)),t}#g(){this.#b();let e=m(this.options.staleTime,this.#t);if(M.isServer()||this.#r.isStale||!f(e))return;let t=p(this.#r.dataUpdatedAt,e)+1;this.#d=s.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(M.isServer()||h(this.options.enabled,this.#t)===!1||!f(this.#p)||this.#p===0)&&(this.#f=s.setInterval(()=>{(this.options.refetchIntervalInBackground||a.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(s.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(s.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&K(e,t),o=i&&J(e,n,t,r);(a||o)&&(l={...l,...U(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let g=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=D(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!g)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=D(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:Y(e,t),refetch:this.refetch,promise:this.#o,isEnabled:h(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{i(this.#o=S.promise=N())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!C(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){P.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function de(e,t){return h(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&h(t.retryOnMount,e)===!1)}function K(e,t){return de(e,t)||e.state.data!==void 0&&q(e,t,t.refetchOnMount)}function q(e,t,n){if(h(t.enabled,e)!==!1&&m(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Y(e,t)}return!1}function J(e,t,n,r){return(e!==t||h(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Y(e,n)}function Y(e,t){return h(t.enabled,e)!==!1&&e.isStaleByTime(m(t.staleTime,e))}function fe(e,t){return!C(e.getCurrentResult(),t)}n();var X=e(t(),1),Z=X.createContext(!1),Q=()=>X.useContext(Z);Z.Provider;function pe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var me=X.createContext(pe()),he=()=>X.useContext(me),ge=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?j(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},_e=e=>{X.useEffect(()=>{e.clearReset()},[e])},ve=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||j(n,[e.error,r])),ye=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},be=(e,t)=>e.isLoading&&e.isFetching&&!t,xe=(e,t)=>e?.suspense&&t.isPending,$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Se(e,t,n){let i=Q(),a=he(),o=r(n),s=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let c=o.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=i?`isRestoring`:l?`optimistic`:void 0,ye(s),ge(s,a,c),_e(a);let d=!o.getQueryCache().get(s.queryHash),[f]=X.useState(()=>new t(o,s)),p=f.getOptimisticResult(s),m=!i&&l;if(X.useSyncExternalStore(X.useCallback(e=>{let t=m?f.subscribe(P.batchCalls(e)):u;return f.updateResult(),t},[f,m]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),X.useEffect(()=>{f.setOptions(s)},[s,f]),xe(s,p))throw $(s,f,a);if(ve({result:p,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw p.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(s,p),s.experimental_prefetchInRender&&!M.isServer()&&be(p,i)&&(d?$(s,f,a):c?.promise)?.catch(u).finally(()=>{f.updateResult()}),s.notifyOnChangeProps?p:f.trackResult(p)}export{b as _,le as a,a as b,F as c,y as d,v as f,u as g,g as h,ce as i,P as l,_ as m,ue as n,z as o,te as p,H as r,R as s,Se as t,d as u,m as v,i as x,k as y};
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{a as r}from"./chat-dock-context-DhO-jYMh.js";var i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},a=new class extends i{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},o={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},s=new class{#e=o;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function c(e){setTimeout(e,0)}var l=typeof window>`u`||`Deno`in globalThis;function u(){}function d(e,t){return typeof e==`function`?e(t):e}function f(e){return typeof e==`number`&&e>=0&&e!==1/0}function p(e,t){return Math.max(e+(t||0)-Date.now(),0)}function m(e,t){return typeof e==`function`?e(t):e}function h(e,t){return typeof e==`function`?e(t):e}function g(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==v(o,t.options))return!1}else if(!b(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function _(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(y(t.options.mutationKey)!==y(a))return!1}else if(!b(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function v(e,t){return(t?.queryKeyHashFn||y)(e)}function y(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function b(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>b(e[n],t[n])):!1}var x=Object.prototype.hasOwnProperty;function S(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=w(e)&&w(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:x.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=S(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function ee(e){return new Promise(t=>{s.setTimeout(t,e)})}function D(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:S(e,t)}function te(e){return e}function O(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ne(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var k=Symbol();function A(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===k?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function j(e,t){return typeof e==`function`?e(...t):!!e}function re(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var M=(()=>{let e=()=>l;return{isServer(){return e()},setIsServer(t){e=t}}})();function N(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ie=c;function ae(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ie,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=ae(),F=new class extends i{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function oe(e){return Math.min(1e3*2**e,3e4)}function I(e){return(e??`online`)===`online`?F.isOnline():!0}var L=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R(e){let t=!1,n=0,r,i=N(),o=()=>i.status!==`pending`,s=t=>{if(!o()){let n=new L(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>a.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),d=()=>I(e.networkMode)&&e.canRun(),f=e=>{o()||(r?.(),i.resolve(e))},p=e=>{o()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(o()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),h=()=>{if(o())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(o())return;let i=e.retry??(M.isServer()?0:3),a=e.retryDelay??oe,s=typeof a==`function`?a(n,r):a,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),ee(s).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var z=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),f(this.gcTime)&&(this.#e=s.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(M.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(s.clearTimeout(this.#e),this.#e=void 0)}};function se(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{re(e,()=>t.signal,()=>n=!0)},u=A(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?ne:O;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?V:B,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:B(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function B(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function V(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ce(e,t){return t?B(e,t)!=null:!1}function le(e,t){return!t||!e.getPreviousPageParam?!1:V(e,t)!=null}var H=class extends z{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=G(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=G(this.options);e.data!==void 0&&(this.setState(W(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=D(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(u).catch(u):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>h(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===k||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>m(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!p(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=A(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?se(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=R({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof L&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof L){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...U(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...W(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function U(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function W(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function G(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ue=class extends i{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=N(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),K(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return q(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return q(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof h(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!C(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&J(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||h(this.options.enabled,this.#t)!==h(t.enabled,this.#t)||m(this.options.staleTime,this.#t)!==m(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||h(this.options.enabled,this.#t)!==h(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return fe(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(u)),t}#g(){this.#b();let e=m(this.options.staleTime,this.#t);if(M.isServer()||this.#r.isStale||!f(e))return;let t=p(this.#r.dataUpdatedAt,e)+1;this.#d=s.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(M.isServer()||h(this.options.enabled,this.#t)===!1||!f(this.#p)||this.#p===0)&&(this.#f=s.setInterval(()=>{(this.options.refetchIntervalInBackground||a.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(s.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(s.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&K(e,t),o=i&&J(e,n,t,r);(a||o)&&(l={...l,...U(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let g=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=D(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!g)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=D(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:Y(e,t),refetch:this.refetch,promise:this.#o,isEnabled:h(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{i(this.#o=S.promise=N())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!C(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){P.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function de(e,t){return h(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&h(t.retryOnMount,e)===!1)}function K(e,t){return de(e,t)||e.state.data!==void 0&&q(e,t,t.refetchOnMount)}function q(e,t,n){if(h(t.enabled,e)!==!1&&m(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Y(e,t)}return!1}function J(e,t,n,r){return(e!==t||h(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Y(e,n)}function Y(e,t){return h(t.enabled,e)!==!1&&e.isStaleByTime(m(t.staleTime,e))}function fe(e,t){return!C(e.getCurrentResult(),t)}n();var X=e(t(),1),Z=X.createContext(!1),Q=()=>X.useContext(Z);Z.Provider;function pe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var me=X.createContext(pe()),he=()=>X.useContext(me),ge=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?j(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},_e=e=>{X.useEffect(()=>{e.clearReset()},[e])},ve=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||j(n,[e.error,r])),ye=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},be=(e,t)=>e.isLoading&&e.isFetching&&!t,xe=(e,t)=>e?.suspense&&t.isPending,$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Se(e,t,n){let i=Q(),a=he(),o=r(n),s=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let c=o.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=i?`isRestoring`:l?`optimistic`:void 0,ye(s),ge(s,a,c),_e(a);let d=!o.getQueryCache().get(s.queryHash),[f]=X.useState(()=>new t(o,s)),p=f.getOptimisticResult(s),m=!i&&l;if(X.useSyncExternalStore(X.useCallback(e=>{let t=m?f.subscribe(P.batchCalls(e)):u;return f.updateResult(),t},[f,m]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),X.useEffect(()=>{f.setOptions(s)},[s,f]),xe(s,p))throw $(s,f,a);if(ve({result:p,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw p.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(s,p),s.experimental_prefetchInRender&&!M.isServer()&&be(p,i)&&(d?$(s,f,a):c?.promise)?.catch(u).finally(()=>{f.updateResult()}),s.notifyOnChangeProps?p:f.trackResult(p)}export{b as _,le as a,a as b,F as c,y as d,v as f,u as g,g as h,ce as i,P as l,_ as m,ue as n,z as o,te as p,H as r,R as s,Se as t,d as u,m as v,i as x,k as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t}from"./react-vendor-Ee0-5T4I.js";import{Ct as n,vn as r}from"./dist-DZtmmQ-F.js";var i=e(t(),1);function a(e){return e.name?e.name:e.gitUrl?.split(`/`).pop()?.replace(`.git`,``)??e.projectId}function o(e,t){return t&&n(t)?a(t):r(e)}function s(e,t,n){if(!t)return`Chat`;for(let r of e){let e=r.threads.find(e=>e.threadId===t);if(!e)continue;let i=e.chatTitles?.[n]?.trim();if(i)return i.length>50?`${i.substring(0,50)}...`:i}return`Chat`}function c(e,t){if(t)for(let n of e){let e=n.threads.find(e=>e.threadId===t);if(e)return e.currentConversationId?.trim()||void 0}}function l(e,t){return t.map(function(t){let n=e.find(e=>e.projectId===t.projectId);return n?{...t,threads:t.threads.map(function(e){let t=n.threads.find(t=>t.threadId===e.threadId)?.chatTitles;return!t||Object.keys(t).length===0?e:{...e,chatTitles:{...t,...e.chatTitles}}})}:t})}function u(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function d(...e){return t=>{let n=!1,r=e.map(e=>{let r=u(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():u(e[t],null)}}}}function f(...e){return i.useCallback(d(...e),e)}function p(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=p(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function m(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=p(e))&&(r&&(r+=` `),r+=t);return r}var h=`-`,g=e=>{let t=b(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(h);return n[0]===``&&n.length!==1&&n.shift(),_(n,t)||y(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},_=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),i=r?_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let a=e.join(h);return t.validators.find(({validator:e})=>e(a))?.classGroupId},v=/^\[(.+)\]$/,y=e=>{if(v.test(e)){let t=v.exec(e)[1],n=t?.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},b=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return w(Object.entries(e.classGroups),n).forEach(([e,n])=>{x(n,r,e,t)}),r},x=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:S(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(C(e)){x(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{x(i,S(t,e),n,r)})})},S=(e,t)=>{let n=e;return t.split(h).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},C=e=>e.isThemeGetter,w=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,T=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},E=`!`,D=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(E);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},O=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},k=e=>({cache:T(e.cacheSize),parseClassName:D(e),...g(e)}),A=/\s+/,j=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(A),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?` `+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=O(c).join(`:`),h=l?m+E:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function M(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=N(t))&&(r&&(r+=` `),r+=n);return r}var N=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=N(e[r]))&&(n&&(n+=` `),n+=t);return n};function P(e,...t){let n,r,i,a=o;function o(o){return n=k(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=j(e,n);return i(e,a),a}return function(){return a(M.apply(null,arguments))}}var F=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},I=/^\[(?:([a-z-]+):)?(.+)\]$/i,L=/^\d+\/\d+$/,R=new Set([`px`,`full`,`screen`]),ee=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,te=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,re=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ie=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,z=e=>V(e)||R.has(e)||L.test(e),B=e=>q(e,`length`,fe),V=e=>!!e&&!Number.isNaN(Number(e)),H=e=>q(e,`number`,V),U=e=>!!e&&Number.isInteger(Number(e)),ae=e=>e.endsWith(`%`)&&V(e.slice(0,-1)),W=e=>I.test(e),G=e=>ee.test(e),oe=new Set([`length`,`size`,`percentage`]),se=e=>q(e,oe,J),ce=e=>q(e,`position`,J),le=new Set([`image`,`url`]),ue=e=>q(e,le,me),de=e=>q(e,``,pe),K=()=>!0,q=(e,t,n)=>{let r=I.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},fe=e=>te.test(e)&&!ne.test(e),J=()=>!1,pe=e=>re.test(e),me=e=>ie.test(e),he=P(()=>{let e=F(`colors`),t=F(`spacing`),n=F(`blur`),r=F(`brightness`),i=F(`borderColor`),a=F(`borderRadius`),o=F(`borderSpacing`),s=F(`borderWidth`),c=F(`contrast`),l=F(`grayscale`),u=F(`hueRotate`),d=F(`invert`),f=F(`gap`),p=F(`gradientColorStops`),m=F(`gradientColorStopPositions`),h=F(`inset`),g=F(`margin`),_=F(`opacity`),v=F(`padding`),y=F(`saturate`),b=F(`scale`),x=F(`sepia`),S=F(`skew`),C=F(`space`),w=F(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,W,t],O=()=>[W,t],k=()=>[``,z,B],A=()=>[`auto`,V,W],j=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],M=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],N=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],I=()=>[``,`0`,W],L=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],R=()=>[V,W];return{cacheSize:500,separator:`:`,theme:{colors:[K],spacing:[z,B],blur:[`none`,``,G,W],brightness:R(),borderColor:[e],borderRadius:[`none`,``,`full`,G,W],borderSpacing:O(),borderWidth:k(),contrast:R(),grayscale:I(),hueRotate:R(),invert:I(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[ae,B],inset:D(),margin:D(),opacity:R(),padding:O(),saturate:R(),scale:R(),sepia:I(),skew:R(),space:O(),translate:O()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,W]}],container:[`container`],columns:[{columns:[G]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:[...j(),W]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,U,W]}],basis:[{basis:D()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,W]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:[`first`,`last`,`none`,U,W]}],"grid-cols":[{"grid-cols":[K]}],"col-start-end":[{col:[`auto`,{span:[`full`,U,W]},W]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[K]}],"row-start-end":[{row:[`auto`,{span:[U,W]},W]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,W]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,W]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...P()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...P(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...P(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,W,t]}],"min-w":[{"min-w":[W,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[W,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[G]},G]}],h:[{h:[W,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[W,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[W,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[W,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,G,B]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,H]}],"font-family":[{font:[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,W]}],"line-clamp":[{"line-clamp":[`none`,V,H]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,z,W]}],"list-image":[{"list-image":[`none`,W]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,W]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...M(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,z,B]}],"underline-offset":[{"underline-offset":[`auto`,z,W]}],"text-decoration-color":[{decoration:[e]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:O()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,W]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...j(),ce]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,se]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...M(),`hidden`]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:M()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[``,...M()]}],"outline-offset":[{"outline-offset":[z,W]}],"outline-w":[{outline:[z,B]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[z,B]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,G,de]}],"shadow-color":[{shadow:[K]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...N(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,G,W]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,W]}],duration:[{duration:R()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,W]}],delay:[{delay:R()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,W]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[U,W]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,W]}],accent:[{accent:[`auto`,e]}],appearance:[{appearance:[`none`,`auto`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,W]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,W]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[z,B,H]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]}}}),Y=6e4,X=60*Y,Z=24*X;function Q(e,t){if(!e)return null;let n=new Date(e).getTime();return Number.isNaN(n)?null:Math.max(t-n,0)}var ge={minute(e){return`${e}m`},hour(e){return`${e}${e===1?`hr`:`hrs`}`},day(e){return`${e}d`}},_e={minute(e){return`${e} ${e===1?`min`:`mins`}`},hour(e){return`${e} ${e===1?`hr`:`hrs`}`},day(e){return`${e} ${e===1?`day`:`days`}`}};function $(e,t){return e<Y?`now`:e<X?t.minute(Math.floor(e/Y)):e<Z?t.hour(Math.floor(e/X)):t.day(Math.floor(e/Z))}function ve(e){return e.toFixed(2).replace(/\.00$/,``)}function ye(e,t=Date.now()){let n=Q(e,t);return n===null?``:$(n,ge)}function be(e,t=Date.now()){let n=Q(e,t);return n===null?``:$(n,_e)}function xe(...e){return he(m(e))}export{m as a,s as c,c as d,l as f,ye as i,o as l,be as n,d as o,ve as r,f as s,xe as t,a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{H as e,U as t,Yt as n}from"./index-DdJcjvu2.js";var r=class extends n{constructor(){super(...arguments),this.selectionStarted=!1}async impact(e){let t=this.patternForImpact(e?.style);this.vibrateWithPattern(t)}async notification(e){let t=this.patternForNotification(e?.type);this.vibrateWithPattern(t)}async vibrate(e){let t=e?.duration||300;this.vibrateWithPattern([t])}async selectionStart(){this.selectionStarted=!0}async selectionChanged(){this.selectionStarted&&this.vibrateWithPattern([70])}async selectionEnd(){this.selectionStarted=!1}patternForImpact(t=e.Heavy){return t===e.Medium?[43]:t===e.Light?[20]:[61]}patternForNotification(e=t.Success){return e===t.Warning?[30,40,30,50,60]:e===t.Error?[27,45,50]:[35,65,21]}vibrateWithPattern(e){if(navigator.vibrate)navigator.vibrate(e);else throw this.unavailable(`Browser does not support the vibrate API`)}};export{r as HapticsWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yt as e}from"./index-DdJcjvu2.js";var t=class extends e{constructor(){super(...arguments),this.wakeLock=null,this._isSupported=typeof navigator<`u`&&`wakeLock`in navigator,this.handleVisibilityChange=()=>{document.visibilityState===`visible`&&this.keepAwake()}}async keepAwake(){this._isSupported||this.throwUnsupportedError(),this.wakeLock&&await this.allowSleep(),this.wakeLock=await navigator.wakeLock.request(`screen`),document.addEventListener(`visibilitychange`,this.handleVisibilityChange),document.addEventListener(`fullscreenchange`,this.handleVisibilityChange)}async allowSleep(){var e;this._isSupported||this.throwUnsupportedError(),(e=this.wakeLock)==null||e.release(),this.wakeLock=null,document.removeEventListener(`visibilitychange`,this.handleVisibilityChange),document.removeEventListener(`fullscreenchange`,this.handleVisibilityChange)}async isSupported(){return{isSupported:this._isSupported}}async isKeptAwake(){return this._isSupported||this.throwUnsupportedError(),{isKeptAwake:!!this.wakeLock}}throwUnsupportedError(){throw this.unavailable(`Screen Wake Lock API not available in this browser.`)}};export{t as KeepAwakeWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yt as e}from"./index-DdJcjvu2.js";var t=class extends e{constructor(){super(),this.handleVisibilityChange=()=>{let e={isActive:document.hidden!==!0};this.notifyListeners(`appStateChange`,e),document.hidden?this.notifyListeners(`pause`,null):this.notifyListeners(`resume`,null)},document.addEventListener(`visibilitychange`,this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented(`Not implemented on web.`)}async getInfo(){throw this.unimplemented(`Not implemented on web.`)}async getLaunchUrl(){return{url:``}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented(`Not implemented on web.`)}async toggleBackButtonHandler(){throw this.unimplemented(`Not implemented on web.`)}async getAppLanguage(){return{value:navigator.language.split(`-`)[0].toLowerCase()}}};export{t as AppWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Yt as e,d as t,l as n,u as r}from"./index-DdJcjvu2.js";var i=class extends e{async stopAndHideScanner(){console.log(window.OSBarcodeWebScanner),window.OSBarcodeWebScanner&&(await window.OSBarcodeWebScanner.stop(),window.OSBarcodeWebScanner=null),document.getElementById(`cap-os-barcode-scanner-container-dialog`).style.display=`none`}buildScannerElement(){if(document.getElementById(`cap-os-barcode-scanner-container`)){document.getElementById(`cap-os-barcode-scanner-container`).className=`scanner-container-display`;return}let e=document.body.appendChild(document.createElement(`div`));e.id=`cap-os-barcode-scanner-container`;let t=document.createElement(`div`);t.id=`cap-os-barcode-scanner-container-dialog`,t.className=`scanner-dialog`;let n=document.createElement(`div`);n.className=`scanner-dialog-inner`;let r=document.createElement(`span`);r.id=`cap-os-barcode-scanner-close-button`,r.className=`close-button`,r.innerHTML=`×`,n.appendChild(r);let i=document.createElement(`p`);i.innerHTML=` `,n.appendChild(i);let a=document.createElement(`div`);a.className=`scanner-container-full-width`,a.id=`cap-os-barcode-scanner-container-scanner`,n.appendChild(a),t.appendChild(n),e.appendChild(t)}async scanBarcode(e){return this.buildScannerElement(),document.getElementById(`cap-os-barcode-scanner-container-dialog`).style.display=`block`,new Promise((i,a)=>{let o={facingMode:e.cameraDirection===1?`environment`:`user`,hasScannerButton:!1,scanButton:e.scanButton===void 0?!1:e.scanButton,showScanLine:!1,scanInstructions:e.scanInstructions?e.scanInstructions:``,orientation:e.scanOrientation?e.scanOrientation:n.PORTRAIT,showCameraSelection:e.web?.showCameraSelection?e.web.showCameraSelection:!1,typeHint:e.hint===17?void 0:e.hint,scannerFPS:e.web?.scannerFPS?e.web.scannerFPS:50},s=!1,c=document.getElementById(`cap-os-barcode-scanner-close-button`);c&&(c.onclick=async()=>{s||(s=!0,await this.stopAndHideScanner(),a(Error(`Couldn’t scan because the process was cancelled.`)))});let l=document.getElementById(`cap-os-barcode-scanner-container-scanner`);if(!l)throw Error(`Scanner Element is required for web`);window.OSBarcodeWebScanner=new t(l.id,{formatsToSupport:o.typeHint===void 0?void 0:[o.typeHint],verbose:void 0});let u={fps:o.scannerFPS,qrbox:l.getBoundingClientRect().width*(9/16)-10,aspectRatio:16/9,videoConstraints:{focusMode:`continuous`,height:{min:576,ideal:1920},deviceId:void 0,facingMode:o.facingMode}};window.OSBarcodeWebScanner.start({facingMode:o.facingMode},u,(e,t)=>{this.stopAndHideScanner(),i({ScanResult:e,format:t.result.format?.format??r.ALL})},e=>{[`NotFoundException`,`No barcode or QR code detected`,`No MultiFormat Readers were able to detect the code`].find(t=>e.indexOf(t)!==-1)||(this.stopAndHideScanner(),console.error(`[Scanner Web Error] ${e}`),a(e))})})}};export{i as CapacitorBarcodeScannerWeb};
|
|
@@ -99,6 +99,57 @@
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
function isFrameElement(node) {
|
|
103
|
+
var tag = typeof node.tagName === "string" ? node.tagName.toUpperCase() : "";
|
|
104
|
+
return tag === "IFRAME" || tag === "FRAME";
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function installFrameWindow(frameNode) {
|
|
108
|
+
if (frameNode && frameNode.contentWindow) {
|
|
109
|
+
tryInstallIntoFrame(frameNode.contentWindow);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function listenForFrameLoad(frameNode) {
|
|
114
|
+
if (typeof frameNode.addEventListener !== "function") {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
frameNode.addEventListener("load", function onFrameLoad() {
|
|
118
|
+
installFrameWindow(this);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function installNestedFrames(node) {
|
|
123
|
+
if (typeof node.querySelectorAll !== "function") {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
var nested = node.querySelectorAll("iframe, frame");
|
|
127
|
+
for (var k = 0; k < nested.length; k++) {
|
|
128
|
+
installFrameWindow(nested[k]);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function tryInstallFrameElement(node) {
|
|
133
|
+
if (!node || node.nodeType !== 1) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (isFrameElement(node)) {
|
|
137
|
+
installFrameWindow(node);
|
|
138
|
+
listenForFrameLoad(node);
|
|
139
|
+
}
|
|
140
|
+
installNestedFrames(node);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function observeAddedFrames(mutations) {
|
|
144
|
+
for (var i = 0; i < mutations.length; i++) {
|
|
145
|
+
var added = mutations[i].addedNodes;
|
|
146
|
+
if (!added) continue;
|
|
147
|
+
for (var n = 0; n < added.length; n++) {
|
|
148
|
+
tryInstallFrameElement(added[n]);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
102
153
|
function attachSameOriginFrameInstaller(targetWindow, targetDocument) {
|
|
103
154
|
if (!targetWindow || !targetDocument) {
|
|
104
155
|
return;
|
|
@@ -119,16 +170,10 @@
|
|
|
119
170
|
|
|
120
171
|
function onEmbeddedLoad(event) {
|
|
121
172
|
var target = event && event.target;
|
|
122
|
-
if (!target) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
var tag = typeof target.tagName === "string" ? target.tagName.toUpperCase() : "";
|
|
126
|
-
if (tag !== "IFRAME" && tag !== "FRAME") {
|
|
173
|
+
if (!target || !isFrameElement(target)) {
|
|
127
174
|
return;
|
|
128
175
|
}
|
|
129
|
-
|
|
130
|
-
tryInstallIntoFrame(target.contentWindow);
|
|
131
|
-
}
|
|
176
|
+
installFrameWindow(target);
|
|
132
177
|
}
|
|
133
178
|
|
|
134
179
|
if (typeof targetDocument.addEventListener === "function") {
|
|
@@ -143,37 +188,7 @@
|
|
|
143
188
|
return;
|
|
144
189
|
}
|
|
145
190
|
try {
|
|
146
|
-
var observer = new MutationObserverCtor(
|
|
147
|
-
for (var i = 0; i < mutations.length; i++) {
|
|
148
|
-
var added = mutations[i].addedNodes;
|
|
149
|
-
if (!added) continue;
|
|
150
|
-
for (var n = 0; n < added.length; n++) {
|
|
151
|
-
var node = added[n];
|
|
152
|
-
if (!node || node.nodeType !== 1) continue;
|
|
153
|
-
var tag = typeof node.tagName === "string" ? node.tagName.toUpperCase() : "";
|
|
154
|
-
if (tag === "IFRAME" || tag === "FRAME") {
|
|
155
|
-
if (node.contentWindow) {
|
|
156
|
-
tryInstallIntoFrame(node.contentWindow);
|
|
157
|
-
}
|
|
158
|
-
if (typeof node.addEventListener === "function") {
|
|
159
|
-
node.addEventListener("load", function () {
|
|
160
|
-
if (this.contentWindow) {
|
|
161
|
-
tryInstallIntoFrame(this.contentWindow);
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
if (typeof node.querySelectorAll === "function") {
|
|
167
|
-
var nested = node.querySelectorAll("iframe, frame");
|
|
168
|
-
for (var k = 0; k < nested.length; k++) {
|
|
169
|
-
if (nested[k] && nested[k].contentWindow) {
|
|
170
|
-
tryInstallIntoFrame(nested[k].contentWindow);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
});
|
|
191
|
+
var observer = new MutationObserverCtor(observeAddedFrames);
|
|
177
192
|
observer.observe(targetDocument.documentElement || targetDocument, {
|
|
178
193
|
childList: true,
|
|
179
194
|
subtree: true,
|
|
@@ -869,37 +884,77 @@
|
|
|
869
884
|
state.label = null;
|
|
870
885
|
}
|
|
871
886
|
|
|
887
|
+
function firstTruthyLabel(values) {
|
|
888
|
+
for (let index = 0; index < values.length; index++) {
|
|
889
|
+
if (values[index]) {
|
|
890
|
+
return values[index];
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
return "";
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
function previewElementClassName(element) {
|
|
897
|
+
if (!element.classList || element.classList.length === 0) {
|
|
898
|
+
return "";
|
|
899
|
+
}
|
|
900
|
+
return (
|
|
901
|
+
"." +
|
|
902
|
+
Array.from(element.classList)
|
|
903
|
+
.slice(0, 2)
|
|
904
|
+
.map(function escapeClassToken(classToken) {
|
|
905
|
+
return CSS.escape(classToken);
|
|
906
|
+
})
|
|
907
|
+
.join(".")
|
|
908
|
+
);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
function previewElementTextPreview(element) {
|
|
912
|
+
const text = (element.innerText || element.textContent || "").trim().replace(/\s+/g, " ");
|
|
913
|
+
return text.length > 48 ? text.slice(0, 48) + "…" : text;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
function quotedAttribute(element, attributeName) {
|
|
917
|
+
const value = element.getAttribute(attributeName);
|
|
918
|
+
return value ? '"' + value + '"' : "";
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
function namedAttribute(element) {
|
|
922
|
+
const name = element.getAttribute("name");
|
|
923
|
+
return name ? 'name="' + name + '"' : "";
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
function roleAttribute(element) {
|
|
927
|
+
const role = element.getAttribute("role");
|
|
928
|
+
return role ? "role=" + role : "";
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
function previewElementIdLabel(element) {
|
|
932
|
+
return element.id ? "#" + CSS.escape(element.id) : "";
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
function previewElementTextLabel(element) {
|
|
936
|
+
const textPreview = previewElementTextPreview(element);
|
|
937
|
+
return textPreview ? '"' + textPreview + '"' : "";
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
function previewElementLabels(element) {
|
|
941
|
+
return [
|
|
942
|
+
previewElementIdLabel(element),
|
|
943
|
+
quotedAttribute(element, "aria-label"),
|
|
944
|
+
quotedAttribute(element, "placeholder"),
|
|
945
|
+
namedAttribute(element),
|
|
946
|
+
quotedAttribute(element, "title"),
|
|
947
|
+
previewElementTextLabel(element),
|
|
948
|
+
roleAttribute(element),
|
|
949
|
+
];
|
|
950
|
+
}
|
|
951
|
+
|
|
872
952
|
function describeElement(element) {
|
|
873
953
|
if (!element || !element.tagName) return "element";
|
|
874
|
-
const
|
|
875
|
-
|
|
876
|
-
const
|
|
877
|
-
|
|
878
|
-
const name = element.getAttribute("name");
|
|
879
|
-
const placeholder = element.getAttribute("placeholder");
|
|
880
|
-
const title = element.getAttribute("title");
|
|
881
|
-
const text = (element.innerText || element.textContent || "").trim().replace(/\s+/g, " ");
|
|
882
|
-
const textPreview = text.length > 48 ? text.slice(0, 48) + "…" : text;
|
|
883
|
-
const className =
|
|
884
|
-
element.classList && element.classList.length > 0
|
|
885
|
-
? "." +
|
|
886
|
-
Array.from(element.classList)
|
|
887
|
-
.slice(0, 2)
|
|
888
|
-
.map(function (classToken) {
|
|
889
|
-
return CSS.escape(classToken);
|
|
890
|
-
})
|
|
891
|
-
.join(".")
|
|
892
|
-
: "";
|
|
893
|
-
|
|
894
|
-
const headline = "<" + tag + (className ? className : "") + ">";
|
|
895
|
-
if (id) return headline + " " + id;
|
|
896
|
-
if (ariaLabel) return headline + ' "' + ariaLabel + '"';
|
|
897
|
-
if (placeholder) return headline + ' "' + placeholder + '"';
|
|
898
|
-
if (name) return headline + ' name="' + name + '"';
|
|
899
|
-
if (title) return headline + ' "' + title + '"';
|
|
900
|
-
if (textPreview) return headline + ' "' + textPreview + '"';
|
|
901
|
-
if (role) return headline + " role=" + role;
|
|
902
|
-
return headline;
|
|
954
|
+
const headline =
|
|
955
|
+
"<" + element.tagName.toLowerCase() + previewElementClassName(element) + ">";
|
|
956
|
+
const suffix = firstTruthyLabel(previewElementLabels(element));
|
|
957
|
+
return suffix ? headline + " " + suffix : headline;
|
|
903
958
|
}
|
|
904
959
|
|
|
905
960
|
function ensureOverlay() {
|
package/dist/public/index.html
CHANGED
|
@@ -22,38 +22,40 @@
|
|
|
22
22
|
<meta name="apple-mobile-web-app-title" content="Tarsk" />
|
|
23
23
|
|
|
24
24
|
<title>Tarsk</title>
|
|
25
|
-
<script type="module" crossorigin src="/assets/index-
|
|
25
|
+
<script type="module" crossorigin src="/assets/index-DdJcjvu2.js"></script>
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/react-vendor-Ee0-5T4I.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/utils-
|
|
30
|
-
<link rel="modulepreload" crossorigin href="/assets/progress-indicator-
|
|
31
|
-
<link rel="modulepreload" crossorigin href="/assets/button-
|
|
32
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-DZtmmQ-F.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/utils-BCj_kT9l.js">
|
|
30
|
+
<link rel="modulepreload" crossorigin href="/assets/progress-indicator-C7Kj9U3t.js">
|
|
31
|
+
<link rel="modulepreload" crossorigin href="/assets/button-DhxraVUW.js">
|
|
32
|
+
<link rel="modulepreload" crossorigin href="/assets/browser-overlay-block-CiDtkfup.js">
|
|
33
|
+
<link rel="modulepreload" crossorigin href="/assets/use-browser-overlay-block-DyprQSIG.js">
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-iDwSbcD5.js">
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/es2015-B0KHrBGH.js">
|
|
36
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-BkOEUrQf.js">
|
|
37
|
+
<link rel="modulepreload" crossorigin href="/assets/alert-dialog-DTxl_mXc.js">
|
|
33
38
|
<link rel="modulepreload" crossorigin href="/assets/dist-OixawqbU.js">
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/scroll-area-
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/tooltip-
|
|
37
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
38
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
39
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
39
|
+
<link rel="modulepreload" crossorigin href="/assets/scroll-area-BQ9bdsVQ.js">
|
|
40
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-CA_zFhwJ.js">
|
|
41
|
+
<link rel="modulepreload" crossorigin href="/assets/tooltip-Cg_EhO9M.js">
|
|
42
|
+
<link rel="modulepreload" crossorigin href="/assets/use-toast-xpb5jNtN.js">
|
|
43
|
+
<link rel="modulepreload" crossorigin href="/assets/api-B_ZIptgC.js">
|
|
44
|
+
<link rel="modulepreload" crossorigin href="/assets/store-D4D62vkY.js">
|
|
45
|
+
<link rel="modulepreload" crossorigin href="/assets/chat-dock-context-DhO-jYMh.js">
|
|
40
46
|
<link rel="modulepreload" crossorigin href="/assets/explorer-tab-context-BxUVwWQQ.js">
|
|
41
47
|
<link rel="modulepreload" crossorigin href="/assets/terminal-output-activity-B1bjjsl7.js">
|
|
42
48
|
<link rel="modulepreload" crossorigin href="/assets/main-tab-context-CNgxXqnH.js">
|
|
43
|
-
<link rel="modulepreload" crossorigin href="/assets/browser-overlay-block-CiDtkfup.js">
|
|
44
|
-
<link rel="modulepreload" crossorigin href="/assets/use-browser-overlay-block-DyprQSIG.js">
|
|
45
49
|
<link rel="modulepreload" crossorigin href="/assets/suspense-resource-DzlMlIgR.js">
|
|
46
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
47
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
48
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
49
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
50
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-CWYnBq-n.js">
|
|
51
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-COfI64N5.js">
|
|
50
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-Dj1qT-gv.js">
|
|
51
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-Bihbg_hO.js">
|
|
52
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-aB1qUwWW.js">
|
|
53
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-BZmr2Qex.js">
|
|
52
54
|
<link rel="modulepreload" crossorigin href="/assets/dist-CSssbxDI.js">
|
|
53
|
-
<link rel="modulepreload" crossorigin href="/assets/useBaseQuery-
|
|
54
|
-
<link rel="modulepreload" crossorigin href="/assets/lucide-react-
|
|
55
|
+
<link rel="modulepreload" crossorigin href="/assets/useBaseQuery-ChJtNS_3.js">
|
|
56
|
+
<link rel="modulepreload" crossorigin href="/assets/lucide-react-CNNzKD4G.js">
|
|
55
57
|
<link rel="modulepreload" crossorigin href="/assets/chunk-QFMPRPBF-COsSkB7x.js">
|
|
56
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
58
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B3oaBks2.css">
|
|
57
59
|
</head>
|
|
58
60
|
<body class="font-sans antialiased">
|
|
59
61
|
<div id="root"></div>
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"description": "The official empty starter project for Angular",
|
|
174
174
|
"url": "https://angular.dev/installation#instructions",
|
|
175
175
|
"commands": [
|
|
176
|
-
"npx
|
|
176
|
+
"npx @angular/cli@latest new $(project-name) --skip-install",
|
|
177
177
|
"#$(project-folder)"
|
|
178
178
|
],
|
|
179
179
|
"variation": "Starter",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tarsk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.80",
|
|
4
4
|
"description": "CLI for Tarsk - Project Threads Manager",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"build:npm": "bun run build:app-assets && bun run build:server",
|
|
33
33
|
"start": "bun run dev",
|
|
34
34
|
"lint": "bunx tsc --noEmit",
|
|
35
|
-
"test": "env -u TARSK_DEBUG vp test run",
|
|
35
|
+
"test": "env -u TARSK_DEBUG vp test run && bun run test:bundled-skills",
|
|
36
|
+
"test:bundled-skills": "node --test bundled-skills/*/scripts/__tests__/*.test.js",
|
|
36
37
|
"benchmark:observations": "bun scripts/benchmark-observations.ts",
|
|
37
38
|
"benchmark:supersession": "bun scripts/benchmark-supersession.ts",
|
|
38
39
|
"dump:conversation": "bun scripts/dump-conversation.ts",
|
|
@@ -46,8 +47,8 @@
|
|
|
46
47
|
"website": "cd ../site && bunx serve . -l 8080"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@earendil-works/pi-agent-core": "0.
|
|
50
|
-
"@earendil-works/pi-ai": "0.
|
|
50
|
+
"@earendil-works/pi-agent-core": "0.86.1",
|
|
51
|
+
"@earendil-works/pi-ai": "0.86.1",
|
|
51
52
|
"@hono/node-server": "1.19.13",
|
|
52
53
|
"@hono/node-ws": "1.3.1",
|
|
53
54
|
"@libsql/client": "0.17.2",
|
|
@@ -61,7 +62,6 @@
|
|
|
61
62
|
"hono": "4.12.25",
|
|
62
63
|
"md-to-pdf": "5.2.5",
|
|
63
64
|
"open": "^11.0.0",
|
|
64
|
-
"grepts": "workspace:*",
|
|
65
65
|
"typebox": "1.1.38",
|
|
66
66
|
"undici": "^7.0.0",
|
|
67
67
|
"yaml": "^2.9.0"
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@vitest/coverage-v8": "4.1.8",
|
|
73
73
|
"electrobun": "1.18.1",
|
|
74
74
|
"esbuild": "0.28.0",
|
|
75
|
+
"grepts": "workspace:*",
|
|
75
76
|
"tsx": "^4.7.0",
|
|
76
77
|
"typescript": "7.0.2",
|
|
77
78
|
"vite-plus": "0.1.24",
|