@twentyfirstmedia/elements 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements.global.js +1 -1
- package/dist/elements.js +1 -1
- package/package.json +2 -2
package/dist/elements.global.js
CHANGED
|
@@ -27,7 +27,7 @@ ${Ta(i('[data-theme="system"]'),h," ")}}
|
|
|
27
27
|
`),n=String(e.after||"").split(`
|
|
28
28
|
`),a=[],l=0,i=0;for(;l<t.length||i<n.length;)t[l]===n[i]?(a.push([" ",t[l]]),l++,i++):i<n.length&&t.indexOf(n[i],l)<0?(a.push(["+",n[i]]),i++):l<t.length?(a.push(["-",t[l]]),l++):(a.push(["+",n[i]]),i++);return(0,C.jsxs)("div",{className:"tf-diff",children:[(0,C.jsxs)("div",{className:"tf-diff-head",children:[(0,C.jsxs)("div",{className:"tf-option-text",children:[(0,C.jsx)("b",{children:e.title}),(0,C.jsx)("small",{children:[e.versions,e.by].filter(Boolean).join(" \xB7 ")})]}),(0,C.jsxs)("span",{className:"tf-row",style:{flexWrap:"nowrap"},children:[e.onDiscard&&(0,C.jsx)(Q,{size:"sm",variant:"ghost",onClick:e.onDiscard,children:e.discardLabel||"Discard override"}),e.onPromote&&(0,C.jsx)(Q,{size:"sm",variant:"soft",icon:"branch",onClick:e.onPromote,children:e.promoteLabel||"Move to code"})]})]}),(0,C.jsx)("pre",{className:"tf-diff-body",children:a.map((c,s)=>(0,C.jsxs)("span",{className:c[0]==="+"?"add":c[0]==="-"?"del":"",children:[(0,C.jsx)("i",{children:c[0]}),c[1],`
|
|
29
29
|
`]},s))})]})}var qx={schedule:"clock",event:"zap",webhook:"link",mail:"mail"};function sv(e){return(0,C.jsx)("div",{className:"tf-triggers",children:(e.items||[]).map(t=>(0,C.jsxs)("div",{className:b("tf-trigger",t.enabled===!1&&"off"),children:[(0,C.jsx)(ie,{icon:qx[t.type]||"zap",tint:t.enabled===!1?"plain":"sky"}),(0,C.jsxs)("span",{className:"tf-option-text",children:[(0,C.jsx)("b",{children:t.rule}),(0,C.jsx)("small",{children:[t.agent,t.by].filter(Boolean).join(" \xB7 ")})]}),(0,C.jsx)("span",{className:"tf-trigger-next",children:t.next}),e.onToggle&&(0,C.jsx)("input",{type:"checkbox",role:"switch",className:"tf-switch",checked:t.enabled!==!1,"aria-label":typeof t.rule=="string"?t.rule:void 0,onChange:()=>{e.onToggle?.(t)}}),e.onRun&&(0,C.jsx)(Pe,{label:"Run now",children:(0,C.jsx)("button",{type:"button",className:"tf-iconbtn tf-iconbtn-soft tf-iconbtn-sm","aria-label":"Run now",onClick:()=>{e.onRun?.(t)},children:(0,C.jsx)(N,{name:"play"})})})]},t.id))})}function rv(e){let t=e.from!=null?e.from:6,n=e.to!=null?e.to:22,a=[];for(let c=t;c<n;c++)a.push(c);let l=e.days||$o(),i=32;return(0,C.jsxs)("div",{className:"tf-sched",style:{"--rows":a.length,"--row-h":i+"px"},children:[(0,C.jsx)("span",{}),l.map((c,s)=>(0,C.jsx)("span",{className:"tf-sched-day",children:c},s)),(0,C.jsx)("div",{className:"tf-sched-times",children:a.map(c=>(0,C.jsx)("span",{children:(c<10?"0":"")+c+":00"},c))}),l.map((c,s)=>(0,C.jsx)("div",{className:"tf-sched-col",children:(e.events||[]).filter(r=>r.day===s).map((r,o)=>{let u=(r.start-t)*i,h=Math.max(i/2,(r.end-r.start)*i-4);return(0,C.jsxs)("button",{type:"button",className:b("tf-sched-ev","tf-bg-"+(r.tint||"sky"),r.self&&"self"),style:{top:u,height:h},title:r.label,onClick:()=>{e.onOpen&&e.onOpen(r)},children:[(0,C.jsx)("b",{children:r.label}),h>30&&r.sub&&(0,C.jsx)("small",{children:r.sub})]},o)})},s))]})}function ov(e){function t(n){return(0,C.jsxs)("li",{children:[(0,C.jsxs)("div",{className:b("tf-org-node",n.root&&"root"),children:[n.avatar?(0,C.jsx)(qe,{name:n.name,size:32}):(0,C.jsx)(Gt,{tint:n.tint,size:32,live:n.status==="running"}),(0,C.jsxs)("span",{className:"tf-option-text",children:[(0,C.jsx)("b",{children:n.name}),(0,C.jsx)("small",{children:n.role})]}),n.status&&(0,C.jsx)(Re,{status:n.status})]}),n.children&&n.children.length>0&&(0,C.jsx)("ul",{children:n.children.map(t)})]},n.id||n.name)}return(0,C.jsx)("div",{className:"tf-org",children:(0,C.jsx)("ul",{children:t(Object.assign({root:!0},e.root))})})}function uv(e){let t=e.state||"listening",n=[];for(let a=0;a<24;a++)n.push(a);return(0,C.jsxs)("div",{className:b("tf-voice","is-"+t),children:[(0,C.jsx)(Gt,{tint:e.tint||"lilac",size:72,live:t!=="idle"}),(0,C.jsx)("b",{className:"tf-voice-name",children:e.name}),(0,C.jsx)("span",{className:"tf-voice-state",children:e.stateLabel||t==="listening"?"Listening\u2026":t==="thinking"?"Thinking\u2026":t==="speaking"?"Speaking\u2026":"Paused"}),(0,C.jsx)("div",{className:"tf-voice-wave","aria-hidden":!0,children:n.map(a=>(0,C.jsx)("i",{style:{animationDelay:a*47%600+"ms",height:t==="idle"?4:void 0}},a))}),e.transcript&&(0,C.jsx)("p",{className:"tf-voice-transcript",children:e.transcript}),(0,C.jsxs)("div",{className:"tf-row",style:{justifyContent:"center"},children:[e.onMute&&(0,C.jsx)($,{icon:e.muted?"x":"user",label:e.muted?"Unmute":"Mute",variant:"soft",size:"lg",onClick:e.onMute}),e.onEnd&&(0,C.jsx)("button",{type:"button",className:"tf-voice-end",onClick:e.onEnd,"aria-label":"End conversation",children:(0,C.jsx)(N,{name:"x",size:20})})]})]})}var ae=q(pe(),1),X4=q(re(),1);function fv(e){return(0,ae.jsx)("nav",{className:"tf-tabbar","aria-label":e.label||"Main",children:(e.items||[]).map(t=>{let n=t.id===e.active;return(0,ae.jsxs)("button",{type:"button",className:b("tf-tabbar-item",n&&"on"),"aria-current":n?"page":void 0,onClick:()=>{e.onPick&&e.onPick(t.id)},children:[(0,ae.jsxs)("span",{className:"tf-tabbar-ico",children:[(0,ae.jsx)(N,{name:t.icon,size:20}),t.count?(0,ae.jsx)("span",{className:"tf-dotcount",children:t.count}):null]}),(0,ae.jsx)("span",{children:t.label})]},t.id)})})}function dv(e){return(0,ae.jsxs)("div",{className:"tf-push",children:[(0,ae.jsxs)("div",{className:"tf-push-top",children:[(0,ae.jsx)("span",{className:"tf-push-app",children:e.app}),(0,ae.jsx)("small",{children:e.time})]}),(0,ae.jsx)("b",{children:e.title}),(0,ae.jsx)("p",{children:e.text}),e.actions&&(0,ae.jsx)("div",{className:"tf-push-actions",children:e.actions.map(t=>(0,ae.jsx)("button",{type:"button",onClick:t.onClick,children:t.label},t.label))})]})}function mv(e){let t={project:"grid",team:"users",agent:"bot",tool:"zap",trigger:"clock",file:"file"};return(0,ae.jsxs)("div",{className:"tf-prsum",children:[(0,ae.jsxs)("div",{className:"tf-prsum-head",children:[(0,ae.jsx)(ie,{icon:"branch",tint:"lilac"}),(0,ae.jsxs)("span",{className:"tf-option-text",children:[(0,ae.jsx)("b",{children:e.title}),(0,ae.jsx)("small",{children:e.meta})]}),e.status&&(0,ae.jsx)(Ue,{status:e.status,label:e.statusLabel})]}),e.summary&&(0,ae.jsx)("p",{className:"tf-card-desc",style:{margin:0,fontSize:14,lineHeight:"22px"},children:e.summary}),(0,ae.jsx)("ul",{className:"tf-prsum-list",children:(e.items||[]).map((n,a)=>(0,ae.jsxs)("li",{className:"op-"+(n.op||"add"),children:[(0,ae.jsx)("span",{className:"tf-prsum-op",children:n.op==="remove"?"\u2212":n.op==="change"?"~":"+"}),(0,ae.jsx)(N,{name:t[n.kind]||"file",size:14}),(0,ae.jsxs)("span",{className:"tf-option-text",children:[(0,ae.jsx)("b",{children:n.name}),n.detail&&(0,ae.jsx)("small",{children:n.detail})]})]},a))}),e.actions&&(0,ae.jsx)("div",{className:"tf-row",style:{justifyContent:"flex-end"},children:e.actions})]})}function hv(e){return(0,ae.jsx)("div",{className:"tf-modules",children:(e.items||[]).map(t=>(0,ae.jsxs)("div",{className:"tf-module",children:[(0,ae.jsx)(ie,{icon:t.icon||"grid",tint:t.core?"plain":t.enabled?"mint":"plain"}),(0,ae.jsxs)("span",{className:"tf-option-text",children:[(0,ae.jsxs)("b",{children:[t.name," ",(0,ae.jsx)("span",{className:"tf-mono tf-module-v",children:t.version})]}),(0,ae.jsx)("small",{children:t.text})]}),t.adds&&(0,ae.jsx)("span",{className:"tf-module-adds",children:t.adds.map(n=>(0,ae.jsx)(Oe,{tone:"neutral",dot:!1,children:n},n))}),t.core?(0,ae.jsx)(Pe,{label:e.coreLabel||"Core module, always on",children:(0,ae.jsx)("span",{className:"tf-module-lock",tabIndex:0,children:(0,ae.jsx)(N,{name:"lock",size:14})})}):(0,ae.jsx)("input",{type:"checkbox",role:"switch",className:"tf-switch",checked:!!t.enabled,"aria-label":t.name,onChange:()=>{e.onToggle&&e.onToggle(t)}})]},t.id))})}var ee=q(pe(),1),oc=q(re(),1);var vv={money:["card","Money"],infra:["server","Infrastructure"],comms:["mail","Communication"],marketing:["trend","Marketing"],apps:["code","Own apps"],legal:["book","Legal"]};function gv(e){let t=e.options||[{key:"A",label:e.approveLabel||"Yes, run it as shown"},{key:"B",label:"Yes, with a change",input:"What should change?"},{key:"C",label:"No, discard"},{key:"D",label:"Different instruction",input:"What should happen instead?"}],n=oc.useState(null),a=oc.useState(""),l=oc.useRef(null),i=e.decision||(e.state==="approved"?{key:"A"}:e.state==="denied"?{key:"C"}:null);function c(o){if(o.input&&n[0]!==o.key){n[1](o.key),a[1]("");return}o.input&&!a[0].trim()||(e.onDecide&&e.onDecide(o.key,o.input?a[0].trim():void 0),o.key==="A"&&e.onApprove&&e.onApprove(),o.key==="C"&&e.onDeny&&e.onDeny(),o.key==="B"&&e.onEdit&&e.onEdit(a[0]),n[1](null))}function s(o){let u=o.target.tagName;if(i||u==="TEXTAREA"||u==="INPUT")return;let h=t.find(f=>f.key===o.key.toUpperCase());h&&(o.preventDefault(),c(h))}let r=e.family?vv[e.family]:void 0;if(i){let o=t.find(u=>u.key===i.key)||{key:i.key,label:""};return(0,ee.jsxs)("div",{className:b("tf-approval tf-approval-done",i.key==="A"||i.key==="B"?"yes":"no",e.className),children:[(0,ee.jsx)(Re,{status:i.key==="A"||i.key==="B"?"ok":"idle"}),(0,ee.jsx)("b",{children:o.key+" \xB7 "+o.label}),e.title&&(0,ee.jsx)("span",{className:"tf-approval-done-what",children:e.title}),(0,ee.jsx)("span",{className:"tf-approval-done-by",children:[i.by,i.at].filter(Boolean).join(" \xB7 ")}),i.text&&(0,ee.jsx)("span",{className:"tf-approval-done-note",children:"\u201C"+i.text+"\u201D"})]})}return(0,ee.jsxs)("div",{ref:l,className:b("tf-approval",e.compact&&"compact",e.className),tabIndex:0,onKeyDown:s,role:"group","aria-label":typeof e.title=="string"?e.title:void 0,children:[(0,ee.jsxs)("div",{className:"tf-approval-top",children:[(0,ee.jsx)(Re,{status:"signal"}),(0,ee.jsx)("b",{children:e.heading||"Approval needed"}),(e.agent||e.project)&&(0,ee.jsx)("span",{className:"tf-approval-who",children:[e.agent,e.project].filter(Boolean).join(" \xB7 ")}),r&&(0,ee.jsxs)(Oe,{tone:"neutral",dot:!1,className:"tf-family",children:[(0,ee.jsx)(N,{name:r[0],size:12}),e.familyLabel||r[1]]}),e.age&&(0,ee.jsx)("span",{className:"tf-approval-age",children:e.age})]}),(0,ee.jsxs)("div",{className:"tf-approval-main",children:[e.title&&(0,ee.jsx)("p",{className:"tf-approval-title",children:e.title}),e.text&&(0,ee.jsx)("p",{className:"tf-approval-reason",children:e.text}),e.children&&(0,ee.jsx)("div",{className:"tf-approval-body",children:e.children})]}),(0,ee.jsx)("div",{className:"tf-approval-opts",role:"list",children:t.map((o,u)=>(0,ee.jsxs)("div",{role:"listitem",children:[(0,ee.jsxs)("button",{type:"button",className:b("tf-approval-opt",u===0&&"primary",n[0]===o.key&&"open"),onClick:()=>{c(o)},"aria-keyshortcuts":o.key,children:[(0,ee.jsx)("kbd",{children:o.key}),(0,ee.jsx)("span",{children:o.label}),o.input&&n[0]!==o.key&&(0,ee.jsx)(N,{name:"chevronRight",size:14})]}),o.input&&n[0]===o.key&&(0,ee.jsxs)("div",{className:"tf-approval-input tf-in",children:[(0,ee.jsx)("textarea",{className:"tf-input",rows:2,autoFocus:!0,placeholder:o.placeholder||(typeof o.input=="string"?o.input:void 0),value:a[0],onChange:h=>{a[1](h.target.value)},onKeyDown:h=>{h.key==="Enter"&&(h.metaKey||h.ctrlKey)&&c(o),h.key==="Escape"&&n[1](null)}}),(0,ee.jsxs)("div",{className:"tf-row",style:{justifyContent:"flex-end"},children:[(0,ee.jsx)(Q,{size:"sm",variant:"ghost",onClick:()=>{n[1](null)},children:"Cancel"}),(0,ee.jsx)(Q,{size:"sm",disabled:!a[0].trim(),onClick:()=>{c(o)},children:o.key+" \xB7 Send"})]})]})]},o.key))}),(e.escalation||e.trace||e.note)&&(0,ee.jsxs)("div",{className:"tf-approval-foot",children:[e.escalation&&(0,ee.jsxs)("span",{children:[(0,ee.jsx)(N,{name:"clock",size:13}),e.escalation]}),e.note&&(0,ee.jsx)("span",{children:e.note}),e.trace&&(0,ee.jsx)("span",{className:"tf-approval-trace",children:e.trace})]})]})}function bv(e){let t=(e.items||[]).slice().sort((n,a)=>(a.ageMin||0)-(n.ageMin||0));return(0,ee.jsx)("div",{className:"tf-inbox",role:"listbox","aria-label":e.label||"Approvals",onKeyDown:n=>{let a=t.findIndex(l=>l.id===e.selected);if(n.key==="j"||n.key==="ArrowDown"){n.preventDefault();let l=t[Math.min(t.length-1,a+1)];l&&e.onSelect&&e.onSelect(l.id)}if(n.key==="k"||n.key==="ArrowUp"){n.preventDefault();let l=t[Math.max(0,a-1)];l&&e.onSelect&&e.onSelect(l.id)}},children:t.length===0?(0,ee.jsx)($l,{icon:"check",tint:"mint",title:e.emptyTitle||"Nothing waiting for you",text:e.emptyText}):t.map(n=>{let a=n.family?vv[n.family]:void 0;return(0,ee.jsxs)("button",{type:"button",role:"option","aria-selected":n.id===e.selected,className:b("tf-inbox-row",n.id===e.selected&&"on"),onClick:()=>{e.onSelect&&e.onSelect(n.id)},children:[(0,ee.jsx)(Re,{status:"signal"}),(0,ee.jsxs)("span",{className:"tf-inbox-text",children:[(0,ee.jsx)("b",{children:n.title}),(0,ee.jsx)("small",{children:[n.agent,n.project].filter(Boolean).join(" \xB7 ")})]}),a&&(0,ee.jsxs)(Oe,{tone:"neutral",dot:!1,className:"tf-family",children:[(0,ee.jsx)(N,{name:a[0],size:12}),n.familyLabel||a[1]]}),(0,ee.jsxs)("span",{className:b("tf-inbox-age",n.urgent&&"warn"),children:[n.urgent&&(0,ee.jsx)(Re,{status:"warn"}),n.age]})]},n.id)})})}var K=q(pe(),1),_a=q(re(),1);function yv(e){let t=e.value||{},n=Object.keys(t).filter(i=>t[i]!=null&&t[i]!=="");function a(i,c){let s=Object.assign({},t);c==null?delete s[i]:s[i]=c,e.onChange?.(s)}let l=(e.filters||[]).filter(i=>n.indexOf(i.key)<0);return(0,K.jsxs)("div",{className:"tf-filterbar",children:[e.search&&(0,K.jsx)(Mn,{placeholder:e.search,value:e.query,onChange:i=>{e.onQuery?.(i.target.value)},style:{minWidth:0,flex:"1 1 220px",maxWidth:320}}),n.map(i=>{let c=(e.filters||[]).find(s=>s.key===i)||{key:i,label:i,options:[]};return(0,K.jsx)(Be,{width:220,flush:!0,trigger:s=>(0,K.jsxs)("span",{className:"tf-filterchip",children:[(0,K.jsxs)("button",{type:"button",onClick:s.toggle,children:[(0,K.jsx)("span",{children:c.label+":"}),(0,K.jsx)("b",{children:t[i]})]}),(0,K.jsx)("button",{type:"button",className:"x","aria-label":`Remove filter ${c.label}`,onClick:()=>{a(i,null)},children:(0,K.jsx)(N,{name:"x",size:12})})]}),children:s=>(0,K.jsx)(At,{items:c.options.map(r=>({label:r,icon:r===t[i]?"check":void 0,onClick:()=>{a(i,r),s.close()}}))})},i)}),l.length>0&&(0,K.jsx)(Be,{width:240,flush:!0,trigger:i=>(0,K.jsxs)("button",{type:"button",className:"tf-chip tf-chip-dashed",onClick:i.toggle,children:[(0,K.jsx)(N,{name:"plus",size:14}),"Filter"]}),children:i=>(0,K.jsx)(Vx,{avail:l,onPick:(c,s)=>{a(c,s),i.close()}})}),n.length>1&&(0,K.jsx)("button",{type:"button",className:"tf-linkbtn",onClick:()=>{e.onChange?.({})},children:"Clear all"}),e.right&&(0,K.jsx)("div",{className:"tf-filterbar-right",children:e.right})]})}function Vx(e){let t=_a.useState(null),n=t[0];return n?(0,K.jsx)(At,{items:[{label:"Back",icon:"chevronLeft",onClick:()=>{t[1](null)}},"-",...n.options.map(a=>({label:a,onClick:()=>{e.onPick?.(n.key,a)}}))]}):(0,K.jsx)(At,{items:e.avail.map(a=>({label:a.label,icon:a.icon||"filter",onClick:()=>{t[1](a)}}))})}function uc(e){let t=e.columns||[],n=e.rowKey||"id",a=_a.useState(e.defaultSort||null),l=_a.useState([]),i=_a.useState(t.filter(v=>v.hidden).map(v=>v.key)),c=_a.useState({}),s=a[0],r=(e.rows||[]).slice();if(s){let v=t.find(_=>_.key===s.key),g=s.dir==="desc"?-1:1,S=v&&v.sortValue||(_=>_[s.key]);r.sort((_,X)=>{let A=S(_),H=S(X);return(A>H?1:A<H?-1:0)*g})}let o=t.filter(v=>i[0].indexOf(v.key)<0),u=r.map(v=>v[n]),h=l[0].filter(v=>u.indexOf(v)>=0),f=u.length>0&&h.length===u.length,m=h.length>0&&!f;function p(v){l[1](h.indexOf(v)>=0?h.filter(g=>g!==v):h.concat([v]))}function M(v,g,S,_){return(0,K.jsxs)("span",{className:"tf-checkbox",children:[(0,K.jsx)("input",{type:"checkbox",checked:v,onChange:g,"aria-label":S,ref:X=>{X&&(X.indeterminate=!!_)}}),(0,K.jsx)("span",{className:b("tf-checkbox-box",_&&"ind"),"aria-hidden":!0,children:(0,K.jsx)("svg",{viewBox:"0 0 24 24",width:14,height:14,fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",children:(0,K.jsx)("path",{d:_?"M6 12h12":"M5 12.5l4.5 4.5L19 7.5"})})})]})}let E=o.length+(e.selectable?1:0)+(e.renderExpanded?1:0),y=r.filter(v=>h.indexOf(v[n])>=0);return(0,K.jsxs)("div",{className:b("tf-dt",e.className),children:[(e.toolbar||e.columnToggle!==!1)&&(0,K.jsxs)("div",{className:"tf-dt-toolbar",children:[e.toolbar,e.columnToggle!==!1&&(0,K.jsx)(Be,{align:"end",width:220,flush:!0,trigger:v=>(0,K.jsx)(Pe,{label:"Columns",children:(0,K.jsx)("button",{type:"button",className:"tf-iconbtn tf-iconbtn-soft","aria-label":"Choose columns",onClick:v.toggle,children:(0,K.jsx)(N,{name:"grid"})})}),children:(0,K.jsxs)("div",{className:"tf-menu tf-menu-static",children:[(0,K.jsx)("div",{className:"tf-menu-label",children:"Columns"}),t.filter(v=>v.hideable!==!1&&v.label).map(v=>{let g=i[0].indexOf(v.key)<0;return(0,K.jsxs)("label",{className:"tf-menu-item",children:[M(g,()=>{i[1](g?i[0].concat([v.key]):i[0].filter(S=>S!==v.key))},typeof v.label=="string"?v.label:v.key),v.label]},v.key)})]})})]}),(0,K.jsx)("div",{className:b("tf-dt-scroll",e.stickyHeader&&"sticky"),style:e.maxHeight?{maxHeight:e.maxHeight}:void 0,children:(0,K.jsxs)("table",{className:"tf-table tf-dt-table",children:[(0,K.jsx)("thead",{children:(0,K.jsxs)("tr",{children:[e.selectable&&(0,K.jsx)("th",{className:"tf-dt-sel",children:M(f,()=>{l[1](f?[]:u)},"Select all rows",m)}),e.renderExpanded&&(0,K.jsx)("th",{className:"tf-dt-exp","aria-label":"Expand"}),o.map(v=>{let g=a[0]&&a[0].key===v.key?a[0].dir:null;return(0,K.jsx)("th",{className:b(v.align==="right"&&"tf-num"),style:v.width?{width:v.width}:void 0,"aria-sort":g?g==="asc"?"ascending":"descending":void 0,children:v.sortable?(0,K.jsxs)("button",{type:"button",className:b("tf-dt-sort",g&&"on"),onClick:()=>{a[1](g==="asc"?{key:v.key,dir:"desc"}:g==="desc"?null:{key:v.key,dir:"asc"})},children:[v.label,(0,K.jsx)(N,{name:"chevronDown",size:12,className:b("tf-dt-arrow",g==="asc"&&"up",!g&&"idle")})]}):v.label},v.key)})]})}),(0,K.jsx)("tbody",{children:r.length===0?(0,K.jsx)("tr",{children:(0,K.jsx)("td",{colSpan:E,className:"tf-dt-empty",children:e.empty||"Nothing matches these filters."})}):r.map(v=>{let g=v[n],S=h.indexOf(g)>=0,_=!!c[0][String(g)];return(0,K.jsxs)(_a.Fragment,{children:[(0,K.jsxs)("tr",{className:b(S&&"selected",_&&"expanded"),children:[e.selectable&&(0,K.jsx)("td",{className:"tf-dt-sel",children:M(S,()=>{p(g)},"Select row")}),e.renderExpanded&&(0,K.jsx)("td",{className:"tf-dt-exp",children:(0,K.jsx)("button",{type:"button",className:b("tf-dt-toggle",_&&"open"),"aria-expanded":_,"aria-label":_?"Collapse row":"Expand row",onClick:()=>{let X=Object.assign({},c[0]);X[String(g)]=!_,c[1](X)},children:(0,K.jsx)(N,{name:"chevronRight",size:14})})}),o.map(X=>(0,K.jsx)("td",{className:X.align==="right"?"tf-num":void 0,children:X.render?X.render(v):v[X.key]},X.key))]}),_&&(0,K.jsx)("tr",{className:"tf-dt-detail",children:(0,K.jsx)("td",{colSpan:E,children:(0,K.jsx)("div",{className:"tf-dt-detail-in tf-in",children:e.renderExpanded?.(v)})})})]},g)})})]})}),e.selectable&&h.length>0&&(0,K.jsxs)("div",{className:"tf-bulkbar",role:"toolbar","aria-label":"Bulk actions",children:[(0,K.jsx)("b",{children:`${h.length} selected`}),(0,K.jsx)("button",{type:"button",className:"tf-linkbtn on-frame",onClick:()=>{l[1]([])},children:"Clear"}),(0,K.jsx)("div",{className:"tf-bulkbar-actions",children:(e.bulkActions||[]).map(v=>(0,K.jsxs)("button",{type:"button",className:b("tf-bulk-btn",v.danger&&"danger"),onClick:()=>{v.onClick(y,()=>{l[1]([])})},children:[v.icon&&(0,K.jsx)(N,{name:v.icon,size:14}),v.label]},v.label))})]})]})}var Ve=q(pe(),1),Pt=q(re(),1);var Yx=e=>typeof e=="string"?{value:e,label:e}:e;function pv(e){let t=xe("sel"),n=e.id||t,a=aa(e.name),l=e.error||a,i=(e.options||[]).map(Yx),c=J(e.value,e.defaultValue??"",e.onChange),[s,r]=Pt.useState(!1),[o,u]=Pt.useState(-1),h=Pt.useRef(null),f=Pt.useRef(null),m=Pt.useRef(null),p=Pt.useRef({s:"",t:0}),M=i.find(A=>A.value===c[0]),E=i.map((A,H)=>A.disabled?-1:H).filter(A=>A>=0),y=A=>{u(A??Math.max(0,i.indexOf(M))),r(!0)},v=(A=!0)=>{r(!1),A&&h.current?.focus()},g=A=>{let H=i[A];!H||H.disabled||(c[1](H.value),v(),requestAnimationFrame(()=>m.current?.dispatchEvent(new Event("change",{bubbles:!0}))))},S=A=>{let H=E.indexOf(o),ue=E[Math.min(E.length-1,Math.max(0,H+A))];ue!=null&&u(ue)},_=A=>{let H=Date.now();p.current={s:(H-p.current.t<600?p.current.s:"")+A,t:H};let ue=p.current.s.toLowerCase();return i.findIndex(W=>!W.disabled&&W.label.toLowerCase().startsWith(ue))};Pt.useEffect(()=>{s&&f.current?.focus()},[s]),Pt.useEffect(()=>{!s||o<0||f.current?.querySelector(`#${CSS.escape(`${t}-o${o}`)}`)?.scrollIntoView({block:"nearest"})},[s,o,t]);let X=[];return i.forEach((A,H)=>{let ue=X[X.length-1];ue&&ue[0]===A.group?ue[1].push(H):X.push([A.group,[H]])}),(0,Ve.jsxs)("div",{className:b("tf-field",e.className),style:e.style,children:[e.label&&(0,Ve.jsxs)("label",{className:"tf-field-label",htmlFor:n,id:`${n}-label`,children:[e.label,e.required&&(0,Ve.jsx)("span",{className:"tf-req","aria-hidden":!0,children:" *"})]}),(0,Ve.jsx)(Be,{block:!0,open:s,onOpenChange:A=>A?y():v(!1),role:"presentation",flush:!0,trigger:()=>(0,Ve.jsxs)("button",{ref:h,id:n,type:"button",className:b("tf-input","tf-selectmenu",!M&&"empty"),role:"combobox","aria-haspopup":"listbox","aria-expanded":s,"aria-controls":`${t}-list`,"aria-invalid":l?"true":void 0,"aria-describedby":l||e.hint?`${n}-msg`:void 0,disabled:e.disabled,onClick:()=>s?v():y(),onKeyDown:A=>{if(["ArrowDown","ArrowUp","Enter"," "].includes(A.key))A.preventDefault(),y();else if(A.key.length===1&&/\S/.test(A.key)){let H=_(A.key);H>=0&&c[1](i[H]?.value)}},children:[M?.icon&&(0,Ve.jsx)(N,{name:M.icon,size:15}),(0,Ve.jsx)("span",{className:"tf-selectmenu-value",children:M?M.label:e.placeholder||"Select\u2026"}),(0,Ve.jsx)(N,{name:"chevronDown",size:16,className:"tf-selectmenu-chev"})]}),children:(0,Ve.jsx)("div",{ref:f,id:`${t}-list`,className:"tf-selectmenu-list",role:"listbox",tabIndex:-1,"aria-labelledby":e.label?`${n}-label`:void 0,"aria-label":e.label?void 0:e.placeholder||"Options","aria-activedescendant":o>=0?`${t}-o${o}`:void 0,onKeyDown:A=>{let ue={ArrowDown:()=>S(1),ArrowUp:()=>S(-1),Home:()=>u(E[0]??-1),End:()=>u(E[E.length-1]??-1),Enter:()=>g(o)," ":()=>g(o),Escape:()=>v()}[A.key];if(ue)A.preventDefault(),ue();else if(A.key==="Tab")v(!1);else if(A.key.length===1&&/\S/.test(A.key)){let W=_(A.key);W>=0&&u(W)}},children:X.map(([A,H],ue)=>{let W=H.map(Et=>{let It=i[Et],ds=It.value===c[0];return(0,Ve.jsxs)("div",{id:`${t}-o${Et}`,role:"option","aria-selected":ds,"aria-disabled":It.disabled||void 0,className:b("tf-selectmenu-opt",Et===o&&"active"),onPointerMove:()=>!It.disabled&&u(Et),onClick:()=>g(Et),children:[It.icon&&(0,Ve.jsx)(N,{name:It.icon,size:15}),(0,Ve.jsxs)("span",{className:"tf-option-text",children:[(0,Ve.jsx)("b",{children:It.label}),It.hint&&(0,Ve.jsx)("small",{children:It.hint})]}),ds&&(0,Ve.jsx)(N,{name:"check",size:15,className:"tf-selectmenu-check"})]},It.value)});return A?(0,Ve.jsxs)("div",{role:"group","aria-labelledby":`${t}-g${ue}`,children:[(0,Ve.jsx)("div",{id:`${t}-g${ue}`,className:"tf-menu-label",role:"presentation",children:A}),W]},A+ue):(0,Ve.jsx)(Pt.Fragment,{children:W},"g"+ue)})})}),(0,Ve.jsx)("input",{ref:m,type:"hidden",name:e.name,value:c[0]}),l?(0,Ve.jsxs)("span",{id:`${n}-msg`,className:"tf-field-error",role:"alert",children:[(0,Ve.jsx)(N,{name:"x",size:12}),l]}):e.hint&&(0,Ve.jsx)("span",{id:`${n}-msg`,className:"tf-field-hint",children:e.hint})]})}var G=q(pe(),1),ru=q(re(),1);var x=q(pe(),1),ia=q(re(),1);function Cv(e){return(0,x.jsxs)("nav",{className:"tf-subnav","aria-label":`${e.eyebrow||"Section"} pages`,children:[(0,x.jsxs)("div",{className:"tf-subnav-head",children:[e.eyebrow&&(0,x.jsx)("span",{className:"tf-subnav-eyebrow",children:e.eyebrow}),e.action&&(0,x.jsxs)("button",{type:"button",className:"tf-subnav-action",onClick:e.action.onClick,children:[(0,x.jsx)(N,{name:e.action.icon||"plus",size:15}),(0,x.jsx)("span",{children:e.action.label})]})]}),(0,x.jsx)("div",{className:"tf-subnav-list",children:(e.items||[]).map(t=>{let n=t.id||t.label;return(0,x.jsxs)("button",{type:"button",className:"tf-subnav-item","aria-current":e.current===n?"page":void 0,title:t.label,onClick:()=>{e.onPick&&e.onPick(n)},children:[(0,x.jsx)(N,{name:t.icon,size:17}),(0,x.jsx)("span",{className:"tf-subnav-label",children:t.label}),t.count?(0,x.jsx)("span",{className:"tf-subnav-count",children:t.count}):null]},n)})}),e.children]})}function Xs(e){let t=ia.useRef(null),n=yt(e.open??!0);return dl(t,e.onClose),n.mounted?(0,x.jsx)("div",{...ot(n.closing),className:b("tf-drawer-wrap",e.inline&&"inline"),onMouseDown:a=>{a.target===a.currentTarget&&e.onClose&&e.onClose?.()},children:(0,x.jsxs)("aside",{ref:t,className:b("tf-drawer",e.side&&e.side!=="right"&&"side-"+e.side),role:"dialog","aria-modal":"true","aria-label":e.title,style:e.width?{width:e.width}:void 0,children:[(0,x.jsxs)("div",{className:"tf-header",style:{alignItems:"center"},children:[(0,x.jsxs)("div",{className:"tf-row",style:{flexWrap:"nowrap",minWidth:0},children:[e.avatar&&(0,x.jsx)(qe,{name:e.avatar,size:44}),(0,x.jsxs)("div",{style:{minWidth:0},children:[(0,x.jsx)("div",{className:"tf-panel-title",children:e.title}),e.subtitle&&(0,x.jsx)("div",{className:"tf-panel-sub",children:e.subtitle})]})]}),(0,x.jsx)($,{icon:"x",label:"Close",onClick:e.onClose})]}),e.children]})}):null}function Sv(e){let t=ia.useState(""),n=ia.useState(0),a=ia.useRef(null),l=yt(e.open??!0);dl(a,e.onClose);let i=t[0].toLowerCase().trim(),c=e.items||[],s=(i?c.filter(f=>i.split(/\s+/).every(m=>(f.label+" "+(f.hint||"")+" "+(f.group||"")).toLowerCase().indexOf(m)>-1)):c.filter(f=>!f.searchOnly)).slice(0,40),r=Math.min(n[0],Math.max(0,s.length-1));function o(f){e.onClose&&e.onClose?.(),f&&f.run&&f.run()}function u(f){f.key==="ArrowDown"?(f.preventDefault(),n[1](Math.min(s.length-1,r+1))):f.key==="ArrowUp"?(f.preventDefault(),n[1](Math.max(0,r-1))):f.key==="Enter"&&(f.preventDefault(),o(s[r]))}let h=[];return s.forEach((f,m)=>{let p=f.group||"Results";(!h.length||h[h.length-1].g!==p)&&h.push({g:p,items:[]}),h[h.length-1].items.push([f,m])}),l.mounted?(0,x.jsx)("div",{...ot(l.closing),className:b("tf-palette-wrap",e.inline&&"inline"),onMouseDown:f=>{f.target===f.currentTarget&&e.onClose&&e.onClose?.()},children:(0,x.jsxs)("div",{ref:a,className:"tf-palette",role:"dialog","aria-modal":"true","aria-label":"Command palette",children:[(0,x.jsxs)("div",{className:"tf-palette-input",children:[(0,x.jsx)(N,{name:"search",size:18}),(0,x.jsx)("input",{placeholder:e.placeholder||"Search pages, actions and records\u2026","aria-label":"Search",value:t[0],onChange:f=>{t[1](f.target.value),n[1](0),e.onQueryChange?.(f.target.value)},onKeyDown:u}),(0,x.jsx)("kbd",{children:"Esc"})]}),(0,x.jsxs)("div",{className:"tf-palette-list",role:"listbox","aria-label":"Results",children:[e.loading&&(0,x.jsxs)("div",{className:"tf-palette-empty",role:"status",children:[(0,x.jsx)(Vs,{})," Searching\u2026"]}),s.length?h.map(f=>(0,x.jsxs)("div",{children:[(0,x.jsx)("div",{className:"tf-palette-group",children:f.g}),f.items.map(m=>{let p=m[0],M=m[1];return(0,x.jsxs)("button",{type:"button",role:"option","aria-selected":M===r?"true":"false",className:"tf-palette-item",onMouseMove:()=>{M!==r&&n[1](M)},onClick:()=>{o(p)},children:[(0,x.jsx)(ie,{icon:p.icon||"search",tint:p.tint||"plain"}),(0,x.jsxs)("span",{className:"tf-palette-label",children:[(0,x.jsx)("b",{children:p.label}),p.hint&&(0,x.jsx)("span",{children:p.hint})]}),M===r&&(0,x.jsx)("kbd",{children:"\u21B5"})]},p.id||p.label)})]},f.g)):e.loading?null:(0,x.jsx)("div",{className:"tf-palette-empty",children:e.empty??`Nothing matches \u201C${t[0]}\u201D.`})]}),(0,x.jsxs)("div",{className:"tf-palette-foot",children:[(0,x.jsxs)("span",{children:[(0,x.jsx)("kbd",{children:"\u2191"}),(0,x.jsx)("kbd",{children:"\u2193"})," ","move"]}),(0,x.jsxs)("span",{children:[(0,x.jsx)("kbd",{children:"\u21B5"})," ","open"]}),(0,x.jsxs)("span",{children:[(0,x.jsx)("kbd",{children:"\u2318"}),(0,x.jsx)("kbd",{children:"K"})," anywhere"]})]})]})}):null}function Tv(e){let t=ia.useState("All"),n=(e.items||[]).filter(a=>t[0]==="All"||a.unread);return(0,x.jsxs)("div",{className:"tf-notes",role:"region","aria-label":"Notifications",children:[(0,x.jsxs)("div",{className:"tf-header",style:{alignItems:"center",padding:"6px 8px 0"},children:[(0,x.jsx)("b",{style:{fontSize:16},children:"Notifications"}),(0,x.jsx)(Q,{variant:"ghost",size:"sm",icon:"check",disabled:!(e.items||[]).some(a=>a.unread),onClick:e.onReadAll,children:"Mark all read"})]}),(0,x.jsx)("div",{style:{padding:"0 8px"},children:(0,x.jsx)(Os,{block:!0,items:["All","Unread"],value:t[0],onChange:t[1]})}),(0,x.jsx)("div",{className:"tf-notes-list",children:n.length?n.map(a=>(0,x.jsxs)("button",{type:"button",className:b("tf-note",a.unread&&"unread"),onClick:()=>{e.onOpen&&e.onOpen(a)},children:[(0,x.jsx)(ie,{icon:a.icon,tint:a.tint}),(0,x.jsxs)("span",{className:"tf-note-text",children:[(0,x.jsx)("b",{children:a.title}),(0,x.jsx)("span",{children:a.text})]}),(0,x.jsxs)("span",{className:"tf-note-time",children:[a.time,a.unread&&(0,x.jsx)("span",{className:"tf-unread"})]})]},a.id)):(0,x.jsxs)("div",{className:"tf-notes-empty",children:[(0,x.jsx)(ie,{icon:"check",tint:"mint",size:40}),(0,x.jsx)("b",{children:"You are all caught up"})]})})]})}var Gx=()=>({trigger:["zap","sky","When"],condition:["filter","blush","If"],agent:["bot","lilac","Agent"],approval:["user","butter","Approval"],action:["send","mint","Then"]});function Mv(e){return(0,x.jsx)("ol",{className:"tf-flow tf-stagger",style:{"--base":"120ms"},children:(e.steps||[]).map((t,n)=>{let a=Gx(),l=a[t.kind]||a.action,i=n<(e.active==null?-1:e.active)?"done":n===e.active?e.waiting?"wait":"active":"";return(0,x.jsxs)("li",{className:b("tf-flow-node",i),children:[(0,x.jsx)("span",{className:"tf-flow-icon tf-t-"+l[1],children:(0,x.jsx)(N,{name:i==="done"?"check":l[0],size:16})}),(0,x.jsxs)("div",{className:"tf-flow-card",children:[(0,x.jsxs)("div",{className:"tf-flow-kind",children:[l[2],i==="active"&&(0,x.jsx)("span",{className:"tf-flow-live",children:"running"}),i==="wait"&&(0,x.jsx)("span",{className:"tf-flow-live wait",children:"waiting for you"})]}),(0,x.jsx)("div",{className:"tf-flow-text",children:t.text}),i==="wait"&&e.onApprove&&(0,x.jsxs)("div",{className:"tf-row",style:{marginTop:8},children:[(0,x.jsx)(Q,{size:"sm",icon:"check",onClick:e.onApprove,children:"Approve"}),e.onReject&&(0,x.jsx)(Q,{size:"sm",variant:"ghost",onClick:e.onReject,children:"Reject"})]})]}),e.tools&&i===""?(0,x.jsx)("div",{className:"tf-flow-tools",children:e.tools(t,n)}):null]},n)})})}var Nv={pdf:["file","blush"],doc:["book","sky"],sheet:["chart","mint"],fig:["sparkle","lilac"],img:["eye","butter"],zip:["folder","butter"]};function su(e){let t=e.kind,n=e.big;return t==="sheet"?(0,x.jsx)("span",{className:"tf-t-sheet",children:Array.from({length:n?7:4},(a,l)=>(0,x.jsx)("span",{children:Array.from({length:4},(i,c)=>(0,x.jsx)("i",{style:{opacity:l===0?1:.55}},c))},l))}):t==="img"||t==="fig"?(0,x.jsxs)("span",{className:b("tf-t-art",t==="fig"&&"fig"),children:[(0,x.jsx)("i",{}),(0,x.jsx)("i",{}),(0,x.jsx)("i",{})]}):t==="zip"?(0,x.jsx)("span",{className:"tf-t-zip",children:(e.entries||["logo.svg","colors.json","fonts/"]).map(a=>(0,x.jsxs)("span",{children:[(0,x.jsx)(N,{name:"file",size:11}),a]},a))}):(0,x.jsxs)("span",{className:"tf-t-doc",children:[(0,x.jsx)("b",{children:(e.title||"").replace(/\.[^.]+$/,"")}),Array.from({length:n?9:4},(a,l)=>(0,x.jsx)("i",{style:{width:60+l*37%40+"%"}},l))]})}function Ev(e){let t=Nv[e.kind]||Nv.doc;return(0,x.jsxs)("button",{type:"button",className:"tf-filecard",onClick:e.onClick,children:[(0,x.jsx)("span",{className:"tf-thumb tf-bg-"+t[1],children:(0,x.jsx)(su,{kind:e.kind,title:e.name})}),(0,x.jsx)("span",{className:"tf-filecard-name",children:e.name}),(0,x.jsxs)("span",{className:"tf-filecard-meta",children:[[e.size,e.meta].filter(Boolean).join(" \xB7 "),e.shared&&(0,x.jsx)(N,{name:"users",size:12,label:"Shared"})]})]})}function kv(e){let t=e.steps||[],n=e.current||0,a=e.done||{};return(0,x.jsxs)("div",{className:"tf-wizard",role:"group","aria-label":e.label||"Setup",children:[(0,x.jsxs)("aside",{className:"tf-wizard-rail",children:[e.brand&&(0,x.jsxs)("span",{className:"tf-brand",style:{color:"var(--on-frame)"},children:[e.brand,(0,x.jsx)("span",{className:"tf-brand-dot"})]}),(0,x.jsx)("ol",{children:t.map((l,i)=>{let c=a[l.id||i];return(0,x.jsx)("li",{children:(0,x.jsxs)("button",{type:"button",className:b("tf-wizard-step",i===n&&"cur",c&&"ok"),"aria-current":i===n?"step":void 0,onClick:()=>{e.onPick&&e.onPick(i)},children:[(0,x.jsx)("span",{children:c?(0,x.jsx)(N,{name:"check",size:12}):i+1}),l.label]})},i)})})]}),(0,x.jsxs)("div",{className:"tf-wizard-main",children:[(0,x.jsx)("div",{className:"tf-card-desc",children:`Step ${n+1} of ${t.length}`}),(0,x.jsxs)("div",{className:"tf-wizard-body",children:[t[n]&&t[n].icon&&(0,x.jsx)(ie,{icon:t[n].icon,tint:"sky",size:44}),t[n]&&(0,x.jsx)("h2",{className:"tf-modal-title",children:t[n].label}),e.children]},n),e.footer&&(0,x.jsx)("div",{className:"tf-modal-foot",style:{justifyContent:"space-between"},children:e.footer})]})]})}var xv=()=>["None","View","Edit","Full"];function zv(e){let t=ia.useRef(null);return na(t),(0,x.jsx)("div",{ref:t,className:"tf-scroll",children:(0,x.jsxs)("table",{className:"tf-table tf-perm",children:[(0,x.jsx)("thead",{children:(0,x.jsxs)("tr",{children:[(0,x.jsx)("th",{children:"Role"}),(e.areas||[]).map(n=>(0,x.jsx)("th",{children:n},n))]})}),(0,x.jsx)("tbody",{className:"tf-stagger",style:{"--base":"120ms"},children:(e.roles||[]).map((n,a)=>(0,x.jsxs)("tr",{children:[(0,x.jsxs)("td",{children:[(0,x.jsx)("div",{style:{fontWeight:700},children:n.name}),n.people!=null&&(0,x.jsx)("div",{className:"tf-card-desc",children:n.people===1?"1 member":`${n.people} members`})]}),n.levels.map((l,i)=>(0,x.jsx)("td",{children:(0,x.jsx)("button",{type:"button",className:"tf-perm-cell lv"+l,disabled:n.locked,"aria-label":n.name+" \xB7 "+e.areas[i]+": "+xv()[l],onClick:()=>{e.onChange&&e.onChange(a,i,(l+1)%4)},children:xv()[l]})},i))]},n.name))})]})})}function wv(e){return me(e,null,{minimumFractionDigits:2})}function Rv(e){let t=e.lines||[],n=0,a={};t.forEach(c=>{let s=c.q*c.u;n+=s,a[c.v]=(a[c.v]||0)+s*c.v/100});let l=0;Object.keys(a).forEach(c=>{l+=a[Number(c)]??0});let i=e.format||wv;return(0,x.jsxs)("div",{className:"tf-paper",children:[(0,x.jsxs)("div",{className:"tf-paper-top",children:[(0,x.jsxs)("div",{children:[e.brand&&(0,x.jsxs)("div",{className:"tf-brand",style:{color:"var(--ink)",fontSize:18},children:[e.brand,(0,x.jsx)("span",{className:"tf-brand-dot"})]}),e.from&&(0,x.jsx)("div",{className:"tf-paper-small",children:e.from})]}),(0,x.jsxs)("div",{className:"tf-paper-id",children:[(0,x.jsx)("div",{className:"tf-paper-kind",children:e.kind||"Invoice"}),(0,x.jsx)("div",{className:"tf-mono",children:"#"+e.number})]})]}),(0,x.jsxs)("div",{className:"tf-paper-meta",children:[(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:"Bill to"}),(0,x.jsx)("b",{children:e.to})]}),(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:"Issued"}),(0,x.jsx)("b",{children:e.issued})]}),(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:"Due"}),(0,x.jsx)("b",{children:e.due})]})]}),(0,x.jsx)("div",{className:"tf-paper-lines",children:t.map((c,s)=>(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:(c.d||"Untitled line")+(c.q!==1?" \xD7 "+c.q:"")}),(0,x.jsx)("b",{children:i(c.q*c.u)})]},s))}),(0,x.jsxs)("div",{className:"tf-paper-totals",children:[(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:"Net"}),(0,x.jsx)("b",{children:i(n)})]}),Object.keys(a).filter(c=>+c>0).map(c=>(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:`VAT ${c}%`}),(0,x.jsx)("b",{children:i(a[Number(c)]??0)})]},c)),(0,x.jsxs)("div",{className:"grand",children:[(0,x.jsx)("span",{children:"Total due"}),(0,x.jsx)("b",{children:i(n+l)})]})]}),e.note&&(0,x.jsx)("div",{className:"tf-paper-small",children:e.note})]})}function Av(e){let t=ia.useState(!1),n=e.amount>0;return(0,x.jsxs)("div",{className:b("tf-tx",!e.matched&&"unmatched"),children:[(0,x.jsxs)("div",{className:"tf-tx-row",children:[(0,x.jsx)(ie,{icon:n?"download":"send",tint:n?"mint":"plain"}),(0,x.jsxs)("div",{className:"tf-tx-text",children:[(0,x.jsx)("b",{className:"tf-mono",children:e.text}),(0,x.jsx)("span",{children:e.date+(e.matched&&e.matchRef?` \xB7 matched to ${e.matchRef}`:"")})]}),(0,x.jsx)("b",{className:b("tf-tx-amt",n?"in":"out"),children:(n?"+":"\u2212")+wv(Math.abs(e.amount))}),e.matched?(0,x.jsx)(Oe,{tone:"success",children:"Matched"}):(0,x.jsx)(Q,{size:"sm",variant:t[0]?"soft":"primary",onClick:()=>{t[1](!t[0])},children:t[0]?"Close":"Match"})]}),t[0]&&!e.matched&&(0,x.jsxs)("div",{className:"tf-tx-suggest tf-in",children:[(0,x.jsx)(ie,{icon:"bot",tint:"butter"}),(0,x.jsx)("span",{style:{flex:1,minWidth:0},children:e.hint||"No suggestion yet."}),(0,x.jsx)(Q,{size:"sm",icon:"check",onClick:()=>{t[1](!1),e.onMatch&&e.onMatch()},children:"Accept"})]})]})}function _v(e){let t=ru.useState(""),n=(e.accounts||[]).filter(l=>!t[0]||l.address.toLowerCase().indexOf(t[0].toLowerCase())>-1),a=(e.accounts||[]).find(l=>l.address===e.value);return(0,G.jsx)(Be,{width:320,trigger:l=>(0,G.jsxs)("button",{type:"button",className:"tf-acct",onClick:l.toggle,"aria-haspopup":"dialog","aria-expanded":l.open,children:[(0,G.jsxs)("span",{className:"tf-option-text",children:[(0,G.jsx)("b",{className:a?"tf-mono":void 0,children:a?a.address:e.allLabel||"All inboxes"}),(0,G.jsx)("small",{children:a?a.domain:`${(e.accounts||[]).length} addresses`})]}),(0,G.jsx)(N,{name:"chevronDown",size:14})]}),children:l=>(0,G.jsxs)("div",{className:"tf-col",style:{gap:8},children:[(0,G.jsx)(Mn,{placeholder:"Find an address",value:t[0],onChange:i=>{t[1](i.target.value)}}),(0,G.jsxs)("div",{className:"tf-acct-list",children:[(0,G.jsxs)("button",{type:"button",className:b("tf-option",!e.value&&"on"),onClick:()=>{e.onChange&&e.onChange(null),l.close()},children:[(0,G.jsx)(N,{name:"inbox",size:15}),(0,G.jsx)("span",{className:"tf-option-text",children:e.allLabel||"All inboxes"}),e.unread!=null&&(0,G.jsx)("span",{className:"tf-nav-count",children:e.unread})]}),n.map(i=>(0,G.jsxs)("button",{type:"button",className:b("tf-option",i.address===e.value&&"on"),onClick:()=>{e.onChange&&e.onChange(i.address),l.close()},children:[(0,G.jsxs)("span",{className:"tf-option-text",children:[(0,G.jsx)("span",{className:"tf-mono",children:i.address}),(0,G.jsx)("small",{children:i.domain})]}),i.unread?(0,G.jsx)("span",{className:"tf-nav-count",children:i.unread}):null]},i.address))]})]})})}function Dv(e){return(0,G.jsx)("div",{className:"tf-inboxlist",role:"list",children:(e.items||[]).map(t=>(0,G.jsxs)("button",{type:"button",role:"listitem",className:b("tf-mailrow",t.unread&&"unread",t.id===e.selected&&"on"),onClick:()=>{e.onOpen&&e.onOpen(t)},children:[(0,G.jsx)("span",{className:"tf-mailrow-dot",role:t.unread?"img":void 0,"aria-label":t.unread?"Unread":void 0}),(0,G.jsxs)("span",{className:"tf-mailrow-main",children:[(0,G.jsxs)("span",{className:"tf-mailrow-top",children:[(0,G.jsx)("b",{children:t.from}),(0,G.jsx)("small",{className:"tf-mono",children:t.time})]}),(0,G.jsx)("span",{className:"tf-mailrow-subject",children:t.subject}),(0,G.jsx)("span",{className:"tf-mailrow-snippet",children:t.snippet}),(t.to||t.tags||t.agent)&&(0,G.jsxs)("span",{className:"tf-mailrow-tags",children:[t.to&&(0,G.jsx)("span",{className:"tf-mono",children:t.to}),t.agent&&(0,G.jsx)(Oe,{tone:t.agent.tone||"highlight",children:t.agent.label}),(t.tags||[]).map(n=>(0,G.jsx)(Oe,{tone:"neutral",dot:!1,children:n},n))]})]})]},t.id))})}function Ov(e){let t=ru.useState((e.messages||[]).length?[e.messages[e.messages.length-1].id]:[]);return(0,G.jsxs)("div",{className:"tf-thread",children:[e.subject&&(0,G.jsx)("h3",{className:"tf-thread-subject",children:e.subject}),(e.messages||[]).map(n=>{let a=t[0].indexOf(n.id)>-1;return(0,G.jsxs)("div",{className:b("tf-threadmsg",a&&"open",n.agent&&"agent"),children:[(0,G.jsxs)("button",{type:"button",className:"tf-threadmsg-head","aria-expanded":a,onClick:()=>{t[1](a?t[0].filter(l=>l!==n.id):t[0].concat([n.id]))},children:[n.agent?(0,G.jsx)(Gt,{tint:n.tint,size:32}):(0,G.jsx)(qe,{name:n.from,size:32}),(0,G.jsxs)("span",{className:"tf-option-text",children:[(0,G.jsxs)("b",{children:[n.from,n.agentNote&&(0,G.jsx)("span",{className:"tf-threadmsg-note",children:" \xB7 "+n.agentNote})]}),(0,G.jsx)("small",{children:a?n.to:n.snippet})]}),(0,G.jsx)("small",{className:"tf-mono",children:n.time})]}),a&&(0,G.jsxs)("div",{className:"tf-threadmsg-body",children:[n.body,n.attachments&&(0,G.jsx)("div",{className:"tf-msg-attach",children:n.attachments.map(l=>(0,G.jsxs)("span",{className:"tf-attach-chip",children:[(0,G.jsx)(N,{name:"paperclip",size:13}),l.name,l.size&&(0,G.jsx)("small",{children:l.size})]},l.name))})]})]},n.id)}),e.reply]})}function jv(e){let t=J(e.value,e.defaultValue||{},e.onChange),n=e.fields||[{key:"name",label:"Name"},{key:"role",label:"Role"},{key:"company",label:"Company"},{key:"phone",label:"Phone"},{key:"website",label:"Website"}];function a(l,i){let c=Object.assign({},t[0]);c[l]=i,t[1](c)}return(0,G.jsxs)("div",{className:"tf-sig",children:[(0,G.jsxs)("div",{className:"tf-col",style:{gap:12},children:[n.map(l=>(0,G.jsx)(Rs,{label:l.label,value:t[0][l.key]||"",onChange:i=>{a(l.key,i.target.value)}},l.key)),e.extra]}),(0,G.jsxs)("div",{className:"tf-sig-preview",children:[(0,G.jsx)("span",{className:"tf-menu-label",style:{padding:0},children:e.previewLabel||"Preview"}),(0,G.jsxs)("div",{className:"tf-paper tf-sig-paper",children:[(0,G.jsx)("p",{children:"\u2014"}),(0,G.jsx)("b",{children:t[0].name}),t[0].role&&(0,G.jsx)("div",{children:t[0].role+(t[0].company?" \xB7 "+t[0].company:"")}),t[0].phone&&(0,G.jsx)("div",{children:t[0].phone}),t[0].website&&(0,G.jsx)("div",{children:t[0].website}),e.note&&(0,G.jsx)("small",{children:e.note})]})]})]})}function Lv(e){return(0,G.jsx)(Xs,{title:e.name,subtitle:e.meta,onClose:e.onClose,width:e.width||820,inline:e.inline,children:(0,G.jsxs)("div",{className:"tf-attprev",children:[(0,G.jsx)("div",{className:"tf-attprev-doc",children:e.children}),(0,G.jsxs)("div",{className:"tf-col",style:{gap:16},children:[e.facts&&(0,G.jsx)(Un,{items:e.facts}),e.found,e.actions&&(0,G.jsx)("div",{className:"tf-col",style:{gap:8},children:e.actions})]})]})})}var te=q(pe(),1),ca=q(re(),1);function Hv(e){let t=J(e.selected,e.variants?.[0]?.id??"",e.onSelect),n=(e.variants||[]).find(a=>a.id===t[0])||{};return(0,te.jsxs)("div",{className:"tf-imgvar",children:[(0,te.jsxs)("div",{className:"tf-imgvar-stage",style:n.ratio?{aspectRatio:n.ratio}:void 0,children:[n.src?(0,te.jsx)("img",{src:n.src,alt:e.alt||""}):(0,te.jsx)("div",{className:b("tf-imgvar-ph","tf-t-"+(e.tint||"sky")),children:(0,te.jsx)(N,{name:"image",size:32})}),n.label&&(0,te.jsx)("span",{className:"tf-imgvar-tag",children:n.label})]}),(0,te.jsx)("div",{className:"tf-imgvar-list",role:"listbox","aria-label":"Variants",children:(e.variants||[]).map(a=>(0,te.jsxs)("button",{type:"button",role:"option","aria-selected":a.id===t[0],className:b("tf-imgvar-item",a.id===t[0]&&"on"),onClick:()=>{t[1](a.id)},children:[(0,te.jsx)("span",{className:"tf-imgvar-thumb",style:a.ratio?{aspectRatio:a.ratio}:void 0,children:a.src?(0,te.jsx)("img",{src:a.src,alt:""}):(0,te.jsx)(N,{name:"image",size:14})}),(0,te.jsxs)("span",{className:"tf-option-text",children:[(0,te.jsx)("b",{children:a.label}),(0,te.jsx)("small",{className:"tf-mono",children:[a.size,a.format,a.weight].filter(Boolean).join(" \xB7 ")})]}),a.status&&(0,te.jsx)(Re,{status:a.status})]},a.id))}),e.actions&&(0,te.jsx)("div",{className:"tf-row",style:{justifyContent:"flex-end"},children:e.actions})]})}function Bv(e){let t=e.items||[],n=ca.useState(e.start||0),a=ca.useState(!1),l=t.length,i=t[n[0]]||{};function c(o){n[1]((n[0]+o+l)%l)}ca.useEffect(()=>{if(!a[0])return;function o(u){u.key==="Escape"&&a[1](!1),u.key==="ArrowRight"&&c(1),u.key==="ArrowLeft"&&c(-1)}return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}});function s(o,u){return o.src?(0,te.jsx)("img",{className:u,src:o.src,alt:o.alt||""}):(0,te.jsx)("div",{className:b(u,"tf-gallery-ph","tf-t-"+(o.tint||"sky")),children:o.art||(0,te.jsx)(N,{name:"image",size:28})})}let r=(0,te.jsxs)("div",{className:"tf-gallery-stage",style:{aspectRatio:e.ratio||"3 / 2"},children:[s(i,"tf-gallery-img"),l>1&&(0,te.jsx)($,{icon:"chevronLeft",label:"Previous image",className:"tf-gallery-prev",onClick:()=>{c(-1)}}),l>1&&(0,te.jsx)($,{icon:"chevronRight",label:"Next image",className:"tf-gallery-next",onClick:()=>{c(1)}}),(0,te.jsx)("span",{className:"tf-gallery-count",children:n[0]+1+" / "+l}),!a[0]&&e.fullscreen!==!1&&(0,te.jsx)($,{icon:"expand",label:"Full screen",className:"tf-gallery-full",onClick:()=>{a[1](!0)}}),e.badge&&(0,te.jsx)("span",{className:"tf-gallery-badge",children:e.badge})]});return(0,te.jsxs)("div",{className:"tf-gallery",children:[r,e.thumbs!==!1&&l>1&&(0,te.jsx)("div",{className:"tf-gallery-thumbs",role:"tablist","aria-label":"Images",children:t.map((o,u)=>(0,te.jsx)("button",{type:"button",role:"tab","aria-selected":u===n[0],className:b(u===n[0]&&"on"),onClick:()=>{n[1](u)},"aria-label":o.caption||o.alt||(o.src?`Image ${u+1}`:void 0),children:s(o,"tf-gallery-thumb")},u))}),a[0]&&(0,te.jsx)(Sn,{children:(0,te.jsxs)("div",{className:"tf-lightbox",role:"dialog","aria-modal":"true","aria-label":"Images",children:[(0,te.jsx)($,{icon:"x",label:"Close",className:"tf-lightbox-close",onClick:()=>{a[1](!1)}}),(0,te.jsxs)("div",{className:"tf-lightbox-stage",children:[s(i,"tf-gallery-img"),l>1&&(0,te.jsx)($,{icon:"chevronLeft",label:"Previous image",className:"tf-gallery-prev",onClick:()=>{c(-1)}}),l>1&&(0,te.jsx)($,{icon:"chevronRight",label:"Next image",className:"tf-gallery-next",onClick:()=>{c(1)}})]}),(0,te.jsx)("span",{className:"tf-lightbox-cap",children:(i.caption?i.caption+" \xB7 ":"")+(n[0]+1)+" / "+l})]})})]})}function Uv(e){let t=ca.useState(e.start!=null?e.start:50),n=ca.useRef(null),a=ca.useRef(!1);function l(c){if(!n.current)return;let s=n.current.getBoundingClientRect();t[1](Math.max(0,Math.min(100,(c.clientX-s.left)/s.width*100)))}function i(c,s){return c&&c.src?(0,te.jsx)("img",{className:s,src:c.src,alt:c.alt||""}):(0,te.jsx)("div",{className:b(s,"tf-ba-ph",c&&c.tint&&"tf-t-"+c.tint),children:c&&c.art})}return(0,te.jsxs)("div",{ref:n,className:"tf-ba",style:{aspectRatio:e.ratio||"3 / 2"},onPointerDown:c=>{a.current=!0,c.currentTarget.setPointerCapture(c.pointerId),l(c)},onPointerMove:c=>{a.current&&l(c)},onPointerUp:()=>{a.current=!1},children:[i(e.after,"tf-ba-img"),(0,te.jsx)("div",{className:"tf-ba-before",style:{clipPath:"inset(0 "+(100-t[0])+"% 0 0)"},children:i(e.before,"tf-ba-img")}),(0,te.jsx)("span",{className:"tf-ba-tag left",children:e.beforeLabel||"Before"}),(0,te.jsx)("span",{className:"tf-ba-tag right",children:e.afterLabel||"After"}),(0,te.jsx)("div",{className:"tf-ba-line",style:{left:t[0]+"%"},children:(0,te.jsxs)("span",{className:"tf-ba-knob",role:"slider",tabIndex:0,"aria-label":"Compare before and after","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(t[0]),onKeyDown:c=>{c.key==="ArrowLeft"&&t[1](Math.max(0,t[0]-5)),c.key==="ArrowRight"&&t[1](Math.min(100,t[0]+5))},children:[(0,te.jsx)(N,{name:"chevronLeft",size:12}),(0,te.jsx)(N,{name:"chevronRight",size:12})]})})]})}var w=q(pe(),1),ou=q(re(),1);function qv(e){let t={connected:"ok",expiring:"warn",error:"danger",missing:"idle"}[e.status]||"idle";return(0,w.jsxs)("div",{className:"tf-conn",children:[(0,w.jsx)("span",{className:"tf-conn-ico",children:e.logo||(0,w.jsx)(N,{name:e.icon||"link",size:18})}),(0,w.jsxs)("span",{className:"tf-option-text",children:[(0,w.jsx)("b",{children:e.name}),(0,w.jsx)("small",{children:e.text})]}),(0,w.jsx)(Ue,{status:t,label:e.statusLabel}),e.action&&(0,w.jsx)("span",{className:"tf-conn-act",children:e.action})]})}function Vv(e){return!e.state||e.state==="online"?null:(0,w.jsxs)("div",{className:b("tf-connbanner",e.state),role:"status",children:[(0,w.jsx)(Re,{status:e.state==="offline"?"danger":"warn"}),(0,w.jsx)("span",{children:e.text||(e.state==="offline"?"Offline. Changes are kept and sent when you\u2019re back.":`Connection lost. Retrying in ${e.seconds!=null?e.seconds:"\u2026"} s`)}),e.onRetry&&(0,w.jsx)("button",{type:"button",className:"tf-linkbtn",onClick:e.onRetry,children:"Retry now"})]})}function Yv(e){return(0,w.jsxs)("div",{className:"tf-server",children:[(0,w.jsxs)("div",{className:"tf-server-top",children:[(0,w.jsx)("span",{className:"tf-conn-ico",children:e.logo||(0,w.jsx)(N,{name:"server",size:18})}),(0,w.jsxs)("span",{className:"tf-option-text",children:[(0,w.jsx)("b",{children:e.name}),(0,w.jsx)("small",{className:"tf-mono",children:[e.provider,e.address].filter(Boolean).join(" \xB7 ")})]}),(0,w.jsx)(Ue,{status:e.status||"idle",label:e.statusLabel})]}),(0,w.jsx)("div",{className:"tf-col",style:{gap:12},children:(e.meters||[]).map(t=>t.value==null?(0,w.jsxs)("div",{className:"tf-usage-top",children:[(0,w.jsx)("span",{children:t.label}),(0,w.jsx)("b",{children:t.unknown||"Unknown"})]},t.label):(0,w.jsx)(Aa,{label:t.label,value:t.value,max:t.max,text:t.text},t.label))}),e.uptime&&(0,w.jsx)(Gs,{...e.uptime}),e.foot&&(0,w.jsx)("div",{className:"tf-server-foot",children:e.foot})]})}function Gv(e){return(0,w.jsx)("ol",{className:"tf-pipeline",tabIndex:0,"aria-label":"Deploy pipeline",children:(e.stages||[]).map((t,n)=>(0,w.jsxs)("li",{className:b("tf-stage","st-"+(t.status||"idle")),children:[(0,w.jsx)(Re,{status:t.status==="done"?"ok":t.status||"idle"}),(0,w.jsx)("b",{children:t.name}),(0,w.jsx)("small",{className:"tf-mono",children:t.duration||"\u2014"}),t.action]},n))})}function Qv(e){return(0,w.jsx)(uc,{rows:e.records||[],rowKey:"id",columnToggle:!1,selectable:e.selectable,bulkActions:e.bulkActions,toolbar:e.toolbar,columns:[{key:"type",label:"Type",sortable:!0,render:t=>(0,w.jsx)(Oe,{tone:"neutral",dot:!1,className:"tf-mono",children:t.type})},{key:"name",label:"Name",sortable:!0,render:t=>(0,w.jsx)("span",{className:"tf-mono",children:t.name})},{key:"content",label:"Content",render:t=>(0,w.jsx)(Pe,{label:t.content,children:(0,w.jsx)("span",{className:"tf-mono tf-trunc",tabIndex:0,children:t.content})})},{key:"ttl",label:"TTL",align:"right",render:t=>(0,w.jsx)("span",{className:"tf-mono",children:t.ttl})},{key:"proxy",label:"Proxy",render:t=>t.proxy==null?"\u2014":(0,w.jsx)(Ue,{status:t.proxy?"ok":"idle",label:t.proxy?"Proxied":"DNS only"})},{key:"x",label:"",align:"right",hideable:!1,render:t=>e.rowMenu?(0,w.jsx)(Be,{align:"end",flush:!0,width:200,trigger:n=>(0,w.jsx)("button",{type:"button",className:"tf-iconbtn tf-iconbtn-ghost tf-iconbtn-sm","aria-label":"Actions",onClick:n.toggle,children:(0,w.jsx)(N,{name:"more"})}),children:n=>(0,w.jsx)(At,{items:(e.rowMenu?.(t)??[]).map(a=>a==="-"?a:Object.assign({},a,{onClick:()=>{n.close(),a.onClick&&a.onClick()}}))})}):null}]})}function Xv(e){return(0,w.jsx)("div",{className:"tf-domains",children:(e.items||[]).slice().sort((t,n)=>(t.days==null?9999:t.days)-(n.days==null?9999:n.days)).map(t=>{let n=t.days==null?"idle":t.days<7?"danger":t.days<30?"warn":"ok";return(0,w.jsxs)("button",{type:"button",className:"tf-domainrow",onClick:()=>{e.onOpen&&e.onOpen(t)},children:[(0,w.jsx)(Re,{status:n}),(0,w.jsxs)("span",{className:"tf-option-text",children:[(0,w.jsx)("b",{className:"tf-mono",children:t.name}),(0,w.jsx)("small",{children:[t.registrar,t.dns].filter(Boolean).join(" \xB7 ")})]}),(0,w.jsxs)("span",{className:"tf-domainrow-cell",children:[(0,w.jsx)("small",{children:"Expires"}),(0,w.jsx)("b",{className:"tf-mono",children:t.days==null?"\u2014":`${t.days} days`})]}),(0,w.jsxs)("span",{className:"tf-domainrow-cell",children:[(0,w.jsx)("small",{children:"SSL"}),(0,w.jsx)(Ue,{status:t.ssl||"idle",label:t.sslLabel})]})]},t.name)})})}function Kv(e){let t=e.columns||["MX","SPF","DKIM","DMARC"],n=ou.useRef(null);return na(n),(0,w.jsx)("div",{ref:n,className:"tf-scroll-x",children:(0,w.jsxs)("table",{className:"tf-table tf-mailauth",children:[(0,w.jsx)("thead",{children:(0,w.jsxs)("tr",{children:[(0,w.jsx)("th",{children:"Domain"}),t.map(a=>(0,w.jsx)("th",{children:a},a))]})}),(0,w.jsx)("tbody",{children:(e.rows||[]).map(a=>(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{className:"tf-mono",children:a.domain}),t.map(l=>{let i=a[l.toLowerCase()]||{status:"idle"};return(0,w.jsx)("td",{children:(0,w.jsx)("button",{type:"button",className:"tf-mailauth-cell",onClick:()=>{e.onOpen&&e.onOpen(a,l)},children:(0,w.jsx)(Ue,{status:i.status,label:i.label})})},l)})]},a.domain))})]})})}function Zv(e){let t=e.currency;return(0,w.jsx)(uc,{rows:e.rows||[],selectable:e.selectable,bulkActions:e.bulkActions,toolbar:e.toolbar,stickyHeader:!0,maxHeight:e.maxHeight,columnToggle:e.columnToggle,columns:[{key:"date",label:"Date",sortable:!0,render:n=>(0,w.jsx)("span",{className:"tf-mono",children:n.date})},{key:"ref",label:"Ref.",render:n=>(0,w.jsx)("span",{className:"tf-mono",children:n.ref})},{key:"text",label:"Description",render:n=>(0,w.jsxs)("span",{className:"tf-option-text",children:[(0,w.jsx)("b",{children:n.text}),n.suggested&&(0,w.jsxs)("small",{children:[(0,w.jsx)(Re,{status:"signal"})," ",`Suggested by ${n.suggested}`]})]})},{key:"category",label:"Category",render:n=>e.categories?(0,w.jsx)(Ys,{value:n.category||"",options:e.categories,onSave:a=>{e.onEdit?.(n,{category:a})}}):n.category},{key:"project",label:"Project",render:n=>n.project&&(0,w.jsxs)("span",{className:"tf-row",style:{gap:8,flexWrap:"nowrap"},children:[(0,w.jsx)("i",{className:"tf-sw tf-sw-"+(n.projectTint||"ink")}),n.project]})},{key:"net",label:"Net",align:"right",sortable:!0,render:n=>me(n.net,t,{minimumFractionDigits:2})},{key:"vat",label:"VAT",align:"right",render:n=>me(n.vat||0,t,{minimumFractionDigits:2})},{key:"gross",label:"Gross",align:"right",sortable:!0,render:n=>(0,w.jsx)("b",{className:n.gross<0?"tf-neg":void 0,children:me(n.gross,t,{minimumFractionDigits:2})})},{key:"status",label:"Status",render:n=>(0,w.jsx)(Ue,{status:n.status||"ok",label:n.statusLabel})}]})}function Jv(e){let t=e.columns||[],n=ou.useRef(null);return na(n),(0,w.jsx)("div",{ref:n,className:"tf-scroll-x",children:(0,w.jsxs)("table",{className:"tf-table tf-pnl",children:[(0,w.jsx)("thead",{children:(0,w.jsxs)("tr",{children:[(0,w.jsx)("th",{children:e.label||""}),t.map(a=>(0,w.jsx)("th",{className:"tf-num",children:a},a)),e.total!==!1&&(0,w.jsx)("th",{className:"tf-num",children:"Total"})]})}),(0,w.jsx)("tbody",{children:(e.rows||[]).map((a,l)=>{let i=(a.values||[]).reduce((c,s)=>c+(s||0),0);return(0,w.jsxs)("tr",{className:a.kind,children:[(0,w.jsx)("td",{children:a.label}),a.kind==="section"?(0,w.jsx)("td",{colSpan:t.length+(e.total!==!1?1:0)}):t.map((c,s)=>{let r=(a.values||[])[s];return(0,w.jsx)("td",{className:b("tf-num",r<0&&"tf-neg"),children:r==null?"\u2014":me(r,e.currency)},s)}),a.kind!=="section"&&e.total!==!1&&(0,w.jsx)("td",{className:b("tf-num",i<0&&"tf-neg"),children:(0,w.jsx)("b",{children:me(i,e.currency)})})]},l)})})]})})}function Fv(e){return(0,w.jsxs)("div",{className:"tf-receipt",children:[(0,w.jsxs)("div",{className:"tf-receipt-src",children:[(0,w.jsx)(ie,{icon:"paperclip",tint:"sky"}),(0,w.jsxs)("span",{className:"tf-option-text",children:[(0,w.jsx)("b",{children:e.file}),(0,w.jsx)("small",{children:e.source})]})]}),(0,w.jsx)("div",{className:"tf-receipt-grid",children:(e.fields||[]).map(t=>(0,w.jsxs)("div",{className:"tf-receipt-field",children:[(0,w.jsx)("small",{children:t.label}),(0,w.jsx)("b",{className:t.mono?"tf-mono":void 0,children:t.value}),t.confidence!=null&&(0,w.jsx)("span",{className:b("tf-conf",t.confidence<.8&&"low"),children:Ln(t.confidence*100)})]},t.label))}),e.suggestion&&(0,w.jsxs)("div",{className:"tf-receipt-sugg",children:[(0,w.jsx)(Re,{status:"signal"}),(0,w.jsx)("span",{children:e.suggestion})]}),e.children,(0,w.jsxs)("div",{className:"tf-row",style:{justifyContent:"flex-end"},children:[e.onDiscard&&(0,w.jsx)(Q,{variant:"ghost",size:"sm",onClick:e.onDiscard,children:e.discardLabel||"Not a receipt"}),e.onConfirm&&(0,w.jsx)(Q,{size:"sm",icon:"check",onClick:e.onConfirm,children:e.confirmLabel||"Book it"})]})]})}var ye=q(pe(),1),tM=q(re(),1);function $v(e){let t=J(e.device,"desktop",e.onDevice);return(0,ye.jsxs)("div",{className:"tf-mailprev",children:[(0,ye.jsxs)("div",{className:"tf-mailprev-head",children:[(0,ye.jsxs)("div",{className:"tf-mailprev-inbox",children:[(0,ye.jsx)(qe,{name:e.fromName||e.from||"",size:36}),(0,ye.jsxs)("div",{className:"tf-option-text",children:[(0,ye.jsx)("b",{children:e.fromName||e.from}),(0,ye.jsxs)("span",{className:"tf-mailprev-subj",children:[(0,ye.jsx)("b",{children:e.subject||"(No subject)"}),e.preheader&&(0,ye.jsx)("span",{children:" \u2014 "+e.preheader})]})]})]}),(0,ye.jsx)(Bn,{size:"sm",value:t[0],onChange:t[1],label:"Device",options:[{value:"desktop",label:"Desktop"},{value:"mobile",label:"Mobile"}]})]}),(0,ye.jsx)("div",{className:b("tf-mailprev-stage",t[0]),children:(0,ye.jsx)("div",{className:"tf-mailprev-frame",children:e.html!=null?(0,ye.jsx)("iframe",{title:"Email preview",sandbox:"",srcDoc:e.html}):(0,ye.jsx)("div",{className:"tf-mailprev-body",children:e.children})})}),e.checks&&(0,ye.jsx)("div",{className:"tf-mailprev-checks",children:e.checks.map((n,a)=>(0,ye.jsx)(Ue,{status:n.status,label:n.label,size:"sm"},a))})]})}function Iv(e){let t=J(e.device,"mobile",e.onDevice),n=(e.headlines||[]).filter(Boolean).slice(0,3),a=(e.descriptions||[]).filter(Boolean).slice(0,2),l=[["headlines",30],["descriptions",90],["paths",15]],i=[];l.forEach(s=>{(e[s[0]]||[]).forEach((r,o)=>{r&&r.length>s[1]&&i.push(`${s[0]==="headlines"?"Headline":s[0]==="descriptions"?"Description":"Path"} ${o+1} is ${r.length} characters, the limit is ${s[1]}`)})});let c=(e.domain||"")+(e.paths||[]).filter(Boolean).map(s=>" \u203A "+s).join("");return(0,ye.jsxs)("div",{className:"tf-adprev",children:[(0,ye.jsxs)("div",{className:"tf-row",style:{justifyContent:"space-between"},children:[(0,ye.jsx)("span",{className:"tf-menu-label",style:{padding:0},children:"Preview"}),(0,ye.jsx)(Bn,{size:"sm",value:t[0],onChange:t[1],label:"Device",options:[{value:"mobile",label:"Mobile"},{value:"desktop",label:"Desktop"}]})]}),(0,ye.jsxs)("div",{className:b("tf-adprev-card",t[0]),children:[(0,ye.jsxs)("div",{className:"tf-adprev-top",children:[(0,ye.jsx)("span",{className:"tf-adprev-fav","aria-hidden":!0,children:(e.name||e.domain||"?").charAt(0).toUpperCase()}),(0,ye.jsxs)("div",{className:"tf-option-text",children:[(0,ye.jsx)("b",{children:e.name||e.domain}),(0,ye.jsx)("small",{children:c})]}),(0,ye.jsx)("span",{className:"tf-adprev-tag",children:e.sponsoredLabel||"Sponsored"})]}),(0,ye.jsx)("a",{className:"tf-adprev-hl",href:"#",onClick:s=>{s.preventDefault()},children:n.join(" | ")||"Your headline"}),(0,ye.jsx)("p",{className:"tf-adprev-desc",children:a.join(" ")||"Your description"}),e.sitelinks&&e.sitelinks.length>0&&(0,ye.jsx)("div",{className:"tf-adprev-links",children:e.sitelinks.map((s,r)=>(0,ye.jsx)("span",{children:s},r))})]}),i.length>0&&(0,ye.jsx)("div",{className:"tf-col",style:{gap:4},children:i.map((s,r)=>(0,ye.jsx)(Ue,{status:"warn",label:s,size:"sm"},r))})]})}var he=q(pe(),1),kn=q(re(),1);function Wv(e){let t=xe("acc"),n=e.items||[],a=n.map((s,r)=>s.id??String(r)),l=J(e.value,e.defaultValue||[],e.onChange),i=kn.useRef(null),c=s=>{let r=l[0].includes(s);l[1](r?l[0].filter(o=>o!==s):e.multiple?l[0].concat(s):[s])};return(0,he.jsx)("div",{ref:i,className:b("tf-accordion",e.variant==="flush"&&"flush",e.className),style:e.style,onKeyDown:s=>{s.target.classList.contains("tf-accordion-head")&&vl(s,i.current,".tf-accordion-head","vertical")},children:n.map((s,r)=>{let o=a[r],u=l[0].includes(o);return(0,he.jsxs)("div",{className:b("tf-accordion-item",u&&"open"),children:[(0,he.jsx)("h3",{className:"tf-accordion-h",children:(0,he.jsxs)("button",{type:"button",id:`${t}-h${r}`,className:"tf-accordion-head","aria-expanded":u,"aria-controls":`${t}-p${r}`,disabled:s.disabled,onClick:()=>c(o),children:[s.icon&&(0,he.jsx)(N,{name:s.icon}),(0,he.jsx)("span",{className:"tf-accordion-title",children:s.title}),s.meta&&(0,he.jsx)("span",{className:"tf-accordion-meta",children:s.meta}),(0,he.jsx)(N,{name:"chevronDown",size:16,className:"tf-accordion-chev"})]})}),(0,he.jsx)("div",{id:`${t}-p${r}`,role:"region","aria-labelledby":`${t}-h${r}`,className:"tf-accordion-panel",hidden:!u,children:(0,he.jsx)("div",{className:"tf-accordion-body",children:s.content})})]},o)})})}function Pv(e){let t=e.orientation==="vertical";return e.label&&!t?(0,he.jsx)("div",{className:b("tf-sep","labelled",e.className),style:e.style,role:"separator",children:(0,he.jsx)("span",{children:e.label})}):(0,he.jsx)("div",{className:b("tf-sep",t&&"vertical",e.className),style:e.style,role:"separator","aria-orientation":t?"vertical":void 0})}function eg(e){return(0,he.jsx)("div",{className:b("tf-aspect",e.className),style:{aspectRatio:String(e.ratio||16/9),...e.style},children:e.children})}function tg(e){return(0,he.jsxs)("label",{className:b("tf-field-label","tf-label",e.className),style:e.style,htmlFor:e.htmlFor,children:[e.children,e.required&&(0,he.jsx)("span",{className:"tf-label-req","aria-hidden":!0,children:"*"}),e.hint&&(0,he.jsx)("span",{className:"tf-label-hint",children:e.hint})]})}function ng(e){let t=J(e.pressed,!!e.defaultPressed,e.onChange),n=!!e.icon&&!e.children;return(0,he.jsxs)("button",{type:"button",className:b("tf-toggle",e.size==="sm"&&"sm",n&&"icon",e.className),style:e.style,"aria-pressed":t[0],"aria-label":n?e.label:void 0,title:n?e.label:void 0,disabled:e.disabled,onClick:()=>t[1](!t[0]),children:[e.icon&&(0,he.jsx)(N,{name:e.icon}),e.children]})}var Qx=e=>typeof e=="string"?{value:e,label:e}:e;function ag(e){let t=J(e.value,e.defaultValue||[],e.onChange),n=kn.useRef(null),a=(e.items||[]).map(Qx);return(0,he.jsx)("div",{ref:n,className:b("tf-togglegroup",e.size==="sm"&&"sm",e.className),style:e.style,role:"group","aria-label":e.label,onKeyDown:l=>vl(l,n.current,".tf-toggle","horizontal"),children:a.map(l=>{let i=t[0].includes(l.value),c=!!l.icon&&!l.label;return(0,he.jsxs)("button",{type:"button",className:b("tf-toggle",e.size==="sm"&&"sm",c&&"icon"),"aria-pressed":i,"aria-label":c?l.hint||l.value:void 0,title:l.hint,onClick:()=>t[1](e.type==="multiple"?i?t[0].filter(s=>s!==l.value):t[0].concat(l.value):i?[]:[l.value]),children:[l.icon&&(0,he.jsx)(N,{name:l.icon}),l.label]},l.value)})})}function lg(e){return(0,he.jsx)("div",{className:b("tf-btngroup",e.orientation==="vertical"&&"vertical",e.className),style:e.style,role:"group","aria-label":e.label,children:e.children})}function ig(e){let t=e.orientation||"vertical";return(0,he.jsx)("div",{className:b("tf-scrollarea",t,e.className),style:{height:e.height,maxHeight:e.maxHeight,...e.style},role:"region","aria-label":e.label,tabIndex:0,children:e.children})}function cg(e){let[t,n]=kn.useState(!1),a=kn.useRef(void 0),l=kn.useRef(null),i=yt(t);hl(l,t);let c=(s,r)=>{clearTimeout(a.current),a.current=setTimeout(()=>n(s),r)};return kn.useEffect(()=>()=>clearTimeout(a.current),[]),(0,he.jsxs)("span",{className:b("tf-hovercard-anchor",e.className),style:e.style,onPointerEnter:()=>c(!0,e.openDelay??500),onPointerLeave:()=>c(!1,e.closeDelay??200),onFocus:()=>c(!0,0),onBlur:s=>{s.currentTarget.contains(s.relatedTarget)||c(!1,0)},onKeyDown:s=>{s.key==="Escape"&&c(!1,0)},children:[e.trigger,i.mounted&&(0,he.jsx)("div",{...ot(i.closing),ref:l,className:b("tf-hovercard","tf-hc-"+(e.side||"bottom"),"tf-hc-"+(e.align||"center")),style:e.width?{width:e.width}:void 0,children:e.children})]})}function sg(e){let t=e.slides||[],n=t.length,a=J(e.index,e.defaultIndex||0,e.onChange),l=kn.useRef(null),i=Math.max(1,e.perView||1),c=Math.max(0,n-i),s=r=>{let o=e.loop?r>c?0:r<0?c:r:Math.min(c,Math.max(0,r)),u=l.current?.children[o];u&&l.current&&l.current.scrollTo({left:u.offsetLeft-l.current.offsetLeft,behavior:"smooth"}),a[1](o)};return kn.useEffect(()=>{let r=l.current;if(!r)return;let o=0,u=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(()=>{let h=r.firstElementChild?.offsetWidth||1,f=parseFloat(getComputedStyle(r).columnGap)||0,m=Math.round(r.scrollLeft/(h+f));m!==a[0]&&a[1](Math.min(c,m))})};return r.addEventListener("scroll",u,{passive:!0}),()=>{r.removeEventListener("scroll",u),cancelAnimationFrame(o)}}),(0,he.jsxs)("section",{className:b("tf-carousel",e.className),style:{"--per":i,...e.style},"aria-roledescription":"carousel","aria-label":e.label,onKeyDown:r=>{r.key==="ArrowRight"?(r.preventDefault(),s(a[0]+1)):r.key==="ArrowLeft"&&(r.preventDefault(),s(a[0]-1))},children:[(0,he.jsx)("div",{ref:l,className:"tf-carousel-track",tabIndex:0,children:t.map((r,o)=>(0,he.jsx)("div",{className:"tf-carousel-slide",role:"group","aria-roledescription":"slide","aria-label":`${o+1} of ${n}`,children:r},o))}),(0,he.jsxs)("div",{className:"tf-carousel-bar",children:[(0,he.jsx)("button",{type:"button",className:"tf-iconbtn tf-iconbtn-soft tf-iconbtn-sm","aria-label":"Previous slide",disabled:!e.loop&&a[0]<=0,onClick:()=>s(a[0]-1),children:(0,he.jsx)(N,{name:"chevronLeft"})}),e.dots!==!1&&(0,he.jsx)("div",{className:"tf-carousel-dots",children:Array.from({length:c+1},(r,o)=>(0,he.jsx)("button",{type:"button",className:"tf-carousel-dot","aria-label":`Go to slide ${o+1}`,"aria-current":o===a[0]?"true":void 0,onClick:()=>s(o)},o))}),(0,he.jsx)("button",{type:"button",className:"tf-iconbtn tf-iconbtn-soft tf-iconbtn-sm","aria-label":"Next slide",disabled:!e.loop&&a[0]>=c,onClick:()=>s(a[0]+1),children:(0,he.jsx)(N,{name:"chevronRight"})})]})]})}var U=q(pe(),1),mM=q(re(),1);function Xx(e){return[e.area!=null&&[(0,U.jsx)(N,{name:"ruler",size:14},"i"),`${F(e.area)} m\xB2`],e.rooms!=null&&[(0,U.jsx)(N,{name:"bed",size:14},"i"),`${F(e.rooms)} rooms`],e.place&&[(0,U.jsx)(N,{name:"pin",size:14},"i"),e.place]].filter(Boolean).map((t,n)=>(0,U.jsx)("span",{children:t},n))}function Kx(e){return e.price==null?(0,U.jsx)("b",{className:"tf-listing-price",children:"Price on request"}):(0,U.jsxs)("b",{className:"tf-listing-price",children:[me(e.price,e.currency),e.rent&&(0,U.jsxs)("small",{children:[" ","/ month"]})]})}function rg(e){let t=e.listing||e;return(0,U.jsxs)("article",{className:b("tf-listing",e.layout==="row"&&"row",e.selected&&"selected",t.status==="unread"&&"unread"),onClick:e.onOpen&&(()=>{e.onOpen?.(t)}),children:[(0,U.jsxs)("div",{className:"tf-listing-media",children:[t.image?(0,U.jsx)("img",{src:t.image,alt:""}):(0,U.jsx)("div",{className:b("tf-listing-ph","tf-t-"+(t.tint||"sky")),children:(0,U.jsx)(N,{name:"image",size:24})}),t.isNew&&(0,U.jsx)("span",{className:"tf-listing-new",children:"New"}),(t.photos??0)>1&&(0,U.jsxs)("span",{className:"tf-listing-photos",children:[(0,U.jsx)(N,{name:"image",size:12}),F(t.photos??0)]}),e.onSelect&&(0,U.jsx)("label",{className:"tf-listing-sel",onClick:n=>{n.stopPropagation()},children:lc({checked:!!e.selected,onChange:()=>{e.onSelect?.(t)},label:"Select"})})]}),(0,U.jsxs)("div",{className:"tf-listing-body",children:[(0,U.jsxs)("div",{className:"tf-listing-top",children:[Kx(t),t.pricePerSqm!=null&&(0,U.jsx)("span",{className:"tf-listing-ppsqm",children:me(t.pricePerSqm,t.currency)+" / m\xB2"}),e.onWish&&(0,U.jsx)($,{icon:"heart",size:"sm",label:t.wished?"Remove from saved":"Save",className:b("tf-listing-wish",t.wished&&"on"),onClick:n=>{n.stopPropagation(),e.onWish?.(t)}})]}),(0,U.jsx)("b",{className:"tf-listing-title",children:t.title}),(0,U.jsx)("div",{className:"tf-listing-facts",children:Xx(t)}),(0,U.jsxs)("div",{className:"tf-listing-foot",children:[t.source&&(0,U.jsx)("span",{className:"tf-listing-src",children:t.source}),t.seller&&(0,U.jsx)(Oe,{tone:t.seller==="private"?"success":"neutral",dot:!1,children:t.sellerLabel||(t.seller==="private"?"Private seller":"Agent")}),t.phone&&(0,U.jsx)("span",{className:"tf-listing-flag",title:"Phone number available",children:(0,U.jsx)(N,{name:"phone",size:13})}),(0,U.jsx)("span",{style:{flex:1}}),t.age&&(0,U.jsx)("span",{className:"tf-listing-age",children:t.age}),e.statusOptions&&(0,U.jsx)("span",{onClick:n=>{n.stopPropagation()},children:(0,U.jsx)(Qs,{size:"sm",options:e.statusOptions,value:t.status,onChange:n=>{e.onStatus&&e.onStatus(t,n)},label:"Status"})})]})]})]})}function og(e){let t=e.total>0&&e.selected===e.total,n=(e.selected??0)>0&&!t;return(0,U.jsxs)("div",{className:"tf-results",children:[e.onSelectAll&&(0,U.jsx)("label",{className:"tf-check",children:lc({checked:t,indeterminate:n,onChange:()=>{e.onSelectAll?.(!t)},label:t?"Deselect all":"Select all"})}),(0,U.jsxs)("div",{className:"tf-option-text",style:{marginRight:"auto"},children:[(0,U.jsx)("b",{children:(e.selected??0)>0?`${F(e.selected??0)} selected`:e.title||"Results"}),(0,U.jsx)("small",{children:`${F(e.total||0)} found`+(e.meta?" \xB7 "+e.meta:"")})]}),(e.selected??0)>0&&(e.bulkActions||[]).map((a,l)=>(0,U.jsx)(Q,{size:"sm",variant:a.variant||"secondary",icon:a.icon,disabled:a.busy,onClick:a.onClick,children:a.busy?a.busyLabel||"Working\u2026":a.label},l)),e.sortOptions&&(0,U.jsxs)("label",{className:"tf-results-sort",children:[(0,U.jsx)("span",{children:"Sort"}),(0,U.jsx)("select",{className:"tf-input",value:e.sort,onChange:a=>{e.onSort&&e.onSort(a.target.value)},children:e.sortOptions.map(a=>(0,U.jsx)("option",{value:a.value,children:a.label},a.value))})]}),e.views&&(0,U.jsx)(Bn,{size:"sm",value:e.view,onChange:e.onView,label:"View",options:e.views.map(a=>({value:a,icon:a==="grid"?"grid":a==="map"?"map":"list",label:a==="grid"?"Grid":a==="map"?"Map":"List"}))})]})}function ug(e){return(0,U.jsxs)("div",{className:b("tf-saved",e.enabled===!1&&"off"),children:[(0,U.jsxs)("div",{className:"tf-saved-head",children:[(0,U.jsx)(ie,{icon:e.icon||"search",tint:e.tint||"sky",size:36}),(0,U.jsxs)("div",{className:"tf-option-text",style:{flex:1,minWidth:0},children:[(0,U.jsx)("b",{children:e.name}),(0,U.jsx)("small",{children:[e.lastRun&&`Checked ${e.lastRun}`,e.frequency].filter(Boolean).join(" \xB7 ")})]}),(e.newCount??0)>0&&(0,U.jsx)("span",{className:"tf-nav-count",children:F(e.newCount??0)}),e.onToggle&&(0,U.jsx)(Ra,{checked:e.enabled!==!1,onChange:e.onToggle,label:"Enabled"})]}),(0,U.jsx)("div",{className:"tf-saved-crit",children:(e.criteria||[]).map((t,n)=>(0,U.jsx)("span",{className:"tf-saved-chip",children:t},n))}),(e.onOpen||e.onEdit)&&(0,U.jsxs)("div",{className:"tf-row",style:{justifyContent:"flex-end"},children:[e.onEdit&&(0,U.jsx)(Q,{size:"sm",variant:"ghost",icon:"edit",onClick:e.onEdit,children:"Edit"}),e.onOpen&&(0,U.jsx)(Q,{size:"sm",variant:"soft",onClick:e.onOpen,children:e.openLabel||"Show results"})]})]})}function fg(e){let t=e.low,n=e.high,a=e.value,l=n-t||1,i=(a-t)/l*100,c=e.confidence,s=c==null?null:c>=.75?["ok","High confidence"]:c>=.5?["warn","Medium confidence"]:["danger","Low confidence"];return(0,U.jsxs)("div",{className:"tf-valuation",children:[(0,U.jsxs)("div",{className:"tf-valuation-head",children:[(0,U.jsx)("span",{className:"tf-menu-label",style:{padding:0},children:e.title||"Estimated value"}),s&&(0,U.jsx)(Ue,{status:s[0],label:e.confidenceLabel||s[1],size:"sm"})]}),(0,U.jsx)("div",{className:"tf-valuation-val",children:me(a,e.currency)}),e.perSqm!=null&&(0,U.jsx)("span",{className:"tf-valuation-sub",children:me(e.perSqm,e.currency)+" / m\xB2"+(e.compare?" \xB7 "+e.compare:"")}),(0,U.jsxs)("div",{className:"tf-valuation-range",role:"img","aria-label":`Range ${me(t,e.currency)} to ${me(n,e.currency)}`,children:[(0,U.jsxs)("div",{className:"tf-valuation-bar",children:[e.asking!=null&&(0,U.jsx)("span",{className:"tf-valuation-ask",style:{left:Math.max(0,Math.min(100,(e.asking-t)/l*100))+"%"},title:"Asking price"}),(0,U.jsx)("span",{className:"tf-valuation-mark",style:{left:i+"%"}})]}),(0,U.jsxs)("div",{className:"tf-valuation-ends",children:[(0,U.jsx)("span",{children:me(t,e.currency)}),(0,U.jsx)("span",{children:me(n,e.currency)})]})]}),e.asking!=null&&(0,U.jsx)("span",{className:b("tf-valuation-diff",e.asking>n?"bad":e.asking<t?"good":""),children:`Asking price ${me(e.asking,e.currency)} \xB7 `+(e.asking>a?"+":"")+F((e.asking-a)/a,{style:"percent",maximumFractionDigits:1})}),e.facts&&(0,U.jsx)(Un,{dense:!0,items:e.facts}),e.note&&(0,U.jsx)("p",{className:"tf-card-desc",style:{margin:0},children:e.note}),e.action]})}var Zx=["A+","A","B","C","D","E","F","G","H"];function dg(e){let t=e.scale||Zx,n=t.indexOf(e.value);return(0,U.jsxs)("div",{className:"tf-energy",role:"img","aria-label":`Energy class ${e.value}`+(e.kwh!=null?", "+F(e.kwh)+" kWh/(m\xB2\xB7a)":""),children:[(0,U.jsx)("div",{className:"tf-energy-scale",style:{gridTemplateColumns:"repeat("+t.length+", 1fr)"},children:t.map((a,l)=>(0,U.jsx)("span",{className:b("tf-energy-c",l===n&&"on"),style:{"--e":l/(t.length-1)},children:a},a))}),(e.kwh!=null||e.kind)&&(0,U.jsx)("span",{className:"tf-energy-meta",children:[e.kwh!=null&&F(e.kwh)+" kWh/(m\xB2\xB7a)",e.kind].filter(Boolean).join(" \xB7 ")})]})}var Ye=q(pe(),1),zn=q(re(),1);var Jx={P:1,H3:1,BLOCKQUOTE:1,UL:1,OL:1,LI:1,B:1,STRONG:1,I:1,EM:1,U:1,A:1,BR:1},Fx={P:1,H3:1,BLOCKQUOTE:1,UL:1,OL:1};function mg(e){let t=document.createElement("div");return t.innerHTML=e||"",(function n(a){Array.from(a.childNodes).forEach(l=>{let i=l;if(i.nodeType===3)return;if(i.nodeType!==1||!Jx[i.tagName]){if(i.nodeType===1&&!/^(SCRIPT|STYLE|IFRAME|OBJECT)$/.test(i.tagName))for(n(i);i.firstChild;)a.insertBefore(i.firstChild,i);a.removeChild(i);return}let c=i.tagName==="A"?i.getAttribute("href"):null;Array.from(i.attributes).forEach(s=>{i.removeAttribute(s.name)}),i.tagName==="A"&&c&&/^(https?:|mailto:|tel:|\/|#|\{)/i.test(c)&&(i.setAttribute("href",c),i.setAttribute("rel","noopener noreferrer")),n(i)})})(t),Array.from(t.childNodes).forEach(n=>{if(n.nodeType===3?(n.textContent||"").trim():!Fx[n.tagName]){let a=document.createElement("p");t.insertBefore(a,n),a.appendChild(n)}else n.nodeType===3&&t.removeChild(n)}),t.innerHTML}function hg(e){let t=zn.useRef(null),n=zn.useState(0),a=zn.useState({}),l=zn.useState(!1),i=zn.useState(""),c=zn.useRef(null),s=zn.useRef({stack:[],i:-1,t:void 0});function r(){return t.current}function o(){let O=window.getSelection();if(!O||!O.rangeCount)return null;let L=O.getRangeAt(0);return t.current&&t.current.contains(L.commonAncestorContainer)?L:null}function u(O){let L=window.getSelection();L&&(L.removeAllRanges(),L.addRange(O))}function h(O,L){let B=O;for(;B&&B!==r();){if(B.nodeType===1&&L(B))return B;B=B.parentNode}return null}function f(O,L){let B=O;if(B===r()){let Z=r().childNodes;return Z[Math.max(0,Math.min(Z.length-1,(L||0)-(L?1:0)))]||null}for(;B&&B.parentNode!==r();)B=B.parentNode;return B&&B!==r()?B:null}function m(O){let L=o(),B=L&&{sc:L.startContainer,so:L.startOffset,ec:L.endContainer,eo:L.endOffset};if(O(L),B&&r().contains(B.sc)&&r().contains(B.ec))try{let Z=document.createRange();Z.setStart(B.sc,B.so),Z.setEnd(B.ec,B.eo),u(Z)}catch{}E(!0)}function p(O){let L=s.current;clearTimeout(L.t);function B(){let Z=r().innerHTML;L.stack[L.i]!==Z&&(L.stack=L.stack.slice(0,L.i+1).concat([Z]).slice(-100),L.i=L.stack.length-1)}O?B():L.t=setTimeout(B,400)}function M(){let O=r();O&&(n[1]((O.innerText??O.textContent??"").trim().length),e.onChange&&e.onChange(mg(O.innerHTML)))}function E(O){p(O),M(),y()}function y(){let O=o();if(!O)return a[1]({});let L=O.startContainer,B=f(L),Z=h(L,ce=>ce.tagName==="UL"||ce.tagName==="OL");a[1]({bold:!!h(L,ce=>ce.tagName==="B"||ce.tagName==="STRONG"),italic:!!h(L,ce=>ce.tagName==="I"||ce.tagName==="EM"),underline:!!h(L,ce=>ce.tagName==="U"),link:!!h(L,ce=>ce.tagName==="A"),heading:!!B&&B.tagName==="H3",quote:!!B&&B.tagName==="BLOCKQUOTE",list:!!Z&&Z.tagName==="UL",olist:!!Z&&Z.tagName==="OL"})}zn.useEffect(()=>(r().innerHTML=mg(e.defaultValue||e.value||"")||"<p><br></p>",n[1]((r().innerText??r().textContent??"").trim().length),p(!0),document.addEventListener("selectionchange",y),()=>{document.removeEventListener("selectionchange",y)}),[]);function v(O){let L=O.parentNode;for(;O.firstChild;)L.insertBefore(O.firstChild,O);L.removeChild(O)}function g(O,L){let B=o();if(!B)return;let Z=h(B.startContainer,Wt=>Wt.tagName===O||Wt.tagName===L);if(Z)return v(Z),E(!0);if(B.collapsed)return;let ce=document.createElement(O);ce.appendChild(B.extractContents()),Array.prototype.slice.call(ce.querySelectorAll(O+(L?","+L:""))).forEach(v),B.insertNode(ce);let at=document.createRange();at.selectNodeContents(ce),u(at),E(!0)}function S(O){let L=f(O.startContainer,O.startOffset),B=f(O.endContainer,O.endOffset),Z=[],ce=L;for(;ce&&(Z.push(ce),ce!==B);)ce=ce.nextSibling;return Z}function _(O){o()&&m(L=>{if(!L)return;let B=S(L),Z=B.every(ce=>ce.tagName===O);B.forEach(ce=>{(ce.tagName==="UL"||ce.tagName==="OL"?Array.from(ce.children):[ce]).forEach(Wt=>{let ul=document.createElement(Z?"P":O);for(;Wt.firstChild;)ul.appendChild(Wt.firstChild);r().insertBefore(ul,ce)}),r().removeChild(ce)})})}function X(O){o()&&m(L=>{if(!L)return;let B=S(L),Z=B[0];if(!Z)return;if(B.length===1&&Z.tagName===O){Array.from(Z.children).forEach(at=>{let Wt=document.createElement("P");for(;at.firstChild;)Wt.appendChild(at.firstChild);r().insertBefore(Wt,Z)}),r().removeChild(Z);return}let ce=document.createElement(O);r().insertBefore(ce,Z),B.forEach(at=>{(at.tagName==="UL"||at.tagName==="OL"?Array.from(at.children):[at]).forEach(ul=>{let Gl=document.createElement("LI");for(;ul.firstChild;)Gl.appendChild(ul.firstChild);ce.appendChild(Gl)}),r().removeChild(at)})})}function A(){let O=o();if(!O)return;c.current=O.cloneRange();let L=h(O.startContainer,B=>B.tagName==="A");i[1](L&&L.getAttribute("href")||""),l[1](!0)}function H(O){let L=c.current;if(l[1](!1),!L)return;r().focus(),u(L);let B=h(L.startContainer,at=>at.tagName==="A"),Z=i[0].trim();if(Z&&!/^(https?:|mailto:|tel:|\/|#|\{)/i.test(Z)&&(Z="https://"+Z),O||!Z)return B&&v(B),E(!0);if(B)return B.setAttribute("href",Z),E(!0);let ce=document.createElement("A");ce.setAttribute("href",Z),ce.setAttribute("rel","noopener noreferrer"),L.collapsed?ce.textContent=Z:ce.appendChild(L.extractContents()),L.insertNode(ce),E(!0)}function ue(O){let L=o();if(L||(r().focus(),L=o()),!L)return;L.deleteContents();let B=document.createTextNode(O);L.insertNode(B);let Z=document.createRange();Z.setStartAfter(B),Z.collapse(!0),u(Z),E(!0)}function W(O){let L=s.current;p(!0);let B=L.i+O;if(B<0||B>=L.stack.length)return;L.i=B,r().innerHTML=L.stack[B]??"";let Z=document.createRange();Z.selectNodeContents(r()),Z.collapse(!1),u(Z),M()}function Et(O){if(!(O.metaKey||O.ctrlKey))return;let B=O.key.toLowerCase();B==="b"?(O.preventDefault(),g("B","STRONG")):B==="i"?(O.preventDefault(),g("I","EM")):B==="u"?(O.preventDefault(),g("U")):B==="k"?(O.preventDefault(),A()):B==="z"?(O.preventDefault(),W(O.shiftKey?1:-1)):B==="y"&&(O.preventDefault(),W(1))}function It(O){O.preventDefault();let B=O.clipboardData.getData("text/plain").replace(/\r/g,"").split(`
|
|
30
|
-
`);if(ue(B[0]??""),B.length>1){let Z=o(),at=Z&&f(Z.startContainer,Z.startOffset);if(!at)return E(!0);B.slice(1).forEach(ul=>{let Gl=document.createElement("P");Gl.textContent=ul;let bm=at;bm.parentNode?.insertBefore(Gl,bm.nextSibling),at=Gl});let Wt=document.createRange();Wt.selectNodeContents(at),Wt.collapse(!1),u(Wt),E(!0)}}function ds(){let O=r();(!O.firstChild||O.innerHTML==="<br>")&&(O.innerHTML="<p><br></p>"),Array.from(O.childNodes).forEach(L=>{if(L.nodeType===3&&(L.textContent||"").trim()){let B=document.createElement("P");O.insertBefore(B,L),B.appendChild(L);let Z=document.createRange();Z.selectNodeContents(B),Z.collapse(!1),u(Z)}}),E(!1)}let YN=[["bold",()=>{g("B","STRONG")},"Bold","B"],["italic",()=>{g("I","EM")},"Italic","I"],["underline",()=>{g("U")},"Underline","U"],"-",["heading",()=>{_("H3")},"Heading"],["quote",()=>{_("BLOCKQUOTE")},"Quote"],["list",()=>{X("UL")},"Bulleted list"],["olist",()=>{X("OL")},"Numbered list"],"-",["link",A,"Link","K"],"-",["undo",()=>{W(-1)},"Undo","Z"],["redo",()=>{W(1)},"Redo"]],gm=e.maxLength&&n[0]>e.maxLength,GN=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform||"")?"\u2318":"Ctrl+";return(0,Ye.jsx)(dt,{label:e.label,hint:e.hint,error:e.error,children:(0,Ye.jsxs)("div",{className:b("tf-rte",gm&&"invalid"),children:[(0,Ye.jsxs)("div",{className:"tf-rte-bar",role:"toolbar","aria-label":"Formatting",children:[YN.map((O,L)=>{if(O==="-")return(0,Ye.jsx)("span",{className:"tf-rte-sep","aria-hidden":!0},L);let B=(0,Ye.jsx)("button",{type:"button",className:b("tf-rte-btn",a[0][O[0]]&&"on"),title:O[2]+(O[3]?" ("+GN+O[3]+")":""),"aria-label":O[2],"aria-pressed":O[0]==="undo"||O[0]==="redo"?void 0:!!a[0][O[0]],disabled:e.disabled,onMouseDown:Z=>{Z.preventDefault()},onClick:O[1],children:(0,Ye.jsx)(N,{name:O[0],size:15})},L);return O[0]==="link"?(0,Ye.jsx)(Be,{width:300,open:l[0],onOpenChange:l[1],trigger:B,children:(0,Ye.jsxs)("form",{className:"tf-col",style:{gap:8},onSubmit:Z=>{Z.preventDefault(),H(!1)},children:[(0,Ye.jsx)("input",{className:"tf-input",autoFocus:!0,value:i[0],onChange:Z=>{i[1](Z.target.value)},placeholder:"Link address","aria-label":"Link address",inputMode:"url"}),(0,Ye.jsxs)("div",{className:"tf-row",style:{justifyContent:"flex-end",gap:8},children:[a[0].link&&(0,Ye.jsx)(Q,{size:"sm",variant:"ghost",onClick:()=>{H(!0)},children:"Remove link"}),(0,Ye.jsx)(Q,{size:"sm",type:"submit",children:"Apply"})]})]})},L):B}),e.variables&&e.variables.length>0&&(0,Ye.jsx)(Be,{width:240,trigger:O=>(0,Ye.jsxs)("button",{type:"button",className:"tf-rte-var",onMouseDown:L=>{L.preventDefault()},onClick:O.toggle,"aria-expanded":O.open,children:["{ }",(0,Ye.jsx)("span",{children:"Insert field"})]}),children:O=>(0,Ye.jsx)("div",{className:"tf-menu",children:(e.variables||[]).map(L=>(0,Ye.jsxs)("button",{type:"button",className:"tf-menu-item",onMouseDown:B=>{B.preventDefault()},onClick:()=>{ue("{"+L.key+"}"),O.close&&O.close()},children:[(0,Ye.jsx)("span",{style:{flex:1},children:L.label}),(0,Ye.jsx)("code",{children:"{"+L.key+"}"})]},L.key))})})]}),(0,Ye.jsx)("div",{ref:t,className:"tf-rte-area",contentEditable:!e.disabled,role:"textbox","aria-multiline":"true","aria-label":typeof e.label=="string"?e.label:"Text","data-placeholder":e.placeholder||"",suppressContentEditableWarning:!0,onInput:ds,onKeyDown:Et,onPaste:It,onBlur:M,style:{minHeight:e.minHeight||160}}),(e.maxLength||e.footer)&&(0,Ye.jsxs)("div",{className:"tf-rte-foot",children:[e.footer,e.maxLength&&(0,Ye.jsx)("span",{className:b("tf-rte-count",gm&&"over"),children:F(n[0])+" / "+F(e.maxLength)})]})]})})}var le=q(pe(),1),Da=q(re(),1);function uu(e){return(0,le.jsxs)("nav",{className:"tf-topbar","aria-label":"Main",children:[e.brand&&(0,le.jsxs)("span",{className:"tf-brand",children:[e.brand,(0,le.jsx)("span",{className:"tf-brand-dot","aria-hidden":!0}),e.tag&&(0,le.jsx)("span",{className:"tf-brand-tag",children:e.tag})]}),(0,le.jsx)("div",{className:"tf-nav",children:(e.items||[]).map(t=>{let n=t.label===e.active;return(0,le.jsxs)("button",{type:"button",className:"tf-nav-item","aria-current":n?"page":void 0,title:t.label,onClick:()=>{e.onNavigate&&e.onNavigate(t.label)},children:[(0,le.jsx)(N,{name:t.icon}),(0,le.jsx)("span",{className:"tf-nav-label",children:t.label}),t.count?(0,le.jsx)("span",{className:"tf-nav-count",children:t.count}):null]},t.label)})}),e.extra&&(0,le.jsx)("div",{className:"tf-topbar-extra",children:e.extra}),e.user&&(0,le.jsxs)("button",{type:"button",className:"tf-user","aria-haspopup":"menu","aria-expanded":e.userOpen?"true":"false",onClick:e.onUser,children:[(0,le.jsx)(qe,{name:e.user.name,size:28}),(0,le.jsxs)("span",{className:"tf-user-text",children:[(0,le.jsx)("span",{className:"tf-user-name",children:e.user.name}),e.user.email&&(0,le.jsx)("span",{className:"tf-user-mail",children:e.user.email})]}),(0,le.jsx)(N,{name:"chevronDown",size:14})]})]})}function vg(e,t){return(0,le.jsxs)("button",{type:"button",className:"tf-rail-btn",style:{animationDelay:`calc(${200+t*50}ms * var(--motion-time, 1))`},"aria-label":e.count?`${e.label}, ${e.count}`:e.label,title:e.label,"aria-current":e.active?"page":void 0,onClick:e.onClick,children:[(0,le.jsx)(N,{name:e.icon}),e.count?(0,le.jsx)("span",{className:"tf-dotcount",children:e.count}):null]},e.label)}function fu(e){return(0,le.jsxs)("aside",{className:"tf-rail","aria-label":"Tools",children:[(0,le.jsx)("div",{className:"tf-rail-group",children:(e.top||[]).map(vg)}),(0,le.jsx)("div",{className:"tf-rail-group",children:(e.bottom||[]).map((t,n)=>vg(t,n+3))})]})}function du(e){return(0,le.jsx)("div",{className:b("tf-dock",e.surface&&"tf-"+e.surface,e.className),style:e.style,role:"toolbar","aria-label":e.label||"Quick actions",children:(e.items||[]).map(t=>(0,le.jsx)("button",{type:"button",className:b("tf-dock-btn","tf-t-"+(t.tint||"plain")),"aria-label":t.label,title:t.label,onClick:t.onClick,children:(0,le.jsx)(N,{name:t.icon})},t.label))})}function gg(e){let t=e.surface??"glass";return(0,le.jsxs)("div",{className:b("tf-floating",e.className),style:{minHeight:e.height??640,...e.style},role:"region","aria-label":e.label,"data-surface":t,children:[e.background!=null&&(0,le.jsx)("div",{className:"tf-floating-bg",children:e.background}),(0,le.jsxs)("div",{className:"tf-floating-ui",children:[e.top!=null&&(0,le.jsx)("div",{className:"tf-floating-top",children:e.top}),e.start!=null&&(0,le.jsx)("div",{className:"tf-floating-start",children:e.start}),e.end!=null&&(0,le.jsx)("div",{className:"tf-floating-end",children:e.end}),e.bottom!=null&&(0,le.jsx)("div",{className:"tf-floating-bottom",children:e.bottom})]}),e.children]})}function bg(e){let t=Da.useRef(null),[n,a]=Da.useState(!1),l=e.animate!==!1&&!e.src&&!e.children;Da.useEffect(()=>{let r=t.current;if(!r||!l||typeof IntersectionObserver>"u")return;let o=new IntersectionObserver(u=>a(!u.some(h=>h.isIntersecting)));return o.observe(r),()=>o.disconnect()},[l]);let i=Da.useRef(null);Da.useEffect(()=>{let r=i.current;r&&Cn(r)&&r.pause()},[e.src]);let c=e.colors?.length?e.colors:["var(--ambient-1)","var(--ambient-2)","var(--ambient-3)","var(--ambient-4)"],s=!!e.src&&!e.children;return(0,le.jsx)("div",{ref:t,"aria-hidden":!0,className:b("tf-ambient",e.fixed&&"fixed",s&&"media",!l&&"still",e.className),style:e.style,"data-paused":n?"":void 0,children:e.children??(s?e.video?(0,le.jsx)("video",{ref:i,className:"tf-ambient-media",src:e.src,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):(0,le.jsx)("img",{className:"tf-ambient-media",src:e.src,alt:""}):c.map((r,o)=>(0,le.jsx)("span",{className:"tf-ambient-field",style:{"--field":r}},o)))})}var mu=()=>[{label:"Home",icon:"home"},{label:"People",icon:"users"},{label:"Projects",icon:"grid"},{label:"Inbox",icon:"mail"},{label:"Calendar",icon:"calendar"},{label:"Billing",icon:"card"},{label:"Reports",icon:"chart"},{label:"Settings",icon:"settings"}],$x=()=>[{label:"Share",icon:"share",active:!0},{label:"List view",icon:"menu"},{label:"Grid view",icon:"grid"}],Ix=()=>[{label:"Notifications",icon:"bell",count:3},{label:"Zoom in",icon:"plus"},{label:"Zoom out",icon:"minus"}],Wx=()=>[{label:"Invite",icon:"users",tint:"sky"},{label:"New page",icon:"file",tint:"lilac"},{label:"New invoice",icon:"card",tint:"blush"},{label:"Announce",icon:"send",tint:"butter"},{label:"Export",icon:"download",tint:"mint"},{label:"More",icon:"plus"}];function yg(e){return(0,le.jsxs)("div",{className:b("tf-shell",e.className),style:e.style,children:[(0,le.jsx)(uu,{brand:e.brand,tag:e.tag,active:e.active,items:e.nav||mu(),onNavigate:e.onNavigate,user:e.user,extra:e.topExtra}),(0,le.jsxs)("div",{className:b("tf-sheet",!e.side&&"tf-sheet-2"),style:e.sheetStyle,children:[(0,le.jsx)(fu,{top:e.railTop||$x(),bottom:e.railBottom||Ix()}),(0,le.jsx)("main",{className:b("tf-main",e.dock!==!1&&"tf-main-dock"),children:e.children},e.contentKey),e.side||null,e.dock!==!1&&(0,le.jsx)("div",{className:"tf-dock-float",children:(0,le.jsx)(du,{items:e.dockItems||Wx()})})]})]})}var fe=q(pe(),1),ni=q(re(),1);function pg(e){let t=J(e.open,!1,e.onOpenChange);return(0,fe.jsxs)("div",{className:b("tf-launch",t[0]&&"open",e.inline&&"inline"),children:[t[0]&&(0,fe.jsxs)("div",{className:"tf-launch-panel",role:"dialog","aria-label":e.title||"Assistant",children:[(0,fe.jsxs)("div",{className:"tf-launch-head",children:[(0,fe.jsx)(Gt,{tint:e.tint||"lilac",size:32}),(0,fe.jsxs)("div",{className:"tf-option-text",style:{flex:1},children:[(0,fe.jsx)("b",{children:e.title||"Assistant"}),e.context&&(0,fe.jsx)("small",{children:e.context})]}),e.headerAction,(0,fe.jsx)($,{icon:"x",size:"sm",label:"Close",onClick:()=>{t[1](!1)}})]}),(0,fe.jsx)("div",{className:"tf-launch-body",children:e.children}),e.composer&&(0,fe.jsx)("div",{className:"tf-launch-foot",children:e.composer})]}),(0,fe.jsxs)("button",{type:"button",className:"tf-launch-btn","aria-label":t[0]?"Close assistant":e.title||"Open assistant","aria-expanded":t[0],onClick:()=>{t[1](!t[0])},children:[(0,fe.jsx)(N,{name:t[0]?"x":"sparkle",size:22}),!t[0]&&(e.unread??0)>0&&(0,fe.jsx)("span",{className:"tf-nav-count",children:e.unread})]})]})}function Ng(e){let t=ni.useState(!1),n=ni.useState((e.categories||[]).reduce((l,i)=>(l[i.id]=!!(i.required||i.default),l),{}));if(e.open===!1)return null;function a(l){let i=Object.assign({},n[0]);(e.categories||[]).forEach(c=>{l===!0&&(i[c.id]=!0),l===!1&&(i[c.id]=!!c.required)}),e.onSave&&e.onSave(i)}return(0,fe.jsxs)("div",{className:b("tf-cookie",e.inline&&"inline"),role:"dialog","aria-label":e.title||"Privacy settings",children:[(0,fe.jsxs)("div",{className:"tf-row",style:{gap:12,alignItems:"flex-start",flexWrap:"nowrap"},children:[(0,fe.jsx)(ie,{icon:"cookie",tint:"butter",size:36}),(0,fe.jsxs)("div",{className:"tf-col",style:{gap:4},children:[(0,fe.jsx)("b",{children:e.title||"Privacy settings"}),(0,fe.jsxs)("p",{className:"tf-card-desc",style:{margin:0},children:[e.text||"We use cookies to run this site and, with your consent, to measure and improve it.",e.policy&&(0,fe.jsxs)(ni.Fragment,{children:[" ",e.policy]})]})]})]}),t[0]&&(0,fe.jsx)("div",{className:"tf-cookie-cats",children:(e.categories||[]).map(l=>(0,fe.jsxs)("div",{className:"tf-cookie-cat",children:[(0,fe.jsxs)("div",{className:"tf-option-text",style:{flex:1},children:[(0,fe.jsx)("b",{children:l.label}),l.text&&(0,fe.jsx)("small",{children:l.text})]}),l.required?(0,fe.jsx)("span",{className:"tf-card-desc",children:"Always on"}):(0,fe.jsx)(Ra,{checked:!!n[0][l.id],onChange:()=>{let i=Object.assign({},n[0]);i[l.id]=!i[l.id],n[1](i)}})]},l.id))}),(0,fe.jsxs)("div",{className:"tf-cookie-actions",children:[t[0]?(0,fe.jsx)(Q,{variant:"secondary",onClick:()=>{a(void 0)},children:"Save choice"}):(0,fe.jsx)(Q,{variant:"ghost",onClick:()=>{t[1](!0)},children:"Settings"}),(0,fe.jsx)(Q,{variant:"secondary",onClick:()=>{a(!1)},children:"Only necessary"}),(0,fe.jsx)(Q,{onClick:()=>{a(!0)},children:"Accept all"})]})]})}function xg(e){let t=ni.useState(!1);return t[0]?null:(0,fe.jsxs)("div",{className:b("tf-announce","tf-t-"+(e.tint||"butter")),role:"status",children:[e.icon!==!1&&(0,fe.jsx)(N,{name:e.icon||"sparkle",size:15}),(0,fe.jsx)("span",{children:e.children}),e.action,e.onDismiss!==!1&&(0,fe.jsx)("button",{type:"button",className:"tf-announce-x","aria-label":"Dismiss",onClick:()=>{t[1](!0),e.onDismiss&&e.onDismiss()},children:(0,fe.jsx)(N,{name:"x",size:14})})]})}var Ie=q(pe(),1),YM=q(re(),1);function Cg(e){let t=e.code||"404",n={404:["Page not found","The link may be old, or the page moved. Nothing is broken on your side.","search","sky"],500:["Something broke on our side","We\u2019ve been notified and are on it. Your data is safe; try again in a minute.","x","blush"],maintenance:["Back in a few minutes","We\u2019re upgrading the database. Everything you saved is safe.","settings","butter"],offline:["You\u2019re offline","Changes are kept on this device and sync when you\u2019re back.","globe","lilac"],403:["You don\u2019t have access","Ask a workspace owner to invite you to this area.","lock","lilac"]}[t]||[e.title,e.text,"sparkle","sky"];return(0,Ie.jsxs)("div",{className:"tf-status-screen",children:[(0,Ie.jsxs)("div",{className:"tf-status-art","aria-hidden":!0,children:[/^\d+$/.test(t)&&(0,Ie.jsx)("span",{className:"tf-status-code",children:t}),(0,Ie.jsx)(ie,{icon:e.icon||n[2],tint:e.tint||n[3],size:56})]}),(0,Ie.jsx)("h1",{children:e.title||n[0]}),(0,Ie.jsx)("p",{children:e.text||n[1]}),e.extra,(0,Ie.jsx)("div",{className:"tf-row",style:{justifyContent:"center"},children:e.actions||[(0,Ie.jsx)(Q,{icon:"home",onClick:e.onHome,children:"Back to overview"},"h"),(0,Ie.jsx)(Q,{variant:"secondary",icon:"mail",onClick:e.onContact,children:"Contact support"},"s")]}),e.reference&&(0,Ie.jsx)("span",{className:"tf-status-ref",children:`Reference ${e.reference}`})]})}function Sg(e){return(0,Ie.jsxs)("div",{className:"tf-auth",children:[e.brand&&(0,Ie.jsxs)("div",{className:"tf-auth-brand",children:[(0,Ie.jsx)("span",{className:"tf-brand-word",children:e.brand}),(0,Ie.jsx)("span",{className:"tf-brand-dot"})]}),e.icon&&(0,Ie.jsx)(ie,{icon:e.icon,tint:e.tint||"sky",size:48}),(0,Ie.jsxs)("div",{className:"tf-col",style:{gap:8},children:[(0,Ie.jsx)("h1",{className:"tf-auth-title",children:e.title}),e.text&&(0,Ie.jsx)("p",{className:"tf-auth-text",children:e.text})]}),e.children,e.foot&&(0,Ie.jsx)("div",{className:"tf-auth-foot",children:e.foot})]})}var Xe=q(re(),1),Do=q(xs(),1),jN=q(TN(),1);var EN=/^\d{4}-\d{2}-\d{2}(?:[T ][\d:.]+(?:Z|[+-]\d{2}:?\d{2})?)?$/,MN=/^\s*-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?\s*$/i;function dm(e){let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}function n5(e,t){return typeof t=="string"&&EN.test(t)?dm(t)??t:t}function kN(e,t){if(t===null)return;if(e.flags.includes("?")&&t==="null")return null;switch(e.kind){case"b":return t!=="false";case"n":return MN.test(t)?Number(t):void 0;case"x":return MN.test(t)?Number(t):t;case"s":return e.flags.includes("!")&&t==="false"?!1:t;case"d":return dm(t);case"r":return t;case"R":case"K":case"j":{let a=t.trim();try{return JSON.parse(a,e.flags.includes("t")?n5:void 0)}catch{return e.kind==="R"?[t]:e.flags.includes("t")&&EN.test(a)?dm(a):e.flags.includes("l")?a.split(",").map(l=>l.trim()).filter(Boolean):t}}default:return}}function zN(e){if(!e||!e.trim())return;let t={};for(let n of e.split(/;(?![^(]*\))/)){let a=n.indexOf(":");if(a<0)continue;let l=n.slice(0,a).trim(),i=n.slice(a+1).trim();!l||!i||(t[l.startsWith("--")?l:l.replace(/-([a-z])/g,(c,s)=>s.toUpperCase())]=i)}return t}function wN(e){if(!e||typeof e!="object"||!("nativeEvent"in e)||!("target"in e))return e;let t=e.target;return t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")?t.checked:t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement?t.value:null}function RN(e){return!!e&&typeof e=="object"&&"nativeEvent"in e&&"target"in e}function AN(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase()}function _N(e){return e.replace(/-([a-z0-9])/g,(t,n)=>n.toUpperCase())}var Ao=e=>e?e.split(" ").filter(Boolean):[];function DN(e){let t=Ao(e.p).map(l=>{let[i="",c="j"]=l.split(":");return{name:i,attr:AN(i),kind:c.charAt(0),flags:c.slice(1)}}),n=Ao(e.e).map(l=>{let[i="",c="0"]=l.split(":");return{prop:i,type:i.slice(2).toLowerCase(),arity:parseInt(c,10)||0,conditional:c.endsWith("?")}}),a=Ao(e.s).map(l=>{let[i="",c="",s="detail"]=l.split(":");return{event:i,prop:c,from:s==="false"?"false":"detail"}});return{tag:e.t,component:e.c,props:t,byAttr:new Map(t.map(l=>[l.attr,l])),byName:new Map(t.map(l=>[l.name,l])),events:n,byType:new Map(n.map(l=>[l.type,l])),sync:a,dismiss:new Set(Ao(e.x)),dialog:!!e.dialog,closeChildren:!!e.close}}var mm=new WeakSet,a5=new Set(["title","role","lang"]),LN=new Set(["id","slot","hidden","children","className","style","dir","inert","autofocus","tabIndex","accessKey","draggable","translate","spellcheck","contentEditable","nonce","part","popover","innerHTML","textContent"]),ON="tf-root",hm=0;function _o(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Sa)return t;return null}function l5(e,t){for(let n=e.parentNode;n&&n!==t;n=n.parentNode){if(n===t._stash)return"stash";let a=n.__tfSlot;if(a)return a.owner===t?a:null}return null}var i5=e=>e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&!/^\s*\n\s*$/.test(e.nodeValue??"")&&e.nodeValue!=="";function HN({el:e}){return(0,Xe.useSyncExternalStore)(e._subscribe,e._snapshot,e._snapshot),(0,Xe.useLayoutEffect)(()=>{e._sweep()}),e._view()}function vm({owner:e,nodes:t}){let n=(0,Xe.useRef)(null),[a,l]=(0,Xe.useState)([]),i=(0,Xe.useMemo)(()=>{let c=[],s={owner:e,rescan(){let r=n.current;if(!r||!r.isConnected)return;let o=[];for(let u of r.querySelectorAll("*"))u instanceof Sa&&_o(u)===e&&u.isConnected&&o.push(u);for(let u of o)u._slot!==s&&u._enterPortal(s);for(let u of c)!o.includes(u)&&u._slot===s&&u._leave();(o.length!==c.length||o.some((u,h)=>u!==c[h]))&&(c=o,l(o))},release(r){c.includes(r)&&(c=c.filter(o=>o!==r),l(c))}};return s},[e]);return(0,Xe.useLayoutEffect)(()=>{let c=n.current;if(!c)return;if(c.__tfSlot=i,!(c.childNodes.length===t.length&&t.every((h,f)=>c.childNodes[f]===h)))for(let h of t)c.appendChild(h);let r=!1,o=()=>{r||(r=!0,queueMicrotask(()=>{r=!1,i.rescan()}))};o();let u=new MutationObserver(h=>{for(let f of h)for(let m of[f.addedNodes,f.removedNodes])for(let p of m)if(p instanceof Element&&(p instanceof Sa||p.querySelector(Sa.selector)))return o()});return u.observe(c,{childList:!0,subtree:!0}),()=>{u.disconnect(),queueMicrotask(()=>e._sweep())}},[t,i,e]),(0,Xe.createElement)("span",{ref:n,"data-tf-slot":"",style:{display:"contents"}},a.map(c=>c._mount?(0,Do.createPortal)((0,Xe.createElement)(HN,{el:c}),c._mount,c._mountKey):null))}function c5({onClose:e,children:t}){let n=(0,Xe.useRef)(null);return dl(n,e),(0,Xe.useEffect)(()=>{let a=setTimeout(()=>{let l=n.current,i=l?.querySelector('[autofocus], input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select'),c=document.activeElement,s=c instanceof HTMLInputElement||c instanceof HTMLTextAreaElement||c instanceof HTMLSelectElement;l&&i&&!(s&&l.contains(c))&&i.focus()},30);return()=>clearTimeout(a)},[]),(0,Xe.createElement)("div",{ref:n,"data-tf-dialog":"",style:{position:"fixed",inset:0,zIndex:85,overflowY:"auto"},onClick:a=>{a.target instanceof Element&&a.target.classList.contains("tf-backdrop")&&e?.()}},t)}var Sa=class e extends HTMLElement{static def;static component;static selector="tf-provider";_key=`tf${(++hm).toString(36)}`;_values=new Map;_fns=new Map;_slots=null;_views=new Map;_root=null;_mount=null;_mountKey="";_slot=null;_stash=null;_rendered=!1;_version=0;_subs=new Set;_listeners=new Map;_callbacks=new Map;_closeFn;_stripping=new Set;_waiting=!1;_observer=null;constructor(){super();let t=this._def;for(let a of t.events)a.type!=="click"&&HTMLElement.prototype.addEventListener.call(this,a.type,l=>{!mm.has(l)&&l.target!==this&&this._isOwnDom(l.target)&&l.stopImmediatePropagation()});if(t.closeChildren){let a=l=>{l.target!==this&&mm.has(l)&&this._closeFn?.()};HTMLElement.prototype.addEventListener.call(this,"close",a),this._listeners.set("close",new Set([a]))}let n=this;for(let a of[...t.props.map(l=>l.name),...t.events.map(l=>l.prop)])if(!LN.has(a)&&Object.prototype.hasOwnProperty.call(this,a)){let l=n[a];delete n[a],n[a]=l}}get _def(){return this.constructor.def}connectedCallback(){this._waiting||(document.readyState==="loading"?(this._waiting=!0,document.addEventListener("DOMContentLoaded",()=>{this._waiting=!1,this._attach()},{once:!0})):queueMicrotask(()=>this._attach()))}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||this._leave()})}attributeChangedCallback(t,n,a){if(a===null&&this._stripping.delete(t))return;let i=this._def.byAttr.get(t);if(i){let c=kN(i,a);c===void 0?this._values.delete(i.name):this._values.set(i.name,c),a5.has(t)&&a!==null&&(this._stripping.add(t),this.removeAttribute(t))}this._bump()}_attach(){if(!this.isConnected)return;let t=_o(this);if(t){let l=l5(this,t);if(l==="stash")return;if(l){this._slot!==l&&l.rescan();return}if(!t._rendered)return}if(this._root)return;this._leave(),this._prepare();let n=this._newMount(),a=(0,jN.createRoot)(n,{identifierPrefix:`${this._key}-`});this._root=a,(0,Do.flushSync)(()=>a.render((0,Xe.createElement)(HN,{el:this})))}_leave(){let t=this._root,n=this._slot;this._root=null,this._slot=null,this._mount?.remove(),this._mount=null,t&&t.unmount(),n?.release(this)}_enterPortal(t){this._leave(),this._prepare(),this._newMount(),this._slot=t}_newMount(){let t=document.createElement(ON);return t.style.display="contents",this._mount=t,this._mountKey=`${this._key}-${(++hm).toString(36)}`,this.appendChild(t),t}_prepare(){if(!this._slots){this._slots=new Map;for(let t of[...this.childNodes])this._take(t);this._observer=new MutationObserver(t=>{if(this._mount&&this._mount.parentNode!==this){this._slots=null,this._views.clear(),this._observer?.disconnect(),this._leave(),this._attach();return}let n=!1;for(let a of t)for(let l of a.addedNodes)l.parentNode===this&&(n=this._take(l)||n);n&&(this._views.clear(),this._bump())}),this._observer.observe(this,{childList:!0})}}_take(t){if(t===this._mount||t===this._stash||t instanceof Element&&t.localName===ON||!i5(t))return!1;let n=t instanceof Element?t.getAttribute("slot"):null,a="children";if(n){let l=n.indexOf(":"),i=_N(l<0?n:n.slice(0,l));a=l<0?i:`${i}:${n.slice(l+1)}`}return this._slots?.set(a,[...this._slots.get(a)??[],t]),!0}_sweep(){if(this._rendered=!0,!!this._slots){for(let t of this._slots.values())for(let n of t)if(n.parentNode===this||!this.contains(n)){if(!this._stash){let a=document.createElement("div");a.hidden=!0,a.dataset.tfStash="",this._stash=a}this._stash.parentNode!==this&&this.appendChild(this._stash),this._stash.appendChild(n)}}}_isOwnDom(t){for(let n=t;n&&n!==this;n=n.parentNode)if(n.__tfSlot?.owner===this)return!1;return!0}_subscribe=t=>(this._subs.add(t),()=>this._subs.delete(t));_snapshot=()=>this._version;_bump(){this._version++;for(let t of this._subs)t()}addEventListener(t,n,a){if(!n)return;super.addEventListener(t,n,a);let l=this._listeners.get(t);l||this._listeners.set(t,l=new Set);let i=l.size===0;l.add(n),i&&this._bumpTree(t)}removeEventListener(t,n,a){if(!n)return;super.removeEventListener(t,n,a);let l=this._listeners.get(t);l?.delete(n)&&l.size===0&&this._bumpTree(t)}_listens(t){let n=a=>{let l=a;return!!a._listeners.get(t)?.size||a.hasAttribute(`on${t}`)||typeof l[`on${t}`]=="function"||typeof l[`__${t}`]=="function"};if(n(this))return!0;for(let a=_o(this);a;a=_o(a))if(n(a))return!0;return!1}_bumpTree(t){this._def.byType.get(t)?.conditional&&this._bump();for(let n of this.querySelectorAll(e.selector))n instanceof e&&n._def.byType.get(t)?.conditional&&n._bump()}_slotView(t,n){let a=`${t}|${n?1:0}`;if(this._views.has(a))return this._views.get(a);let l=this._slots?.get(t),i;return l?.length&&(i=l.length===1&&!n?(0,Xe.createElement)(vm,{owner:this,nodes:l}):l.map((c,s)=>(0,Xe.createElement)(vm,{key:s,owner:this,nodes:[c]}))),this._views.set(a,i),i}_nodeView(t){if(t instanceof Node){let n=this._views.get(`node|${t.__tfKey??""}`);if(!n){let a=t.__tfKey??=`n${(++hm).toString(36)}`;n=(0,Xe.createElement)(vm,{key:a,owner:this,nodes:[t]}),this._views.set(`node|${a}`,n)}return n}return Array.isArray(t)?t.map(n=>this._nodeView(n)):t}_propValue(t){if(t.kind==="r"||t.kind==="R"){let a=this._slotView(t.name,t.kind==="R");if(a!==void 0)return a}if(t.kind==="K"&&this._slots){let a;for(let l of this._slots.keys())l.startsWith(`${t.name}:`)&&((a??={})[l.slice(t.name.length+1)]=this._slotView(l,!1));if(a)return{...this._values.get(t.name),...a}}if(t.kind==="f")return this._fns.get(t.name);let n=this._values.get(t.name);if(n!==void 0)return t.kind==="r"||t.kind==="R"?this._nodeView(n):n}_callback(t){let n=this._callbacks.get(t.prop);return n||(n=(...a)=>this._fire(t,a),this._callbacks.set(t.prop,n)),n}_fire(t,n){let a=this._fns.get(t.prop),l=a?a.apply(this,n):void 0,i=n[0];if(t.type==="click"&&RN(i)&&i.nativeEvent.type==="click")return l;let c=n.map(wN),s=t.arity>1?Array.from({length:Math.max(t.arity,c.length)},(o,u)=>c[u]):c.length?c[0]:null,r=new CustomEvent(t.type,{detail:s,bubbles:!0,composed:!0,cancelable:!0});return mm.add(r),this.dispatchEvent(r)&&this._after(t,c[0]),l}_after(t,n){let a=this._def,l=!1;for(let i of a.sync)i.event===t.prop&&this._values.get(i.prop)!==void 0&&(this._values.set(i.prop,i.from==="false"?!1:n),l=!0);l?this._bump():a.dismiss.has(t.prop)&&(this.hidden=!0)}_passes(t){return!t.conditional||this._fns.has(t.prop)||this._def.sync.some(n=>n.event===t.prop&&this._values.get(n.prop)!==void 0)?!0:this._listens(t.type)}_props(){let t=this._def,n={};for(let c of t.props){let s=this._propValue(c);s!==void 0&&(n[c.name]=s)}let a=this._slotView("children",!1);t.closeChildren?n.children=c=>(this._closeFn=c.close,a??null):a!==void 0&&(n.children=a);let l=this.getAttribute("class");l&&(n.className=l);let i=zN(this.getAttribute("style"));i&&(n.style=i);for(let c of t.events)this._passes(c)&&(n[c.prop]=this._callback(c));return n}_view(){if(this.hidden)return null;let t=this.constructor.component,n=this._props(),a=(0,Xe.createElement)(t,n);return this._def.dialog?(0,Xe.createElement)(c5,{onClose:n.onClose},a):a}};function BN(e,t){let n=[...e.props.filter(c=>c.kind!=="f").map(c=>c.attr),...e.events.map(c=>`on${c.type}`),"class","style","hidden"];class a extends Sa{static def=e;static component=t;static observedAttributes=[...new Set(n)]}let l=a.prototype,i=(c,s,r)=>{LN.has(c)||Object.defineProperty(l,c,{configurable:!0,enumerable:!0,get:s,set:r})};for(let c of e.props)i(c.name,function(){return c.kind==="f"?this._fns.get(c.name):this._values.get(c.name)},function(s){c.kind==="f"?typeof s=="function"?this._fns.set(c.name,s):this._fns.delete(c.name):s===void 0?this._values.delete(c.name):this._values.set(c.name,s),this._views.clear(),this._bump()});for(let c of e.events)i(c.prop,function(){return this._fns.get(c.prop)},function(s){typeof s=="function"?this._fns.set(c.prop,s):this._fns.delete(c.prop),this._bump()});return a}var Oo=[{t:"tf-provider",c:"UIProvider",p:"kit:s theme:s density:s scope:s tokens:j surface:s motion:s"},{t:"tf-icon",c:"Icon",p:"name:s size:n label:s"},{t:"tf-range-slider",c:"RangeSlider",p:"label:r min:n max:n step:n value:j defaultValue:j unit:s inputs:b openEnd:b format:f hint:r",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-bar-list",c:"BarList",p:"items:j format:f label:s",e:"onPick:1?"},{t:"tf-status-select",c:"StatusSelect",p:"options:j value:s defaultValue:s size:s label:s width:n",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-tile-picker",c:"TilePicker",p:"options:j value:j defaultValue:j multiple:b min:n label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-live-feed",c:"LiveFeed",p:"items:j types:j paused:b maxHeight:n emptyText:s",e:"onPause:1"},{t:"tf-map-view",c:"MapView",p:"points:j bounds:j background:r bubbles:b selected:x? renderPopup:f legend:r controls:r height:x label:s surface:s",e:"onSelect:1"},{t:"tf-balance-card",c:"BalanceCard",p:"name:s sub:r logo:r icon:s tint:s balance:n currency:s perDay:n low:n spark:j status:s statusLabel:s topUpLabel:s action:r",e:"onTopUp:0?"},{t:"tf-service-monitor",c:"ServiceMonitor",p:"items:j label:s"},{t:"tf-run-history",c:"RunHistory",p:"items:j label:s"},{t:"tf-webhook-endpoint",c:"WebhookEndpoint",p:"url:s events:jl status:s statusLabel:s successRate:n enabled:b secret:r deliveries:j menu:jl defaultOpen:b",e:"onToggle:0? onRetry:1?"},{t:"tf-backup-list",c:"BackupList",p:"items:j footer:r label:s",e:"onDownload:1? onRestore:1?"},{t:"tf-block-list",c:"BlockList",p:"items:j addLabel:s removeLabel:s searchPlaceholder:s emptyText:s",e:"onAdd:0? onRemove:1?"},{t:"tf-review-card",c:"ReviewCard",p:"author:s verified:b product:s date:s rating:n title:s text:s state:s stateLabel:s highlight:jl reply:s replyLabel:s",e:"onPublish:0? onHide:0? onReply:1?"},{t:"tf-coupon-card",c:"CouponCard",p:"code:s kind:s value:n currency:s used:n limit:n until:s min:n revenue:n text:r status:s statusLabel:s menu:jl",e:"onCopy:0"},{t:"tf-locale-field",c:"LocaleField",p:"label:r locales:j value:j defaultValue:j source:s active:s multiline:b rows:n placeholder:s hint:r error:r",e:"onChange:1 onTranslate:2?",s:"onChange:value:detail"},{t:"tf-locale-switcher",c:"LocaleSwitcher",p:"languages:j language:s currencies:jl currency:s variant:s",e:"onLanguage:1 onCurrency:1"},{t:"tf-workspace-switcher",c:"WorkspaceSwitcher",p:"items:j value:s label:s footer:r variant:s width:n",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-export-dialog",c:"ExportDialog",p:"open:b inline:b title:s text:r count:n formats:jl format:s columns:j ranges:b range:jt note:r download:r doneText:s",e:"onClose:0 onExport:2 onDownload:0",s:"onClose:open:false",x:"onClose"},{t:"tf-two-factor-setup",c:"TwoFactorSetup",p:"qr:r secret:s codes:jl step:n scanText:s codesText:s",e:"onVerify:1? onDownload:0? onDone:0"},{t:"tf-color-field",c:"ColorField",p:"label:r value:s defaultValue:s against:s! hint:r",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-agent-card",c:"AgentCard",p:"name:s role:s tint:s status:s statusLabel:s model:s cost:s last:r",e:"onClick:0? onChat:0?"},{t:"tf-agent-details",c:"AgentDetails",p:"name:s role:s tint:s status:s statusLabel:s sections:j actions:R"},{t:"tf-chat-list",c:"ChatList",p:"groups:j selected:s filters:r searchPlaceholder:s",e:"onSelect:1 onSearch:1"},{t:"tf-chat-workspace",c:"ChatWorkspace",p:"list:r thread:r details:r"},{t:"tf-search-hits",c:"SearchHits",p:"items:j query:s emptyText:s",e:"onOpen:1"},{t:"tf-thinking-line",c:"ThinkingLine",p:"text:s"},{t:"tf-feedback-rating",c:"FeedbackRating",p:"value:s? label:s placeholder:s thanks:s askOnUp:b",e:"onRate:1 onSubmit:2"},{t:"tf-activity-feed",c:"ActivityFeed",p:"groups:j items:j"},{t:"tf-daily-briefing",c:"DailyBriefing",p:"title:s time:s tint:s summary:r attention:j suggestions:R attentionTitle:s suggestionsTitle:s"},{t:"tf-budget-stop",c:"BudgetStop",p:"spent:n budget:n title:s text:r paused:r running:r actionLabel:s",e:"onRaise:0?"},{t:"tf-memory-viewer",c:"MemoryViewer",p:"items:j",e:"onEdit:1? onDelete:1?"},{t:"tf-override-diff",c:"OverrideDiff",p:"title:s versions:r by:r before:s after:s discardLabel:s promoteLabel:s",e:"onDiscard:0? onPromote:0?"},{t:"tf-trigger-list",c:"TriggerList",p:"items:j",e:"onToggle:1? onRun:1?"},{t:"tf-schedule-calendar",c:"ScheduleCalendar",p:"events:j from:n to:n days:jl",e:"onOpen:1"},{t:"tf-org-chart",c:"OrgChart",p:"root:j"},{t:"tf-voice-mode",c:"VoiceMode",p:"name:s tint:s state:s stateLabel:s transcript:r muted:b",e:"onMute:0? onEnd:0?"},{t:"tf-mobile-tab-bar",c:"MobileTabBar",p:"items:j active:s label:s",e:"onPick:1"},{t:"tf-push-notification",c:"PushNotification",p:"app:s time:s title:s text:r actions:j"},{t:"tf-config-pr-summary",c:"ConfigPRSummary",p:"title:s meta:r status:s statusLabel:s summary:r items:j actions:R"},{t:"tf-module-registry",c:"ModuleRegistry",p:"items:j coreLabel:s",e:"onToggle:1"},{t:"tf-approval-card",c:"ApprovalCard",p:"title:r text:r agent:s project:s family:s familyLabel:s age:s escalation:r trace:r note:r heading:s options:j approveLabel:s decision:j compact:b state:s",e:"onDecide:2 onApprove:0 onDeny:0 onEdit:1"},{t:"tf-approval-inbox",c:"ApprovalInbox",p:"items:j selected:x emptyTitle:s emptyText:s label:s",e:"onSelect:1?"},{t:"tf-kbd",c:"Kbd",p:"keys:jl"},{t:"tf-key-value",c:"KeyValue",p:"items:j dense:b"},{t:"tf-spinner",c:"Spinner",p:"size:s label:s"},{t:"tf-collapsible",c:"Collapsible",p:"title:r meta:r defaultOpen:b open:b",e:"onOpenChange:1",s:"onOpenChange:open:detail"},{t:"tf-context-menu",c:"ContextMenu",p:"items:jl"},{t:"tf-split-pane",c:"SplitPane",p:"left:r right:r defaultSize:n min:n max:n storageKey:s"},{t:"tf-resizable-panels",c:"ResizablePanels",p:"panels:R defaultSizes:j min:n orientation:s storageKey:s labels:jl"},{t:"tf-tree-view",c:"TreeView",p:"items:j defaultOpen:jl selected:s label:s",e:"onSelect:1"},{t:"tf-inline-edit",c:"InlineEdit",p:"value:s options:jl mono:b type:s display:f align:s label:s",e:"onSave:1"},{t:"tf-bar-chart",c:"BarChart",p:"data:j tint:s height:n width:n barWidth:n format:f label:s"},{t:"tf-line-chart",c:"LineChart",p:"labels:jl series:j height:n width:n format:f label:s"},{t:"tf-sparkline",c:"Sparkline",p:"values:j tint:s width:n height:n label:s"},{t:"tf-donut",c:"Donut",p:"data:j center:s caption:s size:n stroke:n legend:b label:s"},{t:"tf-legend",c:"Legend",p:"items:j"},{t:"tf-stacked-bar-chart",c:"StackedBarChart",p:"labels:jl series:j height:n width:n barWidth:n format:f legend:b label:s"},{t:"tf-area-chart",c:"AreaChart",p:"labels:jl series:j stacked:b height:n width:n format:f legend:b label:s"},{t:"tf-heatmap",c:"Heatmap",p:"rows:jl cols:jl values:j colEvery:n caption:s format:f label:s"},{t:"tf-funnel",c:"Funnel",p:"steps:j tint:s format:f"},{t:"tf-gauge",c:"Gauge",p:"value:n max:n caption:s format:f tint:s thresholds:j size:n stroke:n showRange:b label:s"},{t:"tf-rich-text",c:"RichText",p:"text:s streaming:b"},{t:"tf-code-block",c:"CodeBlock",p:"code:s lang:s open:b"},{t:"tf-typing-dots",c:"TypingDots",p:"label:s"},{t:"tf-agent-mark",c:"AgentMark",p:"tint:s icon:s size:n live:b"},{t:"tf-chat-message",c:"ChatMessage",p:"role:s name:s time:s model:s text:s streaming:b tint:s sources:j attachments:j usage:s actions:b before:r after:r feedback:s?",e:"onRetry:0? onFeedback:1"},{t:"tf-tool-call",c:"ToolCall",p:"name:s icon:s status:s summary:r duration:s input:j output:j defaultOpen:b"},{t:"tf-reasoning",c:"Reasoning",p:"steps:jl text:r duration:s streaming:b defaultOpen:b"},{t:"tf-prompt-starters",c:"PromptStarters",p:"items:j",e:"onPick:1"},{t:"tf-model-picker",c:"ModelPicker",p:"models:j value:s side:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-composer",c:"Composer",p:"value:s busy:b placeholder:s label:s models:j model:s commands:j attachments:j hint:s left:r disabled:b",e:"onChange:1 onSend:2 onStop:0 onModel:1 onCommand:1? onAttach:1? onRemoveAttachment:1?",s:"onChange:value:detail"},{t:"tf-agent-status",c:"AgentStatus",p:"status:s step:s"},{t:"tf-run-trace",c:"RunTrace",p:"steps:j defaultOpen:n? footer:r"},{t:"tf-usage-meter",c:"UsageMeter",p:"used:n limit:n label:s caption:s format:f"},{t:"tf-product-art",c:"ProductArt",p:"kind:s tint:s size:n label:s"},{t:"tf-price",c:"Price",p:"value:n compareAt:n currency:s size:s showSave:b"},{t:"tf-rating",c:"Rating",p:"value:n count:n size:n"},{t:"tf-stock-badge",c:"StockBadge",p:"stock:n low:n compact:b"},{t:"tf-product-card",c:"ProductCard",p:"name:s meta:s art:s tint:s price:n compareAt:n rating:n reviews:n badge:s badgeTone:s stock:n wished:b added:b",e:"onWish:0? onAdd:0? onClick:0"},{t:"tf-variant-picker",c:"VariantPicker",p:"label:s type:s options:jl value:s defaultValue:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-cart-line",c:"CartLine",p:"name:s variant:s note:s art:s tint:s price:n qty:n",e:"onQty:1? onRemove:0"},{t:"tf-order-summary",c:"OrderSummary",p:"lines:j showLines:b discount:j shipping:n? freeShippingFrom:n vat:n title:s! action:r",e:"onCoupon:1?"},{t:"tf-checkout-steps",c:"CheckoutSteps",p:"steps:jl current:n",e:"onPick:1?"},{t:"tf-order-timeline",c:"OrderTimeline",p:"status:s times:j"},{t:"tf-plan-card",c:"PlanCard",p:"name:s text:s price:n? was:n per:s features:jl featured:b flag:s current:b cta:s",e:"onPick:0"},{t:"tf-count-up",c:"CountUp",p:"value:x duration:n delay:n"},{t:"tf-stat-tile",c:"StatTile",p:"value:r label:s tint:s delta:s delay:n"},{t:"tf-card",c:"Card",p:"title:s description:s meta:jl corner:r status:r actions:R tint:s eyebrow:r surface:s",e:"onClick:0?"},{t:"tf-event-card",c:"EventCard",p:"kind:s label:s date:s time:s tint:s icon:s actions:b"},{t:"tf-panel",c:"Panel",p:"side:b title:s subtitle:s action:r surface:s"},{t:"tf-page-header",c:"PageHeader",p:"crumbs:jl title:s subtitle:s actions:R"},{t:"tf-stagger",c:"Stagger",p:"as:s delay:n reveal:b"},{t:"tf-table",c:"Table",p:"columns:j rows:j animate:b"},{t:"tf-list-row",c:"ListRow",p:"avatar:s icon:s tint:s leading:r title:r subtitle:r meta:r trailing:r unread:b active:b",e:"onClick:0"},{t:"tf-timeline",c:"Timeline",p:"items:j delay:n"},{t:"tf-file-row",c:"FileRow",p:"name:s meta:s kind:s"},{t:"tf-kanban-column",c:"KanbanColumn",p:"title:s dot:s delay:n",e:"onAdd:0"},{t:"tf-progress",c:"Progress",p:"value:n tint:s label:s"},{t:"tf-progress-ring",c:"ProgressRing",p:"value:n tint:s size:n stroke:n caption:s label:s"},{t:"tf-filter-bar",c:"FilterBar",p:"filters:j value:j search:s query:s right:r",e:"onChange:1 onQuery:1",s:"onChange:value:detail"},{t:"tf-data-table",c:"DataTable",p:"columns:j rows:j rowKey:s selectable:b bulkActions:j renderExpanded:f stickyHeader:b maxHeight:x defaultSort:j toolbar:r columnToggle:b empty:r"},{t:"tf-log-view",c:"LogView",p:"lines:jl title:r right:r numbers:b follow:b maxHeight:n"},{t:"tf-code-viewer",c:"CodeViewer",p:"value:j lang:s"},{t:"tf-secret-field",c:"SecretField",p:"prefix:s last4:s value:s meta:r",e:"onReveal:0? onCopy:0? onRotate:0?"},{t:"tf-money-input",c:"MoneyInput",p:"label:s value:n? currency:s vat:s vatOptions:j showGross:b hint:r error:r defaultValue:n? required:b",e:"onChange:1 onVat:1",s:"onChange:value:detail"},{t:"tf-settings-layout",c:"SettingsLayout",p:"sections:j footer:r"},{t:"tf-shortcuts-overlay",c:"ShortcutsOverlay",p:"open:b title:s groups:j",e:"onClose:0",s:"onClose:open:false",x:"onClose"},{t:"tf-stat-cell",c:"StatCell",p:"label:r value:r delta:n deltaText:s compare:s invert:b spark:j icon:s iconTint:s tint:s"},{t:"tf-uptime-bar",c:"UptimeBar",p:"days:jl uptime:n caption:r"},{t:"tf-meter",c:"Meter",p:"label:r value:n? max:n text:r warn:n danger:n tone:s"},{t:"tf-skeleton",c:"Skeleton",p:"variant:s width:x height:x"},{t:"tf-menu",c:"Menu",p:"items:jl label:s autoFocus:b",e:"onClose:0?"},{t:"tf-modal",c:"Modal",p:"title:s text:s icon:s tint:s actions:R open:b",e:"onClose:0",s:"onClose:open:false",x:"onClose",dialog:1},{t:"tf-toast",c:"Toast",p:"icon:s tint:s action:s",e:"onAction:0"},{t:"tf-empty-state",c:"EmptyState",p:"title:s text:s icon:s tint:s action:r"},{t:"tf-alert",c:"Alert",p:"tone:s title:r icon:s action:r",e:"onDismiss:0?",x:"onDismiss"},{t:"tf-confirm-dialog",c:"ConfirmDialog",p:"open:b title:s text:s danger:b icon:s confirmLabel:s cancelLabel:s confirmText:s",e:"onConfirm:0 onCancel:0",s:"onCancel:open:false onConfirm:open:false"},{t:"tf-toaster",c:"Toaster",p:"position:s"},{t:"tf-form-field",c:"FormField",p:"name:s label:r required:b optional:b hint:r error:r success:r"},{t:"tf-text-field",c:"TextField",p:"type:s icon:s suffix:r value:s defaultValue:s placeholder:s disabled:b autoComplete:s name:s label:r required:b optional:b hint:r error:r success:r",e:"onChange:1 onBlur:1",s:"onChange:value:detail"},{t:"tf-radio-group",c:"RadioGroup",p:"label:s options:jl value:s defaultValue:s cards:b hint:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-segmented",c:"Segmented",p:"options:jl value:s defaultValue:s size:s block:b label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-combobox",c:"Combobox",p:"label:s options:jl value:j defaultValue:j multiple:b creatable:b placeholder:s hint:s error:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-tag-input",c:"TagInput",p:"label:s value:jl defaultValue:jl placeholder:s hint:s error:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-calendar",c:"Calendar",p:"range:b value:jt today:d min:d max:d month:d",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-date-picker",c:"DatePicker",p:"label:s range:b value:jt defaultValue:jt presets:b min:d max:d today:d placeholder:s hint:s error:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-number-input",c:"NumberInput",p:"label:s value:n defaultValue:n min:n max:n step:n unit:s hint:s error:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-slider",c:"Slider",p:"label:s min:n max:n step:n value:n defaultValue:n format:f marks:b hint:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-otp-input",c:"OtpInput",p:"length:n error:b label:s",e:"onComplete:1"},{t:"tf-file-drop",c:"FileDrop",p:"files:j title:s hint:s accept:s multiple:b",e:"onChange:1"},{t:"tf-button",c:"Button",p:"variant:s size:s icon:s iconRight:s disabled:b type:s asChild:b",e:"onClick:1"},{t:"tf-icon-button",c:"IconButton",p:"icon:s label:s variant:s size:s disabled:b asChild:b",e:"onClick:1"},{t:"tf-chip",c:"Chip",p:"selected:b icon:s count:n",e:"onClick:1"},{t:"tf-badge",c:"Badge",p:"tone:s dot:b live:b"},{t:"tf-tint-icon",c:"TintIcon",p:"icon:s tint:s label:s size:n"},{t:"tf-avatar",c:"Avatar",p:"name:s src:s size:n tint:s"},{t:"tf-avatar-stack",c:"AvatarStack",p:"names:jl max:n size:n"},{t:"tf-input",c:"Input",p:"type:s placeholder:s value:s defaultValue:s disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-select",c:"Select",p:"options:jl value:s defaultValue:s label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-textarea",c:"Textarea",p:"placeholder:s value:s defaultValue:s rows:n disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-search-field",c:"SearchField",p:"placeholder:s shortcut:s value:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-checkbox",c:"Checkbox",p:"name:s value:s required:b checked:b defaultChecked:b disabled:b label:s",e:"onChange:1",s:"onChange:checked:detail"},{t:"tf-switch",c:"Switch",p:"name:s checked:b defaultChecked:b spread:b disabled:b label:s",e:"onChange:1",s:"onChange:checked:detail"},{t:"tf-form",c:"Form",p:"rules:j errors:j",e:"onSubmit:1 onInvalid:1"},{t:"tf-select-menu",c:"SelectMenu",p:"options:jl value:s defaultValue:s placeholder:s disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-account-switcher",c:"AccountSwitcher",p:"accounts:j value:s? unread:n allLabel:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-inbox-list",c:"InboxList",p:"items:j selected:x",e:"onOpen:1"},{t:"tf-mail-thread",c:"MailThread",p:"subject:s messages:j reply:r"},{t:"tf-signature-editor",c:"SignatureEditor",p:"value:j fields:j note:r extra:r defaultValue:j previewLabel:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-attachment-preview",c:"AttachmentPreview",p:"name:s meta:r facts:j found:r actions:r width:x inline:b",e:"onClose:0",x:"onClose"},{t:"tf-image-variants",c:"ImageVariants",p:"variants:j selected:x alt:s tint:s actions:r",e:"onSelect:1"},{t:"tf-gallery",c:"Gallery",p:"items:j start:n ratio:s thumbs:b fullscreen:b badge:r"},{t:"tf-before-after",c:"BeforeAfter",p:"before:j after:j start:n ratio:s beforeLabel:s afterLabel:s"},{t:"tf-tabs",c:"Tabs",p:"items:jl value:s defaultValue:s block:b panels:K label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-breadcrumb",c:"Breadcrumb",p:"items:jl"},{t:"tf-pagination",c:"Pagination",p:"total:n page:n"},{t:"tf-menubar",c:"Menubar",p:"menus:j label:s"},{t:"tf-navigation-menu",c:"NavigationMenu",p:"items:j label:s"},{t:"tf-sidebar",c:"Sidebar",p:"groups:j current:s collapsed:b defaultCollapsed:b header:r footer:r label:s",e:"onPick:1 onCollapsedChange:1",s:"onCollapsedChange:collapsed:detail"},{t:"tf-connection-card",c:"ConnectionCard",p:"name:s icon:s logo:r text:r status:s statusLabel:s action:r"},{t:"tf-connection-banner",c:"ConnectionBanner",p:"state:s seconds:n text:r",e:"onRetry:0?"},{t:"tf-server-card",c:"ServerCard",p:"name:s provider:s address:s logo:r status:s statusLabel:s meters:j uptime:j foot:r"},{t:"tf-deploy-pipeline",c:"DeployPipeline",p:"stages:j"},{t:"tf-dns-record-table",c:"DnsRecordTable",p:"records:j rowMenu:f selectable:b bulkActions:j toolbar:r"},{t:"tf-domain-list",c:"DomainList",p:"items:j",e:"onOpen:1"},{t:"tf-mail-auth-status",c:"MailAuthStatus",p:"rows:j columns:jl",e:"onOpen:2"},{t:"tf-ledger-table",c:"LedgerTable",p:"rows:j categories:jl currency:s selectable:b bulkActions:j toolbar:r maxHeight:n columnToggle:b",e:"onEdit:2"},{t:"tf-pnl-statement",c:"PnLStatement",p:"columns:jl rows:j currency:s total:b label:s"},{t:"tf-receipt-suggestion",c:"ReceiptSuggestion",p:"file:s source:r fields:j suggestion:r confirmLabel:s discardLabel:s",e:"onConfirm:0? onDiscard:0?"},{t:"tf-popover",c:"Popover",p:"trigger:r open:b align:s side:s width:n flush:b block:b role:s",e:"onOpenChange:1",s:"onOpenChange:open:detail",close:1},{t:"tf-tooltip",c:"Tooltip",p:"label:r shortcut:s side:s defaultOpen:b"},{t:"tf-email-preview",c:"EmailPreview",p:"from:s fromName:s subject:s preheader:s html:s device:s checks:j",e:"onDevice:1"},{t:"tf-search-ad-preview",c:"SearchAdPreview",p:"name:s domain:s paths:jl headlines:jl descriptions:jl sitelinks:jl device:s sponsoredLabel:s",e:"onDevice:1"},{t:"tf-accordion",c:"Accordion",p:"items:j multiple:b value:jl defaultValue:jl variant:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-separator",c:"Separator",p:"orientation:s label:s"},{t:"tf-aspect-ratio",c:"AspectRatio",p:"ratio:n"},{t:"tf-label",c:"Label",p:"htmlFor:s required:b hint:r"},{t:"tf-toggle",c:"Toggle",p:"pressed:b defaultPressed:b icon:s label:s size:s disabled:b",e:"onChange:1",s:"onChange:pressed:detail"},{t:"tf-toggle-group",c:"ToggleGroup",p:"items:jl type:s value:jl defaultValue:jl label:s size:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-button-group",c:"ButtonGroup",p:"label:s orientation:s"},{t:"tf-scroll-area",c:"ScrollArea",p:"height:x maxHeight:x orientation:s label:s"},{t:"tf-hover-card",c:"HoverCard",p:"trigger:r side:s align:s openDelay:n closeDelay:n width:n"},{t:"tf-carousel",c:"Carousel",p:"slides:R label:s perView:n loop:b dots:b index:n defaultIndex:n",e:"onChange:1",s:"onChange:index:detail"},{t:"tf-listing-card",c:"ListingCard",p:"listing:j layout:s selected:b statusOptions:j",e:"onSelect:1? onWish:1? onStatus:2 onOpen:1?"},{t:"tf-results-toolbar",c:"ResultsToolbar",p:"title:s total:n meta:s selected:n bulkActions:j sortOptions:j sort:s views:jl view:s",e:"onSelectAll:1? onSort:1 onView:1"},{t:"tf-saved-search",c:"SavedSearch",p:"name:s criteria:R lastRun:s frequency:s newCount:n enabled:b openLabel:s icon:s tint:s",e:"onToggle:0? onEdit:0? onOpen:0?"},{t:"tf-valuation-card",c:"ValuationCard",p:"value:n low:n high:n asking:n perSqm:n compare:s currency:s confidence:n confidenceLabel:s facts:j note:r title:s action:r"},{t:"tf-energy-class",c:"EnergyClass",p:"value:s kwh:n kind:s scale:jl"},{t:"tf-rich-text-editor",c:"RichTextEditor",p:"label:r defaultValue:s value:s placeholder:s variables:j maxLength:n minHeight:n footer:r hint:r error:r disabled:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-top-bar",c:"TopBar",p:"brand:s tag:s items:j active:s user:j extra:r userOpen:b",e:"onNavigate:1 onUser:0"},{t:"tf-side-rail",c:"SideRail",p:"top:j bottom:j"},{t:"tf-dock",c:"Dock",p:"items:j label:s surface:s"},{t:"tf-floating-layout",c:"FloatingLayout",p:"background:r top:r start:r end:r bottom:r height:x surface:s label:s"},{t:"tf-ambient",c:"Ambient",p:"colors:jl src:s video:b animate:b fixed:b"},{t:"tf-app-shell",c:"AppShell",p:"active:s brand:s tag:s nav:j user:j topExtra:r sheetStyle:j contentKey:x side:r dock:b dockItems:j railTop:j railBottom:j",e:"onNavigate:1"},{t:"tf-chat-launcher",c:"ChatLauncher",p:"title:s context:r tint:s open:b unread:n headerAction:r composer:r inline:b",e:"onOpenChange:1",s:"onOpenChange:open:detail"},{t:"tf-cookie-consent",c:"CookieConsent",p:"title:s text:r policy:r categories:j open:b inline:b",e:"onSave:1"},{t:"tf-announcement-bar",c:"AnnouncementBar",p:"tint:s icon:s! action:r",e:"onDismiss:0?",x:"onDismiss"},{t:"tf-status-shape",c:"StatusShape",p:"status:s"},{t:"tf-status-indicator",c:"StatusIndicator",p:"status:s label:r size:s"},{t:"tf-status-screen",c:"StatusScreen",p:"code:s title:s text:s icon:s tint:s extra:r actions:R reference:s",e:"onHome:0 onContact:0"},{t:"tf-auth-card",c:"AuthCard",p:"title:s text:s icon:s tint:s brand:s foot:r"},{t:"tf-sub-nav",c:"SubNav",p:"eyebrow:s action:j items:j current:s",e:"onPick:1"},{t:"tf-drawer",c:"Drawer",p:"title:s subtitle:r avatar:s width:x inline:b open:b side:s",e:"onClose:0",s:"onClose:open:false",x:"onClose"},{t:"tf-command-palette",c:"CommandPalette",p:"items:j placeholder:s inline:b loading:b empty:r open:b",e:"onClose:0 onQueryChange:1",s:"onClose:open:false",x:"onClose"},{t:"tf-notification-list",c:"NotificationList",p:"items:j",e:"onOpen:1 onReadAll:0"},{t:"tf-flow",c:"Flow",p:"steps:j active:n? waiting:b tools:f",e:"onApprove:0? onReject:0?"},{t:"tf-file-thumb",c:"FileThumb",p:"kind:s title:s big:b entries:jl"},{t:"tf-file-card",c:"FileCard",p:"name:s kind:s size:s meta:s shared:b",e:"onClick:0"},{t:"tf-wizard",c:"Wizard",p:"steps:j current:n done:j footer:r brand:s label:s",e:"onPick:1"},{t:"tf-permission-matrix",c:"PermissionMatrix",p:"roles:j areas:jl",e:"onChange:3"},{t:"tf-invoice-preview",c:"InvoicePreview",p:"number:x from:s to:s issued:s due:s lines:j note:s kind:s brand:s format:f"},{t:"tf-transaction-row",c:"TransactionRow",p:"text:s date:s amount:n matched:b matchRef:s hint:s",e:"onMatch:0"}];var s5="0.2.0",r5=Object.freeze(Object.fromEntries(Oo.map(e=>[e.t,e.c]))),qN=Oo.map(e=>e.t),UN=!1;function o5(){if(UN)return;UN=!0;let e=qN.join(","),t=`:where(${e},tf-root){display:contents}:where(${e})[hidden]{display:none}`;try{let n=new CSSStyleSheet;n.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,n]}catch{let n=document.createElement("style");n.dataset.tfElements="",n.textContent=t,document.head.prepend(n)}}function VN(){if(typeof window>"u"||typeof customElements>"u")return;Sa.selector=qN.join(","),o5();let e=hu;for(let t of Oo){if(customElements.get(t.t))continue;let n=e[t.c];typeof n=="function"&&customElements.define(t.t,BN(DN(t),n))}}VN();return FN(u5);})();
|
|
30
|
+
`);if(ue(B[0]??""),B.length>1){let Z=o(),at=Z&&f(Z.startContainer,Z.startOffset);if(!at)return E(!0);B.slice(1).forEach(ul=>{let Gl=document.createElement("P");Gl.textContent=ul;let bm=at;bm.parentNode?.insertBefore(Gl,bm.nextSibling),at=Gl});let Wt=document.createRange();Wt.selectNodeContents(at),Wt.collapse(!1),u(Wt),E(!0)}}function ds(){let O=r();(!O.firstChild||O.innerHTML==="<br>")&&(O.innerHTML="<p><br></p>"),Array.from(O.childNodes).forEach(L=>{if(L.nodeType===3&&(L.textContent||"").trim()){let B=document.createElement("P");O.insertBefore(B,L),B.appendChild(L);let Z=document.createRange();Z.selectNodeContents(B),Z.collapse(!1),u(Z)}}),E(!1)}let YN=[["bold",()=>{g("B","STRONG")},"Bold","B"],["italic",()=>{g("I","EM")},"Italic","I"],["underline",()=>{g("U")},"Underline","U"],"-",["heading",()=>{_("H3")},"Heading"],["quote",()=>{_("BLOCKQUOTE")},"Quote"],["list",()=>{X("UL")},"Bulleted list"],["olist",()=>{X("OL")},"Numbered list"],"-",["link",A,"Link","K"],"-",["undo",()=>{W(-1)},"Undo","Z"],["redo",()=>{W(1)},"Redo"]],gm=e.maxLength&&n[0]>e.maxLength,GN=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform||"")?"\u2318":"Ctrl+";return(0,Ye.jsx)(dt,{label:e.label,hint:e.hint,error:e.error,children:(0,Ye.jsxs)("div",{className:b("tf-rte",gm&&"invalid"),children:[(0,Ye.jsxs)("div",{className:"tf-rte-bar",role:"toolbar","aria-label":"Formatting",children:[YN.map((O,L)=>{if(O==="-")return(0,Ye.jsx)("span",{className:"tf-rte-sep","aria-hidden":!0},L);let B=(0,Ye.jsx)("button",{type:"button",className:b("tf-rte-btn",a[0][O[0]]&&"on"),title:O[2]+(O[3]?" ("+GN+O[3]+")":""),"aria-label":O[2],"aria-pressed":O[0]==="undo"||O[0]==="redo"?void 0:!!a[0][O[0]],disabled:e.disabled,onMouseDown:Z=>{Z.preventDefault()},onClick:O[1],children:(0,Ye.jsx)(N,{name:O[0],size:15})},L);return O[0]==="link"?(0,Ye.jsx)(Be,{width:300,open:l[0],onOpenChange:l[1],trigger:B,children:(0,Ye.jsxs)("form",{className:"tf-col",style:{gap:8},onSubmit:Z=>{Z.preventDefault(),H(!1)},children:[(0,Ye.jsx)("input",{className:"tf-input",autoFocus:!0,value:i[0],onChange:Z=>{i[1](Z.target.value)},placeholder:"Link address","aria-label":"Link address",inputMode:"url"}),(0,Ye.jsxs)("div",{className:"tf-row",style:{justifyContent:"flex-end",gap:8},children:[a[0].link&&(0,Ye.jsx)(Q,{size:"sm",variant:"ghost",onClick:()=>{H(!0)},children:"Remove link"}),(0,Ye.jsx)(Q,{size:"sm",type:"submit",children:"Apply"})]})]})},L):B}),e.variables&&e.variables.length>0&&(0,Ye.jsx)(Be,{width:240,trigger:O=>(0,Ye.jsxs)("button",{type:"button",className:"tf-rte-var",onMouseDown:L=>{L.preventDefault()},onClick:O.toggle,"aria-expanded":O.open,children:["{ }",(0,Ye.jsx)("span",{children:"Insert field"})]}),children:O=>(0,Ye.jsx)("div",{className:"tf-menu",children:(e.variables||[]).map(L=>(0,Ye.jsxs)("button",{type:"button",className:"tf-menu-item",onMouseDown:B=>{B.preventDefault()},onClick:()=>{ue("{"+L.key+"}"),O.close&&O.close()},children:[(0,Ye.jsx)("span",{style:{flex:1},children:L.label}),(0,Ye.jsx)("code",{children:"{"+L.key+"}"})]},L.key))})})]}),(0,Ye.jsx)("div",{ref:t,className:"tf-rte-area",contentEditable:!e.disabled,role:"textbox","aria-multiline":"true","aria-label":typeof e.label=="string"?e.label:"Text","data-placeholder":e.placeholder||"",suppressContentEditableWarning:!0,onInput:ds,onKeyDown:Et,onPaste:It,onBlur:M,style:{minHeight:e.minHeight||160}}),(e.maxLength||e.footer)&&(0,Ye.jsxs)("div",{className:"tf-rte-foot",children:[e.footer,e.maxLength&&(0,Ye.jsx)("span",{className:b("tf-rte-count",gm&&"over"),children:F(n[0])+" / "+F(e.maxLength)})]})]})})}var le=q(pe(),1),Da=q(re(),1);function uu(e){return(0,le.jsxs)("nav",{className:"tf-topbar","aria-label":"Main",children:[e.brand&&(0,le.jsxs)("span",{className:"tf-brand",children:[e.brand,(0,le.jsx)("span",{className:"tf-brand-dot","aria-hidden":!0}),e.tag&&(0,le.jsx)("span",{className:"tf-brand-tag",children:e.tag})]}),(0,le.jsx)("div",{className:"tf-nav",children:(e.items||[]).map(t=>{let n=t.label===e.active;return(0,le.jsxs)("button",{type:"button",className:"tf-nav-item","aria-current":n?"page":void 0,title:t.label,onClick:()=>{e.onNavigate&&e.onNavigate(t.label)},children:[(0,le.jsx)(N,{name:t.icon}),(0,le.jsx)("span",{className:"tf-nav-label",children:t.label}),t.count?(0,le.jsx)("span",{className:"tf-nav-count",children:t.count}):null]},t.label)})}),e.extra&&(0,le.jsx)("div",{className:"tf-topbar-extra",children:e.extra}),e.user&&(0,le.jsxs)("button",{type:"button",className:"tf-user","aria-haspopup":"menu","aria-expanded":e.userOpen?"true":"false",onClick:e.onUser,children:[(0,le.jsx)(qe,{name:e.user.name,size:28}),(0,le.jsxs)("span",{className:"tf-user-text",children:[(0,le.jsx)("span",{className:"tf-user-name",children:e.user.name}),e.user.email&&(0,le.jsx)("span",{className:"tf-user-mail",children:e.user.email})]}),(0,le.jsx)(N,{name:"chevronDown",size:14})]})]})}function vg(e,t){return(0,le.jsxs)("button",{type:"button",className:"tf-rail-btn",style:{animationDelay:`calc(${200+t*50}ms * var(--motion-time, 1))`},"aria-label":e.count?`${e.label}, ${e.count}`:e.label,title:e.label,"aria-current":e.active?"page":void 0,onClick:e.onClick,children:[(0,le.jsx)(N,{name:e.icon}),e.count?(0,le.jsx)("span",{className:"tf-dotcount",children:e.count}):null]},e.label)}function fu(e){return(0,le.jsxs)("aside",{className:"tf-rail","aria-label":"Tools",children:[(0,le.jsx)("div",{className:"tf-rail-group",children:(e.top||[]).map(vg)}),(0,le.jsx)("div",{className:"tf-rail-group",children:(e.bottom||[]).map((t,n)=>vg(t,n+3))})]})}function du(e){return(0,le.jsx)("div",{className:b("tf-dock",e.surface&&"tf-"+e.surface,e.className),style:e.style,role:"toolbar","aria-label":e.label||"Quick actions",children:(e.items||[]).map(t=>(0,le.jsx)("button",{type:"button",className:b("tf-dock-btn","tf-t-"+(t.tint||"plain")),"aria-label":t.label,title:t.label,onClick:t.onClick,children:(0,le.jsx)(N,{name:t.icon})},t.label))})}function gg(e){let t=e.surface??"glass";return(0,le.jsxs)("div",{className:b("tf-floating",e.className),style:{minHeight:e.height??640,...e.style},role:"region","aria-label":e.label,"data-surface":t,children:[e.background!=null&&(0,le.jsx)("div",{className:"tf-floating-bg",children:e.background}),(0,le.jsxs)("div",{className:"tf-floating-ui",children:[e.top!=null&&(0,le.jsx)("div",{className:"tf-floating-top",children:e.top}),e.start!=null&&(0,le.jsx)("div",{className:"tf-floating-start",children:e.start}),e.end!=null&&(0,le.jsx)("div",{className:"tf-floating-end",children:e.end}),e.bottom!=null&&(0,le.jsx)("div",{className:"tf-floating-bottom",children:e.bottom})]}),e.children]})}function bg(e){let t=Da.useRef(null),[n,a]=Da.useState(!1),l=e.animate!==!1&&!e.src&&!e.children;Da.useEffect(()=>{let r=t.current;if(!r||!l||typeof IntersectionObserver>"u")return;let o=new IntersectionObserver(u=>a(!u.some(h=>h.isIntersecting)));return o.observe(r),()=>o.disconnect()},[l]);let i=Da.useRef(null);Da.useEffect(()=>{let r=i.current;r&&Cn(r)&&r.pause()},[e.src]);let c=e.colors?.length?e.colors:["var(--ambient-1)","var(--ambient-2)","var(--ambient-3)","var(--ambient-4)"],s=!!e.src&&!e.children;return(0,le.jsx)("div",{ref:t,"aria-hidden":!0,className:b("tf-ambient",e.fixed&&"fixed",s&&"media",!l&&"still",e.className),style:e.style,"data-paused":n?"":void 0,children:e.children??(s?e.video?(0,le.jsx)("video",{ref:i,className:"tf-ambient-media",src:e.src,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):(0,le.jsx)("img",{className:"tf-ambient-media",src:e.src,alt:""}):c.map((r,o)=>(0,le.jsx)("span",{className:"tf-ambient-field",style:{"--field":r}},o)))})}var mu=()=>[{label:"Home",icon:"home"},{label:"People",icon:"users"},{label:"Projects",icon:"grid"},{label:"Inbox",icon:"mail"},{label:"Calendar",icon:"calendar"},{label:"Billing",icon:"card"},{label:"Reports",icon:"chart"},{label:"Settings",icon:"settings"}],$x=()=>[{label:"Share",icon:"share",active:!0},{label:"List view",icon:"menu"},{label:"Grid view",icon:"grid"}],Ix=()=>[{label:"Notifications",icon:"bell",count:3},{label:"Zoom in",icon:"plus"},{label:"Zoom out",icon:"minus"}],Wx=()=>[{label:"Invite",icon:"users",tint:"sky"},{label:"New page",icon:"file",tint:"lilac"},{label:"New invoice",icon:"card",tint:"blush"},{label:"Announce",icon:"send",tint:"butter"},{label:"Export",icon:"download",tint:"mint"},{label:"More",icon:"plus"}];function yg(e){return(0,le.jsxs)("div",{className:b("tf-shell",e.className),style:e.style,children:[(0,le.jsx)(uu,{brand:e.brand,tag:e.tag,active:e.active,items:e.nav||mu(),onNavigate:e.onNavigate,user:e.user,extra:e.topExtra}),(0,le.jsxs)("div",{className:b("tf-sheet",!e.side&&"tf-sheet-2"),style:e.sheetStyle,children:[(0,le.jsx)(fu,{top:e.railTop||$x(),bottom:e.railBottom||Ix()}),(0,le.jsx)("main",{className:b("tf-main",e.dock!==!1&&"tf-main-dock"),children:e.children},e.contentKey),e.side||null,e.dock!==!1&&(0,le.jsx)("div",{className:"tf-dock-float",children:(0,le.jsx)(du,{items:e.dockItems||Wx()})})]})]})}var fe=q(pe(),1),ni=q(re(),1);function pg(e){let t=J(e.open,!1,e.onOpenChange);return(0,fe.jsxs)("div",{className:b("tf-launch",t[0]&&"open",e.inline&&"inline"),children:[t[0]&&(0,fe.jsxs)("div",{className:"tf-launch-panel",role:"dialog","aria-label":e.title||"Assistant",children:[(0,fe.jsxs)("div",{className:"tf-launch-head",children:[(0,fe.jsx)(Gt,{tint:e.tint||"lilac",size:32}),(0,fe.jsxs)("div",{className:"tf-option-text",style:{flex:1},children:[(0,fe.jsx)("b",{children:e.title||"Assistant"}),e.context&&(0,fe.jsx)("small",{children:e.context})]}),e.headerAction,(0,fe.jsx)($,{icon:"x",size:"sm",label:"Close",onClick:()=>{t[1](!1)}})]}),(0,fe.jsx)("div",{className:"tf-launch-body",children:e.children}),e.composer&&(0,fe.jsx)("div",{className:"tf-launch-foot",children:e.composer})]}),(0,fe.jsxs)("button",{type:"button",className:"tf-launch-btn","aria-label":t[0]?"Close assistant":e.title||"Open assistant","aria-expanded":t[0],onClick:()=>{t[1](!t[0])},children:[(0,fe.jsx)(N,{name:t[0]?"x":"sparkle",size:22}),!t[0]&&(e.unread??0)>0&&(0,fe.jsx)("span",{className:"tf-nav-count",children:e.unread})]})]})}function Ng(e){let t=ni.useState(!1),n=ni.useState((e.categories||[]).reduce((l,i)=>(l[i.id]=!!(i.required||i.default),l),{}));if(e.open===!1)return null;function a(l){let i=Object.assign({},n[0]);(e.categories||[]).forEach(c=>{l===!0&&(i[c.id]=!0),l===!1&&(i[c.id]=!!c.required)}),e.onSave&&e.onSave(i)}return(0,fe.jsxs)("div",{className:b("tf-cookie",e.inline&&"inline"),role:"dialog","aria-label":e.title||"Privacy settings",children:[(0,fe.jsxs)("div",{className:"tf-row",style:{gap:12,alignItems:"flex-start",flexWrap:"nowrap"},children:[(0,fe.jsx)(ie,{icon:"cookie",tint:"butter",size:36}),(0,fe.jsxs)("div",{className:"tf-col",style:{gap:4},children:[(0,fe.jsx)("b",{children:e.title||"Privacy settings"}),(0,fe.jsxs)("p",{className:"tf-card-desc",style:{margin:0},children:[e.text||"We use cookies to run this site and, with your consent, to measure and improve it.",e.policy&&(0,fe.jsxs)(ni.Fragment,{children:[" ",e.policy]})]})]})]}),t[0]&&(0,fe.jsx)("div",{className:"tf-cookie-cats",children:(e.categories||[]).map(l=>(0,fe.jsxs)("div",{className:"tf-cookie-cat",children:[(0,fe.jsxs)("div",{className:"tf-option-text",style:{flex:1},children:[(0,fe.jsx)("b",{children:l.label}),l.text&&(0,fe.jsx)("small",{children:l.text})]}),l.required?(0,fe.jsx)("span",{className:"tf-card-desc",children:"Always on"}):(0,fe.jsx)(Ra,{checked:!!n[0][l.id],onChange:()=>{let i=Object.assign({},n[0]);i[l.id]=!i[l.id],n[1](i)}})]},l.id))}),(0,fe.jsxs)("div",{className:"tf-cookie-actions",children:[t[0]?(0,fe.jsx)(Q,{variant:"secondary",onClick:()=>{a(void 0)},children:"Save choice"}):(0,fe.jsx)(Q,{variant:"ghost",onClick:()=>{t[1](!0)},children:"Settings"}),(0,fe.jsx)(Q,{variant:"secondary",onClick:()=>{a(!1)},children:"Only necessary"}),(0,fe.jsx)(Q,{onClick:()=>{a(!0)},children:"Accept all"})]})]})}function xg(e){let t=ni.useState(!1);return t[0]?null:(0,fe.jsxs)("div",{className:b("tf-announce","tf-t-"+(e.tint||"butter")),role:"status",children:[e.icon!==!1&&(0,fe.jsx)(N,{name:e.icon||"sparkle",size:15}),(0,fe.jsx)("span",{children:e.children}),e.action,e.onDismiss!==!1&&(0,fe.jsx)("button",{type:"button",className:"tf-announce-x","aria-label":"Dismiss",onClick:()=>{t[1](!0),e.onDismiss&&e.onDismiss()},children:(0,fe.jsx)(N,{name:"x",size:14})})]})}var Ie=q(pe(),1),YM=q(re(),1);function Cg(e){let t=e.code||"404",n={404:["Page not found","The link may be old, or the page moved. Nothing is broken on your side.","search","sky"],500:["Something broke on our side","We\u2019ve been notified and are on it. Your data is safe; try again in a minute.","x","blush"],maintenance:["Back in a few minutes","We\u2019re upgrading the database. Everything you saved is safe.","settings","butter"],offline:["You\u2019re offline","Changes are kept on this device and sync when you\u2019re back.","globe","lilac"],403:["You don\u2019t have access","Ask a workspace owner to invite you to this area.","lock","lilac"]}[t]||[e.title,e.text,"sparkle","sky"];return(0,Ie.jsxs)("div",{className:"tf-status-screen",children:[(0,Ie.jsxs)("div",{className:"tf-status-art","aria-hidden":!0,children:[/^\d+$/.test(t)&&(0,Ie.jsx)("span",{className:"tf-status-code",children:t}),(0,Ie.jsx)(ie,{icon:e.icon||n[2],tint:e.tint||n[3],size:56})]}),(0,Ie.jsx)("h1",{children:e.title||n[0]}),(0,Ie.jsx)("p",{children:e.text||n[1]}),e.extra,(0,Ie.jsx)("div",{className:"tf-row",style:{justifyContent:"center"},children:e.actions||[(0,Ie.jsx)(Q,{icon:"home",onClick:e.onHome,children:"Back to overview"},"h"),(0,Ie.jsx)(Q,{variant:"secondary",icon:"mail",onClick:e.onContact,children:"Contact support"},"s")]}),e.reference&&(0,Ie.jsx)("span",{className:"tf-status-ref",children:`Reference ${e.reference}`})]})}function Sg(e){return(0,Ie.jsxs)("div",{className:"tf-auth",children:[e.brand&&(0,Ie.jsxs)("div",{className:"tf-auth-brand",children:[(0,Ie.jsx)("span",{className:"tf-brand-word",children:e.brand}),(0,Ie.jsx)("span",{className:"tf-brand-dot"})]}),e.icon&&(0,Ie.jsx)(ie,{icon:e.icon,tint:e.tint||"sky",size:48}),(0,Ie.jsxs)("div",{className:"tf-col",style:{gap:8},children:[(0,Ie.jsx)("h1",{className:"tf-auth-title",children:e.title}),e.text&&(0,Ie.jsx)("p",{className:"tf-auth-text",children:e.text})]}),e.children,e.foot&&(0,Ie.jsx)("div",{className:"tf-auth-foot",children:e.foot})]})}var Xe=q(re(),1),Do=q(xs(),1),jN=q(TN(),1);var EN=/^\d{4}-\d{2}-\d{2}(?:[T ][\d:.]+(?:Z|[+-]\d{2}:?\d{2})?)?$/,MN=/^\s*-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?\s*$/i;function dm(e){let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}function n5(e,t){return typeof t=="string"&&EN.test(t)?dm(t)??t:t}function kN(e,t){if(t===null)return;if(e.flags.includes("?")&&t==="null")return null;switch(e.kind){case"b":return t!=="false";case"n":return MN.test(t)?Number(t):void 0;case"x":return MN.test(t)?Number(t):t;case"s":return e.flags.includes("!")&&t==="false"?!1:t;case"d":return dm(t);case"r":return t;case"R":case"K":case"j":{let a=t.trim();try{return JSON.parse(a,e.flags.includes("t")?n5:void 0)}catch{return e.kind==="R"?[t]:e.flags.includes("t")&&EN.test(a)?dm(a):e.flags.includes("l")?a.split(",").map(l=>l.trim()).filter(Boolean):t}}default:return}}function zN(e){if(!e||!e.trim())return;let t={};for(let n of e.split(/;(?![^(]*\))/)){let a=n.indexOf(":");if(a<0)continue;let l=n.slice(0,a).trim(),i=n.slice(a+1).trim();!l||!i||(t[l.startsWith("--")?l:l.replace(/-([a-z])/g,(c,s)=>s.toUpperCase())]=i)}return t}function wN(e){if(!e||typeof e!="object"||!("nativeEvent"in e)||!("target"in e))return e;let t=e.target;return t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")?t.checked:t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement?t.value:null}function RN(e){return!!e&&typeof e=="object"&&"nativeEvent"in e&&"target"in e}function AN(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase()}function _N(e){return e.replace(/-([a-z0-9])/g,(t,n)=>n.toUpperCase())}var Ao=e=>e?e.split(" ").filter(Boolean):[];function DN(e){let t=Ao(e.p).map(l=>{let[i="",c="j"]=l.split(":");return{name:i,attr:AN(i),kind:c.charAt(0),flags:c.slice(1)}}),n=Ao(e.e).map(l=>{let[i="",c="0"]=l.split(":");return{prop:i,type:i.slice(2).toLowerCase(),arity:parseInt(c,10)||0,conditional:c.endsWith("?")}}),a=Ao(e.s).map(l=>{let[i="",c="",s="detail"]=l.split(":");return{event:i,prop:c,from:s==="false"?"false":"detail"}});return{tag:e.t,component:e.c,props:t,byAttr:new Map(t.map(l=>[l.attr,l])),byName:new Map(t.map(l=>[l.name,l])),events:n,byType:new Map(n.map(l=>[l.type,l])),sync:a,dismiss:new Set(Ao(e.x)),dialog:!!e.dialog,closeChildren:!!e.close}}var mm=new WeakSet,a5=new Set(["title","role","lang"]),LN=new Set(["id","slot","hidden","children","className","style","dir","inert","autofocus","tabIndex","accessKey","draggable","translate","spellcheck","contentEditable","nonce","part","popover","innerHTML","textContent"]),ON="tf-root",hm=0;function _o(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Sa)return t;return null}function l5(e,t){for(let n=e.parentNode;n&&n!==t;n=n.parentNode){if(n===t._stash)return"stash";let a=n.__tfSlot;if(a)return a.owner===t?a:null}return null}var i5=e=>e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&!/^\s*\n\s*$/.test(e.nodeValue??"")&&e.nodeValue!=="";function HN({el:e}){return(0,Xe.useSyncExternalStore)(e._subscribe,e._snapshot,e._snapshot),(0,Xe.useLayoutEffect)(()=>{e._sweep()}),e._view()}function vm({owner:e,nodes:t}){let n=(0,Xe.useRef)(null),[a,l]=(0,Xe.useState)([]),i=(0,Xe.useMemo)(()=>{let c=[],s={owner:e,rescan(){let r=n.current;if(!r||!r.isConnected)return;let o=[];for(let u of r.querySelectorAll("*"))u instanceof Sa&&_o(u)===e&&u.isConnected&&o.push(u);for(let u of o)u._slot!==s&&u._enterPortal(s);for(let u of c)!o.includes(u)&&u._slot===s&&u._leave();(o.length!==c.length||o.some((u,h)=>u!==c[h]))&&(c=o,l(o))},release(r){c.includes(r)&&(c=c.filter(o=>o!==r),l(c))}};return s},[e]);return(0,Xe.useLayoutEffect)(()=>{let c=n.current;if(!c)return;if(c.__tfSlot=i,!(c.childNodes.length===t.length&&t.every((h,f)=>c.childNodes[f]===h)))for(let h of t)c.appendChild(h);let r=!1,o=()=>{r||(r=!0,queueMicrotask(()=>{r=!1,i.rescan()}))};o();let u=new MutationObserver(h=>{for(let f of h)for(let m of[f.addedNodes,f.removedNodes])for(let p of m)if(p instanceof Element&&(p instanceof Sa||p.querySelector(Sa.selector)))return o()});return u.observe(c,{childList:!0,subtree:!0}),()=>{u.disconnect(),queueMicrotask(()=>e._sweep())}},[t,i,e]),(0,Xe.createElement)("span",{ref:n,"data-tf-slot":"",style:{display:"contents"}},a.map(c=>c._mount?(0,Do.createPortal)((0,Xe.createElement)(HN,{el:c}),c._mount,c._mountKey):null))}function c5({onClose:e,children:t}){let n=(0,Xe.useRef)(null);return dl(n,e),(0,Xe.useEffect)(()=>{let a=setTimeout(()=>{let l=n.current,i=l?.querySelector('[autofocus], input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select'),c=document.activeElement,s=c instanceof HTMLInputElement||c instanceof HTMLTextAreaElement||c instanceof HTMLSelectElement;l&&i&&!(s&&l.contains(c))&&i.focus()},30);return()=>clearTimeout(a)},[]),(0,Xe.createElement)("div",{ref:n,"data-tf-dialog":"",style:{position:"fixed",inset:0,zIndex:85,overflowY:"auto"},onClick:a=>{a.target instanceof Element&&a.target.classList.contains("tf-backdrop")&&e?.()}},t)}var Sa=class e extends HTMLElement{static def;static component;static selector="tf-provider";_key=`tf${(++hm).toString(36)}`;_values=new Map;_fns=new Map;_slots=null;_views=new Map;_root=null;_mount=null;_mountKey="";_slot=null;_stash=null;_rendered=!1;_version=0;_subs=new Set;_listeners=new Map;_callbacks=new Map;_closeFn;_stripping=new Set;_waiting=!1;_observer=null;constructor(){super();let t=this._def;for(let a of t.events)a.type!=="click"&&HTMLElement.prototype.addEventListener.call(this,a.type,l=>{!mm.has(l)&&l.target!==this&&this._isOwnDom(l.target)&&l.stopImmediatePropagation()});if(t.closeChildren){let a=l=>{l.target!==this&&mm.has(l)&&this._closeFn?.()};HTMLElement.prototype.addEventListener.call(this,"close",a),this._listeners.set("close",new Set([a]))}let n=this;for(let a of[...t.props.map(l=>l.name),...t.events.map(l=>l.prop)])if(!LN.has(a)&&Object.prototype.hasOwnProperty.call(this,a)){let l=n[a];delete n[a],n[a]=l}}get _def(){return this.constructor.def}connectedCallback(){this._waiting||(document.readyState==="loading"?(this._waiting=!0,document.addEventListener("DOMContentLoaded",()=>{this._waiting=!1,this._attach()},{once:!0})):queueMicrotask(()=>this._attach()))}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||this._leave()})}attributeChangedCallback(t,n,a){if(a===null&&this._stripping.delete(t))return;let i=this._def.byAttr.get(t);if(i){let c=kN(i,a);c===void 0?this._values.delete(i.name):this._values.set(i.name,c),a5.has(t)&&a!==null&&(this._stripping.add(t),this.removeAttribute(t))}this._bump()}_attach(){if(!this.isConnected)return;let t=_o(this);if(t){let l=l5(this,t);if(l==="stash")return;if(l){this._slot!==l&&l.rescan();return}if(!t._rendered)return}if(this._root)return;this._leave(),this._prepare();let n=this._newMount(),a=(0,jN.createRoot)(n,{identifierPrefix:`${this._key}-`});this._root=a,(0,Do.flushSync)(()=>a.render((0,Xe.createElement)(HN,{el:this})))}_leave(){let t=this._root,n=this._slot;this._root=null,this._slot=null,this._mount?.remove(),this._mount=null,t&&t.unmount(),n?.release(this)}_enterPortal(t){this._leave(),this._prepare(),this._newMount(),this._slot=t}_newMount(){let t=document.createElement(ON);return t.style.display="contents",this._mount=t,this._mountKey=`${this._key}-${(++hm).toString(36)}`,this.appendChild(t),t}_prepare(){if(!this._slots){this._slots=new Map;for(let t of[...this.childNodes])this._take(t);this._observer=new MutationObserver(t=>{if(this._mount&&this._mount.parentNode!==this){this._slots=null,this._views.clear(),this._observer?.disconnect(),this._leave(),this._attach();return}let n=!1;for(let a of t)for(let l of a.addedNodes)l.parentNode===this&&(n=this._take(l)||n);n&&(this._views.clear(),this._bump())}),this._observer.observe(this,{childList:!0})}}_take(t){if(t===this._mount||t===this._stash||t instanceof Element&&t.localName===ON||!i5(t))return!1;let n=t instanceof Element?t.getAttribute("slot"):null,a="children";if(n){let l=n.indexOf(":"),i=_N(l<0?n:n.slice(0,l));a=l<0?i:`${i}:${n.slice(l+1)}`}return this._slots?.set(a,[...this._slots.get(a)??[],t]),!0}_sweep(){if(this._rendered=!0,!!this._slots){for(let t of this._slots.values())for(let n of t)if(n.parentNode===this||!this.contains(n)){if(!this._stash){let a=document.createElement("div");a.hidden=!0,a.dataset.tfStash="",this._stash=a}this._stash.parentNode!==this&&this.appendChild(this._stash),this._stash.appendChild(n)}}}_isOwnDom(t){for(let n=t;n&&n!==this;n=n.parentNode)if(n.__tfSlot?.owner===this)return!1;return!0}_subscribe=t=>(this._subs.add(t),()=>this._subs.delete(t));_snapshot=()=>this._version;_bump(){this._version++;for(let t of this._subs)t()}addEventListener(t,n,a){if(!n)return;super.addEventListener(t,n,a);let l=this._listeners.get(t);l||this._listeners.set(t,l=new Set);let i=l.size===0;l.add(n),i&&this._bumpTree(t)}removeEventListener(t,n,a){if(!n)return;super.removeEventListener(t,n,a);let l=this._listeners.get(t);l?.delete(n)&&l.size===0&&this._bumpTree(t)}_listens(t){let n=a=>{let l=a;return!!a._listeners.get(t)?.size||a.hasAttribute(`on${t}`)||typeof l[`on${t}`]=="function"||typeof l[`__${t}`]=="function"};if(n(this))return!0;for(let a=_o(this);a;a=_o(a))if(n(a))return!0;return!1}_bumpTree(t){this._def.byType.get(t)?.conditional&&this._bump();for(let n of this.querySelectorAll(e.selector))n instanceof e&&n._def.byType.get(t)?.conditional&&n._bump()}_slotView(t,n){let a=`${t}|${n?1:0}`;if(this._views.has(a))return this._views.get(a);let l=this._slots?.get(t),i;return l?.length&&(i=l.length===1&&!n?(0,Xe.createElement)(vm,{owner:this,nodes:l}):l.map((c,s)=>(0,Xe.createElement)(vm,{key:s,owner:this,nodes:[c]}))),this._views.set(a,i),i}_nodeView(t){if(t instanceof Node){let n=this._views.get(`node|${t.__tfKey??""}`);if(!n){let a=t.__tfKey??=`n${(++hm).toString(36)}`;n=(0,Xe.createElement)(vm,{key:a,owner:this,nodes:[t]}),this._views.set(`node|${a}`,n)}return n}return Array.isArray(t)?t.map(n=>this._nodeView(n)):t}_propValue(t){if(t.kind==="r"||t.kind==="R"){let a=this._slotView(t.name,t.kind==="R");if(a!==void 0)return a}if(t.kind==="K"&&this._slots){let a;for(let l of this._slots.keys())l.startsWith(`${t.name}:`)&&((a??={})[l.slice(t.name.length+1)]=this._slotView(l,!1));if(a)return{...this._values.get(t.name),...a}}if(t.kind==="f")return this._fns.get(t.name);let n=this._values.get(t.name);if(n!==void 0)return t.kind==="r"||t.kind==="R"?this._nodeView(n):n}_callback(t){let n=this._callbacks.get(t.prop);return n||(n=(...a)=>this._fire(t,a),this._callbacks.set(t.prop,n)),n}_fire(t,n){let a=this._fns.get(t.prop),l=a?a.apply(this,n):void 0,i=n[0];if(t.type==="click"&&RN(i)&&i.nativeEvent.type==="click")return l;let c=n.map(wN),s=t.arity>1?Array.from({length:Math.max(t.arity,c.length)},(o,u)=>c[u]):c.length?c[0]:null,r=new CustomEvent(t.type,{detail:s,bubbles:!0,composed:!0,cancelable:!0});return mm.add(r),this.dispatchEvent(r)&&this._after(t,c[0]),l}_after(t,n){let a=this._def,l=!1;for(let i of a.sync)i.event===t.prop&&this._values.get(i.prop)!==void 0&&(this._values.set(i.prop,i.from==="false"?!1:n),l=!0);l?this._bump():a.dismiss.has(t.prop)&&(this.hidden=!0)}_passes(t){return!t.conditional||this._fns.has(t.prop)||this._def.sync.some(n=>n.event===t.prop&&this._values.get(n.prop)!==void 0)?!0:this._listens(t.type)}_props(){let t=this._def,n={};for(let c of t.props){let s=this._propValue(c);s!==void 0&&(n[c.name]=s)}let a=this._slotView("children",!1);t.closeChildren?n.children=c=>(this._closeFn=c.close,a??null):a!==void 0&&(n.children=a);let l=this.getAttribute("class");l&&(n.className=l);let i=zN(this.getAttribute("style"));i&&(n.style=i);for(let c of t.events)this._passes(c)&&(n[c.prop]=this._callback(c));return n}_view(){if(this.hidden)return null;let t=this.constructor.component,n=this._props(),a=(0,Xe.createElement)(t,n);return this._def.dialog?(0,Xe.createElement)(c5,{onClose:n.onClose},a):a}};function BN(e,t){let n=[...e.props.filter(c=>c.kind!=="f").map(c=>c.attr),...e.events.map(c=>`on${c.type}`),"class","style","hidden"];class a extends Sa{static def=e;static component=t;static observedAttributes=[...new Set(n)]}let l=a.prototype,i=(c,s,r)=>{LN.has(c)||Object.defineProperty(l,c,{configurable:!0,enumerable:!0,get:s,set:r})};for(let c of e.props)i(c.name,function(){return c.kind==="f"?this._fns.get(c.name):this._values.get(c.name)},function(s){c.kind==="f"?typeof s=="function"?this._fns.set(c.name,s):this._fns.delete(c.name):s===void 0?this._values.delete(c.name):this._values.set(c.name,s),this._views.clear(),this._bump()});for(let c of e.events)i(c.prop,function(){return this._fns.get(c.prop)},function(s){typeof s=="function"?this._fns.set(c.prop,s):this._fns.delete(c.prop),this._bump()});return a}var Oo=[{t:"tf-provider",c:"UIProvider",p:"kit:s theme:s density:s scope:s tokens:j surface:s motion:s"},{t:"tf-icon",c:"Icon",p:"name:s size:n label:s"},{t:"tf-range-slider",c:"RangeSlider",p:"label:r min:n max:n step:n value:j defaultValue:j unit:s inputs:b openEnd:b format:f hint:r",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-bar-list",c:"BarList",p:"items:j format:f label:s",e:"onPick:1?"},{t:"tf-status-select",c:"StatusSelect",p:"options:j value:s defaultValue:s size:s label:s width:n",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-tile-picker",c:"TilePicker",p:"options:j value:j defaultValue:j multiple:b min:n label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-live-feed",c:"LiveFeed",p:"items:j types:j paused:b maxHeight:n emptyText:s",e:"onPause:1"},{t:"tf-map-view",c:"MapView",p:"points:j bounds:j background:r bubbles:b selected:x? renderPopup:f legend:r controls:r height:x label:s surface:s",e:"onSelect:1"},{t:"tf-balance-card",c:"BalanceCard",p:"name:s sub:r logo:r icon:s tint:s balance:n currency:s perDay:n low:n spark:j status:s statusLabel:s topUpLabel:s action:r",e:"onTopUp:0?"},{t:"tf-service-monitor",c:"ServiceMonitor",p:"items:j label:s"},{t:"tf-run-history",c:"RunHistory",p:"items:j label:s"},{t:"tf-webhook-endpoint",c:"WebhookEndpoint",p:"url:s events:jl status:s statusLabel:s successRate:n enabled:b secret:r deliveries:j menu:jl defaultOpen:b",e:"onToggle:0? onRetry:1?"},{t:"tf-backup-list",c:"BackupList",p:"items:j footer:r label:s",e:"onDownload:1? onRestore:1?"},{t:"tf-block-list",c:"BlockList",p:"items:j addLabel:s removeLabel:s searchPlaceholder:s emptyText:s",e:"onAdd:0? onRemove:1?"},{t:"tf-review-card",c:"ReviewCard",p:"author:s verified:b product:s date:s rating:n title:s text:s state:s stateLabel:s highlight:jl reply:s replyLabel:s",e:"onPublish:0? onHide:0? onReply:1?"},{t:"tf-coupon-card",c:"CouponCard",p:"code:s kind:s value:n currency:s used:n limit:n until:s min:n revenue:n text:r status:s statusLabel:s menu:jl",e:"onCopy:0"},{t:"tf-locale-field",c:"LocaleField",p:"label:r locales:j value:j defaultValue:j source:s active:s multiline:b rows:n placeholder:s hint:r error:r",e:"onChange:1 onTranslate:2?",s:"onChange:value:detail"},{t:"tf-locale-switcher",c:"LocaleSwitcher",p:"languages:j language:s currencies:jl currency:s variant:s",e:"onLanguage:1 onCurrency:1"},{t:"tf-workspace-switcher",c:"WorkspaceSwitcher",p:"items:j value:s label:s footer:r variant:s width:n",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-export-dialog",c:"ExportDialog",p:"open:b inline:b title:s text:r count:n formats:jl format:s columns:j ranges:b range:jt note:r download:r doneText:s",e:"onClose:0 onExport:2 onDownload:0",s:"onClose:open:false",x:"onClose"},{t:"tf-two-factor-setup",c:"TwoFactorSetup",p:"qr:r secret:s codes:jl step:n scanText:s codesText:s",e:"onVerify:1? onDownload:0? onDone:0"},{t:"tf-color-field",c:"ColorField",p:"label:r value:s defaultValue:s against:s! hint:r",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-agent-card",c:"AgentCard",p:"name:s role:s tint:s status:s statusLabel:s model:s cost:s last:r",e:"onClick:0? onChat:0?"},{t:"tf-agent-details",c:"AgentDetails",p:"name:s role:s tint:s status:s statusLabel:s sections:j actions:R"},{t:"tf-chat-list",c:"ChatList",p:"groups:j selected:s filters:r searchPlaceholder:s",e:"onSelect:1 onSearch:1"},{t:"tf-chat-workspace",c:"ChatWorkspace",p:"list:r thread:r details:r"},{t:"tf-search-hits",c:"SearchHits",p:"items:j query:s emptyText:s",e:"onOpen:1"},{t:"tf-thinking-line",c:"ThinkingLine",p:"text:s"},{t:"tf-feedback-rating",c:"FeedbackRating",p:"value:s? label:s placeholder:s thanks:s askOnUp:b",e:"onRate:1 onSubmit:2"},{t:"tf-activity-feed",c:"ActivityFeed",p:"groups:j items:j"},{t:"tf-daily-briefing",c:"DailyBriefing",p:"title:s time:s tint:s summary:r attention:j suggestions:R attentionTitle:s suggestionsTitle:s"},{t:"tf-budget-stop",c:"BudgetStop",p:"spent:n budget:n title:s text:r paused:r running:r actionLabel:s",e:"onRaise:0?"},{t:"tf-memory-viewer",c:"MemoryViewer",p:"items:j",e:"onEdit:1? onDelete:1?"},{t:"tf-override-diff",c:"OverrideDiff",p:"title:s versions:r by:r before:s after:s discardLabel:s promoteLabel:s",e:"onDiscard:0? onPromote:0?"},{t:"tf-trigger-list",c:"TriggerList",p:"items:j",e:"onToggle:1? onRun:1?"},{t:"tf-schedule-calendar",c:"ScheduleCalendar",p:"events:j from:n to:n days:jl",e:"onOpen:1"},{t:"tf-org-chart",c:"OrgChart",p:"root:j"},{t:"tf-voice-mode",c:"VoiceMode",p:"name:s tint:s state:s stateLabel:s transcript:r muted:b",e:"onMute:0? onEnd:0?"},{t:"tf-mobile-tab-bar",c:"MobileTabBar",p:"items:j active:s label:s",e:"onPick:1"},{t:"tf-push-notification",c:"PushNotification",p:"app:s time:s title:s text:r actions:j"},{t:"tf-config-pr-summary",c:"ConfigPRSummary",p:"title:s meta:r status:s statusLabel:s summary:r items:j actions:R"},{t:"tf-module-registry",c:"ModuleRegistry",p:"items:j coreLabel:s",e:"onToggle:1"},{t:"tf-approval-card",c:"ApprovalCard",p:"title:r text:r agent:s project:s family:s familyLabel:s age:s escalation:r trace:r note:r heading:s options:j approveLabel:s decision:j compact:b state:s",e:"onDecide:2 onApprove:0 onDeny:0 onEdit:1"},{t:"tf-approval-inbox",c:"ApprovalInbox",p:"items:j selected:x emptyTitle:s emptyText:s label:s",e:"onSelect:1?"},{t:"tf-kbd",c:"Kbd",p:"keys:jl"},{t:"tf-key-value",c:"KeyValue",p:"items:j dense:b"},{t:"tf-spinner",c:"Spinner",p:"size:s label:s"},{t:"tf-collapsible",c:"Collapsible",p:"title:r meta:r defaultOpen:b open:b",e:"onOpenChange:1",s:"onOpenChange:open:detail"},{t:"tf-context-menu",c:"ContextMenu",p:"items:jl"},{t:"tf-split-pane",c:"SplitPane",p:"left:r right:r defaultSize:n min:n max:n storageKey:s"},{t:"tf-resizable-panels",c:"ResizablePanels",p:"panels:R defaultSizes:j min:n orientation:s storageKey:s labels:jl"},{t:"tf-tree-view",c:"TreeView",p:"items:j defaultOpen:jl selected:s label:s",e:"onSelect:1"},{t:"tf-inline-edit",c:"InlineEdit",p:"value:s options:jl mono:b type:s display:f align:s label:s",e:"onSave:1"},{t:"tf-bar-chart",c:"BarChart",p:"data:j tint:s height:n width:n barWidth:n format:f label:s"},{t:"tf-line-chart",c:"LineChart",p:"labels:jl series:j height:n width:n format:f label:s"},{t:"tf-sparkline",c:"Sparkline",p:"values:j tint:s width:n height:n label:s"},{t:"tf-donut",c:"Donut",p:"data:j center:s caption:s size:n stroke:n legend:b label:s"},{t:"tf-legend",c:"Legend",p:"items:j"},{t:"tf-stacked-bar-chart",c:"StackedBarChart",p:"labels:jl series:j height:n width:n barWidth:n format:f legend:b label:s"},{t:"tf-area-chart",c:"AreaChart",p:"labels:jl series:j stacked:b height:n width:n format:f legend:b label:s"},{t:"tf-heatmap",c:"Heatmap",p:"rows:jl cols:jl values:j colEvery:n caption:s format:f label:s"},{t:"tf-funnel",c:"Funnel",p:"steps:j tint:s format:f"},{t:"tf-gauge",c:"Gauge",p:"value:n max:n caption:s format:f tint:s thresholds:j size:n stroke:n showRange:b label:s"},{t:"tf-rich-text",c:"RichText",p:"text:s streaming:b"},{t:"tf-code-block",c:"CodeBlock",p:"code:s lang:s open:b"},{t:"tf-typing-dots",c:"TypingDots",p:"label:s"},{t:"tf-agent-mark",c:"AgentMark",p:"tint:s icon:s size:n live:b"},{t:"tf-chat-message",c:"ChatMessage",p:"role:s name:s time:s model:s text:s streaming:b tint:s sources:j attachments:j usage:s actions:b before:r after:r feedback:s?",e:"onRetry:0? onFeedback:1"},{t:"tf-tool-call",c:"ToolCall",p:"name:s icon:s status:s summary:r duration:s input:j output:j defaultOpen:b"},{t:"tf-reasoning",c:"Reasoning",p:"steps:jl text:r duration:s streaming:b defaultOpen:b"},{t:"tf-prompt-starters",c:"PromptStarters",p:"items:j",e:"onPick:1"},{t:"tf-model-picker",c:"ModelPicker",p:"models:j value:s side:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-composer",c:"Composer",p:"value:s busy:b placeholder:s label:s models:j model:s commands:j attachments:j hint:s left:r disabled:b",e:"onChange:1 onSend:2 onStop:0 onModel:1 onCommand:1? onAttach:1? onRemoveAttachment:1?",s:"onChange:value:detail"},{t:"tf-agent-status",c:"AgentStatus",p:"status:s step:s"},{t:"tf-run-trace",c:"RunTrace",p:"steps:j defaultOpen:n? footer:r"},{t:"tf-usage-meter",c:"UsageMeter",p:"used:n limit:n label:s caption:s format:f"},{t:"tf-product-art",c:"ProductArt",p:"kind:s tint:s size:n label:s"},{t:"tf-price",c:"Price",p:"value:n compareAt:n currency:s size:s showSave:b"},{t:"tf-rating",c:"Rating",p:"value:n count:n size:n"},{t:"tf-stock-badge",c:"StockBadge",p:"stock:n low:n compact:b"},{t:"tf-product-card",c:"ProductCard",p:"name:s meta:s art:s tint:s price:n compareAt:n rating:n reviews:n badge:s badgeTone:s stock:n wished:b added:b",e:"onWish:0? onAdd:0? onClick:0"},{t:"tf-variant-picker",c:"VariantPicker",p:"label:s type:s options:jl value:s defaultValue:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-cart-line",c:"CartLine",p:"name:s variant:s note:s art:s tint:s price:n qty:n",e:"onQty:1? onRemove:0"},{t:"tf-order-summary",c:"OrderSummary",p:"lines:j showLines:b discount:j shipping:n? freeShippingFrom:n vat:n title:s! action:r",e:"onCoupon:1?"},{t:"tf-checkout-steps",c:"CheckoutSteps",p:"steps:jl current:n",e:"onPick:1?"},{t:"tf-order-timeline",c:"OrderTimeline",p:"status:s times:j"},{t:"tf-plan-card",c:"PlanCard",p:"name:s text:s price:n? was:n per:s features:jl featured:b flag:s current:b cta:s",e:"onPick:0"},{t:"tf-count-up",c:"CountUp",p:"value:x duration:n delay:n"},{t:"tf-stat-tile",c:"StatTile",p:"value:r label:s tint:s delta:s delay:n"},{t:"tf-card",c:"Card",p:"title:s description:s meta:jl corner:r status:r actions:R tint:s eyebrow:r surface:s",e:"onClick:0?"},{t:"tf-event-card",c:"EventCard",p:"kind:s label:s date:s time:s tint:s icon:s actions:b"},{t:"tf-panel",c:"Panel",p:"side:b title:s subtitle:s action:r surface:s"},{t:"tf-page-header",c:"PageHeader",p:"crumbs:jl title:s subtitle:s actions:R"},{t:"tf-stagger",c:"Stagger",p:"as:s delay:n reveal:b"},{t:"tf-table",c:"Table",p:"columns:j rows:j animate:b"},{t:"tf-list-row",c:"ListRow",p:"avatar:s icon:s tint:s leading:r title:r subtitle:r meta:r trailing:r unread:b active:b",e:"onClick:0"},{t:"tf-timeline",c:"Timeline",p:"items:j delay:n"},{t:"tf-file-row",c:"FileRow",p:"name:s meta:s kind:s"},{t:"tf-kanban-column",c:"KanbanColumn",p:"title:s dot:s delay:n",e:"onAdd:0"},{t:"tf-progress",c:"Progress",p:"value:n tint:s label:s"},{t:"tf-progress-ring",c:"ProgressRing",p:"value:n tint:s size:n stroke:n caption:s label:s"},{t:"tf-filter-bar",c:"FilterBar",p:"filters:j value:j search:s query:s right:r",e:"onChange:1 onQuery:1",s:"onChange:value:detail"},{t:"tf-data-table",c:"DataTable",p:"columns:j rows:j rowKey:s selectable:b bulkActions:j renderExpanded:f stickyHeader:b maxHeight:x defaultSort:j toolbar:r columnToggle:b empty:r"},{t:"tf-log-view",c:"LogView",p:"lines:jl title:r right:r numbers:b follow:b maxHeight:n"},{t:"tf-code-viewer",c:"CodeViewer",p:"value:j lang:s"},{t:"tf-secret-field",c:"SecretField",p:"prefix:s last4:s value:s meta:r",e:"onReveal:0? onCopy:0? onRotate:0?"},{t:"tf-money-input",c:"MoneyInput",p:"label:s value:n? currency:s vat:s vatOptions:j showGross:b hint:r error:r defaultValue:n? required:b",e:"onChange:1 onVat:1",s:"onChange:value:detail"},{t:"tf-settings-layout",c:"SettingsLayout",p:"sections:j footer:r"},{t:"tf-shortcuts-overlay",c:"ShortcutsOverlay",p:"open:b title:s groups:j",e:"onClose:0",s:"onClose:open:false",x:"onClose"},{t:"tf-stat-cell",c:"StatCell",p:"label:r value:r delta:n deltaText:s compare:s invert:b spark:j icon:s iconTint:s tint:s"},{t:"tf-uptime-bar",c:"UptimeBar",p:"days:jl uptime:n caption:r"},{t:"tf-meter",c:"Meter",p:"label:r value:n? max:n text:r warn:n danger:n tone:s"},{t:"tf-skeleton",c:"Skeleton",p:"variant:s width:x height:x"},{t:"tf-menu",c:"Menu",p:"items:jl label:s autoFocus:b",e:"onClose:0?"},{t:"tf-modal",c:"Modal",p:"title:s text:s icon:s tint:s actions:R open:b",e:"onClose:0",s:"onClose:open:false",x:"onClose",dialog:1},{t:"tf-toast",c:"Toast",p:"icon:s tint:s action:s",e:"onAction:0"},{t:"tf-empty-state",c:"EmptyState",p:"title:s text:s icon:s tint:s action:r"},{t:"tf-alert",c:"Alert",p:"tone:s title:r icon:s action:r",e:"onDismiss:0?",x:"onDismiss"},{t:"tf-confirm-dialog",c:"ConfirmDialog",p:"open:b title:s text:s danger:b icon:s confirmLabel:s cancelLabel:s confirmText:s",e:"onConfirm:0 onCancel:0",s:"onCancel:open:false onConfirm:open:false"},{t:"tf-toaster",c:"Toaster",p:"position:s"},{t:"tf-form-field",c:"FormField",p:"name:s label:r required:b optional:b hint:r error:r success:r"},{t:"tf-text-field",c:"TextField",p:"type:s icon:s suffix:r value:s defaultValue:s placeholder:s disabled:b autoComplete:s name:s label:r required:b optional:b hint:r error:r success:r",e:"onChange:1 onBlur:1",s:"onChange:value:detail"},{t:"tf-radio-group",c:"RadioGroup",p:"label:s options:jl value:s defaultValue:s cards:b hint:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-segmented",c:"Segmented",p:"options:jl value:s defaultValue:s size:s block:b label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-combobox",c:"Combobox",p:"label:s options:jl value:j defaultValue:j multiple:b creatable:b placeholder:s hint:s error:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-tag-input",c:"TagInput",p:"label:s value:jl defaultValue:jl placeholder:s hint:s error:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-calendar",c:"Calendar",p:"range:b value:jt today:d min:d max:d month:d",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-date-picker",c:"DatePicker",p:"label:s range:b value:jt defaultValue:jt presets:b min:d max:d today:d placeholder:s hint:s error:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-number-input",c:"NumberInput",p:"label:s value:n defaultValue:n min:n max:n step:n unit:s hint:s error:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-slider",c:"Slider",p:"label:s min:n max:n step:n value:n defaultValue:n format:f marks:b hint:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-otp-input",c:"OtpInput",p:"length:n error:b label:s",e:"onComplete:1"},{t:"tf-file-drop",c:"FileDrop",p:"files:j title:s hint:s accept:s multiple:b",e:"onChange:1"},{t:"tf-button",c:"Button",p:"variant:s size:s icon:s iconRight:s disabled:b type:s asChild:b",e:"onClick:1"},{t:"tf-icon-button",c:"IconButton",p:"icon:s label:s variant:s size:s disabled:b asChild:b",e:"onClick:1"},{t:"tf-chip",c:"Chip",p:"selected:b icon:s count:n",e:"onClick:1"},{t:"tf-badge",c:"Badge",p:"tone:s dot:b live:b"},{t:"tf-tint-icon",c:"TintIcon",p:"icon:s tint:s label:s size:n"},{t:"tf-avatar",c:"Avatar",p:"name:s src:s size:n tint:s"},{t:"tf-avatar-stack",c:"AvatarStack",p:"names:jl max:n size:n"},{t:"tf-input",c:"Input",p:"type:s placeholder:s value:s defaultValue:s disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-select",c:"Select",p:"options:jl value:s defaultValue:s label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-textarea",c:"Textarea",p:"placeholder:s value:s defaultValue:s rows:n disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-search-field",c:"SearchField",p:"placeholder:s shortcut:s value:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-checkbox",c:"Checkbox",p:"name:s value:s required:b checked:b defaultChecked:b disabled:b label:s",e:"onChange:1",s:"onChange:checked:detail"},{t:"tf-switch",c:"Switch",p:"name:s checked:b defaultChecked:b spread:b disabled:b label:s",e:"onChange:1",s:"onChange:checked:detail"},{t:"tf-form",c:"Form",p:"rules:j errors:j",e:"onSubmit:1 onInvalid:1"},{t:"tf-select-menu",c:"SelectMenu",p:"options:jl value:s defaultValue:s placeholder:s disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-account-switcher",c:"AccountSwitcher",p:"accounts:j value:s? unread:n allLabel:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-inbox-list",c:"InboxList",p:"items:j selected:x",e:"onOpen:1"},{t:"tf-mail-thread",c:"MailThread",p:"subject:s messages:j reply:r"},{t:"tf-signature-editor",c:"SignatureEditor",p:"value:j fields:j note:r extra:r defaultValue:j previewLabel:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-attachment-preview",c:"AttachmentPreview",p:"name:s meta:r facts:j found:r actions:r width:x inline:b",e:"onClose:0",x:"onClose"},{t:"tf-image-variants",c:"ImageVariants",p:"variants:j selected:x alt:s tint:s actions:r",e:"onSelect:1"},{t:"tf-gallery",c:"Gallery",p:"items:j start:n ratio:s thumbs:b fullscreen:b badge:r"},{t:"tf-before-after",c:"BeforeAfter",p:"before:j after:j start:n ratio:s beforeLabel:s afterLabel:s"},{t:"tf-tabs",c:"Tabs",p:"items:jl value:s defaultValue:s block:b panels:K label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-breadcrumb",c:"Breadcrumb",p:"items:jl"},{t:"tf-pagination",c:"Pagination",p:"total:n page:n"},{t:"tf-menubar",c:"Menubar",p:"menus:j label:s"},{t:"tf-navigation-menu",c:"NavigationMenu",p:"items:j label:s"},{t:"tf-sidebar",c:"Sidebar",p:"groups:j current:s collapsed:b defaultCollapsed:b header:r footer:r label:s",e:"onPick:1 onCollapsedChange:1",s:"onCollapsedChange:collapsed:detail"},{t:"tf-connection-card",c:"ConnectionCard",p:"name:s icon:s logo:r text:r status:s statusLabel:s action:r"},{t:"tf-connection-banner",c:"ConnectionBanner",p:"state:s seconds:n text:r",e:"onRetry:0?"},{t:"tf-server-card",c:"ServerCard",p:"name:s provider:s address:s logo:r status:s statusLabel:s meters:j uptime:j foot:r"},{t:"tf-deploy-pipeline",c:"DeployPipeline",p:"stages:j"},{t:"tf-dns-record-table",c:"DnsRecordTable",p:"records:j rowMenu:f selectable:b bulkActions:j toolbar:r"},{t:"tf-domain-list",c:"DomainList",p:"items:j",e:"onOpen:1"},{t:"tf-mail-auth-status",c:"MailAuthStatus",p:"rows:j columns:jl",e:"onOpen:2"},{t:"tf-ledger-table",c:"LedgerTable",p:"rows:j categories:jl currency:s selectable:b bulkActions:j toolbar:r maxHeight:n columnToggle:b",e:"onEdit:2"},{t:"tf-pnl-statement",c:"PnLStatement",p:"columns:jl rows:j currency:s total:b label:s"},{t:"tf-receipt-suggestion",c:"ReceiptSuggestion",p:"file:s source:r fields:j suggestion:r confirmLabel:s discardLabel:s",e:"onConfirm:0? onDiscard:0?"},{t:"tf-popover",c:"Popover",p:"trigger:r open:b align:s side:s width:n flush:b block:b role:s",e:"onOpenChange:1",s:"onOpenChange:open:detail",close:1},{t:"tf-tooltip",c:"Tooltip",p:"label:r shortcut:s side:s defaultOpen:b"},{t:"tf-email-preview",c:"EmailPreview",p:"from:s fromName:s subject:s preheader:s html:s device:s checks:j",e:"onDevice:1"},{t:"tf-search-ad-preview",c:"SearchAdPreview",p:"name:s domain:s paths:jl headlines:jl descriptions:jl sitelinks:jl device:s sponsoredLabel:s",e:"onDevice:1"},{t:"tf-accordion",c:"Accordion",p:"items:j multiple:b value:jl defaultValue:jl variant:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-separator",c:"Separator",p:"orientation:s label:s"},{t:"tf-aspect-ratio",c:"AspectRatio",p:"ratio:n"},{t:"tf-label",c:"Label",p:"htmlFor:s required:b hint:r"},{t:"tf-toggle",c:"Toggle",p:"pressed:b defaultPressed:b icon:s label:s size:s disabled:b",e:"onChange:1",s:"onChange:pressed:detail"},{t:"tf-toggle-group",c:"ToggleGroup",p:"items:jl type:s value:jl defaultValue:jl label:s size:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-button-group",c:"ButtonGroup",p:"label:s orientation:s"},{t:"tf-scroll-area",c:"ScrollArea",p:"height:x maxHeight:x orientation:s label:s"},{t:"tf-hover-card",c:"HoverCard",p:"trigger:r side:s align:s openDelay:n closeDelay:n width:n"},{t:"tf-carousel",c:"Carousel",p:"slides:R label:s perView:n loop:b dots:b index:n defaultIndex:n",e:"onChange:1",s:"onChange:index:detail"},{t:"tf-listing-card",c:"ListingCard",p:"listing:j layout:s selected:b statusOptions:j",e:"onSelect:1? onWish:1? onStatus:2 onOpen:1?"},{t:"tf-results-toolbar",c:"ResultsToolbar",p:"title:s total:n meta:s selected:n bulkActions:j sortOptions:j sort:s views:jl view:s",e:"onSelectAll:1? onSort:1 onView:1"},{t:"tf-saved-search",c:"SavedSearch",p:"name:s criteria:R lastRun:s frequency:s newCount:n enabled:b openLabel:s icon:s tint:s",e:"onToggle:0? onEdit:0? onOpen:0?"},{t:"tf-valuation-card",c:"ValuationCard",p:"value:n low:n high:n asking:n perSqm:n compare:s currency:s confidence:n confidenceLabel:s facts:j note:r title:s action:r"},{t:"tf-energy-class",c:"EnergyClass",p:"value:s kwh:n kind:s scale:jl"},{t:"tf-rich-text-editor",c:"RichTextEditor",p:"label:r defaultValue:s value:s placeholder:s variables:j maxLength:n minHeight:n footer:r hint:r error:r disabled:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-top-bar",c:"TopBar",p:"brand:s tag:s items:j active:s user:j extra:r userOpen:b",e:"onNavigate:1 onUser:0"},{t:"tf-side-rail",c:"SideRail",p:"top:j bottom:j"},{t:"tf-dock",c:"Dock",p:"items:j label:s surface:s"},{t:"tf-floating-layout",c:"FloatingLayout",p:"background:r top:r start:r end:r bottom:r height:x surface:s label:s"},{t:"tf-ambient",c:"Ambient",p:"colors:jl src:s video:b animate:b fixed:b"},{t:"tf-app-shell",c:"AppShell",p:"active:s brand:s tag:s nav:j user:j topExtra:r sheetStyle:j contentKey:x side:r dock:b dockItems:j railTop:j railBottom:j",e:"onNavigate:1"},{t:"tf-chat-launcher",c:"ChatLauncher",p:"title:s context:r tint:s open:b unread:n headerAction:r composer:r inline:b",e:"onOpenChange:1",s:"onOpenChange:open:detail"},{t:"tf-cookie-consent",c:"CookieConsent",p:"title:s text:r policy:r categories:j open:b inline:b",e:"onSave:1"},{t:"tf-announcement-bar",c:"AnnouncementBar",p:"tint:s icon:s! action:r",e:"onDismiss:0?",x:"onDismiss"},{t:"tf-status-shape",c:"StatusShape",p:"status:s"},{t:"tf-status-indicator",c:"StatusIndicator",p:"status:s label:r size:s"},{t:"tf-status-screen",c:"StatusScreen",p:"code:s title:s text:s icon:s tint:s extra:r actions:R reference:s",e:"onHome:0 onContact:0"},{t:"tf-auth-card",c:"AuthCard",p:"title:s text:s icon:s tint:s brand:s foot:r"},{t:"tf-sub-nav",c:"SubNav",p:"eyebrow:s action:j items:j current:s",e:"onPick:1"},{t:"tf-drawer",c:"Drawer",p:"title:s subtitle:r avatar:s width:x inline:b open:b side:s",e:"onClose:0",s:"onClose:open:false",x:"onClose"},{t:"tf-command-palette",c:"CommandPalette",p:"items:j placeholder:s inline:b loading:b empty:r open:b",e:"onClose:0 onQueryChange:1",s:"onClose:open:false",x:"onClose"},{t:"tf-notification-list",c:"NotificationList",p:"items:j",e:"onOpen:1 onReadAll:0"},{t:"tf-flow",c:"Flow",p:"steps:j active:n? waiting:b tools:f",e:"onApprove:0? onReject:0?"},{t:"tf-file-thumb",c:"FileThumb",p:"kind:s title:s big:b entries:jl"},{t:"tf-file-card",c:"FileCard",p:"name:s kind:s size:s meta:s shared:b",e:"onClick:0"},{t:"tf-wizard",c:"Wizard",p:"steps:j current:n done:j footer:r brand:s label:s",e:"onPick:1"},{t:"tf-permission-matrix",c:"PermissionMatrix",p:"roles:j areas:jl",e:"onChange:3"},{t:"tf-invoice-preview",c:"InvoicePreview",p:"number:x from:s to:s issued:s due:s lines:j note:s kind:s brand:s format:f"},{t:"tf-transaction-row",c:"TransactionRow",p:"text:s date:s amount:n matched:b matchRef:s hint:s",e:"onMatch:0"}];var s5="0.2.1",r5=Object.freeze(Object.fromEntries(Oo.map(e=>[e.t,e.c]))),qN=Oo.map(e=>e.t),UN=!1;function o5(){if(UN)return;UN=!0;let e=qN.join(","),t=`:where(${e},tf-root){display:contents}:where(${e})[hidden]{display:none}`;try{let n=new CSSStyleSheet;n.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,n]}catch{let n=document.createElement("style");n.dataset.tfElements="",n.textContent=t,document.head.prepend(n)}}function VN(){if(typeof window>"u"||typeof customElements>"u")return;Sa.selector=qN.join(","),o5();let e=hu;for(let t of Oo){if(customElements.get(t.t))continue;let n=e[t.c];typeof n=="function"&&customElements.define(t.t,BN(DN(t),n))}}VN();return FN(u5);})();
|
|
31
31
|
/*! Bundled license information:
|
|
32
32
|
|
|
33
33
|
react/cjs/react-jsx-runtime.production.js:
|
package/dist/elements.js
CHANGED
|
@@ -27,7 +27,7 @@ ${Ta(i('[data-theme="system"]'),h," ")}}
|
|
|
27
27
|
`),n=String(e.after||"").split(`
|
|
28
28
|
`),a=[],l=0,i=0;for(;l<t.length||i<n.length;)t[l]===n[i]?(a.push([" ",t[l]]),l++,i++):i<n.length&&t.indexOf(n[i],l)<0?(a.push(["+",n[i]]),i++):l<t.length?(a.push(["-",t[l]]),l++):(a.push(["+",n[i]]),i++);return(0,C.jsxs)("div",{className:"tf-diff",children:[(0,C.jsxs)("div",{className:"tf-diff-head",children:[(0,C.jsxs)("div",{className:"tf-option-text",children:[(0,C.jsx)("b",{children:e.title}),(0,C.jsx)("small",{children:[e.versions,e.by].filter(Boolean).join(" \xB7 ")})]}),(0,C.jsxs)("span",{className:"tf-row",style:{flexWrap:"nowrap"},children:[e.onDiscard&&(0,C.jsx)(Q,{size:"sm",variant:"ghost",onClick:e.onDiscard,children:e.discardLabel||"Discard override"}),e.onPromote&&(0,C.jsx)(Q,{size:"sm",variant:"soft",icon:"branch",onClick:e.onPromote,children:e.promoteLabel||"Move to code"})]})]}),(0,C.jsx)("pre",{className:"tf-diff-body",children:a.map((c,s)=>(0,C.jsxs)("span",{className:c[0]==="+"?"add":c[0]==="-"?"del":"",children:[(0,C.jsx)("i",{children:c[0]}),c[1],`
|
|
29
29
|
`]},s))})]})}var Bx={schedule:"clock",event:"zap",webhook:"link",mail:"mail"};function iv(e){return(0,C.jsx)("div",{className:"tf-triggers",children:(e.items||[]).map(t=>(0,C.jsxs)("div",{className:b("tf-trigger",t.enabled===!1&&"off"),children:[(0,C.jsx)(ie,{icon:Bx[t.type]||"zap",tint:t.enabled===!1?"plain":"sky"}),(0,C.jsxs)("span",{className:"tf-option-text",children:[(0,C.jsx)("b",{children:t.rule}),(0,C.jsx)("small",{children:[t.agent,t.by].filter(Boolean).join(" \xB7 ")})]}),(0,C.jsx)("span",{className:"tf-trigger-next",children:t.next}),e.onToggle&&(0,C.jsx)("input",{type:"checkbox",role:"switch",className:"tf-switch",checked:t.enabled!==!1,"aria-label":typeof t.rule=="string"?t.rule:void 0,onChange:()=>{e.onToggle?.(t)}}),e.onRun&&(0,C.jsx)(Pe,{label:"Run now",children:(0,C.jsx)("button",{type:"button",className:"tf-iconbtn tf-iconbtn-soft tf-iconbtn-sm","aria-label":"Run now",onClick:()=>{e.onRun?.(t)},children:(0,C.jsx)(N,{name:"play"})})})]},t.id))})}function cv(e){let t=e.from!=null?e.from:6,n=e.to!=null?e.to:22,a=[];for(let c=t;c<n;c++)a.push(c);let l=e.days||$o(),i=32;return(0,C.jsxs)("div",{className:"tf-sched",style:{"--rows":a.length,"--row-h":i+"px"},children:[(0,C.jsx)("span",{}),l.map((c,s)=>(0,C.jsx)("span",{className:"tf-sched-day",children:c},s)),(0,C.jsx)("div",{className:"tf-sched-times",children:a.map(c=>(0,C.jsx)("span",{children:(c<10?"0":"")+c+":00"},c))}),l.map((c,s)=>(0,C.jsx)("div",{className:"tf-sched-col",children:(e.events||[]).filter(r=>r.day===s).map((r,o)=>{let u=(r.start-t)*i,h=Math.max(i/2,(r.end-r.start)*i-4);return(0,C.jsxs)("button",{type:"button",className:b("tf-sched-ev","tf-bg-"+(r.tint||"sky"),r.self&&"self"),style:{top:u,height:h},title:r.label,onClick:()=>{e.onOpen&&e.onOpen(r)},children:[(0,C.jsx)("b",{children:r.label}),h>30&&r.sub&&(0,C.jsx)("small",{children:r.sub})]},o)})},s))]})}function sv(e){function t(n){return(0,C.jsxs)("li",{children:[(0,C.jsxs)("div",{className:b("tf-org-node",n.root&&"root"),children:[n.avatar?(0,C.jsx)(qe,{name:n.name,size:32}):(0,C.jsx)(Gt,{tint:n.tint,size:32,live:n.status==="running"}),(0,C.jsxs)("span",{className:"tf-option-text",children:[(0,C.jsx)("b",{children:n.name}),(0,C.jsx)("small",{children:n.role})]}),n.status&&(0,C.jsx)(Re,{status:n.status})]}),n.children&&n.children.length>0&&(0,C.jsx)("ul",{children:n.children.map(t)})]},n.id||n.name)}return(0,C.jsx)("div",{className:"tf-org",children:(0,C.jsx)("ul",{children:t(Object.assign({root:!0},e.root))})})}function rv(e){let t=e.state||"listening",n=[];for(let a=0;a<24;a++)n.push(a);return(0,C.jsxs)("div",{className:b("tf-voice","is-"+t),children:[(0,C.jsx)(Gt,{tint:e.tint||"lilac",size:72,live:t!=="idle"}),(0,C.jsx)("b",{className:"tf-voice-name",children:e.name}),(0,C.jsx)("span",{className:"tf-voice-state",children:e.stateLabel||t==="listening"?"Listening\u2026":t==="thinking"?"Thinking\u2026":t==="speaking"?"Speaking\u2026":"Paused"}),(0,C.jsx)("div",{className:"tf-voice-wave","aria-hidden":!0,children:n.map(a=>(0,C.jsx)("i",{style:{animationDelay:a*47%600+"ms",height:t==="idle"?4:void 0}},a))}),e.transcript&&(0,C.jsx)("p",{className:"tf-voice-transcript",children:e.transcript}),(0,C.jsxs)("div",{className:"tf-row",style:{justifyContent:"center"},children:[e.onMute&&(0,C.jsx)($,{icon:e.muted?"x":"user",label:e.muted?"Unmute":"Mute",variant:"soft",size:"lg",onClick:e.onMute}),e.onEnd&&(0,C.jsx)("button",{type:"button",className:"tf-voice-end",onClick:e.onEnd,"aria-label":"End conversation",children:(0,C.jsx)(N,{name:"x",size:20})})]})]})}var ae=q(pe(),1),V4=q(re(),1);function ov(e){return(0,ae.jsx)("nav",{className:"tf-tabbar","aria-label":e.label||"Main",children:(e.items||[]).map(t=>{let n=t.id===e.active;return(0,ae.jsxs)("button",{type:"button",className:b("tf-tabbar-item",n&&"on"),"aria-current":n?"page":void 0,onClick:()=>{e.onPick&&e.onPick(t.id)},children:[(0,ae.jsxs)("span",{className:"tf-tabbar-ico",children:[(0,ae.jsx)(N,{name:t.icon,size:20}),t.count?(0,ae.jsx)("span",{className:"tf-dotcount",children:t.count}):null]}),(0,ae.jsx)("span",{children:t.label})]},t.id)})})}function uv(e){return(0,ae.jsxs)("div",{className:"tf-push",children:[(0,ae.jsxs)("div",{className:"tf-push-top",children:[(0,ae.jsx)("span",{className:"tf-push-app",children:e.app}),(0,ae.jsx)("small",{children:e.time})]}),(0,ae.jsx)("b",{children:e.title}),(0,ae.jsx)("p",{children:e.text}),e.actions&&(0,ae.jsx)("div",{className:"tf-push-actions",children:e.actions.map(t=>(0,ae.jsx)("button",{type:"button",onClick:t.onClick,children:t.label},t.label))})]})}function fv(e){let t={project:"grid",team:"users",agent:"bot",tool:"zap",trigger:"clock",file:"file"};return(0,ae.jsxs)("div",{className:"tf-prsum",children:[(0,ae.jsxs)("div",{className:"tf-prsum-head",children:[(0,ae.jsx)(ie,{icon:"branch",tint:"lilac"}),(0,ae.jsxs)("span",{className:"tf-option-text",children:[(0,ae.jsx)("b",{children:e.title}),(0,ae.jsx)("small",{children:e.meta})]}),e.status&&(0,ae.jsx)(Ue,{status:e.status,label:e.statusLabel})]}),e.summary&&(0,ae.jsx)("p",{className:"tf-card-desc",style:{margin:0,fontSize:14,lineHeight:"22px"},children:e.summary}),(0,ae.jsx)("ul",{className:"tf-prsum-list",children:(e.items||[]).map((n,a)=>(0,ae.jsxs)("li",{className:"op-"+(n.op||"add"),children:[(0,ae.jsx)("span",{className:"tf-prsum-op",children:n.op==="remove"?"\u2212":n.op==="change"?"~":"+"}),(0,ae.jsx)(N,{name:t[n.kind]||"file",size:14}),(0,ae.jsxs)("span",{className:"tf-option-text",children:[(0,ae.jsx)("b",{children:n.name}),n.detail&&(0,ae.jsx)("small",{children:n.detail})]})]},a))}),e.actions&&(0,ae.jsx)("div",{className:"tf-row",style:{justifyContent:"flex-end"},children:e.actions})]})}function dv(e){return(0,ae.jsx)("div",{className:"tf-modules",children:(e.items||[]).map(t=>(0,ae.jsxs)("div",{className:"tf-module",children:[(0,ae.jsx)(ie,{icon:t.icon||"grid",tint:t.core?"plain":t.enabled?"mint":"plain"}),(0,ae.jsxs)("span",{className:"tf-option-text",children:[(0,ae.jsxs)("b",{children:[t.name," ",(0,ae.jsx)("span",{className:"tf-mono tf-module-v",children:t.version})]}),(0,ae.jsx)("small",{children:t.text})]}),t.adds&&(0,ae.jsx)("span",{className:"tf-module-adds",children:t.adds.map(n=>(0,ae.jsx)(Oe,{tone:"neutral",dot:!1,children:n},n))}),t.core?(0,ae.jsx)(Pe,{label:e.coreLabel||"Core module, always on",children:(0,ae.jsx)("span",{className:"tf-module-lock",tabIndex:0,children:(0,ae.jsx)(N,{name:"lock",size:14})})}):(0,ae.jsx)("input",{type:"checkbox",role:"switch",className:"tf-switch",checked:!!t.enabled,"aria-label":t.name,onChange:()=>{e.onToggle&&e.onToggle(t)}})]},t.id))})}var ee=q(pe(),1),oc=q(re(),1);var mv={money:["card","Money"],infra:["server","Infrastructure"],comms:["mail","Communication"],marketing:["trend","Marketing"],apps:["code","Own apps"],legal:["book","Legal"]};function hv(e){let t=e.options||[{key:"A",label:e.approveLabel||"Yes, run it as shown"},{key:"B",label:"Yes, with a change",input:"What should change?"},{key:"C",label:"No, discard"},{key:"D",label:"Different instruction",input:"What should happen instead?"}],n=oc.useState(null),a=oc.useState(""),l=oc.useRef(null),i=e.decision||(e.state==="approved"?{key:"A"}:e.state==="denied"?{key:"C"}:null);function c(o){if(o.input&&n[0]!==o.key){n[1](o.key),a[1]("");return}o.input&&!a[0].trim()||(e.onDecide&&e.onDecide(o.key,o.input?a[0].trim():void 0),o.key==="A"&&e.onApprove&&e.onApprove(),o.key==="C"&&e.onDeny&&e.onDeny(),o.key==="B"&&e.onEdit&&e.onEdit(a[0]),n[1](null))}function s(o){let u=o.target.tagName;if(i||u==="TEXTAREA"||u==="INPUT")return;let h=t.find(f=>f.key===o.key.toUpperCase());h&&(o.preventDefault(),c(h))}let r=e.family?mv[e.family]:void 0;if(i){let o=t.find(u=>u.key===i.key)||{key:i.key,label:""};return(0,ee.jsxs)("div",{className:b("tf-approval tf-approval-done",i.key==="A"||i.key==="B"?"yes":"no",e.className),children:[(0,ee.jsx)(Re,{status:i.key==="A"||i.key==="B"?"ok":"idle"}),(0,ee.jsx)("b",{children:o.key+" \xB7 "+o.label}),e.title&&(0,ee.jsx)("span",{className:"tf-approval-done-what",children:e.title}),(0,ee.jsx)("span",{className:"tf-approval-done-by",children:[i.by,i.at].filter(Boolean).join(" \xB7 ")}),i.text&&(0,ee.jsx)("span",{className:"tf-approval-done-note",children:"\u201C"+i.text+"\u201D"})]})}return(0,ee.jsxs)("div",{ref:l,className:b("tf-approval",e.compact&&"compact",e.className),tabIndex:0,onKeyDown:s,role:"group","aria-label":typeof e.title=="string"?e.title:void 0,children:[(0,ee.jsxs)("div",{className:"tf-approval-top",children:[(0,ee.jsx)(Re,{status:"signal"}),(0,ee.jsx)("b",{children:e.heading||"Approval needed"}),(e.agent||e.project)&&(0,ee.jsx)("span",{className:"tf-approval-who",children:[e.agent,e.project].filter(Boolean).join(" \xB7 ")}),r&&(0,ee.jsxs)(Oe,{tone:"neutral",dot:!1,className:"tf-family",children:[(0,ee.jsx)(N,{name:r[0],size:12}),e.familyLabel||r[1]]}),e.age&&(0,ee.jsx)("span",{className:"tf-approval-age",children:e.age})]}),(0,ee.jsxs)("div",{className:"tf-approval-main",children:[e.title&&(0,ee.jsx)("p",{className:"tf-approval-title",children:e.title}),e.text&&(0,ee.jsx)("p",{className:"tf-approval-reason",children:e.text}),e.children&&(0,ee.jsx)("div",{className:"tf-approval-body",children:e.children})]}),(0,ee.jsx)("div",{className:"tf-approval-opts",role:"list",children:t.map((o,u)=>(0,ee.jsxs)("div",{role:"listitem",children:[(0,ee.jsxs)("button",{type:"button",className:b("tf-approval-opt",u===0&&"primary",n[0]===o.key&&"open"),onClick:()=>{c(o)},"aria-keyshortcuts":o.key,children:[(0,ee.jsx)("kbd",{children:o.key}),(0,ee.jsx)("span",{children:o.label}),o.input&&n[0]!==o.key&&(0,ee.jsx)(N,{name:"chevronRight",size:14})]}),o.input&&n[0]===o.key&&(0,ee.jsxs)("div",{className:"tf-approval-input tf-in",children:[(0,ee.jsx)("textarea",{className:"tf-input",rows:2,autoFocus:!0,placeholder:o.placeholder||(typeof o.input=="string"?o.input:void 0),value:a[0],onChange:h=>{a[1](h.target.value)},onKeyDown:h=>{h.key==="Enter"&&(h.metaKey||h.ctrlKey)&&c(o),h.key==="Escape"&&n[1](null)}}),(0,ee.jsxs)("div",{className:"tf-row",style:{justifyContent:"flex-end"},children:[(0,ee.jsx)(Q,{size:"sm",variant:"ghost",onClick:()=>{n[1](null)},children:"Cancel"}),(0,ee.jsx)(Q,{size:"sm",disabled:!a[0].trim(),onClick:()=>{c(o)},children:o.key+" \xB7 Send"})]})]})]},o.key))}),(e.escalation||e.trace||e.note)&&(0,ee.jsxs)("div",{className:"tf-approval-foot",children:[e.escalation&&(0,ee.jsxs)("span",{children:[(0,ee.jsx)(N,{name:"clock",size:13}),e.escalation]}),e.note&&(0,ee.jsx)("span",{children:e.note}),e.trace&&(0,ee.jsx)("span",{className:"tf-approval-trace",children:e.trace})]})]})}function vv(e){let t=(e.items||[]).slice().sort((n,a)=>(a.ageMin||0)-(n.ageMin||0));return(0,ee.jsx)("div",{className:"tf-inbox",role:"listbox","aria-label":e.label||"Approvals",onKeyDown:n=>{let a=t.findIndex(l=>l.id===e.selected);if(n.key==="j"||n.key==="ArrowDown"){n.preventDefault();let l=t[Math.min(t.length-1,a+1)];l&&e.onSelect&&e.onSelect(l.id)}if(n.key==="k"||n.key==="ArrowUp"){n.preventDefault();let l=t[Math.max(0,a-1)];l&&e.onSelect&&e.onSelect(l.id)}},children:t.length===0?(0,ee.jsx)($l,{icon:"check",tint:"mint",title:e.emptyTitle||"Nothing waiting for you",text:e.emptyText}):t.map(n=>{let a=n.family?mv[n.family]:void 0;return(0,ee.jsxs)("button",{type:"button",role:"option","aria-selected":n.id===e.selected,className:b("tf-inbox-row",n.id===e.selected&&"on"),onClick:()=>{e.onSelect&&e.onSelect(n.id)},children:[(0,ee.jsx)(Re,{status:"signal"}),(0,ee.jsxs)("span",{className:"tf-inbox-text",children:[(0,ee.jsx)("b",{children:n.title}),(0,ee.jsx)("small",{children:[n.agent,n.project].filter(Boolean).join(" \xB7 ")})]}),a&&(0,ee.jsxs)(Oe,{tone:"neutral",dot:!1,className:"tf-family",children:[(0,ee.jsx)(N,{name:a[0],size:12}),n.familyLabel||a[1]]}),(0,ee.jsxs)("span",{className:b("tf-inbox-age",n.urgent&&"warn"),children:[n.urgent&&(0,ee.jsx)(Re,{status:"warn"}),n.age]})]},n.id)})})}var K=q(pe(),1),_a=q(re(),1);function gv(e){let t=e.value||{},n=Object.keys(t).filter(i=>t[i]!=null&&t[i]!=="");function a(i,c){let s=Object.assign({},t);c==null?delete s[i]:s[i]=c,e.onChange?.(s)}let l=(e.filters||[]).filter(i=>n.indexOf(i.key)<0);return(0,K.jsxs)("div",{className:"tf-filterbar",children:[e.search&&(0,K.jsx)(Mn,{placeholder:e.search,value:e.query,onChange:i=>{e.onQuery?.(i.target.value)},style:{minWidth:0,flex:"1 1 220px",maxWidth:320}}),n.map(i=>{let c=(e.filters||[]).find(s=>s.key===i)||{key:i,label:i,options:[]};return(0,K.jsx)(Be,{width:220,flush:!0,trigger:s=>(0,K.jsxs)("span",{className:"tf-filterchip",children:[(0,K.jsxs)("button",{type:"button",onClick:s.toggle,children:[(0,K.jsx)("span",{children:c.label+":"}),(0,K.jsx)("b",{children:t[i]})]}),(0,K.jsx)("button",{type:"button",className:"x","aria-label":`Remove filter ${c.label}`,onClick:()=>{a(i,null)},children:(0,K.jsx)(N,{name:"x",size:12})})]}),children:s=>(0,K.jsx)(At,{items:c.options.map(r=>({label:r,icon:r===t[i]?"check":void 0,onClick:()=>{a(i,r),s.close()}}))})},i)}),l.length>0&&(0,K.jsx)(Be,{width:240,flush:!0,trigger:i=>(0,K.jsxs)("button",{type:"button",className:"tf-chip tf-chip-dashed",onClick:i.toggle,children:[(0,K.jsx)(N,{name:"plus",size:14}),"Filter"]}),children:i=>(0,K.jsx)(Ux,{avail:l,onPick:(c,s)=>{a(c,s),i.close()}})}),n.length>1&&(0,K.jsx)("button",{type:"button",className:"tf-linkbtn",onClick:()=>{e.onChange?.({})},children:"Clear all"}),e.right&&(0,K.jsx)("div",{className:"tf-filterbar-right",children:e.right})]})}function Ux(e){let t=_a.useState(null),n=t[0];return n?(0,K.jsx)(At,{items:[{label:"Back",icon:"chevronLeft",onClick:()=>{t[1](null)}},"-",...n.options.map(a=>({label:a,onClick:()=>{e.onPick?.(n.key,a)}}))]}):(0,K.jsx)(At,{items:e.avail.map(a=>({label:a.label,icon:a.icon||"filter",onClick:()=>{t[1](a)}}))})}function uc(e){let t=e.columns||[],n=e.rowKey||"id",a=_a.useState(e.defaultSort||null),l=_a.useState([]),i=_a.useState(t.filter(v=>v.hidden).map(v=>v.key)),c=_a.useState({}),s=a[0],r=(e.rows||[]).slice();if(s){let v=t.find(_=>_.key===s.key),g=s.dir==="desc"?-1:1,S=v&&v.sortValue||(_=>_[s.key]);r.sort((_,X)=>{let A=S(_),H=S(X);return(A>H?1:A<H?-1:0)*g})}let o=t.filter(v=>i[0].indexOf(v.key)<0),u=r.map(v=>v[n]),h=l[0].filter(v=>u.indexOf(v)>=0),f=u.length>0&&h.length===u.length,m=h.length>0&&!f;function p(v){l[1](h.indexOf(v)>=0?h.filter(g=>g!==v):h.concat([v]))}function M(v,g,S,_){return(0,K.jsxs)("span",{className:"tf-checkbox",children:[(0,K.jsx)("input",{type:"checkbox",checked:v,onChange:g,"aria-label":S,ref:X=>{X&&(X.indeterminate=!!_)}}),(0,K.jsx)("span",{className:b("tf-checkbox-box",_&&"ind"),"aria-hidden":!0,children:(0,K.jsx)("svg",{viewBox:"0 0 24 24",width:14,height:14,fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",children:(0,K.jsx)("path",{d:_?"M6 12h12":"M5 12.5l4.5 4.5L19 7.5"})})})]})}let E=o.length+(e.selectable?1:0)+(e.renderExpanded?1:0),y=r.filter(v=>h.indexOf(v[n])>=0);return(0,K.jsxs)("div",{className:b("tf-dt",e.className),children:[(e.toolbar||e.columnToggle!==!1)&&(0,K.jsxs)("div",{className:"tf-dt-toolbar",children:[e.toolbar,e.columnToggle!==!1&&(0,K.jsx)(Be,{align:"end",width:220,flush:!0,trigger:v=>(0,K.jsx)(Pe,{label:"Columns",children:(0,K.jsx)("button",{type:"button",className:"tf-iconbtn tf-iconbtn-soft","aria-label":"Choose columns",onClick:v.toggle,children:(0,K.jsx)(N,{name:"grid"})})}),children:(0,K.jsxs)("div",{className:"tf-menu tf-menu-static",children:[(0,K.jsx)("div",{className:"tf-menu-label",children:"Columns"}),t.filter(v=>v.hideable!==!1&&v.label).map(v=>{let g=i[0].indexOf(v.key)<0;return(0,K.jsxs)("label",{className:"tf-menu-item",children:[M(g,()=>{i[1](g?i[0].concat([v.key]):i[0].filter(S=>S!==v.key))},typeof v.label=="string"?v.label:v.key),v.label]},v.key)})]})})]}),(0,K.jsx)("div",{className:b("tf-dt-scroll",e.stickyHeader&&"sticky"),style:e.maxHeight?{maxHeight:e.maxHeight}:void 0,children:(0,K.jsxs)("table",{className:"tf-table tf-dt-table",children:[(0,K.jsx)("thead",{children:(0,K.jsxs)("tr",{children:[e.selectable&&(0,K.jsx)("th",{className:"tf-dt-sel",children:M(f,()=>{l[1](f?[]:u)},"Select all rows",m)}),e.renderExpanded&&(0,K.jsx)("th",{className:"tf-dt-exp","aria-label":"Expand"}),o.map(v=>{let g=a[0]&&a[0].key===v.key?a[0].dir:null;return(0,K.jsx)("th",{className:b(v.align==="right"&&"tf-num"),style:v.width?{width:v.width}:void 0,"aria-sort":g?g==="asc"?"ascending":"descending":void 0,children:v.sortable?(0,K.jsxs)("button",{type:"button",className:b("tf-dt-sort",g&&"on"),onClick:()=>{a[1](g==="asc"?{key:v.key,dir:"desc"}:g==="desc"?null:{key:v.key,dir:"asc"})},children:[v.label,(0,K.jsx)(N,{name:"chevronDown",size:12,className:b("tf-dt-arrow",g==="asc"&&"up",!g&&"idle")})]}):v.label},v.key)})]})}),(0,K.jsx)("tbody",{children:r.length===0?(0,K.jsx)("tr",{children:(0,K.jsx)("td",{colSpan:E,className:"tf-dt-empty",children:e.empty||"Nothing matches these filters."})}):r.map(v=>{let g=v[n],S=h.indexOf(g)>=0,_=!!c[0][String(g)];return(0,K.jsxs)(_a.Fragment,{children:[(0,K.jsxs)("tr",{className:b(S&&"selected",_&&"expanded"),children:[e.selectable&&(0,K.jsx)("td",{className:"tf-dt-sel",children:M(S,()=>{p(g)},"Select row")}),e.renderExpanded&&(0,K.jsx)("td",{className:"tf-dt-exp",children:(0,K.jsx)("button",{type:"button",className:b("tf-dt-toggle",_&&"open"),"aria-expanded":_,"aria-label":_?"Collapse row":"Expand row",onClick:()=>{let X=Object.assign({},c[0]);X[String(g)]=!_,c[1](X)},children:(0,K.jsx)(N,{name:"chevronRight",size:14})})}),o.map(X=>(0,K.jsx)("td",{className:X.align==="right"?"tf-num":void 0,children:X.render?X.render(v):v[X.key]},X.key))]}),_&&(0,K.jsx)("tr",{className:"tf-dt-detail",children:(0,K.jsx)("td",{colSpan:E,children:(0,K.jsx)("div",{className:"tf-dt-detail-in tf-in",children:e.renderExpanded?.(v)})})})]},g)})})]})}),e.selectable&&h.length>0&&(0,K.jsxs)("div",{className:"tf-bulkbar",role:"toolbar","aria-label":"Bulk actions",children:[(0,K.jsx)("b",{children:`${h.length} selected`}),(0,K.jsx)("button",{type:"button",className:"tf-linkbtn on-frame",onClick:()=>{l[1]([])},children:"Clear"}),(0,K.jsx)("div",{className:"tf-bulkbar-actions",children:(e.bulkActions||[]).map(v=>(0,K.jsxs)("button",{type:"button",className:b("tf-bulk-btn",v.danger&&"danger"),onClick:()=>{v.onClick(y,()=>{l[1]([])})},children:[v.icon&&(0,K.jsx)(N,{name:v.icon,size:14}),v.label]},v.label))})]})]})}var Ve=q(pe(),1),Pt=q(re(),1);var qx=e=>typeof e=="string"?{value:e,label:e}:e;function bv(e){let t=xe("sel"),n=e.id||t,a=na(e.name),l=e.error||a,i=(e.options||[]).map(qx),c=J(e.value,e.defaultValue??"",e.onChange),[s,r]=Pt.useState(!1),[o,u]=Pt.useState(-1),h=Pt.useRef(null),f=Pt.useRef(null),m=Pt.useRef(null),p=Pt.useRef({s:"",t:0}),M=i.find(A=>A.value===c[0]),E=i.map((A,H)=>A.disabled?-1:H).filter(A=>A>=0),y=A=>{u(A??Math.max(0,i.indexOf(M))),r(!0)},v=(A=!0)=>{r(!1),A&&h.current?.focus()},g=A=>{let H=i[A];!H||H.disabled||(c[1](H.value),v(),requestAnimationFrame(()=>m.current?.dispatchEvent(new Event("change",{bubbles:!0}))))},S=A=>{let H=E.indexOf(o),ue=E[Math.min(E.length-1,Math.max(0,H+A))];ue!=null&&u(ue)},_=A=>{let H=Date.now();p.current={s:(H-p.current.t<600?p.current.s:"")+A,t:H};let ue=p.current.s.toLowerCase();return i.findIndex(W=>!W.disabled&&W.label.toLowerCase().startsWith(ue))};Pt.useEffect(()=>{s&&f.current?.focus()},[s]),Pt.useEffect(()=>{!s||o<0||f.current?.querySelector(`#${CSS.escape(`${t}-o${o}`)}`)?.scrollIntoView({block:"nearest"})},[s,o,t]);let X=[];return i.forEach((A,H)=>{let ue=X[X.length-1];ue&&ue[0]===A.group?ue[1].push(H):X.push([A.group,[H]])}),(0,Ve.jsxs)("div",{className:b("tf-field",e.className),style:e.style,children:[e.label&&(0,Ve.jsxs)("label",{className:"tf-field-label",htmlFor:n,id:`${n}-label`,children:[e.label,e.required&&(0,Ve.jsx)("span",{className:"tf-req","aria-hidden":!0,children:" *"})]}),(0,Ve.jsx)(Be,{block:!0,open:s,onOpenChange:A=>A?y():v(!1),role:"presentation",flush:!0,trigger:()=>(0,Ve.jsxs)("button",{ref:h,id:n,type:"button",className:b("tf-input","tf-selectmenu",!M&&"empty"),role:"combobox","aria-haspopup":"listbox","aria-expanded":s,"aria-controls":`${t}-list`,"aria-invalid":l?"true":void 0,"aria-describedby":l||e.hint?`${n}-msg`:void 0,disabled:e.disabled,onClick:()=>s?v():y(),onKeyDown:A=>{if(["ArrowDown","ArrowUp","Enter"," "].includes(A.key))A.preventDefault(),y();else if(A.key.length===1&&/\S/.test(A.key)){let H=_(A.key);H>=0&&c[1](i[H]?.value)}},children:[M?.icon&&(0,Ve.jsx)(N,{name:M.icon,size:15}),(0,Ve.jsx)("span",{className:"tf-selectmenu-value",children:M?M.label:e.placeholder||"Select\u2026"}),(0,Ve.jsx)(N,{name:"chevronDown",size:16,className:"tf-selectmenu-chev"})]}),children:(0,Ve.jsx)("div",{ref:f,id:`${t}-list`,className:"tf-selectmenu-list",role:"listbox",tabIndex:-1,"aria-labelledby":e.label?`${n}-label`:void 0,"aria-label":e.label?void 0:e.placeholder||"Options","aria-activedescendant":o>=0?`${t}-o${o}`:void 0,onKeyDown:A=>{let ue={ArrowDown:()=>S(1),ArrowUp:()=>S(-1),Home:()=>u(E[0]??-1),End:()=>u(E[E.length-1]??-1),Enter:()=>g(o)," ":()=>g(o),Escape:()=>v()}[A.key];if(ue)A.preventDefault(),ue();else if(A.key==="Tab")v(!1);else if(A.key.length===1&&/\S/.test(A.key)){let W=_(A.key);W>=0&&u(W)}},children:X.map(([A,H],ue)=>{let W=H.map(Et=>{let It=i[Et],ds=It.value===c[0];return(0,Ve.jsxs)("div",{id:`${t}-o${Et}`,role:"option","aria-selected":ds,"aria-disabled":It.disabled||void 0,className:b("tf-selectmenu-opt",Et===o&&"active"),onPointerMove:()=>!It.disabled&&u(Et),onClick:()=>g(Et),children:[It.icon&&(0,Ve.jsx)(N,{name:It.icon,size:15}),(0,Ve.jsxs)("span",{className:"tf-option-text",children:[(0,Ve.jsx)("b",{children:It.label}),It.hint&&(0,Ve.jsx)("small",{children:It.hint})]}),ds&&(0,Ve.jsx)(N,{name:"check",size:15,className:"tf-selectmenu-check"})]},It.value)});return A?(0,Ve.jsxs)("div",{role:"group","aria-labelledby":`${t}-g${ue}`,children:[(0,Ve.jsx)("div",{id:`${t}-g${ue}`,className:"tf-menu-label",role:"presentation",children:A}),W]},A+ue):(0,Ve.jsx)(Pt.Fragment,{children:W},"g"+ue)})})}),(0,Ve.jsx)("input",{ref:m,type:"hidden",name:e.name,value:c[0]}),l?(0,Ve.jsxs)("span",{id:`${n}-msg`,className:"tf-field-error",role:"alert",children:[(0,Ve.jsx)(N,{name:"x",size:12}),l]}):e.hint&&(0,Ve.jsx)("span",{id:`${n}-msg`,className:"tf-field-hint",children:e.hint})]})}var G=q(pe(),1),ru=q(re(),1);var x=q(pe(),1),la=q(re(),1);function Nv(e){return(0,x.jsxs)("nav",{className:"tf-subnav","aria-label":`${e.eyebrow||"Section"} pages`,children:[(0,x.jsxs)("div",{className:"tf-subnav-head",children:[e.eyebrow&&(0,x.jsx)("span",{className:"tf-subnav-eyebrow",children:e.eyebrow}),e.action&&(0,x.jsxs)("button",{type:"button",className:"tf-subnav-action",onClick:e.action.onClick,children:[(0,x.jsx)(N,{name:e.action.icon||"plus",size:15}),(0,x.jsx)("span",{children:e.action.label})]})]}),(0,x.jsx)("div",{className:"tf-subnav-list",children:(e.items||[]).map(t=>{let n=t.id||t.label;return(0,x.jsxs)("button",{type:"button",className:"tf-subnav-item","aria-current":e.current===n?"page":void 0,title:t.label,onClick:()=>{e.onPick&&e.onPick(n)},children:[(0,x.jsx)(N,{name:t.icon,size:17}),(0,x.jsx)("span",{className:"tf-subnav-label",children:t.label}),t.count?(0,x.jsx)("span",{className:"tf-subnav-count",children:t.count}):null]},n)})}),e.children]})}function Qs(e){let t=la.useRef(null),n=bt(e.open??!0);return dl(t,e.onClose),n.mounted?(0,x.jsx)("div",{...ot(n.closing),className:b("tf-drawer-wrap",e.inline&&"inline"),onMouseDown:a=>{a.target===a.currentTarget&&e.onClose&&e.onClose?.()},children:(0,x.jsxs)("aside",{ref:t,className:b("tf-drawer",e.side&&e.side!=="right"&&"side-"+e.side),role:"dialog","aria-modal":"true","aria-label":e.title,style:e.width?{width:e.width}:void 0,children:[(0,x.jsxs)("div",{className:"tf-header",style:{alignItems:"center"},children:[(0,x.jsxs)("div",{className:"tf-row",style:{flexWrap:"nowrap",minWidth:0},children:[e.avatar&&(0,x.jsx)(qe,{name:e.avatar,size:44}),(0,x.jsxs)("div",{style:{minWidth:0},children:[(0,x.jsx)("div",{className:"tf-panel-title",children:e.title}),e.subtitle&&(0,x.jsx)("div",{className:"tf-panel-sub",children:e.subtitle})]})]}),(0,x.jsx)($,{icon:"x",label:"Close",onClick:e.onClose})]}),e.children]})}):null}function xv(e){let t=la.useState(""),n=la.useState(0),a=la.useRef(null),l=bt(e.open??!0);dl(a,e.onClose);let i=t[0].toLowerCase().trim(),c=e.items||[],s=(i?c.filter(f=>i.split(/\s+/).every(m=>(f.label+" "+(f.hint||"")+" "+(f.group||"")).toLowerCase().indexOf(m)>-1)):c.filter(f=>!f.searchOnly)).slice(0,40),r=Math.min(n[0],Math.max(0,s.length-1));function o(f){e.onClose&&e.onClose?.(),f&&f.run&&f.run()}function u(f){f.key==="ArrowDown"?(f.preventDefault(),n[1](Math.min(s.length-1,r+1))):f.key==="ArrowUp"?(f.preventDefault(),n[1](Math.max(0,r-1))):f.key==="Enter"&&(f.preventDefault(),o(s[r]))}let h=[];return s.forEach((f,m)=>{let p=f.group||"Results";(!h.length||h[h.length-1].g!==p)&&h.push({g:p,items:[]}),h[h.length-1].items.push([f,m])}),l.mounted?(0,x.jsx)("div",{...ot(l.closing),className:b("tf-palette-wrap",e.inline&&"inline"),onMouseDown:f=>{f.target===f.currentTarget&&e.onClose&&e.onClose?.()},children:(0,x.jsxs)("div",{ref:a,className:"tf-palette",role:"dialog","aria-modal":"true","aria-label":"Command palette",children:[(0,x.jsxs)("div",{className:"tf-palette-input",children:[(0,x.jsx)(N,{name:"search",size:18}),(0,x.jsx)("input",{placeholder:e.placeholder||"Search pages, actions and records\u2026","aria-label":"Search",value:t[0],onChange:f=>{t[1](f.target.value),n[1](0),e.onQueryChange?.(f.target.value)},onKeyDown:u}),(0,x.jsx)("kbd",{children:"Esc"})]}),(0,x.jsxs)("div",{className:"tf-palette-list",role:"listbox","aria-label":"Results",children:[e.loading&&(0,x.jsxs)("div",{className:"tf-palette-empty",role:"status",children:[(0,x.jsx)(qs,{})," Searching\u2026"]}),s.length?h.map(f=>(0,x.jsxs)("div",{children:[(0,x.jsx)("div",{className:"tf-palette-group",children:f.g}),f.items.map(m=>{let p=m[0],M=m[1];return(0,x.jsxs)("button",{type:"button",role:"option","aria-selected":M===r?"true":"false",className:"tf-palette-item",onMouseMove:()=>{M!==r&&n[1](M)},onClick:()=>{o(p)},children:[(0,x.jsx)(ie,{icon:p.icon||"search",tint:p.tint||"plain"}),(0,x.jsxs)("span",{className:"tf-palette-label",children:[(0,x.jsx)("b",{children:p.label}),p.hint&&(0,x.jsx)("span",{children:p.hint})]}),M===r&&(0,x.jsx)("kbd",{children:"\u21B5"})]},p.id||p.label)})]},f.g)):e.loading?null:(0,x.jsx)("div",{className:"tf-palette-empty",children:e.empty??`Nothing matches \u201C${t[0]}\u201D.`})]}),(0,x.jsxs)("div",{className:"tf-palette-foot",children:[(0,x.jsxs)("span",{children:[(0,x.jsx)("kbd",{children:"\u2191"}),(0,x.jsx)("kbd",{children:"\u2193"})," ","move"]}),(0,x.jsxs)("span",{children:[(0,x.jsx)("kbd",{children:"\u21B5"})," ","open"]}),(0,x.jsxs)("span",{children:[(0,x.jsx)("kbd",{children:"\u2318"}),(0,x.jsx)("kbd",{children:"K"})," anywhere"]})]})]})}):null}function Cv(e){let t=la.useState("All"),n=(e.items||[]).filter(a=>t[0]==="All"||a.unread);return(0,x.jsxs)("div",{className:"tf-notes",role:"region","aria-label":"Notifications",children:[(0,x.jsxs)("div",{className:"tf-header",style:{alignItems:"center",padding:"6px 8px 0"},children:[(0,x.jsx)("b",{style:{fontSize:16},children:"Notifications"}),(0,x.jsx)(Q,{variant:"ghost",size:"sm",icon:"check",disabled:!(e.items||[]).some(a=>a.unread),onClick:e.onReadAll,children:"Mark all read"})]}),(0,x.jsx)("div",{style:{padding:"0 8px"},children:(0,x.jsx)(Ds,{block:!0,items:["All","Unread"],value:t[0],onChange:t[1]})}),(0,x.jsx)("div",{className:"tf-notes-list",children:n.length?n.map(a=>(0,x.jsxs)("button",{type:"button",className:b("tf-note",a.unread&&"unread"),onClick:()=>{e.onOpen&&e.onOpen(a)},children:[(0,x.jsx)(ie,{icon:a.icon,tint:a.tint}),(0,x.jsxs)("span",{className:"tf-note-text",children:[(0,x.jsx)("b",{children:a.title}),(0,x.jsx)("span",{children:a.text})]}),(0,x.jsxs)("span",{className:"tf-note-time",children:[a.time,a.unread&&(0,x.jsx)("span",{className:"tf-unread"})]})]},a.id)):(0,x.jsxs)("div",{className:"tf-notes-empty",children:[(0,x.jsx)(ie,{icon:"check",tint:"mint",size:40}),(0,x.jsx)("b",{children:"You are all caught up"})]})})]})}var Vx=()=>({trigger:["zap","sky","When"],condition:["filter","blush","If"],agent:["bot","lilac","Agent"],approval:["user","butter","Approval"],action:["send","mint","Then"]});function Sv(e){return(0,x.jsx)("ol",{className:"tf-flow tf-stagger",style:{"--base":"120ms"},children:(e.steps||[]).map((t,n)=>{let a=Vx(),l=a[t.kind]||a.action,i=n<(e.active==null?-1:e.active)?"done":n===e.active?e.waiting?"wait":"active":"";return(0,x.jsxs)("li",{className:b("tf-flow-node",i),children:[(0,x.jsx)("span",{className:"tf-flow-icon tf-t-"+l[1],children:(0,x.jsx)(N,{name:i==="done"?"check":l[0],size:16})}),(0,x.jsxs)("div",{className:"tf-flow-card",children:[(0,x.jsxs)("div",{className:"tf-flow-kind",children:[l[2],i==="active"&&(0,x.jsx)("span",{className:"tf-flow-live",children:"running"}),i==="wait"&&(0,x.jsx)("span",{className:"tf-flow-live wait",children:"waiting for you"})]}),(0,x.jsx)("div",{className:"tf-flow-text",children:t.text}),i==="wait"&&e.onApprove&&(0,x.jsxs)("div",{className:"tf-row",style:{marginTop:8},children:[(0,x.jsx)(Q,{size:"sm",icon:"check",onClick:e.onApprove,children:"Approve"}),e.onReject&&(0,x.jsx)(Q,{size:"sm",variant:"ghost",onClick:e.onReject,children:"Reject"})]})]}),e.tools&&i===""?(0,x.jsx)("div",{className:"tf-flow-tools",children:e.tools(t,n)}):null]},n)})})}var yv={pdf:["file","blush"],doc:["book","sky"],sheet:["chart","mint"],fig:["sparkle","lilac"],img:["eye","butter"],zip:["folder","butter"]};function su(e){let t=e.kind,n=e.big;return t==="sheet"?(0,x.jsx)("span",{className:"tf-t-sheet",children:Array.from({length:n?7:4},(a,l)=>(0,x.jsx)("span",{children:Array.from({length:4},(i,c)=>(0,x.jsx)("i",{style:{opacity:l===0?1:.55}},c))},l))}):t==="img"||t==="fig"?(0,x.jsxs)("span",{className:b("tf-t-art",t==="fig"&&"fig"),children:[(0,x.jsx)("i",{}),(0,x.jsx)("i",{}),(0,x.jsx)("i",{})]}):t==="zip"?(0,x.jsx)("span",{className:"tf-t-zip",children:(e.entries||["logo.svg","colors.json","fonts/"]).map(a=>(0,x.jsxs)("span",{children:[(0,x.jsx)(N,{name:"file",size:11}),a]},a))}):(0,x.jsxs)("span",{className:"tf-t-doc",children:[(0,x.jsx)("b",{children:(e.title||"").replace(/\.[^.]+$/,"")}),Array.from({length:n?9:4},(a,l)=>(0,x.jsx)("i",{style:{width:60+l*37%40+"%"}},l))]})}function Tv(e){let t=yv[e.kind]||yv.doc;return(0,x.jsxs)("button",{type:"button",className:"tf-filecard",onClick:e.onClick,children:[(0,x.jsx)("span",{className:"tf-thumb tf-bg-"+t[1],children:(0,x.jsx)(su,{kind:e.kind,title:e.name})}),(0,x.jsx)("span",{className:"tf-filecard-name",children:e.name}),(0,x.jsxs)("span",{className:"tf-filecard-meta",children:[[e.size,e.meta].filter(Boolean).join(" \xB7 "),e.shared&&(0,x.jsx)(N,{name:"users",size:12,label:"Shared"})]})]})}function Mv(e){let t=e.steps||[],n=e.current||0,a=e.done||{};return(0,x.jsxs)("div",{className:"tf-wizard",role:"group","aria-label":e.label||"Setup",children:[(0,x.jsxs)("aside",{className:"tf-wizard-rail",children:[e.brand&&(0,x.jsxs)("span",{className:"tf-brand",style:{color:"var(--on-frame)"},children:[e.brand,(0,x.jsx)("span",{className:"tf-brand-dot"})]}),(0,x.jsx)("ol",{children:t.map((l,i)=>{let c=a[l.id||i];return(0,x.jsx)("li",{children:(0,x.jsxs)("button",{type:"button",className:b("tf-wizard-step",i===n&&"cur",c&&"ok"),"aria-current":i===n?"step":void 0,onClick:()=>{e.onPick&&e.onPick(i)},children:[(0,x.jsx)("span",{children:c?(0,x.jsx)(N,{name:"check",size:12}):i+1}),l.label]})},i)})})]}),(0,x.jsxs)("div",{className:"tf-wizard-main",children:[(0,x.jsx)("div",{className:"tf-card-desc",children:`Step ${n+1} of ${t.length}`}),(0,x.jsxs)("div",{className:"tf-wizard-body",children:[t[n]&&t[n].icon&&(0,x.jsx)(ie,{icon:t[n].icon,tint:"sky",size:44}),t[n]&&(0,x.jsx)("h2",{className:"tf-modal-title",children:t[n].label}),e.children]},n),e.footer&&(0,x.jsx)("div",{className:"tf-modal-foot",style:{justifyContent:"space-between"},children:e.footer})]})]})}var pv=()=>["None","View","Edit","Full"];function Ev(e){let t=la.useRef(null);return ta(t),(0,x.jsx)("div",{ref:t,className:"tf-scroll",children:(0,x.jsxs)("table",{className:"tf-table tf-perm",children:[(0,x.jsx)("thead",{children:(0,x.jsxs)("tr",{children:[(0,x.jsx)("th",{children:"Role"}),(e.areas||[]).map(n=>(0,x.jsx)("th",{children:n},n))]})}),(0,x.jsx)("tbody",{className:"tf-stagger",style:{"--base":"120ms"},children:(e.roles||[]).map((n,a)=>(0,x.jsxs)("tr",{children:[(0,x.jsxs)("td",{children:[(0,x.jsx)("div",{style:{fontWeight:700},children:n.name}),n.people!=null&&(0,x.jsx)("div",{className:"tf-card-desc",children:n.people===1?"1 member":`${n.people} members`})]}),n.levels.map((l,i)=>(0,x.jsx)("td",{children:(0,x.jsx)("button",{type:"button",className:"tf-perm-cell lv"+l,disabled:n.locked,"aria-label":n.name+" \xB7 "+e.areas[i]+": "+pv()[l],onClick:()=>{e.onChange&&e.onChange(a,i,(l+1)%4)},children:pv()[l]})},i))]},n.name))})]})})}function kv(e){return he(e,null,{minimumFractionDigits:2})}function zv(e){let t=e.lines||[],n=0,a={};t.forEach(c=>{let s=c.q*c.u;n+=s,a[c.v]=(a[c.v]||0)+s*c.v/100});let l=0;Object.keys(a).forEach(c=>{l+=a[Number(c)]??0});let i=e.format||kv;return(0,x.jsxs)("div",{className:"tf-paper",children:[(0,x.jsxs)("div",{className:"tf-paper-top",children:[(0,x.jsxs)("div",{children:[e.brand&&(0,x.jsxs)("div",{className:"tf-brand",style:{color:"var(--ink)",fontSize:18},children:[e.brand,(0,x.jsx)("span",{className:"tf-brand-dot"})]}),e.from&&(0,x.jsx)("div",{className:"tf-paper-small",children:e.from})]}),(0,x.jsxs)("div",{className:"tf-paper-id",children:[(0,x.jsx)("div",{className:"tf-paper-kind",children:e.kind||"Invoice"}),(0,x.jsx)("div",{className:"tf-mono",children:"#"+e.number})]})]}),(0,x.jsxs)("div",{className:"tf-paper-meta",children:[(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:"Bill to"}),(0,x.jsx)("b",{children:e.to})]}),(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:"Issued"}),(0,x.jsx)("b",{children:e.issued})]}),(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:"Due"}),(0,x.jsx)("b",{children:e.due})]})]}),(0,x.jsx)("div",{className:"tf-paper-lines",children:t.map((c,s)=>(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:(c.d||"Untitled line")+(c.q!==1?" \xD7 "+c.q:"")}),(0,x.jsx)("b",{children:i(c.q*c.u)})]},s))}),(0,x.jsxs)("div",{className:"tf-paper-totals",children:[(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:"Net"}),(0,x.jsx)("b",{children:i(n)})]}),Object.keys(a).filter(c=>+c>0).map(c=>(0,x.jsxs)("div",{children:[(0,x.jsx)("span",{children:`VAT ${c}%`}),(0,x.jsx)("b",{children:i(a[Number(c)]??0)})]},c)),(0,x.jsxs)("div",{className:"grand",children:[(0,x.jsx)("span",{children:"Total due"}),(0,x.jsx)("b",{children:i(n+l)})]})]}),e.note&&(0,x.jsx)("div",{className:"tf-paper-small",children:e.note})]})}function wv(e){let t=la.useState(!1),n=e.amount>0;return(0,x.jsxs)("div",{className:b("tf-tx",!e.matched&&"unmatched"),children:[(0,x.jsxs)("div",{className:"tf-tx-row",children:[(0,x.jsx)(ie,{icon:n?"download":"send",tint:n?"mint":"plain"}),(0,x.jsxs)("div",{className:"tf-tx-text",children:[(0,x.jsx)("b",{className:"tf-mono",children:e.text}),(0,x.jsx)("span",{children:e.date+(e.matched&&e.matchRef?` \xB7 matched to ${e.matchRef}`:"")})]}),(0,x.jsx)("b",{className:b("tf-tx-amt",n?"in":"out"),children:(n?"+":"\u2212")+kv(Math.abs(e.amount))}),e.matched?(0,x.jsx)(Oe,{tone:"success",children:"Matched"}):(0,x.jsx)(Q,{size:"sm",variant:t[0]?"soft":"primary",onClick:()=>{t[1](!t[0])},children:t[0]?"Close":"Match"})]}),t[0]&&!e.matched&&(0,x.jsxs)("div",{className:"tf-tx-suggest tf-in",children:[(0,x.jsx)(ie,{icon:"bot",tint:"butter"}),(0,x.jsx)("span",{style:{flex:1,minWidth:0},children:e.hint||"No suggestion yet."}),(0,x.jsx)(Q,{size:"sm",icon:"check",onClick:()=>{t[1](!1),e.onMatch&&e.onMatch()},children:"Accept"})]})]})}function Rv(e){let t=ru.useState(""),n=(e.accounts||[]).filter(l=>!t[0]||l.address.toLowerCase().indexOf(t[0].toLowerCase())>-1),a=(e.accounts||[]).find(l=>l.address===e.value);return(0,G.jsx)(Be,{width:320,trigger:l=>(0,G.jsxs)("button",{type:"button",className:"tf-acct",onClick:l.toggle,"aria-haspopup":"dialog","aria-expanded":l.open,children:[(0,G.jsxs)("span",{className:"tf-option-text",children:[(0,G.jsx)("b",{className:a?"tf-mono":void 0,children:a?a.address:e.allLabel||"All inboxes"}),(0,G.jsx)("small",{children:a?a.domain:`${(e.accounts||[]).length} addresses`})]}),(0,G.jsx)(N,{name:"chevronDown",size:14})]}),children:l=>(0,G.jsxs)("div",{className:"tf-col",style:{gap:8},children:[(0,G.jsx)(Mn,{placeholder:"Find an address",value:t[0],onChange:i=>{t[1](i.target.value)}}),(0,G.jsxs)("div",{className:"tf-acct-list",children:[(0,G.jsxs)("button",{type:"button",className:b("tf-option",!e.value&&"on"),onClick:()=>{e.onChange&&e.onChange(null),l.close()},children:[(0,G.jsx)(N,{name:"inbox",size:15}),(0,G.jsx)("span",{className:"tf-option-text",children:e.allLabel||"All inboxes"}),e.unread!=null&&(0,G.jsx)("span",{className:"tf-nav-count",children:e.unread})]}),n.map(i=>(0,G.jsxs)("button",{type:"button",className:b("tf-option",i.address===e.value&&"on"),onClick:()=>{e.onChange&&e.onChange(i.address),l.close()},children:[(0,G.jsxs)("span",{className:"tf-option-text",children:[(0,G.jsx)("span",{className:"tf-mono",children:i.address}),(0,G.jsx)("small",{children:i.domain})]}),i.unread?(0,G.jsx)("span",{className:"tf-nav-count",children:i.unread}):null]},i.address))]})]})})}function Av(e){return(0,G.jsx)("div",{className:"tf-inboxlist",role:"list",children:(e.items||[]).map(t=>(0,G.jsxs)("button",{type:"button",role:"listitem",className:b("tf-mailrow",t.unread&&"unread",t.id===e.selected&&"on"),onClick:()=>{e.onOpen&&e.onOpen(t)},children:[(0,G.jsx)("span",{className:"tf-mailrow-dot",role:t.unread?"img":void 0,"aria-label":t.unread?"Unread":void 0}),(0,G.jsxs)("span",{className:"tf-mailrow-main",children:[(0,G.jsxs)("span",{className:"tf-mailrow-top",children:[(0,G.jsx)("b",{children:t.from}),(0,G.jsx)("small",{className:"tf-mono",children:t.time})]}),(0,G.jsx)("span",{className:"tf-mailrow-subject",children:t.subject}),(0,G.jsx)("span",{className:"tf-mailrow-snippet",children:t.snippet}),(t.to||t.tags||t.agent)&&(0,G.jsxs)("span",{className:"tf-mailrow-tags",children:[t.to&&(0,G.jsx)("span",{className:"tf-mono",children:t.to}),t.agent&&(0,G.jsx)(Oe,{tone:t.agent.tone||"highlight",children:t.agent.label}),(t.tags||[]).map(n=>(0,G.jsx)(Oe,{tone:"neutral",dot:!1,children:n},n))]})]})]},t.id))})}function _v(e){let t=ru.useState((e.messages||[]).length?[e.messages[e.messages.length-1].id]:[]);return(0,G.jsxs)("div",{className:"tf-thread",children:[e.subject&&(0,G.jsx)("h3",{className:"tf-thread-subject",children:e.subject}),(e.messages||[]).map(n=>{let a=t[0].indexOf(n.id)>-1;return(0,G.jsxs)("div",{className:b("tf-threadmsg",a&&"open",n.agent&&"agent"),children:[(0,G.jsxs)("button",{type:"button",className:"tf-threadmsg-head","aria-expanded":a,onClick:()=>{t[1](a?t[0].filter(l=>l!==n.id):t[0].concat([n.id]))},children:[n.agent?(0,G.jsx)(Gt,{tint:n.tint,size:32}):(0,G.jsx)(qe,{name:n.from,size:32}),(0,G.jsxs)("span",{className:"tf-option-text",children:[(0,G.jsxs)("b",{children:[n.from,n.agentNote&&(0,G.jsx)("span",{className:"tf-threadmsg-note",children:" \xB7 "+n.agentNote})]}),(0,G.jsx)("small",{children:a?n.to:n.snippet})]}),(0,G.jsx)("small",{className:"tf-mono",children:n.time})]}),a&&(0,G.jsxs)("div",{className:"tf-threadmsg-body",children:[n.body,n.attachments&&(0,G.jsx)("div",{className:"tf-msg-attach",children:n.attachments.map(l=>(0,G.jsxs)("span",{className:"tf-attach-chip",children:[(0,G.jsx)(N,{name:"paperclip",size:13}),l.name,l.size&&(0,G.jsx)("small",{children:l.size})]},l.name))})]})]},n.id)}),e.reply]})}function Dv(e){let t=J(e.value,e.defaultValue||{},e.onChange),n=e.fields||[{key:"name",label:"Name"},{key:"role",label:"Role"},{key:"company",label:"Company"},{key:"phone",label:"Phone"},{key:"website",label:"Website"}];function a(l,i){let c=Object.assign({},t[0]);c[l]=i,t[1](c)}return(0,G.jsxs)("div",{className:"tf-sig",children:[(0,G.jsxs)("div",{className:"tf-col",style:{gap:12},children:[n.map(l=>(0,G.jsx)(ws,{label:l.label,value:t[0][l.key]||"",onChange:i=>{a(l.key,i.target.value)}},l.key)),e.extra]}),(0,G.jsxs)("div",{className:"tf-sig-preview",children:[(0,G.jsx)("span",{className:"tf-menu-label",style:{padding:0},children:e.previewLabel||"Preview"}),(0,G.jsxs)("div",{className:"tf-paper tf-sig-paper",children:[(0,G.jsx)("p",{children:"\u2014"}),(0,G.jsx)("b",{children:t[0].name}),t[0].role&&(0,G.jsx)("div",{children:t[0].role+(t[0].company?" \xB7 "+t[0].company:"")}),t[0].phone&&(0,G.jsx)("div",{children:t[0].phone}),t[0].website&&(0,G.jsx)("div",{children:t[0].website}),e.note&&(0,G.jsx)("small",{children:e.note})]})]})]})}function Ov(e){return(0,G.jsx)(Qs,{title:e.name,subtitle:e.meta,onClose:e.onClose,width:e.width||820,inline:e.inline,children:(0,G.jsxs)("div",{className:"tf-attprev",children:[(0,G.jsx)("div",{className:"tf-attprev-doc",children:e.children}),(0,G.jsxs)("div",{className:"tf-col",style:{gap:16},children:[e.facts&&(0,G.jsx)(Bn,{items:e.facts}),e.found,e.actions&&(0,G.jsx)("div",{className:"tf-col",style:{gap:8},children:e.actions})]})]})})}var te=q(pe(),1),ia=q(re(),1);function jv(e){let t=J(e.selected,e.variants?.[0]?.id??"",e.onSelect),n=(e.variants||[]).find(a=>a.id===t[0])||{};return(0,te.jsxs)("div",{className:"tf-imgvar",children:[(0,te.jsxs)("div",{className:"tf-imgvar-stage",style:n.ratio?{aspectRatio:n.ratio}:void 0,children:[n.src?(0,te.jsx)("img",{src:n.src,alt:e.alt||""}):(0,te.jsx)("div",{className:b("tf-imgvar-ph","tf-t-"+(e.tint||"sky")),children:(0,te.jsx)(N,{name:"image",size:32})}),n.label&&(0,te.jsx)("span",{className:"tf-imgvar-tag",children:n.label})]}),(0,te.jsx)("div",{className:"tf-imgvar-list",role:"listbox","aria-label":"Variants",children:(e.variants||[]).map(a=>(0,te.jsxs)("button",{type:"button",role:"option","aria-selected":a.id===t[0],className:b("tf-imgvar-item",a.id===t[0]&&"on"),onClick:()=>{t[1](a.id)},children:[(0,te.jsx)("span",{className:"tf-imgvar-thumb",style:a.ratio?{aspectRatio:a.ratio}:void 0,children:a.src?(0,te.jsx)("img",{src:a.src,alt:""}):(0,te.jsx)(N,{name:"image",size:14})}),(0,te.jsxs)("span",{className:"tf-option-text",children:[(0,te.jsx)("b",{children:a.label}),(0,te.jsx)("small",{className:"tf-mono",children:[a.size,a.format,a.weight].filter(Boolean).join(" \xB7 ")})]}),a.status&&(0,te.jsx)(Re,{status:a.status})]},a.id))}),e.actions&&(0,te.jsx)("div",{className:"tf-row",style:{justifyContent:"flex-end"},children:e.actions})]})}function Lv(e){let t=e.items||[],n=ia.useState(e.start||0),a=ia.useState(!1),l=t.length,i=t[n[0]]||{};function c(o){n[1]((n[0]+o+l)%l)}ia.useEffect(()=>{if(!a[0])return;function o(u){u.key==="Escape"&&a[1](!1),u.key==="ArrowRight"&&c(1),u.key==="ArrowLeft"&&c(-1)}return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}});function s(o,u){return o.src?(0,te.jsx)("img",{className:u,src:o.src,alt:o.alt||""}):(0,te.jsx)("div",{className:b(u,"tf-gallery-ph","tf-t-"+(o.tint||"sky")),children:o.art||(0,te.jsx)(N,{name:"image",size:28})})}let r=(0,te.jsxs)("div",{className:"tf-gallery-stage",style:{aspectRatio:e.ratio||"3 / 2"},children:[s(i,"tf-gallery-img"),l>1&&(0,te.jsx)($,{icon:"chevronLeft",label:"Previous image",className:"tf-gallery-prev",onClick:()=>{c(-1)}}),l>1&&(0,te.jsx)($,{icon:"chevronRight",label:"Next image",className:"tf-gallery-next",onClick:()=>{c(1)}}),(0,te.jsx)("span",{className:"tf-gallery-count",children:n[0]+1+" / "+l}),!a[0]&&e.fullscreen!==!1&&(0,te.jsx)($,{icon:"expand",label:"Full screen",className:"tf-gallery-full",onClick:()=>{a[1](!0)}}),e.badge&&(0,te.jsx)("span",{className:"tf-gallery-badge",children:e.badge})]});return(0,te.jsxs)("div",{className:"tf-gallery",children:[r,e.thumbs!==!1&&l>1&&(0,te.jsx)("div",{className:"tf-gallery-thumbs",role:"tablist","aria-label":"Images",children:t.map((o,u)=>(0,te.jsx)("button",{type:"button",role:"tab","aria-selected":u===n[0],className:b(u===n[0]&&"on"),onClick:()=>{n[1](u)},"aria-label":o.caption||o.alt||(o.src?`Image ${u+1}`:void 0),children:s(o,"tf-gallery-thumb")},u))}),a[0]&&(0,te.jsx)(Sn,{children:(0,te.jsxs)("div",{className:"tf-lightbox",role:"dialog","aria-modal":"true","aria-label":"Images",children:[(0,te.jsx)($,{icon:"x",label:"Close",className:"tf-lightbox-close",onClick:()=>{a[1](!1)}}),(0,te.jsxs)("div",{className:"tf-lightbox-stage",children:[s(i,"tf-gallery-img"),l>1&&(0,te.jsx)($,{icon:"chevronLeft",label:"Previous image",className:"tf-gallery-prev",onClick:()=>{c(-1)}}),l>1&&(0,te.jsx)($,{icon:"chevronRight",label:"Next image",className:"tf-gallery-next",onClick:()=>{c(1)}})]}),(0,te.jsx)("span",{className:"tf-lightbox-cap",children:(i.caption?i.caption+" \xB7 ":"")+(n[0]+1)+" / "+l})]})})]})}function Hv(e){let t=ia.useState(e.start!=null?e.start:50),n=ia.useRef(null),a=ia.useRef(!1);function l(c){if(!n.current)return;let s=n.current.getBoundingClientRect();t[1](Math.max(0,Math.min(100,(c.clientX-s.left)/s.width*100)))}function i(c,s){return c&&c.src?(0,te.jsx)("img",{className:s,src:c.src,alt:c.alt||""}):(0,te.jsx)("div",{className:b(s,"tf-ba-ph",c&&c.tint&&"tf-t-"+c.tint),children:c&&c.art})}return(0,te.jsxs)("div",{ref:n,className:"tf-ba",style:{aspectRatio:e.ratio||"3 / 2"},onPointerDown:c=>{a.current=!0,c.currentTarget.setPointerCapture(c.pointerId),l(c)},onPointerMove:c=>{a.current&&l(c)},onPointerUp:()=>{a.current=!1},children:[i(e.after,"tf-ba-img"),(0,te.jsx)("div",{className:"tf-ba-before",style:{clipPath:"inset(0 "+(100-t[0])+"% 0 0)"},children:i(e.before,"tf-ba-img")}),(0,te.jsx)("span",{className:"tf-ba-tag left",children:e.beforeLabel||"Before"}),(0,te.jsx)("span",{className:"tf-ba-tag right",children:e.afterLabel||"After"}),(0,te.jsx)("div",{className:"tf-ba-line",style:{left:t[0]+"%"},children:(0,te.jsxs)("span",{className:"tf-ba-knob",role:"slider",tabIndex:0,"aria-label":"Compare before and after","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(t[0]),onKeyDown:c=>{c.key==="ArrowLeft"&&t[1](Math.max(0,t[0]-5)),c.key==="ArrowRight"&&t[1](Math.min(100,t[0]+5))},children:[(0,te.jsx)(N,{name:"chevronLeft",size:12}),(0,te.jsx)(N,{name:"chevronRight",size:12})]})})]})}var w=q(pe(),1),ou=q(re(),1);function Bv(e){let t={connected:"ok",expiring:"warn",error:"danger",missing:"idle"}[e.status]||"idle";return(0,w.jsxs)("div",{className:"tf-conn",children:[(0,w.jsx)("span",{className:"tf-conn-ico",children:e.logo||(0,w.jsx)(N,{name:e.icon||"link",size:18})}),(0,w.jsxs)("span",{className:"tf-option-text",children:[(0,w.jsx)("b",{children:e.name}),(0,w.jsx)("small",{children:e.text})]}),(0,w.jsx)(Ue,{status:t,label:e.statusLabel}),e.action&&(0,w.jsx)("span",{className:"tf-conn-act",children:e.action})]})}function Uv(e){return!e.state||e.state==="online"?null:(0,w.jsxs)("div",{className:b("tf-connbanner",e.state),role:"status",children:[(0,w.jsx)(Re,{status:e.state==="offline"?"danger":"warn"}),(0,w.jsx)("span",{children:e.text||(e.state==="offline"?"Offline. Changes are kept and sent when you\u2019re back.":`Connection lost. Retrying in ${e.seconds!=null?e.seconds:"\u2026"} s`)}),e.onRetry&&(0,w.jsx)("button",{type:"button",className:"tf-linkbtn",onClick:e.onRetry,children:"Retry now"})]})}function qv(e){return(0,w.jsxs)("div",{className:"tf-server",children:[(0,w.jsxs)("div",{className:"tf-server-top",children:[(0,w.jsx)("span",{className:"tf-conn-ico",children:e.logo||(0,w.jsx)(N,{name:"server",size:18})}),(0,w.jsxs)("span",{className:"tf-option-text",children:[(0,w.jsx)("b",{children:e.name}),(0,w.jsx)("small",{className:"tf-mono",children:[e.provider,e.address].filter(Boolean).join(" \xB7 ")})]}),(0,w.jsx)(Ue,{status:e.status||"idle",label:e.statusLabel})]}),(0,w.jsx)("div",{className:"tf-col",style:{gap:12},children:(e.meters||[]).map(t=>t.value==null?(0,w.jsxs)("div",{className:"tf-usage-top",children:[(0,w.jsx)("span",{children:t.label}),(0,w.jsx)("b",{children:t.unknown||"Unknown"})]},t.label):(0,w.jsx)(Aa,{label:t.label,value:t.value,max:t.max,text:t.text},t.label))}),e.uptime&&(0,w.jsx)(Ys,{...e.uptime}),e.foot&&(0,w.jsx)("div",{className:"tf-server-foot",children:e.foot})]})}function Vv(e){return(0,w.jsx)("ol",{className:"tf-pipeline",tabIndex:0,"aria-label":"Deploy pipeline",children:(e.stages||[]).map((t,n)=>(0,w.jsxs)("li",{className:b("tf-stage","st-"+(t.status||"idle")),children:[(0,w.jsx)(Re,{status:t.status==="done"?"ok":t.status||"idle"}),(0,w.jsx)("b",{children:t.name}),(0,w.jsx)("small",{className:"tf-mono",children:t.duration||"\u2014"}),t.action]},n))})}function Yv(e){return(0,w.jsx)(uc,{rows:e.records||[],rowKey:"id",columnToggle:!1,selectable:e.selectable,bulkActions:e.bulkActions,toolbar:e.toolbar,columns:[{key:"type",label:"Type",sortable:!0,render:t=>(0,w.jsx)(Oe,{tone:"neutral",dot:!1,className:"tf-mono",children:t.type})},{key:"name",label:"Name",sortable:!0,render:t=>(0,w.jsx)("span",{className:"tf-mono",children:t.name})},{key:"content",label:"Content",render:t=>(0,w.jsx)(Pe,{label:t.content,children:(0,w.jsx)("span",{className:"tf-mono tf-trunc",tabIndex:0,children:t.content})})},{key:"ttl",label:"TTL",align:"right",render:t=>(0,w.jsx)("span",{className:"tf-mono",children:t.ttl})},{key:"proxy",label:"Proxy",render:t=>t.proxy==null?"\u2014":(0,w.jsx)(Ue,{status:t.proxy?"ok":"idle",label:t.proxy?"Proxied":"DNS only"})},{key:"x",label:"",align:"right",hideable:!1,render:t=>e.rowMenu?(0,w.jsx)(Be,{align:"end",flush:!0,width:200,trigger:n=>(0,w.jsx)("button",{type:"button",className:"tf-iconbtn tf-iconbtn-ghost tf-iconbtn-sm","aria-label":"Actions",onClick:n.toggle,children:(0,w.jsx)(N,{name:"more"})}),children:n=>(0,w.jsx)(At,{items:(e.rowMenu?.(t)??[]).map(a=>a==="-"?a:Object.assign({},a,{onClick:()=>{n.close(),a.onClick&&a.onClick()}}))})}):null}]})}function Gv(e){return(0,w.jsx)("div",{className:"tf-domains",children:(e.items||[]).slice().sort((t,n)=>(t.days==null?9999:t.days)-(n.days==null?9999:n.days)).map(t=>{let n=t.days==null?"idle":t.days<7?"danger":t.days<30?"warn":"ok";return(0,w.jsxs)("button",{type:"button",className:"tf-domainrow",onClick:()=>{e.onOpen&&e.onOpen(t)},children:[(0,w.jsx)(Re,{status:n}),(0,w.jsxs)("span",{className:"tf-option-text",children:[(0,w.jsx)("b",{className:"tf-mono",children:t.name}),(0,w.jsx)("small",{children:[t.registrar,t.dns].filter(Boolean).join(" \xB7 ")})]}),(0,w.jsxs)("span",{className:"tf-domainrow-cell",children:[(0,w.jsx)("small",{children:"Expires"}),(0,w.jsx)("b",{className:"tf-mono",children:t.days==null?"\u2014":`${t.days} days`})]}),(0,w.jsxs)("span",{className:"tf-domainrow-cell",children:[(0,w.jsx)("small",{children:"SSL"}),(0,w.jsx)(Ue,{status:t.ssl||"idle",label:t.sslLabel})]})]},t.name)})})}function Qv(e){let t=e.columns||["MX","SPF","DKIM","DMARC"],n=ou.useRef(null);return ta(n),(0,w.jsx)("div",{ref:n,className:"tf-scroll-x",children:(0,w.jsxs)("table",{className:"tf-table tf-mailauth",children:[(0,w.jsx)("thead",{children:(0,w.jsxs)("tr",{children:[(0,w.jsx)("th",{children:"Domain"}),t.map(a=>(0,w.jsx)("th",{children:a},a))]})}),(0,w.jsx)("tbody",{children:(e.rows||[]).map(a=>(0,w.jsxs)("tr",{children:[(0,w.jsx)("td",{className:"tf-mono",children:a.domain}),t.map(l=>{let i=a[l.toLowerCase()]||{status:"idle"};return(0,w.jsx)("td",{children:(0,w.jsx)("button",{type:"button",className:"tf-mailauth-cell",onClick:()=>{e.onOpen&&e.onOpen(a,l)},children:(0,w.jsx)(Ue,{status:i.status,label:i.label})})},l)})]},a.domain))})]})})}function Xv(e){let t=e.currency;return(0,w.jsx)(uc,{rows:e.rows||[],selectable:e.selectable,bulkActions:e.bulkActions,toolbar:e.toolbar,stickyHeader:!0,maxHeight:e.maxHeight,columnToggle:e.columnToggle,columns:[{key:"date",label:"Date",sortable:!0,render:n=>(0,w.jsx)("span",{className:"tf-mono",children:n.date})},{key:"ref",label:"Ref.",render:n=>(0,w.jsx)("span",{className:"tf-mono",children:n.ref})},{key:"text",label:"Description",render:n=>(0,w.jsxs)("span",{className:"tf-option-text",children:[(0,w.jsx)("b",{children:n.text}),n.suggested&&(0,w.jsxs)("small",{children:[(0,w.jsx)(Re,{status:"signal"})," ",`Suggested by ${n.suggested}`]})]})},{key:"category",label:"Category",render:n=>e.categories?(0,w.jsx)(Vs,{value:n.category||"",options:e.categories,onSave:a=>{e.onEdit?.(n,{category:a})}}):n.category},{key:"project",label:"Project",render:n=>n.project&&(0,w.jsxs)("span",{className:"tf-row",style:{gap:8,flexWrap:"nowrap"},children:[(0,w.jsx)("i",{className:"tf-sw tf-sw-"+(n.projectTint||"ink")}),n.project]})},{key:"net",label:"Net",align:"right",sortable:!0,render:n=>he(n.net,t,{minimumFractionDigits:2})},{key:"vat",label:"VAT",align:"right",render:n=>he(n.vat||0,t,{minimumFractionDigits:2})},{key:"gross",label:"Gross",align:"right",sortable:!0,render:n=>(0,w.jsx)("b",{className:n.gross<0?"tf-neg":void 0,children:he(n.gross,t,{minimumFractionDigits:2})})},{key:"status",label:"Status",render:n=>(0,w.jsx)(Ue,{status:n.status||"ok",label:n.statusLabel})}]})}function Kv(e){let t=e.columns||[],n=ou.useRef(null);return ta(n),(0,w.jsx)("div",{ref:n,className:"tf-scroll-x",children:(0,w.jsxs)("table",{className:"tf-table tf-pnl",children:[(0,w.jsx)("thead",{children:(0,w.jsxs)("tr",{children:[(0,w.jsx)("th",{children:e.label||""}),t.map(a=>(0,w.jsx)("th",{className:"tf-num",children:a},a)),e.total!==!1&&(0,w.jsx)("th",{className:"tf-num",children:"Total"})]})}),(0,w.jsx)("tbody",{children:(e.rows||[]).map((a,l)=>{let i=(a.values||[]).reduce((c,s)=>c+(s||0),0);return(0,w.jsxs)("tr",{className:a.kind,children:[(0,w.jsx)("td",{children:a.label}),a.kind==="section"?(0,w.jsx)("td",{colSpan:t.length+(e.total!==!1?1:0)}):t.map((c,s)=>{let r=(a.values||[])[s];return(0,w.jsx)("td",{className:b("tf-num",r<0&&"tf-neg"),children:r==null?"\u2014":he(r,e.currency)},s)}),a.kind!=="section"&&e.total!==!1&&(0,w.jsx)("td",{className:b("tf-num",i<0&&"tf-neg"),children:(0,w.jsx)("b",{children:he(i,e.currency)})})]},l)})})]})})}function Zv(e){return(0,w.jsxs)("div",{className:"tf-receipt",children:[(0,w.jsxs)("div",{className:"tf-receipt-src",children:[(0,w.jsx)(ie,{icon:"paperclip",tint:"sky"}),(0,w.jsxs)("span",{className:"tf-option-text",children:[(0,w.jsx)("b",{children:e.file}),(0,w.jsx)("small",{children:e.source})]})]}),(0,w.jsx)("div",{className:"tf-receipt-grid",children:(e.fields||[]).map(t=>(0,w.jsxs)("div",{className:"tf-receipt-field",children:[(0,w.jsx)("small",{children:t.label}),(0,w.jsx)("b",{className:t.mono?"tf-mono":void 0,children:t.value}),t.confidence!=null&&(0,w.jsx)("span",{className:b("tf-conf",t.confidence<.8&&"low"),children:ea(t.confidence*100)})]},t.label))}),e.suggestion&&(0,w.jsxs)("div",{className:"tf-receipt-sugg",children:[(0,w.jsx)(Re,{status:"signal"}),(0,w.jsx)("span",{children:e.suggestion})]}),e.children,(0,w.jsxs)("div",{className:"tf-row",style:{justifyContent:"flex-end"},children:[e.onDiscard&&(0,w.jsx)(Q,{variant:"ghost",size:"sm",onClick:e.onDiscard,children:e.discardLabel||"Not a receipt"}),e.onConfirm&&(0,w.jsx)(Q,{size:"sm",icon:"check",onClick:e.onConfirm,children:e.confirmLabel||"Book it"})]})]})}var ye=q(pe(),1),IT=q(re(),1);function Jv(e){let t=J(e.device,"desktop",e.onDevice);return(0,ye.jsxs)("div",{className:"tf-mailprev",children:[(0,ye.jsxs)("div",{className:"tf-mailprev-head",children:[(0,ye.jsxs)("div",{className:"tf-mailprev-inbox",children:[(0,ye.jsx)(qe,{name:e.fromName||e.from||"",size:36}),(0,ye.jsxs)("div",{className:"tf-option-text",children:[(0,ye.jsx)("b",{children:e.fromName||e.from}),(0,ye.jsxs)("span",{className:"tf-mailprev-subj",children:[(0,ye.jsx)("b",{children:e.subject||"(No subject)"}),e.preheader&&(0,ye.jsx)("span",{children:" \u2014 "+e.preheader})]})]})]}),(0,ye.jsx)(Hn,{size:"sm",value:t[0],onChange:t[1],label:"Device",options:[{value:"desktop",label:"Desktop"},{value:"mobile",label:"Mobile"}]})]}),(0,ye.jsx)("div",{className:b("tf-mailprev-stage",t[0]),children:(0,ye.jsx)("div",{className:"tf-mailprev-frame",children:e.html!=null?(0,ye.jsx)("iframe",{title:"Email preview",sandbox:"",srcDoc:e.html}):(0,ye.jsx)("div",{className:"tf-mailprev-body",children:e.children})})}),e.checks&&(0,ye.jsx)("div",{className:"tf-mailprev-checks",children:e.checks.map((n,a)=>(0,ye.jsx)(Ue,{status:n.status,label:n.label,size:"sm"},a))})]})}function Fv(e){let t=J(e.device,"mobile",e.onDevice),n=(e.headlines||[]).filter(Boolean).slice(0,3),a=(e.descriptions||[]).filter(Boolean).slice(0,2),l=[["headlines",30],["descriptions",90],["paths",15]],i=[];l.forEach(s=>{(e[s[0]]||[]).forEach((r,o)=>{r&&r.length>s[1]&&i.push(`${s[0]==="headlines"?"Headline":s[0]==="descriptions"?"Description":"Path"} ${o+1} is ${r.length} characters, the limit is ${s[1]}`)})});let c=(e.domain||"")+(e.paths||[]).filter(Boolean).map(s=>" \u203A "+s).join("");return(0,ye.jsxs)("div",{className:"tf-adprev",children:[(0,ye.jsxs)("div",{className:"tf-row",style:{justifyContent:"space-between"},children:[(0,ye.jsx)("span",{className:"tf-menu-label",style:{padding:0},children:"Preview"}),(0,ye.jsx)(Hn,{size:"sm",value:t[0],onChange:t[1],label:"Device",options:[{value:"mobile",label:"Mobile"},{value:"desktop",label:"Desktop"}]})]}),(0,ye.jsxs)("div",{className:b("tf-adprev-card",t[0]),children:[(0,ye.jsxs)("div",{className:"tf-adprev-top",children:[(0,ye.jsx)("span",{className:"tf-adprev-fav","aria-hidden":!0,children:(e.name||e.domain||"?").charAt(0).toUpperCase()}),(0,ye.jsxs)("div",{className:"tf-option-text",children:[(0,ye.jsx)("b",{children:e.name||e.domain}),(0,ye.jsx)("small",{children:c})]}),(0,ye.jsx)("span",{className:"tf-adprev-tag",children:e.sponsoredLabel||"Sponsored"})]}),(0,ye.jsx)("a",{className:"tf-adprev-hl",href:"#",onClick:s=>{s.preventDefault()},children:n.join(" | ")||"Your headline"}),(0,ye.jsx)("p",{className:"tf-adprev-desc",children:a.join(" ")||"Your description"}),e.sitelinks&&e.sitelinks.length>0&&(0,ye.jsx)("div",{className:"tf-adprev-links",children:e.sitelinks.map((s,r)=>(0,ye.jsx)("span",{children:s},r))})]}),i.length>0&&(0,ye.jsx)("div",{className:"tf-col",style:{gap:4},children:i.map((s,r)=>(0,ye.jsx)(Ue,{status:"warn",label:s,size:"sm"},r))})]})}var me=q(pe(),1),kn=q(re(),1);function $v(e){let t=xe("acc"),n=e.items||[],a=n.map((s,r)=>s.id??String(r)),l=J(e.value,e.defaultValue||[],e.onChange),i=kn.useRef(null),c=s=>{let r=l[0].includes(s);l[1](r?l[0].filter(o=>o!==s):e.multiple?l[0].concat(s):[s])};return(0,me.jsx)("div",{ref:i,className:b("tf-accordion",e.variant==="flush"&&"flush",e.className),style:e.style,onKeyDown:s=>{s.target.classList.contains("tf-accordion-head")&&vl(s,i.current,".tf-accordion-head","vertical")},children:n.map((s,r)=>{let o=a[r],u=l[0].includes(o);return(0,me.jsxs)("div",{className:b("tf-accordion-item",u&&"open"),children:[(0,me.jsx)("h3",{className:"tf-accordion-h",children:(0,me.jsxs)("button",{type:"button",id:`${t}-h${r}`,className:"tf-accordion-head","aria-expanded":u,"aria-controls":`${t}-p${r}`,disabled:s.disabled,onClick:()=>c(o),children:[s.icon&&(0,me.jsx)(N,{name:s.icon}),(0,me.jsx)("span",{className:"tf-accordion-title",children:s.title}),s.meta&&(0,me.jsx)("span",{className:"tf-accordion-meta",children:s.meta}),(0,me.jsx)(N,{name:"chevronDown",size:16,className:"tf-accordion-chev"})]})}),(0,me.jsx)("div",{id:`${t}-p${r}`,role:"region","aria-labelledby":`${t}-h${r}`,className:"tf-accordion-panel",hidden:!u,children:(0,me.jsx)("div",{className:"tf-accordion-body",children:s.content})})]},o)})})}function Iv(e){let t=e.orientation==="vertical";return e.label&&!t?(0,me.jsx)("div",{className:b("tf-sep","labelled",e.className),style:e.style,role:"separator",children:(0,me.jsx)("span",{children:e.label})}):(0,me.jsx)("div",{className:b("tf-sep",t&&"vertical",e.className),style:e.style,role:"separator","aria-orientation":t?"vertical":void 0})}function Wv(e){return(0,me.jsx)("div",{className:b("tf-aspect",e.className),style:{aspectRatio:String(e.ratio||16/9),...e.style},children:e.children})}function Pv(e){return(0,me.jsxs)("label",{className:b("tf-field-label","tf-label",e.className),style:e.style,htmlFor:e.htmlFor,children:[e.children,e.required&&(0,me.jsx)("span",{className:"tf-label-req","aria-hidden":!0,children:"*"}),e.hint&&(0,me.jsx)("span",{className:"tf-label-hint",children:e.hint})]})}function eg(e){let t=J(e.pressed,!!e.defaultPressed,e.onChange),n=!!e.icon&&!e.children;return(0,me.jsxs)("button",{type:"button",className:b("tf-toggle",e.size==="sm"&&"sm",n&&"icon",e.className),style:e.style,"aria-pressed":t[0],"aria-label":n?e.label:void 0,title:n?e.label:void 0,disabled:e.disabled,onClick:()=>t[1](!t[0]),children:[e.icon&&(0,me.jsx)(N,{name:e.icon}),e.children]})}var Yx=e=>typeof e=="string"?{value:e,label:e}:e;function tg(e){let t=J(e.value,e.defaultValue||[],e.onChange),n=kn.useRef(null),a=(e.items||[]).map(Yx);return(0,me.jsx)("div",{ref:n,className:b("tf-togglegroup",e.size==="sm"&&"sm",e.className),style:e.style,role:"group","aria-label":e.label,onKeyDown:l=>vl(l,n.current,".tf-toggle","horizontal"),children:a.map(l=>{let i=t[0].includes(l.value),c=!!l.icon&&!l.label;return(0,me.jsxs)("button",{type:"button",className:b("tf-toggle",e.size==="sm"&&"sm",c&&"icon"),"aria-pressed":i,"aria-label":c?l.hint||l.value:void 0,title:l.hint,onClick:()=>t[1](e.type==="multiple"?i?t[0].filter(s=>s!==l.value):t[0].concat(l.value):i?[]:[l.value]),children:[l.icon&&(0,me.jsx)(N,{name:l.icon}),l.label]},l.value)})})}function ng(e){return(0,me.jsx)("div",{className:b("tf-btngroup",e.orientation==="vertical"&&"vertical",e.className),style:e.style,role:"group","aria-label":e.label,children:e.children})}function ag(e){let t=e.orientation||"vertical";return(0,me.jsx)("div",{className:b("tf-scrollarea",t,e.className),style:{height:e.height,maxHeight:e.maxHeight,...e.style},role:"region","aria-label":e.label,tabIndex:0,children:e.children})}function lg(e){let[t,n]=kn.useState(!1),a=kn.useRef(void 0),l=kn.useRef(null),i=bt(t);hl(l,t);let c=(s,r)=>{clearTimeout(a.current),a.current=setTimeout(()=>n(s),r)};return kn.useEffect(()=>()=>clearTimeout(a.current),[]),(0,me.jsxs)("span",{className:b("tf-hovercard-anchor",e.className),style:e.style,onPointerEnter:()=>c(!0,e.openDelay??500),onPointerLeave:()=>c(!1,e.closeDelay??200),onFocus:()=>c(!0,0),onBlur:s=>{s.currentTarget.contains(s.relatedTarget)||c(!1,0)},onKeyDown:s=>{s.key==="Escape"&&c(!1,0)},children:[e.trigger,i.mounted&&(0,me.jsx)("div",{...ot(i.closing),ref:l,className:b("tf-hovercard","tf-hc-"+(e.side||"bottom"),"tf-hc-"+(e.align||"center")),style:e.width?{width:e.width}:void 0,children:e.children})]})}function ig(e){let t=e.slides||[],n=t.length,a=J(e.index,e.defaultIndex||0,e.onChange),l=kn.useRef(null),i=Math.max(1,e.perView||1),c=Math.max(0,n-i),s=r=>{let o=e.loop?r>c?0:r<0?c:r:Math.min(c,Math.max(0,r)),u=l.current?.children[o];u&&l.current&&l.current.scrollTo({left:u.offsetLeft-l.current.offsetLeft,behavior:"smooth"}),a[1](o)};return kn.useEffect(()=>{let r=l.current;if(!r)return;let o=0,u=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(()=>{let h=r.firstElementChild?.offsetWidth||1,f=parseFloat(getComputedStyle(r).columnGap)||0,m=Math.round(r.scrollLeft/(h+f));m!==a[0]&&a[1](Math.min(c,m))})};return r.addEventListener("scroll",u,{passive:!0}),()=>{r.removeEventListener("scroll",u),cancelAnimationFrame(o)}}),(0,me.jsxs)("section",{className:b("tf-carousel",e.className),style:{"--per":i,...e.style},"aria-roledescription":"carousel","aria-label":e.label,onKeyDown:r=>{r.key==="ArrowRight"?(r.preventDefault(),s(a[0]+1)):r.key==="ArrowLeft"&&(r.preventDefault(),s(a[0]-1))},children:[(0,me.jsx)("div",{ref:l,className:"tf-carousel-track",tabIndex:0,children:t.map((r,o)=>(0,me.jsx)("div",{className:"tf-carousel-slide",role:"group","aria-roledescription":"slide","aria-label":`${o+1} of ${n}`,children:r},o))}),(0,me.jsxs)("div",{className:"tf-carousel-bar",children:[(0,me.jsx)("button",{type:"button",className:"tf-iconbtn tf-iconbtn-soft tf-iconbtn-sm","aria-label":"Previous slide",disabled:!e.loop&&a[0]<=0,onClick:()=>s(a[0]-1),children:(0,me.jsx)(N,{name:"chevronLeft"})}),e.dots!==!1&&(0,me.jsx)("div",{className:"tf-carousel-dots",children:Array.from({length:c+1},(r,o)=>(0,me.jsx)("button",{type:"button",className:"tf-carousel-dot","aria-label":`Go to slide ${o+1}`,"aria-current":o===a[0]?"true":void 0,onClick:()=>s(o)},o))}),(0,me.jsx)("button",{type:"button",className:"tf-iconbtn tf-iconbtn-soft tf-iconbtn-sm","aria-label":"Next slide",disabled:!e.loop&&a[0]>=c,onClick:()=>s(a[0]+1),children:(0,me.jsx)(N,{name:"chevronRight"})})]})]})}var U=q(pe(),1),oM=q(re(),1);function Gx(e){return[e.area!=null&&[(0,U.jsx)(N,{name:"ruler",size:14},"i"),`${F(e.area)} m\xB2`],e.rooms!=null&&[(0,U.jsx)(N,{name:"bed",size:14},"i"),`${F(e.rooms)} rooms`],e.place&&[(0,U.jsx)(N,{name:"pin",size:14},"i"),e.place]].filter(Boolean).map((t,n)=>(0,U.jsx)("span",{children:t},n))}function Qx(e){return e.price==null?(0,U.jsx)("b",{className:"tf-listing-price",children:"Price on request"}):(0,U.jsxs)("b",{className:"tf-listing-price",children:[he(e.price,e.currency),e.rent&&(0,U.jsxs)("small",{children:[" ","/ month"]})]})}function cg(e){let t=e.listing||e;return(0,U.jsxs)("article",{className:b("tf-listing",e.layout==="row"&&"row",e.selected&&"selected",t.status==="unread"&&"unread"),onClick:e.onOpen&&(()=>{e.onOpen?.(t)}),children:[(0,U.jsxs)("div",{className:"tf-listing-media",children:[t.image?(0,U.jsx)("img",{src:t.image,alt:""}):(0,U.jsx)("div",{className:b("tf-listing-ph","tf-t-"+(t.tint||"sky")),children:(0,U.jsx)(N,{name:"image",size:24})}),t.isNew&&(0,U.jsx)("span",{className:"tf-listing-new",children:"New"}),(t.photos??0)>1&&(0,U.jsxs)("span",{className:"tf-listing-photos",children:[(0,U.jsx)(N,{name:"image",size:12}),F(t.photos??0)]}),e.onSelect&&(0,U.jsx)("label",{className:"tf-listing-sel",onClick:n=>{n.stopPropagation()},children:lc({checked:!!e.selected,onChange:()=>{e.onSelect?.(t)},label:"Select"})})]}),(0,U.jsxs)("div",{className:"tf-listing-body",children:[(0,U.jsxs)("div",{className:"tf-listing-top",children:[Qx(t),t.pricePerSqm!=null&&(0,U.jsx)("span",{className:"tf-listing-ppsqm",children:he(t.pricePerSqm,t.currency)+" / m\xB2"}),e.onWish&&(0,U.jsx)($,{icon:"heart",size:"sm",label:t.wished?"Remove from saved":"Save",className:b("tf-listing-wish",t.wished&&"on"),onClick:n=>{n.stopPropagation(),e.onWish?.(t)}})]}),(0,U.jsx)("b",{className:"tf-listing-title",children:t.title}),(0,U.jsx)("div",{className:"tf-listing-facts",children:Gx(t)}),(0,U.jsxs)("div",{className:"tf-listing-foot",children:[t.source&&(0,U.jsx)("span",{className:"tf-listing-src",children:t.source}),t.seller&&(0,U.jsx)(Oe,{tone:t.seller==="private"?"success":"neutral",dot:!1,children:t.sellerLabel||(t.seller==="private"?"Private seller":"Agent")}),t.phone&&(0,U.jsx)("span",{className:"tf-listing-flag",title:"Phone number available",children:(0,U.jsx)(N,{name:"phone",size:13})}),(0,U.jsx)("span",{style:{flex:1}}),t.age&&(0,U.jsx)("span",{className:"tf-listing-age",children:t.age}),e.statusOptions&&(0,U.jsx)("span",{onClick:n=>{n.stopPropagation()},children:(0,U.jsx)(Gs,{size:"sm",options:e.statusOptions,value:t.status,onChange:n=>{e.onStatus&&e.onStatus(t,n)},label:"Status"})})]})]})]})}function sg(e){let t=e.total>0&&e.selected===e.total,n=(e.selected??0)>0&&!t;return(0,U.jsxs)("div",{className:"tf-results",children:[e.onSelectAll&&(0,U.jsx)("label",{className:"tf-check",children:lc({checked:t,indeterminate:n,onChange:()=>{e.onSelectAll?.(!t)},label:t?"Deselect all":"Select all"})}),(0,U.jsxs)("div",{className:"tf-option-text",style:{marginRight:"auto"},children:[(0,U.jsx)("b",{children:(e.selected??0)>0?`${F(e.selected??0)} selected`:e.title||"Results"}),(0,U.jsx)("small",{children:`${F(e.total||0)} found`+(e.meta?" \xB7 "+e.meta:"")})]}),(e.selected??0)>0&&(e.bulkActions||[]).map((a,l)=>(0,U.jsx)(Q,{size:"sm",variant:a.variant||"secondary",icon:a.icon,disabled:a.busy,onClick:a.onClick,children:a.busy?a.busyLabel||"Working\u2026":a.label},l)),e.sortOptions&&(0,U.jsxs)("label",{className:"tf-results-sort",children:[(0,U.jsx)("span",{children:"Sort"}),(0,U.jsx)("select",{className:"tf-input",value:e.sort,onChange:a=>{e.onSort&&e.onSort(a.target.value)},children:e.sortOptions.map(a=>(0,U.jsx)("option",{value:a.value,children:a.label},a.value))})]}),e.views&&(0,U.jsx)(Hn,{size:"sm",value:e.view,onChange:e.onView,label:"View",options:e.views.map(a=>({value:a,icon:a==="grid"?"grid":a==="map"?"map":"list",label:a==="grid"?"Grid":a==="map"?"Map":"List"}))})]})}function rg(e){return(0,U.jsxs)("div",{className:b("tf-saved",e.enabled===!1&&"off"),children:[(0,U.jsxs)("div",{className:"tf-saved-head",children:[(0,U.jsx)(ie,{icon:e.icon||"search",tint:e.tint||"sky",size:36}),(0,U.jsxs)("div",{className:"tf-option-text",style:{flex:1,minWidth:0},children:[(0,U.jsx)("b",{children:e.name}),(0,U.jsx)("small",{children:[e.lastRun&&`Checked ${e.lastRun}`,e.frequency].filter(Boolean).join(" \xB7 ")})]}),(e.newCount??0)>0&&(0,U.jsx)("span",{className:"tf-nav-count",children:F(e.newCount??0)}),e.onToggle&&(0,U.jsx)(Ra,{checked:e.enabled!==!1,onChange:e.onToggle,label:"Enabled"})]}),(0,U.jsx)("div",{className:"tf-saved-crit",children:(e.criteria||[]).map((t,n)=>(0,U.jsx)("span",{className:"tf-saved-chip",children:t},n))}),(e.onOpen||e.onEdit)&&(0,U.jsxs)("div",{className:"tf-row",style:{justifyContent:"flex-end"},children:[e.onEdit&&(0,U.jsx)(Q,{size:"sm",variant:"ghost",icon:"edit",onClick:e.onEdit,children:"Edit"}),e.onOpen&&(0,U.jsx)(Q,{size:"sm",variant:"soft",onClick:e.onOpen,children:e.openLabel||"Show results"})]})]})}function og(e){let t=e.low,n=e.high,a=e.value,l=n-t||1,i=(a-t)/l*100,c=e.confidence,s=c==null?null:c>=.75?["ok","High confidence"]:c>=.5?["warn","Medium confidence"]:["danger","Low confidence"];return(0,U.jsxs)("div",{className:"tf-valuation",children:[(0,U.jsxs)("div",{className:"tf-valuation-head",children:[(0,U.jsx)("span",{className:"tf-menu-label",style:{padding:0},children:e.title||"Estimated value"}),s&&(0,U.jsx)(Ue,{status:s[0],label:e.confidenceLabel||s[1],size:"sm"})]}),(0,U.jsx)("div",{className:"tf-valuation-val",children:he(a,e.currency)}),e.perSqm!=null&&(0,U.jsx)("span",{className:"tf-valuation-sub",children:he(e.perSqm,e.currency)+" / m\xB2"+(e.compare?" \xB7 "+e.compare:"")}),(0,U.jsxs)("div",{className:"tf-valuation-range",role:"img","aria-label":`Range ${he(t,e.currency)} to ${he(n,e.currency)}`,children:[(0,U.jsxs)("div",{className:"tf-valuation-bar",children:[e.asking!=null&&(0,U.jsx)("span",{className:"tf-valuation-ask",style:{left:Math.max(0,Math.min(100,(e.asking-t)/l*100))+"%"},title:"Asking price"}),(0,U.jsx)("span",{className:"tf-valuation-mark",style:{left:i+"%"}})]}),(0,U.jsxs)("div",{className:"tf-valuation-ends",children:[(0,U.jsx)("span",{children:he(t,e.currency)}),(0,U.jsx)("span",{children:he(n,e.currency)})]})]}),e.asking!=null&&(0,U.jsx)("span",{className:b("tf-valuation-diff",e.asking>n?"bad":e.asking<t?"good":""),children:`Asking price ${he(e.asking,e.currency)} \xB7 `+(e.asking>a?"+":"")+F((e.asking-a)/a,{style:"percent",maximumFractionDigits:1})}),e.facts&&(0,U.jsx)(Bn,{dense:!0,items:e.facts}),e.note&&(0,U.jsx)("p",{className:"tf-card-desc",style:{margin:0},children:e.note}),e.action]})}var Xx=["A+","A","B","C","D","E","F","G","H"];function ug(e){let t=e.scale||Xx,n=t.indexOf(e.value);return(0,U.jsxs)("div",{className:"tf-energy",role:"img","aria-label":`Energy class ${e.value}`+(e.kwh!=null?", "+F(e.kwh)+" kWh/(m\xB2\xB7a)":""),children:[(0,U.jsx)("div",{className:"tf-energy-scale",style:{gridTemplateColumns:"repeat("+t.length+", 1fr)"},children:t.map((a,l)=>(0,U.jsx)("span",{className:b("tf-energy-c",l===n&&"on"),style:{"--e":l/(t.length-1)},children:a},a))}),(e.kwh!=null||e.kind)&&(0,U.jsx)("span",{className:"tf-energy-meta",children:[e.kwh!=null&&F(e.kwh)+" kWh/(m\xB2\xB7a)",e.kind].filter(Boolean).join(" \xB7 ")})]})}var Ye=q(pe(),1),zn=q(re(),1);var Kx={P:1,H3:1,BLOCKQUOTE:1,UL:1,OL:1,LI:1,B:1,STRONG:1,I:1,EM:1,U:1,A:1,BR:1},Zx={P:1,H3:1,BLOCKQUOTE:1,UL:1,OL:1};function fg(e){let t=document.createElement("div");return t.innerHTML=e||"",(function n(a){Array.from(a.childNodes).forEach(l=>{let i=l;if(i.nodeType===3)return;if(i.nodeType!==1||!Kx[i.tagName]){if(i.nodeType===1&&!/^(SCRIPT|STYLE|IFRAME|OBJECT)$/.test(i.tagName))for(n(i);i.firstChild;)a.insertBefore(i.firstChild,i);a.removeChild(i);return}let c=i.tagName==="A"?i.getAttribute("href"):null;Array.from(i.attributes).forEach(s=>{i.removeAttribute(s.name)}),i.tagName==="A"&&c&&/^(https?:|mailto:|tel:|\/|#|\{)/i.test(c)&&(i.setAttribute("href",c),i.setAttribute("rel","noopener noreferrer")),n(i)})})(t),Array.from(t.childNodes).forEach(n=>{if(n.nodeType===3?(n.textContent||"").trim():!Zx[n.tagName]){let a=document.createElement("p");t.insertBefore(a,n),a.appendChild(n)}else n.nodeType===3&&t.removeChild(n)}),t.innerHTML}function dg(e){let t=zn.useRef(null),n=zn.useState(0),a=zn.useState({}),l=zn.useState(!1),i=zn.useState(""),c=zn.useRef(null),s=zn.useRef({stack:[],i:-1,t:void 0});function r(){return t.current}function o(){let O=window.getSelection();if(!O||!O.rangeCount)return null;let L=O.getRangeAt(0);return t.current&&t.current.contains(L.commonAncestorContainer)?L:null}function u(O){let L=window.getSelection();L&&(L.removeAllRanges(),L.addRange(O))}function h(O,L){let B=O;for(;B&&B!==r();){if(B.nodeType===1&&L(B))return B;B=B.parentNode}return null}function f(O,L){let B=O;if(B===r()){let Z=r().childNodes;return Z[Math.max(0,Math.min(Z.length-1,(L||0)-(L?1:0)))]||null}for(;B&&B.parentNode!==r();)B=B.parentNode;return B&&B!==r()?B:null}function m(O){let L=o(),B=L&&{sc:L.startContainer,so:L.startOffset,ec:L.endContainer,eo:L.endOffset};if(O(L),B&&r().contains(B.sc)&&r().contains(B.ec))try{let Z=document.createRange();Z.setStart(B.sc,B.so),Z.setEnd(B.ec,B.eo),u(Z)}catch{}E(!0)}function p(O){let L=s.current;clearTimeout(L.t);function B(){let Z=r().innerHTML;L.stack[L.i]!==Z&&(L.stack=L.stack.slice(0,L.i+1).concat([Z]).slice(-100),L.i=L.stack.length-1)}O?B():L.t=setTimeout(B,400)}function M(){let O=r();O&&(n[1]((O.innerText??O.textContent??"").trim().length),e.onChange&&e.onChange(fg(O.innerHTML)))}function E(O){p(O),M(),y()}function y(){let O=o();if(!O)return a[1]({});let L=O.startContainer,B=f(L),Z=h(L,ce=>ce.tagName==="UL"||ce.tagName==="OL");a[1]({bold:!!h(L,ce=>ce.tagName==="B"||ce.tagName==="STRONG"),italic:!!h(L,ce=>ce.tagName==="I"||ce.tagName==="EM"),underline:!!h(L,ce=>ce.tagName==="U"),link:!!h(L,ce=>ce.tagName==="A"),heading:!!B&&B.tagName==="H3",quote:!!B&&B.tagName==="BLOCKQUOTE",list:!!Z&&Z.tagName==="UL",olist:!!Z&&Z.tagName==="OL"})}zn.useEffect(()=>(r().innerHTML=fg(e.defaultValue||e.value||"")||"<p><br></p>",n[1]((r().innerText??r().textContent??"").trim().length),p(!0),document.addEventListener("selectionchange",y),()=>{document.removeEventListener("selectionchange",y)}),[]);function v(O){let L=O.parentNode;for(;O.firstChild;)L.insertBefore(O.firstChild,O);L.removeChild(O)}function g(O,L){let B=o();if(!B)return;let Z=h(B.startContainer,Wt=>Wt.tagName===O||Wt.tagName===L);if(Z)return v(Z),E(!0);if(B.collapsed)return;let ce=document.createElement(O);ce.appendChild(B.extractContents()),Array.prototype.slice.call(ce.querySelectorAll(O+(L?","+L:""))).forEach(v),B.insertNode(ce);let at=document.createRange();at.selectNodeContents(ce),u(at),E(!0)}function S(O){let L=f(O.startContainer,O.startOffset),B=f(O.endContainer,O.endOffset),Z=[],ce=L;for(;ce&&(Z.push(ce),ce!==B);)ce=ce.nextSibling;return Z}function _(O){o()&&m(L=>{if(!L)return;let B=S(L),Z=B.every(ce=>ce.tagName===O);B.forEach(ce=>{(ce.tagName==="UL"||ce.tagName==="OL"?Array.from(ce.children):[ce]).forEach(Wt=>{let ul=document.createElement(Z?"P":O);for(;Wt.firstChild;)ul.appendChild(Wt.firstChild);r().insertBefore(ul,ce)}),r().removeChild(ce)})})}function X(O){o()&&m(L=>{if(!L)return;let B=S(L),Z=B[0];if(!Z)return;if(B.length===1&&Z.tagName===O){Array.from(Z.children).forEach(at=>{let Wt=document.createElement("P");for(;at.firstChild;)Wt.appendChild(at.firstChild);r().insertBefore(Wt,Z)}),r().removeChild(Z);return}let ce=document.createElement(O);r().insertBefore(ce,Z),B.forEach(at=>{(at.tagName==="UL"||at.tagName==="OL"?Array.from(at.children):[at]).forEach(ul=>{let Gl=document.createElement("LI");for(;ul.firstChild;)Gl.appendChild(ul.firstChild);ce.appendChild(Gl)}),r().removeChild(at)})})}function A(){let O=o();if(!O)return;c.current=O.cloneRange();let L=h(O.startContainer,B=>B.tagName==="A");i[1](L&&L.getAttribute("href")||""),l[1](!0)}function H(O){let L=c.current;if(l[1](!1),!L)return;r().focus(),u(L);let B=h(L.startContainer,at=>at.tagName==="A"),Z=i[0].trim();if(Z&&!/^(https?:|mailto:|tel:|\/|#|\{)/i.test(Z)&&(Z="https://"+Z),O||!Z)return B&&v(B),E(!0);if(B)return B.setAttribute("href",Z),E(!0);let ce=document.createElement("A");ce.setAttribute("href",Z),ce.setAttribute("rel","noopener noreferrer"),L.collapsed?ce.textContent=Z:ce.appendChild(L.extractContents()),L.insertNode(ce),E(!0)}function ue(O){let L=o();if(L||(r().focus(),L=o()),!L)return;L.deleteContents();let B=document.createTextNode(O);L.insertNode(B);let Z=document.createRange();Z.setStartAfter(B),Z.collapse(!0),u(Z),E(!0)}function W(O){let L=s.current;p(!0);let B=L.i+O;if(B<0||B>=L.stack.length)return;L.i=B,r().innerHTML=L.stack[B]??"";let Z=document.createRange();Z.selectNodeContents(r()),Z.collapse(!1),u(Z),M()}function Et(O){if(!(O.metaKey||O.ctrlKey))return;let B=O.key.toLowerCase();B==="b"?(O.preventDefault(),g("B","STRONG")):B==="i"?(O.preventDefault(),g("I","EM")):B==="u"?(O.preventDefault(),g("U")):B==="k"?(O.preventDefault(),A()):B==="z"?(O.preventDefault(),W(O.shiftKey?1:-1)):B==="y"&&(O.preventDefault(),W(1))}function It(O){O.preventDefault();let B=O.clipboardData.getData("text/plain").replace(/\r/g,"").split(`
|
|
30
|
-
`);if(ue(B[0]??""),B.length>1){let Z=o(),at=Z&&f(Z.startContainer,Z.startOffset);if(!at)return E(!0);B.slice(1).forEach(ul=>{let Gl=document.createElement("P");Gl.textContent=ul;let bm=at;bm.parentNode?.insertBefore(Gl,bm.nextSibling),at=Gl});let Wt=document.createRange();Wt.selectNodeContents(at),Wt.collapse(!1),u(Wt),E(!0)}}function ds(){let O=r();(!O.firstChild||O.innerHTML==="<br>")&&(O.innerHTML="<p><br></p>"),Array.from(O.childNodes).forEach(L=>{if(L.nodeType===3&&(L.textContent||"").trim()){let B=document.createElement("P");O.insertBefore(B,L),B.appendChild(L);let Z=document.createRange();Z.selectNodeContents(B),Z.collapse(!1),u(Z)}}),E(!1)}let UN=[["bold",()=>{g("B","STRONG")},"Bold","B"],["italic",()=>{g("I","EM")},"Italic","I"],["underline",()=>{g("U")},"Underline","U"],"-",["heading",()=>{_("H3")},"Heading"],["quote",()=>{_("BLOCKQUOTE")},"Quote"],["list",()=>{X("UL")},"Bulleted list"],["olist",()=>{X("OL")},"Numbered list"],"-",["link",A,"Link","K"],"-",["undo",()=>{W(-1)},"Undo","Z"],["redo",()=>{W(1)},"Redo"]],gm=e.maxLength&&n[0]>e.maxLength,qN=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform||"")?"\u2318":"Ctrl+";return(0,Ye.jsx)(ft,{label:e.label,hint:e.hint,error:e.error,children:(0,Ye.jsxs)("div",{className:b("tf-rte",gm&&"invalid"),children:[(0,Ye.jsxs)("div",{className:"tf-rte-bar",role:"toolbar","aria-label":"Formatting",children:[UN.map((O,L)=>{if(O==="-")return(0,Ye.jsx)("span",{className:"tf-rte-sep","aria-hidden":!0},L);let B=(0,Ye.jsx)("button",{type:"button",className:b("tf-rte-btn",a[0][O[0]]&&"on"),title:O[2]+(O[3]?" ("+qN+O[3]+")":""),"aria-label":O[2],"aria-pressed":O[0]==="undo"||O[0]==="redo"?void 0:!!a[0][O[0]],disabled:e.disabled,onMouseDown:Z=>{Z.preventDefault()},onClick:O[1],children:(0,Ye.jsx)(N,{name:O[0],size:15})},L);return O[0]==="link"?(0,Ye.jsx)(Be,{width:300,open:l[0],onOpenChange:l[1],trigger:B,children:(0,Ye.jsxs)("form",{className:"tf-col",style:{gap:8},onSubmit:Z=>{Z.preventDefault(),H(!1)},children:[(0,Ye.jsx)("input",{className:"tf-input",autoFocus:!0,value:i[0],onChange:Z=>{i[1](Z.target.value)},placeholder:"Link address","aria-label":"Link address",inputMode:"url"}),(0,Ye.jsxs)("div",{className:"tf-row",style:{justifyContent:"flex-end",gap:8},children:[a[0].link&&(0,Ye.jsx)(Q,{size:"sm",variant:"ghost",onClick:()=>{H(!0)},children:"Remove link"}),(0,Ye.jsx)(Q,{size:"sm",type:"submit",children:"Apply"})]})]})},L):B}),e.variables&&e.variables.length>0&&(0,Ye.jsx)(Be,{width:240,trigger:O=>(0,Ye.jsxs)("button",{type:"button",className:"tf-rte-var",onMouseDown:L=>{L.preventDefault()},onClick:O.toggle,"aria-expanded":O.open,children:["{ }",(0,Ye.jsx)("span",{children:"Insert field"})]}),children:O=>(0,Ye.jsx)("div",{className:"tf-menu",children:(e.variables||[]).map(L=>(0,Ye.jsxs)("button",{type:"button",className:"tf-menu-item",onMouseDown:B=>{B.preventDefault()},onClick:()=>{ue("{"+L.key+"}"),O.close&&O.close()},children:[(0,Ye.jsx)("span",{style:{flex:1},children:L.label}),(0,Ye.jsx)("code",{children:"{"+L.key+"}"})]},L.key))})})]}),(0,Ye.jsx)("div",{ref:t,className:"tf-rte-area",contentEditable:!e.disabled,role:"textbox","aria-multiline":"true","aria-label":typeof e.label=="string"?e.label:"Text","data-placeholder":e.placeholder||"",suppressContentEditableWarning:!0,onInput:ds,onKeyDown:Et,onPaste:It,onBlur:M,style:{minHeight:e.minHeight||160}}),(e.maxLength||e.footer)&&(0,Ye.jsxs)("div",{className:"tf-rte-foot",children:[e.footer,e.maxLength&&(0,Ye.jsx)("span",{className:b("tf-rte-count",gm&&"over"),children:F(n[0])+" / "+F(e.maxLength)})]})]})})}var le=q(pe(),1),Da=q(re(),1);function uu(e){return(0,le.jsxs)("nav",{className:"tf-topbar","aria-label":"Main",children:[e.brand&&(0,le.jsxs)("span",{className:"tf-brand",children:[e.brand,(0,le.jsx)("span",{className:"tf-brand-dot","aria-hidden":!0}),e.tag&&(0,le.jsx)("span",{className:"tf-brand-tag",children:e.tag})]}),(0,le.jsx)("div",{className:"tf-nav",children:(e.items||[]).map(t=>{let n=t.label===e.active;return(0,le.jsxs)("button",{type:"button",className:"tf-nav-item","aria-current":n?"page":void 0,title:t.label,onClick:()=>{e.onNavigate&&e.onNavigate(t.label)},children:[(0,le.jsx)(N,{name:t.icon}),(0,le.jsx)("span",{className:"tf-nav-label",children:t.label}),t.count?(0,le.jsx)("span",{className:"tf-nav-count",children:t.count}):null]},t.label)})}),e.extra&&(0,le.jsx)("div",{className:"tf-topbar-extra",children:e.extra}),e.user&&(0,le.jsxs)("button",{type:"button",className:"tf-user","aria-haspopup":"menu","aria-expanded":e.userOpen?"true":"false",onClick:e.onUser,children:[(0,le.jsx)(qe,{name:e.user.name,size:28}),(0,le.jsxs)("span",{className:"tf-user-text",children:[(0,le.jsx)("span",{className:"tf-user-name",children:e.user.name}),e.user.email&&(0,le.jsx)("span",{className:"tf-user-mail",children:e.user.email})]}),(0,le.jsx)(N,{name:"chevronDown",size:14})]})]})}function mg(e,t){return(0,le.jsxs)("button",{type:"button",className:"tf-rail-btn",style:{animationDelay:`calc(${200+t*50}ms * var(--motion-time, 1))`},"aria-label":e.count?`${e.label}, ${e.count}`:e.label,title:e.label,"aria-current":e.active?"page":void 0,onClick:e.onClick,children:[(0,le.jsx)(N,{name:e.icon}),e.count?(0,le.jsx)("span",{className:"tf-dotcount",children:e.count}):null]},e.label)}function fu(e){return(0,le.jsxs)("aside",{className:"tf-rail","aria-label":"Tools",children:[(0,le.jsx)("div",{className:"tf-rail-group",children:(e.top||[]).map(mg)}),(0,le.jsx)("div",{className:"tf-rail-group",children:(e.bottom||[]).map((t,n)=>mg(t,n+3))})]})}function du(e){return(0,le.jsx)("div",{className:b("tf-dock",e.surface&&"tf-"+e.surface,e.className),style:e.style,role:"toolbar","aria-label":e.label||"Quick actions",children:(e.items||[]).map(t=>(0,le.jsx)("button",{type:"button",className:b("tf-dock-btn","tf-t-"+(t.tint||"plain")),"aria-label":t.label,title:t.label,onClick:t.onClick,children:(0,le.jsx)(N,{name:t.icon})},t.label))})}function hg(e){let t=e.surface??"glass";return(0,le.jsxs)("div",{className:b("tf-floating",e.className),style:{minHeight:e.height??640,...e.style},role:"region","aria-label":e.label,"data-surface":t,children:[e.background!=null&&(0,le.jsx)("div",{className:"tf-floating-bg",children:e.background}),(0,le.jsxs)("div",{className:"tf-floating-ui",children:[e.top!=null&&(0,le.jsx)("div",{className:"tf-floating-top",children:e.top}),e.start!=null&&(0,le.jsx)("div",{className:"tf-floating-start",children:e.start}),e.end!=null&&(0,le.jsx)("div",{className:"tf-floating-end",children:e.end}),e.bottom!=null&&(0,le.jsx)("div",{className:"tf-floating-bottom",children:e.bottom})]}),e.children]})}function vg(e){let t=Da.useRef(null),[n,a]=Da.useState(!1),l=e.animate!==!1&&!e.src&&!e.children;Da.useEffect(()=>{let r=t.current;if(!r||!l||typeof IntersectionObserver>"u")return;let o=new IntersectionObserver(u=>a(!u.some(h=>h.isIntersecting)));return o.observe(r),()=>o.disconnect()},[l]);let i=Da.useRef(null);Da.useEffect(()=>{let r=i.current;r&&Cn(r)&&r.pause()},[e.src]);let c=e.colors?.length?e.colors:["var(--ambient-1)","var(--ambient-2)","var(--ambient-3)","var(--ambient-4)"],s=!!e.src&&!e.children;return(0,le.jsx)("div",{ref:t,"aria-hidden":!0,className:b("tf-ambient",e.fixed&&"fixed",s&&"media",!l&&"still",e.className),style:e.style,"data-paused":n?"":void 0,children:e.children??(s?e.video?(0,le.jsx)("video",{ref:i,className:"tf-ambient-media",src:e.src,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):(0,le.jsx)("img",{className:"tf-ambient-media",src:e.src,alt:""}):c.map((r,o)=>(0,le.jsx)("span",{className:"tf-ambient-field",style:{"--field":r}},o)))})}var mu=()=>[{label:"Home",icon:"home"},{label:"People",icon:"users"},{label:"Projects",icon:"grid"},{label:"Inbox",icon:"mail"},{label:"Calendar",icon:"calendar"},{label:"Billing",icon:"card"},{label:"Reports",icon:"chart"},{label:"Settings",icon:"settings"}],Jx=()=>[{label:"Share",icon:"share",active:!0},{label:"List view",icon:"menu"},{label:"Grid view",icon:"grid"}],Fx=()=>[{label:"Notifications",icon:"bell",count:3},{label:"Zoom in",icon:"plus"},{label:"Zoom out",icon:"minus"}],$x=()=>[{label:"Invite",icon:"users",tint:"sky"},{label:"New page",icon:"file",tint:"lilac"},{label:"New invoice",icon:"card",tint:"blush"},{label:"Announce",icon:"send",tint:"butter"},{label:"Export",icon:"download",tint:"mint"},{label:"More",icon:"plus"}];function gg(e){return(0,le.jsxs)("div",{className:b("tf-shell",e.className),style:e.style,children:[(0,le.jsx)(uu,{brand:e.brand,tag:e.tag,active:e.active,items:e.nav||mu(),onNavigate:e.onNavigate,user:e.user,extra:e.topExtra}),(0,le.jsxs)("div",{className:b("tf-sheet",!e.side&&"tf-sheet-2"),style:e.sheetStyle,children:[(0,le.jsx)(fu,{top:e.railTop||Jx(),bottom:e.railBottom||Fx()}),(0,le.jsx)("main",{className:b("tf-main",e.dock!==!1&&"tf-main-dock"),children:e.children},e.contentKey),e.side||null,e.dock!==!1&&(0,le.jsx)("div",{className:"tf-dock-float",children:(0,le.jsx)(du,{items:e.dockItems||$x()})})]})]})}var fe=q(pe(),1),ni=q(re(),1);function bg(e){let t=J(e.open,!1,e.onOpenChange);return(0,fe.jsxs)("div",{className:b("tf-launch",t[0]&&"open",e.inline&&"inline"),children:[t[0]&&(0,fe.jsxs)("div",{className:"tf-launch-panel",role:"dialog","aria-label":e.title||"Assistant",children:[(0,fe.jsxs)("div",{className:"tf-launch-head",children:[(0,fe.jsx)(Gt,{tint:e.tint||"lilac",size:32}),(0,fe.jsxs)("div",{className:"tf-option-text",style:{flex:1},children:[(0,fe.jsx)("b",{children:e.title||"Assistant"}),e.context&&(0,fe.jsx)("small",{children:e.context})]}),e.headerAction,(0,fe.jsx)($,{icon:"x",size:"sm",label:"Close",onClick:()=>{t[1](!1)}})]}),(0,fe.jsx)("div",{className:"tf-launch-body",children:e.children}),e.composer&&(0,fe.jsx)("div",{className:"tf-launch-foot",children:e.composer})]}),(0,fe.jsxs)("button",{type:"button",className:"tf-launch-btn","aria-label":t[0]?"Close assistant":e.title||"Open assistant","aria-expanded":t[0],onClick:()=>{t[1](!t[0])},children:[(0,fe.jsx)(N,{name:t[0]?"x":"sparkle",size:22}),!t[0]&&(e.unread??0)>0&&(0,fe.jsx)("span",{className:"tf-nav-count",children:e.unread})]})]})}function yg(e){let t=ni.useState(!1),n=ni.useState((e.categories||[]).reduce((l,i)=>(l[i.id]=!!(i.required||i.default),l),{}));if(e.open===!1)return null;function a(l){let i=Object.assign({},n[0]);(e.categories||[]).forEach(c=>{l===!0&&(i[c.id]=!0),l===!1&&(i[c.id]=!!c.required)}),e.onSave&&e.onSave(i)}return(0,fe.jsxs)("div",{className:b("tf-cookie",e.inline&&"inline"),role:"dialog","aria-label":e.title||"Privacy settings",children:[(0,fe.jsxs)("div",{className:"tf-row",style:{gap:12,alignItems:"flex-start",flexWrap:"nowrap"},children:[(0,fe.jsx)(ie,{icon:"cookie",tint:"butter",size:36}),(0,fe.jsxs)("div",{className:"tf-col",style:{gap:4},children:[(0,fe.jsx)("b",{children:e.title||"Privacy settings"}),(0,fe.jsxs)("p",{className:"tf-card-desc",style:{margin:0},children:[e.text||"We use cookies to run this site and, with your consent, to measure and improve it.",e.policy&&(0,fe.jsxs)(ni.Fragment,{children:[" ",e.policy]})]})]})]}),t[0]&&(0,fe.jsx)("div",{className:"tf-cookie-cats",children:(e.categories||[]).map(l=>(0,fe.jsxs)("div",{className:"tf-cookie-cat",children:[(0,fe.jsxs)("div",{className:"tf-option-text",style:{flex:1},children:[(0,fe.jsx)("b",{children:l.label}),l.text&&(0,fe.jsx)("small",{children:l.text})]}),l.required?(0,fe.jsx)("span",{className:"tf-card-desc",children:"Always on"}):(0,fe.jsx)(Ra,{checked:!!n[0][l.id],onChange:()=>{let i=Object.assign({},n[0]);i[l.id]=!i[l.id],n[1](i)}})]},l.id))}),(0,fe.jsxs)("div",{className:"tf-cookie-actions",children:[t[0]?(0,fe.jsx)(Q,{variant:"secondary",onClick:()=>{a(void 0)},children:"Save choice"}):(0,fe.jsx)(Q,{variant:"ghost",onClick:()=>{t[1](!0)},children:"Settings"}),(0,fe.jsx)(Q,{variant:"secondary",onClick:()=>{a(!1)},children:"Only necessary"}),(0,fe.jsx)(Q,{onClick:()=>{a(!0)},children:"Accept all"})]})]})}function pg(e){let t=ni.useState(!1);return t[0]?null:(0,fe.jsxs)("div",{className:b("tf-announce","tf-t-"+(e.tint||"butter")),role:"status",children:[e.icon!==!1&&(0,fe.jsx)(N,{name:e.icon||"sparkle",size:15}),(0,fe.jsx)("span",{children:e.children}),e.action,e.onDismiss!==!1&&(0,fe.jsx)("button",{type:"button",className:"tf-announce-x","aria-label":"Dismiss",onClick:()=>{t[1](!0),e.onDismiss&&e.onDismiss()},children:(0,fe.jsx)(N,{name:"x",size:14})})]})}var Ie=q(pe(),1),BM=q(re(),1);function Ng(e){let t=e.code||"404",n={404:["Page not found","The link may be old, or the page moved. Nothing is broken on your side.","search","sky"],500:["Something broke on our side","We\u2019ve been notified and are on it. Your data is safe; try again in a minute.","x","blush"],maintenance:["Back in a few minutes","We\u2019re upgrading the database. Everything you saved is safe.","settings","butter"],offline:["You\u2019re offline","Changes are kept on this device and sync when you\u2019re back.","globe","lilac"],403:["You don\u2019t have access","Ask a workspace owner to invite you to this area.","lock","lilac"]}[t]||[e.title,e.text,"sparkle","sky"];return(0,Ie.jsxs)("div",{className:"tf-status-screen",children:[(0,Ie.jsxs)("div",{className:"tf-status-art","aria-hidden":!0,children:[/^\d+$/.test(t)&&(0,Ie.jsx)("span",{className:"tf-status-code",children:t}),(0,Ie.jsx)(ie,{icon:e.icon||n[2],tint:e.tint||n[3],size:56})]}),(0,Ie.jsx)("h1",{children:e.title||n[0]}),(0,Ie.jsx)("p",{children:e.text||n[1]}),e.extra,(0,Ie.jsx)("div",{className:"tf-row",style:{justifyContent:"center"},children:e.actions||[(0,Ie.jsx)(Q,{icon:"home",onClick:e.onHome,children:"Back to overview"},"h"),(0,Ie.jsx)(Q,{variant:"secondary",icon:"mail",onClick:e.onContact,children:"Contact support"},"s")]}),e.reference&&(0,Ie.jsx)("span",{className:"tf-status-ref",children:`Reference ${e.reference}`})]})}function xg(e){return(0,Ie.jsxs)("div",{className:"tf-auth",children:[e.brand&&(0,Ie.jsxs)("div",{className:"tf-auth-brand",children:[(0,Ie.jsx)("span",{className:"tf-brand-word",children:e.brand}),(0,Ie.jsx)("span",{className:"tf-brand-dot"})]}),e.icon&&(0,Ie.jsx)(ie,{icon:e.icon,tint:e.tint||"sky",size:48}),(0,Ie.jsxs)("div",{className:"tf-col",style:{gap:8},children:[(0,Ie.jsx)("h1",{className:"tf-auth-title",children:e.title}),e.text&&(0,Ie.jsx)("p",{className:"tf-auth-text",children:e.text})]}),e.children,e.foot&&(0,Ie.jsx)("div",{className:"tf-auth-foot",children:e.foot})]})}var Xe=q(re(),1),_o=q(Ns(),1),DN=q(CN(),1);var TN=/^\d{4}-\d{2}-\d{2}(?:[T ][\d:.]+(?:Z|[+-]\d{2}:?\d{2})?)?$/,SN=/^\s*-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?\s*$/i;function dm(e){let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}function e5(e,t){return typeof t=="string"&&TN.test(t)?dm(t)??t:t}function MN(e,t){if(t===null)return;if(e.flags.includes("?")&&t==="null")return null;switch(e.kind){case"b":return t!=="false";case"n":return SN.test(t)?Number(t):void 0;case"x":return SN.test(t)?Number(t):t;case"s":return e.flags.includes("!")&&t==="false"?!1:t;case"d":return dm(t);case"r":return t;case"R":case"K":case"j":{let a=t.trim();try{return JSON.parse(a,e.flags.includes("t")?e5:void 0)}catch{return e.kind==="R"?[t]:e.flags.includes("t")&&TN.test(a)?dm(a):e.flags.includes("l")?a.split(",").map(l=>l.trim()).filter(Boolean):t}}default:return}}function EN(e){if(!e||!e.trim())return;let t={};for(let n of e.split(/;(?![^(]*\))/)){let a=n.indexOf(":");if(a<0)continue;let l=n.slice(0,a).trim(),i=n.slice(a+1).trim();!l||!i||(t[l.startsWith("--")?l:l.replace(/-([a-z])/g,(c,s)=>s.toUpperCase())]=i)}return t}function kN(e){if(!e||typeof e!="object"||!("nativeEvent"in e)||!("target"in e))return e;let t=e.target;return t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")?t.checked:t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement?t.value:null}function zN(e){return!!e&&typeof e=="object"&&"nativeEvent"in e&&"target"in e}function wN(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase()}function RN(e){return e.replace(/-([a-z0-9])/g,(t,n)=>n.toUpperCase())}var Ro=e=>e?e.split(" ").filter(Boolean):[];function AN(e){let t=Ro(e.p).map(l=>{let[i="",c="j"]=l.split(":");return{name:i,attr:wN(i),kind:c.charAt(0),flags:c.slice(1)}}),n=Ro(e.e).map(l=>{let[i="",c="0"]=l.split(":");return{prop:i,type:i.slice(2).toLowerCase(),arity:parseInt(c,10)||0,conditional:c.endsWith("?")}}),a=Ro(e.s).map(l=>{let[i="",c="",s="detail"]=l.split(":");return{event:i,prop:c,from:s==="false"?"false":"detail"}});return{tag:e.t,component:e.c,props:t,byAttr:new Map(t.map(l=>[l.attr,l])),byName:new Map(t.map(l=>[l.name,l])),events:n,byType:new Map(n.map(l=>[l.type,l])),sync:a,dismiss:new Set(Ro(e.x)),dialog:!!e.dialog,closeChildren:!!e.close}}var mm=new WeakSet,t5=new Set(["title","role","lang"]),ON=new Set(["id","slot","hidden","children","className","style","dir","inert","autofocus","tabIndex","accessKey","draggable","translate","spellcheck","contentEditable","nonce","part","popover","innerHTML","textContent"]),_N="tf-root",hm=0;function Ao(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Ca)return t;return null}function n5(e,t){for(let n=e.parentNode;n&&n!==t;n=n.parentNode){if(n===t._stash)return"stash";let a=n.__tfSlot;if(a)return a.owner===t?a:null}return null}var a5=e=>e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&!/^\s*\n\s*$/.test(e.nodeValue??"")&&e.nodeValue!=="";function jN({el:e}){return(0,Xe.useSyncExternalStore)(e._subscribe,e._snapshot,e._snapshot),(0,Xe.useLayoutEffect)(()=>{e._sweep()}),e._view()}function vm({owner:e,nodes:t}){let n=(0,Xe.useRef)(null),[a,l]=(0,Xe.useState)([]),i=(0,Xe.useMemo)(()=>{let c=[],s={owner:e,rescan(){let r=n.current;if(!r||!r.isConnected)return;let o=[];for(let u of r.querySelectorAll("*"))u instanceof Ca&&Ao(u)===e&&u.isConnected&&o.push(u);for(let u of o)u._slot!==s&&u._enterPortal(s);for(let u of c)!o.includes(u)&&u._slot===s&&u._leave();(o.length!==c.length||o.some((u,h)=>u!==c[h]))&&(c=o,l(o))},release(r){c.includes(r)&&(c=c.filter(o=>o!==r),l(c))}};return s},[e]);return(0,Xe.useLayoutEffect)(()=>{let c=n.current;if(!c)return;if(c.__tfSlot=i,!(c.childNodes.length===t.length&&t.every((h,f)=>c.childNodes[f]===h)))for(let h of t)c.appendChild(h);let r=!1,o=()=>{r||(r=!0,queueMicrotask(()=>{r=!1,i.rescan()}))};o();let u=new MutationObserver(h=>{for(let f of h)for(let m of[f.addedNodes,f.removedNodes])for(let p of m)if(p instanceof Element&&(p instanceof Ca||p.querySelector(Ca.selector)))return o()});return u.observe(c,{childList:!0,subtree:!0}),()=>{u.disconnect(),queueMicrotask(()=>e._sweep())}},[t,i,e]),(0,Xe.createElement)("span",{ref:n,"data-tf-slot":"",style:{display:"contents"}},a.map(c=>c._mount?(0,_o.createPortal)((0,Xe.createElement)(jN,{el:c}),c._mount,c._mountKey):null))}function l5({onClose:e,children:t}){let n=(0,Xe.useRef)(null);return dl(n,e),(0,Xe.useEffect)(()=>{let a=setTimeout(()=>{let l=n.current,i=l?.querySelector('[autofocus], input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select'),c=document.activeElement,s=c instanceof HTMLInputElement||c instanceof HTMLTextAreaElement||c instanceof HTMLSelectElement;l&&i&&!(s&&l.contains(c))&&i.focus()},30);return()=>clearTimeout(a)},[]),(0,Xe.createElement)("div",{ref:n,"data-tf-dialog":"",style:{position:"fixed",inset:0,zIndex:85,overflowY:"auto"},onClick:a=>{a.target instanceof Element&&a.target.classList.contains("tf-backdrop")&&e?.()}},t)}var Ca=class e extends HTMLElement{static def;static component;static selector="tf-provider";_key=`tf${(++hm).toString(36)}`;_values=new Map;_fns=new Map;_slots=null;_views=new Map;_root=null;_mount=null;_mountKey="";_slot=null;_stash=null;_rendered=!1;_version=0;_subs=new Set;_listeners=new Map;_callbacks=new Map;_closeFn;_stripping=new Set;_waiting=!1;_observer=null;constructor(){super();let t=this._def;for(let a of t.events)a.type!=="click"&&HTMLElement.prototype.addEventListener.call(this,a.type,l=>{!mm.has(l)&&l.target!==this&&this._isOwnDom(l.target)&&l.stopImmediatePropagation()});if(t.closeChildren){let a=l=>{l.target!==this&&mm.has(l)&&this._closeFn?.()};HTMLElement.prototype.addEventListener.call(this,"close",a),this._listeners.set("close",new Set([a]))}let n=this;for(let a of[...t.props.map(l=>l.name),...t.events.map(l=>l.prop)])if(!ON.has(a)&&Object.prototype.hasOwnProperty.call(this,a)){let l=n[a];delete n[a],n[a]=l}}get _def(){return this.constructor.def}connectedCallback(){this._waiting||(document.readyState==="loading"?(this._waiting=!0,document.addEventListener("DOMContentLoaded",()=>{this._waiting=!1,this._attach()},{once:!0})):queueMicrotask(()=>this._attach()))}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||this._leave()})}attributeChangedCallback(t,n,a){if(a===null&&this._stripping.delete(t))return;let i=this._def.byAttr.get(t);if(i){let c=MN(i,a);c===void 0?this._values.delete(i.name):this._values.set(i.name,c),t5.has(t)&&a!==null&&(this._stripping.add(t),this.removeAttribute(t))}this._bump()}_attach(){if(!this.isConnected)return;let t=Ao(this);if(t){let l=n5(this,t);if(l==="stash")return;if(l){this._slot!==l&&l.rescan();return}if(!t._rendered)return}if(this._root)return;this._leave(),this._prepare();let n=this._newMount(),a=(0,DN.createRoot)(n,{identifierPrefix:`${this._key}-`});this._root=a,(0,_o.flushSync)(()=>a.render((0,Xe.createElement)(jN,{el:this})))}_leave(){let t=this._root,n=this._slot;this._root=null,this._slot=null,this._mount?.remove(),this._mount=null,t&&t.unmount(),n?.release(this)}_enterPortal(t){this._leave(),this._prepare(),this._newMount(),this._slot=t}_newMount(){let t=document.createElement(_N);return t.style.display="contents",this._mount=t,this._mountKey=`${this._key}-${(++hm).toString(36)}`,this.appendChild(t),t}_prepare(){if(!this._slots){this._slots=new Map;for(let t of[...this.childNodes])this._take(t);this._observer=new MutationObserver(t=>{if(this._mount&&this._mount.parentNode!==this){this._slots=null,this._views.clear(),this._observer?.disconnect(),this._leave(),this._attach();return}let n=!1;for(let a of t)for(let l of a.addedNodes)l.parentNode===this&&(n=this._take(l)||n);n&&(this._views.clear(),this._bump())}),this._observer.observe(this,{childList:!0})}}_take(t){if(t===this._mount||t===this._stash||t instanceof Element&&t.localName===_N||!a5(t))return!1;let n=t instanceof Element?t.getAttribute("slot"):null,a="children";if(n){let l=n.indexOf(":"),i=RN(l<0?n:n.slice(0,l));a=l<0?i:`${i}:${n.slice(l+1)}`}return this._slots?.set(a,[...this._slots.get(a)??[],t]),!0}_sweep(){if(this._rendered=!0,!!this._slots){for(let t of this._slots.values())for(let n of t)if(n.parentNode===this||!this.contains(n)){if(!this._stash){let a=document.createElement("div");a.hidden=!0,a.dataset.tfStash="",this._stash=a}this._stash.parentNode!==this&&this.appendChild(this._stash),this._stash.appendChild(n)}}}_isOwnDom(t){for(let n=t;n&&n!==this;n=n.parentNode)if(n.__tfSlot?.owner===this)return!1;return!0}_subscribe=t=>(this._subs.add(t),()=>this._subs.delete(t));_snapshot=()=>this._version;_bump(){this._version++;for(let t of this._subs)t()}addEventListener(t,n,a){if(!n)return;super.addEventListener(t,n,a);let l=this._listeners.get(t);l||this._listeners.set(t,l=new Set);let i=l.size===0;l.add(n),i&&this._bumpTree(t)}removeEventListener(t,n,a){if(!n)return;super.removeEventListener(t,n,a);let l=this._listeners.get(t);l?.delete(n)&&l.size===0&&this._bumpTree(t)}_listens(t){let n=a=>{let l=a;return!!a._listeners.get(t)?.size||a.hasAttribute(`on${t}`)||typeof l[`on${t}`]=="function"||typeof l[`__${t}`]=="function"};if(n(this))return!0;for(let a=Ao(this);a;a=Ao(a))if(n(a))return!0;return!1}_bumpTree(t){this._def.byType.get(t)?.conditional&&this._bump();for(let n of this.querySelectorAll(e.selector))n instanceof e&&n._def.byType.get(t)?.conditional&&n._bump()}_slotView(t,n){let a=`${t}|${n?1:0}`;if(this._views.has(a))return this._views.get(a);let l=this._slots?.get(t),i;return l?.length&&(i=l.length===1&&!n?(0,Xe.createElement)(vm,{owner:this,nodes:l}):l.map((c,s)=>(0,Xe.createElement)(vm,{key:s,owner:this,nodes:[c]}))),this._views.set(a,i),i}_nodeView(t){if(t instanceof Node){let n=this._views.get(`node|${t.__tfKey??""}`);if(!n){let a=t.__tfKey??=`n${(++hm).toString(36)}`;n=(0,Xe.createElement)(vm,{key:a,owner:this,nodes:[t]}),this._views.set(`node|${a}`,n)}return n}return Array.isArray(t)?t.map(n=>this._nodeView(n)):t}_propValue(t){if(t.kind==="r"||t.kind==="R"){let a=this._slotView(t.name,t.kind==="R");if(a!==void 0)return a}if(t.kind==="K"&&this._slots){let a;for(let l of this._slots.keys())l.startsWith(`${t.name}:`)&&((a??={})[l.slice(t.name.length+1)]=this._slotView(l,!1));if(a)return{...this._values.get(t.name),...a}}if(t.kind==="f")return this._fns.get(t.name);let n=this._values.get(t.name);if(n!==void 0)return t.kind==="r"||t.kind==="R"?this._nodeView(n):n}_callback(t){let n=this._callbacks.get(t.prop);return n||(n=(...a)=>this._fire(t,a),this._callbacks.set(t.prop,n)),n}_fire(t,n){let a=this._fns.get(t.prop),l=a?a.apply(this,n):void 0,i=n[0];if(t.type==="click"&&zN(i)&&i.nativeEvent.type==="click")return l;let c=n.map(kN),s=t.arity>1?Array.from({length:Math.max(t.arity,c.length)},(o,u)=>c[u]):c.length?c[0]:null,r=new CustomEvent(t.type,{detail:s,bubbles:!0,composed:!0,cancelable:!0});return mm.add(r),this.dispatchEvent(r)&&this._after(t,c[0]),l}_after(t,n){let a=this._def,l=!1;for(let i of a.sync)i.event===t.prop&&this._values.get(i.prop)!==void 0&&(this._values.set(i.prop,i.from==="false"?!1:n),l=!0);l?this._bump():a.dismiss.has(t.prop)&&(this.hidden=!0)}_passes(t){return!t.conditional||this._fns.has(t.prop)||this._def.sync.some(n=>n.event===t.prop&&this._values.get(n.prop)!==void 0)?!0:this._listens(t.type)}_props(){let t=this._def,n={};for(let c of t.props){let s=this._propValue(c);s!==void 0&&(n[c.name]=s)}let a=this._slotView("children",!1);t.closeChildren?n.children=c=>(this._closeFn=c.close,a??null):a!==void 0&&(n.children=a);let l=this.getAttribute("class");l&&(n.className=l);let i=EN(this.getAttribute("style"));i&&(n.style=i);for(let c of t.events)this._passes(c)&&(n[c.prop]=this._callback(c));return n}_view(){if(this.hidden)return null;let t=this.constructor.component,n=this._props(),a=(0,Xe.createElement)(t,n);return this._def.dialog?(0,Xe.createElement)(l5,{onClose:n.onClose},a):a}};function LN(e,t){let n=[...e.props.filter(c=>c.kind!=="f").map(c=>c.attr),...e.events.map(c=>`on${c.type}`),"class","style","hidden"];class a extends Ca{static def=e;static component=t;static observedAttributes=[...new Set(n)]}let l=a.prototype,i=(c,s,r)=>{ON.has(c)||Object.defineProperty(l,c,{configurable:!0,enumerable:!0,get:s,set:r})};for(let c of e.props)i(c.name,function(){return c.kind==="f"?this._fns.get(c.name):this._values.get(c.name)},function(s){c.kind==="f"?typeof s=="function"?this._fns.set(c.name,s):this._fns.delete(c.name):s===void 0?this._values.delete(c.name):this._values.set(c.name,s),this._views.clear(),this._bump()});for(let c of e.events)i(c.prop,function(){return this._fns.get(c.prop)},function(s){typeof s=="function"?this._fns.set(c.prop,s):this._fns.delete(c.prop),this._bump()});return a}var Do=[{t:"tf-provider",c:"UIProvider",p:"kit:s theme:s density:s scope:s tokens:j surface:s motion:s"},{t:"tf-icon",c:"Icon",p:"name:s size:n label:s"},{t:"tf-range-slider",c:"RangeSlider",p:"label:r min:n max:n step:n value:j defaultValue:j unit:s inputs:b openEnd:b format:f hint:r",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-bar-list",c:"BarList",p:"items:j format:f label:s",e:"onPick:1?"},{t:"tf-status-select",c:"StatusSelect",p:"options:j value:s defaultValue:s size:s label:s width:n",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-tile-picker",c:"TilePicker",p:"options:j value:j defaultValue:j multiple:b min:n label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-live-feed",c:"LiveFeed",p:"items:j types:j paused:b maxHeight:n emptyText:s",e:"onPause:1"},{t:"tf-map-view",c:"MapView",p:"points:j bounds:j background:r bubbles:b selected:x? renderPopup:f legend:r controls:r height:x label:s surface:s",e:"onSelect:1"},{t:"tf-balance-card",c:"BalanceCard",p:"name:s sub:r logo:r icon:s tint:s balance:n currency:s perDay:n low:n spark:j status:s statusLabel:s topUpLabel:s action:r",e:"onTopUp:0?"},{t:"tf-service-monitor",c:"ServiceMonitor",p:"items:j label:s"},{t:"tf-run-history",c:"RunHistory",p:"items:j label:s"},{t:"tf-webhook-endpoint",c:"WebhookEndpoint",p:"url:s events:jl status:s statusLabel:s successRate:n enabled:b secret:r deliveries:j menu:jl defaultOpen:b",e:"onToggle:0? onRetry:1?"},{t:"tf-backup-list",c:"BackupList",p:"items:j footer:r label:s",e:"onDownload:1? onRestore:1?"},{t:"tf-block-list",c:"BlockList",p:"items:j addLabel:s removeLabel:s searchPlaceholder:s emptyText:s",e:"onAdd:0? onRemove:1?"},{t:"tf-review-card",c:"ReviewCard",p:"author:s verified:b product:s date:s rating:n title:s text:s state:s stateLabel:s highlight:jl reply:s replyLabel:s",e:"onPublish:0? onHide:0? onReply:1?"},{t:"tf-coupon-card",c:"CouponCard",p:"code:s kind:s value:n currency:s used:n limit:n until:s min:n revenue:n text:r status:s statusLabel:s menu:jl",e:"onCopy:0"},{t:"tf-locale-field",c:"LocaleField",p:"label:r locales:j value:j defaultValue:j source:s active:s multiline:b rows:n placeholder:s hint:r error:r",e:"onChange:1 onTranslate:2?",s:"onChange:value:detail"},{t:"tf-locale-switcher",c:"LocaleSwitcher",p:"languages:j language:s currencies:jl currency:s variant:s",e:"onLanguage:1 onCurrency:1"},{t:"tf-workspace-switcher",c:"WorkspaceSwitcher",p:"items:j value:s label:s footer:r variant:s width:n",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-export-dialog",c:"ExportDialog",p:"open:b inline:b title:s text:r count:n formats:jl format:s columns:j ranges:b range:jt note:r download:r doneText:s",e:"onClose:0 onExport:2 onDownload:0",s:"onClose:open:false",x:"onClose"},{t:"tf-two-factor-setup",c:"TwoFactorSetup",p:"qr:r secret:s codes:jl step:n scanText:s codesText:s",e:"onVerify:1? onDownload:0? onDone:0"},{t:"tf-color-field",c:"ColorField",p:"label:r value:s defaultValue:s against:s! hint:r",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-agent-card",c:"AgentCard",p:"name:s role:s tint:s status:s statusLabel:s model:s cost:s last:r",e:"onClick:0? onChat:0?"},{t:"tf-agent-details",c:"AgentDetails",p:"name:s role:s tint:s status:s statusLabel:s sections:j actions:R"},{t:"tf-chat-list",c:"ChatList",p:"groups:j selected:s filters:r searchPlaceholder:s",e:"onSelect:1 onSearch:1"},{t:"tf-chat-workspace",c:"ChatWorkspace",p:"list:r thread:r details:r"},{t:"tf-search-hits",c:"SearchHits",p:"items:j query:s emptyText:s",e:"onOpen:1"},{t:"tf-thinking-line",c:"ThinkingLine",p:"text:s"},{t:"tf-feedback-rating",c:"FeedbackRating",p:"value:s? label:s placeholder:s thanks:s askOnUp:b",e:"onRate:1 onSubmit:2"},{t:"tf-activity-feed",c:"ActivityFeed",p:"groups:j items:j"},{t:"tf-daily-briefing",c:"DailyBriefing",p:"title:s time:s tint:s summary:r attention:j suggestions:R attentionTitle:s suggestionsTitle:s"},{t:"tf-budget-stop",c:"BudgetStop",p:"spent:n budget:n title:s text:r paused:r running:r actionLabel:s",e:"onRaise:0?"},{t:"tf-memory-viewer",c:"MemoryViewer",p:"items:j",e:"onEdit:1? onDelete:1?"},{t:"tf-override-diff",c:"OverrideDiff",p:"title:s versions:r by:r before:s after:s discardLabel:s promoteLabel:s",e:"onDiscard:0? onPromote:0?"},{t:"tf-trigger-list",c:"TriggerList",p:"items:j",e:"onToggle:1? onRun:1?"},{t:"tf-schedule-calendar",c:"ScheduleCalendar",p:"events:j from:n to:n days:jl",e:"onOpen:1"},{t:"tf-org-chart",c:"OrgChart",p:"root:j"},{t:"tf-voice-mode",c:"VoiceMode",p:"name:s tint:s state:s stateLabel:s transcript:r muted:b",e:"onMute:0? onEnd:0?"},{t:"tf-mobile-tab-bar",c:"MobileTabBar",p:"items:j active:s label:s",e:"onPick:1"},{t:"tf-push-notification",c:"PushNotification",p:"app:s time:s title:s text:r actions:j"},{t:"tf-config-pr-summary",c:"ConfigPRSummary",p:"title:s meta:r status:s statusLabel:s summary:r items:j actions:R"},{t:"tf-module-registry",c:"ModuleRegistry",p:"items:j coreLabel:s",e:"onToggle:1"},{t:"tf-approval-card",c:"ApprovalCard",p:"title:r text:r agent:s project:s family:s familyLabel:s age:s escalation:r trace:r note:r heading:s options:j approveLabel:s decision:j compact:b state:s",e:"onDecide:2 onApprove:0 onDeny:0 onEdit:1"},{t:"tf-approval-inbox",c:"ApprovalInbox",p:"items:j selected:x emptyTitle:s emptyText:s label:s",e:"onSelect:1?"},{t:"tf-kbd",c:"Kbd",p:"keys:jl"},{t:"tf-key-value",c:"KeyValue",p:"items:j dense:b"},{t:"tf-spinner",c:"Spinner",p:"size:s label:s"},{t:"tf-collapsible",c:"Collapsible",p:"title:r meta:r defaultOpen:b open:b",e:"onOpenChange:1",s:"onOpenChange:open:detail"},{t:"tf-context-menu",c:"ContextMenu",p:"items:jl"},{t:"tf-split-pane",c:"SplitPane",p:"left:r right:r defaultSize:n min:n max:n storageKey:s"},{t:"tf-resizable-panels",c:"ResizablePanels",p:"panels:R defaultSizes:j min:n orientation:s storageKey:s labels:jl"},{t:"tf-tree-view",c:"TreeView",p:"items:j defaultOpen:jl selected:s label:s",e:"onSelect:1"},{t:"tf-inline-edit",c:"InlineEdit",p:"value:s options:jl mono:b type:s display:f align:s label:s",e:"onSave:1"},{t:"tf-bar-chart",c:"BarChart",p:"data:j tint:s height:n width:n barWidth:n format:f label:s"},{t:"tf-line-chart",c:"LineChart",p:"labels:jl series:j height:n width:n format:f label:s"},{t:"tf-sparkline",c:"Sparkline",p:"values:j tint:s width:n height:n label:s"},{t:"tf-donut",c:"Donut",p:"data:j center:s caption:s size:n stroke:n legend:b label:s"},{t:"tf-legend",c:"Legend",p:"items:j"},{t:"tf-stacked-bar-chart",c:"StackedBarChart",p:"labels:jl series:j height:n width:n barWidth:n format:f legend:b label:s"},{t:"tf-area-chart",c:"AreaChart",p:"labels:jl series:j stacked:b height:n width:n format:f legend:b label:s"},{t:"tf-heatmap",c:"Heatmap",p:"rows:jl cols:jl values:j colEvery:n caption:s format:f label:s"},{t:"tf-funnel",c:"Funnel",p:"steps:j tint:s format:f"},{t:"tf-gauge",c:"Gauge",p:"value:n max:n caption:s format:f tint:s thresholds:j size:n stroke:n showRange:b label:s"},{t:"tf-rich-text",c:"RichText",p:"text:s streaming:b"},{t:"tf-code-block",c:"CodeBlock",p:"code:s lang:s open:b"},{t:"tf-typing-dots",c:"TypingDots",p:"label:s"},{t:"tf-agent-mark",c:"AgentMark",p:"tint:s icon:s size:n live:b"},{t:"tf-chat-message",c:"ChatMessage",p:"role:s name:s time:s model:s text:s streaming:b tint:s sources:j attachments:j usage:s actions:b before:r after:r feedback:s?",e:"onRetry:0? onFeedback:1"},{t:"tf-tool-call",c:"ToolCall",p:"name:s icon:s status:s summary:r duration:s input:j output:j defaultOpen:b"},{t:"tf-reasoning",c:"Reasoning",p:"steps:jl text:r duration:s streaming:b defaultOpen:b"},{t:"tf-prompt-starters",c:"PromptStarters",p:"items:j",e:"onPick:1"},{t:"tf-model-picker",c:"ModelPicker",p:"models:j value:s side:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-composer",c:"Composer",p:"value:s busy:b placeholder:s label:s models:j model:s commands:j attachments:j hint:s left:r disabled:b",e:"onChange:1 onSend:2 onStop:0 onModel:1 onCommand:1? onAttach:1? onRemoveAttachment:1?",s:"onChange:value:detail"},{t:"tf-agent-status",c:"AgentStatus",p:"status:s step:s"},{t:"tf-run-trace",c:"RunTrace",p:"steps:j defaultOpen:n? footer:r"},{t:"tf-usage-meter",c:"UsageMeter",p:"used:n limit:n label:s caption:s format:f"},{t:"tf-product-art",c:"ProductArt",p:"kind:s tint:s size:n label:s"},{t:"tf-price",c:"Price",p:"value:n compareAt:n currency:s size:s showSave:b"},{t:"tf-rating",c:"Rating",p:"value:n count:n size:n"},{t:"tf-stock-badge",c:"StockBadge",p:"stock:n low:n compact:b"},{t:"tf-product-card",c:"ProductCard",p:"name:s meta:s art:s tint:s price:n compareAt:n rating:n reviews:n badge:s badgeTone:s stock:n wished:b added:b",e:"onWish:0? onAdd:0? onClick:0"},{t:"tf-variant-picker",c:"VariantPicker",p:"label:s type:s options:jl value:s defaultValue:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-cart-line",c:"CartLine",p:"name:s variant:s note:s art:s tint:s price:n qty:n",e:"onQty:1? onRemove:0"},{t:"tf-order-summary",c:"OrderSummary",p:"lines:j showLines:b discount:j shipping:n? freeShippingFrom:n vat:n title:s! action:r",e:"onCoupon:1?"},{t:"tf-checkout-steps",c:"CheckoutSteps",p:"steps:jl current:n",e:"onPick:1?"},{t:"tf-order-timeline",c:"OrderTimeline",p:"status:s times:j"},{t:"tf-plan-card",c:"PlanCard",p:"name:s text:s price:n? was:n per:s features:jl featured:b flag:s current:b cta:s",e:"onPick:0"},{t:"tf-count-up",c:"CountUp",p:"value:x duration:n delay:n"},{t:"tf-stat-tile",c:"StatTile",p:"value:r label:s tint:s delta:s delay:n"},{t:"tf-card",c:"Card",p:"title:s description:s meta:jl corner:r status:r actions:R tint:s eyebrow:r surface:s",e:"onClick:0?"},{t:"tf-event-card",c:"EventCard",p:"kind:s label:s date:s time:s tint:s icon:s actions:b"},{t:"tf-panel",c:"Panel",p:"side:b title:s subtitle:s action:r surface:s"},{t:"tf-page-header",c:"PageHeader",p:"crumbs:jl title:s subtitle:s actions:R"},{t:"tf-stagger",c:"Stagger",p:"as:s delay:n reveal:b"},{t:"tf-table",c:"Table",p:"columns:j rows:j animate:b"},{t:"tf-list-row",c:"ListRow",p:"avatar:s icon:s tint:s leading:r title:r subtitle:r meta:r trailing:r unread:b active:b",e:"onClick:0"},{t:"tf-timeline",c:"Timeline",p:"items:j delay:n"},{t:"tf-file-row",c:"FileRow",p:"name:s meta:s kind:s"},{t:"tf-kanban-column",c:"KanbanColumn",p:"title:s dot:s delay:n",e:"onAdd:0"},{t:"tf-progress",c:"Progress",p:"value:n tint:s label:s"},{t:"tf-progress-ring",c:"ProgressRing",p:"value:n tint:s size:n stroke:n caption:s label:s"},{t:"tf-filter-bar",c:"FilterBar",p:"filters:j value:j search:s query:s right:r",e:"onChange:1 onQuery:1",s:"onChange:value:detail"},{t:"tf-data-table",c:"DataTable",p:"columns:j rows:j rowKey:s selectable:b bulkActions:j renderExpanded:f stickyHeader:b maxHeight:x defaultSort:j toolbar:r columnToggle:b empty:r"},{t:"tf-log-view",c:"LogView",p:"lines:jl title:r right:r numbers:b follow:b maxHeight:n"},{t:"tf-code-viewer",c:"CodeViewer",p:"value:j lang:s"},{t:"tf-secret-field",c:"SecretField",p:"prefix:s last4:s value:s meta:r",e:"onReveal:0? onCopy:0? onRotate:0?"},{t:"tf-money-input",c:"MoneyInput",p:"label:s value:n? currency:s vat:s vatOptions:j showGross:b hint:r error:r defaultValue:n? required:b",e:"onChange:1 onVat:1",s:"onChange:value:detail"},{t:"tf-settings-layout",c:"SettingsLayout",p:"sections:j footer:r"},{t:"tf-shortcuts-overlay",c:"ShortcutsOverlay",p:"open:b title:s groups:j",e:"onClose:0",s:"onClose:open:false",x:"onClose"},{t:"tf-stat-cell",c:"StatCell",p:"label:r value:r delta:n deltaText:s compare:s invert:b spark:j icon:s iconTint:s tint:s"},{t:"tf-uptime-bar",c:"UptimeBar",p:"days:jl uptime:n caption:r"},{t:"tf-meter",c:"Meter",p:"label:r value:n? max:n text:r warn:n danger:n tone:s"},{t:"tf-skeleton",c:"Skeleton",p:"variant:s width:x height:x"},{t:"tf-menu",c:"Menu",p:"items:jl label:s autoFocus:b",e:"onClose:0?"},{t:"tf-modal",c:"Modal",p:"title:s text:s icon:s tint:s actions:R open:b",e:"onClose:0",s:"onClose:open:false",x:"onClose",dialog:1},{t:"tf-toast",c:"Toast",p:"icon:s tint:s action:s",e:"onAction:0"},{t:"tf-empty-state",c:"EmptyState",p:"title:s text:s icon:s tint:s action:r"},{t:"tf-alert",c:"Alert",p:"tone:s title:r icon:s action:r",e:"onDismiss:0?",x:"onDismiss"},{t:"tf-confirm-dialog",c:"ConfirmDialog",p:"open:b title:s text:s danger:b icon:s confirmLabel:s cancelLabel:s confirmText:s",e:"onConfirm:0 onCancel:0",s:"onCancel:open:false onConfirm:open:false"},{t:"tf-toaster",c:"Toaster",p:"position:s"},{t:"tf-form-field",c:"FormField",p:"name:s label:r required:b optional:b hint:r error:r success:r"},{t:"tf-text-field",c:"TextField",p:"type:s icon:s suffix:r value:s defaultValue:s placeholder:s disabled:b autoComplete:s name:s label:r required:b optional:b hint:r error:r success:r",e:"onChange:1 onBlur:1",s:"onChange:value:detail"},{t:"tf-radio-group",c:"RadioGroup",p:"label:s options:jl value:s defaultValue:s cards:b hint:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-segmented",c:"Segmented",p:"options:jl value:s defaultValue:s size:s block:b label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-combobox",c:"Combobox",p:"label:s options:jl value:j defaultValue:j multiple:b creatable:b placeholder:s hint:s error:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-tag-input",c:"TagInput",p:"label:s value:jl defaultValue:jl placeholder:s hint:s error:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-calendar",c:"Calendar",p:"range:b value:jt today:d min:d max:d month:d",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-date-picker",c:"DatePicker",p:"label:s range:b value:jt defaultValue:jt presets:b min:d max:d today:d placeholder:s hint:s error:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-number-input",c:"NumberInput",p:"label:s value:n defaultValue:n min:n max:n step:n unit:s hint:s error:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-slider",c:"Slider",p:"label:s min:n max:n step:n value:n defaultValue:n format:f marks:b hint:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-otp-input",c:"OtpInput",p:"length:n error:b label:s",e:"onComplete:1"},{t:"tf-file-drop",c:"FileDrop",p:"files:j title:s hint:s accept:s multiple:b",e:"onChange:1"},{t:"tf-button",c:"Button",p:"variant:s size:s icon:s iconRight:s disabled:b type:s asChild:b",e:"onClick:1"},{t:"tf-icon-button",c:"IconButton",p:"icon:s label:s variant:s size:s disabled:b asChild:b",e:"onClick:1"},{t:"tf-chip",c:"Chip",p:"selected:b icon:s count:n",e:"onClick:1"},{t:"tf-badge",c:"Badge",p:"tone:s dot:b live:b"},{t:"tf-tint-icon",c:"TintIcon",p:"icon:s tint:s label:s size:n"},{t:"tf-avatar",c:"Avatar",p:"name:s src:s size:n tint:s"},{t:"tf-avatar-stack",c:"AvatarStack",p:"names:jl max:n size:n"},{t:"tf-input",c:"Input",p:"type:s placeholder:s value:s defaultValue:s disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-select",c:"Select",p:"options:jl value:s defaultValue:s label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-textarea",c:"Textarea",p:"placeholder:s value:s defaultValue:s rows:n disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-search-field",c:"SearchField",p:"placeholder:s shortcut:s value:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-checkbox",c:"Checkbox",p:"name:s value:s required:b checked:b defaultChecked:b disabled:b label:s",e:"onChange:1",s:"onChange:checked:detail"},{t:"tf-switch",c:"Switch",p:"name:s checked:b defaultChecked:b spread:b disabled:b label:s",e:"onChange:1",s:"onChange:checked:detail"},{t:"tf-form",c:"Form",p:"rules:j errors:j",e:"onSubmit:1 onInvalid:1"},{t:"tf-select-menu",c:"SelectMenu",p:"options:jl value:s defaultValue:s placeholder:s disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-account-switcher",c:"AccountSwitcher",p:"accounts:j value:s? unread:n allLabel:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-inbox-list",c:"InboxList",p:"items:j selected:x",e:"onOpen:1"},{t:"tf-mail-thread",c:"MailThread",p:"subject:s messages:j reply:r"},{t:"tf-signature-editor",c:"SignatureEditor",p:"value:j fields:j note:r extra:r defaultValue:j previewLabel:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-attachment-preview",c:"AttachmentPreview",p:"name:s meta:r facts:j found:r actions:r width:x inline:b",e:"onClose:0",x:"onClose"},{t:"tf-image-variants",c:"ImageVariants",p:"variants:j selected:x alt:s tint:s actions:r",e:"onSelect:1"},{t:"tf-gallery",c:"Gallery",p:"items:j start:n ratio:s thumbs:b fullscreen:b badge:r"},{t:"tf-before-after",c:"BeforeAfter",p:"before:j after:j start:n ratio:s beforeLabel:s afterLabel:s"},{t:"tf-tabs",c:"Tabs",p:"items:jl value:s defaultValue:s block:b panels:K label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-breadcrumb",c:"Breadcrumb",p:"items:jl"},{t:"tf-pagination",c:"Pagination",p:"total:n page:n"},{t:"tf-menubar",c:"Menubar",p:"menus:j label:s"},{t:"tf-navigation-menu",c:"NavigationMenu",p:"items:j label:s"},{t:"tf-sidebar",c:"Sidebar",p:"groups:j current:s collapsed:b defaultCollapsed:b header:r footer:r label:s",e:"onPick:1 onCollapsedChange:1",s:"onCollapsedChange:collapsed:detail"},{t:"tf-connection-card",c:"ConnectionCard",p:"name:s icon:s logo:r text:r status:s statusLabel:s action:r"},{t:"tf-connection-banner",c:"ConnectionBanner",p:"state:s seconds:n text:r",e:"onRetry:0?"},{t:"tf-server-card",c:"ServerCard",p:"name:s provider:s address:s logo:r status:s statusLabel:s meters:j uptime:j foot:r"},{t:"tf-deploy-pipeline",c:"DeployPipeline",p:"stages:j"},{t:"tf-dns-record-table",c:"DnsRecordTable",p:"records:j rowMenu:f selectable:b bulkActions:j toolbar:r"},{t:"tf-domain-list",c:"DomainList",p:"items:j",e:"onOpen:1"},{t:"tf-mail-auth-status",c:"MailAuthStatus",p:"rows:j columns:jl",e:"onOpen:2"},{t:"tf-ledger-table",c:"LedgerTable",p:"rows:j categories:jl currency:s selectable:b bulkActions:j toolbar:r maxHeight:n columnToggle:b",e:"onEdit:2"},{t:"tf-pnl-statement",c:"PnLStatement",p:"columns:jl rows:j currency:s total:b label:s"},{t:"tf-receipt-suggestion",c:"ReceiptSuggestion",p:"file:s source:r fields:j suggestion:r confirmLabel:s discardLabel:s",e:"onConfirm:0? onDiscard:0?"},{t:"tf-popover",c:"Popover",p:"trigger:r open:b align:s side:s width:n flush:b block:b role:s",e:"onOpenChange:1",s:"onOpenChange:open:detail",close:1},{t:"tf-tooltip",c:"Tooltip",p:"label:r shortcut:s side:s defaultOpen:b"},{t:"tf-email-preview",c:"EmailPreview",p:"from:s fromName:s subject:s preheader:s html:s device:s checks:j",e:"onDevice:1"},{t:"tf-search-ad-preview",c:"SearchAdPreview",p:"name:s domain:s paths:jl headlines:jl descriptions:jl sitelinks:jl device:s sponsoredLabel:s",e:"onDevice:1"},{t:"tf-accordion",c:"Accordion",p:"items:j multiple:b value:jl defaultValue:jl variant:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-separator",c:"Separator",p:"orientation:s label:s"},{t:"tf-aspect-ratio",c:"AspectRatio",p:"ratio:n"},{t:"tf-label",c:"Label",p:"htmlFor:s required:b hint:r"},{t:"tf-toggle",c:"Toggle",p:"pressed:b defaultPressed:b icon:s label:s size:s disabled:b",e:"onChange:1",s:"onChange:pressed:detail"},{t:"tf-toggle-group",c:"ToggleGroup",p:"items:jl type:s value:jl defaultValue:jl label:s size:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-button-group",c:"ButtonGroup",p:"label:s orientation:s"},{t:"tf-scroll-area",c:"ScrollArea",p:"height:x maxHeight:x orientation:s label:s"},{t:"tf-hover-card",c:"HoverCard",p:"trigger:r side:s align:s openDelay:n closeDelay:n width:n"},{t:"tf-carousel",c:"Carousel",p:"slides:R label:s perView:n loop:b dots:b index:n defaultIndex:n",e:"onChange:1",s:"onChange:index:detail"},{t:"tf-listing-card",c:"ListingCard",p:"listing:j layout:s selected:b statusOptions:j",e:"onSelect:1? onWish:1? onStatus:2 onOpen:1?"},{t:"tf-results-toolbar",c:"ResultsToolbar",p:"title:s total:n meta:s selected:n bulkActions:j sortOptions:j sort:s views:jl view:s",e:"onSelectAll:1? onSort:1 onView:1"},{t:"tf-saved-search",c:"SavedSearch",p:"name:s criteria:R lastRun:s frequency:s newCount:n enabled:b openLabel:s icon:s tint:s",e:"onToggle:0? onEdit:0? onOpen:0?"},{t:"tf-valuation-card",c:"ValuationCard",p:"value:n low:n high:n asking:n perSqm:n compare:s currency:s confidence:n confidenceLabel:s facts:j note:r title:s action:r"},{t:"tf-energy-class",c:"EnergyClass",p:"value:s kwh:n kind:s scale:jl"},{t:"tf-rich-text-editor",c:"RichTextEditor",p:"label:r defaultValue:s value:s placeholder:s variables:j maxLength:n minHeight:n footer:r hint:r error:r disabled:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-top-bar",c:"TopBar",p:"brand:s tag:s items:j active:s user:j extra:r userOpen:b",e:"onNavigate:1 onUser:0"},{t:"tf-side-rail",c:"SideRail",p:"top:j bottom:j"},{t:"tf-dock",c:"Dock",p:"items:j label:s surface:s"},{t:"tf-floating-layout",c:"FloatingLayout",p:"background:r top:r start:r end:r bottom:r height:x surface:s label:s"},{t:"tf-ambient",c:"Ambient",p:"colors:jl src:s video:b animate:b fixed:b"},{t:"tf-app-shell",c:"AppShell",p:"active:s brand:s tag:s nav:j user:j topExtra:r sheetStyle:j contentKey:x side:r dock:b dockItems:j railTop:j railBottom:j",e:"onNavigate:1"},{t:"tf-chat-launcher",c:"ChatLauncher",p:"title:s context:r tint:s open:b unread:n headerAction:r composer:r inline:b",e:"onOpenChange:1",s:"onOpenChange:open:detail"},{t:"tf-cookie-consent",c:"CookieConsent",p:"title:s text:r policy:r categories:j open:b inline:b",e:"onSave:1"},{t:"tf-announcement-bar",c:"AnnouncementBar",p:"tint:s icon:s! action:r",e:"onDismiss:0?",x:"onDismiss"},{t:"tf-status-shape",c:"StatusShape",p:"status:s"},{t:"tf-status-indicator",c:"StatusIndicator",p:"status:s label:r size:s"},{t:"tf-status-screen",c:"StatusScreen",p:"code:s title:s text:s icon:s tint:s extra:r actions:R reference:s",e:"onHome:0 onContact:0"},{t:"tf-auth-card",c:"AuthCard",p:"title:s text:s icon:s tint:s brand:s foot:r"},{t:"tf-sub-nav",c:"SubNav",p:"eyebrow:s action:j items:j current:s",e:"onPick:1"},{t:"tf-drawer",c:"Drawer",p:"title:s subtitle:r avatar:s width:x inline:b open:b side:s",e:"onClose:0",s:"onClose:open:false",x:"onClose"},{t:"tf-command-palette",c:"CommandPalette",p:"items:j placeholder:s inline:b loading:b empty:r open:b",e:"onClose:0 onQueryChange:1",s:"onClose:open:false",x:"onClose"},{t:"tf-notification-list",c:"NotificationList",p:"items:j",e:"onOpen:1 onReadAll:0"},{t:"tf-flow",c:"Flow",p:"steps:j active:n? waiting:b tools:f",e:"onApprove:0? onReject:0?"},{t:"tf-file-thumb",c:"FileThumb",p:"kind:s title:s big:b entries:jl"},{t:"tf-file-card",c:"FileCard",p:"name:s kind:s size:s meta:s shared:b",e:"onClick:0"},{t:"tf-wizard",c:"Wizard",p:"steps:j current:n done:j footer:r brand:s label:s",e:"onPick:1"},{t:"tf-permission-matrix",c:"PermissionMatrix",p:"roles:j areas:jl",e:"onChange:3"},{t:"tf-invoice-preview",c:"InvoicePreview",p:"number:x from:s to:s issued:s due:s lines:j note:s kind:s brand:s format:f"},{t:"tf-transaction-row",c:"TransactionRow",p:"text:s date:s amount:n matched:b matchRef:s hint:s",e:"onMatch:0"}];var XE="0.2.0",KE=Object.freeze(Object.fromEntries(Do.map(e=>[e.t,e.c]))),BN=Do.map(e=>e.t),HN=!1;function i5(){if(HN)return;HN=!0;let e=BN.join(","),t=`:where(${e},tf-root){display:contents}:where(${e})[hidden]{display:none}`;try{let n=new CSSStyleSheet;n.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,n]}catch{let n=document.createElement("style");n.dataset.tfElements="",n.textContent=t,document.head.prepend(n)}}function c5(){if(typeof window>"u"||typeof customElements>"u")return;Ca.selector=BN.join(","),i5();let e=hu;for(let t of Do){if(customElements.get(t.t))continue;let n=e[t.c];typeof n=="function"&&customElements.define(t.t,LN(AN(t),n))}}c5();export{KE as ELEMENTS,XE as VERSION,c5 as defineElements,Sa as formatDate,he as formatMoney,F as formatNumber,ea as formatPercent,yt as toast};
|
|
30
|
+
`);if(ue(B[0]??""),B.length>1){let Z=o(),at=Z&&f(Z.startContainer,Z.startOffset);if(!at)return E(!0);B.slice(1).forEach(ul=>{let Gl=document.createElement("P");Gl.textContent=ul;let bm=at;bm.parentNode?.insertBefore(Gl,bm.nextSibling),at=Gl});let Wt=document.createRange();Wt.selectNodeContents(at),Wt.collapse(!1),u(Wt),E(!0)}}function ds(){let O=r();(!O.firstChild||O.innerHTML==="<br>")&&(O.innerHTML="<p><br></p>"),Array.from(O.childNodes).forEach(L=>{if(L.nodeType===3&&(L.textContent||"").trim()){let B=document.createElement("P");O.insertBefore(B,L),B.appendChild(L);let Z=document.createRange();Z.selectNodeContents(B),Z.collapse(!1),u(Z)}}),E(!1)}let UN=[["bold",()=>{g("B","STRONG")},"Bold","B"],["italic",()=>{g("I","EM")},"Italic","I"],["underline",()=>{g("U")},"Underline","U"],"-",["heading",()=>{_("H3")},"Heading"],["quote",()=>{_("BLOCKQUOTE")},"Quote"],["list",()=>{X("UL")},"Bulleted list"],["olist",()=>{X("OL")},"Numbered list"],"-",["link",A,"Link","K"],"-",["undo",()=>{W(-1)},"Undo","Z"],["redo",()=>{W(1)},"Redo"]],gm=e.maxLength&&n[0]>e.maxLength,qN=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform||"")?"\u2318":"Ctrl+";return(0,Ye.jsx)(ft,{label:e.label,hint:e.hint,error:e.error,children:(0,Ye.jsxs)("div",{className:b("tf-rte",gm&&"invalid"),children:[(0,Ye.jsxs)("div",{className:"tf-rte-bar",role:"toolbar","aria-label":"Formatting",children:[UN.map((O,L)=>{if(O==="-")return(0,Ye.jsx)("span",{className:"tf-rte-sep","aria-hidden":!0},L);let B=(0,Ye.jsx)("button",{type:"button",className:b("tf-rte-btn",a[0][O[0]]&&"on"),title:O[2]+(O[3]?" ("+qN+O[3]+")":""),"aria-label":O[2],"aria-pressed":O[0]==="undo"||O[0]==="redo"?void 0:!!a[0][O[0]],disabled:e.disabled,onMouseDown:Z=>{Z.preventDefault()},onClick:O[1],children:(0,Ye.jsx)(N,{name:O[0],size:15})},L);return O[0]==="link"?(0,Ye.jsx)(Be,{width:300,open:l[0],onOpenChange:l[1],trigger:B,children:(0,Ye.jsxs)("form",{className:"tf-col",style:{gap:8},onSubmit:Z=>{Z.preventDefault(),H(!1)},children:[(0,Ye.jsx)("input",{className:"tf-input",autoFocus:!0,value:i[0],onChange:Z=>{i[1](Z.target.value)},placeholder:"Link address","aria-label":"Link address",inputMode:"url"}),(0,Ye.jsxs)("div",{className:"tf-row",style:{justifyContent:"flex-end",gap:8},children:[a[0].link&&(0,Ye.jsx)(Q,{size:"sm",variant:"ghost",onClick:()=>{H(!0)},children:"Remove link"}),(0,Ye.jsx)(Q,{size:"sm",type:"submit",children:"Apply"})]})]})},L):B}),e.variables&&e.variables.length>0&&(0,Ye.jsx)(Be,{width:240,trigger:O=>(0,Ye.jsxs)("button",{type:"button",className:"tf-rte-var",onMouseDown:L=>{L.preventDefault()},onClick:O.toggle,"aria-expanded":O.open,children:["{ }",(0,Ye.jsx)("span",{children:"Insert field"})]}),children:O=>(0,Ye.jsx)("div",{className:"tf-menu",children:(e.variables||[]).map(L=>(0,Ye.jsxs)("button",{type:"button",className:"tf-menu-item",onMouseDown:B=>{B.preventDefault()},onClick:()=>{ue("{"+L.key+"}"),O.close&&O.close()},children:[(0,Ye.jsx)("span",{style:{flex:1},children:L.label}),(0,Ye.jsx)("code",{children:"{"+L.key+"}"})]},L.key))})})]}),(0,Ye.jsx)("div",{ref:t,className:"tf-rte-area",contentEditable:!e.disabled,role:"textbox","aria-multiline":"true","aria-label":typeof e.label=="string"?e.label:"Text","data-placeholder":e.placeholder||"",suppressContentEditableWarning:!0,onInput:ds,onKeyDown:Et,onPaste:It,onBlur:M,style:{minHeight:e.minHeight||160}}),(e.maxLength||e.footer)&&(0,Ye.jsxs)("div",{className:"tf-rte-foot",children:[e.footer,e.maxLength&&(0,Ye.jsx)("span",{className:b("tf-rte-count",gm&&"over"),children:F(n[0])+" / "+F(e.maxLength)})]})]})})}var le=q(pe(),1),Da=q(re(),1);function uu(e){return(0,le.jsxs)("nav",{className:"tf-topbar","aria-label":"Main",children:[e.brand&&(0,le.jsxs)("span",{className:"tf-brand",children:[e.brand,(0,le.jsx)("span",{className:"tf-brand-dot","aria-hidden":!0}),e.tag&&(0,le.jsx)("span",{className:"tf-brand-tag",children:e.tag})]}),(0,le.jsx)("div",{className:"tf-nav",children:(e.items||[]).map(t=>{let n=t.label===e.active;return(0,le.jsxs)("button",{type:"button",className:"tf-nav-item","aria-current":n?"page":void 0,title:t.label,onClick:()=>{e.onNavigate&&e.onNavigate(t.label)},children:[(0,le.jsx)(N,{name:t.icon}),(0,le.jsx)("span",{className:"tf-nav-label",children:t.label}),t.count?(0,le.jsx)("span",{className:"tf-nav-count",children:t.count}):null]},t.label)})}),e.extra&&(0,le.jsx)("div",{className:"tf-topbar-extra",children:e.extra}),e.user&&(0,le.jsxs)("button",{type:"button",className:"tf-user","aria-haspopup":"menu","aria-expanded":e.userOpen?"true":"false",onClick:e.onUser,children:[(0,le.jsx)(qe,{name:e.user.name,size:28}),(0,le.jsxs)("span",{className:"tf-user-text",children:[(0,le.jsx)("span",{className:"tf-user-name",children:e.user.name}),e.user.email&&(0,le.jsx)("span",{className:"tf-user-mail",children:e.user.email})]}),(0,le.jsx)(N,{name:"chevronDown",size:14})]})]})}function mg(e,t){return(0,le.jsxs)("button",{type:"button",className:"tf-rail-btn",style:{animationDelay:`calc(${200+t*50}ms * var(--motion-time, 1))`},"aria-label":e.count?`${e.label}, ${e.count}`:e.label,title:e.label,"aria-current":e.active?"page":void 0,onClick:e.onClick,children:[(0,le.jsx)(N,{name:e.icon}),e.count?(0,le.jsx)("span",{className:"tf-dotcount",children:e.count}):null]},e.label)}function fu(e){return(0,le.jsxs)("aside",{className:"tf-rail","aria-label":"Tools",children:[(0,le.jsx)("div",{className:"tf-rail-group",children:(e.top||[]).map(mg)}),(0,le.jsx)("div",{className:"tf-rail-group",children:(e.bottom||[]).map((t,n)=>mg(t,n+3))})]})}function du(e){return(0,le.jsx)("div",{className:b("tf-dock",e.surface&&"tf-"+e.surface,e.className),style:e.style,role:"toolbar","aria-label":e.label||"Quick actions",children:(e.items||[]).map(t=>(0,le.jsx)("button",{type:"button",className:b("tf-dock-btn","tf-t-"+(t.tint||"plain")),"aria-label":t.label,title:t.label,onClick:t.onClick,children:(0,le.jsx)(N,{name:t.icon})},t.label))})}function hg(e){let t=e.surface??"glass";return(0,le.jsxs)("div",{className:b("tf-floating",e.className),style:{minHeight:e.height??640,...e.style},role:"region","aria-label":e.label,"data-surface":t,children:[e.background!=null&&(0,le.jsx)("div",{className:"tf-floating-bg",children:e.background}),(0,le.jsxs)("div",{className:"tf-floating-ui",children:[e.top!=null&&(0,le.jsx)("div",{className:"tf-floating-top",children:e.top}),e.start!=null&&(0,le.jsx)("div",{className:"tf-floating-start",children:e.start}),e.end!=null&&(0,le.jsx)("div",{className:"tf-floating-end",children:e.end}),e.bottom!=null&&(0,le.jsx)("div",{className:"tf-floating-bottom",children:e.bottom})]}),e.children]})}function vg(e){let t=Da.useRef(null),[n,a]=Da.useState(!1),l=e.animate!==!1&&!e.src&&!e.children;Da.useEffect(()=>{let r=t.current;if(!r||!l||typeof IntersectionObserver>"u")return;let o=new IntersectionObserver(u=>a(!u.some(h=>h.isIntersecting)));return o.observe(r),()=>o.disconnect()},[l]);let i=Da.useRef(null);Da.useEffect(()=>{let r=i.current;r&&Cn(r)&&r.pause()},[e.src]);let c=e.colors?.length?e.colors:["var(--ambient-1)","var(--ambient-2)","var(--ambient-3)","var(--ambient-4)"],s=!!e.src&&!e.children;return(0,le.jsx)("div",{ref:t,"aria-hidden":!0,className:b("tf-ambient",e.fixed&&"fixed",s&&"media",!l&&"still",e.className),style:e.style,"data-paused":n?"":void 0,children:e.children??(s?e.video?(0,le.jsx)("video",{ref:i,className:"tf-ambient-media",src:e.src,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):(0,le.jsx)("img",{className:"tf-ambient-media",src:e.src,alt:""}):c.map((r,o)=>(0,le.jsx)("span",{className:"tf-ambient-field",style:{"--field":r}},o)))})}var mu=()=>[{label:"Home",icon:"home"},{label:"People",icon:"users"},{label:"Projects",icon:"grid"},{label:"Inbox",icon:"mail"},{label:"Calendar",icon:"calendar"},{label:"Billing",icon:"card"},{label:"Reports",icon:"chart"},{label:"Settings",icon:"settings"}],Jx=()=>[{label:"Share",icon:"share",active:!0},{label:"List view",icon:"menu"},{label:"Grid view",icon:"grid"}],Fx=()=>[{label:"Notifications",icon:"bell",count:3},{label:"Zoom in",icon:"plus"},{label:"Zoom out",icon:"minus"}],$x=()=>[{label:"Invite",icon:"users",tint:"sky"},{label:"New page",icon:"file",tint:"lilac"},{label:"New invoice",icon:"card",tint:"blush"},{label:"Announce",icon:"send",tint:"butter"},{label:"Export",icon:"download",tint:"mint"},{label:"More",icon:"plus"}];function gg(e){return(0,le.jsxs)("div",{className:b("tf-shell",e.className),style:e.style,children:[(0,le.jsx)(uu,{brand:e.brand,tag:e.tag,active:e.active,items:e.nav||mu(),onNavigate:e.onNavigate,user:e.user,extra:e.topExtra}),(0,le.jsxs)("div",{className:b("tf-sheet",!e.side&&"tf-sheet-2"),style:e.sheetStyle,children:[(0,le.jsx)(fu,{top:e.railTop||Jx(),bottom:e.railBottom||Fx()}),(0,le.jsx)("main",{className:b("tf-main",e.dock!==!1&&"tf-main-dock"),children:e.children},e.contentKey),e.side||null,e.dock!==!1&&(0,le.jsx)("div",{className:"tf-dock-float",children:(0,le.jsx)(du,{items:e.dockItems||$x()})})]})]})}var fe=q(pe(),1),ni=q(re(),1);function bg(e){let t=J(e.open,!1,e.onOpenChange);return(0,fe.jsxs)("div",{className:b("tf-launch",t[0]&&"open",e.inline&&"inline"),children:[t[0]&&(0,fe.jsxs)("div",{className:"tf-launch-panel",role:"dialog","aria-label":e.title||"Assistant",children:[(0,fe.jsxs)("div",{className:"tf-launch-head",children:[(0,fe.jsx)(Gt,{tint:e.tint||"lilac",size:32}),(0,fe.jsxs)("div",{className:"tf-option-text",style:{flex:1},children:[(0,fe.jsx)("b",{children:e.title||"Assistant"}),e.context&&(0,fe.jsx)("small",{children:e.context})]}),e.headerAction,(0,fe.jsx)($,{icon:"x",size:"sm",label:"Close",onClick:()=>{t[1](!1)}})]}),(0,fe.jsx)("div",{className:"tf-launch-body",children:e.children}),e.composer&&(0,fe.jsx)("div",{className:"tf-launch-foot",children:e.composer})]}),(0,fe.jsxs)("button",{type:"button",className:"tf-launch-btn","aria-label":t[0]?"Close assistant":e.title||"Open assistant","aria-expanded":t[0],onClick:()=>{t[1](!t[0])},children:[(0,fe.jsx)(N,{name:t[0]?"x":"sparkle",size:22}),!t[0]&&(e.unread??0)>0&&(0,fe.jsx)("span",{className:"tf-nav-count",children:e.unread})]})]})}function yg(e){let t=ni.useState(!1),n=ni.useState((e.categories||[]).reduce((l,i)=>(l[i.id]=!!(i.required||i.default),l),{}));if(e.open===!1)return null;function a(l){let i=Object.assign({},n[0]);(e.categories||[]).forEach(c=>{l===!0&&(i[c.id]=!0),l===!1&&(i[c.id]=!!c.required)}),e.onSave&&e.onSave(i)}return(0,fe.jsxs)("div",{className:b("tf-cookie",e.inline&&"inline"),role:"dialog","aria-label":e.title||"Privacy settings",children:[(0,fe.jsxs)("div",{className:"tf-row",style:{gap:12,alignItems:"flex-start",flexWrap:"nowrap"},children:[(0,fe.jsx)(ie,{icon:"cookie",tint:"butter",size:36}),(0,fe.jsxs)("div",{className:"tf-col",style:{gap:4},children:[(0,fe.jsx)("b",{children:e.title||"Privacy settings"}),(0,fe.jsxs)("p",{className:"tf-card-desc",style:{margin:0},children:[e.text||"We use cookies to run this site and, with your consent, to measure and improve it.",e.policy&&(0,fe.jsxs)(ni.Fragment,{children:[" ",e.policy]})]})]})]}),t[0]&&(0,fe.jsx)("div",{className:"tf-cookie-cats",children:(e.categories||[]).map(l=>(0,fe.jsxs)("div",{className:"tf-cookie-cat",children:[(0,fe.jsxs)("div",{className:"tf-option-text",style:{flex:1},children:[(0,fe.jsx)("b",{children:l.label}),l.text&&(0,fe.jsx)("small",{children:l.text})]}),l.required?(0,fe.jsx)("span",{className:"tf-card-desc",children:"Always on"}):(0,fe.jsx)(Ra,{checked:!!n[0][l.id],onChange:()=>{let i=Object.assign({},n[0]);i[l.id]=!i[l.id],n[1](i)}})]},l.id))}),(0,fe.jsxs)("div",{className:"tf-cookie-actions",children:[t[0]?(0,fe.jsx)(Q,{variant:"secondary",onClick:()=>{a(void 0)},children:"Save choice"}):(0,fe.jsx)(Q,{variant:"ghost",onClick:()=>{t[1](!0)},children:"Settings"}),(0,fe.jsx)(Q,{variant:"secondary",onClick:()=>{a(!1)},children:"Only necessary"}),(0,fe.jsx)(Q,{onClick:()=>{a(!0)},children:"Accept all"})]})]})}function pg(e){let t=ni.useState(!1);return t[0]?null:(0,fe.jsxs)("div",{className:b("tf-announce","tf-t-"+(e.tint||"butter")),role:"status",children:[e.icon!==!1&&(0,fe.jsx)(N,{name:e.icon||"sparkle",size:15}),(0,fe.jsx)("span",{children:e.children}),e.action,e.onDismiss!==!1&&(0,fe.jsx)("button",{type:"button",className:"tf-announce-x","aria-label":"Dismiss",onClick:()=>{t[1](!0),e.onDismiss&&e.onDismiss()},children:(0,fe.jsx)(N,{name:"x",size:14})})]})}var Ie=q(pe(),1),BM=q(re(),1);function Ng(e){let t=e.code||"404",n={404:["Page not found","The link may be old, or the page moved. Nothing is broken on your side.","search","sky"],500:["Something broke on our side","We\u2019ve been notified and are on it. Your data is safe; try again in a minute.","x","blush"],maintenance:["Back in a few minutes","We\u2019re upgrading the database. Everything you saved is safe.","settings","butter"],offline:["You\u2019re offline","Changes are kept on this device and sync when you\u2019re back.","globe","lilac"],403:["You don\u2019t have access","Ask a workspace owner to invite you to this area.","lock","lilac"]}[t]||[e.title,e.text,"sparkle","sky"];return(0,Ie.jsxs)("div",{className:"tf-status-screen",children:[(0,Ie.jsxs)("div",{className:"tf-status-art","aria-hidden":!0,children:[/^\d+$/.test(t)&&(0,Ie.jsx)("span",{className:"tf-status-code",children:t}),(0,Ie.jsx)(ie,{icon:e.icon||n[2],tint:e.tint||n[3],size:56})]}),(0,Ie.jsx)("h1",{children:e.title||n[0]}),(0,Ie.jsx)("p",{children:e.text||n[1]}),e.extra,(0,Ie.jsx)("div",{className:"tf-row",style:{justifyContent:"center"},children:e.actions||[(0,Ie.jsx)(Q,{icon:"home",onClick:e.onHome,children:"Back to overview"},"h"),(0,Ie.jsx)(Q,{variant:"secondary",icon:"mail",onClick:e.onContact,children:"Contact support"},"s")]}),e.reference&&(0,Ie.jsx)("span",{className:"tf-status-ref",children:`Reference ${e.reference}`})]})}function xg(e){return(0,Ie.jsxs)("div",{className:"tf-auth",children:[e.brand&&(0,Ie.jsxs)("div",{className:"tf-auth-brand",children:[(0,Ie.jsx)("span",{className:"tf-brand-word",children:e.brand}),(0,Ie.jsx)("span",{className:"tf-brand-dot"})]}),e.icon&&(0,Ie.jsx)(ie,{icon:e.icon,tint:e.tint||"sky",size:48}),(0,Ie.jsxs)("div",{className:"tf-col",style:{gap:8},children:[(0,Ie.jsx)("h1",{className:"tf-auth-title",children:e.title}),e.text&&(0,Ie.jsx)("p",{className:"tf-auth-text",children:e.text})]}),e.children,e.foot&&(0,Ie.jsx)("div",{className:"tf-auth-foot",children:e.foot})]})}var Xe=q(re(),1),_o=q(Ns(),1),DN=q(CN(),1);var TN=/^\d{4}-\d{2}-\d{2}(?:[T ][\d:.]+(?:Z|[+-]\d{2}:?\d{2})?)?$/,SN=/^\s*-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?\s*$/i;function dm(e){let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}function e5(e,t){return typeof t=="string"&&TN.test(t)?dm(t)??t:t}function MN(e,t){if(t===null)return;if(e.flags.includes("?")&&t==="null")return null;switch(e.kind){case"b":return t!=="false";case"n":return SN.test(t)?Number(t):void 0;case"x":return SN.test(t)?Number(t):t;case"s":return e.flags.includes("!")&&t==="false"?!1:t;case"d":return dm(t);case"r":return t;case"R":case"K":case"j":{let a=t.trim();try{return JSON.parse(a,e.flags.includes("t")?e5:void 0)}catch{return e.kind==="R"?[t]:e.flags.includes("t")&&TN.test(a)?dm(a):e.flags.includes("l")?a.split(",").map(l=>l.trim()).filter(Boolean):t}}default:return}}function EN(e){if(!e||!e.trim())return;let t={};for(let n of e.split(/;(?![^(]*\))/)){let a=n.indexOf(":");if(a<0)continue;let l=n.slice(0,a).trim(),i=n.slice(a+1).trim();!l||!i||(t[l.startsWith("--")?l:l.replace(/-([a-z])/g,(c,s)=>s.toUpperCase())]=i)}return t}function kN(e){if(!e||typeof e!="object"||!("nativeEvent"in e)||!("target"in e))return e;let t=e.target;return t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")?t.checked:t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement?t.value:null}function zN(e){return!!e&&typeof e=="object"&&"nativeEvent"in e&&"target"in e}function wN(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase()}function RN(e){return e.replace(/-([a-z0-9])/g,(t,n)=>n.toUpperCase())}var Ro=e=>e?e.split(" ").filter(Boolean):[];function AN(e){let t=Ro(e.p).map(l=>{let[i="",c="j"]=l.split(":");return{name:i,attr:wN(i),kind:c.charAt(0),flags:c.slice(1)}}),n=Ro(e.e).map(l=>{let[i="",c="0"]=l.split(":");return{prop:i,type:i.slice(2).toLowerCase(),arity:parseInt(c,10)||0,conditional:c.endsWith("?")}}),a=Ro(e.s).map(l=>{let[i="",c="",s="detail"]=l.split(":");return{event:i,prop:c,from:s==="false"?"false":"detail"}});return{tag:e.t,component:e.c,props:t,byAttr:new Map(t.map(l=>[l.attr,l])),byName:new Map(t.map(l=>[l.name,l])),events:n,byType:new Map(n.map(l=>[l.type,l])),sync:a,dismiss:new Set(Ro(e.x)),dialog:!!e.dialog,closeChildren:!!e.close}}var mm=new WeakSet,t5=new Set(["title","role","lang"]),ON=new Set(["id","slot","hidden","children","className","style","dir","inert","autofocus","tabIndex","accessKey","draggable","translate","spellcheck","contentEditable","nonce","part","popover","innerHTML","textContent"]),_N="tf-root",hm=0;function Ao(e){for(let t=e.parentNode;t;t=t.parentNode)if(t instanceof Ca)return t;return null}function n5(e,t){for(let n=e.parentNode;n&&n!==t;n=n.parentNode){if(n===t._stash)return"stash";let a=n.__tfSlot;if(a)return a.owner===t?a:null}return null}var a5=e=>e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE&&!/^\s*\n\s*$/.test(e.nodeValue??"")&&e.nodeValue!=="";function jN({el:e}){return(0,Xe.useSyncExternalStore)(e._subscribe,e._snapshot,e._snapshot),(0,Xe.useLayoutEffect)(()=>{e._sweep()}),e._view()}function vm({owner:e,nodes:t}){let n=(0,Xe.useRef)(null),[a,l]=(0,Xe.useState)([]),i=(0,Xe.useMemo)(()=>{let c=[],s={owner:e,rescan(){let r=n.current;if(!r||!r.isConnected)return;let o=[];for(let u of r.querySelectorAll("*"))u instanceof Ca&&Ao(u)===e&&u.isConnected&&o.push(u);for(let u of o)u._slot!==s&&u._enterPortal(s);for(let u of c)!o.includes(u)&&u._slot===s&&u._leave();(o.length!==c.length||o.some((u,h)=>u!==c[h]))&&(c=o,l(o))},release(r){c.includes(r)&&(c=c.filter(o=>o!==r),l(c))}};return s},[e]);return(0,Xe.useLayoutEffect)(()=>{let c=n.current;if(!c)return;if(c.__tfSlot=i,!(c.childNodes.length===t.length&&t.every((h,f)=>c.childNodes[f]===h)))for(let h of t)c.appendChild(h);let r=!1,o=()=>{r||(r=!0,queueMicrotask(()=>{r=!1,i.rescan()}))};o();let u=new MutationObserver(h=>{for(let f of h)for(let m of[f.addedNodes,f.removedNodes])for(let p of m)if(p instanceof Element&&(p instanceof Ca||p.querySelector(Ca.selector)))return o()});return u.observe(c,{childList:!0,subtree:!0}),()=>{u.disconnect(),queueMicrotask(()=>e._sweep())}},[t,i,e]),(0,Xe.createElement)("span",{ref:n,"data-tf-slot":"",style:{display:"contents"}},a.map(c=>c._mount?(0,_o.createPortal)((0,Xe.createElement)(jN,{el:c}),c._mount,c._mountKey):null))}function l5({onClose:e,children:t}){let n=(0,Xe.useRef)(null);return dl(n,e),(0,Xe.useEffect)(()=>{let a=setTimeout(()=>{let l=n.current,i=l?.querySelector('[autofocus], input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select'),c=document.activeElement,s=c instanceof HTMLInputElement||c instanceof HTMLTextAreaElement||c instanceof HTMLSelectElement;l&&i&&!(s&&l.contains(c))&&i.focus()},30);return()=>clearTimeout(a)},[]),(0,Xe.createElement)("div",{ref:n,"data-tf-dialog":"",style:{position:"fixed",inset:0,zIndex:85,overflowY:"auto"},onClick:a=>{a.target instanceof Element&&a.target.classList.contains("tf-backdrop")&&e?.()}},t)}var Ca=class e extends HTMLElement{static def;static component;static selector="tf-provider";_key=`tf${(++hm).toString(36)}`;_values=new Map;_fns=new Map;_slots=null;_views=new Map;_root=null;_mount=null;_mountKey="";_slot=null;_stash=null;_rendered=!1;_version=0;_subs=new Set;_listeners=new Map;_callbacks=new Map;_closeFn;_stripping=new Set;_waiting=!1;_observer=null;constructor(){super();let t=this._def;for(let a of t.events)a.type!=="click"&&HTMLElement.prototype.addEventListener.call(this,a.type,l=>{!mm.has(l)&&l.target!==this&&this._isOwnDom(l.target)&&l.stopImmediatePropagation()});if(t.closeChildren){let a=l=>{l.target!==this&&mm.has(l)&&this._closeFn?.()};HTMLElement.prototype.addEventListener.call(this,"close",a),this._listeners.set("close",new Set([a]))}let n=this;for(let a of[...t.props.map(l=>l.name),...t.events.map(l=>l.prop)])if(!ON.has(a)&&Object.prototype.hasOwnProperty.call(this,a)){let l=n[a];delete n[a],n[a]=l}}get _def(){return this.constructor.def}connectedCallback(){this._waiting||(document.readyState==="loading"?(this._waiting=!0,document.addEventListener("DOMContentLoaded",()=>{this._waiting=!1,this._attach()},{once:!0})):queueMicrotask(()=>this._attach()))}disconnectedCallback(){queueMicrotask(()=>{this.isConnected||this._leave()})}attributeChangedCallback(t,n,a){if(a===null&&this._stripping.delete(t))return;let i=this._def.byAttr.get(t);if(i){let c=MN(i,a);c===void 0?this._values.delete(i.name):this._values.set(i.name,c),t5.has(t)&&a!==null&&(this._stripping.add(t),this.removeAttribute(t))}this._bump()}_attach(){if(!this.isConnected)return;let t=Ao(this);if(t){let l=n5(this,t);if(l==="stash")return;if(l){this._slot!==l&&l.rescan();return}if(!t._rendered)return}if(this._root)return;this._leave(),this._prepare();let n=this._newMount(),a=(0,DN.createRoot)(n,{identifierPrefix:`${this._key}-`});this._root=a,(0,_o.flushSync)(()=>a.render((0,Xe.createElement)(jN,{el:this})))}_leave(){let t=this._root,n=this._slot;this._root=null,this._slot=null,this._mount?.remove(),this._mount=null,t&&t.unmount(),n?.release(this)}_enterPortal(t){this._leave(),this._prepare(),this._newMount(),this._slot=t}_newMount(){let t=document.createElement(_N);return t.style.display="contents",this._mount=t,this._mountKey=`${this._key}-${(++hm).toString(36)}`,this.appendChild(t),t}_prepare(){if(!this._slots){this._slots=new Map;for(let t of[...this.childNodes])this._take(t);this._observer=new MutationObserver(t=>{if(this._mount&&this._mount.parentNode!==this){this._slots=null,this._views.clear(),this._observer?.disconnect(),this._leave(),this._attach();return}let n=!1;for(let a of t)for(let l of a.addedNodes)l.parentNode===this&&(n=this._take(l)||n);n&&(this._views.clear(),this._bump())}),this._observer.observe(this,{childList:!0})}}_take(t){if(t===this._mount||t===this._stash||t instanceof Element&&t.localName===_N||!a5(t))return!1;let n=t instanceof Element?t.getAttribute("slot"):null,a="children";if(n){let l=n.indexOf(":"),i=RN(l<0?n:n.slice(0,l));a=l<0?i:`${i}:${n.slice(l+1)}`}return this._slots?.set(a,[...this._slots.get(a)??[],t]),!0}_sweep(){if(this._rendered=!0,!!this._slots){for(let t of this._slots.values())for(let n of t)if(n.parentNode===this||!this.contains(n)){if(!this._stash){let a=document.createElement("div");a.hidden=!0,a.dataset.tfStash="",this._stash=a}this._stash.parentNode!==this&&this.appendChild(this._stash),this._stash.appendChild(n)}}}_isOwnDom(t){for(let n=t;n&&n!==this;n=n.parentNode)if(n.__tfSlot?.owner===this)return!1;return!0}_subscribe=t=>(this._subs.add(t),()=>this._subs.delete(t));_snapshot=()=>this._version;_bump(){this._version++;for(let t of this._subs)t()}addEventListener(t,n,a){if(!n)return;super.addEventListener(t,n,a);let l=this._listeners.get(t);l||this._listeners.set(t,l=new Set);let i=l.size===0;l.add(n),i&&this._bumpTree(t)}removeEventListener(t,n,a){if(!n)return;super.removeEventListener(t,n,a);let l=this._listeners.get(t);l?.delete(n)&&l.size===0&&this._bumpTree(t)}_listens(t){let n=a=>{let l=a;return!!a._listeners.get(t)?.size||a.hasAttribute(`on${t}`)||typeof l[`on${t}`]=="function"||typeof l[`__${t}`]=="function"};if(n(this))return!0;for(let a=Ao(this);a;a=Ao(a))if(n(a))return!0;return!1}_bumpTree(t){this._def.byType.get(t)?.conditional&&this._bump();for(let n of this.querySelectorAll(e.selector))n instanceof e&&n._def.byType.get(t)?.conditional&&n._bump()}_slotView(t,n){let a=`${t}|${n?1:0}`;if(this._views.has(a))return this._views.get(a);let l=this._slots?.get(t),i;return l?.length&&(i=l.length===1&&!n?(0,Xe.createElement)(vm,{owner:this,nodes:l}):l.map((c,s)=>(0,Xe.createElement)(vm,{key:s,owner:this,nodes:[c]}))),this._views.set(a,i),i}_nodeView(t){if(t instanceof Node){let n=this._views.get(`node|${t.__tfKey??""}`);if(!n){let a=t.__tfKey??=`n${(++hm).toString(36)}`;n=(0,Xe.createElement)(vm,{key:a,owner:this,nodes:[t]}),this._views.set(`node|${a}`,n)}return n}return Array.isArray(t)?t.map(n=>this._nodeView(n)):t}_propValue(t){if(t.kind==="r"||t.kind==="R"){let a=this._slotView(t.name,t.kind==="R");if(a!==void 0)return a}if(t.kind==="K"&&this._slots){let a;for(let l of this._slots.keys())l.startsWith(`${t.name}:`)&&((a??={})[l.slice(t.name.length+1)]=this._slotView(l,!1));if(a)return{...this._values.get(t.name),...a}}if(t.kind==="f")return this._fns.get(t.name);let n=this._values.get(t.name);if(n!==void 0)return t.kind==="r"||t.kind==="R"?this._nodeView(n):n}_callback(t){let n=this._callbacks.get(t.prop);return n||(n=(...a)=>this._fire(t,a),this._callbacks.set(t.prop,n)),n}_fire(t,n){let a=this._fns.get(t.prop),l=a?a.apply(this,n):void 0,i=n[0];if(t.type==="click"&&zN(i)&&i.nativeEvent.type==="click")return l;let c=n.map(kN),s=t.arity>1?Array.from({length:Math.max(t.arity,c.length)},(o,u)=>c[u]):c.length?c[0]:null,r=new CustomEvent(t.type,{detail:s,bubbles:!0,composed:!0,cancelable:!0});return mm.add(r),this.dispatchEvent(r)&&this._after(t,c[0]),l}_after(t,n){let a=this._def,l=!1;for(let i of a.sync)i.event===t.prop&&this._values.get(i.prop)!==void 0&&(this._values.set(i.prop,i.from==="false"?!1:n),l=!0);l?this._bump():a.dismiss.has(t.prop)&&(this.hidden=!0)}_passes(t){return!t.conditional||this._fns.has(t.prop)||this._def.sync.some(n=>n.event===t.prop&&this._values.get(n.prop)!==void 0)?!0:this._listens(t.type)}_props(){let t=this._def,n={};for(let c of t.props){let s=this._propValue(c);s!==void 0&&(n[c.name]=s)}let a=this._slotView("children",!1);t.closeChildren?n.children=c=>(this._closeFn=c.close,a??null):a!==void 0&&(n.children=a);let l=this.getAttribute("class");l&&(n.className=l);let i=EN(this.getAttribute("style"));i&&(n.style=i);for(let c of t.events)this._passes(c)&&(n[c.prop]=this._callback(c));return n}_view(){if(this.hidden)return null;let t=this.constructor.component,n=this._props(),a=(0,Xe.createElement)(t,n);return this._def.dialog?(0,Xe.createElement)(l5,{onClose:n.onClose},a):a}};function LN(e,t){let n=[...e.props.filter(c=>c.kind!=="f").map(c=>c.attr),...e.events.map(c=>`on${c.type}`),"class","style","hidden"];class a extends Ca{static def=e;static component=t;static observedAttributes=[...new Set(n)]}let l=a.prototype,i=(c,s,r)=>{ON.has(c)||Object.defineProperty(l,c,{configurable:!0,enumerable:!0,get:s,set:r})};for(let c of e.props)i(c.name,function(){return c.kind==="f"?this._fns.get(c.name):this._values.get(c.name)},function(s){c.kind==="f"?typeof s=="function"?this._fns.set(c.name,s):this._fns.delete(c.name):s===void 0?this._values.delete(c.name):this._values.set(c.name,s),this._views.clear(),this._bump()});for(let c of e.events)i(c.prop,function(){return this._fns.get(c.prop)},function(s){typeof s=="function"?this._fns.set(c.prop,s):this._fns.delete(c.prop),this._bump()});return a}var Do=[{t:"tf-provider",c:"UIProvider",p:"kit:s theme:s density:s scope:s tokens:j surface:s motion:s"},{t:"tf-icon",c:"Icon",p:"name:s size:n label:s"},{t:"tf-range-slider",c:"RangeSlider",p:"label:r min:n max:n step:n value:j defaultValue:j unit:s inputs:b openEnd:b format:f hint:r",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-bar-list",c:"BarList",p:"items:j format:f label:s",e:"onPick:1?"},{t:"tf-status-select",c:"StatusSelect",p:"options:j value:s defaultValue:s size:s label:s width:n",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-tile-picker",c:"TilePicker",p:"options:j value:j defaultValue:j multiple:b min:n label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-live-feed",c:"LiveFeed",p:"items:j types:j paused:b maxHeight:n emptyText:s",e:"onPause:1"},{t:"tf-map-view",c:"MapView",p:"points:j bounds:j background:r bubbles:b selected:x? renderPopup:f legend:r controls:r height:x label:s surface:s",e:"onSelect:1"},{t:"tf-balance-card",c:"BalanceCard",p:"name:s sub:r logo:r icon:s tint:s balance:n currency:s perDay:n low:n spark:j status:s statusLabel:s topUpLabel:s action:r",e:"onTopUp:0?"},{t:"tf-service-monitor",c:"ServiceMonitor",p:"items:j label:s"},{t:"tf-run-history",c:"RunHistory",p:"items:j label:s"},{t:"tf-webhook-endpoint",c:"WebhookEndpoint",p:"url:s events:jl status:s statusLabel:s successRate:n enabled:b secret:r deliveries:j menu:jl defaultOpen:b",e:"onToggle:0? onRetry:1?"},{t:"tf-backup-list",c:"BackupList",p:"items:j footer:r label:s",e:"onDownload:1? onRestore:1?"},{t:"tf-block-list",c:"BlockList",p:"items:j addLabel:s removeLabel:s searchPlaceholder:s emptyText:s",e:"onAdd:0? onRemove:1?"},{t:"tf-review-card",c:"ReviewCard",p:"author:s verified:b product:s date:s rating:n title:s text:s state:s stateLabel:s highlight:jl reply:s replyLabel:s",e:"onPublish:0? onHide:0? onReply:1?"},{t:"tf-coupon-card",c:"CouponCard",p:"code:s kind:s value:n currency:s used:n limit:n until:s min:n revenue:n text:r status:s statusLabel:s menu:jl",e:"onCopy:0"},{t:"tf-locale-field",c:"LocaleField",p:"label:r locales:j value:j defaultValue:j source:s active:s multiline:b rows:n placeholder:s hint:r error:r",e:"onChange:1 onTranslate:2?",s:"onChange:value:detail"},{t:"tf-locale-switcher",c:"LocaleSwitcher",p:"languages:j language:s currencies:jl currency:s variant:s",e:"onLanguage:1 onCurrency:1"},{t:"tf-workspace-switcher",c:"WorkspaceSwitcher",p:"items:j value:s label:s footer:r variant:s width:n",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-export-dialog",c:"ExportDialog",p:"open:b inline:b title:s text:r count:n formats:jl format:s columns:j ranges:b range:jt note:r download:r doneText:s",e:"onClose:0 onExport:2 onDownload:0",s:"onClose:open:false",x:"onClose"},{t:"tf-two-factor-setup",c:"TwoFactorSetup",p:"qr:r secret:s codes:jl step:n scanText:s codesText:s",e:"onVerify:1? onDownload:0? onDone:0"},{t:"tf-color-field",c:"ColorField",p:"label:r value:s defaultValue:s against:s! hint:r",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-agent-card",c:"AgentCard",p:"name:s role:s tint:s status:s statusLabel:s model:s cost:s last:r",e:"onClick:0? onChat:0?"},{t:"tf-agent-details",c:"AgentDetails",p:"name:s role:s tint:s status:s statusLabel:s sections:j actions:R"},{t:"tf-chat-list",c:"ChatList",p:"groups:j selected:s filters:r searchPlaceholder:s",e:"onSelect:1 onSearch:1"},{t:"tf-chat-workspace",c:"ChatWorkspace",p:"list:r thread:r details:r"},{t:"tf-search-hits",c:"SearchHits",p:"items:j query:s emptyText:s",e:"onOpen:1"},{t:"tf-thinking-line",c:"ThinkingLine",p:"text:s"},{t:"tf-feedback-rating",c:"FeedbackRating",p:"value:s? label:s placeholder:s thanks:s askOnUp:b",e:"onRate:1 onSubmit:2"},{t:"tf-activity-feed",c:"ActivityFeed",p:"groups:j items:j"},{t:"tf-daily-briefing",c:"DailyBriefing",p:"title:s time:s tint:s summary:r attention:j suggestions:R attentionTitle:s suggestionsTitle:s"},{t:"tf-budget-stop",c:"BudgetStop",p:"spent:n budget:n title:s text:r paused:r running:r actionLabel:s",e:"onRaise:0?"},{t:"tf-memory-viewer",c:"MemoryViewer",p:"items:j",e:"onEdit:1? onDelete:1?"},{t:"tf-override-diff",c:"OverrideDiff",p:"title:s versions:r by:r before:s after:s discardLabel:s promoteLabel:s",e:"onDiscard:0? onPromote:0?"},{t:"tf-trigger-list",c:"TriggerList",p:"items:j",e:"onToggle:1? onRun:1?"},{t:"tf-schedule-calendar",c:"ScheduleCalendar",p:"events:j from:n to:n days:jl",e:"onOpen:1"},{t:"tf-org-chart",c:"OrgChart",p:"root:j"},{t:"tf-voice-mode",c:"VoiceMode",p:"name:s tint:s state:s stateLabel:s transcript:r muted:b",e:"onMute:0? onEnd:0?"},{t:"tf-mobile-tab-bar",c:"MobileTabBar",p:"items:j active:s label:s",e:"onPick:1"},{t:"tf-push-notification",c:"PushNotification",p:"app:s time:s title:s text:r actions:j"},{t:"tf-config-pr-summary",c:"ConfigPRSummary",p:"title:s meta:r status:s statusLabel:s summary:r items:j actions:R"},{t:"tf-module-registry",c:"ModuleRegistry",p:"items:j coreLabel:s",e:"onToggle:1"},{t:"tf-approval-card",c:"ApprovalCard",p:"title:r text:r agent:s project:s family:s familyLabel:s age:s escalation:r trace:r note:r heading:s options:j approveLabel:s decision:j compact:b state:s",e:"onDecide:2 onApprove:0 onDeny:0 onEdit:1"},{t:"tf-approval-inbox",c:"ApprovalInbox",p:"items:j selected:x emptyTitle:s emptyText:s label:s",e:"onSelect:1?"},{t:"tf-kbd",c:"Kbd",p:"keys:jl"},{t:"tf-key-value",c:"KeyValue",p:"items:j dense:b"},{t:"tf-spinner",c:"Spinner",p:"size:s label:s"},{t:"tf-collapsible",c:"Collapsible",p:"title:r meta:r defaultOpen:b open:b",e:"onOpenChange:1",s:"onOpenChange:open:detail"},{t:"tf-context-menu",c:"ContextMenu",p:"items:jl"},{t:"tf-split-pane",c:"SplitPane",p:"left:r right:r defaultSize:n min:n max:n storageKey:s"},{t:"tf-resizable-panels",c:"ResizablePanels",p:"panels:R defaultSizes:j min:n orientation:s storageKey:s labels:jl"},{t:"tf-tree-view",c:"TreeView",p:"items:j defaultOpen:jl selected:s label:s",e:"onSelect:1"},{t:"tf-inline-edit",c:"InlineEdit",p:"value:s options:jl mono:b type:s display:f align:s label:s",e:"onSave:1"},{t:"tf-bar-chart",c:"BarChart",p:"data:j tint:s height:n width:n barWidth:n format:f label:s"},{t:"tf-line-chart",c:"LineChart",p:"labels:jl series:j height:n width:n format:f label:s"},{t:"tf-sparkline",c:"Sparkline",p:"values:j tint:s width:n height:n label:s"},{t:"tf-donut",c:"Donut",p:"data:j center:s caption:s size:n stroke:n legend:b label:s"},{t:"tf-legend",c:"Legend",p:"items:j"},{t:"tf-stacked-bar-chart",c:"StackedBarChart",p:"labels:jl series:j height:n width:n barWidth:n format:f legend:b label:s"},{t:"tf-area-chart",c:"AreaChart",p:"labels:jl series:j stacked:b height:n width:n format:f legend:b label:s"},{t:"tf-heatmap",c:"Heatmap",p:"rows:jl cols:jl values:j colEvery:n caption:s format:f label:s"},{t:"tf-funnel",c:"Funnel",p:"steps:j tint:s format:f"},{t:"tf-gauge",c:"Gauge",p:"value:n max:n caption:s format:f tint:s thresholds:j size:n stroke:n showRange:b label:s"},{t:"tf-rich-text",c:"RichText",p:"text:s streaming:b"},{t:"tf-code-block",c:"CodeBlock",p:"code:s lang:s open:b"},{t:"tf-typing-dots",c:"TypingDots",p:"label:s"},{t:"tf-agent-mark",c:"AgentMark",p:"tint:s icon:s size:n live:b"},{t:"tf-chat-message",c:"ChatMessage",p:"role:s name:s time:s model:s text:s streaming:b tint:s sources:j attachments:j usage:s actions:b before:r after:r feedback:s?",e:"onRetry:0? onFeedback:1"},{t:"tf-tool-call",c:"ToolCall",p:"name:s icon:s status:s summary:r duration:s input:j output:j defaultOpen:b"},{t:"tf-reasoning",c:"Reasoning",p:"steps:jl text:r duration:s streaming:b defaultOpen:b"},{t:"tf-prompt-starters",c:"PromptStarters",p:"items:j",e:"onPick:1"},{t:"tf-model-picker",c:"ModelPicker",p:"models:j value:s side:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-composer",c:"Composer",p:"value:s busy:b placeholder:s label:s models:j model:s commands:j attachments:j hint:s left:r disabled:b",e:"onChange:1 onSend:2 onStop:0 onModel:1 onCommand:1? onAttach:1? onRemoveAttachment:1?",s:"onChange:value:detail"},{t:"tf-agent-status",c:"AgentStatus",p:"status:s step:s"},{t:"tf-run-trace",c:"RunTrace",p:"steps:j defaultOpen:n? footer:r"},{t:"tf-usage-meter",c:"UsageMeter",p:"used:n limit:n label:s caption:s format:f"},{t:"tf-product-art",c:"ProductArt",p:"kind:s tint:s size:n label:s"},{t:"tf-price",c:"Price",p:"value:n compareAt:n currency:s size:s showSave:b"},{t:"tf-rating",c:"Rating",p:"value:n count:n size:n"},{t:"tf-stock-badge",c:"StockBadge",p:"stock:n low:n compact:b"},{t:"tf-product-card",c:"ProductCard",p:"name:s meta:s art:s tint:s price:n compareAt:n rating:n reviews:n badge:s badgeTone:s stock:n wished:b added:b",e:"onWish:0? onAdd:0? onClick:0"},{t:"tf-variant-picker",c:"VariantPicker",p:"label:s type:s options:jl value:s defaultValue:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-cart-line",c:"CartLine",p:"name:s variant:s note:s art:s tint:s price:n qty:n",e:"onQty:1? onRemove:0"},{t:"tf-order-summary",c:"OrderSummary",p:"lines:j showLines:b discount:j shipping:n? freeShippingFrom:n vat:n title:s! action:r",e:"onCoupon:1?"},{t:"tf-checkout-steps",c:"CheckoutSteps",p:"steps:jl current:n",e:"onPick:1?"},{t:"tf-order-timeline",c:"OrderTimeline",p:"status:s times:j"},{t:"tf-plan-card",c:"PlanCard",p:"name:s text:s price:n? was:n per:s features:jl featured:b flag:s current:b cta:s",e:"onPick:0"},{t:"tf-count-up",c:"CountUp",p:"value:x duration:n delay:n"},{t:"tf-stat-tile",c:"StatTile",p:"value:r label:s tint:s delta:s delay:n"},{t:"tf-card",c:"Card",p:"title:s description:s meta:jl corner:r status:r actions:R tint:s eyebrow:r surface:s",e:"onClick:0?"},{t:"tf-event-card",c:"EventCard",p:"kind:s label:s date:s time:s tint:s icon:s actions:b"},{t:"tf-panel",c:"Panel",p:"side:b title:s subtitle:s action:r surface:s"},{t:"tf-page-header",c:"PageHeader",p:"crumbs:jl title:s subtitle:s actions:R"},{t:"tf-stagger",c:"Stagger",p:"as:s delay:n reveal:b"},{t:"tf-table",c:"Table",p:"columns:j rows:j animate:b"},{t:"tf-list-row",c:"ListRow",p:"avatar:s icon:s tint:s leading:r title:r subtitle:r meta:r trailing:r unread:b active:b",e:"onClick:0"},{t:"tf-timeline",c:"Timeline",p:"items:j delay:n"},{t:"tf-file-row",c:"FileRow",p:"name:s meta:s kind:s"},{t:"tf-kanban-column",c:"KanbanColumn",p:"title:s dot:s delay:n",e:"onAdd:0"},{t:"tf-progress",c:"Progress",p:"value:n tint:s label:s"},{t:"tf-progress-ring",c:"ProgressRing",p:"value:n tint:s size:n stroke:n caption:s label:s"},{t:"tf-filter-bar",c:"FilterBar",p:"filters:j value:j search:s query:s right:r",e:"onChange:1 onQuery:1",s:"onChange:value:detail"},{t:"tf-data-table",c:"DataTable",p:"columns:j rows:j rowKey:s selectable:b bulkActions:j renderExpanded:f stickyHeader:b maxHeight:x defaultSort:j toolbar:r columnToggle:b empty:r"},{t:"tf-log-view",c:"LogView",p:"lines:jl title:r right:r numbers:b follow:b maxHeight:n"},{t:"tf-code-viewer",c:"CodeViewer",p:"value:j lang:s"},{t:"tf-secret-field",c:"SecretField",p:"prefix:s last4:s value:s meta:r",e:"onReveal:0? onCopy:0? onRotate:0?"},{t:"tf-money-input",c:"MoneyInput",p:"label:s value:n? currency:s vat:s vatOptions:j showGross:b hint:r error:r defaultValue:n? required:b",e:"onChange:1 onVat:1",s:"onChange:value:detail"},{t:"tf-settings-layout",c:"SettingsLayout",p:"sections:j footer:r"},{t:"tf-shortcuts-overlay",c:"ShortcutsOverlay",p:"open:b title:s groups:j",e:"onClose:0",s:"onClose:open:false",x:"onClose"},{t:"tf-stat-cell",c:"StatCell",p:"label:r value:r delta:n deltaText:s compare:s invert:b spark:j icon:s iconTint:s tint:s"},{t:"tf-uptime-bar",c:"UptimeBar",p:"days:jl uptime:n caption:r"},{t:"tf-meter",c:"Meter",p:"label:r value:n? max:n text:r warn:n danger:n tone:s"},{t:"tf-skeleton",c:"Skeleton",p:"variant:s width:x height:x"},{t:"tf-menu",c:"Menu",p:"items:jl label:s autoFocus:b",e:"onClose:0?"},{t:"tf-modal",c:"Modal",p:"title:s text:s icon:s tint:s actions:R open:b",e:"onClose:0",s:"onClose:open:false",x:"onClose",dialog:1},{t:"tf-toast",c:"Toast",p:"icon:s tint:s action:s",e:"onAction:0"},{t:"tf-empty-state",c:"EmptyState",p:"title:s text:s icon:s tint:s action:r"},{t:"tf-alert",c:"Alert",p:"tone:s title:r icon:s action:r",e:"onDismiss:0?",x:"onDismiss"},{t:"tf-confirm-dialog",c:"ConfirmDialog",p:"open:b title:s text:s danger:b icon:s confirmLabel:s cancelLabel:s confirmText:s",e:"onConfirm:0 onCancel:0",s:"onCancel:open:false onConfirm:open:false"},{t:"tf-toaster",c:"Toaster",p:"position:s"},{t:"tf-form-field",c:"FormField",p:"name:s label:r required:b optional:b hint:r error:r success:r"},{t:"tf-text-field",c:"TextField",p:"type:s icon:s suffix:r value:s defaultValue:s placeholder:s disabled:b autoComplete:s name:s label:r required:b optional:b hint:r error:r success:r",e:"onChange:1 onBlur:1",s:"onChange:value:detail"},{t:"tf-radio-group",c:"RadioGroup",p:"label:s options:jl value:s defaultValue:s cards:b hint:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-segmented",c:"Segmented",p:"options:jl value:s defaultValue:s size:s block:b label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-combobox",c:"Combobox",p:"label:s options:jl value:j defaultValue:j multiple:b creatable:b placeholder:s hint:s error:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-tag-input",c:"TagInput",p:"label:s value:jl defaultValue:jl placeholder:s hint:s error:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-calendar",c:"Calendar",p:"range:b value:jt today:d min:d max:d month:d",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-date-picker",c:"DatePicker",p:"label:s range:b value:jt defaultValue:jt presets:b min:d max:d today:d placeholder:s hint:s error:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-number-input",c:"NumberInput",p:"label:s value:n defaultValue:n min:n max:n step:n unit:s hint:s error:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-slider",c:"Slider",p:"label:s min:n max:n step:n value:n defaultValue:n format:f marks:b hint:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-otp-input",c:"OtpInput",p:"length:n error:b label:s",e:"onComplete:1"},{t:"tf-file-drop",c:"FileDrop",p:"files:j title:s hint:s accept:s multiple:b",e:"onChange:1"},{t:"tf-button",c:"Button",p:"variant:s size:s icon:s iconRight:s disabled:b type:s asChild:b",e:"onClick:1"},{t:"tf-icon-button",c:"IconButton",p:"icon:s label:s variant:s size:s disabled:b asChild:b",e:"onClick:1"},{t:"tf-chip",c:"Chip",p:"selected:b icon:s count:n",e:"onClick:1"},{t:"tf-badge",c:"Badge",p:"tone:s dot:b live:b"},{t:"tf-tint-icon",c:"TintIcon",p:"icon:s tint:s label:s size:n"},{t:"tf-avatar",c:"Avatar",p:"name:s src:s size:n tint:s"},{t:"tf-avatar-stack",c:"AvatarStack",p:"names:jl max:n size:n"},{t:"tf-input",c:"Input",p:"type:s placeholder:s value:s defaultValue:s disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-select",c:"Select",p:"options:jl value:s defaultValue:s label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-textarea",c:"Textarea",p:"placeholder:s value:s defaultValue:s rows:n disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-search-field",c:"SearchField",p:"placeholder:s shortcut:s value:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-checkbox",c:"Checkbox",p:"name:s value:s required:b checked:b defaultChecked:b disabled:b label:s",e:"onChange:1",s:"onChange:checked:detail"},{t:"tf-switch",c:"Switch",p:"name:s checked:b defaultChecked:b spread:b disabled:b label:s",e:"onChange:1",s:"onChange:checked:detail"},{t:"tf-form",c:"Form",p:"rules:j errors:j",e:"onSubmit:1 onInvalid:1"},{t:"tf-select-menu",c:"SelectMenu",p:"options:jl value:s defaultValue:s placeholder:s disabled:b label:s hint:s error:s name:s required:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-account-switcher",c:"AccountSwitcher",p:"accounts:j value:s? unread:n allLabel:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-inbox-list",c:"InboxList",p:"items:j selected:x",e:"onOpen:1"},{t:"tf-mail-thread",c:"MailThread",p:"subject:s messages:j reply:r"},{t:"tf-signature-editor",c:"SignatureEditor",p:"value:j fields:j note:r extra:r defaultValue:j previewLabel:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-attachment-preview",c:"AttachmentPreview",p:"name:s meta:r facts:j found:r actions:r width:x inline:b",e:"onClose:0",x:"onClose"},{t:"tf-image-variants",c:"ImageVariants",p:"variants:j selected:x alt:s tint:s actions:r",e:"onSelect:1"},{t:"tf-gallery",c:"Gallery",p:"items:j start:n ratio:s thumbs:b fullscreen:b badge:r"},{t:"tf-before-after",c:"BeforeAfter",p:"before:j after:j start:n ratio:s beforeLabel:s afterLabel:s"},{t:"tf-tabs",c:"Tabs",p:"items:jl value:s defaultValue:s block:b panels:K label:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-breadcrumb",c:"Breadcrumb",p:"items:jl"},{t:"tf-pagination",c:"Pagination",p:"total:n page:n"},{t:"tf-menubar",c:"Menubar",p:"menus:j label:s"},{t:"tf-navigation-menu",c:"NavigationMenu",p:"items:j label:s"},{t:"tf-sidebar",c:"Sidebar",p:"groups:j current:s collapsed:b defaultCollapsed:b header:r footer:r label:s",e:"onPick:1 onCollapsedChange:1",s:"onCollapsedChange:collapsed:detail"},{t:"tf-connection-card",c:"ConnectionCard",p:"name:s icon:s logo:r text:r status:s statusLabel:s action:r"},{t:"tf-connection-banner",c:"ConnectionBanner",p:"state:s seconds:n text:r",e:"onRetry:0?"},{t:"tf-server-card",c:"ServerCard",p:"name:s provider:s address:s logo:r status:s statusLabel:s meters:j uptime:j foot:r"},{t:"tf-deploy-pipeline",c:"DeployPipeline",p:"stages:j"},{t:"tf-dns-record-table",c:"DnsRecordTable",p:"records:j rowMenu:f selectable:b bulkActions:j toolbar:r"},{t:"tf-domain-list",c:"DomainList",p:"items:j",e:"onOpen:1"},{t:"tf-mail-auth-status",c:"MailAuthStatus",p:"rows:j columns:jl",e:"onOpen:2"},{t:"tf-ledger-table",c:"LedgerTable",p:"rows:j categories:jl currency:s selectable:b bulkActions:j toolbar:r maxHeight:n columnToggle:b",e:"onEdit:2"},{t:"tf-pnl-statement",c:"PnLStatement",p:"columns:jl rows:j currency:s total:b label:s"},{t:"tf-receipt-suggestion",c:"ReceiptSuggestion",p:"file:s source:r fields:j suggestion:r confirmLabel:s discardLabel:s",e:"onConfirm:0? onDiscard:0?"},{t:"tf-popover",c:"Popover",p:"trigger:r open:b align:s side:s width:n flush:b block:b role:s",e:"onOpenChange:1",s:"onOpenChange:open:detail",close:1},{t:"tf-tooltip",c:"Tooltip",p:"label:r shortcut:s side:s defaultOpen:b"},{t:"tf-email-preview",c:"EmailPreview",p:"from:s fromName:s subject:s preheader:s html:s device:s checks:j",e:"onDevice:1"},{t:"tf-search-ad-preview",c:"SearchAdPreview",p:"name:s domain:s paths:jl headlines:jl descriptions:jl sitelinks:jl device:s sponsoredLabel:s",e:"onDevice:1"},{t:"tf-accordion",c:"Accordion",p:"items:j multiple:b value:jl defaultValue:jl variant:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-separator",c:"Separator",p:"orientation:s label:s"},{t:"tf-aspect-ratio",c:"AspectRatio",p:"ratio:n"},{t:"tf-label",c:"Label",p:"htmlFor:s required:b hint:r"},{t:"tf-toggle",c:"Toggle",p:"pressed:b defaultPressed:b icon:s label:s size:s disabled:b",e:"onChange:1",s:"onChange:pressed:detail"},{t:"tf-toggle-group",c:"ToggleGroup",p:"items:jl type:s value:jl defaultValue:jl label:s size:s",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-button-group",c:"ButtonGroup",p:"label:s orientation:s"},{t:"tf-scroll-area",c:"ScrollArea",p:"height:x maxHeight:x orientation:s label:s"},{t:"tf-hover-card",c:"HoverCard",p:"trigger:r side:s align:s openDelay:n closeDelay:n width:n"},{t:"tf-carousel",c:"Carousel",p:"slides:R label:s perView:n loop:b dots:b index:n defaultIndex:n",e:"onChange:1",s:"onChange:index:detail"},{t:"tf-listing-card",c:"ListingCard",p:"listing:j layout:s selected:b statusOptions:j",e:"onSelect:1? onWish:1? onStatus:2 onOpen:1?"},{t:"tf-results-toolbar",c:"ResultsToolbar",p:"title:s total:n meta:s selected:n bulkActions:j sortOptions:j sort:s views:jl view:s",e:"onSelectAll:1? onSort:1 onView:1"},{t:"tf-saved-search",c:"SavedSearch",p:"name:s criteria:R lastRun:s frequency:s newCount:n enabled:b openLabel:s icon:s tint:s",e:"onToggle:0? onEdit:0? onOpen:0?"},{t:"tf-valuation-card",c:"ValuationCard",p:"value:n low:n high:n asking:n perSqm:n compare:s currency:s confidence:n confidenceLabel:s facts:j note:r title:s action:r"},{t:"tf-energy-class",c:"EnergyClass",p:"value:s kwh:n kind:s scale:jl"},{t:"tf-rich-text-editor",c:"RichTextEditor",p:"label:r defaultValue:s value:s placeholder:s variables:j maxLength:n minHeight:n footer:r hint:r error:r disabled:b",e:"onChange:1",s:"onChange:value:detail"},{t:"tf-top-bar",c:"TopBar",p:"brand:s tag:s items:j active:s user:j extra:r userOpen:b",e:"onNavigate:1 onUser:0"},{t:"tf-side-rail",c:"SideRail",p:"top:j bottom:j"},{t:"tf-dock",c:"Dock",p:"items:j label:s surface:s"},{t:"tf-floating-layout",c:"FloatingLayout",p:"background:r top:r start:r end:r bottom:r height:x surface:s label:s"},{t:"tf-ambient",c:"Ambient",p:"colors:jl src:s video:b animate:b fixed:b"},{t:"tf-app-shell",c:"AppShell",p:"active:s brand:s tag:s nav:j user:j topExtra:r sheetStyle:j contentKey:x side:r dock:b dockItems:j railTop:j railBottom:j",e:"onNavigate:1"},{t:"tf-chat-launcher",c:"ChatLauncher",p:"title:s context:r tint:s open:b unread:n headerAction:r composer:r inline:b",e:"onOpenChange:1",s:"onOpenChange:open:detail"},{t:"tf-cookie-consent",c:"CookieConsent",p:"title:s text:r policy:r categories:j open:b inline:b",e:"onSave:1"},{t:"tf-announcement-bar",c:"AnnouncementBar",p:"tint:s icon:s! action:r",e:"onDismiss:0?",x:"onDismiss"},{t:"tf-status-shape",c:"StatusShape",p:"status:s"},{t:"tf-status-indicator",c:"StatusIndicator",p:"status:s label:r size:s"},{t:"tf-status-screen",c:"StatusScreen",p:"code:s title:s text:s icon:s tint:s extra:r actions:R reference:s",e:"onHome:0 onContact:0"},{t:"tf-auth-card",c:"AuthCard",p:"title:s text:s icon:s tint:s brand:s foot:r"},{t:"tf-sub-nav",c:"SubNav",p:"eyebrow:s action:j items:j current:s",e:"onPick:1"},{t:"tf-drawer",c:"Drawer",p:"title:s subtitle:r avatar:s width:x inline:b open:b side:s",e:"onClose:0",s:"onClose:open:false",x:"onClose"},{t:"tf-command-palette",c:"CommandPalette",p:"items:j placeholder:s inline:b loading:b empty:r open:b",e:"onClose:0 onQueryChange:1",s:"onClose:open:false",x:"onClose"},{t:"tf-notification-list",c:"NotificationList",p:"items:j",e:"onOpen:1 onReadAll:0"},{t:"tf-flow",c:"Flow",p:"steps:j active:n? waiting:b tools:f",e:"onApprove:0? onReject:0?"},{t:"tf-file-thumb",c:"FileThumb",p:"kind:s title:s big:b entries:jl"},{t:"tf-file-card",c:"FileCard",p:"name:s kind:s size:s meta:s shared:b",e:"onClick:0"},{t:"tf-wizard",c:"Wizard",p:"steps:j current:n done:j footer:r brand:s label:s",e:"onPick:1"},{t:"tf-permission-matrix",c:"PermissionMatrix",p:"roles:j areas:jl",e:"onChange:3"},{t:"tf-invoice-preview",c:"InvoicePreview",p:"number:x from:s to:s issued:s due:s lines:j note:s kind:s brand:s format:f"},{t:"tf-transaction-row",c:"TransactionRow",p:"text:s date:s amount:n matched:b matchRef:s hint:s",e:"onMatch:0"}];var XE="0.2.1",KE=Object.freeze(Object.fromEntries(Do.map(e=>[e.t,e.c]))),BN=Do.map(e=>e.t),HN=!1;function i5(){if(HN)return;HN=!0;let e=BN.join(","),t=`:where(${e},tf-root){display:contents}:where(${e})[hidden]{display:none}`;try{let n=new CSSStyleSheet;n.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,n]}catch{let n=document.createElement("style");n.dataset.tfElements="",n.textContent=t,document.head.prepend(n)}}function c5(){if(typeof window>"u"||typeof customElements>"u")return;Ca.selector=BN.join(","),i5();let e=hu;for(let t of Do){if(customElements.get(t.t))continue;let n=e[t.c];typeof n=="function"&&customElements.define(t.t,LN(AN(t),n))}}c5();export{KE as ELEMENTS,XE as VERSION,c5 as defineElements,Sa as formatDate,he as formatMoney,F as formatNumber,ea as formatPercent,yt as toast};
|
|
31
31
|
/*! Bundled license information:
|
|
32
32
|
|
|
33
33
|
react/cjs/react-jsx-runtime.production.js:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twentyfirstmedia/elements",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Every Twentyfirst UI component as a custom element: <tf-button>, <tf-data-table> … for plain HTML, Vue, Svelte, Angular, Astro and server templates.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Twentyfirst Media (https://twentyfirst.media)",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dist"
|
|
55
55
|
],
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@twentyfirstmedia/ui-core": "0.2.
|
|
57
|
+
"@twentyfirstmedia/ui-core": "0.2.1",
|
|
58
58
|
"@types/node": "26.6.6",
|
|
59
59
|
"@types/react": "19.3.0",
|
|
60
60
|
"@types/react-dom": "19.3.0",
|