dimcode-web 0.1.0-alpha.25 → 0.1.0-alpha.26
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/package.json +1 -1
- package/release-manifest.json +99 -99
- package/web/assets/AccountSettings-3lFmZe5-.css +1 -0
- package/web/assets/AccountSettings-CJTGbM5m.js +1 -0
- package/web/assets/AgentSettings-DHO77kc7.js +1 -0
- package/web/assets/AppearanceSettings-B0o56AtJ.js +1 -0
- package/web/assets/AppearanceSettings-CyY1sZja.css +1 -0
- package/web/assets/ArchivedSettings-BAC2cQRx.js +1 -0
- package/web/assets/ArchivedSettings-BTot_Ixm.css +1 -0
- package/web/assets/{Checkbox-C6CIhQST.js → Checkbox-D2yvQEl3.js} +1 -1
- package/web/assets/{CodeBlockNode-C04Jwn7P.js → CodeBlockNode-uUN_2aAR.js} +2 -2
- package/web/assets/{DiagnosticsSettings-BCdpymYf.js → DiagnosticsSettings-BLFAHRqH.js} +1 -1
- package/web/assets/{GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-C7tiHNrw.js → GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-CmU799yw.js} +1 -1
- package/web/assets/{McpSettings-CbN6s19F.js → McpSettings-BJIUKmhR.js} +1 -1
- package/web/assets/ModalitySettings-B_q2xti5.js +1 -0
- package/web/assets/{PermissionsSettings--z3SlcI0.js → PermissionsSettings-BM6iEWBc.js} +1 -1
- package/web/assets/{PluginSettings-DgyrdWEk.js → PluginSettings-DXSKTzaR.js} +1 -1
- package/web/assets/{PreCodeBlock-Bk61_c9x.js → PreCodeBlock-DuRf6msZ.js} +1 -1
- package/web/assets/{Progress-CCdB9CHm.js → Progress-CO0tbB1X.js} +2 -2
- package/web/assets/ProviderAuthFlow.vue_vue_type_script_setup_true_lang-BFTOLZG-.js +1 -0
- package/web/assets/ProviderSettings-7k-y2ELO.js +1 -0
- package/web/assets/{ProviderSettings-DEwfvHXO.css → ProviderSettings-D8icgM6o.css} +1 -1
- package/web/assets/ScheduledSettings-BjwNQPJT.css +1 -0
- package/web/assets/ScheduledSettings-XGzp9IlV.js +1 -0
- package/web/assets/{SettingsPage-C8TfPmN2.js → SettingsPage-vlpo7w94.js} +1 -1
- package/web/assets/{SkillSettings-Dnsyz2dL.js → SkillSettings-AZ0CDXj-.js} +2 -2
- package/web/assets/{Toast-zTUYn6y_.js → Toast-mDP2-Ruz.js} +2 -2
- package/web/assets/{Tooltip-D3NbSdBq.js → Tooltip-C49ZYFK5.js} +2 -2
- package/web/assets/{abnfDiagram-N423BO3Z-B42DcWOu.js → abnfDiagram-N423BO3Z-ClgrdFPN.js} +1 -1
- package/web/assets/{arc-D5ZPG1FG.js → arc-B90aj7hw.js} +1 -1
- package/web/assets/{architectureDiagram-T3A2C74G-CrEr5lwf.js → architectureDiagram-T3A2C74G-CGTdtjqk.js} +1 -1
- package/web/assets/{blockDiagram-VBNYF7ZC-Bxq9GKWP.js → blockDiagram-VBNYF7ZC-DT1MIDDt.js} +1 -1
- package/web/assets/{c4Diagram-5PPSVZJV-CCnLgv9J.js → c4Diagram-5PPSVZJV-C_bKQsdy.js} +1 -1
- package/web/assets/channel-B09SsX8f.js +1 -0
- package/web/assets/{chunk-2GRJ4B5K-5fi5kMJS.js → chunk-2GRJ4B5K-DU-C1Hwy.js} +1 -1
- package/web/assets/{chunk-2Q5K7J3B-B_224xqv.js → chunk-2Q5K7J3B-CgbjGXFF.js} +1 -1
- package/web/assets/{chunk-5RXB4S5H-CKIh18aF.js → chunk-5RXB4S5H-Bmfpf6-X.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-DbAHRJlp.js → chunk-5VM5RSS4-DWfdGmvh.js} +1 -1
- package/web/assets/{chunk-6Q2QTUOP-1-G2eFwC.js → chunk-6Q2QTUOP-DA4a7KDX.js} +1 -1
- package/web/assets/{chunk-GF5L2VYU-Rt1koOlK.js → chunk-GF5L2VYU-jjapIgt8.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-FPL-bwzw.js → chunk-JWPE2WC7-C1kUiRK3.js} +1 -1
- package/web/assets/{chunk-KBJHAD2P-Z9DfvOen.js → chunk-KBJHAD2P-D6s2CmEr.js} +1 -1
- package/web/assets/{chunk-RYQCIY6F-CkRXaAOS.js → chunk-RYQCIY6F-CJ0eJKjS.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-DUmtTGtm.js → chunk-XXDRQBXY-DNDOvB3S.js} +1 -1
- package/web/assets/classDiagram-JCYQIIEL-CGBOrNrq.js +1 -0
- package/web/assets/classDiagram-v2-OCEON4UE-CGBOrNrq.js +1 -0
- package/web/assets/{context-BOjXeS7X.js → context-CJsPoGtt.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-4vvGv_TQ.js → cose-bilkent-JH36ORCC-CoBXcmYy.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-DBliBUR6.js → cynefin-OW5HDTMX-CmJIeOtc.js} +1 -1
- package/web/assets/{cynefinDiagram-MW4NZA55-BQkvLsFF.js → cynefinDiagram-MW4NZA55-qmZ1krvi.js} +1 -1
- package/web/assets/{dagre-VZM6K2ZE-BA1fepJY.js → dagre-VZM6K2ZE-B8jJDCmP.js} +1 -1
- package/web/assets/{diagram-7IWD3JNH-D0kZCV5n.js → diagram-7IWD3JNH-BBsG7bXl.js} +1 -1
- package/web/assets/{diagram-B4RE2ZJO-v9ZK2UsJ.js → diagram-B4RE2ZJO-BAQ_6j7h.js} +1 -1
- package/web/assets/{diagram-LBJQPF4R-CcGN8NVZ.js → diagram-LBJQPF4R-YUhU0cqB.js} +1 -1
- package/web/assets/{diagram-Q27KOJAE-DXAgZbBs.js → diagram-Q27KOJAE-CEQLmDqR.js} +1 -1
- package/web/assets/{diagram-UB23O5K3-DMMTKPHq.js → diagram-UB23O5K3-DmD96IkT.js} +1 -1
- package/web/assets/{ebnfDiagram-BXEA7PRR-BY-1J5pr.js → ebnfDiagram-BXEA7PRR-BTRmU0Tb.js} +1 -1
- package/web/assets/{erDiagram-JOGREHBK-qat9OFmQ.js → erDiagram-JOGREHBK-DYf1HUkg.js} +1 -1
- package/web/assets/{flowDiagram-UKHOOZJN-CU1QK9aV.js → flowDiagram-UKHOOZJN-BV5G0CSv.js} +1 -1
- package/web/assets/{ganttDiagram-PKOTCBZU-CYqu-EEY.js → ganttDiagram-PKOTCBZU-Bd9LEJun.js} +1 -1
- package/web/assets/{gitGraphDiagram-DS77QQ5N-cTmrCAeD.js → gitGraphDiagram-DS77QQ5N-BRV5RNHl.js} +1 -1
- package/web/assets/{index-BMERX23x.js → index-BOAKHK5O.js} +1 -1
- package/web/assets/index-Cw2UB-vh.js +57 -0
- package/web/assets/{index-Dr-SXzAR.css → index-DpFp3mPk.css} +1 -1
- package/web/assets/{index-BMiuW3oQ.js → index-rXNtPOVl.js} +5 -5
- package/web/assets/{index10-DG_ehWpk.js → index10-CqZDVfMD.js} +1 -1
- package/web/assets/{index5-BNaZzr2w.js → index5-Cq4YuC3k.js} +1 -1
- package/web/assets/{index6-kxqJQPoB.js → index6-kSlqQt5Z.js} +1 -1
- package/web/assets/{index8-BEw3e4wA.js → index8-BZAnytKY.js} +1 -1
- package/web/assets/{index9-lLu0yfFz.js → index9-BFvbNEx5.js} +1 -1
- package/web/assets/{infoDiagram-6WML65LV-CJ-0hiJd.js → infoDiagram-6WML65LV-Ctfz5Tkk.js} +1 -1
- package/web/assets/{ishikawaDiagram-WSZJBQD7-o12OVh1o.js → ishikawaDiagram-WSZJBQD7-DHOy9D0x.js} +1 -1
- package/web/assets/{journeyDiagram-NVQOT4AX-CA_wki0L.js → journeyDiagram-NVQOT4AX-saNvDQUd.js} +1 -1
- package/web/assets/{kanban-definition-27J2QSJJ-tQQAzpDC.js → kanban-definition-27J2QSJJ-DGhYlkkj.js} +1 -1
- package/web/assets/{linear-Bq7fd9jv.js → linear-DzKY3WU3.js} +1 -1
- package/web/assets/{markstream-CQCoRYwD.js → markstream-DBVM6i8W.js} +2 -2
- package/web/assets/{mermaid.core-Be2inSVF.js → mermaid.core-DcWZ2CKJ.js} +4 -4
- package/web/assets/{mindmap-definition-FAOFIHXS-rjlucX9t.js → mindmap-definition-FAOFIHXS-Byaqywd2.js} +1 -1
- package/web/assets/{pegDiagram-VL7TDLO6-jna1jfsH.js → pegDiagram-VL7TDLO6-QAp4mxKv.js} +1 -1
- package/web/assets/{pieDiagram-7S7Q4E2Y-D6o_eOIV.js → pieDiagram-7S7Q4E2Y-Dnebha3x.js} +1 -1
- package/web/assets/{quadrantDiagram-CIZ2JOQS-D7HCkj_c.js → quadrantDiagram-CIZ2JOQS-BL6jhJ-N.js} +1 -1
- package/web/assets/{railroadDiagram-AXF67PYL-BC4ql7QG.js → railroadDiagram-AXF67PYL-BYx-Obb4.js} +1 -1
- package/web/assets/{requirementDiagram-LRYGKXZP-RHIQUrWJ.js → requirementDiagram-LRYGKXZP-DyX-2ufw.js} +1 -1
- package/web/assets/{sankeyDiagram-W5VNT64P-CbUAU3ni.js → sankeyDiagram-W5VNT64P-Co5Hp9Hn.js} +1 -1
- package/web/assets/{sequenceDiagram-SI44F4Z6-PCrmuR6-.js → sequenceDiagram-SI44F4Z6-D1mLhuQ1.js} +1 -1
- package/web/assets/{settings-general-DduUd0E5.js → settings-general-2jDdasvB.js} +1 -1
- package/web/assets/{sizeCapture-X5ZJPWSS-B3i9JZNO.js → sizeCapture-X5ZJPWSS-C7ZZXPli.js} +1 -1
- package/web/assets/{stateDiagram-OKZ733FA-DmGU-QFm.js → stateDiagram-OKZ733FA-QIVx7qyu.js} +1 -1
- package/web/assets/stateDiagram-v2-UEYNNEHI-nuV_Ism4.js +1 -0
- package/web/assets/{swimlanes-SLNWSIFB-1IL6GO4Q.js → swimlanes-SLNWSIFB-DOBV1kOk.js} +2 -2
- package/web/assets/swimlanesDiagram-ULZ7WXOC-Bt9Gz59V.js +8 -0
- package/web/assets/{timeline-definition-Z64GVDOM-BYk-NCVn.js → timeline-definition-Z64GVDOM-Cqf-Agow.js} +1 -1
- package/web/assets/{vendor-vue-3IcwLTL7.js → vendor-vue-DKQ_ib1S.js} +1 -1
- package/web/assets/{vennDiagram-T6HMQDX7-CnH-c0ra.js → vennDiagram-T6HMQDX7-VxWUVtr0.js} +1 -1
- package/web/assets/{wardleyDiagram-T6FBY63Y-BnVP-fik.js → wardleyDiagram-T6FBY63Y-D42DcTEG.js} +1 -1
- package/web/assets/{xychartDiagram-ELKLHX3M-CoVCX9Qj.js → xychartDiagram-ELKLHX3M-CIWaPaG4.js} +1 -1
- package/web/assets/zh-CN-CSmGom3y.js +1 -0
- package/web/dimcode-web.json +2 -2
- package/web/index.html +3 -3
- package/web/assets/AccountSettings-DC6HJWQb.js +0 -1
- package/web/assets/AccountSettings-QIJGznMg.css +0 -1
- package/web/assets/AgentSettings-BDnse_S3.js +0 -1
- package/web/assets/AppearanceSettings-CRRxA-hr.js +0 -1
- package/web/assets/AppearanceSettings-DkoPsuO6.css +0 -1
- package/web/assets/ArchivedSettings-Cb3XfI5H.js +0 -1
- package/web/assets/ArchivedSettings-DgleqP6h.css +0 -1
- package/web/assets/ModalitySettings-D3W4M_vg.js +0 -1
- package/web/assets/ProviderAuthFlow.vue_vue_type_script_setup_true_lang-Dw6HwySz.js +0 -1
- package/web/assets/ProviderSettings-Djk2l3to.js +0 -1
- package/web/assets/ScheduledSettings-CgTWHYY1.css +0 -1
- package/web/assets/ScheduledSettings-Dmmzst7y.js +0 -1
- package/web/assets/channel-Bn7xNdOj.js +0 -1
- package/web/assets/classDiagram-JCYQIIEL-DVvTAUh5.js +0 -1
- package/web/assets/classDiagram-v2-OCEON4UE-DVvTAUh5.js +0 -1
- package/web/assets/index-CkyYecAj.js +0 -53
- package/web/assets/stateDiagram-v2-UEYNNEHI-IK-kUS_8.js +0 -1
- package/web/assets/swimlanesDiagram-ULZ7WXOC-CZf-sx2-.js +0 -8
- package/web/assets/zh-CN-CeegihBW.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a5 as Lt,Z as st,aa as Et,aG as qa,aB as oa,W as ht,X as Fe,a7 as bt,ag as Ia,aH as qt,ac as Ea,am as Va,aI as ra,aJ as ua,a9 as rt,V as Pe,aK as za,ah as da,aL as Fa,aM as Ta,aN as Aa,az as $t,aO as La,aP as $a,aQ as Ba,aR as Oa,aS as Da,aT as Ra,aU as Pa,aV as Ka,aW as ca,aX as Ma,aY as Ua,aZ as Na,a_ as Ha,a$ as Wa,aE as nt,$ as Ga,a0 as ja,a1 as Za,a2 as Ja,b0 as Ya,ai as Qa,b1 as Xa,b2 as Qt,e as gt,aA as Xt,b3 as el,a as Bt,b4 as tl,i as Ot,a4 as al,b5 as ll,b6 as ea,b7 as kt,b8 as nl,a3 as il,b9 as sl,ba as ol,bb as rl,P as Ye,bc as ul,h as pa,v as va,_ as fa,w as ma,u as dl,g as cl,c as pl,bd as vl,d as fl,R as ta,o as ml}from"./index-Cw2UB-vh.js";import{V as gl,_ as ga}from"./Checkbox-D2yvQEl3.js";import{d as re,a6 as Dt,r as A,h as We,o as u,a as w,w as d,y as X,u as e,b as T,q as De,e as m,a2 as Ze,B as it,aa as hl,x as Ue,M as Vt,z as q,O as de,ab as ha,Q as ba,c as R,F as fe,E as Ge,H as ya,n as bl,ac as yl,ad as _a,s as _l,P as xl,Y as Je,l as Cl,v as wl,f as Z,Z as ot,t as b,a8 as kl,a5 as St,X as aa,a3 as Sl,a4 as lt,m as ce,k as D,a9 as la,ae as ql,N as Il,I as El,J as Vl}from"./vendor-vue-DKQ_ib1S.js";import{u as xa}from"./settings-general-2jDdasvB.js";import{b as zl,r as Fl,m as zt}from"./context-CJsPoGtt.js";function It(l,t,i){const r=l.findIndex(_=>Lt(_,t)),n=l.findIndex(_=>Lt(_,i));if(r===-1||n===-1)return[];const[o,a]=[r,n].sort((_,x)=>_-x);return l.slice(o,a+1)}function Tl(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}function na(l){return l==null?void 0:l.querySelector("[data-state=checked]")}function Al(l,t,i){return l===void 0?!1:Array.isArray(l)?l.some(r=>je(r,t,i)):je(l,t,i)}function je(l,t,i){return l===void 0||t===void 0?!1:typeof l=="string"?l===t:typeof i=="function"?i(l,t):typeof i=="string"?(l==null?void 0:l[i])===(t==null?void 0:t[i]):Lt(l,t)}const[yt,Ll]=st("ListboxRoot"),[$l,Ca]=st("ListboxHighlightScroll");var Bl=re({__name:"ListboxRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:"vertical"},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:"toggle"},highlightOnHover:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(l,{expose:t,emit:i}){const r=l,n=i,{multiple:o,highlightOnHover:a,loop:_,orientation:x,disabled:I,selectionBehavior:z,dir:N}=Dt(r),{getItems:y,getItem:k}=Et({isProvider:!0}),{handleTypeaheadSearch:K}=qa(),{primitiveElement:E,currentElement:G}=bt(),j=Tl(),L=oa(N),g=$l(null);Ca({suppressHighlightScroll:A(!1),onHighlightScrollRequest:()=>{}});const F=Ia(G),$=A(),H=A(!1),pe=A(!0),J=ht(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0});function ae(C){if(H.value=!0,r.multiple){const V=Array.isArray(J.value)?[...J.value]:[],P=V.findIndex(te=>je(te,C,r.by));r.selectionBehavior==="toggle"?(P===-1?V.push(C):V.splice(P,1),J.value=V):(J.value=[C],$.value=C)}else r.selectionBehavior==="toggle"&&je(J.value,C,r.by)?J.value=void 0:J.value=C;setTimeout(()=>{H.value=!1},1)}const ee=A(null),W=A(null),U=A(!1),S=A(!1),Y=qt(),ve=qt(),le=qt();function me(){return y().map(C=>C.ref).filter(C=>C.dataset.disabled!=="")}function ue(C,V=!0,P){if(!C)return;ee.value=C;const te=(g==null?void 0:g.suppressHighlightScroll.value)??!1;(P??pe.value)&&(te?ee.value.focus({preventScroll:!0}):ee.value.focus()),te?g==null||g.onHighlightScrollRequest(V?()=>{const he=ee.value;he!=null&&he.isConnected&&he.scrollIntoView({block:"nearest"})}:void 0):V&&ee.value.scrollIntoView({block:"nearest"});const ge=k(C);n("highlight",ge)}function Te(C){if(U.value)le.trigger(C);else{const V=y().find(P=>je(P.value,C,r.by));V&&(ee.value=V.ref,ue(V.ref))}}function Ie(C){if(ee.value&&ee.value.isConnected){if(C.ctrlKey||C.metaKey||C.altKey)return;C.preventDefault(),C.stopPropagation(),S.value||ee.value.click()}}function M(C){if(pe.value){if(H.value=!0,U.value)ve.trigger(C);else{const V=C.altKey||C.ctrlKey||C.metaKey;if(V&&C.key==="a"&&o.value){const P=y(),te=P.map(he=>he.value);J.value=[...te],C.preventDefault();const ge=P.at(-1);ge&&ue(ge.ref)}else if(!V){const P=K(C.key,y());P&&ue(P)}}setTimeout(()=>{H.value=!1},1)}}function h(){S.value=!0}function ne(){De(()=>{S.value=!1})}function ie(){De(()=>{const C=new KeyboardEvent("keydown",{key:"PageUp"});Ae(C)})}function Se(C){const V=ee.value;V!=null&&V.isConnected&&(W.value=V),ee.value=null,n("leave",C)}function Ee(C){var P,te;const V=new CustomEvent("listbox.entryFocus",{bubbles:!1,cancelable:!0});if((P=C.currentTarget)==null||P.dispatchEvent(V),n("entryFocus",V),!V.defaultPrevented)if(W.value)ue(W.value);else{const ge=(te=me())==null?void 0:te[0];ue(ge)}}function B(C){const V=y(!0).map(he=>he.ref),P=C==="next"?V.at(-1):V[0];if(!P)return!1;const te=Number(P.getAttribute("aria-posinset")),ge=Number(P.getAttribute("aria-setsize"));return C==="next"?te===ge:te===1}function Ae(C){const V=Ea(C,x.value,L.value);if(!V)return;let P=me();if(ee.value){if(V==="last")P.reverse();else if(V==="prev"||V==="next"){V==="prev"&&P.reverse();const te=P.indexOf(ee.value),ge=_.value&&te===P.length-1;if(ge&&U.value){if(B(V)){const he=V==="next"?j.HOME:j.END;return ve.trigger(new KeyboardEvent("keydown",{key:he,shiftKey:C.shiftKey}))}P=[]}else P=ge?P.slice(0,1):P.slice(te+1)}Ne(C,P[0])}if(P.length){const te=!ee.value&&V==="prev"?P.length-1:0;ue(P[te])}if(U.value)return ve.trigger(C)}function Ne(C,V){var te,ge,he;if(!(U.value||r.selectionBehavior!=="replace"||!o.value||!Array.isArray(J.value)||(C.altKey||C.ctrlKey||C.metaKey)&&!C.shiftKey)&&C.shiftKey){const Me=y().filter(Ce=>Ce.ref.dataset.disabled!=="");let $e=(te=Me.find(Ce=>Ce.ref===V))==null?void 0:te.value;if(C.key===j.END?$e=(ge=Me.at(-1))==null?void 0:ge.value:C.key===j.HOME&&($e=(he=Me[0])==null?void 0:he.value),!$e||!$.value)return;const et=It(Me.map(Ce=>Ce.value),$.value,$e);J.value=et}}async function Qe(C,V=!0){if(Va)if(await De(),U.value)Y.trigger({event:C,scroll:V});else{const P=me(),te=P.find(he=>he.dataset.state==="checked"),ge=V?void 0:!1;te?ue(te,V,ge):P.length&&ue(P[0],V,ge)}}let Xe=!1;return We(J,()=>{if(!H.value){const C=Xe;Xe=!0,De(()=>{Qe(void 0,C)})}},{immediate:!0,deep:!0}),t({highlightedElement:ee,highlightItem:Te,highlightFirstItem:ie,highlightSelected:Qe,getItems:y}),Ll({modelValue:J,onValueChange:ae,multiple:o,orientation:x,dir:L,disabled:I,highlightOnHover:a,loop:_,highlightedElement:ee,isVirtual:U,virtualFocusHook:Y,virtualKeydownHook:ve,virtualHighlightHook:le,by:r.by,firstValue:$,selectionBehavior:z,focusable:pe,onLeave:Se,onEnter:Ee,changeHighlight:ue,onKeydownEnter:Ie,onKeydownNavigation:Ae,onKeydownTypeAhead:M,onCompositionStart:h,onCompositionEnd:ne,highlightFirstItem:ie}),(C,V)=>(u(),w(e(Fe),{ref_key:"primitiveElement",ref:E,as:l.as,"as-child":l.asChild,dir:e(L),"data-disabled":e(I)?"":void 0,onPointerleave:Se,onFocusout:V[0]||(V[0]=async P=>{const te=P.relatedTarget||P.target;await De(),ee.value&&e(G)&&!e(G).contains(te)&&Se(P)})},{default:d(()=>[X(C.$slots,"default",{modelValue:e(J)}),e(F)&&l.name?(u(),w(e(gl),{key:0,name:l.name,value:e(J),disabled:e(I),required:l.required},null,8,["name","value","disabled","required"])):T("v-if",!0)]),_:3},8,["as","as-child","dir","data-disabled"]))}}),Ol=Bl,Dl=re({__name:"ListboxContent",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(l){const{CollectionSlot:t}=Et(),i=yt(),r=ra(!1,10);return(n,o)=>(u(),w(e(t),null,{default:d(()=>[m(e(Fe),{role:"listbox",as:l.as,"as-child":l.asChild,tabindex:e(i).focusable.value?e(i).highlightedElement.value?"-1":"0":"-1","aria-orientation":e(i).orientation.value,"aria-multiselectable":!!e(i).multiple.value,"data-orientation":e(i).orientation.value,onMousedown:o[0]||(o[0]=it(a=>r.value=!0,["left"])),onFocus:o[1]||(o[1]=a=>{e(r)||e(i).onEnter(a)}),onKeydown:[o[2]||(o[2]=Ze(a=>{e(i).orientation.value==="vertical"&&(a.key==="ArrowLeft"||a.key==="ArrowRight")||e(i).orientation.value==="horizontal"&&(a.key==="ArrowUp"||a.key==="ArrowDown")||(a.preventDefault(),e(i).focusable.value&&e(i).onKeydownNavigation(a))},["down","up","left","right","home","end"])),Ze(e(i).onKeydownEnter,["enter"]),e(i).onKeydownTypeAhead]},{default:d(()=>[X(n.$slots,"default")]),_:3},8,["as","as-child","tabindex","aria-orientation","aria-multiselectable","data-orientation","onKeydown"])]),_:3}))}}),Rl=Dl,Pl=re({__name:"ListboxFilter",props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(l,{emit:t}){const i=l,n=ht(i,"modelValue",t,{defaultValue:"",passive:i.modelValue===void 0}),o=yt(),{primitiveElement:a,currentElement:_}=bt(),x=q(()=>i.disabled||o.disabled.value||!1),I=A();hl(()=>{var g;return I.value=(g=o.highlightedElement.value)==null?void 0:g.id}),Ue(()=>{o.focusable.value=!1,setTimeout(()=>{var g;i.autoFocus&&((g=_.value)==null||g.focus())},1)}),Vt(()=>{o.focusable.value=!0});const{isComposing:z,shouldDeferInput:N,handleCompositionStart:y,handleCompositionUpdate:k,handleCompositionEnd:K}=ua(g=>{n.value=g.target.value,o.onCompositionEnd(),o.highlightFirstItem()});function E(){o.onCompositionStart(),y()}function G(g){N.value||(n.value=g.target.value,o.highlightFirstItem())}function j(g){z.value||(g.preventDefault(),o.onKeydownNavigation(g))}function L(g){z.value||o.onKeydownEnter(g)}return(g,F)=>(u(),w(e(Fe),{ref_key:"primitiveElement",ref:a,as:l.as,"as-child":l.asChild,value:e(n),disabled:x.value?"":void 0,"data-disabled":x.value?"":void 0,"aria-disabled":x.value??void 0,"aria-activedescendant":I.value,type:"text",onKeydown:[Ze(j,["down","up","home","end"]),Ze(L,["enter"])],onInput:G,onCompositionstart:E,onCompositionupdate:e(k),onCompositionend:e(K)},{default:d(()=>[X(g.$slots,"default",{modelValue:e(n)})]),_:3},8,["as","as-child","value","disabled","data-disabled","aria-disabled","aria-activedescendant","onCompositionupdate","onCompositionend"]))}}),Kl=Pl;const[ls,Ml]=st("ListboxGroup");var Ul=re({__name:"ListboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(l){const t=l,i=rt(void 0,"reka-listbox-group");return Ml({id:i}),(r,n)=>(u(),w(e(Fe),de({role:"group"},t,{"aria-labelledby":e(i)}),{default:d(()=>[X(r.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),Nl=Ul;const Hl="listbox.select",[Wl,Gl]=st("ListboxItem");var jl=re({__name:"ListboxItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["select"],setup(l,{emit:t}){const i=l,r=t,n=rt(void 0,"reka-listbox-item"),{CollectionItem:o}=Et(),{forwardRef:a,currentElement:_}=Pe(),x=yt(),I=q(()=>_.value!=null&&_.value===x.highlightedElement.value),z=q(()=>Al(x.modelValue.value,i.value,x.by)),N=q(()=>x.disabled.value||i.disabled);async function y(K){r("select",K),!(K!=null&&K.defaultPrevented)&&!N.value&&K&&(x.onValueChange(i.value),x.changeHighlight(_.value))}function k(K){const E={originalEvent:K,value:i.value};za(Hl,y,E)}return Gl({isSelected:z}),(K,E)=>(u(),w(e(o),{value:l.value},{default:d(()=>[ha([I.value,z.value,N.value,e(x).focusable.value,...Object.entries(K.$attrs).flat()],()=>m(e(Fe),de({id:e(n)},K.$attrs,{ref:e(a),role:"option",tabindex:e(x).focusable.value?I.value?"0":"-1":-1,"aria-selected":z.value,as:l.as,"as-child":l.asChild,disabled:N.value?"":void 0,"data-disabled":N.value?"":void 0,"data-highlighted":I.value?"":void 0,"data-state":z.value?"checked":"unchecked",onClick:k,onKeydown:Ze(it(k,["prevent"]),["space"]),onPointermove:E[0]||(E[0]=()=>{e(x).highlightedElement.value!==e(_)&&e(x).highlightOnHover.value&&e(x).changeHighlight(e(_),!1,!1)})}),{default:d(()=>[X(K.$slots,"default",{selected:z.value})]),_:3},16,["id","tabindex","aria-selected","as","as-child","disabled","data-disabled","data-highlighted","data-state","onKeydown"]),E,1)]),_:3},8,["value"]))}}),Zl=jl,Jl=re({__name:"ListboxItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(l){const{forwardRef:t}=Pe(),i=Wl();return(r,n)=>(u(),w(e(da),{present:l.forceMount||e(i).isSelected.value},{default:d(()=>[m(e(Fe),{ref:e(t),"aria-hidden":"true","data-state":e(i).isSelected.value?"checked":"unchecked",as:l.as,"as-child":l.asChild},{default:d(()=>[X(r.$slots,"default")]),_:3},8,["data-state","as","as-child"])]),_:3},8,["present"]))}}),Yl=Jl,Ql=re({__name:"ListboxVirtualizer",props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(l){const t=l,i=ba(),r=yt(),n=Fa(),{getItems:o}=Et();r.isVirtual.value=!0;const a=q(()=>{const y=n.value;if(y){const k=window.getComputedStyle(y);return{start:Number.parseFloat(k.paddingBlockStart||k.paddingTop),end:Number.parseFloat(k.paddingBlockEnd||k.paddingBottom)}}else return{start:0,end:0}}),_=Ta({get scrollPaddingStart(){return a.value.start},get scrollPaddingEnd(){return a.value.end},get count(){return t.options.length},get horizontal(){return r.orientation.value==="horizontal"},estimateSize(y){return typeof t.estimateSize=="function"?t.estimateSize(y):t.estimateSize??28},getScrollElement(){return n.value},overscan:t.overscan??12}),x=q(()=>_.value.getVirtualItems().map(y=>{const k=i.default({option:t.options[y.index],virtualizer:_.value,virtualItem:y})[0],K=k.type===fe&&Array.isArray(k.children)?k.children.find(E=>typeof E.type!="symbol"):k;return{item:y,is:yl(K,{key:`${y.key}`,"data-index":y.index,"aria-setsize":t.options.length,"aria-posinset":y.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${y.start}px)`,overflowAnchor:"none"}})}}));r.virtualFocusHook.on(({event:y,scroll:k})=>{const K=t.options.findIndex(E=>Array.isArray(r.modelValue.value)?je(E,r.modelValue.value[0],r.by):je(E,r.modelValue.value,r.by));K!==-1?(y==null||y.preventDefault(),_.value.scrollToIndex(K,{align:"start"}),requestAnimationFrame(()=>{const E=na(n.value);if(E){const G=y?!0:k?void 0:!1;r.changeHighlight(E,k,G)}})):k?r.highlightFirstItem():requestAnimationFrame(()=>{var G;const E=(G=o().find(j=>j.ref.dataset.disabled!==""))==null?void 0:G.ref;E&&r.changeHighlight(E,!1,!1)})}),r.virtualHighlightHook.on(y=>{const k=t.options.findIndex(K=>je(K,y,r.by));_.value.scrollToIndex(k,{align:"start"}),requestAnimationFrame(()=>{const K=na(n.value);K&&r.changeHighlight(K)})});const I=ra("",1e3),z=q(()=>{const y=k=>t.textContent?t.textContent(k):k==null?void 0:k.toString().toLowerCase();return t.options.map((k,K)=>({index:K,textContent:y(k)}))});function N(y,k){var j,L,g;if(!((j=r.firstValue)!=null&&j.value)||!r.multiple.value||!Array.isArray(r.modelValue.value))return;const E=(L=o().filter(F=>F.ref.dataset.disabled!=="").find(F=>F.ref===r.highlightedElement.value))==null?void 0:L.value;if(!E)return;let G=null;switch(k){case"prev":case"next":{G=It(t.options,r.firstValue.value,E);break}case"first":{G=It(t.options,r.firstValue.value,(g=t.options)==null?void 0:g[0]);break}case"last":{G=It(t.options,r.firstValue.value,t.options.at(-1));break}}r.modelValue.value=G}return r.virtualKeydownHook.on(y=>{var G;const k=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!k)return;let E=Aa[y.key];if(k&&y.key==="a"&&r.multiple.value?(y.preventDefault(),r.modelValue.value=[...t.options],E="last"):y.shiftKey&&E&&N(y,E),["first","last"].includes(E)){y.preventDefault();const j=E==="first"?0:t.options.length-1;_.value.scrollToIndex(j),requestAnimationFrame(()=>{const L=o(),g=E==="first"?L[0]:L.at(-1);g&&r.changeHighlight(g.ref)})}else if(!E&&!k){I.value+=y.key;const j=Number((G=$t())==null?void 0:G.getAttribute("data-index")),L=z.value[j].textContent,g=z.value.map(H=>H.textContent??""),F=La(g,I.value,L),$=z.value.find(H=>H.textContent===F);$&&(_.value.scrollToIndex($.index,{align:"start"}),requestAnimationFrame(()=>{const H=n.value.querySelector(`[data-index="${$.index}"]`);H instanceof HTMLElement&&r.changeHighlight(H)}))}}),(y,k)=>(u(),R("div",{"data-reka-virtualizer":"",style:bl({position:"relative",width:"100%",height:`${e(_).getTotalSize()}px`})},[(u(!0),R(fe,null,Ge(x.value,({is:K,item:E})=>(u(),w(ya(K),{key:E.index}))),128))],4))}}),Xl=Ql;function en(l){const t=A("inline"),i=A(!1),r=A(),n=q(()=>t.value==="popper"&&!i.value);let o;Ca({suppressHighlightScroll:n,onHighlightScrollRequest(I){o=I}});function a(I,z){(r.value!==I||t.value!==z)&&(i.value=!1,o=void 0),r.value=I,t.value=z}function _(I){if(r.value!==I||t.value!=="popper"||i.value)return;i.value=!0;const z=o;o=void 0,l.value&&(z==null||z())}function x(I){r.value===I&&(r.value=void 0,t.value="inline",i.value=!1,o=void 0)}return{onContentPositionChange:a,onContentPlaced:_,onContentUnmount:x}}const[Ke,tn]=st("ComboboxRoot");var an=re({__name:"ComboboxRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},resetModelValueOnClear:{type:Boolean,required:!1,default:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},loop:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","update:open"],setup(l,{expose:t,emit:i}){var Te,Ie,M;const r=l,n=i,{primitiveElement:o,currentElement:a}=bt(),{multiple:_,disabled:x,ignoreFilter:I,resetSearchTermOnSelect:z,openOnFocus:N,openOnClick:y,dir:k,resetModelValueOnClear:K,highlightOnHover:E,loop:G,unmountOnHide:j}=Dt(r),L=oa(k),g=ht(r,"modelValue",n,{defaultValue:r.defaultValue??(_.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),F=ht(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});async function $(h){var ne,ie;F.value=h,le.value="",h?(await De(),(ne=o.value)==null||ne.highlightSelected(),pe.value=!0,(ie=ae.value)==null||ie.focus()):(pe.value=!1,setTimeout(()=>{!h&&r.resetSearchTermOnBlur&&H.trigger()},1))}const H=qt(),pe=A(!1),J=A(!1),ae=A(),ee=A(),W=q(()=>{var h;return((h=o.value)==null?void 0:h.highlightedElement)??void 0}),U=en(F),S=A(new Map),Y=A(new Map),{contains:ve}=Ba({sensitivity:"base"}),le=A(""),me=q(h=>{if(!le.value||r.ignoreFilter||J.value)return{count:S.value.size,items:(h==null?void 0:h.items)??new Map,groups:(h==null?void 0:h.groups)??new Set(Y.value.keys())};let ne=0;const ie=new Map,Se=new Set;for(const[Ee,B]of S.value){const Ae=ve(B,le.value);ie.set(Ee,Ae?1:0),Ae&&ne++}for(const[Ee,B]of Y.value)for(const Ae of B)if(ie.get(Ae)>0){Se.add(Ee);break}return{count:ne,items:ie,groups:Se}}),ue=_l();return Ue(()=>{var h,ne,ie;ue!=null&&ue.exposed&&(ue.exposed.highlightItem=(h=o.value)==null?void 0:h.highlightItem,ue.exposed.highlightFirstItem=(ne=o.value)==null?void 0:ne.highlightFirstItem,ue.exposed.highlightSelected=(ie=o.value)==null?void 0:ie.highlightSelected)}),t({filtered:me,highlightedElement:W,highlightItem:(Te=o.value)==null?void 0:Te.highlightItem,highlightFirstItem:(Ie=o.value)==null?void 0:Ie.highlightFirstItem,highlightSelected:(M=o.value)==null?void 0:M.highlightSelected}),tn({modelValue:g,multiple:_,disabled:x,open:F,onOpenChange:$,...U,contentId:"",isUserInputted:pe,isVirtual:J,inputElement:ae,highlightedElement:W,onInputElementChange:h=>ae.value=h,triggerElement:ee,onTriggerElementChange:h=>ee.value=h,parentElement:a,resetSearchTermOnSelect:z,onResetSearchTerm:H.on,allItems:S,allGroups:Y,filterSearch:le,filterState:me,ignoreFilter:I,openOnFocus:N,openOnClick:y,resetModelValueOnClear:K,unmountOnHide:j}),(h,ne)=>(u(),w(e($a),null,{default:d(()=>[m(e(Ol),de({ref_key:"primitiveElement",ref:o},h.$attrs,{modelValue:e(g),"onUpdate:modelValue":ne[0]||(ne[0]=ie=>_a(g)?g.value=ie:null),style:{pointerEvents:e(F)?"auto":void 0},as:l.as,"as-child":l.asChild,dir:e(L),multiple:e(_),name:l.name,required:l.required,disabled:e(x),"highlight-on-hover":e(E),loop:e(G),by:r.by,onHighlight:ne[1]||(ne[1]=ie=>n("highlight",ie))}),{default:d(()=>[X(h.$slots,"default",{open:e(F),modelValue:e(g)})]),_:3},16,["modelValue","style","as","as-child","dir","multiple","name","required","disabled","highlight-on-hover","loop","by"])]),_:3}))}}),ln=an,nn=re({__name:"ComboboxAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(l){const{forwardRef:t}=Pe();return(i,r)=>(u(),w(e(Oa),{"as-child":"",reference:l.reference},{default:d(()=>[m(e(Fe),de({ref:e(t),"as-child":l.asChild,as:l.as},i.$attrs),{default:d(()=>[X(i.$slots,"default")]),_:3},16,["as-child","as"])]),_:3},8,["reference"]))}}),sn=nn;const[on,rn]=st("ComboboxContent");var un=re({__name:"ComboboxContentImpl",props:{position:{type:String,required:!1,default:"inline"},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},present:{type:Boolean,required:!1,default:!0}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(l,{emit:t}){const i=l,r=t,{position:n}=Dt(i),o=Ke(),a=Symbol("ComboboxContent");We(n,L=>o.onContentPositionChange(a,L),{immediate:!0});const _=q(()=>o.ignoreFilter.value?o.allItems.value.size===0:o.filterState.value.count===0),{forwardRef:x,currentElement:I}=Pe(),z=Da(i.present&&i.bodyLock);We([()=>i.present,()=>i.bodyLock],([L,g])=>z.value=L&&g),Ra();const N=q(()=>i.present?o.parentElement.value:void 0);Pa(N);const y=q(()=>{if(i.position==="popper"){const{present:L,...g}=i;return g}else return{}}),k=Ka(y),K={boxSizing:"border-box","--reka-combobox-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-combobox-content-available-width":"var(--reka-popper-available-width)","--reka-combobox-content-available-height":"var(--reka-popper-available-height)","--reka-combobox-trigger-width":"var(--reka-popper-anchor-width)","--reka-combobox-trigger-height":"var(--reka-popper-anchor-height)"};rn({position:n});const E=A(!1);Ue(()=>{o.inputElement.value&&(E.value=I.value.contains(o.inputElement.value),i.present&&E.value&&o.inputElement.value.focus())}),We(()=>i.present,async(L,g)=>{var $;if(L||!g)return;const F=$t();!F||!I.value.contains(F)||(await De(),($=o.triggerElement.value)==null||$.focus())}),Vt(()=>{var g;o.onContentUnmount(a);const L=$t();E.value&&(!L||L===document.body)&&((g=o.triggerElement.value)==null||g.focus())});function G(L){var $,H;if(($=o.parentElement.value)!=null&&$.contains(L))return!0;const g=L instanceof Element?L.closest("label"):null,F=g==null?void 0:g.control;return!!F&&!!((H=o.parentElement.value)!=null&&H.contains(F))}const j={placed:()=>o.onContentPlaced(a)};return(L,g)=>(u(),w(e(Rl),{"as-child":""},{default:d(()=>[m(e(ca),{"as-child":"",present:i.present,onMountAutoFocus:g[5]||(g[5]=it(()=>{},["prevent"])),onUnmountAutoFocus:g[6]||(g[6]=it(()=>{},["prevent"]))},{default:d(()=>[m(e(Ma),{"as-child":"",present:i.present,"disable-outside-pointer-events":l.disableOutsidePointerEvents,onDismiss:g[0]||(g[0]=F=>e(o).onOpenChange(!1)),onFocusOutside:g[1]||(g[1]=F=>{G(F.target)&&F.preventDefault(),r("focusOutside",F)}),onInteractOutside:g[2]||(g[2]=F=>r("interactOutside",F)),onEscapeKeyDown:g[3]||(g[3]=F=>r("escapeKeyDown",F)),onPointerDownOutside:g[4]||(g[4]=F=>{G(F.target)&&F.preventDefault(),r("pointerDownOutside",F)})},{default:d(()=>[(u(),w(ya(e(n)==="popper"?e(Ua):e(Fe)),de({...L.$attrs,...e(k)},{id:e(o).contentId,ref:e(x),"memo-dependencies":e(n)==="popper"?[e(o).filterSearch.value,e(o).filterState.value]:void 0,"data-state":e(o).open.value?"open":"closed","data-empty":_.value?"":void 0,style:{display:i.hideWhenEmpty&&_.value?"none":"flex",flexDirection:"column",outline:"none",...e(n)==="popper"?K:{}}},xl(e(n)==="popper"?j:{})),{default:d(()=>[X(L.$slots,"default")]),_:3},16,["id","memo-dependencies","data-state","data-empty","style"]))]),_:3},8,["present","disable-outside-pointer-events"])]),_:3},8,["present"])]),_:3}))}}),dn=un,cn=re({__name:"ComboboxArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(l){const t=l,i=Ke(),r=on();return Pe(),(n,o)=>e(i).open.value&&e(r).position.value==="popper"?(u(),w(e(Na),Je(de({key:0},t)),{default:d(()=>[X(n.$slots,"default")]),_:3},16)):T("v-if",!0)}}),pn=cn,vn=re({__name:"ComboboxCancel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(l){const t=l;Pe();const i=Ke();function r(){var n;i.inputElement.value&&(i.inputElement.value.value="",i.inputElement.value.focus()),(n=i.resetModelValueOnClear)!=null&&n.value&&(i.modelValue.value=i.multiple.value?[]:null),i.filterSearch.value=""}return(n,o)=>(u(),w(e(Fe),de({type:l.as==="button"?"button":void 0},t,{tabindex:"-1",onClick:r}),{default:d(()=>[X(n.$slots,"default")]),_:3},16,["type"]))}}),fn=vn,mn=re({__name:"ComboboxContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(l,{emit:t}){const n=Ha(l,t),{forwardRef:o}=Pe(),a=Ke();return a.contentId||(a.contentId=rt(void 0,"reka-combobox-content")),(_,x)=>(u(),w(e(da),{present:l.forceMount||e(a).open.value,"force-mount":l.forceMount||!e(a).unmountOnHide.value},{default:d(({present:I})=>[Cl(m(dn,de({...e(n),..._.$attrs},{ref:e(o),present:e(a).unmountOnHide.value||I}),{default:d(()=>[X(_.$slots,"default")]),_:3},16,["present"]),[[wl,e(a).unmountOnHide.value||I]])]),_:3},8,["present","force-mount"]))}}),gn=mn,hn=re({__name:"ComboboxEmpty",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(l){const t=l,i=Ke(),r=q(()=>i.ignoreFilter.value?i.allItems.value.size===0:i.filterState.value.count===0);return(n,o)=>r.value?(u(),w(e(Fe),Je(de({key:0},t)),{default:d(()=>[X(n.$slots,"default",{},()=>[o[0]||(o[0]=Z("No options",-1))])]),_:3},16)):T("v-if",!0)}}),bn=hn;const[wa,yn]=st("ComboboxGroup");var _n=re({__name:"ComboboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(l){const t=l,i=rt(void 0,"reka-combobox-group"),r=Ke(),n=q(()=>r.ignoreFilter.value?!0:r.filterSearch.value?r.filterState.value.groups.has(i):!0),o=yn({id:i,labelId:""});return Ue(()=>{r.allGroups.value.has(i)||r.allGroups.value.set(i,new Set)}),Vt(()=>{r.allGroups.value.delete(i)}),(a,_)=>(u(),w(e(Nl),de({id:e(i),"aria-labelledby":e(o).labelId},t,{hidden:n.value?void 0:!0}),{default:d(()=>[X(a.$slots,"default")]),_:3},16,["id","aria-labelledby","hidden"]))}}),Ft=_n,xn=re({__name:"ComboboxInput",props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(l,{emit:t}){const i=l,r=t,n=Ke(),o=yt(),{primitiveElement:a,currentElement:_}=bt(),x=ht(i,"modelValue",r,{passive:i.modelValue===void 0});Ue(()=>{_.value&&n.onInputElementChange(_.value)});const{isComposing:I,shouldDeferInput:z,handleCompositionStart:N,handleCompositionUpdate:y,handleCompositionEnd:k}=ua($=>{const H=$.target;H&&E(H.value)});function K($){I.value||($.preventDefault(),n.open.value||n.onOpenChange(!0))}function E($){n.open.value?n.filterSearch.value=$:(n.onOpenChange(!0),De(()=>{$&&(n.filterSearch.value=$,o.highlightFirstItem())}))}function G($){z.value||E($.target.value)}function j(){n.openOnFocus.value&&!n.open.value&&n.onOpenChange(!0)}function L($){var ae,ee;if(!n.open.value)return;const H=$.relatedTarget;if(!H)return;const pe=(ae=n.parentElement.value)==null?void 0:ae.contains(H),J=(ee=document.getElementById(n.contentId))==null?void 0:ee.contains(H);!pe&&!J&&requestAnimationFrame(()=>{var S,Y;if(!n.open.value)return;const W=document.activeElement;!((S=n.parentElement.value)!=null&&S.contains(W))&&!((Y=document.getElementById(n.contentId))!=null&&Y.contains(W))&&n.onOpenChange(!1)})}function g(){n.openOnClick.value&&!n.open.value&&n.onOpenChange(!0)}function F(){const $=n.modelValue.value;i.displayValue?x.value=i.displayValue($):!n.multiple.value&&$&&!Array.isArray($)&&typeof $!="object"?x.value=$.toString():x.value="",De(()=>{x.value=x.value})}return n.onResetSearchTerm(()=>{F()}),We(n.modelValue,async()=>{!n.isUserInputted.value&&n.resetSearchTermOnSelect.value&&F()},{immediate:!0,deep:!0}),We(n.filterState,($,H)=>{!n.isVirtual.value&&H.count===0&&o.highlightFirstItem()}),($,H)=>(u(),w(e(Kl),{ref_key:"primitiveElement",ref:a,modelValue:e(x),"onUpdate:modelValue":H[0]||(H[0]=pe=>_a(x)?x.value=pe:null),as:l.as,"as-child":l.asChild,"auto-focus":l.autoFocus,disabled:l.disabled,"aria-expanded":e(n).open.value,"aria-controls":e(n).contentId,"aria-autocomplete":"list",role:"combobox",autocomplete:"off",onClick:g,onInput:G,onKeydown:Ze(K,["down","up"]),onFocus:j,onBlur:L,onCompositionstart:e(N),onCompositionupdate:e(y),onCompositionend:e(k)},{default:d(()=>[X($.$slots,"default")]),_:3},8,["modelValue","as","as-child","auto-focus","disabled","aria-expanded","aria-controls","onCompositionstart","onCompositionupdate","onCompositionend"]))}}),Cn=xn,wn=re({__name:"ComboboxItem",props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(l,{emit:t}){const i=l,r=t,n=rt(void 0,"reka-combobox-item"),o=Ke(),a=wa(null),{primitiveElement:_,currentElement:x}=bt();if(i.value==="")throw new Error("A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.");const I=q(()=>{if(o.isVirtual.value||o.ignoreFilter.value||!o.filterSearch.value)return!0;{const z=o.filterState.value.items.get(n);return z===void 0?!0:z>0}});return Ue(()=>{var N;o.allItems.value.set(n,i.textValue||x.value.textContent||x.value.innerText);const z=a==null?void 0:a.id;z&&(o.allGroups.value.has(z)?(N=o.allGroups.value.get(z))==null||N.add(n):o.allGroups.value.set(z,new Set([n])))}),Vt(()=>{o.allItems.value.delete(n)}),(z,N)=>I.value?ha([I.value,e(o).filterSearch.value,e(o).disabled.value,l.disabled,i.value,i.as,i.asChild,...Object.values(z.$attrs)],()=>(u(),w(e(Zl),de({key:0},i,{id:e(n),ref_key:"primitiveElement",ref:_,disabled:e(o).disabled.value||l.disabled,onSelect:N[0]||(N[0]=y=>{var k;r("select",y),!y.defaultPrevented&&(!e(o).multiple.value&&!l.disabled&&!e(o).disabled.value?(y.preventDefault(),e(o).onOpenChange(!1),e(o).modelValue.value=i.value):e(o).multiple.value&&((k=e(o).inputElement.value)==null||k.focus()))})}),{default:d(y=>[X(z.$slots,"default",Je(ot(y)),()=>[Z(b(l.value),1)])]),_:3},16,["id","disabled"])),N,1):T("v-if",!0)}}),ia=wn,kn=re({__name:"ComboboxItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(l){const t=l;return(i,r)=>(u(),w(e(Yl),Je(ot(t)),{default:d(()=>[X(i.$slots,"default")]),_:3},16))}}),Sn=kn,qn=re({__name:"ComboboxLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(l){const t=l;Pe();const i=wa({id:"",labelId:""});return i.labelId||(i.labelId=rt(void 0,"reka-combobox-group-label")),(r,n)=>(u(),w(e(Fe),de(t,{id:e(i).labelId}),{default:d(()=>[X(r.$slots,"default")]),_:3},16,["id"]))}}),In=qn,En=re({__name:"ComboboxPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(l){const t=l;return(i,r)=>(u(),w(e(Wa),Je(ot(t)),{default:d(()=>[X(i.$slots,"default")]),_:3},16))}}),Vn=En,zn=re({__name:"ComboboxSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(l){const t=l;return Pe(),(i,r)=>(u(),w(e(Fe),de(t,{"aria-hidden":"true"}),{default:d(()=>[X(i.$slots,"default")]),_:3},16))}}),Fn=zn,Tn=re({__name:"ComboboxTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(l){const t=l,{forwardRef:i,currentElement:r}=Pe(),n=Ke(),o=q(()=>t.disabled||n.disabled.value||!1);return Ue(()=>{r.value&&n.onTriggerElementChange(r.value)}),(a,_)=>(u(),w(e(Fe),de(t,{ref:e(i),type:l.as==="button"?"button":void 0,tabindex:"-1","aria-label":"Show popup","aria-haspopup":"listbox","aria-expanded":e(n).open.value,"aria-controls":e(n).contentId,"data-state":e(n).open.value?"open":"closed",disabled:o.value,"data-disabled":o.value?"":void 0,"aria-disabled":o.value??void 0,onClick:_[0]||(_[0]=x=>e(n).onOpenChange(!e(n).open.value))}),{default:d(()=>[X(a.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","disabled","data-disabled","aria-disabled"]))}}),An=Tn,Ln=re({__name:"ComboboxVirtualizer",props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:[Number,Function],required:!1},textContent:{type:Function,required:!1}},setup(l){const t=l,i=Ke();return i.isVirtual.value=!0,(r,n)=>(u(),w(Xl,Je(ot(t)),{default:d(o=>[X(r.$slots,"default",Je(ot(o)))]),_:3},16))}}),$n=Ln;function Bn(l,t){if(typeof l!="object"||l===null)return!1;const i=nt(l,t);return i!=null&&i!==""}function sa(l,t){const i=t?{xs:44,sm:48,md:52,lg:56,xl:60}:{xs:24,sm:28,md:32,lg:36,xl:40};return i[l]??i.md}function On(l,t,i,r){const n=sa(t,!0),o=sa(t,!1);return r?()=>n:i?a=>Bn(l[a],i)?n:o:()=>o}const Dn={slots:{base:["relative group rounded-md inline-flex items-center disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed",value:"truncate pointer-events-none",placeholder:"truncate text-dimmed",arrow:"fill-bg stroke-default",content:["max-h-[min(15rem,var(--reka-select-content-available-height,15rem))] w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden origin-(--reka-select-content-transform-origin) pointer-events-auto data-[state=closed]:pointer-events-none! flex flex-col","max-h-[min(15rem,var(--reka-combobox-content-available-height,15rem))] origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"],viewport:"relative scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",empty:"text-center text-muted",label:"font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:["group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"],itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemLeadingChip:"shrink-0",itemLeadingChipSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemWrapper:"flex-1 flex flex-col min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",input:"border-b border-default",focusScope:"flex flex-col min-h-0",trailingClear:"p-0"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},size:{xs:{base:"px-2 py-1 text-sm/4 gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1 text-[10px]/3 gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-2 text-xs"},sm:{base:"px-2.5 py-1.5 text-sm/4 gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1.5 text-[10px]/3 gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-2.5 text-xs"},md:{base:"px-2.5 py-1.5 text-base/5 gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-2.5 text-sm"},lg:{base:"px-3 py-2 text-base/5 gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-2 text-xs gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-3 text-sm"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6",label:"p-2 text-sm gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemLeadingChip:"size-6",itemLeadingChipSize:"lg",itemTrailingIcon:"size-6",empty:"p-3 text-base"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented hover:bg-elevated disabled:bg-default",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented hover:bg-accented/75 disabled:bg-elevated",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent focus:outline-none"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},fixed:{false:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},position:{popper:{content:"data-[state=open]:animate-[scale-in_100ms_var(--ease-out)] data-[state=closed]:animate-[scale-out_100ms_var(--ease-out)]"},"item-aligned":{content:""}},multiple:{true:""},virtualize:{true:{viewport:"p-1 isolate"},false:{viewport:"divide-y divide-default"}}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"outline-success/25 focus-visible:outline-3 focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"outline-info/25 focus-visible:outline-3 focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"outline-error/25 focus-visible:outline-3 focus-visible:ring-error"},{color:"primary",variant:["soft","ghost"],class:"outline-primary/25 focus-visible:outline-3"},{color:"secondary",variant:["soft","ghost"],class:"outline-secondary/25 focus-visible:outline-3"},{color:"success",variant:["soft","ghost"],class:"outline-success/25 focus-visible:outline-3"},{color:"info",variant:["soft","ghost"],class:"outline-info/25 focus-visible:outline-3"},{color:"warning",variant:["soft","ghost"],class:"outline-warning/25 focus-visible:outline-3"},{color:"error",variant:["soft","ghost"],class:"outline-error/25 focus-visible:outline-3"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted"},{color:"neutral",variant:["soft","ghost"],class:"outline-inverted/25 focus-visible:outline-3"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline",position:"popper"}},Rn=["aria-labelledby","aria-multiselectable"],ka=Object.assign({inheritAttrs:!1},{__name:"SelectMenu",props:la({id:{type:String,required:!1},placeholder:{type:String,required:!1},searchInput:{type:[Boolean,Object],required:!1,default:!0},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},clear:{type:[Boolean,Object],required:!1},clearIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},resetModelValueOnClear:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:la(["change","blur","focus","create","clear","highlight","update:modelValue","update:open"],["update:searchTerm"]),setup(l,{expose:t,emit:i}){const r=l,n=i,o=ba(),a=Ga("selectMenu",r),_=kl(l,"searchTerm",{type:String,default:""}),{t:x}=ja(),I=al(),{filterGroups:z}=rl(),N=Za(Ja(a,"modelValue","defaultValue","open","defaultOpen","required","multiple","resetSearchTermOnBlur","resetSearchTermOnSelect","resetModelValueOnClear","highlightOnHover","loop","by"),n),y=Ya(lt(()=>a.portal)),k=lt(()=>kt(a.content,{side:"bottom",sideOffset:8,collisionPadding:8,position:"popper"})),K=lt(()=>kt(a.arrow,{rounded:!0})),E=q(()=>typeof a.clear=="object"?a.clear:{}),G=lt(()=>a.virtualize?kt(typeof a.virtualize=="boolean"?{}:a.virtualize,{estimateSize:On(C.value,M.value??"md",a.descriptionKey,!!o["item-description"])}):!1),j=lt(()=>kt(a.searchInput,{placeholder:x("selectMenu.search"),variant:"none",fixed:a.fixed})),{emitFormBlur:L,emitFormFocus:g,emitFormInput:F,emitFormChange:$,size:H,color:pe,id:J,name:ae,highlight:ee,disabled:W,ariaAttrs:U}=Qa(r),{orientation:S,size:Y}=Xa(r),{isLeading:ve,isTrailing:le,leadingIconName:me,trailingIconName:ue}=ll(q(()=>({icon:a.icon,leading:a.leading,leadingIcon:a.leadingIcon,trailing:a.trailing,trailingIcon:a.trailingIcon??I.ui.icons.chevronDown,loading:a.loading,loadingIcon:a.loadingIcon}))),Te=q(()=>pe.value??a.color),Ie=q(()=>ee.value??a.highlight),M=q(()=>Y.value??H.value??a.size),h=q(()=>W.value??a.disabled),[ne,ie]=Qt(),[Se,Ee]=Qt({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),B=q(()=>{var p;return il({extend:Dn,...((p=I.ui)==null?void 0:p.selectMenu)||{}})({color:Te.value,variant:a.variant,size:M.value,loading:a.loading,highlight:Ie.value,fixed:a.fixed,leading:ve.value||!!a.avatar||!!o.leading,trailing:le.value||!!o.trailing,fieldGroup:S.value,virtualize:!!a.virtualize,multiple:a.multiple})});function Ae(p){if(a.multiple&&Array.isArray(p)){const O=p.map(f=>ea(Qe.value,f,{labelKey:a.labelKey,valueKey:a.valueKey,by:a.by})).filter(f=>f!=null&&f!=="");return O.length>0?O.join(", "):void 0}return ea(Qe.value,p,{labelKey:a.labelKey,valueKey:a.valueKey,by:a.by})}const Ne=q(()=>{var p;return(p=a.items)!=null&&p.length?ol(a.items)?a.items:[a.items]:[]}),Qe=q(()=>Ne.value.flatMap(p=>p)),Xe=q(()=>{if(a.ignoreFilter||!_.value)return Ne.value;const p=Array.isArray(a.filterFields)?a.filterFields:[a.labelKey];return z(Ne.value,_.value,{fields:p,isStructural:O=>se(O)&&!!O.type&&["label","separator"].includes(O.type)})}),C=q(()=>Xe.value.flatMap(p=>p)),V=q(()=>{if(!a.createItem||!_.value)return!1;const p=a.valueKey?{[a.valueKey]:_.value}:_.value;return typeof a.createItem=="object"&&a.createItem.when==="always"||a.createItem==="always"?!C.value.find(O=>sl(O,p,a.by??a.valueKey)):!C.value.length}),P=q(()=>typeof a.createItem=="object"?a.createItem.position:"bottom"),te=St("triggerRef");function ge(){var p,O;a.autofocus&&((O=(p=te.value)==null?void 0:p.$el)==null||O.focus({focusVisible:!0}))}let he;Ue(()=>{he=setTimeout(()=>{ge()},a.autofocusDelay)}),aa(()=>clearTimeout(he));function Me(p){var f,_e,we,xe,qe;if(ql(a.modelValue)===p)return;(f=a.modelModifiers)!=null&&f.trim&&(typeof p=="string"||p===null||p===void 0)&&(p=(p==null?void 0:p.trim())??null),(_e=a.modelModifiers)!=null&&_e.number&&(p=nl(p)),(we=a.modelModifiers)!=null&&we.nullable&&(p??(p=null)),(xe=a.modelModifiers)!=null&&xe.optional&&!((qe=a.modelModifiers)!=null&&qe.nullable)&&p!==null&&(p??(p=void 0));const O=new Event("change",{target:{value:p}});n("change",O),$(),F(),a.resetSearchTermOnSelect&&(_.value="")}const $e=A(!1);let et;aa(()=>clearTimeout(et));function Ce(p){if($e.value=p,p){const O=new FocusEvent("focus");n("focus",O),g(),clearTimeout(et)}else{const O=new FocusEvent("blur");n("blur",O),L(),a.resetSearchTermOnBlur&&(et=setTimeout(()=>{_.value=""},100))}}function ut(p){if($e.value)return;const O=p.currentTarget;p.preventDefault(),O.click()}function Be(p){p.preventDefault(),p.stopPropagation(),n("create",_.value)}function _t(p,O){var f;if(se(O)){if(O.disabled){p.preventDefault();return}(f=O.onSelect)==null||f.call(O,p)}}function se(p){return typeof p=="object"&&p!==null}function dt(p){return a.multiple&&Array.isArray(p)?p.length===0:p==null||p===""}function He(){h.value||n("clear")}function ct(p){j.value.autofocus===!1&&p.preventDefault()}const xt=St("focusScopeRef");function tt(p){var we,xe;const O=(we=xt.value)==null?void 0:we.$el;if(p.defaultPrevented||((xe=O==null?void 0:O.parentElement)==null?void 0:xe.dataset.state)!=="open")return;p.preventDefault(),((j.value.autofocus!==!1?O.querySelector('[data-slot="input"] input'):null)??O).focus({preventScroll:!0})}function Ct(p){const O=document.activeElement;O&&O!==document.body&&!p.target.contains(O)&&p.preventDefault()}const s=St("viewportRef"),c=Sl(),Q=q(()=>J.value??`select-menu-${c}`),ye=`select-menu-listbox-${c}`,Ve=St("comboboxRootRef");return We(()=>a.items,async()=>{var p,O;!$e.value||!a.createItem||(await De(),(O=(p=Ve.value)==null?void 0:p.highlightFirstItem)==null||O.call(p))},{flush:"post"}),t({triggerRef:lt(()=>{var p;return(p=te.value)==null?void 0:p.$el}),viewportRef:lt(()=>s.value)}),(p,O)=>(u(),R(fe,null,[m(e(ne),null,{default:d(()=>{var f;return[m(e(ia),{"data-slot":"item",class:ce(B.value.item({class:(f=e(a).ui)==null?void 0:f.item})),value:_.value,onSelect:Be},{default:d(()=>{var _e;return[D("span",{"data-slot":"itemLabel",class:ce(B.value.itemLabel({class:(_e=e(a).ui)==null?void 0:_e.itemLabel}))},[X(p.$slots,"create-item-label",{item:_.value},()=>[Z(b(e(x)("selectMenu.create",{label:_.value})),1)])],2)]}),_:3},8,["class","value"])]}),_:3}),m(e(Se),null,{default:d(({item:f,index:_e})=>{var we,xe,qe,be,v,ze;return[se(f)&&f.type==="label"?(u(),w(e(In),{key:0,"data-slot":"label",class:ce(B.value.label({class:[(we=e(a).ui)==null?void 0:we.label,(xe=f.ui)==null?void 0:xe.label,f.class]}))},{default:d(()=>[Z(b(e(nt)(f,e(a).labelKey)),1)]),_:2},1032,["class"])):se(f)&&f.type==="separator"?(u(),w(e(Fn),{key:1,"data-slot":"separator",class:ce(B.value.separator({class:[(qe=e(a).ui)==null?void 0:qe.separator,(be=f.ui)==null?void 0:be.separator,f.class]}))},null,8,["class"])):(u(),w(e(ia),{key:2,"data-slot":"item",class:ce(B.value.item({class:[(v=e(a).ui)==null?void 0:v.item,se(f)&&((ze=f.ui)==null?void 0:ze.item),se(f)&&f.class]})),disabled:se(f)&&f.disabled,value:e(a).valueKey&&se(f)?e(nt)(f,e(a).valueKey):f,onSelect:at=>_t(at,f)},{default:d(()=>[X(p.$slots,"item",{item:f,index:_e,ui:B.value},()=>{var at,ke,Oe,pt,wt,vt,Mt,Ut;return[X(p.$slots,"item-leading",{item:f,index:_e,ui:B.value},()=>{var ft,mt,Nt,Ht,Wt,Gt,jt,Zt,Jt,Yt;return[se(f)&&f.icon?(u(),w(gt,{key:0,name:f.icon,"data-slot":"itemLeadingIcon",class:ce(B.value.itemLeadingIcon({class:[(ft=e(a).ui)==null?void 0:ft.itemLeadingIcon,(mt=f.ui)==null?void 0:mt.itemLeadingIcon]}))},null,8,["name","class"])):se(f)&&f.avatar?(u(),w(Xt,de({key:1,size:((Nt=f.ui)==null?void 0:Nt.itemLeadingAvatarSize)||((Ht=e(a).ui)==null?void 0:Ht.itemLeadingAvatarSize)||B.value.itemLeadingAvatarSize()},f.avatar,{"data-slot":"itemLeadingAvatar",class:B.value.itemLeadingAvatar({class:[(Wt=e(a).ui)==null?void 0:Wt.itemLeadingAvatar,(Gt=f.ui)==null?void 0:Gt.itemLeadingAvatar]})}),null,16,["size","class"])):se(f)&&f.chip?(u(),w(el,de({key:2,size:((jt=f.ui)==null?void 0:jt.itemLeadingChipSize)||((Zt=e(a).ui)==null?void 0:Zt.itemLeadingChipSize)||B.value.itemLeadingChipSize(),inset:"",standalone:""},f.chip,{"data-slot":"itemLeadingChip",class:B.value.itemLeadingChip({class:[(Jt=e(a).ui)==null?void 0:Jt.itemLeadingChip,(Yt=f.ui)==null?void 0:Yt.itemLeadingChip]})}),null,16,["size","class"])):T("",!0)]}),D("span",{"data-slot":"itemWrapper",class:ce(B.value.itemWrapper({class:[(at=e(a).ui)==null?void 0:at.itemWrapper,se(f)&&((ke=f.ui)==null?void 0:ke.itemWrapper)]}))},[D("span",{"data-slot":"itemLabel",class:ce(B.value.itemLabel({class:[(Oe=e(a).ui)==null?void 0:Oe.itemLabel,se(f)&&((pt=f.ui)==null?void 0:pt.itemLabel)]}))},[X(p.$slots,"item-label",{item:f,index:_e},()=>[Z(b(se(f)?e(nt)(f,e(a).labelKey):f),1)])],2),se(f)&&(e(nt)(f,e(a).descriptionKey)||o["item-description"])?(u(),R("span",{key:0,"data-slot":"itemDescription",class:ce(B.value.itemDescription({class:[(wt=e(a).ui)==null?void 0:wt.itemDescription,se(f)&&((vt=f.ui)==null?void 0:vt.itemDescription)]}))},[X(p.$slots,"item-description",{item:f,index:_e},()=>[Z(b(e(nt)(f,e(a).descriptionKey)),1)])],2)):T("",!0)],2),D("span",{"data-slot":"itemTrailing",class:ce(B.value.itemTrailing({class:[(Mt=e(a).ui)==null?void 0:Mt.itemTrailing,se(f)&&((Ut=f.ui)==null?void 0:Ut.itemTrailing)]}))},[X(p.$slots,"item-trailing",{item:f,index:_e,ui:B.value}),m(e(Sn),{"as-child":""},{default:d(()=>{var ft,mt;return[m(gt,{name:e(a).selectedIcon||e(I).ui.icons.check,"data-slot":"itemTrailingIcon",class:ce(B.value.itemTrailingIcon({class:[(ft=e(a).ui)==null?void 0:ft.itemTrailingIcon,se(f)&&((mt=f.ui)==null?void 0:mt.itemTrailingIcon)]}))},null,8,["name","class"])]}),_:2},1024)],2)]})]),_:2},1032,["class","disabled","value","onSelect"]))]}),_:3}),m(e(ln),de({ref_key:"comboboxRootRef",ref:Ve},e(N),{"ignore-filter":"","as-child":"",name:e(ae),disabled:h.value,"onUpdate:modelValue":Me,"onUpdate:open":Ce}),{default:d(({modelValue:f,open:_e})=>[m(e(sn),{"as-child":""},{default:d(()=>{var we;return[m(e(An),de({id:Q.value,ref_key:"triggerRef",ref:te,"data-slot":"base",class:B.value.base({class:[(we=e(a).ui)==null?void 0:we.base,e(a).class]}),tabindex:"0"},{"aria-label":void 0,...p.$attrs,...e(U)},{"aria-controls":ye,onKeydown:[Ze(ut,["down"]),Ze(ut,["up"])]}),{default:d(()=>{var xe,qe;return[e(ve)||e(a).avatar||o.leading?(u(),R("span",{key:0,"data-slot":"leading",class:ce(B.value.leading({class:(xe=e(a).ui)==null?void 0:xe.leading}))},[X(p.$slots,"leading",{modelValue:f,open:_e,ui:B.value},()=>{var be,v,ze;return[e(ve)&&e(me)?(u(),w(gt,{key:0,name:e(me),"data-slot":"leadingIcon",class:ce(B.value.leadingIcon({class:(be=e(a).ui)==null?void 0:be.leadingIcon}))},null,8,["name","class"])):e(a).avatar?(u(),w(Xt,de({key:1,size:((v=e(a).ui)==null?void 0:v.itemLeadingAvatarSize)||B.value.itemLeadingAvatarSize()},e(a).avatar,{"data-slot":"itemLeadingAvatar",class:B.value.itemLeadingAvatar({class:(ze=e(a).ui)==null?void 0:ze.itemLeadingAvatar})}),null,16,["size","class"])):T("",!0)]})],2)):T("",!0),X(p.$slots,"default",{modelValue:f,open:_e,ui:B.value},()=>[(u(!0),R(fe,null,Ge([Ae(f)],be=>{var v,ze;return u(),R(fe,{key:be},[be!=null?(u(),R("span",{key:0,"data-slot":"value",class:ce(B.value.value({class:(v=e(a).ui)==null?void 0:v.value}))},b(be),3)):(u(),R("span",{key:1,"data-slot":"placeholder",class:ce(B.value.placeholder({class:(ze=e(a).ui)==null?void 0:ze.placeholder}))},b(e(a).placeholder??" "),3))],64)}),128))]),e(le)||o.trailing||e(a).clear?(u(),R("span",{key:1,"data-slot":"trailing",class:ce(B.value.trailing({class:(qe=e(a).ui)==null?void 0:qe.trailing}))},[X(p.$slots,"trailing",{modelValue:f,open:_e,ui:B.value},()=>{var be;return[e(a).clear&&!h.value&&!dt(f)?(u(),w(e(fn),{key:0,"as-child":""},{default:d(()=>{var v;return[m(Bt,de({as:"span",icon:e(a).clearIcon||e(I).ui.icons.close,size:M.value,variant:"link",color:"neutral",tabindex:"-1"},E.value,{"data-slot":"trailingClear",class:B.value.trailingClear({class:(v=e(a).ui)==null?void 0:v.trailingClear}),onClick:it(He,["stop"])}),null,16,["icon","size","class"])]}),_:1})):e(ue)?(u(),w(gt,{key:1,name:e(ue),"data-slot":"trailingIcon",class:ce(B.value.trailingIcon({class:(be=e(a).ui)==null?void 0:be.trailingIcon,leading:e(ve)}))},null,8,["name","class"])):T("",!0)]})],2)):T("",!0)]}),_:2},1040,["id","class"])]}),_:2},1024),m(e(Vn),Je(ot(e(y))),{default:d(()=>[m(e(tl),null,{default:d(()=>{var we;return[m(e(gn),de({"data-slot":"content",class:B.value.content({class:(we=e(a).ui)==null?void 0:we.content})},k.value,{role:void 0,"aria-orientation":void 0,"aria-multiselectable":void 0,onFocusOutside:tt}),{default:d(()=>{var xe,qe;return[m(e(ca),{ref_key:"focusScopeRef",ref:xt,loop:"","data-slot":"focusScope",class:ce(B.value.focusScope({class:(xe=e(a).ui)==null?void 0:xe.focusScope})),onMountAutoFocus:ct,onUnmountAutoFocus:Ct},{default:d(()=>{var be,v,ze,at;return[X(p.$slots,"content-top"),e(a).searchInput?(u(),w(e(Cn),{key:0,modelValue:_.value,"onUpdate:modelValue":O[1]||(O[1]=ke=>_.value=ke),"display-value":()=>_.value,"aria-controls":ye,"as-child":""},{default:d(()=>{var ke,Oe;return[m(Ot,de({autofocus:"",autocomplete:"off",size:M.value},j.value,{"model-modifiers":{trim:(ke=e(a).modelModifiers)==null?void 0:ke.trim},"data-slot":"input",class:B.value.input({class:(Oe=e(a).ui)==null?void 0:Oe.input}),onChange:O[0]||(O[0]=it(()=>{},["stop"]))}),null,16,["size","model-modifiers","class"])]}),_:1},8,["modelValue","display-value"])):T("",!0),m(e(bn),{"data-slot":"empty",class:ce(B.value.empty({class:(be=e(a).ui)==null?void 0:be.empty}))},{default:d(()=>[X(p.$slots,"empty",{searchTerm:_.value},()=>[Z(b(_.value?e(x)("selectMenu.noMatch",{searchTerm:_.value}):e(x)("selectMenu.noData")),1)])]),_:3},8,["class"]),D("div",{id:ye,ref_key:"viewportRef",ref:s,role:"listbox","aria-labelledby":Q.value,"aria-multiselectable":!!e(a).multiple,"aria-orientation":"vertical","data-slot":"viewport",class:ce(B.value.viewport({class:(v=e(a).ui)==null?void 0:v.viewport}))},[e(a).virtualize?(u(),R(fe,{key:0},[V.value&&P.value==="top"?(u(),w(e(ie),{key:0})):T("",!0),m(e($n),de({options:C.value,"text-content":ke=>se(ke)?e(nt)(ke,e(a).labelKey):String(ke)},G.value),{default:d(({option:ke,virtualItem:Oe})=>[m(e(Ee),{item:ke,index:Oe.index},null,8,["item","index"])]),_:1},16,["options","text-content"]),V.value&&P.value==="bottom"?(u(),w(e(ie),{key:1})):T("",!0)],64)):(u(),R(fe,{key:1},[V.value&&P.value==="top"?(u(),w(e(Ft),{key:0,"data-slot":"group",class:ce(B.value.group({class:(ze=e(a).ui)==null?void 0:ze.group}))},{default:d(()=>[m(e(ie))]),_:1},8,["class"])):T("",!0),(u(!0),R(fe,null,Ge(Xe.value,(ke,Oe)=>{var pt;return u(),w(e(Ft),{key:`group-${Oe}`,"data-slot":"group",class:ce(B.value.group({class:(pt=e(a).ui)==null?void 0:pt.group}))},{default:d(()=>[(u(!0),R(fe,null,Ge(ke,(wt,vt)=>(u(),w(e(Ee),{key:`group-${Oe}-${vt}`,item:wt,index:vt},null,8,["item","index"]))),128))]),_:2},1032,["class"])}),128)),V.value&&P.value==="bottom"?(u(),w(e(Ft),{key:1,"data-slot":"group",class:ce(B.value.group({class:(at=e(a).ui)==null?void 0:at.group}))},{default:d(()=>[m(e(ie))]),_:1},8,["class"])):T("",!0)],64))],10,Rn),X(p.$slots,"content-bottom")]}),_:3},8,["class"]),e(a).arrow?(u(),w(e(pn),de({key:0},K.value,{"data-slot":"arrow",class:B.value.arrow({class:(qe=e(a).ui)==null?void 0:qe.arrow})}),null,16,["class"])):T("",!0)]}),_:3},16,["class"])]}),_:3})]),_:3},16)]),_:3},16,["name","disabled"])],64))}});function Le(l){if(!l||typeof l!="object"||Array.isArray(l))throw new Ye("Invalid Scheduler reply: expected object");return l}function oe(l){if(typeof l!="string")throw new Ye("Invalid Scheduler reply: expected string");return l}function Rt(l){if(typeof l!="number"||!Number.isSafeInteger(l)||l<0)throw new Ye("Invalid Scheduler reply: expected nonnegative integer");return l}function Re(l,t){return l==null?void 0:t(l)}function Sa(l,t){if(!Array.isArray(l))throw new Ye("Invalid Scheduler reply: expected array");return l.map(t)}function Pn(l){if(l==="read-only"||l==="workspace-write"||l==="full-access")return l;throw new Ye("Invalid Scheduler permission preset")}function Kn(l){return ul(l,"schedule.policy")}function Mn(l){const t=Le(l);return{session_id:oe(t.session_id),branch_id:oe(t.branch_id)}}function Un(l){return l==="user"?l:{tool:Mn(Le(l).tool)}}function Nn(l){if(l==null||l==="queue")return"queue";if(l==="steer"||l==="append")return l;throw new Ye("Invalid Scheduler input mode")}function Hn(l){const t=Le(l);if(t.kind==="session")return{kind:"session",session_id:oe(t.session_id),branch_id:t.branch_id===void 0||t.branch_id===null?"main":oe(t.branch_id),input_mode:Nn(t.input_mode)};if(t.kind==="launch")return{kind:"launch",cwd:oe(t.cwd),agent_id:Re(t.agent_id,oe),policy:Re(t.policy,Pn),max_run_minutes:t.max_run_minutes===void 0||t.max_run_minutes===null?60:Rt(t.max_run_minutes)};throw new Ye("Invalid Scheduler target")}function Wn(l){const t=Le(l);return{code:oe(t.code),at:oe(t.at)}}function Gn(l){const t=Le(l);return"every_minutes"in t?{every_minutes:Rt(t.every_minutes)}:"at"in t?{at:oe(t.at)}:{cron:oe(t.cron),...t.tz==null?{}:{tz:oe(t.tz)}}}function Pt(l){const t=Le(l);return{run_id:oe(t.run_id),job_id:oe(t.job_id),state:oe(t.state),created_at:oe(t.created_at),ended_at:Re(t.ended_at,oe),detail:t.detail===void 0||t.detail===null?"":oe(t.detail),session_id:Re(t.session_id,oe),policy:Re(t.policy,Kn)}}function Kt(l){const t=Le(l);if(typeof t.enabled!="boolean")throw new Ye("Invalid Scheduler job state");return{id:oe(t.id),name:oe(t.name),prompt:oe(t.prompt),schedule:Gn(t.schedule),target:Hn(t.target),enabled:t.enabled,enabled_at:Re(t.enabled_at,oe),disabled_reason:Re(t.disabled_reason,Wn),revision:Rt(t.revision),created_by:Un(t.created_by),next_window:Re(t.next_window,oe),schedule_error:Re(t.schedule_error,oe),last_run:Re(t.last_run,Pt)}}function jn(l){return Sa(Le(l).jobs,Kt)}function Zn(l){return Sa(Le(l).runs,Pt)}function Jn(l){return Kt(Le(l).job)}function Yn(l){return{job:Kt(Le(l).job)}}function Qn(l){return oe(Le(l).job_id)}const Xn={class:"settings-card settings-form"},ei=["aria-label"],ti={key:0,class:"settings-grid"},ai={key:1,class:"settings-actions"},li={key:3,class:"settings-help"},ni={class:"settings-form schedule-advanced"},ii={class:"settings-help"},si={class:"settings-help"},oi=re({__name:"SchedulePlan",props:{modelValue:{}},emits:["update:modelValue","valid"],setup(l,{emit:t}){const i=l,r=t,n=xa(),o=i.modelValue,a=A("at"in o?"once":"repeat"),_="cron"in o?/^(\d{1,2}) (\d{1,2}) \* \* (\*|[0-6](?:,[0-6])*)$/.exec(o.cron):null,x=A("every_minutes"in o?"interval":"cron"in o&&!_?"cron":"basic"),I=A(_&&_[3]!=="*"?"weekly":"daily"),z=A(_&&_[3]!=="*"?_[3].split(",").map(Number):[1,2,3,4,5]),N=A(_?`${_[2].padStart(2,"0")}:${_[1].padStart(2,"0")}`:"09:00"),y=A("cron"in o?o.tz??"":Intl.DateTimeFormat().resolvedOptions().timeZone),k=A("every_minutes"in o?o.every_minutes:60),K=A("cron"in o?o.cron:"0 9 * * 1-5"),E=Intl.DateTimeFormat().resolvedOptions().timeZone;function G(U){const S=Y=>String(Y).padStart(2,"0");return`${U.getFullYear()}-${S(U.getMonth()+1)}-${S(U.getDate())}T${S(U.getHours())}:${S(U.getMinutes())}`}const j=A("at"in o?G(new Date(o.at)):""),L=A(""),g=A(""),F=A(!1),$=q(()=>[n("Mon","周一"),n("Tue","周二"),n("Wed","周三"),n("Thu","周四"),n("Fri","周五"),n("Sat","周六"),n("Sun","周日")]),H=q(()=>[{value:"daily",label:n("Every day","每天")},{value:"weekly",label:n("Every week","每周")}]),pe=q(()=>[{value:"basic",label:n("Use the date / frequency above","使用上面的日期 / 重复频率")},{value:"interval",label:n("Every N minutes","每隔 N 分钟")},{value:"cron",label:n("Custom Cron","自定义 Cron")}]),J=q(()=>{const U=i.modelValue;return"every_minutes"in U?n(`Every ${U.every_minutes} minutes`,`每隔 ${U.every_minutes} 分钟`):"at"in U?new Date(U.at).toLocaleString([],{dateStyle:"medium",timeStyle:"short"}):x.value==="basic"?`${I.value==="daily"?n("Every day","每天"):n("Every selected weekday","每周所选日期")} ${N.value}`:U.cron});function ae(){g.value="",(a.value!=="once"||x.value!=="basic")&&(F.value=!1);try{let U;if(x.value==="interval"){if(!Number.isInteger(k.value)||k.value<1||k.value>4294967295)throw new Error(n("Enter an integer interval of at least 1 minute.","请输入至少 1 分钟的整数间隔。"));U={every_minutes:k.value}}else if(a.value==="once"&&x.value!=="cron"){let S=new Date(j.value);if(L.value){if(!/(Z|[+-]\d{2}:\d{2})$/.test(L.value))throw new Error(n("Include Z or an explicit UTC offset.","请包含 Z 或明确的 UTC 偏移。"));S=new Date(L.value)}else{if(!Number.isFinite(S.getTime())||G(S)!==j.value)throw new Error(n("This local minute does not exist. Choose another time.","此本地时间不存在,请选择其他时间。"));F.value=!1;for(let Y=-180;Y<=180;Y++)Y!==0&&G(new Date(S.getTime()+Y*6e4))===j.value&&(F.value=!0);if(F.value)throw new Error(n("This minute occurs twice. Enter an instant with its UTC offset below.","此分钟在夏令时切换时出现两次,请在下方指定带 UTC 偏移的时间。"))}if(!Number.isFinite(S.getTime())||S.getSeconds()!==0||S.getMilliseconds()!==0)throw new Error(n("Choose a valid time at minute precision.","请选择有效时间,精确到分钟。"));U={at:S.toISOString()}}else{const[S,Y]=N.value.split(":").map(Number);if(x.value==="basic"&&(!/^\d{2}:\d{2}$/.test(N.value)||S>23||Y>59||I.value==="weekly"&&!z.value.length))throw new Error(n("Choose a time and at least one weekday.","请选择运行时间和至少一个星期。"));const ve=x.value==="cron"?K.value.trim():`${Y} ${S} * * ${I.value==="daily"?"*":[...z.value].sort((le,me)=>le-me).join(",")}`;if(ve.split(/\s+/).length!==5)throw new Error(n("Cron needs five fields: minute hour day month weekday.","Cron 需要五个字段:分、时、日、月、周。"));y.value&&new Intl.DateTimeFormat("en",{timeZone:y.value}),U={cron:ve,...y.value?{tz:y.value}:{}}}r("update:modelValue",U),r("valid",!0)}catch(U){g.value=U instanceof Error?U.message:String(U),r("valid",!1)}}function ee(U,S){const Y=new Set(z.value);S===!0?Y.add(U):Y.delete(U),z.value=[...Y].sort((ve,le)=>ve-le),ae()}function W(U){a.value=U,x.value="basic",L.value="",ae()}return(U,S)=>{const Y=Bt,ve=ka,le=pa,me=Ot,ue=ga,Te=va,Ie=fa;return u(),R("section",Xn,[D("h3",null,b(e(n)("When to run","运行计划")),1),D("div",{class:"settings-actions","aria-label":e(n)("Schedule type","计划类型")},[(u(),R(fe,null,Ge(["once","repeat"],M=>m(Y,{key:M,color:a.value===M&&x.value==="basic"?"primary":"neutral",variant:a.value===M&&x.value==="basic"?"soft":"ghost","aria-pressed":a.value===M&&x.value==="basic",onClick:h=>W(M)},{default:d(()=>[Z(b(M==="once"?e(n)("Once","仅一次"):e(n)("Repeat","重复")),1)]),_:2},1032,["color","variant","aria-pressed","onClick"])),64))],8,ei),x.value==="basic"?(u(),R("div",ti,[a.value==="repeat"?(u(),w(le,{key:0,label:e(n)("Frequency","重复频率")},{default:d(()=>[m(ve,{modelValue:I.value,"onUpdate:modelValue":[S[0]||(S[0]=M=>I.value=M),ae],"value-key":"value","search-input":!1,"aria-label":e(n)("Frequency","重复频率"),items:H.value},null,8,["modelValue","aria-label","items"])]),_:1},8,["label"])):T("",!0),a.value==="repeat"?(u(),w(le,{key:1,label:e(n)("Run time","运行时间")},{default:d(()=>[m(me,{modelValue:N.value,"onUpdate:modelValue":[S[1]||(S[1]=M=>N.value=M),ae],type:"time",step:"60",required:""},null,8,["modelValue"])]),_:1},8,["label"])):(u(),w(le,{key:2,class:"schedule-once",label:e(n)("Date and time","运行日期和时间")},{default:d(()=>[m(me,{modelValue:j.value,"onUpdate:modelValue":[S[2]||(S[2]=M=>j.value=M),S[3]||(S[3]=M=>{L.value="",ae()})],type:"datetime-local",step:"60",required:""},null,8,["modelValue"])]),_:1},8,["label"]))])):T("",!0),x.value==="basic"&&a.value==="repeat"&&I.value==="weekly"?(u(),R("div",ai,[(u(!0),R(fe,null,Ge($.value,(M,h)=>(u(),w(ue,{key:h,"model-value":z.value.includes((h+1)%7),value:(h+1)%7,label:M,"onUpdate:modelValue":ne=>ee((h+1)%7,ne)},null,8,["model-value","value","label","onUpdate:modelValue"]))),128))])):T("",!0),x.value!=="interval"&&(a.value==="repeat"||x.value==="cron")?(u(),w(le,{key:2,label:e(n)("Execution time zone","执行时区"),description:e(n)("Blank keeps the CLI host’s local time zone, not the browser’s.","留空使用 CLI 主机本地时区,不是浏览器时区。")},{default:d(()=>[m(me,{modelValue:y.value,"onUpdate:modelValue":[S[4]||(S[4]=M=>y.value=M),ae],placeholder:"Asia/Shanghai"},null,8,["modelValue"])]),_:1},8,["label","description"])):T("",!0),a.value==="once"&&x.value==="basic"?(u(),R("p",li,b(e(n)("Browser time zone: ","浏览器时区:"))+b(e(E))+". "+b(e(n)("Minute precision. A past instant may be recorded as missed.","精确到分钟;过去时间可能被记为错过。")),1)):T("",!0),F.value?(u(),w(le,{key:4,label:e(n)("Exact instant with UTC offset","带 UTC 偏移的明确时间")},{default:d(()=>[m(me,{modelValue:L.value,"onUpdate:modelValue":[S[5]||(S[5]=M=>L.value=M),ae],placeholder:"2026-11-01T01:30:00-05:00"},null,8,["modelValue"])]),_:1},8,["label"])):T("",!0),m(Te,{"default-open":x.value!=="basic","unmount-on-hide":!1},{content:d(()=>[D("div",ni,[m(le,{label:e(n)("Plan","计划")},{default:d(()=>[m(ve,{modelValue:x.value,"onUpdate:modelValue":[S[6]||(S[6]=M=>x.value=M),ae],"value-key":"value","search-input":!1,"aria-label":e(n)("Plan","计划"),items:pe.value},null,8,["modelValue","aria-label","items"])]),_:1},8,["label"]),x.value==="interval"?(u(),R(fe,{key:0},[m(le,{label:e(n)("Interval in minutes","间隔分钟数")},{default:d(()=>[m(me,{modelValue:k.value,"onUpdate:modelValue":[S[7]||(S[7]=M=>k.value=M),ae],modelModifiers:{number:!0},type:"number",min:"1",max:"4294967295",step:"1",required:""},null,8,["modelValue"])]),_:1},8,["label"]),D("p",ii,b(e(n)("Anchored at enable time on the host, not a fixed clock time. Resuming resets the anchor. No time zone applies.","从主机启用时间起计时,不保证固定钟点;恢复会重设起点,不受时区影响。")),1)],64)):T("",!0),x.value==="cron"?(u(),w(le,{key:1,label:`Cron · ${e(n)("minute hour day month weekday","分 时 日 月 周")}`},{default:d(()=>[m(me,{modelValue:K.value,"onUpdate:modelValue":[S[8]||(S[8]=M=>K.value=M),ae],required:""},null,8,["modelValue"])]),_:1},8,["label"])):T("",!0)])]),default:d(()=>[m(Y,{size:"sm",color:"neutral",variant:"ghost","trailing-icon":"i-lucide-chevron-down",label:e(n)("Advanced schedule","高级计划")},null,8,["label"])]),_:1},8,["default-open"]),g.value?(u(),w(Ie,{key:5,color:"error",variant:"soft",role:"alert",description:g.value},null,8,["description"])):T("",!0),D("p",si,[Z(b(J.value),1),S[9]||(S[9]=D("br",null,null,-1)),Z(b(e(n)("The host validates the plan and reports the next run after saving.","主机校验计划,并在保存后返回下次执行时间。")),1)])])}}}),ri=ma(oi,[["__scopeId","data-v-99a602e0"]]),ui={class:"settings-page schedule-page"},di={class:"schedule-header"},ci={"data-route-heading":"",tabindex:"-1"},pi={key:3,class:"settings-help"},vi={key:5,role:"status"},fi={class:"settings-list-toolbar"},mi={class:"settings-actions"},gi={class:"schedule-filters"},hi={key:0,class:"schedule-list"},bi={class:"schedule-job-heading"},yi={class:"settings-meta"},_i={class:"settings-meta"},xi={class:"schedule-run-meta"},Ci={key:0,class:"schedule-error"},wi={key:1,class:"settings-meta"},ki={class:"settings-actions"},Si={key:0,class:"settings-empty"},qi={key:1,class:"settings-empty"},Ii=["disabled"],Ei={class:"settings-card settings-form"},Vi={class:"settings-form schedule-deliver"},zi={class:"settings-help"},Fi={class:"settings-actions schedule-footer"},Ti={class:"settings-list-toolbar"},Ai={class:"settings-actions"},Li={class:"settings-card"},$i={key:0,class:"schedule-error"},Bi={key:1,class:"settings-meta"},Oi={class:"schedule-prompt"},Di={class:"schedule-json"},Ri={class:"settings-actions"},Pi={key:1,class:"schedule-history"},Ki={class:"settings-help"},Mi={key:0,role:"status"},Ui={class:"schedule-job-heading"},Ni=["datetime"],Hi={key:0},Wi={key:1,class:"settings-meta"},Gi={class:"schedule-run-details"},ji={class:"settings-meta"},Zi={key:0},Ji={key:2,class:"settings-empty"},Tt="__all__",At="__default__",Yi=re({__name:"ScheduledSettings",setup(l){var Ct;const t=xa(),i=El(),r=Vl(),n=dl(),o=cl(),a=pl(),_=vl(),x=A(),I=A(),z=A(),N=A(!1),y=A(!1),k=A(""),K=A(""),E=A(!1),G=A(""),j=A(!1),L=A(!1),g=A("overview"),F=A(typeof i.query.q=="string"?i.query.q:""),$=A(typeof i.query.state=="string"?i.query.state:"all"),H=A(typeof i.query.workspace=="string"?i.query.workspace:""),pe=q(()=>typeof i.params.jobId=="string"?i.params.jobId:""),J=q(()=>i.name==="settings-scheduled-new"),ae=q(()=>J.value||i.name==="settings-scheduled-edit"),ee=q(()=>ae.value||pe.value!==""),W=q(()=>{var s;return(s=I.value)==null?void 0:s.find(c=>c.id===pe.value)}),U=q(()=>n.supports("schedule.list")),S=q(()=>n.phase==="connected"),Y=A(!0),ve=A(0),le=typeof i.query.cwd=="string"?i.query.cwd:((Ct=o.byId.get(a.lastSessionId??""))==null?void 0:Ct.cwd)??"";function me(s){return{name:"",prompt:"",schedule:{cron:"0 9 * * *",tz:Intl.DateTimeFormat().resolvedOptions().timeZone},enabled:!0,kind:"launch",cwd:s,agent_id:void 0,policy:void 0,max_run_minutes:60,session_id:"",branch_id:"main",input_mode:"queue"}}function ue(s){const c=me("");return c.name=s.name,c.prompt=s.prompt,c.schedule={...s.schedule},c.enabled=s.enabled,Te(c,s.target),c}function Te(s,c){s.kind=c.kind,c.kind==="launch"?(s.cwd=c.cwd,s.agent_id=c.agent_id,s.policy=c.policy,s.max_run_minutes=c.max_run_minutes):(s.session_id=c.session_id,s.branch_id=c.branch_id,s.input_mode=c.input_mode)}function Ie(s){const c=s.kind==="launch"?{kind:"launch",cwd:s.cwd,max_run_minutes:s.max_run_minutes,...s.agent_id?{agent_id:s.agent_id}:{},...s.policy?{policy:s.policy}:{}}:{kind:"session",session_id:s.session_id,branch_id:s.branch_id||"main",input_mode:s.input_mode};return{name:s.name,prompt:s.prompt,schedule:s.schedule,target:c,enabled:s.enabled}}const M=Il(me(le)),h=A(structuredClone(M.value));We(()=>{var s;return(s=o.byId.get(a.lastSessionId??""))==null?void 0:s.cwd},s=>{J.value&&h.value.kind==="launch"&&!h.value.cwd&&s&&(M.value={...M.value,cwd:s},h.value.cwd=s)});const ne=q(()=>ae.value&&(!Y.value||JSON.stringify(Ie(h.value))!==JSON.stringify(Ie(M.value))));zl(ne);const ie=q(()=>new TextEncoder().encode(h.value.prompt).length),Se=q(()=>({...F.value?{q:F.value}:{},...$.value!=="all"?{state:$.value}:{},...H.value?{workspace:H.value}:{},...typeof i.query.cwd=="string"?{cwd:i.query.cwd}:{}})),Ee=q(()=>({name:"settings-scheduled",query:Se.value})),B=s=>s.kind==="launch"?s.cwd:"",Ae=q(()=>{var s;return[...new Set(((s=I.value)==null?void 0:s.map(c=>B(c.target)).filter(Boolean))??[])].sort()}),Ne=q({get:()=>H.value||Tt,set:s=>{H.value=s===Tt?"":s}}),Qe=q(()=>[{value:"all",label:t("All statuses","全部状态")},{value:"enabled",label:t("Enabled","已启用")},{value:"paused",label:t("Paused","已暂停")},{value:"invalid",label:t("Invalid schedule","计划无效")}]),Xe=q(()=>[{value:Tt,label:t("All workspaces","全部工作区")},...Ae.value.map(s=>({value:s,label:s}))]),C=q(()=>[...new Set([...h.value.kind==="launch"&&h.value.cwd?[h.value.cwd]:[],...o.workspaces.map(s=>s.cwd),...Ae.value])].map(s=>({value:s,label:s}))),V=q(()=>[{value:"launch",label:t("Launch a new Session each time","每次新建会话")},{value:"session",label:t("Deliver to an existing Session branch","投递到已有会话分支")}]),P=q({get:()=>h.value.policy??At,set:s=>{h.value.policy=s===At?void 0:s}}),te=q(()=>[{value:At,label:t("Not declared: read-only","未声明:只读")},{value:"read-only",label:t("Read only","只读")},{value:"workspace-write",label:t("Workspace write","工作区读写")},{value:"full-access",label:t("Full access (confirmation required)","完全访问(需要确认)")}]),ge=q(()=>[{value:"queue",label:t("Queue until the branch is idle","排队到分支空闲")},{value:"steer",label:t("Steer the running turn","插入当前轮次")},{value:"append",label:t("Append at the next step","追加到下一步")}]),he=q(()=>{var s;return(s=I.value)==null?void 0:s.filter(c=>`${c.name} ${B(c.target)}`.toLowerCase().includes(F.value.toLowerCase())&&(!H.value||B(c.target)===H.value)&&($.value==="all"||($.value==="invalid"?!!c.schedule_error:$.value==="enabled"?c.enabled:!c.enabled)))}),Me=q(()=>h.value.kind==="launch"?h.value.cwd.trim()!=="":h.value.session_id.trim()!==""),$e=q({get:()=>h.value.kind,set:s=>{s!==h.value.kind&&(s==="session"?Te(h.value,{kind:"session",session_id:"",branch_id:"main",input_mode:"queue"}):Te(h.value,{kind:"launch",cwd:le,max_run_minutes:60}))}});function et(s){typeof s=="string"?h.value.cwd=s:s&&typeof s=="object"&&"value"in s&&typeof s.value=="string"&&(h.value.cwd=s.value)}function Ce(s){return S.value&&n.supports(s)&&!y.value&&!N.value&&!L.value}function ut(s){j.value=ae.value&&s instanceof ta&&s.appError==="schedule_conflict",L.value=!(s instanceof ta)||!["schedule_conflict","schedule_invalid","schedule_not_found","unknown_method","service_reloading","service_unavailable","invalid_params"].includes(s.appError??""),k.value=zt(s)}function Be(s){return s?new Date(s).toLocaleString([],{dateStyle:"medium",timeStyle:"short"}):"—"}function _t(s){if("every_minutes"in s)return t(`Every ${s.every_minutes} minutes`,`每隔 ${s.every_minutes} 分钟`);if("at"in s)return t("Once: ","仅一次:")+Be(s.at);const c=/^(\d+) (\d+) \* \* \*$/.exec(s.cron);return(c?t("Every day ","每天 ")+`${c[2].padStart(2,"0")}:${c[1].padStart(2,"0")}`:`Cron ${s.cron}`)+` · ${s.tz??t("Host local time","主机本地时区")}`}function se(s){return s.kind==="session"?t(`Delivers to Session ${s.session_id}, branch ${s.branch_id} (${s.input_mode})`,`投递到会话 ${s.session_id} 的分支 ${s.branch_id}(${s.input_mode})`):t(`Launches a new Session in ${s.cwd}`,`在 ${s.cwd} 新建会话`)}function dt(s){return{delivering:t("Delivering","投递中"),delivered:t("Delivered","已投递"),failed:t("Failed","失败"),lost:t("Lost","结果丢失"),missed:t("Missed","已错过"),completed:t("Completed","已完成"),launching:t("Launching","已接收,启动中"),submitted:t("Submitted","已提交"),running:t("Running","运行中"),skipped:t("Skipped","已跳过"),cancelled:t("Cancelled","已取消"),timed_out:t("Timed out","已超时")}[s]??s}async function He(){var s;if(!(N.value||!S.value||!U.value)&&!(ne.value&&!await((s=x.value)==null?void 0:s.open(t("Discard the draft and load the current job?","放弃草稿并载入当前任务?"))))){N.value=!0,k.value="";try{I.value=await n.client.call("schedule.list",{},jn),ae.value&&W.value&&(M.value=ue(W.value),h.value=structuredClone(M.value),Y.value=!0,++ve.value),J.value||(j.value=!1,L.value=!1),g.value==="history"&&await ct()}catch(c){k.value=zt(c)}finally{N.value=!1}}}async function ct(s=20){if(g.value="history",!(!S.value||!n.supports("schedule.history")||E.value)){E.value=!0,K.value="";try{z.value=await n.client.call("schedule.history",{job_id:pe.value,limit:s},Zn)}catch(c){K.value=zt(c)}finally{E.value=!1}}}async function xt(){if(!Ce("schedule.save")||!Y.value||j.value||!ne.value||!Me.value||!J.value&&!W.value)return;if(ie.value>32768){k.value=t("The prompt exceeds 32 KiB.","指令超过 32 KiB。");return}const s=Ie(h.value),c=Ie(M.value),Q={};for(const ye of Object.keys(s))!J.value&&JSON.stringify(s[ye])===JSON.stringify(c[ye])||(Q[ye]=s[ye]);if(Object.keys(Q).length){y.value=!0,k.value="";try{const ye=await n.client.call("schedule.save",{job:{...Q,...J.value?{}:{id:pe.value}},...J.value?{}:{revision:W.value.revision}},Yn);M.value=ue(ye.job),h.value=structuredClone(M.value),Y.value=!0,_.push({tone:"success",title:t("Task saved","任务已保存"),description:se(ye.job.target)}),await r.replace({name:"settings-scheduled-detail",params:{jobId:ye.job.id},query:Se.value})}catch(ye){ut(ye)}finally{y.value=!1}}}async function tt(s,c){var Ve;const Q=`schedule.${c}`;if(!Ce(Q))return;y.value=!0;const ye=c==="delete"?t(`Delete “${s.name}”? Accepted runs are not stopped.`,`删除「${s.name}」?已接收的运行不会停止。`):t(`Run “${s.name}” now? ${se(s.target)}. This does not enable a paused task and may be skipped.`,`立即运行「${s.name}」?${se(s.target)}。不会启用暂停任务,也可能被跳过。`);if(c!=="set_enabled"&&!await((Ve=x.value)==null?void 0:Ve.open(ye))){y.value=!1;return}k.value="",G.value="";try{if(c==="run_now"){const p=await n.client.call(Q,{job_id:s.id},Pt);G.value=`${dt(p.state)}${p.detail?`: ${p.detail}`:""}`}else if(c==="set_enabled")await n.client.call(Q,{job_id:s.id,enabled:!s.enabled},Jn),G.value=t("Enablement updated. Accepted runs are unchanged.","启用状态已更新,已接收运行不变。");else if(await n.client.call(Q,{job_id:s.id},Qn),G.value=t("Task deleted. Accepted runs are not stopped.","任务已删除,已接收运行不会停止。"),pe.value){await r.replace(Ee.value);return}await He()}catch(p){ut(p)}finally{y.value=!1}}return Fl(n,He,ne),Ue(()=>{He()}),(s,c)=>{var qe,be;const Q=Bt,ye=gt,Ve=fa,p=Ot,O=ka,f=pa,_e=ml,we=ga,xe=va;return u(),R("article",ui,[m(fl,{ref_key:"confirm",ref:x},null,512),ee.value?(u(),w(Q,{key:0,class:"schedule-back",color:"neutral",variant:"link",icon:"i-lucide-arrow-left",to:Ee.value},{default:d(()=>[Z(b(e(t)("Scheduled tasks","定时任务")),1)]),_:1},8,["to"])):T("",!0),D("header",di,[D("div",null,[D("h2",ci,b(J.value?e(t)("New scheduled task","新建定时任务"):ae.value?e(t)("Edit scheduled task","编辑定时任务"):((qe=W.value)==null?void 0:qe.name)??e(t)("Scheduled tasks","定时任务")),1),D("p",null,b(e(t)("Runs on the CLI host, across workspaces. Closing the browser does not stop scheduling; the host must stay running.","任务由 CLI 主机执行,跨工作区共享。关闭浏览器不影响调度;主机需要保持运行。")),1)]),m(ye,{name:"i-lucide-clock-3",class:"schedule-clock size-5","aria-hidden":"true"})]),U.value?(u(),R(fe,{key:2},[S.value?T("",!0):(u(),w(Ve,{key:0,class:"settings-banner",color:"warning",variant:"soft",role:"status",description:e(t)("Disconnected. Shown data may be stale; drafts will not be submitted automatically.","连接已断开,显示的数据可能已过期;草稿不会自动提交。")},null,8,["description"])),G.value?(u(),w(Ve,{key:1,class:"settings-banner",color:"info",variant:"soft",role:"status",description:G.value},null,8,["description"])):T("",!0),k.value?(u(),w(Ve,{key:2,class:"settings-banner",color:"error",variant:"soft",role:"alert",description:k.value},{actions:d(()=>[m(Q,{size:"sm",color:"neutral",variant:"soft",disabled:N.value||y.value||!S.value,onClick:He},{default:d(()=>[Z(b(j.value?e(t)("Discard draft and reload","放弃草稿并重新加载"):e(t)("Reload data","重新读取")),1)]),_:1},8,["disabled"])]),_:1},8,["description"])):T("",!0),j.value?(u(),R("p",pi,b(e(t)("The job changed elsewhere. Your draft is preserved. Reload the current revision before editing again; nothing was overwritten.","任务已在别处更新,草稿已保留;载入当前版本后再编辑,不会自动覆盖。")),1)):T("",!0),L.value?(u(),w(Ve,{key:4,class:"settings-banner",color:"warning",variant:"soft",role:"alert",description:e(t)("The outcome is unknown. Do not repeat the write. Check the task list and run history first.","操作结果未知,请勿重复写入。先检查任务列表和运行历史。")},{actions:d(()=>[m(Q,{size:"sm",variant:"link",to:Ee.value},{default:d(()=>[Z(b(e(t)("Check tasks","检查任务")),1)]),_:1},8,["to"])]),_:1},8,["description"])):T("",!0),N.value?(u(),R("p",vi,b(e(t)("Loading…","加载中…")),1)):T("",!0),ee.value?ae.value&&(J.value||W.value)?(u(),R("form",{key:7,onSubmit:it(xt,["prevent"])},[D("fieldset",{class:"schedule-form",disabled:y.value||N.value||!S.value||!e(n).supports("schedule.save")||L.value},[D("section",Ei,[m(f,{label:e(t)("Name","名称")},{default:d(()=>[m(p,{modelValue:h.value.name,"onUpdate:modelValue":c[4]||(c[4]=v=>h.value.name=v),class:"w-full",required:""},null,8,["modelValue"])]),_:1},8,["label"]),m(f,{label:e(t)("Instructions to run automatically","未来自动执行的指令"),description:`${ie.value} / 32768 ${e(t)("UTF-8 bytes","UTF-8 字节")}`},{default:d(()=>[m(_e,{modelValue:h.value.prompt,"onUpdate:modelValue":c[5]||(c[5]=v=>h.value.prompt=v),class:"w-full",rows:8},null,8,["modelValue"])]),_:1},8,["label","description"]),J.value?(u(),w(we,{key:0,modelValue:h.value.enabled,"onUpdate:modelValue":c[6]||(c[6]=v=>h.value.enabled=v),label:e(t)("Enable after creation","创建后启用")},null,8,["modelValue","label"])):T("",!0)]),(u(),w(ri,{key:ve.value,modelValue:h.value.schedule,"onUpdate:modelValue":c[7]||(c[7]=v=>h.value.schedule=v),onValid:c[8]||(c[8]=v=>Y.value=v)},null,8,["modelValue"])),m(xe,{"default-open":"",class:"settings-card"},{content:d(()=>[D("div",Vi,[m(f,{label:e(t)("Target","目标")},{default:d(()=>[m(O,{modelValue:$e.value,"onUpdate:modelValue":c[9]||(c[9]=v=>$e.value=v),"value-key":"value","search-input":!1,"aria-label":e(t)("Target","目标"),items:V.value},null,8,["modelValue","aria-label","items"])]),_:1},8,["label"]),h.value.kind==="launch"?(u(),R(fe,{key:0},[m(f,{label:e(t)("CLI host workspace","CLI 主机工作区"),description:e(t)("Current workspace is preselected. Suggestions come from known sessions and scheduled tasks; you can also enter a new host directory.","默认使用当前工作区,候选来自已有会话和定时任务;也可输入新的主机目录。")},{default:d(()=>[m(O,{modelValue:h.value.cwd,"onUpdate:modelValue":c[10]||(c[10]=v=>h.value.cwd=v),class:"w-full","value-key":"value","create-item":{when:"always",position:"bottom"},"aria-label":e(t)("CLI host workspace","CLI 主机工作区"),items:C.value,onCreate:et},null,8,["modelValue","aria-label","items"])]),_:1},8,["label","description"]),m(f,{label:e(t)("Requested permission","声明权限"),help:e(t)("The host caps the preset when the Session launches.","会话启动时仍受主机权限上限约束。")},{default:d(()=>[m(O,{modelValue:P.value,"onUpdate:modelValue":c[11]||(c[11]=v=>P.value=v),"value-key":"value","search-input":!1,"aria-label":e(t)("Requested permission","声明权限"),items:te.value},null,8,["modelValue","aria-label","items"])]),_:1},8,["label","help"]),m(f,{label:e(t)("Maximum run time in minutes","最长运行分钟数")},{default:d(()=>[m(p,{modelValue:h.value.max_run_minutes,"onUpdate:modelValue":c[12]||(c[12]=v=>h.value.max_run_minutes=v),modelModifiers:{number:!0},type:"number",min:"1",max:"4294967295",step:"1",required:""},null,8,["modelValue"])]),_:1},8,["label"]),m(f,{label:e(t)("Agent profile ID (optional)","Agent profile ID(可选)")},{default:d(()=>[m(p,{modelValue:h.value.agent_id,"onUpdate:modelValue":c[13]||(c[13]=v=>h.value.agent_id=v)},null,8,["modelValue"])]),_:1},8,["label"])],64)):(u(),R(fe,{key:1},[m(f,{label:e(t)("Session ID","会话 ID")},{default:d(()=>[m(p,{modelValue:h.value.session_id,"onUpdate:modelValue":c[14]||(c[14]=v=>h.value.session_id=v),required:""},null,8,["modelValue"])]),_:1},8,["label"]),m(f,{label:e(t)("Branch","分支")},{default:d(()=>[m(p,{modelValue:h.value.branch_id,"onUpdate:modelValue":c[15]||(c[15]=v=>h.value.branch_id=v),placeholder:"main"},null,8,["modelValue"])]),_:1},8,["label"]),m(f,{label:e(t)("Input mode","输入模式"),help:e(t)("The saved prompt is delivered to this branch as one input, in the chosen mode.","保存的指令会以所选模式作为一条输入投递到该分支。")},{default:d(()=>[m(O,{modelValue:h.value.input_mode,"onUpdate:modelValue":c[16]||(c[16]=v=>h.value.input_mode=v),"value-key":"value","search-input":!1,"aria-label":e(t)("Input mode","输入模式"),items:ge.value},null,8,["modelValue","aria-label","items"])]),_:1},8,["label","help"])],64))])]),default:d(()=>[m(Q,{size:"sm",color:"neutral",variant:"ghost","trailing-icon":"i-lucide-chevron-down",label:e(t)("Where it delivers","投递到哪里")},null,8,["label"])]),_:1}),D("p",zi,b(e(t)("Saving applies the schedule and the target to future runs. Accepted runs are unchanged.","保存后,后续运行按新的计划与目标执行;已接收运行不变。")),1),D("footer",Fi,[m(Q,{color:"neutral",variant:"soft",to:Ee.value},{default:d(()=>[Z(b(e(t)("Cancel","取消")),1)]),_:1},8,["to"]),m(Q,{type:"submit",color:"primary",disabled:!ne.value||!Y.value||!Me.value||j.value||ie.value>32768||!Ce("schedule.save")},{default:d(()=>[Z(b(J.value?h.value.enabled?e(t)("Create and enable","创建并启用"):e(t)("Create paused task","创建为暂停"):e(t)("Save changes","保存更改")),1)]),_:1},8,["disabled"])])],8,Ii)],32)):W.value?(u(),R(fe,{key:8},[D("div",Ti,[D("div",Ai,[m(Q,{color:g.value==="overview"?"primary":"neutral",variant:g.value==="overview"?"soft":"ghost","aria-pressed":g.value==="overview",onClick:c[17]||(c[17]=v=>g.value="overview")},{default:d(()=>[Z(b(e(t)("Overview","概览")),1)]),_:1},8,["color","variant","aria-pressed"]),m(Q,{color:g.value==="history"?"primary":"neutral",variant:g.value==="history"?"soft":"ghost","aria-pressed":g.value==="history",disabled:!e(n).supports("schedule.history"),onClick:c[18]||(c[18]=v=>ct())},{default:d(()=>[Z(b(e(t)("Run history","运行历史")),1)]),_:1},8,["color","variant","aria-pressed","disabled"])]),m(Q,{color:"neutral",variant:"ghost",disabled:N.value||!S.value,onClick:He},{default:d(()=>[Z(b(e(t)("Refresh","刷新")),1)]),_:1},8,["disabled"])]),g.value==="overview"?(u(),R(fe,{key:0},[D("section",Li,[D("p",null,b(_t(W.value.schedule)),1),D("p",null,b(W.value.enabled?e(t)("Enabled","已启用"):e(t)("Paused","已暂停"))+" · "+b(e(t)("Next run: ","下次执行:"))+b(Be(W.value.next_window)),1),W.value.schedule_error?(u(),R("p",$i,b(W.value.schedule_error),1)):T("",!0),W.value.disabled_reason?(u(),R("p",Bi,b(e(t)("Disabled","已停用"))+": "+b(W.value.disabled_reason.code)+" · "+b(Be(W.value.disabled_reason.at)),1)):T("",!0),D("p",null,[D("code",null,b(se(W.value.target)),1)]),D("pre",Oi,b(W.value.prompt),1),D("p",null,b(e(t)("Origin","来源"))+": "+b(W.value.created_by==="user"?e(t)("User","用户"):e(t)("Tool","工具")),1),m(xe,null,{content:d(()=>[D("pre",Di,b(JSON.stringify({target:W.value.target,origin:W.value.created_by,disabled_reason:W.value.disabled_reason},null,2)),1)]),default:d(()=>[m(Q,{size:"xs",color:"neutral",variant:"ghost",label:e(t)("Saved target and origin","已保存的目标和来源")},null,8,["label"])]),_:1})]),D("div",Ri,[e(n).supports("schedule.save")?(u(),w(Q,{key:0,color:"primary",to:{name:"settings-scheduled-edit",params:{jobId:pe.value},query:Se.value}},{default:d(()=>[Z(b(e(t)("Edit task","编辑任务")),1)]),_:1},8,["to"])):T("",!0),m(Q,{color:"neutral",variant:"soft",disabled:!Ce("schedule.set_enabled"),onClick:c[19]||(c[19]=v=>tt(W.value,"set_enabled"))},{default:d(()=>[Z(b(W.value.enabled?e(t)("Pause","暂停"):e(t)("Resume","恢复")),1)]),_:1},8,["disabled"]),m(Q,{color:"neutral",variant:"soft",disabled:!Ce("schedule.run_now"),onClick:c[20]||(c[20]=v=>tt(W.value,"run_now"))},{default:d(()=>[Z(b(e(t)("Run now","立即运行")),1)]),_:1},8,["disabled"]),m(Q,{color:"error",variant:"ghost",disabled:!Ce("schedule.delete"),onClick:c[21]||(c[21]=v=>tt(W.value,"delete"))},{default:d(()=>[Z(b(e(t)("Delete task","删除任务")),1)]),_:1},8,["disabled"])])],64)):(u(),R("section",Pi,[D("p",Ki,b(e(t)("Recent runs, newest first. Times shown in ","最近运行,新到旧。展示时区:"))+b(Intl.DateTimeFormat().resolvedOptions().timeZone),1),E.value?(u(),R("p",Mi,b(e(t)("Loading…","加载中…")),1)):T("",!0),K.value?(u(),w(Ve,{key:1,class:"settings-banner",color:"error",variant:"soft",role:"alert",description:K.value},null,8,["description"])):T("",!0),(u(!0),R(fe,null,Ge(z.value,v=>(u(),R("div",{key:v.run_id,class:"schedule-job"},[D("div",Ui,[D("span",null,b(dt(v.state)),1),D("time",{datetime:v.created_at,class:"settings-meta"},b(Be(v.created_at)),9,Ni)]),v.detail?(u(),R("p",Hi,b(v.detail),1)):T("",!0),v.ended_at?(u(),R("p",Wi,b(e(t)("Ended","结束"))+": "+b(Be(v.ended_at)),1)):T("",!0),m(xe,{"unmount-on-hide":!1},{content:d(()=>[D("div",Gi,[D("p",ji,b(v.run_id),1),v.policy?(u(),R("pre",Zi,b(JSON.stringify(v.policy,null,2)),1)):T("",!0),v.session_id?(u(),w(Q,{key:1,size:"xs",variant:"link",class:"p-0",to:{name:"chat-session",params:{sessionId:v.session_id}}},{default:d(()=>[Z(b(e(t)("Open session","打开会话")),1)]),_:1},8,["to"])):T("",!0)])]),default:d(()=>[m(Q,{size:"xs",color:"neutral",variant:"ghost",label:e(t)("Run details","运行详情")},null,8,["label"])]),_:2},1024)]))),128)),z.value&&!z.value.length?(u(),R("p",Ji,b(e(t)("No runs recorded.","没有运行记录。")),1)):T("",!0),m(Q,{color:"neutral",variant:"soft",class:"schedule-more",disabled:E.value||!S.value,onClick:c[22]||(c[22]=v=>ct(50))},{default:d(()=>[Z(b(e(t)("Read latest 50 runs","读取最近 50 次运行")),1)]),_:1},8,["disabled"])]))],64)):ee.value&&I.value&&!N.value?(u(),w(Ve,{key:9,class:"settings-banner",color:"neutral",variant:"soft",role:"status",description:e(t)("This task no longer exists. Return to the task list.","任务已不存在,请返回列表。")},null,8,["description"])):T("",!0):(u(),R(fe,{key:6},[D("div",fi,[m(p,{modelValue:F.value,"onUpdate:modelValue":c[0]||(c[0]=v=>F.value=v),type:"search","aria-label":e(t)("Search name or workspace","搜索名称或工作区"),placeholder:e(t)("Search name or workspace","搜索名称或工作区")},null,8,["modelValue","aria-label","placeholder"]),D("div",mi,[m(Q,{color:"neutral",variant:"soft",icon:"i-lucide-refresh-cw",disabled:N.value||y.value||!S.value,onClick:He},{default:d(()=>[Z(b(e(t)("Refresh","刷新")),1)]),_:1},8,["disabled"]),e(n).supports("schedule.save")?(u(),w(Q,{key:0,color:"primary",icon:"i-lucide-plus",to:{name:"settings-scheduled-new",query:Se.value}},{default:d(()=>[Z(b(e(t)("New task","新建任务")),1)]),_:1},8,["to"])):T("",!0)])]),D("div",gi,[m(f,{label:e(t)("Status","状态")},{default:d(()=>[m(O,{modelValue:$.value,"onUpdate:modelValue":c[1]||(c[1]=v=>$.value=v),"value-key":"value","search-input":!1,"aria-label":e(t)("Status","状态"),items:Qe.value},null,8,["modelValue","aria-label","items"])]),_:1},8,["label"]),m(f,{label:e(t)("Workspace","工作区")},{default:d(()=>[m(O,{modelValue:Ne.value,"onUpdate:modelValue":c[2]||(c[2]=v=>Ne.value=v),"value-key":"value","aria-label":e(t)("Workspace","工作区"),items:Xe.value},null,8,["modelValue","aria-label","items"])]),_:1},8,["label"])]),I.value?(u(),R("section",hi,[(u(!0),R(fe,null,Ge(he.value,v=>(u(),R("div",{key:v.id,class:"schedule-job"},[D("div",bi,[m(Q,{variant:"link",class:"p-0",to:{name:"settings-scheduled-detail",params:{jobId:v.id},query:Se.value}},{default:d(()=>[Z(b(v.name),1)]),_:2},1032,["to"]),D("span",yi,[Z(b(v.enabled?e(t)("Enabled","已启用"):e(t)("Paused","已暂停")),1),v.schedule_error?(u(),R(fe,{key:0},[Z(" · "+b(e(t)("Invalid schedule","计划无效")),1)],64)):T("",!0),v.disabled_reason?(u(),R(fe,{key:1},[Z(" · "+b(e(t)("Disabled","已停用")),1)],64)):T("",!0)])]),D("p",null,b(_t(v.schedule)),1),D("p",_i,b(se(v.target)),1),D("div",xi,[D("span",null,[Z(b(e(t)("Next run","下次执行")),1),c[23]||(c[23]=D("br",null,null,-1)),Z(b(v.next_window?Be(v.next_window):v.enabled?e(t)("No next run","无下次执行"):e(t)("Paused","已暂停")),1)]),D("span",null,[Z(b(e(t)("Last result","最近结果")),1),c[24]||(c[24]=D("br",null,null,-1)),Z(b(v.last_run?dt(v.last_run.state)+" · "+Be(v.last_run.ended_at??v.last_run.created_at):e(t)("Not run yet","尚未运行")),1)])]),v.schedule_error?(u(),R("p",Ci,b(v.schedule_error),1)):T("",!0),v.disabled_reason?(u(),R("p",wi,b(e(t)("Disabled","已停用"))+": "+b(v.disabled_reason.code)+" · "+b(Be(v.disabled_reason.at)),1)):T("",!0),D("div",ki,[m(Q,{size:"sm",color:"neutral",variant:"soft",disabled:!Ce("schedule.set_enabled"),onClick:ze=>tt(v,"set_enabled")},{default:d(()=>[Z(b(v.enabled?e(t)("Pause","暂停"):e(t)("Resume","恢复")),1)]),_:2},1032,["disabled","onClick"]),m(Q,{size:"sm",color:"neutral",variant:"ghost",disabled:!Ce("schedule.run_now"),onClick:ze=>tt(v,"run_now")},{default:d(()=>[Z(b(e(t)("Run now","立即运行")),1)]),_:1},8,["disabled","onClick"])])]))),128)),I.value.length?(be=he.value)!=null&&be.length?T("",!0):(u(),R("p",qi,[Z(b(e(t)("No matching tasks.","没有匹配的任务。"))+" ",1),m(Q,{size:"sm",color:"neutral",variant:"ghost",onClick:c[3]||(c[3]=v=>{F.value="",$.value="all",H.value=""})},{default:d(()=>[Z(b(e(t)("Clear filters","清除筛选")),1)]),_:1})])):(u(),R("p",Si,b(e(t)("No scheduled tasks yet. Create a task to get started.","还没有定时任务,可以新建一个。")),1))])):T("",!0)],64))],64)):(u(),w(Ve,{key:1,class:"settings-banner",color:"neutral",variant:"soft",role:"status",description:e(t)("Scheduled tasks are not available through this Web connection. The Scheduler may be disabled or its methods not admitted for Web access.","当前 Web 连接无法使用定时任务:Scheduler 可能未启用,或接口尚未向 Web 放行。")},null,8,["description"]))])}}}),ns=ma(Yi,[["__scopeId","data-v-75b8c8f3"]]);export{ns as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as V,c as D,d as $,a as E,s as N,e as S}from"./index-
|
|
1
|
+
import{u as V,c as D,d as $,a as E,s as N,e as S}from"./index-Cw2UB-vh.js";import{d as I,g as M,h as F,C as K,D as q,x as G,i as H,c as r,e as t,w as m,u as e,R as w,k as p,F as J,E as P,b as _,t as g,G as T,r as x,z as v,f as j,m as A,a as O,H as Q,I as W,J as X,o,K as Y}from"./vendor-vue-DKQ_ib1S.js";import{s as Z}from"./context-CJsPoGtt.js";const ee={class:"settings-shell"},se={key:0,class:"settings-nav"},ae=["aria-label"],te={key:1,class:"settings-body app-scroll-viewport"},ie={key:0,class:"settings-compact-bar"},ne=["disabled"],de=I({__name:"SettingsPage",setup(oe){const{t:i}=M({messages:N}),B=V(),C=D(),l=W(),R=X(),d=x(!1),h=x();Y(Z,d);const z=[{id:"account",icon:"i-lucide-user-circle"},{id:"appearance",icon:"i-lucide-palette"},{id:"agent",icon:"i-lucide-settings-2"},{id:"providers",icon:"i-lucide-brain"},{id:"modality",icon:"i-lucide-sliders-horizontal"},{id:"mcp",icon:"i-lucide-wrench"},{id:"plugins",icon:"i-lucide-plug"},{id:"skills",icon:"i-lucide-box"},{id:"permissions",icon:"i-lucide-shield-check"},{id:"scheduled",icon:"i-lucide-clock-3"},{id:"archived",icon:"i-lucide-archive"},{id:"diagnostics",icon:"i-lucide-activity"}],u=v(()=>C.shellMode==="compact"),f=v(()=>l.name==="settings-index"),n=v(()=>l.path.split("/")[2]),L=v(()=>l.path.split("/").length>3?`/settings/${n.value}`:"/settings");F([u,f],([s,c])=>{!s&&c&&R.replace("/settings/account")},{immediate:!0});async function k(){var c;if(!d.value)return!0;const s=await((c=h.value)==null?void 0:c.open(i("discard")))===!0;return s&&(d.value=!1),s}function b(s){d.value&&(s.preventDefault(),s.returnValue="")}return K(k),q(k),G(()=>window.addEventListener("beforeunload",b)),H(()=>window.removeEventListener("beforeunload",b)),(s,c)=>{const y=S,U=E;return o(),r("section",ee,[t($,{ref_key:"confirm",ref:h},null,512),!u.value||f.value?(o(),r("aside",se,[t(e(w),{class:"settings-back",to:{name:"root"}},{default:m(()=>[t(y,{name:"i-lucide-arrow-left",class:"size-4 shrink-0","aria-hidden":"true"}),j(g(e(i)("back")),1)]),_:1}),p("nav",{"aria-label":e(i)("settings")},[(o(),r(J,null,P(z,a=>t(e(w),{key:a.id,to:`/settings/${a.id}`,class:A({"is-active":n.value===a.id}),"aria-current":n.value===a.id?"page":void 0},{default:m(()=>[t(y,{name:a.icon,class:"size-4 shrink-0","aria-hidden":"true"},null,8,["name"]),p("span",null,g(e(i)(a.id)),1)]),_:2},1032,["to","class","aria-current"])),64))],8,ae)])):_("",!0),!u.value||!f.value?(o(),r("div",te,[u.value?(o(),r("div",ie,[t(U,{color:"neutral",variant:"ghost",size:"md",square:"",icon:"i-lucide-arrow-left",to:L.value,"aria-label":e(i)("back")},null,8,["to","aria-label"]),p("span",null,g(e(i)(n.value??"settings")),1)])):_("",!0),p("fieldset",{class:"settings-content",disabled:e(B).phase!=="connected"&&!["appearance","account","providers","archived"].includes(n.value??"")},[t(e(T),null,{default:m(({Component:a})=>[(o(),O(Q(a),{key:n.value==="providers"?"providers":e(l).path}))]),_:1})],8,ne)])):_("",!0)])}}});export{de as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{u as j,g as q,a as G,h as H,p as E,
|
|
1
|
+
import{u as j,g as q,a as G,h as H,p as E,A as J,l as K,i as Q,_ as W,C as X,v as Y,w as Z}from"./index-Cw2UB-vh.js";import{u as ee}from"./settings-general-2jDdasvB.js";import{_ as ae}from"./GeneralSettingsStatus.vue_vue_type_script_setup_true_lang-CmU799yw.js";import{r as se,m as V}from"./context-CJsPoGtt.js";import{d as le,x as te,c as d,k as o,t as n,u as l,e as c,w as _,b as w,F as N,E as D,r as m,z as F,f as y,a as ne,o as r}from"./vendor-vue-DKQ_ib1S.js";const oe={class:"settings-page"},ie={class:"skill-heading"},ce={"data-route-heading":"",tabindex:"-1"},re={class:"skill-toolbar"},de={key:0,role:"status",class:"settings-banner"},ue={key:1,class:"skill-list"},_e={class:"skill-heading"},me={key:0,class:"settings-meta"},pe={class:"skill-details"},fe={key:0,class:"settings-meta"},ve={key:2,role:"status",class:"settings-empty"},$="__user__",he=le({__name:"SkillSettings",setup(be){const s=ee(),u=j(),L=q(),p=m(),f=m(""),S=m(""),i=m(!1),v=m(""),h=m(""),C=F(()=>{var a;return((a=p.value)==null?void 0:a.entries.filter(t=>`${t.name}
|
|
2
2
|
${t.description}
|
|
3
|
-
${t.filePath}`.toLocaleLowerCase().includes(
|
|
3
|
+
${t.filePath}`.toLocaleLowerCase().includes(S.value.toLocaleLowerCase())))??[]}),A=F(()=>[{value:$,label:s("User skills","用户技能")},...L.workspaces.map(a=>({value:a.cwd,label:`${a.name} — ${a.cwd}`}))]);function k(a=f.value){return a?{cwd:a}:{}}async function B(a=f.value){p.value=await u.client.call("skills.catalog",k(a),J),f.value=a}async function b(a=!1,t=f.value){if(!i.value){i.value=!0,v.value="",h.value="";try{if(!u.supports("skills.catalog"))throw new Error(s("Skills management is not available on this server.","此服务器不支持技能管理。"));a&&await u.client.call("skills.refresh",k(t),E),await B(t),a&&(h.value=s("Skills reloaded.","技能已重新加载。"))}catch(g){v.value=V(g)}finally{i.value=!1}}}async function P(a){if(!i.value){i.value=!0,v.value="",h.value="";try{await u.client.call("skills.set_enabled",{...k(),id:a.id,enabled:!a.enabled},E),await B()}catch(t){v.value=V(t)}finally{i.value=!1}}}async function R(a){await b(!1,typeof a=="string"&&a!==$?a:"")}return se(u,()=>b()),te(()=>b()),(a,t)=>{var x;const g=G,T=K,U=H,z=Q,I=W,M=X,O=Y;return r(),d("article",oe,[o("header",ie,[o("div",null,[o("h2",ce,n(l(s)("Skills","技能")),1),o("p",null,n(l(s)("Manage the installed skills the agent may use.","管理代理可使用的已安装技能。")),1)]),c(g,{color:"neutral",variant:"soft",icon:"i-lucide-refresh-cw",disabled:i.value||!l(u).supports("skills.refresh"),onClick:t[0]||(t[0]=e=>b(!0))},{default:_(()=>[y(n(l(s)("Reload skills","重新加载技能")),1)]),_:1},8,["disabled"])]),o("div",re,[c(U,{label:l(s)("Scope","范围")},{default:_(()=>[c(T,{"model-value":f.value||$,items:A.value,disabled:i.value,"onUpdate:modelValue":R},null,8,["model-value","items","disabled"])]),_:1},8,["label"]),c(U,{label:l(s)("Search skills","搜索技能")},{default:_(()=>[c(z,{modelValue:S.value,"onUpdate:modelValue":t[1]||(t[1]=e=>S.value=e),type:"search",placeholder:l(s)("Name or description","名称或描述")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),c(ae,{busy:i.value,error:v.value,onReload:t[2]||(t[2]=e=>b(l(u).supports("skills.refresh")))},null,8,["busy","error"]),h.value?(r(),d("p",de,n(h.value),1)):w("",!0),(r(!0),d(N,null,D((x=p.value)==null?void 0:x.issues,e=>(r(),ne(I,{key:`${e.path}:${e.message}`,class:"settings-banner",color:"warning",variant:"soft"},{description:_(()=>[o("code",null,n(e.path),1),y(" — "+n(e.message),1)]),_:2},1024))),128)),C.value.length?(r(),d("ul",ue,[(r(!0),d(N,null,D(C.value,e=>(r(),d("li",{key:e.filePath,class:"skill-row"},[o("div",_e,[o("h3",null,n(e.name),1),c(M,{color:e.shadowedBy?"warning":e.enabled?"success":"neutral",variant:"subtle"},{default:_(()=>[y(n(e.shadowedBy?l(s)("Shadowed","已被覆盖"):e.enabled?l(s)("Enabled","已启用"):l(s)("Disabled","已禁用")),1)]),_:2},1032,["color"]),c(g,{size:"sm",color:"neutral",variant:"soft","aria-label":`${e.enabled?l(s)("Disable","禁用"):l(s)("Enable","启用")} ${e.name}`,disabled:i.value||!!e.shadowedBy||!l(u).supports("skills.set_enabled"),onClick:ge=>P(e)},{default:_(()=>[y(n(e.enabled?l(s)("Disable","禁用"):l(s)("Enable","启用")),1)]),_:2},1032,["aria-label","disabled","onClick"])]),o("p",null,n(e.description),1),e.shadowedBy?(r(),d("p",me,n(l(s)("Shadowed by","被以下技能覆盖"))+": "+n(e.shadowedBy),1)):w("",!0),c(O,null,{content:_(()=>[o("div",pe,[o("code",null,n(e.filePath),1),e.allowedTools.length?(r(),d("p",fe,n(l(s)("Declared tools","声明的工具"))+": "+n(e.allowedTools.join(", ")),1)):w("",!0)])]),default:_(()=>[c(g,{size:"xs",color:"neutral",variant:"ghost",label:l(s)("Details","详情")},null,8,["label"])]),_:2},1024)]))),128))])):p.value?(r(),d("p",ve,n(p.value.entries.length?l(s)("No matching skills.","没有匹配的技能。"):l(s)("No installed skills found. Add skills outside this page, then reload.","未发现已安装的技能。在此页面之外添加技能后,重新加载。")),1)):w("",!0)])}}}),Ce=Z(he,[["__scopeId","data-v-8d9b4b5a"]]);export{Ce as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{d as B,o as u,a as v,w,y as b,u as e,X as ke,f as V,t as
|
|
1
|
+
import{d as B,o as u,a as v,w as g,y as b,u as e,X as ke,f as V,t as F,b as k,r as D,h as Q,W as Ce,S as be,x as ye,M as Se,a4 as qe,c as I,F as N,E as re,e as j,O as P,B as oe,p as Pe,z as R,N as Ee,Q as me,Y as we,a5 as Re,m as W,k as Ae,H as te}from"./vendor-vue-DKQ_ib1S.js";import{X as Y,ak as ue,al as $e,am as ge,a6 as De,Z as Te,V as H,aa as Ie,an as Oe,ao as Be,ap as Me,aq as de,ar as pe,as as ze,at as fe,au as ae,av as Ne,aw as Ve,ax as Fe,ay as je,az as Ke,W as Le,ah as We,$ as Ye,a0 as He,a1 as Xe,a2 as Ue,aA as Je,e as Qe,a as ie,a3 as Ze,a4 as Ge}from"./index-Cw2UB-vh.js";import{_ as et}from"./Progress-CO0tbB1X.js";var tt=B({__name:"ToastAnnounceExclude",props:{altText:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){return(T,a)=>(u(),v(e(Y),{as:r.as,"as-child":r.asChild,"data-reka-toast-announce-exclude":"","data-reka-toast-announce-alt":r.altText||void 0},{default:g(()=>[b(T.$slots,"default")]),_:3},8,["as","as-child","data-reka-toast-announce-alt"]))}}),he=tt,at=B({__name:"ToastAnnounce",setup(r){const T=ue(),a=$e(1e3),i=D(!1);let C=0,c=0;return ge&&(C=requestAnimationFrame(()=>{c=requestAnimationFrame(()=>{i.value=!0})}),ke(()=>{cancelAnimationFrame(C),cancelAnimationFrame(c)})),(t,o)=>e(a)||i.value?(u(),v(e(De),{key:0,feature:"fully-hidden"},{default:g(()=>[V(F(e(T).label.value)+" ",1),b(t.$slots,"default")]),_:3})):k("v-if",!0)}}),ot=at;const[st]=Te("ToastPositioner"),[se,lt]=Te("ToastRoot");var nt=B({inheritAttrs:!1,__name:"ToastRootImpl",props:{type:{type:String,required:!1},open:{type:Boolean,required:!1,default:!1},duration:{type:Number,required:!1},toast:{type:Object,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"li"}},emits:["close","escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd"],setup(r,{emit:T}){const a=r,i=T,{forwardRef:C,currentElement:c}=H(),{CollectionItem:t}=Ie(),o=ue(),S=D(null),m=D(null),p=R(()=>typeof a.duration=="number"?a.duration:o.duration.value),h=D(0),f=D(p.value),s=D(0),n=D(p.value),x=Oe(()=>{const l=Date.now()-h.value;n.value=Math.max(f.value-l,0)},{fpsLimit:60});function A(l){l<=0||l===Number.POSITIVE_INFINITY||ge&&(window.clearTimeout(s.value),h.value=Date.now(),s.value=window.setTimeout(_,l))}function _(l){var w,d;const y=(l==null?void 0:l.pointerType)==="";((w=c.value)==null?void 0:w.contains(Ke()))&&y&&((d=o.viewport.value)==null||d.focus()),y&&(o.isClosePausedRef.value=!1),i("close")}const Z=st(null),K=Ee(null);Q([c,()=>{var l;return(l=a.toast)==null?void 0:l.updateKey}],([l])=>{K.value=l?Be(l):null},{flush:"post",immediate:!0});const E=Ce({seq:0,height:0,open:a.open}),M=R(()=>o.getToastStack(E));function L(){const l=c.value;if(!l)return;const y=l.style.height;l.style.height="auto",E.height=l.offsetHeight,l.style.height=y}if(Me(c,L),Q(()=>{var l;return(l=a.toast)==null?void 0:l.updateKey},L,{flush:"post"}),Q(()=>a.open,(l,y)=>{E.open=l,l&&!y&&o.reopenToast(E)}),a.type&&!["foreground","background"].includes(a.type)){const l="Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.";throw new Error(l)}be(l=>{const y=o.viewport.value;if(y){const $=()=>{A(f.value),x.resume(),i("resume")},w=()=>{const d=Date.now()-h.value;f.value=f.value-d,window.clearTimeout(s.value),x.pause(),i("pause")};y.addEventListener(de,w),y.addEventListener(pe,$),l(()=>{y.removeEventListener(de,w),y.removeEventListener(pe,$)})}});const G=R(()=>a.toast?o.toastStore.getRestartKey(a.toast.id):0);Q([()=>a.open,p,G],()=>{f.value=p.value,a.open&&!o.isClosePausedRef.value&&A(p.value)},{immediate:!0}),ze("Escape",l=>{i("escapeKeyDown",l),l.defaultPrevented||(o.isFocusedToastEscapeKeyDownRef.value=!0,_())});let z;return ye(()=>{o.onToastAdd(),z=o.registerToast(E),L()}),Se(()=>{o.onToastRemove(),z==null||z()}),lt({onClose:_,toast:qe(a,"toast")}),(l,y)=>{var $;return u(),I(N,null,[K.value?(u(),v(ot,{key:(($=r.toast)==null?void 0:$.updateKey)??0,role:"alert","aria-live":r.type==="foreground"?"assertive":"polite"},{default:g(()=>[k(`
|
|
2
2
|
Render each chunk as its own text node so screen readers get the
|
|
3
3
|
natural pause break between nodes (see comment in utils.ts).
|
|
4
4
|
Interpolating the array directly with \`{{ announceTextContent }}\`
|
|
5
5
|
would route through Vue's \`toDisplayString\`, which JSON-stringifies
|
|
6
6
|
arrays — the live region would then announce literal \`[\`, quotes
|
|
7
7
|
and commas instead of the toast title and description.
|
|
8
|
-
`),(u(!0),I(N,null,re(K.value,(g,d)=>(u(),I(N,{key:d},[V(j(g),1)],64))),128))]),_:1},8,["aria-live"])):k("v-if",!0),e(o).viewport.value||e(Z)?(u(),v(Pe,{key:1,to:e(o).viewport.value??"body",disabled:!!e(Z)},[F(e(t),null,{default:w(()=>{var g;return[F(e(Y),P({ref:e(C),tabindex:"0"},l.$attrs,{as:r.as,"as-child":r.asChild,"data-state":r.open?"open":"closed","data-swipe-direction":e(o).swipeDirection.value,"data-status":(g=r.toast)==null?void 0:g.status,"data-expanded":e(o).expanded.value?"":void 0,"data-limited":M.value.limited?"":void 0,inert:M.value.limited||void 0,style:{...e(o).disableSwipe.value?void 0:{userSelect:"none",touchAction:"none"},"--reka-toast-index":M.value.index,"--reka-toast-offset-y":`${M.value.offsetY}px`,"--reka-toast-height":E.height?`${E.height}px`:void 0},onPointerdown:y[0]||(y[0]=oe(d=>{e(o).disableSwipe.value||(S.value={x:d.clientX,y:d.clientY})},["left"])),onPointermove:y[1]||(y[1]=d=>{if(e(o).disableSwipe.value||!S.value)return;const q=d.clientX-S.value.x,U=d.clientY-S.value.y,X=!!m.value,J=["left","right"].includes(e(o).swipeDirection.value),O=["left","up"].includes(e(o).swipeDirection.value)?Math.min:Math.max,xe=J?O(0,q):0,_e=J?0:O(0,U),le=d.pointerType==="touch"?10:2,ee={x:xe,y:_e},ce={originalEvent:d,delta:ee};X?(m.value=ee,e(ae)(e(je),ne=>i("swipeMove",ne),ce)):e(fe)(ee,e(o).swipeDirection.value,le)?(m.value=ee,e(ae)(e(Fe),ne=>i("swipeStart",ne),ce),d.target.setPointerCapture(d.pointerId)):(Math.abs(q)>le||Math.abs(U)>le)&&(S.value=null)}),onPointerup:y[2]||(y[2]=d=>{if(e(o).disableSwipe.value)return;const q=m.value,U=d.target;if(U.hasPointerCapture(d.pointerId)&&U.releasePointerCapture(d.pointerId),m.value=null,S.value=null,q){const X=d.currentTarget,J={originalEvent:d,delta:q};e(fe)(q,e(o).swipeDirection.value,e(o).swipeThreshold.value)?e(ae)(e(Ne),O=>i("swipeEnd",O),J):e(ae)(e(Ve),O=>i("swipeCancel",O),J),X==null||X.addEventListener("click",O=>O.preventDefault(),{once:!0})}})}),{default:w(()=>[b(l.$slots,"default",{remaining:n.value,duration:p.value})]),_:3},16,["as","as-child","data-state","data-swipe-direction","data-status","data-expanded","data-limited","inert","style"])]}),_:3})],8,["to","disabled"])):k("v-if",!0)],64)}}}),it=nt,rt=B({__name:"ToastAction",props:{altText:{type:String,required:!1},closeOnClick:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const T=r,a=se(),{forwardRef:i}=H(),C=me(),c=R(()=>{var m;return(m=a.toast.value)==null?void 0:m.actionProps}),t=R(()=>!!C.default||!a.toast.value||!!c.value),o=R(()=>{var m;return T.altText??((m=c.value)==null?void 0:m.altText)});if(t.value&&!o.value)throw new Error("Missing prop `altText` expected on `ToastAction`");function S(m){var p,h,f;(h=(p=c.value)==null?void 0:p.onClick)==null||h.call(p,m),(((f=c.value)==null?void 0:f.closeOnClick)??T.closeOnClick)&&a.onClose(m)}return(m,p)=>t.value&&o.value?(u(),v(he,{key:0,"alt-text":o.value,"as-child":""},{default:w(()=>[F(e(Y),{ref:e(i),as:r.as,"as-child":r.asChild,type:r.as==="button"?"button":void 0,onClick:S},{default:w(()=>[b(m.$slots,"default",{},()=>{var h;return[V(j((h=c.value)==null?void 0:h.label),1)]})]),_:3},8,["as","as-child","type"])]),_:3},8,["alt-text"])):k("v-if",!0)}}),ve=rt,ut=B({__name:"ToastClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const T=r,a=se(),{forwardRef:i}=H();return(C,c)=>(u(),v(he,{"as-child":""},{default:w(()=>[F(e(Y),P(T,{ref:e(i),type:r.as==="button"?"button":void 0,onClick:e(a).onClose}),{default:w(()=>[b(C.$slots,"default")]),_:3},16,["type","onClick"])]),_:3}))}}),ct=ut,dt=B({__name:"ToastDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const T=r;H();const a=se(null);return(i,C)=>{var c;return i.$slots.default||!((c=e(a))!=null&&c.toast.value)||e(a).toast.value.description?(u(),v(e(Y),ge(P({key:0},T)),{default:w(()=>[b(i.$slots,"default",{},()=>{var t,o;return[V(j((o=(t=e(a))==null?void 0:t.toast.value)==null?void 0:o.description),1)]})]),_:3},16)):k("v-if",!0)}}}),pt=dt,ft=B({__name:"ToastRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!0},forceMount:{type:Boolean,required:!1},type:{type:String,required:!1,default:"foreground"},open:{type:Boolean,required:!1,default:void 0},duration:{type:Number,required:!1},toast:{type:Object,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"li"}},emits:["escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(r,{emit:T}){const a=r,i=T,{forwardRef:C}=H(),c=Le(a,"open",i,{defaultValue:a.defaultOpen,passive:a.open===void 0}),t=ue(),o=R(()=>a.toast?a.toast.open:c.value),S=R(()=>{var f;return((f=a.toast)==null?void 0:f.type)??a.type}),m=R(()=>{var f,s;return((f=a.toast)==null?void 0:f.status)==="loading"?Number.POSITIVE_INFINITY:((s=a.toast)==null?void 0:s.duration)??a.duration});function p(){a.toast?(t.toastStore.close(a.toast.id),i("update:open",!1)):c.value=!1}const h=D(!1);return Q([()=>a.toast,h],([f,s])=>{f&&!f.open&&!s&&t.toastStore.remove(f.id)},{immediate:!0}),(f,s)=>(u(),v(e(We),{present:r.forceMount||o.value},{default:w(()=>[F(it,P({ref:e(C),open:o.value,type:S.value,as:r.as,"as-child":r.asChild,duration:m.value,toast:r.toast},f.$attrs,{onVnodeMounted:s[0]||(s[0]=n=>h.value=!0),onVnodeUnmounted:s[1]||(s[1]=n=>h.value=!1),onClose:p,onPause:s[2]||(s[2]=n=>i("pause")),onResume:s[3]||(s[3]=n=>i("resume")),onEscapeKeyDown:s[4]||(s[4]=n=>i("escapeKeyDown",n)),onSwipeStart:s[5]||(s[5]=n=>{i("swipeStart",n),n.defaultPrevented||n.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:s[6]||(s[6]=n=>{if(i("swipeMove",n),!n.defaultPrevented){const{x,y:A}=n.detail.delta,_=n.currentTarget;_.setAttribute("data-swipe","move"),_.style.setProperty("--reka-toast-swipe-move-x",`${x}px`),_.style.setProperty("--reka-toast-swipe-move-y",`${A}px`)}}),onSwipeCancel:s[7]||(s[7]=n=>{if(i("swipeCancel",n),!n.defaultPrevented){const x=n.currentTarget;x.setAttribute("data-swipe","cancel"),x.style.removeProperty("--reka-toast-swipe-move-x"),x.style.removeProperty("--reka-toast-swipe-move-y"),x.style.removeProperty("--reka-toast-swipe-end-x"),x.style.removeProperty("--reka-toast-swipe-end-y")}}),onSwipeEnd:s[8]||(s[8]=n=>{if(i("swipeEnd",n),!n.defaultPrevented){const{x,y:A}=n.detail.delta,_=n.currentTarget;_.setAttribute("data-swipe","end"),_.style.removeProperty("--reka-toast-swipe-move-x"),_.style.removeProperty("--reka-toast-swipe-move-y"),_.style.setProperty("--reka-toast-swipe-end-x",`${x}px`),_.style.setProperty("--reka-toast-swipe-end-y",`${A}px`),p()}})}),{default:w(({remaining:n,duration:x})=>[b(f.$slots,"default",{remaining:n,duration:x,open:o.value})]),_:3},16,["open","type","as","as-child","duration","toast"])]),_:3},8,["present"]))}}),vt=ft,yt=B({__name:"ToastTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const T=r;H();const a=se(null);return(i,C)=>{var c;return i.$slots.default||!((c=e(a))!=null&&c.toast.value)||e(a).toast.value.title?(u(),v(e(Y),ge(P({key:0},T)),{default:w(()=>[b(i.$slots,"default",{},()=>{var t,o;return[V(j((o=(t=e(a))==null?void 0:t.toast.value)==null?void 0:o.title),1)]})]),_:3},16)):k("v-if",!0)}}}),mt=yt;const gt={slots:{root:"relative group overflow-hidden bg-default shadow-lg rounded-lg ring ring-default p-4 flex gap-2.5",wrapper:"w-0 flex-1 flex flex-col",title:"text-sm font-medium text-highlighted",description:"text-sm text-muted",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex gap-1.5 shrink-0",progress:"absolute inset-x-0 bottom-0",close:"p-0"},variants:{color:{primary:{root:"outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary",icon:"text-primary"},secondary:{root:"outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary",icon:"text-secondary"},success:{root:"outline-success/25 focus-visible:outline-3 focus-visible:ring-success",icon:"text-success"},info:{root:"outline-info/25 focus-visible:outline-3 focus-visible:ring-info",icon:"text-info"},warning:{root:"outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning",icon:"text-warning"},error:{root:"outline-error/25 focus-visible:outline-3 focus-visible:ring-error",icon:"text-error"},neutral:{root:"outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted",icon:"text-highlighted"}},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},defaultVariants:{color:"primary"}},xt={__name:"Toast",props:{as:{type:null,required:!1},title:{type:[String,Object,Function],required:!1},description:{type:[String,Object,Function],required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},actions:{type:Array,required:!1},duration:{type:Number,required:!1},progress:{type:[Boolean,Object],required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},type:{type:String,required:!1}},emits:["escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(r,{expose:T,emit:a}){const i=r,C=a,c=me(),t=Ye("toast",i),{t:o}=He(),S=Ge(),m=Ue(Xe(t,"as","defaultOpen","open","duration","type"),C),p=R(()=>{var s;return Ze({extend:gt,...((s=S.ui)==null?void 0:s.toast)||{}})({color:t.color,orientation:t.orientation,title:!!t.title||!!c.title})}),h=Re("rootRef"),f=D(0);return ye(()=>{var s,n;(n=(s=h.value)==null?void 0:s.$el)!=null&&n.getBoundingClientRect&&(f.value=h.value.$el.getBoundingClientRect().height)}),T({height:f}),(s,n)=>{var x;return u(),v(e(vt),P({ref_key:"rootRef",ref:h},e(m),{"data-orientation":e(t).orientation,"data-slot":"root",class:p.value.root({class:[(x=e(t).ui)==null?void 0:x.root,e(t).class]}),style:{"--height":f.value}}),{default:w(({remaining:A,duration:_,open:Z})=>{var K,E,M,L,G,z,l,y,$;return[b(s.$slots,"leading",{ui:p.value},()=>{var g,d,q;return[e(t).avatar?(u(),v(Je,P({key:0,size:((g=e(t).ui)==null?void 0:g.avatarSize)||p.value.avatarSize()},e(t).avatar,{"data-slot":"avatar",class:p.value.avatar({class:(d=e(t).ui)==null?void 0:d.avatar})}),null,16,["size","class"])):e(t).icon?(u(),v(Qe,{key:1,name:e(t).icon,"data-slot":"icon",class:W(p.value.icon({class:(q=e(t).ui)==null?void 0:q.icon}))},null,8,["name","class"])):k("",!0)]}),Ae("div",{"data-slot":"wrapper",class:W(p.value.wrapper({class:(K=e(t).ui)==null?void 0:K.wrapper}))},[e(t).title||c.title?(u(),v(e(mt),{key:0,"data-slot":"title",class:W(p.value.title({class:(E=e(t).ui)==null?void 0:E.title}))},{default:w(()=>[b(s.$slots,"title",{},()=>[typeof e(t).title=="function"?(u(),v(te(e(t).title()),{key:0})):typeof e(t).title=="object"?(u(),v(te(e(t).title),{key:1})):(u(),I(N,{key:2},[V(j(e(t).title),1)],64))])]),_:3},8,["class"])):k("",!0),e(t).description||c.description?(u(),v(e(pt),{key:1,"data-slot":"description",class:W(p.value.description({class:(M=e(t).ui)==null?void 0:M.description}))},{default:w(()=>[b(s.$slots,"description",{},()=>[typeof e(t).description=="function"?(u(),v(te(e(t).description()),{key:0})):typeof e(t).description=="object"?(u(),v(te(e(t).description),{key:1})):(u(),I(N,{key:2},[V(j(e(t).description),1)],64))])]),_:3},8,["class"])):k("",!0),e(t).orientation==="vertical"&&((L=e(t).actions)!=null&&L.length||c.actions)?(u(),I("div",{key:2,"data-slot":"actions",class:W(p.value.actions({class:(G=e(t).ui)==null?void 0:G.actions}))},[b(s.$slots,"actions",{},()=>[(u(!0),I(N,null,re(e(t).actions,({closeOnClick:g,...d},q)=>(u(),v(e(ve),{key:q,"alt-text":d.label||"Action","close-on-click":g,"as-child":"",onClick:n[0]||(n[0]=oe(()=>{},["stop"]))},{default:w(()=>[F(ie,P({size:"xs",color:e(t).color},{ref_for:!0},d),null,16,["color"])]),_:2},1032,["alt-text","close-on-click"]))),128))])],2)):k("",!0)],2),e(t).orientation==="horizontal"&&((z=e(t).actions)!=null&&z.length||c.actions)||e(t).close?(u(),I("div",{key:0,"data-slot":"actions",class:W(p.value.actions({class:(l=e(t).ui)==null?void 0:l.actions,orientation:"horizontal"}))},[e(t).orientation==="horizontal"&&((y=e(t).actions)!=null&&y.length||c.actions)?b(s.$slots,"actions",{},()=>[(u(!0),I(N,null,re(e(t).actions,({closeOnClick:g,...d},q)=>(u(),v(e(ve),{key:q,"alt-text":d.label||"Action","close-on-click":g,"as-child":"",onClick:n[1]||(n[1]=oe(()=>{},["stop"]))},{default:w(()=>[F(ie,P({size:"xs",color:e(t).color},{ref_for:!0},d),null,16,["color"])]),_:2},1032,["alt-text","close-on-click"]))),128))],void 0,0):k("",!0),e(t).close||c.close?(u(),v(e(ct),{key:1,"as-child":""},{default:w(()=>[b(s.$slots,"close",{ui:p.value},()=>{var g;return[e(t).close?(u(),v(ie,P({key:0,icon:e(t).closeIcon||e(S).ui.icons.close,color:"neutral",variant:"link","aria-label":e(o)("toast.close")},typeof e(t).close=="object"?e(t).close:{},{"data-slot":"close",class:p.value.close({class:(g=e(t).ui)==null?void 0:g.close}),onClick:n[2]||(n[2]=oe(()=>{},["stop"]))}),null,16,["icon","aria-label","class"])):k("",!0)]})]),_:3})):k("",!0)],2)):k("",!0),e(t).progress&&Z&&A>0&&_?(u(),v(et,P({key:1,"model-value":A/_*100,color:e(t).color},typeof e(t).progress=="object"?e(t).progress:{},{size:"sm","data-slot":"progress",class:p.value.progress({class:($=e(t).ui)==null?void 0:$.progress})}),null,16,["model-value","color","class"])):k("",!0)]}),_:3},16,["data-orientation","class","style"])}}};export{xt as default};
|
|
8
|
+
`),(u(!0),I(N,null,re(K.value,(w,d)=>(u(),I(N,{key:d},[V(F(w),1)],64))),128))]),_:1},8,["aria-live"])):k("v-if",!0),e(o).viewport.value||e(Z)?(u(),v(Pe,{key:1,to:e(o).viewport.value??"body",disabled:!!e(Z)},[j(e(t),null,{default:g(()=>{var w;return[j(e(Y),P({ref:e(C),tabindex:"0"},l.$attrs,{as:r.as,"as-child":r.asChild,"data-state":r.open?"open":"closed","data-swipe-direction":e(o).swipeDirection.value,"data-status":(w=r.toast)==null?void 0:w.status,"data-expanded":e(o).expanded.value?"":void 0,"data-limited":M.value.limited?"":void 0,inert:M.value.limited||void 0,style:{...e(o).disableSwipe.value?void 0:{userSelect:"none",touchAction:"none"},"--reka-toast-index":M.value.index,"--reka-toast-offset-y":`${M.value.offsetY}px`,"--reka-toast-height":E.height?`${E.height}px`:void 0},onPointerdown:y[0]||(y[0]=oe(d=>{e(o).disableSwipe.value||(S.value={x:d.clientX,y:d.clientY})},["left"])),onPointermove:y[1]||(y[1]=d=>{if(e(o).disableSwipe.value||!S.value)return;const q=d.clientX-S.value.x,X=d.clientY-S.value.y,U=!!m.value,J=["left","right"].includes(e(o).swipeDirection.value),O=["left","up"].includes(e(o).swipeDirection.value)?Math.min:Math.max,xe=J?O(0,q):0,_e=J?0:O(0,X),le=d.pointerType==="touch"?10:2,ee={x:xe,y:_e},ce={originalEvent:d,delta:ee};U?(m.value=ee,e(ae)(e(Fe),ne=>i("swipeMove",ne),ce)):e(fe)(ee,e(o).swipeDirection.value,le)?(m.value=ee,e(ae)(e(je),ne=>i("swipeStart",ne),ce),d.target.setPointerCapture(d.pointerId)):(Math.abs(q)>le||Math.abs(X)>le)&&(S.value=null)}),onPointerup:y[2]||(y[2]=d=>{if(e(o).disableSwipe.value)return;const q=m.value,X=d.target;if(X.hasPointerCapture(d.pointerId)&&X.releasePointerCapture(d.pointerId),m.value=null,S.value=null,q){const U=d.currentTarget,J={originalEvent:d,delta:q};e(fe)(q,e(o).swipeDirection.value,e(o).swipeThreshold.value)?e(ae)(e(Ne),O=>i("swipeEnd",O),J):e(ae)(e(Ve),O=>i("swipeCancel",O),J),U==null||U.addEventListener("click",O=>O.preventDefault(),{once:!0})}})}),{default:g(()=>[b(l.$slots,"default",{remaining:n.value,duration:p.value})]),_:3},16,["as","as-child","data-state","data-swipe-direction","data-status","data-expanded","data-limited","inert","style"])]}),_:3})],8,["to","disabled"])):k("v-if",!0)],64)}}}),it=nt,rt=B({__name:"ToastAction",props:{altText:{type:String,required:!1},closeOnClick:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const T=r,a=se(),{forwardRef:i}=H(),C=me(),c=R(()=>{var m;return(m=a.toast.value)==null?void 0:m.actionProps}),t=R(()=>!!C.default||!a.toast.value||!!c.value),o=R(()=>{var m;return T.altText??((m=c.value)==null?void 0:m.altText)});if(t.value&&!o.value)throw new Error("Missing prop `altText` expected on `ToastAction`");function S(m){var p,h,f;(h=(p=c.value)==null?void 0:p.onClick)==null||h.call(p,m),(((f=c.value)==null?void 0:f.closeOnClick)??T.closeOnClick)&&a.onClose(m)}return(m,p)=>t.value&&o.value?(u(),v(he,{key:0,"alt-text":o.value,"as-child":""},{default:g(()=>[j(e(Y),{ref:e(i),as:r.as,"as-child":r.asChild,type:r.as==="button"?"button":void 0,onClick:S},{default:g(()=>[b(m.$slots,"default",{},()=>{var h;return[V(F((h=c.value)==null?void 0:h.label),1)]})]),_:3},8,["as","as-child","type"])]),_:3},8,["alt-text"])):k("v-if",!0)}}),ve=rt,ut=B({__name:"ToastClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(r){const T=r,a=se(),{forwardRef:i}=H();return(C,c)=>(u(),v(he,{"as-child":""},{default:g(()=>[j(e(Y),P(T,{ref:e(i),type:r.as==="button"?"button":void 0,onClick:e(a).onClose}),{default:g(()=>[b(C.$slots,"default")]),_:3},16,["type","onClick"])]),_:3}))}}),ct=ut,dt=B({__name:"ToastDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const T=r;H();const a=se(null);return(i,C)=>{var c;return i.$slots.default||!((c=e(a))!=null&&c.toast.value)||e(a).toast.value.description?(u(),v(e(Y),we(P({key:0},T)),{default:g(()=>[b(i.$slots,"default",{},()=>{var t,o;return[V(F((o=(t=e(a))==null?void 0:t.toast.value)==null?void 0:o.description),1)]})]),_:3},16)):k("v-if",!0)}}}),pt=dt,ft=B({__name:"ToastRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!0},forceMount:{type:Boolean,required:!1},type:{type:String,required:!1,default:"foreground"},open:{type:Boolean,required:!1,default:void 0},duration:{type:Number,required:!1},toast:{type:Object,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"li"}},emits:["escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(r,{emit:T}){const a=r,i=T,{forwardRef:C}=H(),c=Le(a,"open",i,{defaultValue:a.defaultOpen,passive:a.open===void 0}),t=ue(),o=R(()=>a.toast?a.toast.open:c.value),S=R(()=>{var f;return((f=a.toast)==null?void 0:f.type)??a.type}),m=R(()=>{var f,s;return((f=a.toast)==null?void 0:f.status)==="loading"?Number.POSITIVE_INFINITY:((s=a.toast)==null?void 0:s.duration)??a.duration});function p(){a.toast?(t.toastStore.close(a.toast.id),i("update:open",!1)):c.value=!1}const h=D(!1);return Q([()=>a.toast,h],([f,s])=>{f&&!f.open&&!s&&t.toastStore.remove(f.id)},{immediate:!0}),(f,s)=>(u(),v(e(We),{present:r.forceMount||o.value},{default:g(()=>[j(it,P({ref:e(C),open:o.value,type:S.value,as:r.as,"as-child":r.asChild,duration:m.value,toast:r.toast},f.$attrs,{onVnodeMounted:s[0]||(s[0]=n=>h.value=!0),onVnodeUnmounted:s[1]||(s[1]=n=>h.value=!1),onClose:p,onPause:s[2]||(s[2]=n=>i("pause")),onResume:s[3]||(s[3]=n=>i("resume")),onEscapeKeyDown:s[4]||(s[4]=n=>i("escapeKeyDown",n)),onSwipeStart:s[5]||(s[5]=n=>{i("swipeStart",n),n.defaultPrevented||n.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:s[6]||(s[6]=n=>{if(i("swipeMove",n),!n.defaultPrevented){const{x,y:A}=n.detail.delta,_=n.currentTarget;_.setAttribute("data-swipe","move"),_.style.setProperty("--reka-toast-swipe-move-x",`${x}px`),_.style.setProperty("--reka-toast-swipe-move-y",`${A}px`)}}),onSwipeCancel:s[7]||(s[7]=n=>{if(i("swipeCancel",n),!n.defaultPrevented){const x=n.currentTarget;x.setAttribute("data-swipe","cancel"),x.style.removeProperty("--reka-toast-swipe-move-x"),x.style.removeProperty("--reka-toast-swipe-move-y"),x.style.removeProperty("--reka-toast-swipe-end-x"),x.style.removeProperty("--reka-toast-swipe-end-y")}}),onSwipeEnd:s[8]||(s[8]=n=>{if(i("swipeEnd",n),!n.defaultPrevented){const{x,y:A}=n.detail.delta,_=n.currentTarget;_.setAttribute("data-swipe","end"),_.style.removeProperty("--reka-toast-swipe-move-x"),_.style.removeProperty("--reka-toast-swipe-move-y"),_.style.setProperty("--reka-toast-swipe-end-x",`${x}px`),_.style.setProperty("--reka-toast-swipe-end-y",`${A}px`),p()}})}),{default:g(({remaining:n,duration:x})=>[b(f.$slots,"default",{remaining:n,duration:x,open:o.value})]),_:3},16,["open","type","as","as-child","duration","toast"])]),_:3},8,["present"]))}}),vt=ft,yt=B({__name:"ToastTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(r){const T=r;H();const a=se(null);return(i,C)=>{var c;return i.$slots.default||!((c=e(a))!=null&&c.toast.value)||e(a).toast.value.title?(u(),v(e(Y),we(P({key:0},T)),{default:g(()=>[b(i.$slots,"default",{},()=>{var t,o;return[V(F((o=(t=e(a))==null?void 0:t.toast.value)==null?void 0:o.title),1)]})]),_:3},16)):k("v-if",!0)}}}),mt=yt;const wt={slots:{root:"relative group overflow-hidden bg-default shadow-lg rounded-lg ring ring-default p-4 flex gap-2.5",wrapper:"w-0 flex-1 flex flex-col",title:"text-sm font-medium text-highlighted",description:"text-sm text-muted",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex gap-1.5 shrink-0",progress:"absolute inset-x-0 bottom-0",close:"p-0"},variants:{color:{primary:{root:"outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary",icon:"text-primary"},secondary:{root:"outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary",icon:"text-secondary"},success:{root:"outline-success/25 focus-visible:outline-3 focus-visible:ring-success",icon:"text-success"},info:{root:"outline-info/25 focus-visible:outline-3 focus-visible:ring-info",icon:"text-info"},warning:{root:"outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning",icon:"text-warning"},error:{root:"outline-error/25 focus-visible:outline-3 focus-visible:ring-error",icon:"text-error"},neutral:{root:"outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted",icon:"text-highlighted"}},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},defaultVariants:{color:"primary"}},xt={__name:"Toast",props:{as:{type:null,required:!1},title:{type:[String,Object,Function],required:!1},description:{type:[String,Object,Function],required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},actions:{type:Array,required:!1},duration:{type:Number,required:!1},progress:{type:[Boolean,Object],required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},type:{type:String,required:!1}},emits:["escapeKeyDown","pause","resume","swipeStart","swipeMove","swipeCancel","swipeEnd","update:open"],setup(r,{expose:T,emit:a}){const i=r,C=a,c=me(),t=Ye("toast",i),{t:o}=He(),S=Ge(),m=Xe(Ue(t,"as","defaultOpen","open","duration","type"),C),p=R(()=>{var s;return Ze({extend:wt,...((s=S.ui)==null?void 0:s.toast)||{}})({color:t.color,orientation:t.orientation,title:!!t.title||!!c.title})}),h=Re("rootRef"),f=D(0);return ye(()=>{var s,n;(n=(s=h.value)==null?void 0:s.$el)!=null&&n.getBoundingClientRect&&(f.value=h.value.$el.getBoundingClientRect().height)}),T({height:f}),(s,n)=>{var x;return u(),v(e(vt),P({ref_key:"rootRef",ref:h},e(m),{"data-orientation":e(t).orientation,"data-slot":"root",class:p.value.root({class:[(x=e(t).ui)==null?void 0:x.root,e(t).class]}),style:{"--height":f.value}}),{default:g(({remaining:A,duration:_,open:Z})=>{var K,E,M,L,G,z,l,y,$;return[b(s.$slots,"leading",{ui:p.value},()=>{var w,d,q;return[e(t).avatar?(u(),v(Je,P({key:0,size:((w=e(t).ui)==null?void 0:w.avatarSize)||p.value.avatarSize()},e(t).avatar,{"data-slot":"avatar",class:p.value.avatar({class:(d=e(t).ui)==null?void 0:d.avatar})}),null,16,["size","class"])):e(t).icon?(u(),v(Qe,{key:1,name:e(t).icon,"data-slot":"icon",class:W(p.value.icon({class:(q=e(t).ui)==null?void 0:q.icon}))},null,8,["name","class"])):k("",!0)]}),Ae("div",{"data-slot":"wrapper",class:W(p.value.wrapper({class:(K=e(t).ui)==null?void 0:K.wrapper}))},[e(t).title||c.title?(u(),v(e(mt),{key:0,"data-slot":"title",class:W(p.value.title({class:(E=e(t).ui)==null?void 0:E.title}))},{default:g(()=>[b(s.$slots,"title",{},()=>[typeof e(t).title=="function"?(u(),v(te(e(t).title()),{key:0})):typeof e(t).title=="object"?(u(),v(te(e(t).title),{key:1})):(u(),I(N,{key:2},[V(F(e(t).title),1)],64))])]),_:3},8,["class"])):k("",!0),e(t).description||c.description?(u(),v(e(pt),{key:1,"data-slot":"description",class:W(p.value.description({class:(M=e(t).ui)==null?void 0:M.description}))},{default:g(()=>[b(s.$slots,"description",{},()=>[typeof e(t).description=="function"?(u(),v(te(e(t).description()),{key:0})):typeof e(t).description=="object"?(u(),v(te(e(t).description),{key:1})):(u(),I(N,{key:2},[V(F(e(t).description),1)],64))])]),_:3},8,["class"])):k("",!0),e(t).orientation==="vertical"&&((L=e(t).actions)!=null&&L.length||c.actions)?(u(),I("div",{key:2,"data-slot":"actions",class:W(p.value.actions({class:(G=e(t).ui)==null?void 0:G.actions}))},[b(s.$slots,"actions",{},()=>[(u(!0),I(N,null,re(e(t).actions,({closeOnClick:w,...d},q)=>(u(),v(e(ve),{key:q,"alt-text":d.label||"Action","close-on-click":w,"as-child":"",onClick:n[0]||(n[0]=oe(()=>{},["stop"]))},{default:g(()=>[j(ie,P({size:"xs",color:e(t).color},{ref_for:!0},d),null,16,["color"])]),_:2},1032,["alt-text","close-on-click"]))),128))])],2)):k("",!0)],2),e(t).orientation==="horizontal"&&((z=e(t).actions)!=null&&z.length||c.actions)||e(t).close?(u(),I("div",{key:0,"data-slot":"actions",class:W(p.value.actions({class:(l=e(t).ui)==null?void 0:l.actions,orientation:"horizontal"}))},[e(t).orientation==="horizontal"&&((y=e(t).actions)!=null&&y.length||c.actions)?b(s.$slots,"actions",{},()=>[(u(!0),I(N,null,re(e(t).actions,({closeOnClick:w,...d},q)=>(u(),v(e(ve),{key:q,"alt-text":d.label||"Action","close-on-click":w,"as-child":"",onClick:n[1]||(n[1]=oe(()=>{},["stop"]))},{default:g(()=>[j(ie,P({size:"xs",color:e(t).color},{ref_for:!0},d),null,16,["color"])]),_:2},1032,["alt-text","close-on-click"]))),128))],void 0,0):k("",!0),e(t).close||c.close?(u(),v(e(ct),{key:1,"as-child":""},{default:g(()=>[b(s.$slots,"close",{ui:p.value},()=>{var w;return[e(t).close?(u(),v(ie,P({key:0,icon:e(t).closeIcon||e(S).ui.icons.close,color:"neutral",variant:"link","aria-label":e(o)("toast.close")},typeof e(t).close=="object"?e(t).close:{},{"data-slot":"close",class:p.value.close({class:(w=e(t).ui)==null?void 0:w.close}),onClick:n[2]||(n[2]=oe(()=>{},["stop"]))}),null,16,["icon","aria-label","class"])):k("",!0)]})]),_:3})):k("",!0)],2)):k("",!0),e(t).progress&&Z&&A>0&&_?(u(),v(et,P({key:1,"model-value":A/_*100,color:e(t).color},typeof e(t).progress=="object"?e(t).progress:{},{size:"sm","data-slot":"progress",class:p.value.progress({class:($=e(t).ui)==null?void 0:$.progress})}),null,16,["model-value","color","class"])):k("",!0)]}),_:3},16,["data-orientation","class","style"])}}};export{xt as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{b as G}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Cw2UB-vh.js","assets/vendor-vue-DKQ_ib1S.js","assets/index-DpFp3mPk.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{b as G}from"./index-Cw2UB-vh.js";import{d as L,r as y,h as U,i as O,o as F,a as H,k as R,e as J,w as K,l as Q,n as q,f as W,t as Z,v as ee,T as te,m as le,p as ae,q as k}from"./vendor-vue-DKQ_ib1S.js";import{a as ne}from"./index-rXNtPOVl.js";var B=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},b=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,b);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ce=ne(L({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=y(null),p=y(null),i=y({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),b=y({}),d=y((E=e.placement)!=null?E:"top"),a=y(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=G(()=>import("./index-Cw2UB-vh.js").then(l=>l.be),__vite__mapDeps([0,1,2])).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return B(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return B(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:z,y:j,placement:Y,middlewareData:V}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(z)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,V.arrow&&p.value){const{x:I,y:S}=V.arrow,A={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];b.value={left:I!=null?`${I}px`:"",top:S!=null?`${S}px`:"",[A]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,b.value={},!0}U(()=>e.visible,l=>B(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield k(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield k(),t!==s||!e.visible||(a.value=!0,yield k(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return U([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>B(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield k(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),O(()=>{s+=1,D()}),(l,t)=>(F(),H(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[J(te,{name:"tooltip",appear:""},{default:K(()=>[Q(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:q({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:q(b.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,r as u,d as a}from"./chunk-6Q2QTUOP-
|
|
1
|
+
import{g as p,r as u,d as a}from"./chunk-6Q2QTUOP-DA4a7KDX.js";import{p as f}from"./chunk-JWPE2WC7-C1kUiRK3.js";import{_ as n,l as o}from"./mermaid.core-DcWZ2CKJ.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-CmJIeOtc.js";import"./index-Cw2UB-vh.js";import"./vendor-vue-DKQ_ib1S.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as ln,H as un,I as N,J as I,K as J,L as an,M as y,N as tn,O as j,P as _,Q as rn,R as o,S as on,T as sn,V as fn}from"./mermaid.core-
|
|
1
|
+
import{G as ln,H as un,I as N,J as I,K as J,L as an,M as y,N as tn,O as j,P as _,Q as rn,R as o,S as on,T as sn,V as fn}from"./mermaid.core-DcWZ2CKJ.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,q,O,v,R,K,u){var D=q-l,i=O-h,n=K-v,d=u-R,a=d*D-n*i;if(!(a*a<y))return a=(n*(h-R)-d*(l-v))/a,[l+a*D,h+a*i]}function W(l,h,q,O,v,R,K){var u=l-q,D=h-O,i=(K?R:-R)/j(u*u+D*D),n=i*D,d=-i*u,a=l+n,s=h+d,f=q+n,c=O+d,L=(a+f)/2,t=(s+c)/2,m=f-a,g=c-s,A=m*m+g*g,T=v-R,P=a*c-f*s,E=(g<0?-1:1)*j(on(0,T*T*A-P*P)),G=(P*g-m*E)/A,H=(-P*m-g*E)/A,w=(P*g+m*E)/A,p=(-P*m+g*E)/A,x=G-L,e=H-t,r=w-L,M=p-t;return x*x+e*e>r*r+M*M&&(G=w,H=p),{cx:G,cy:H,x01:-n,y01:-d,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),O=null,v=gn,R=dn,K=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,L=rn(c-f),t=c>f;if(u||(u=n=D()),s<a&&(d=s,s=a,a=d),!(s>y))u.moveTo(0,0);else if(L>tn-y)u.moveTo(s*N(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*N(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=L,E=L,G=K.apply(this,arguments)/2,H=G>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(rn(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(H>y){var M=sn(H/a*I(G)),z=sn(H/s*I(G));(P-=M*2)>y?(M*=t?1:-1,A+=M,T-=M):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var Q=s*N(m),V=s*I(m),B=a*N(T),C=a*I(T);if(w>y){var F=s*N(g),U=s*I(g),X=a*N(A),Y=a*I(A),S;if(L<un)if(S=pn(Q,V,X,Y,F,U,B,C)){var Z=Q-S[0],$=V-S[1],k=F-S[0],b=U-S[1],nn=1/I(fn((Z*k+$*b)/(j(Z*Z+$*$)*j(k*k+b*b)))/2),en=j(S[0]*S[0]+S[1]*S[1]);p=_(w,(a-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}E>y?x>y?(e=W(X,Y,Q,V,s,x,t),r=W(F,U,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),u.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(u.moveTo(Q,V),u.arc(0,0,s,m,g,!t)):u.moveTo(Q,V),!(a>y)||!(P>y)?u.lineTo(B,C):p>y?(e=W(B,C,F,U,a,-p,t),r=W(Q,V,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,a,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),u.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):u.arc(0,0,a,T,A,t)}if(u.closePath(),n)return u=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-un/2;return[N(d)*n,I(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(q=typeof n=="function"?n:J(+n),i):q},i.padRadius=function(n){return arguments.length?(O=n==null?null:typeof n=="function"?n:J(+n),i):O},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:J(+n),i):R},i.padAngle=function(n){return arguments.length?(K=typeof n=="function"?n:J(+n),i):K},i.context=function(n){return arguments.length?(u=n??null,i):u},i}export{hn as d};
|