@nocobase/portal-template-default 1.0.15 → 1.0.16

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.
Files changed (69) hide show
  1. package/dist/assets/{LineDraw-iG-ADes-.js → LineDraw-vPRTWiQ5.js} +1 -1
  2. package/dist/assets/{SymbolDraw-DXoSw1tM.js → SymbolDraw-DOl_Tss3.js} +1 -1
  3. package/dist/assets/{VisualMapping-C_ee4Eht.js → VisualMapping-j08W3KBm.js} +1 -1
  4. package/dist/assets/{auth-method-demo-DaOCuvsq.js → auth-method-demo-B2qcpY8z.js} +1 -1
  5. package/dist/assets/auto-login-provider-BMtzvdxG.js +1 -0
  6. package/dist/assets/{auto-login-provider-5Uxza9Ms.js → auto-login-provider-Bukw7zEe.js} +2 -2
  7. package/dist/assets/auto-redirect-provider-C6GNPg5r.js +1 -0
  8. package/dist/assets/auto-redirect-provider-D5c6kN2R.js +1 -0
  9. package/dist/assets/{auto-redirect-provider-CfwRvYOI.js → auto-redirect-provider-iTzGEDpU.js} +1 -1
  10. package/dist/assets/{calendar-DjDRfD5t.js → calendar-Dv2RNnsr.js} +1 -1
  11. package/dist/assets/{card-DuQBOS6A.js → card-C9Hpeq1c.js} +1 -1
  12. package/dist/assets/{cas-sign-in-button-CyqG1QME.js → cas-sign-in-button-BQn3Mttx.js} +1 -1
  13. package/dist/assets/{components-D-ptYjX_.js → components-BT5mL9gW.js} +1 -1
  14. package/dist/assets/{configuration-gate-C08mkkiX.js → configuration-gate-BJoadoA6.js} +1 -1
  15. package/dist/assets/{createClipPathFromCoordSys-wj34-b1B.js → createClipPathFromCoordSys-m8IbnJ1z.js} +1 -1
  16. package/dist/assets/createSeriesDataSimply-DKUV5b5e.js +1 -0
  17. package/dist/assets/{customGraphicKeyframeAnimation-DWrhrHL_.js → customGraphicKeyframeAnimation-CYLPurwK.js} +1 -1
  18. package/dist/assets/{demo-DkIhyiRK.js → demo-BWGOwqtJ.js} +1 -1
  19. package/dist/assets/{demo-D4OiKplc.js → demo-BWbcvkya.js} +1 -1
  20. package/dist/assets/{demo-BYWHeKUe.js → demo-DIASSPgn.js} +1 -1
  21. package/dist/assets/{demo-DBueJg0m.js → demo-DuZ6asUU.js} +1 -1
  22. package/dist/assets/{demo-CPWoNtx8.js → demo-Dxcy4bDE.js} +1 -1
  23. package/dist/assets/{demo-CyvJk5zV.js → demo-YpEC76uw.js} +1 -1
  24. package/dist/assets/{demo-tpTjO0sC.js → demo-wzkoR8T2.js} +1 -1
  25. package/dist/assets/{dingtalk-sign-in-button-DSWsSruv.js → dingtalk-sign-in-button-DSluFaP9.js} +1 -1
  26. package/dist/assets/{echarts-preview-DxHNfq1C.js → echarts-preview-mRXoEciY.js} +1 -1
  27. package/dist/assets/{echarts-runtime-D8kXn6ME.js → echarts-runtime-CvLr4Slh.js} +3 -3
  28. package/dist/assets/{echarts-runtime-advanced-QY8v95qK.js → echarts-runtime-advanced-BC1tvfQ0.js} +1 -1
  29. package/dist/assets/{echarts-runtime-common-D-yqAK-r.js → echarts-runtime-common-DhNaV5B8.js} +1 -1
  30. package/dist/assets/{echarts-runtime-components-P4-i8jPU.js → echarts-runtime-components-BiioS8t1.js} +1 -1
  31. package/dist/assets/{echarts-runtime-hierarchy-ByQZ-DbP.js → echarts-runtime-hierarchy-CAWqYvFh.js} +1 -1
  32. package/dist/assets/{floating-BFVEyPEp.js → floating-RVbHvIiD.js} +1 -1
  33. package/dist/assets/{index-um5hdKdZ.js → index-BysibBZu.js} +1 -1
  34. package/dist/assets/{index-CwNxd66J.js → index-C-tdHirk.js} +1 -1
  35. package/dist/assets/{index-gFtCXH3o.js → index-CBZbj45X.js} +1 -1
  36. package/dist/assets/index-CgkdZ6Oc.js +686 -0
  37. package/dist/assets/{index-Btk35Nx-.js → index-Dw20Lzpp.js} +3 -3
  38. package/dist/assets/{index-BgCbGDMc.js → index-hSBzW-VA.js} +1 -1
  39. package/dist/assets/{labelHelper-DQqRy3a_.js → labelHelper-DbITmOUW.js} +1 -1
  40. package/dist/assets/{ldap-sign-in-form--6Gt3yGq.js → ldap-sign-in-form-BOMNDTkK.js} +1 -1
  41. package/dist/assets/{oidc-sign-in-button-CQdRcR_p.js → oidc-sign-in-button-Cgpa8Qzj.js} +1 -1
  42. package/dist/assets/{page-context-CnQ4GYM7.js → page-context-AU6RU0Qi.js} +4 -4
  43. package/dist/assets/prompt-card-FWugRgi-.js +1 -0
  44. package/dist/assets/{prompt-output-DZHRM2ft.js → prompt-output-DMTuTNab.js} +1 -1
  45. package/dist/assets/{saml-sign-in-button-BHL5a0JV.js → saml-sign-in-button-qt8bMeoQ.js} +1 -1
  46. package/dist/assets/{sectorHelper-DN_Vv6OL.js → sectorHelper-C6L782Ue.js} +1 -1
  47. package/dist/assets/shortcut-Bu7jT_-w.js +47 -0
  48. package/dist/assets/{sms-sign-in-form-DTX9GV2I.js → sms-sign-in-form-Bo2WLZuP.js} +1 -1
  49. package/dist/assets/{static.browser-jI1psK0d.js → static.browser-CoPxsICt.js} +8 -8
  50. package/dist/assets/switch-DQkkIE7G.js +1 -0
  51. package/dist/assets/{tool-cards-DFttLAfo.js → tool-cards-ipgJ_3Ec.js} +1 -1
  52. package/dist/assets/{use-authenticator-sign-in-CRGjzXju.js → use-authenticator-sign-in-BzFeh7qe.js} +1 -1
  53. package/dist/assets/{use-dingtalk-sign-in-8WYzJ2jf.js → use-dingtalk-sign-in-mrq6K5Yx.js} +1 -1
  54. package/dist/assets/{use-wecom-sign-in-C9j8wfCD.js → use-wecom-sign-in-PPIMLvGa.js} +1 -1
  55. package/dist/assets/wecom-sign-in-button-rUq9RW8R.js +1 -0
  56. package/dist/index.html +1 -1
  57. package/dist/index.raw.html +1 -1
  58. package/package.json +1 -1
  59. package/src/components/auth/sign-up-form.tsx +287 -59
  60. package/src/components/auth/types.ts +23 -1
  61. package/dist/assets/auto-login-provider-DyaPGK2D.js +0 -1
  62. package/dist/assets/auto-redirect-provider-Cr3jmYts.js +0 -1
  63. package/dist/assets/auto-redirect-provider-QkJQRBbG.js +0 -1
  64. package/dist/assets/createSeriesDataSimply-D0A6SAVQ.js +0 -1
  65. package/dist/assets/index-MB-jfQld.js +0 -686
  66. package/dist/assets/prompt-card-B2RS4nt2.js +0 -1
  67. package/dist/assets/shortcut-C5x5LQWU.js +0 -47
  68. package/dist/assets/switch-CRL8PmRI.js +0 -1
  69. package/dist/assets/wecom-sign-in-button-mIS1zGSU.js +0 -1
@@ -1 +0,0 @@
1
- import{j as o}from"./index-MB-jfQld.js";import{P as p}from"./prompt-output-DZHRM2ft.js";function x({title:r,description:t,prompt:m}){return o.jsx(p,{title:r,description:t,prompt:m,promptClassName:"max-h-[620px]"})}export{x as P};
@@ -1,47 +0,0 @@
1
- import{b as n,a7 as ge,a8 as St,a9 as tt,aa as st,ab as se,j as e,ac as It,ad as at,ae as Pt,af as At,ag as nt,ah as xe,ai as Mt,aj as Tt,ak as rt,al as ot,am as fe,an as Et,ao as Rt,ap as $t,c as le,C as Bt,aq as Ut,ar as it,as as Dt,at as Vt,au as Wt,av as Ft,aw as Fe,ax as zt,ay as Ot,az as Kt,aA as Lt,aB as ze,aC as qt,aD as Gt,aE as Ht,aF as _t,aG as Jt,aH as Xt,y as Yt,aI as lt,a4 as Qt,aJ as Zt,B as Se,aK as es,aL as Pe,Y as Oe,K as Ke,N as Le,a0 as ts,aM as Ie,d as Q,e as Z,f as ee,g as te,i as W,I as qe,D as pe,P as ss,G as as,h as ns,aN as rs,T as Ge,a1 as os,aO as is}from"./index-MB-jfQld.js";import{C as he,a as Ae,b as Me,d as Te}from"./card-DuQBOS6A.js";import{u as ls,S as He}from"./switch-CRL8PmRI.js";import{P as ds}from"./prompt-card-B2RS4nt2.js";import{A as cs}from"./configuration-gate-C08mkkiX.js";import"./prompt-output-DZHRM2ft.js";const us=n.createContext({disabled:!1});function ms(){return n.useContext(us)}const ps=n.createContext(void 0);function hs(s=!0){const a=n.useContext(ps);if(a===void 0&&!s)throw new Error(ge(3));return a}const dt=n.createContext(void 0);function ct(){const s=n.useContext(dt);if(s===void 0)throw new Error(ge(10));return s}const xs={value:()=>null},fs=n.forwardRef(function(a,l){const{render:x,className:P,disabled:m=!1,hiddenUntilFound:h,keepMounted:d,loopFocus:v,onValueChange:f,multiple:M=!1,orientation:k="vertical",value:T,defaultValue:j,style:S,...y}=a,E=St(),I=n.useMemo(()=>{if(T===void 0)return j??[]},[T,j]),C=n.useRef([]),[c,w]=tt({controlled:T,default:I,name:"Accordion",state:"value"}),V=st(($,K,g)=>{if(M)if(K){const N=c.slice();if(N.push($),f==null||f(N,g),g.isCanceled)return;w(N)}else{const N=c.filter(q=>q!==$);if(f==null||f(N,g),g.isCanceled)return;w(N)}else{const N=c[0]===$?[]:[$];if(f==null||f(N,g),g.isCanceled)return;w(N)}}),b=n.useMemo(()=>({value:c,disabled:m,orientation:k}),[c,m,k]),R=n.useMemo(()=>({disabled:m,handleValueChange:V,hiddenUntilFound:h??!1,keepMounted:d??!1,state:b,value:c}),[m,V,h,d,b,c]),p=se("div",a,{state:b,ref:l,props:[{dir:E},y],stateAttributesMapping:xs});return e.jsx(dt.Provider,{value:R,children:e.jsx(It,{elementsRef:C,children:p})})}),ut=n.createContext(void 0);function Ee(){const s=n.useContext(ut);if(s===void 0)throw new Error(ge(9));return s}let gs=(function(s){return s.index="data-index",s.disabled="data-disabled",s.open="data-open",s})({});const Re={...Pt,index:s=>Number.isInteger(s)?{[gs.index]:String(s)}:null,...at,value:()=>null},bs=n.forwardRef(function(a,l){const{className:x,disabled:P=!1,onOpenChange:m,render:h,value:d,style:v,...f}=a,{ref:M,index:k}=At(),T=nt(l,M),{disabled:j,handleValueChange:S,state:y,value:E}=ct(),I=xe(),C=d??I,c=P||j,w=n.useMemo(()=>{if(!E)return!1;for(let B=0;B<E.length;B+=1)if(E[B]===C)return!0;return!1},[E,C]),V=st((B,F)=>{m==null||m(B,F),!F.isCanceled&&S(C,B,F)}),b=Mt({open:w,onOpenChange:V,disabled:c}),R=n.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),p=n.useMemo(()=>({...b,onOpenChange:V,state:R}),[b,R,V]),$=n.useMemo(()=>({...y,hidden:!w&&!b.mounted,index:k,disabled:c,open:w}),[b.mounted,c,k,w,y]),K=xe(),[g,N]=n.useState(),q=n.useMemo(()=>({open:w,state:$,setTriggerId:N,triggerId:g??K}),[K,w,$,N,g]),G=se("div",a,{state:$,ref:T,props:f,stateAttributesMapping:Re});return e.jsx(Tt.Provider,{value:p,children:e.jsx(ut.Provider,{value:q,children:G})})}),ks=n.forwardRef(function(a,l){const{render:x,className:P,style:m,...h}=a,{state:d}=Ee();return se("h3",a,{state:d,ref:l,props:h,stateAttributesMapping:Re})}),vs=n.forwardRef(function(a,l){const{disabled:x,className:P,id:m,render:h,nativeButton:d=!0,style:v,...f}=a,{panelId:M,open:k,handleTrigger:T,disabled:j}=rt(),S=x||j,{getButtonProps:y,buttonRef:E}=ot({disabled:S,focusableWhenDisabled:!0,native:d}),{state:I,setTriggerId:C,triggerId:c}=Ee();return fe(()=>(m&&C(m),()=>{C(void 0)}),[m,C]),se("button",a,{state:I,ref:[l,E],props:[{"aria-controls":k?M:void 0,"aria-expanded":k,id:c,onClick:T},f,y],stateAttributesMapping:Et})});let _e=(function(s){return s.accordionPanelHeight="--accordion-panel-height",s.accordionPanelWidth="--accordion-panel-width",s})({});const js=n.forwardRef(function(a,l){const{className:x,hiddenUntilFound:P,keepMounted:m,id:h,render:d,style:v,...f}=a,{hiddenUntilFound:M,keepMounted:k}=ct(),{mounted:T,onOpenChange:j,open:S,panelId:y,setMounted:E,setOpen:I,setPanelIdState:C,transitionStatus:c}=rt(),w=P??M,V=m??k;fe(()=>{if(h)return C(h),()=>{C(void 0)}},[h,C]);const{height:b,props:R,ref:p,shouldPreventOpenAnimation:$,shouldRender:K,transitionStatus:g,width:N}=Rt({externalRef:l,hiddenUntilFound:w,id:h??y,keepMounted:V,mounted:T,onOpenChange:j,open:S,setMounted:E,setOpen:I,transitionStatus:c}),{state:q,triggerId:G}=Ee(),B={...q,transitionStatus:g},F=$t(v,B),ae=se("div",{...a,style:void 0},{state:B,ref:p,props:[R,{"aria-labelledby":G,role:"region",style:{[_e.accordionPanelHeight]:b===void 0?"auto":`${b}px`,[_e.accordionPanelWidth]:N===void 0?"auto":`${N}px`}},f,F?{style:F}:void 0,$?{style:{animationName:"none"}}:void 0],stateAttributesMapping:Re});return K?ae:null});function ys({className:s,...a}){return e.jsx(fs,{"data-slot":"accordion",className:le("flex w-full flex-col",s),...a})}function ws({className:s,...a}){return e.jsx(bs,{"data-slot":"accordion-item",className:le("not-last:border-b",s),...a})}function Cs({className:s,children:a,...l}){return e.jsx(ks,{className:"flex",children:e.jsxs(vs,{"data-slot":"accordion-trigger",className:le("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",s),...l,children:[a,e.jsx(Bt,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),e.jsx(Ut,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function Ns({className:s,children:a,...l}){return e.jsx(js,{"data-slot":"accordion-content",className:"overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up",...l,children:e.jsx("div",{className:le("h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",s),children:a})})}function Ss(s){if(!s)return null;for(const a of s.elements){const l=a.tagName;if(l==="BUTTON"||l==="INPUT"){const x=a;if(x.type==="submit")return x}}return null}let Je=(function(s){return s.checked="data-checked",s.unchecked="data-unchecked",s.indeterminate="data-indeterminate",s.disabled="data-disabled",s.readonly="data-readonly",s.required="data-required",s.valid="data-valid",s.invalid="data-invalid",s.touched="data-touched",s.dirty="data-dirty",s.filled="data-filled",s.focused="data-focused",s})({});function mt(s){return n.useMemo(()=>({checked(a){return s.indeterminate?{}:a?{[Je.checked]:""}:{[Je.unchecked]:""}},...it}),[s.indeterminate])}const pt=n.createContext(void 0);function Is(){const s=n.useContext(pt);if(s===void 0)throw new Error(ge(14));return s}const Ps="data-parent",As=n.forwardRef(function(a,l){const{checked:x,className:P,defaultChecked:m=!1,"aria-labelledby":h,disabled:d=!1,form:v,id:f,indeterminate:M=!1,inputRef:k,name:T,onCheckedChange:j,parent:S=!1,readOnly:y=!1,render:E,required:I=!1,uncheckedValue:C,value:c,nativeButton:w=!1,style:V,...b}=a,{clearErrors:R}=Dt(),{disabled:p,name:$,setDirty:K,setFilled:g,setFocused:N,setTouched:q,state:G,validationMode:B,validityData:F,validation:ae}=Vt(),de=ms(),{labelId:ce,controlId:t,registerControlId:o,getDescriptionProps:r}=Wt(),i=hs(),z=i==null?void 0:i.parent,H=z&&i.allValues,A=p||de.disabled||(i==null?void 0:i.disabled)||d,ne=$??T,U=c??ne,$e=xe(),xt=xe();let _=t;H?_=S?xt:`${z.id}-${U}`:f&&(_=f);let be={};H&&(S?be=i.parent.getParentProps():U&&(be=i.parent.getChildProps(U)));const{checked:Be=x,indeterminate:ft=M,onCheckedChange:ke,...gt}=be,re=i==null?void 0:i.value,Ue=i==null?void 0:i.setValue,De=i==null?void 0:i.defaultValue,ve=n.useRef(null),ue=Ft(()=>Symbol("checkbox-control")),je=n.useRef(!1),{getButtonProps:bt,buttonRef:kt}=ot({disabled:A,native:w}),oe=(i==null?void 0:i.validation)??ae,[O,vt]=tt({controlled:U&&re&&!S?re.includes(U):Be,default:U&&De&&!S?De.includes(U):m,name:"Checkbox",state:"checked"}),ye=H?!!Be:O,ie=H&&ft||M;fe(()=>{o!==Fe&&(je.current=!0,o(ue.current,_))},[_,o,ue]),n.useEffect(()=>{const u=ue.current;return()=>{!je.current||o===Fe||(je.current=!1,o(u,void 0))}},[o,ue]),zt(ve,$e,O,void 0,!i&&!A,T);const J=n.useRef(null),jt=nt(k,J,oe.inputRef,oe.registerInput),yt=ls(h,ce,J,!w,_??void 0);fe(()=>{J.current&&(J.current.indeterminate=ie,O&&g(!0))},[O,ie,g]),Ot(O,()=>{i||(R(ne),g(O),K(O!==F.initialValue),oe.change(O))});const wt=Kt({checked:O,disabled:A,form:v,name:S?void 0:ne,id:w?void 0:_??void 0,required:I,ref:jt,style:ne?qt:Gt,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(u){if(u.nativeEvent.defaultPrevented)return;if(y){u.preventDefault();return}const L=u.currentTarget.checked,X=Ht(_t,u.nativeEvent);if(j==null||j(L,X),!X.isCanceled&&(ke==null||ke(L,X),!X.isCanceled&&(vt(L),U&&re&&Ue&&!S&&!H))){const Y=L?[...re,U]:re.filter(me=>me!==U);Ue(Y,X)}},onFocus(){var u;(u=ve.current)==null||u.focus()}},c!==void 0?{value:(i?O&&c:c)||""}:Lt,r,u=>oe.getValidationProps(A,u));n.useEffect(()=>{if(!z||!U)return;const u=z.disabledStatesRef.current;return u.set(U,A),()=>{u.delete(U)}},[z,A,U]);const we=n.useMemo(()=>({...G,checked:ye,disabled:A,readOnly:y,required:I,indeterminate:ie}),[G,ye,A,y,I,ie]),Ct=mt(we),Nt=se("span",a,{state:we,ref:[kt,ve,l,i==null?void 0:i.registerControlRef],props:[{id:w?_??void 0:$e,role:"checkbox","aria-checked":ie?"mixed":ye,"aria-readonly":y||void 0,"aria-required":I||void 0,"aria-labelledby":yt,[Ps]:S?"":void 0,onFocus(){A||N(!0)},onBlur(){const u=J.current;u&&(q(!0),N(!1),B==="onBlur"&&oe.commit(i?re:u.checked))},onKeyDown(u){var Ve;if(u.key!=="Enter"||(u.preventBaseUIHandler(),u.defaultPrevented))return;const L=((Ve=J.current)==null?void 0:Ve.form)??null,X=u.currentTarget,Y=u.nativeEvent,me=u.preventDefault,Ce=Y.preventDefault;let Ne=!1;u.preventDefault=()=>{Ne=!0,me.call(u)},Y.preventDefault=()=>{Ne=!0,Ce.call(Y)},Ce.call(Y),ze(X).queueMicrotask(()=>{var We;u.preventDefault=me,Y.preventDefault=Ce,Ne||(We=Ss(L))==null||We.click()})},onClick(u){if(y||A)return;u.preventDefault();const L=J.current;L&&L.dispatchEvent(new(ze(L)).PointerEvent("click",{bubbles:!0,shiftKey:u.shiftKey,ctrlKey:u.ctrlKey,altKey:u.altKey,metaKey:u.metaKey}))}},b,gt,bt,r,u=>oe.getValidationProps(A,u)],stateAttributesMapping:Ct});return e.jsxs(pt.Provider,{value:we,children:[Nt,!O&&!i&&ne&&!S&&C!==void 0&&e.jsx("input",{type:"hidden",form:v,name:ne,value:C,disabled:A}),e.jsx("input",{...wt,suppressHydrationWarning:!0})]})}),Ms=n.forwardRef(function(a,l){const{render:x,className:P,style:m,keepMounted:h=!1,...d}=a,v=Is(),f=v.checked||v.indeterminate,{mounted:M,transitionStatus:k,setMounted:T}=Jt(f),j=n.useRef(null),S={...v,transitionStatus:k};Xt({open:f,ref:j,onComplete(){f||T(!1)}});const E={...mt(v),...at,...it},I=h||M,C=se("span",a,{ref:[l,j],state:S,stateAttributesMapping:E,props:d});return I?C:null});function Ts({className:s,...a}){return e.jsx(As,{"data-slot":"checkbox",className:le("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",s),...a,children:e.jsx(Ms,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:e.jsx(Yt,{})})})}const Xe={title:"Analyze this ticket",message:{system:"Review the current ticket, identify operational risk, and suggest the next action.",user:"Analyze the current ticket and recommend the next action."},autoSend:!0,model:{llmService:"openai",model:"gpt-5"},webSearch:!0,skillSettings:{skills:["ticket-analysis"],tools:["inspect-record"]}},Ye={title:"Draft a customer reply",message:{user:"Draft a concise customer reply for the current ticket."},autoSend:!1,skillSettings:{skills:["response-drafting"],tools:["inspect-record"]}},Qe={title:"Review operational risk",message:{system:"Review the current queue, identify operational risk, and prioritize the next actions.",user:"Review the current ticket queue and identify operational risk."},autoSend:!1,skillSettings:{skills:["ticket-analysis"],tools:["inspect-record"]}},D={id:"TK-1042",title:"Payment callback delayed",status:"Open",requester:"Northwind Finance",createdAt:"July 22, 2026 · 09:42",description:"Payment succeeded, but the callback reached the order service twelve minutes late. The customer needs an impact assessment and a response before the next settlement window."},Es=[D,{id:"TK-1041",title:"Unable to update profile"},{id:"TK-1038",title:"Invoice export formatting"}],ht=s=>!["nathan","dara"].includes(s.username.toLowerCase());function Ks(){return e.jsx(cs,{children:e.jsx(Rs,{})})}function Rs(){const{employees:s}=lt(),a=Qt(),l=s.filter(ht),x=l.find(v=>v.username.toLowerCase()==="atlas")??l[0],P=l.find(v=>v.username!==x.username)??x,m=l.find(v=>v.username.toLowerCase()==="atlas")??l.find(v=>v.username!==x.username)??x,h=Zt({id:"support-ticket-detail",title:`${D.id} · ${D.title}`,kind:"record-detail",getContext:()=>({resource:"supportTickets",record:D})}),d=n.useMemo(()=>({[x.username]:[Xe,Ye],...P.username!==x.username?{[P.username]:[Qe]}:{}}),[x.username,P.username]);return e.jsxs("div",{className:"space-y-12 pb-12",children:[e.jsx("section",{className:"flex flex-wrap items-start justify-between gap-5 border-b pb-8",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Se,{variant:"secondary",children:"AI Components"}),e.jsx(Se,{variant:"outline",children:"Employee capability"})]}),e.jsx("h1",{className:"mt-4 text-3xl font-semibold tracking-[-0.035em]",children:"Employee tasks"}),e.jsx("p",{className:"mt-3 max-w-3xl text-sm leading-6 text-muted-foreground",children:"Bind reusable tasks to AI employees. Tasks can appear directly inside a chat when the employee is selected, or be triggered from contextual buttons elsewhere in the application."})]})}),e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"Scenario 1 · Multiple tasks"}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:"Trigger employee tasks from a business record"}),e.jsx("p",{className:"mt-1.5 max-w-3xl text-sm leading-6 text-muted-foreground",children:"The Shortcut component can still sit in a detail header and provide the current record as work context. Opening it shows the configured analysis and reply tasks below the employee greeting."})]}),e.jsx(es,{context:{type:"page-element",id:"support-ticket-detail",title:`${D.id} · ${D.title}`},children:e.jsxs(he,{ref:h,className:"gap-0 overflow-hidden py-0",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 border-b p-5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:D.id}),e.jsx(Se,{variant:"outline",children:D.status})]}),e.jsx("h3",{className:"mt-2 text-lg font-semibold tracking-tight",children:D.title})]}),e.jsx(Pe,{aiEmployee:x.username,tasks:[Xe,Ye],label:`Ask ${x.nickname}`,size:34})]}),e.jsxs("div",{className:"grid gap-5 p-5 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Requester"}),e.jsx("div",{className:"mt-1 text-sm font-medium",children:D.requester})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Created"}),e.jsx("div",{className:"mt-1 text-sm font-medium",children:D.createdAt})]})]}),e.jsxs("div",{className:"border-t p-5",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),e.jsx("p",{className:"mt-2 max-w-3xl text-sm leading-6",children:D.description})]})]})})]}),e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"Scenario 2 · Explicit target"}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:"Send a shortcut task to a designated embedded chat"}),e.jsxs("p",{className:"mt-1.5 max-w-3xl text-sm leading-6 text-muted-foreground",children:["The shortcut receives the embedded chat Controller directly. Its Provider explicitly configures ",m.nickname," and an employee task set. It does not need a global target ID and cannot accidentally trigger another conversation on the same page."]})]}),e.jsx(Oe,{id:"shortcut-embedded-chat",controller:a,defaultEmployee:m.username,children:e.jsxs("div",{className:"grid items-stretch gap-5 xl:grid-cols-[320px_minmax(0,1fr)]",children:[e.jsxs(he,{children:[e.jsx(Ae,{children:e.jsx(Me,{className:"text-base",children:"Risk review workspace"})}),e.jsxs(Te,{className:"space-y-5",children:[e.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:"The embedded chat starts without preset tasks. Clicking the Shortcut injects “Review operational risk” into this specific conversation, where the user can choose it before the request is placed in the composer."}),e.jsx(Pe,{aiEmployee:m.username,target:a,tasks:[Qe],auto:!1,context:[{type:"table",title:"Open ticket queue",content:Es}],label:`Ask ${m.nickname}`,size:36})]})]}),e.jsx(Ke,{className:"h-[560px] min-h-0",children:e.jsx(Le,{})})]})})]}),e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"Scenario 3 · Chat-bound tasks"}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:"Show tasks when the selected employee changes"}),e.jsx("p",{className:"mt-1.5 max-w-3xl text-sm leading-6 text-muted-foreground",children:"This conversation window binds task lists directly to business AI employees. Starting a new conversation or switching employees in the composer immediately replaces the empty-state tasks. Employees without a binding keep the normal greeting-only state."})]}),e.jsxs("div",{className:"grid items-stretch gap-5 xl:grid-cols-[320px_minmax(0,1fr)]",children:[e.jsxs(he,{children:[e.jsx(Ae,{children:e.jsx(Me,{className:"text-base",children:"Employee task bindings"})}),e.jsxs(Te,{className:"space-y-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"rounded-lg border bg-muted/25 p-3 font-mono text-xs leading-5",children:[e.jsx("div",{children:x.username}),e.jsx("div",{className:"pl-4",children:"Analyze this ticket"}),e.jsx("div",{className:"pl-4",children:"Draft a customer reply"}),P.username!==x.username?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-2",children:P.username}),e.jsx("div",{className:"pl-4",children:"Review operational risk"})]}):null]}),e.jsx("p",{children:"Switch employees from the bottom of the chat to preview each configured task list."}),e.jsxs("p",{children:["The same ",e.jsx("code",{children:"employeeTasks"})," parameter works in page, embedded, side-panel, dialog, and mobile containers."]})]})]}),e.jsx(Oe,{id:"employee-task-scenario-chat",defaultEmployee:x.username,employeeTasks:d,children:e.jsx(Ke,{className:"h-[620px] min-h-0",children:e.jsx(Le,{})})})]})]}),e.jsx(Us,{embeddedController:a})]})}const $s=[{value:"ticket-analysis",label:"Ticket analysis"},{value:"response-drafting",label:"Response drafting"},{value:"workflow-design",label:"Workflow design"}],Bs=[{value:"inspect-record",label:"Inspect record"},{value:"search-records",label:"Search records"},{value:"update-record",label:"Update record"}],Ze=[{id:"analyze-ticket",employee:"",title:"Analyze this ticket",background:"Identify operational risk and recommend the next action.",userMessage:"Analyze the current ticket and recommend the next action.",autoSend:!0,workContext:[{type:"page-element",id:"support-ticket-detail",title:`${D.id} · ${D.title}`}],model:"gpt-5",webSearch:!0,skillsMode:"custom",skills:["ticket-analysis"],toolsMode:"custom",tools:["inspect-record"]},{id:"draft-reply",employee:"",title:"Draft a customer reply",background:"Write a concise and helpful response using the ticket context.",userMessage:"Draft a customer reply for the current ticket.",autoSend:!1,workContext:[],model:"default",webSearch:!1,skillsMode:"custom",skills:["response-drafting"],toolsMode:"preset",tools:[]}];function Us({embeddedController:s}){var B,F,ae,de,ce;const{employees:a,models:l}=lt(),{registeredCount:x,startPicking:P}=ts(),m=a.filter(ht),h=m.find(t=>t.username.toLowerCase()==="atlas")??m[0],[d,v]=n.useState("shortcut"),[f,M]=n.useState("the ticket detail header actions"),[k,T]=n.useState(h.username),[j,S]=n.useState(h.username),[y,E]=n.useState("global-side-panel"),[I,C]=n.useState("embedded"),[c,w]=n.useState(()=>Ze.map(t=>({...t,employee:h.username}))),[V,b]=n.useState(Ze[0].id),R=d==="chat-tasks"?c.filter(t=>t.employee===j):c,p=R.find(t=>t.id===V)??R[0],$=n.useMemo(()=>c.map(t=>{const o=Ie(l,t.model),r=t.skillsMode==="custom"||t.toolsMode==="custom";return{title:t.title,message:{system:t.background||void 0,user:t.userMessage||void 0,workContext:t.workContext.length?t.workContext:void 0},autoSend:t.autoSend,model:o?{llmService:o.llmService,model:o.value}:void 0,webSearch:t.webSearch,skillSettings:r?{skills:t.skillsMode==="custom"?t.skills:void 0,tools:t.toolsMode==="custom"?t.tools:void 0}:void 0}}),[l,c]),K=n.useMemo(()=>{const t=(r,i)=>{var H;const z=r.model==="default"?"Use the AI employee default":((H=l.find(A=>A.value===r.model))==null?void 0:H.label)??r.model;return`${i+1}. ${r.title}
2
- - Background: ${r.background||"None"}
3
- - Default user message: ${r.userMessage||"None"}
4
- - Send automatically: ${r.autoSend}
5
- - Work context: ${r.workContext.map(A=>A.title??A.id).join(", ")||"Inherit the surrounding context"}
6
- - Model: ${z}
7
- - Web search: ${r.webSearch}
8
- - Skills: ${r.skillsMode==="preset"?"Use the AI employee defaults":r.skills.join(", ")||"Disabled"}
9
- - Tools: ${r.toolsMode==="preset"?"Use the AI employee defaults":r.tools.join(", ")||"Disabled"}`},o=d==="chat-tasks"?Array.from(new Set(c.map(r=>r.employee))).map(r=>{const i=c.filter(z=>z.employee===r);return`AI employee: ${r}
10
- ${i.map(t).join(`
11
- `)}`}).join(`
12
-
13
- `):c.map(t).join(`
14
- `);if(d==="chat-tasks"){const r={page:"a dedicated page",embedded:"an embedded block in the page","side-panel":"a push side panel",dialog:"a dialog"}[I];return`Add an AI conversation window to ${f} using ${r}.
15
-
16
- Employee task bindings:
17
- ${o}
18
-
19
- Implementation requirements:
20
- - Render AIChatWindow in the selected container and wrap it with AIChatProvider.
21
- - Configure AIChatProvider with employeeTasks grouped by AI employee username.
22
- - When the user starts a new conversation or switches AI employees, show the matching tasks below that employee’s greeting.
23
- - Employees without configured tasks must keep the greeting-only empty state.
24
- - Selecting a task must respect autoSend: either send immediately or fill the composer for review.
25
- - Resolve task message.workContext when the task starts so selected page elements use their latest values.
26
- - When a task has no message.workContext, inherit the context surrounding the Shortcut or AIChatProvider.
27
- - Preserve every task’s background prompt, model override, Web search setting, Skills, Tools, and work context.
28
- - Keep the employeeTasks capability independent of the container so the same configuration works in page, embedded, side-panel, dialog, and mobile layouts.
29
- - Use the existing AIProvider/AIChatProvider runtime with shadcn/Base UI components.`}return`Add an AI employee shortcut to ${f}.
30
-
31
- Shortcut configuration:
32
- - AI employee: ${k}
33
- - Target conversation: ${y==="global-side-panel"?"the default global push side panel":"the embedded chat rendered in this page section"}
34
- - Include the current record or form values as work context.
35
-
36
- Tasks:
37
- ${o}
38
-
39
- Implementation requirements:
40
- - Use AIEmployeeShortcut and pass all configured tasks through its tasks prop.
41
- - When multiple tasks are provided, open a new conversation and show the tasks below the AI employee greeting.
42
- - Selecting a task must respect that task's autoSend setting: either send immediately or fill the composer for review.
43
- - Resolve task message.workContext when the task starts so selected page elements use their latest values.
44
- - When a task has no message.workContext, inherit the context surrounding the Shortcut or AIChatProvider.
45
- - Preserve each task's background prompt, work context, model override, Web search setting, Skills, and Tools.
46
- - ${y==="global-side-panel"?"Use the global AI chat controller; do not pass a target prop.":"Create a dedicated controller with useAIChatController(), bind it to the embedded AIChatProvider, and pass it through the shortcut target prop."}
47
- - Use the existing AIProvider and AIChatProvider runtime with shadcn/Base UI components.`},[I,k,d,f,l,y,c]),g=t=>{p&&w(o=>o.map(r=>r.id===p.id?{...r,...t}:r))},N=()=>{const t=`task-${crypto.randomUUID()}`;w(o=>[...o,{id:t,employee:d==="chat-tasks"?j:k,title:`Task ${o.length+1}`,background:"",userMessage:"",autoSend:!1,workContext:[],model:"default",webSearch:!1,skillsMode:"preset",skills:[],toolsMode:"preset",tools:[]}]),b(t)},q=t=>{if(c.length===1)return;const o=c.filter(r=>r.id!==t);if(w(o),V===t){const r=d==="chat-tasks"?o.find(i=>i.employee===j):o[0];b((r==null?void 0:r.id)??"")}},G=(t,o,r)=>{if(!p)return;const i=p[t];g({[t]:r?[...i,o]:i.filter(z=>z!==o)})};return e.jsxs("section",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"Employee tasks prompt"}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:"Generate an integration prompt"}),e.jsx("p",{className:"mt-1.5 max-w-3xl text-sm leading-6 text-muted-foreground",children:"Choose whether tasks are exposed through a contextual Shortcut or directly by the selected employee in a chat. Both modes share the same task, model, Web search, Skills, and Tools configuration."})]}),e.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-[360px_minmax(0,1fr)]",children:[e.jsxs(he,{className:"gap-0 py-0",children:[e.jsx(Ae,{className:"py-4",children:e.jsx(Me,{className:"text-base",children:"Employee task configuration"})}),e.jsxs(Te,{className:"space-y-4 pb-4",children:[e.jsxs("label",{className:"block space-y-2 text-xs font-medium",children:[e.jsx("span",{children:"Integration"}),e.jsxs(Q,{value:d,onValueChange:t=>{if(!t)return;const o=t;v(o),M(o==="shortcut"?"the ticket detail header actions":"the ticket detail page");const r=o==="chat-tasks"?c.find(i=>i.employee===j):c[0];b((r==null?void 0:r.id)??"")},children:[e.jsx(Z,{className:"w-full",children:e.jsx(ee,{children:d==="shortcut"?"Contextual Shortcut":"Tasks inside a chat"})}),e.jsxs(te,{children:[e.jsx(W,{value:"shortcut",children:"Contextual Shortcut"}),e.jsx(W,{value:"chat-tasks",children:"Tasks inside a chat"})]})]})]}),d==="chat-tasks"?e.jsxs("label",{className:"block space-y-2 border-t pt-4 text-xs font-medium",children:[e.jsx("span",{children:"AI employee"}),e.jsxs(Q,{value:j,onValueChange:t=>{var o;t&&(S(t),b(((o=c.find(r=>r.employee===t))==null?void 0:o.id)??""))},children:[e.jsx(Z,{className:"w-full",children:e.jsx(ee,{children:((B=m.find(t=>t.username===j))==null?void 0:B.nickname)??j})}),e.jsx(te,{children:m.map(t=>e.jsx(W,{value:t.username,children:t.nickname},t.username))})]}),e.jsx("span",{className:"block font-normal leading-5 text-muted-foreground",children:"Select an employee first, then configure the tasks shown in that employee’s new-conversation state."})]}):null,e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[d==="shortcut"?e.jsxs("label",{className:"block space-y-2 text-xs font-medium",children:[e.jsx("span",{children:"AI employee"}),e.jsxs(Q,{value:k,onValueChange:t=>t&&T(t),children:[e.jsx(Z,{className:"w-full",children:e.jsx(ee,{children:((F=m.find(t=>t.username===k))==null?void 0:F.nickname)??k})}),e.jsx(te,{children:m.map(t=>e.jsx(W,{value:t.username,children:t.nickname},t.username))})]})]}):null,e.jsxs("label",{className:"block space-y-2 text-xs font-medium",children:[e.jsx("span",{children:"Placement"}),e.jsx(qe,{value:f,onChange:t=>M(t.target.value)})]}),d==="chat-tasks"?e.jsxs("label",{className:"block space-y-2 text-xs font-medium",children:[e.jsx("span",{children:"Chat container"}),e.jsxs(Q,{value:I,onValueChange:t=>t&&C(t),children:[e.jsx(Z,{className:"w-full",children:e.jsx(ee,{children:{page:"Page",embedded:"Embedded block","side-panel":"Side panel",dialog:"Dialog"}[I]})}),e.jsxs(te,{children:[e.jsx(W,{value:"page",children:"Page"}),e.jsx(W,{value:"embedded",children:"Embedded block"}),e.jsx(W,{value:"side-panel",children:"Side panel"}),e.jsx(W,{value:"dialog",children:"Dialog"})]})]})]}):null]}),d==="shortcut"?e.jsxs("label",{className:"block space-y-2 text-xs font-medium",children:[e.jsx("span",{children:"Target conversation"}),e.jsxs(Q,{value:y,onValueChange:t=>t&&E(t),children:[e.jsx(Z,{className:"w-full",children:e.jsx(ee,{children:y==="global-side-panel"?"Global side panel":"Embedded chat"})}),e.jsxs(te,{children:[e.jsx(W,{value:"global-side-panel",children:"Global side panel"}),e.jsx(W,{value:"embedded",children:"Embedded chat"})]})]})]}):null,e.jsxs("div",{className:"space-y-2 border-t pt-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:"Tasks"}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[R.length," configured task",R.length===1?"":"s",d==="chat-tasks"?" for this employee":""]})]}),e.jsxs(pe,{variant:"outline",size:"sm",onClick:N,children:[e.jsx(ss,{})," Add task"]})]}),e.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:R.map((t,o)=>e.jsxs("div",{className:t.id===(p==null?void 0:p.id)?"flex items-center gap-2 rounded-lg border border-foreground/25 bg-muted/60 p-1":"flex items-center gap-2 rounded-lg border p-1",children:[e.jsxs("button",{type:"button",className:"min-w-0 flex-1 rounded-md px-2 py-1.5 text-left",onClick:()=>b(t.id),children:[e.jsxs("span",{className:"block truncate text-xs font-medium",children:[o+1,". ",t.title]}),e.jsxs("span",{className:"block text-[10px] text-muted-foreground",children:[t.autoSend?"Auto send":"Fill composer",t.workContext.length?" · Task context":"",t.webSearch?" · Web search":""]})]}),e.jsx(pe,{variant:"ghost",size:"icon-xs",disabled:c.length===1,"aria-label":`Remove ${t.title}`,onClick:()=>q(t.id),children:e.jsx(as,{})})]},t.id))})]}),p?e.jsxs("div",{className:"space-y-3 border-t pt-4",children:[e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("label",{className:"block space-y-2 text-xs font-medium",children:[e.jsx("span",{children:"Title"}),e.jsx(qe,{value:p.title,onChange:t=>g({title:t.target.value})})]}),e.jsxs("label",{className:"block space-y-2 text-xs font-medium",children:[e.jsx("span",{children:"Model"}),e.jsxs(Q,{value:p.model,onValueChange:t=>t&&g({model:t}),children:[e.jsx(Z,{className:"w-full",children:e.jsx(ee,{className:"min-w-0 overflow-hidden",children:e.jsx("span",{className:"block min-w-0 truncate",title:p.model==="default"?"Use employee default":((ae=Ie(l,p.model))==null?void 0:ae.label)??p.model,children:p.model==="default"?"Use employee default":((de=Ie(l,p.model))==null?void 0:de.label)??p.model})})}),e.jsxs(te,{children:[e.jsx(W,{value:"default",children:"Use employee default"}),e.jsx(ns,{}),e.jsx(rs,{models:l})]})]})]})]}),e.jsxs("label",{className:"block space-y-2 text-xs font-medium",children:[e.jsx("span",{children:"Default user message"}),e.jsx(Ge,{className:"min-h-16",value:p.userMessage,onChange:t=>g({userMessage:t.target.value})})]}),e.jsxs("label",{className:"flex items-center justify-between gap-4 rounded-lg border px-3 py-2.5 text-sm",children:[e.jsxs("span",{children:[e.jsx("span",{className:"block font-medium",children:"Auto send"}),e.jsx("span",{className:"block text-xs text-muted-foreground",children:"Otherwise the message is placed in the composer."})]}),e.jsx(He,{size:"sm",checked:p.autoSend,onCheckedChange:t=>g({autoSend:t})})]}),e.jsxs("div",{className:"space-y-3 rounded-lg border px-3 py-2.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-medium",children:"Work context"}),e.jsx("span",{className:"block text-xs text-muted-foreground",children:"Select a page context for this task. Without one, the task inherits its surrounding context."})]}),e.jsxs(pe,{variant:"outline",size:"sm",disabled:x===0,onClick:()=>P({onSelect:t=>g({workContext:[{type:t.type,id:t.id,title:t.title,kind:t.kind}]})}),children:[e.jsx(os,{})," Pick context"]})]}),p.workContext.map((t,o)=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted/50 px-2 py-1.5 text-xs",children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.title??t.id??t.type}),e.jsx(pe,{variant:"ghost",size:"icon-xs","aria-label":"Remove task context",onClick:()=>g({workContext:[]}),children:e.jsx(is,{})})]},`${t.type}:${t.id??o}`))]}),e.jsx(ys,{children:e.jsxs(ws,{value:"advanced-task-settings",className:"rounded-lg border px-3",children:[e.jsx(Cs,{className:"no-underline hover:no-underline",children:e.jsxs("span",{children:[e.jsx("span",{className:"block",children:"Advanced task settings"}),e.jsx("span",{className:"block text-xs font-normal text-muted-foreground",children:"Background, Web search, Skills, and Tools"})]})}),e.jsxs(Ns,{className:"space-y-4 pt-1",children:[e.jsxs("label",{className:"block space-y-2 text-xs font-medium",children:[e.jsx("span",{children:"Background"}),e.jsx(Ge,{className:"min-h-16",value:p.background,onChange:t=>g({background:t.target.value})})]}),e.jsxs("label",{className:"flex items-center justify-between gap-4 rounded-lg border px-3 py-2.5 text-sm",children:[e.jsxs("span",{children:[e.jsx("span",{className:"block font-medium",children:"Web search"}),e.jsx("span",{className:"block text-xs text-muted-foreground",children:"Subject to the selected LLM service capability."})]}),e.jsx(He,{size:"sm",checked:p.webSearch,onCheckedChange:t=>g({webSearch:t})})]}),e.jsx(et,{title:"Skills",mode:p.skillsMode,values:p.skills,options:$s,onModeChange:t=>g({skillsMode:t}),onToggle:(t,o)=>G("skills",t,o)}),e.jsx(et,{title:"Tools",mode:p.toolsMode,values:p.tools,options:Bs,onModeChange:t=>g({toolsMode:t}),onToggle:(t,o)=>G("tools",t,o)})]})]})})]}):null,e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-t pt-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium",children:d==="shortcut"?"Live shortcut preview":"Chat-bound task configuration"}),e.jsx("div",{className:"text-[11px] text-muted-foreground",children:d==="shortcut"?"Multiple tasks appear in the chat empty state after opening.":"Use the third scenario above to preview employee switching."})]}),d==="shortcut"?e.jsx(Pe,{aiEmployee:k,tasks:$,target:y==="embedded"?s:void 0,label:`Ask ${((ce=m.find(t=>t.username===k))==null?void 0:ce.nickname)??k}`,size:34}):null]})]})]}),e.jsx(ds,{title:d==="shortcut"?"Add an AI employee task shortcut":"Add employee tasks to a chat",description:d==="shortcut"?"The prompt includes every task, capability override, and target conversation.":"The prompt groups configured tasks by business AI employee and selected chat container.",prompt:K})]})]})}function et({title:s,mode:a,values:l,options:x,onModeChange:P,onToggle:m}){return e.jsxs("div",{className:"space-y-3 rounded-lg border p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",children:s}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Preset inherits the AI employee configuration."})]}),e.jsxs(Q,{value:a,onValueChange:h=>h&&P(h),children:[e.jsx(Z,{size:"sm",className:"w-28",children:e.jsx(ee,{children:a==="preset"?"Preset":"Custom"})}),e.jsxs(te,{children:[e.jsx(W,{value:"preset",children:"Preset"}),e.jsx(W,{value:"custom",children:"Custom"})]})]})]}),a==="custom"?e.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:x.map(h=>e.jsxs("label",{className:"flex items-center gap-2 rounded-md bg-muted/40 px-2.5 py-2 text-xs",children:[e.jsx(Ts,{checked:l.includes(h.value),onCheckedChange:d=>m(h.value,d)}),e.jsx("span",{children:h.label})]},h.value))}):null]})}export{Ks as ShortcutPage};
@@ -1 +0,0 @@
1
- import{b as s,ah as T,am as V,a7 as re,ar as ie,as as se,at as le,au as ce,ag as oe,aY as ue,a9 as fe,ax as pe,ay as he,al as be,az as ge,aA as me,ab as q,j as m,aB as ve,aC as ke,aD as ye,aE as xe,aF as we,c as Ee}from"./index-MB-jfQld.js";function Be(e,t,n,l=!0,i){const[f,p]=s.useState(),o=T(i?`${i}-label`:void 0),w=e??t??f;return V(()=>{const v=e||t||!l?void 0:Ce(n.current,o);f!==v&&p(v)}),w}function Ce(e,t){const n=Pe(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Pe(e){if(!e)return;const t=e.parentElement;if(t&&t.tagName==="LABEL")return t;const n=e.id;if(n){const i=e.nextElementSibling;if(i&&i.htmlFor===n)return i}const l=e.labels;return l&&l[0]}const H=s.createContext(void 0);function ze(){const e=s.useContext(H);if(e===void 0)throw new Error(re(63));return e}let N=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const O={...ie,checked(e){return e?{[N.checked]:""}:{[N.unchecked]:""}}},Le=s.forwardRef(function(t,n){const{checked:l,className:i,defaultChecked:f,"aria-labelledby":p,form:o,id:w,inputRef:v,name:C,nativeButton:k=!1,onCheckedChange:E,readOnly:h=!1,required:y=!1,disabled:W=!1,render:Fe,uncheckedValue:P,value:z,style:Ie,...Y}=t,{clearErrors:J}=se(),{state:L,setTouched:U,setDirty:_,validityData:$,setFilled:B,setFocused:R,validationMode:G,disabled:Q,name:X,validation:b}=le(),{labelId:Z}=ce(),d=Q||W,g=X??C,c=s.useRef(null),S=oe(c,v,b.inputRef),x=s.useRef(null),F=T(),I=ue({id:w,implicit:!1,controlRef:x}),K=k?void 0:I,[r,A]=fe({controlled:l,default:!!f,name:"Switch",state:"checked"});pe(x,F,r,void 0,!d,C),V(()=>{c.current&&B(c.current.checked)},[c,B]),he(r,()=>{J(g),_(r!==$.initialValue),B(r),b.change(r)});const{getButtonProps:D,buttonRef:ee}=be({disabled:d,native:k}),ae=Be(p,Z,c,!k,K),te={id:k?I:F,role:"switch","aria-checked":r,"aria-readonly":h||void 0,"aria-required":y||void 0,"aria-labelledby":ae,onFocus(){d||R(!0)},onBlur(){const a=c.current;!a||d||(U(!0),R(!1),G==="onBlur"&&b.commit(a.checked))},onClick(a){if(h||d)return;a.preventDefault();const u=c.current;u&&u.dispatchEvent(new(ve(u)).PointerEvent("click",{bubbles:!0,shiftKey:a.shiftKey,ctrlKey:a.ctrlKey,altKey:a.altKey,metaKey:a.metaKey}))}},ne=ge({checked:r,disabled:d,form:o,id:K,name:g,required:y,style:g?ke:ye,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:S,onChange(a){if(a.nativeEvent.defaultPrevented)return;if(h){a.preventDefault();return}const u=a.currentTarget.checked,M=xe(we,a.nativeEvent);E==null||E(u,M),!M.isCanceled&&A(u)},onFocus(){var a;(a=x.current)==null||a.focus()}},a=>b.getValidationProps(d,a),z!==void 0?{value:z}:me),j=s.useMemo(()=>({...L,checked:r,disabled:d,readOnly:h,required:y}),[L,r,d,h,y]),de=q("span",t,{state:j,ref:[n,x,ee],props:[te,Y,D,a=>b.getValidationProps(d,a)],stateAttributesMapping:O});return m.jsxs(H.Provider,{value:j,children:[de,!r&&g&&P!==void 0&&m.jsx("input",{type:"hidden",form:o,name:g,value:P,disabled:d}),m.jsx("input",{...ne,suppressHydrationWarning:!0})]})}),Re=s.forwardRef(function(t,n){const{render:l,className:i,style:f,...p}=t,o=ze();return q("span",t,{state:o,ref:n,stateAttributesMapping:O,props:p})});function je({className:e,size:t="default",...n}){return m.jsx(Le,{"data-slot":"switch","data-size":t,className:Ee("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...n,children:m.jsx(Re,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}export{je as S,Be as u};
@@ -1 +0,0 @@
1
- import{j as s,D as c,b8 as d,r as p,aT as x,aV as m,aW as g,b9 as u,ba as T,bb as j}from"./index-MB-jfQld.js";import{u as b}from"./use-wecom-sign-in-C9j8wfCD.js";function f(e){return typeof e=="string"?e.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim():""}function W({authenticator:e,onSignIn:i}){var a;const{signIn:o,isPending:t,error:n}=b(e),r=f((a=e.options)==null?void 0:a.btnTooltip),l=s.jsxs(c,{type:"button",variant:"outline",className:"w-full",disabled:!i&&t,onClick:i??o,children:[s.jsx(d,{}),!i&&t?"Redirecting…":p(e.title||e.authTypeTitle||"Sign in via WeCom")]});return s.jsxs("div",{className:"space-y-3",children:[n&&s.jsxs(x,{variant:"destructive",children:[s.jsx(m,{children:"WeCom sign-in failed"}),s.jsx(g,{children:n.message})]}),r?s.jsxs(u,{children:[s.jsx(T,{render:l}),s.jsx(j,{side:"right",className:"max-w-xs",children:r})]}):l]})}export{W as default};