3 lines
39 KiB
JavaScript
3 lines
39 KiB
JavaScript
import{$n as e,A as t,B as n,Bn as r,Cn as i,E as a,En as o,Fn as s,G as c,Gn as l,Gt as u,Hn as d,Ht as f,In as p,Jn as ee,Kn as m,Ln as te,M as h,Mn as g,Nn as ne,On as _,Ot as v,Pn as y,Qn as b,Rn as x,U as S,Un as C,V as re,Vn as w,Wn as ie,Xn as ae,Xt as oe,Yn as T,Z as se,Zn as E,_t as ce,a as le,an as ue,cn as de,ct as fe,d as pe,dt as me,er as he,g as ge,gn as _e,gt as ve,ht as ye,i as be,it as xe,jn as D,jt as Se,kn as Ce,l as we,n as Te,o as Ee,or as De,pn as O,qn as k,r as Oe,rt as ke,tr as Ae,v as je,w as Me,wn as Ne,wt as Pe,x as Fe,xt as Ie,y as Le,yn as Re,zn as ze}from"./PageHeader.js";var Be=void 0,Ve=typeof window<`u`&&window.trustedTypes;if(Ve)try{Be=Ve.createPolicy(`vue`,{createHTML:e=>e})}catch{}var He=Be?e=>Be.createHTML(e):e=>e,Ue=`http://www.w3.org/2000/svg`,We=`http://www.w3.org/1998/Math/MathML`,A=typeof document<`u`?document:null,Ge=A&&A.createElement(`template`),Ke={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?A.createElementNS(Ue,e):t===`mathml`?A.createElementNS(We,e):n?A.createElement(e,{is:n}):A.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>A.createTextNode(e),createComment:e=>A.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>A.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{Ge.innerHTML=He(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Ge.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},j=`transition`,M=`animation`,N=Symbol(`_vtc`),qe={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Je=p({},le,qe),Ye=(e=>(e.displayName=`Transition`,e.props=Je,e))((e,{slots:t})=>S(be,Ze(e),t)),P=(e,t=[])=>{w(e)?e.forEach(e=>e(...t)):e&&e(...t)},Xe=e=>e?w(e)?e.some(e=>e.length>1):e.length>1:!1;function Ze(e){let t={};for(let n in e)n in qe||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:ee=`${n}-leave-to`}=e,m=Qe(i),te=m&&m[0],h=m&&m[1],{onBeforeEnter:g,onEnter:ne,onEnterCancelled:_,onLeave:v,onLeaveCancelled:y,onBeforeAppear:b=g,onAppear:x=ne,onAppearCancelled:S=_}=t,C=(e,t,n,r)=>{e._enterCancelled=r,I(e,t?u:s),I(e,t?l:o),n&&n()},re=(e,t)=>{e._isLeaving=!1,I(e,d),I(e,ee),I(e,f),t&&t()},w=e=>(t,n)=>{let i=e?x:ne,o=()=>C(t,e,n);P(i,[t,o]),et(()=>{I(t,e?c:a),F(t,e?u:s),Xe(i)||nt(t,r,te,o)})};return p(t,{onBeforeEnter(e){P(g,[e]),F(e,a),F(e,o)},onBeforeAppear(e){P(b,[e]),F(e,c),F(e,l)},onEnter:w(!1),onAppear:w(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>re(e,t);F(e,d),e._enterCancelled?(F(e,f),ot(e)):(ot(e),F(e,f)),et(()=>{e._isLeaving&&(I(e,d),F(e,ee),Xe(v)||nt(e,r,h,n))}),P(v,[e,n])},onEnterCancelled(e){C(e,!1,void 0,!0),P(_,[e])},onAppearCancelled(e){C(e,!0,void 0,!0),P(S,[e])},onLeaveCancelled(e){re(e),P(y,[e])}})}function Qe(e){if(e==null)return null;if(ie(e))return[$e(e.enter),$e(e.leave)];{let t=$e(e);return[t,t]}}function $e(e){return De(e)}function F(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[N]||(e[N]=new Set)).add(t)}function I(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[N];n&&(n.delete(t),n.size||(e[N]=void 0))}function et(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var tt=0;function nt(e,t,n,r){let i=e._endId=++tt,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=rt(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},s+1),e.addEventListener(l,f)}function rt(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||``).split(`, `),i=r(`${j}Delay`),a=r(`${j}Duration`),o=it(i,a),s=r(`${M}Delay`),c=r(`${M}Duration`),l=it(s,c),u=null,d=0,f=0;t===j?o>0&&(u=j,d=o,f=a.length):t===M?l>0&&(u=M,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?j:M:null,f=u?u===j?a.length:c.length:0);let p=u===j&&/\b(?:transform|all)(?:,|$)/.test(r(`${j}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function it(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>at(t)+at(e[n])))}function at(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function ot(e){return(e?e.ownerDocument:document).body.offsetHeight}function st(e,t,n){let r=e[N];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var L=Symbol(`_vod`),ct=Symbol(`_vsh`),lt={name:`show`,beforeMount(e,{value:t},{transition:n}){e[L]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):R(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),R(e,!0),r.enter(e)):r.leave(e,()=>{R(e,!1)}):R(e,t))},beforeUnmount(e,{value:t}){R(e,t)}};function R(e,t){e.style.display=t?e[L]:`none`,e[ct]=!t}function ut(){lt.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}var dt=Symbol(``);function ft(e){let t=n();if(!t)return;let r=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>z(e,n))},i=()=>{let n=e(t.proxy);t.ce?z(t.ce,n):pt(t.subTree,n),r(n)};fe(()=>{Ie(i)}),me(()=>{u(i,ne,{flush:`post`});let e=new MutationObserver(i);e.observe(t.subTree.el.parentNode,{childList:!0}),ye(()=>e.disconnect())})}function pt(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{pt(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)z(e.el,t);else if(e.type===we)e.children.forEach(e=>pt(e,t));else if(e.type===pe){let{el:n,anchor:r}=e;for(;n&&(z(n,t),n!==r);)n=n.nextSibling}}function z(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t){let i=Ae(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[dt]=r}}var mt=/(?:^|;)\s*display\s*:/;function ht(e,t,n){let r=e.style,i=T(n),a=!1;if(n&&!i){if(t){if(T(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??V(r,t,``)}else for(let e in t)n[e]??V(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?V(r,i,``):yt(e,i,!T(t)&&t?t[i]:void 0,o)||V(r,i,o)}}else if(i){if(t!==n){let e=r[dt];e&&(n+=`;`+e),r.cssText=n,a=mt.test(n)}}else t&&e.removeAttribute(`style`);L in e&&(e[L]=a?r.display:``,e[ct]&&(r.display=`none`))}var B=/\s*!important$/;function V(e,t,n){if(w(n))n.forEach(n=>V(e,t,n));else if(n??=``,t.startsWith(`--`))B.test(n)?e.setProperty(t,n.replace(B,``),`important`):e.setProperty(t,n);else{let r=vt(e,t);B.test(n)?e.setProperty(x(r),n.replace(B,``),`important`):e[r]=n}}var gt=[`Webkit`,`Moz`,`ms`],_t={};function vt(e,t){let n=_t[t];if(n)return n;let r=y(t);if(r!==`filter`&&r in e)return _t[t]=r;r=s(r);for(let n=0;n<gt.length;n++){let i=gt[n]+r;if(i in e)return _t[t]=i}return t}function yt(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&T(r)&&n===r}var bt=`http://www.w3.org/1999/xlink`;function xt(e,t,n,r,i,a=ee(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(bt,t.slice(6,t.length)):e.setAttributeNS(bt,t,n):n==null||a&&!ze(n)?e.removeAttribute(t):e.setAttribute(t,a?``:ae(n)?String(n):n)}function St(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?He(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=ze(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function H(e,t,n,r){e.addEventListener(t,n,r)}function Ct(e,t,n,r){e.removeEventListener(t,n,r)}var wt=Symbol(`_vei`);function Tt(e,t,n,r,i=null){let a=e[wt]||(e[wt]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Ot(t);r?H(e,n,a[t]=Mt(r,i),s):o&&(Ct(e,n,o,s),a[t]=void 0)}}var Et=/(Once|Passive|Capture)$/,Dt=/^on:?(?:Once|Passive|Capture)$/;function Ot(e){let t,n;for(;(n=e.match(Et))&&!Dt.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):x(e.slice(2)),t]}var kt=0,At=Promise.resolve(),jt=()=>kt||=(At.then(()=>kt=0),Date.now());function Mt(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(w(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&ge(e,t,5,a)}}else ge(r,t,5,[e])};return n.value=e,n.attached=jt(),n}var Nt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Pt=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?st(e,r,o):t===`style`?ht(e,n,r):l(t)?C(t)||Tt(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):Ft(e,t,r,o))?(St(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&xt(e,t,r,o,a,t!==`value`)):e._isVueCE&&(It(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!T(r)))?St(e,y(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),xt(e,t,r,o))};function Ft(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Nt(t)&&d(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Nt(t)&&T(n)?!1:t in e}function It(e,t){let n=e._def.props;if(!n)return!1;let r=y(t);return Array.isArray(n)?n.some(e=>y(e)===r):Object.keys(n).some(e=>y(e)===r)}var Lt={};function Rt(e,t,n){let r=h(e,t);m(r)&&(r=p({},r,t));class i extends Vt{constructor(e){super(r,e,n)}}return i.def=r,i}var zt=((e,t)=>Rt(e,t,En)),Bt=typeof HTMLElement<`u`?HTMLElement:class{},Vt=class e extends Bt{constructor(e,t={},n=Tn){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Tn?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(p({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{if(this._pendingResolve=void 0,this.isConnected)return this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,xe(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return this._pendingResolve;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!w(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=De(this._props[e])),(i||=Object.create(null))[y(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;if(t)return this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}),this._pendingResolve;e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)te(this,e)||Object.defineProperty(this,e,{get:()=>D(t[e])})}_resolveProps(e){let{props:t}=e,n=w(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(y))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):Lt,r=y(e);t&&this._numberProps&&this._numberProps[r]&&(n=De(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===Lt?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(x(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(x(e),t+``):t||this.removeAttribute(x(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),Cn(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let n=t(this._def,p(e,this._props));return this._instance||(n.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,m(t[0])?p({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),x(e)!==e&&t(x(e),n)},this._setParent()}),n}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){let e=this._slots={},t;for(;t=this.firstChild;){let n=t.nodeType===1&&t.getAttribute(`slot`)||`default`;(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){let e=this._getSlots(),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let r=e[n],i=r.getAttribute(`name`)||`default`,a=this._slots[i],o=r.parentNode;if(a)for(let e of a){if(t&&e.nodeType===1){let n=t+`-s`,r=document.createTreeWalker(e,1);e.setAttribute(n,``);let i;for(;i=r.nextNode();)i.setAttribute(n,``)}o.insertBefore(e,r)}else for(;r.firstChild;)o.insertBefore(r.firstChild,r);o.removeChild(r)}}_getSlots(){let e=[this];this._teleportTargets&&e.push(...this._teleportTargets);let t=new Set;for(let n of e){let e=n.querySelectorAll(`slot`);for(let n=0;n<e.length;n++)t.add(e[n])}return Array.from(t)}_injectChildStyle(e,t){this._applyStyles(e.styles,e,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(e){}};function Ht(e){let t=n();return t&&t.ce||null}function Ut(){let e=Ht();return e&&e.shadowRoot}function Wt(e=`$style`){{let t=n();if(!t)return g;let r=t.type.__cssModules;return r&&r[e]||g}}var Gt=new WeakMap,Kt=new WeakMap,U=Symbol(`_moveCb`),qt=Symbol(`_enterCb`),Jt=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:p({},Je,{tag:String,moveClass:String}),setup(e,{slots:r}){let i=n(),a=f(),s,c;return ve(()=>{if(!s.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!$t(s[0].el,i.vnode.el,t)){s=[];return}s.forEach(Yt),s.forEach(Xt);let n=s.filter(Zt);ot(i.vnode.el),n.forEach(e=>{let n=e.el,r=n.style;F(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[U]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[U]=null,I(n,t))};n.addEventListener(`transitionend`,i)}),s=[]}),()=>{let n=o(e),l=Ze(n),u=n.tag||we;if(s=[],c)for(let e=0;e<c.length;e++){let t=c[e];t.el&&t.el instanceof Element&&!t.el[ct]&&(s.push(t),Se(t,v(t,l,a,i)),Gt.set(t,Qt(t.el)))}c=r.default?re(r.default()):[];for(let e=0;e<c.length;e++){let t=c[e];t.key!=null&&Se(t,v(t,l,a,i))}return t(u,null,c)}}});function Yt(e){let t=e.el;t[U]&&t[U](),t[qt]&&t[qt]()}function Xt(e){Kt.set(e,Qt(e.el))}function Zt(e){let t=Gt.get(e),n=Kt.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){let t=e.el,n=t.style,a=t.getBoundingClientRect(),o=1,s=1;return t.offsetWidth&&(o=a.width/t.offsetWidth),t.offsetHeight&&(s=a.height/t.offsetHeight),(!Number.isFinite(o)||o===0)&&(o=1),(!Number.isFinite(s)||s===0)&&(s=1),Math.abs(o-1)<.01&&(o=1),Math.abs(s-1)<.01&&(s=1),n.transform=n.webkitTransform=`translate(${r/o}px,${i/s}px)`,n.transitionDuration=`0s`,e}}function Qt(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function $t(e,t,n){let r=e.cloneNode(),i=e[N];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=rt(r);return a.removeChild(r),o}var W=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return w(t)?e=>r(t,e):t};function en(e){e.target.composing=!0}function tn(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var G=Symbol(`_assign`),K=Symbol(`_initialValue`);function nn(t,n,r){return n&&(t=t.trim()),r&&(t=e(t)),t}var q={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[K]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[K]=e.defaultValue.replace(/\r\n?/g,`
|
|
`))),e[G]=W(i);let a=r||i.props&&i.props.type===`number`;H(e,t?`change`:`input`,t=>{t.target.composing||e[G](nn(e.value,n,a))}),(n||a)&&H(e,`change`,()=>{e.value=nn(e.value,n,a)}),t||(H(e,`compositionstart`,en),H(e,`compositionend`,tn),H(e,`change`,tn))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[K];delete e[K],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[G](nn(e.value,n,r)):e.value=i},beforeUpdate(t,{value:n,oldValue:r,modifiers:{lazy:i,trim:a,number:o}},s){if(t[G]=W(s),t.composing)return;let c=(o||t.type===`number`)&&!/^0\d/.test(t.value)?e(t.value):t.value,l=n??``;if(c===l)return;let u=t.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===t&&t.type!==`range`&&(i&&n===r||a&&t.value.trim()===l)||(t.value=l)}},rn={deep:!0,created(e,t,n){e[G]=W(n),H(e,`change`,()=>{let t=e._modelValue,n=J(e),r=e.checked,i=e[G];if(w(t)){let e=b(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(k(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(un(e,r))})},mounted:an,beforeUpdate(e,t,n){e[G]=W(n),an(e,t,n)}};function an(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(w(t))i=b(t,r.props.value)>-1;else if(k(t))i=t.has(r.props.value);else{if(t===n)return;i=E(t,un(e,!0))}e.checked!==i&&(e.checked=i)}var on={created(e,{value:t},n){e.checked=E(t,n.props.value),e[G]=W(n),H(e,`change`,()=>{e[G](J(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[G]=W(r),t!==n&&(e.checked=E(t,r.props.value))}},sn={deep:!0,created(t,{value:n,modifiers:{number:r}},i){t._modelValue=n,H(t,`change`,()=>{let n=Array.prototype.filter.call(t.options,e=>e.selected).map(t=>r?e(J(t)):J(t)),i=t.multiple,a=i?k(t._modelValue)?new Set(n):n:n[0],o=t._pendingValue=[i,i?w(a)?n.slice():n:a];try{t[G](a)}finally{xe(()=>{t._pendingValue===o&&(t._pendingValue=void 0)})}}),t[G]=W(i)},mounted(e,{value:t}){ln(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[G]=W(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!cn(t,n[1],n[0]))&&ln(e,t)}};function cn(e,t,n){if(!n||w(e))return E(e,t);if(k(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function ln(e,t){let n=e.multiple,r=w(t);if(!n||r||k(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=J(a);if(n){if(r){let e=typeof o;a.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(o)):b(t,o)>-1}else a.selected=t.has(o)}else if(E(J(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function J(e){return`_value`in e?e._value:e.value}function un(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var dn={created(e,t,n){Y(e,t,n,null,`created`)},mounted(e,t,n){Y(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){Y(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){Y(e,t,n,r,`updated`)}};function fn(e,t){switch(e){case`SELECT`:return sn;case`TEXTAREA`:return q;default:switch(t){case`checkbox`:return rn;case`radio`:return on;default:return q}}}function Y(e,t,n,r,i){let a=fn(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function pn(){q.getSSRProps=({value:e})=>({value:e}),on.getSSRProps=({value:e},t)=>{if(t.props&&E(t.props.value,e))return{checked:!0}},rn.getSSRProps=({value:e},t)=>{if(w(e)){if(t.props&&b(e,t.props.value)>-1)return{checked:!0}}else if(k(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},dn.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=fn(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var mn=[`ctrl`,`shift`,`alt`,`meta`],hn={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>mn.some(n=>e[`${n}Key`]&&!t.includes(n))},gn=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=hn[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},_n={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},vn=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=x(n.key);if(t.some(e=>e===r||_n[e]===r))return e(n)}))},yn=p({patchProp:Pt},Ke),X,bn=!1;function xn(){return X||=a(yn)}function Sn(){return X=bn?X:Me(yn),bn=!0,X}var Cn=((...e)=>{xn().render(...e)}),wn=((...e)=>{Sn().hydrate(...e)}),Tn=((...e)=>{let t=xn().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=On(e);if(!r)return;let i=t._component;!d(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Dn(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),En=((...e)=>{let t=Sn().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=On(e);if(t)return n(t,!0,Dn(t))},t});function Dn(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function On(e){return T(e)?document.querySelector(e):e}var kn=!1,An=()=>{kn||(kn=!0,pn(),ut())};function jn(e){return e?e.flatMap(e=>e.type===we?jn(e.children):[e]):[]}var Mn=h({name:`PrimitiveSlot`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=jn(n.default()),r=e.findIndex(e=>e.type!==Ee);if(r===-1)return e;let i=e[r];delete i.props?.ref;let a=i.props?ke(t,i.props):t,o=je({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),Nn=[`area`,`img`,`input`],Pn=h({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&Nn.includes(r)?()=>S(r,t):r===`template`?()=>S(Mn,t,{default:n.default}):()=>S(e.as,t,{default:n.default})}}),Fn=h({__name:`Button`,props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:`button`}},setup(e){let t=e;return(n,r)=>(ce(),Fe(D(Pn),{"data-slot":`button`,"data-variant":e.variant,"data-size":e.size,as:e.as,"as-child":e.asChild,class:he(D(Te)(D(In)({variant:e.variant,size:e.size}),t.class))},{default:oe(()=>[Pe(n.$slots,`default`)]),_:3},8,[`data-variant`,`data-size`,`as`,`as-child`,`class`]))}}),In=Oe(`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*=size-])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground`,destructive:`bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30`,link:`text-primary underline-offset-4 hover:underline`,attention:`border-warn bg-warn-soft font-medium text-warn hover:bg-warn-soft/80`},size:{default:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*=size-])]:size-3`,sm:`h-8 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*=size-])]:size-3.5`,lg:`h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-9`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*=size-])]:size-3`,"icon-sm":`size-8 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function Ln(e,t,n={}){let r,i,a,o=!0,s=()=>{o=!0,a()};u(e,s,{flush:`sync`,...n});let c=typeof t==`function`?t:t.get,l=typeof t==`function`?void 0:t.set,d=ue((e,t)=>(i=e,a=t,{get(){return o&&=(r=c(r),!1),i(),r},set(e){l?.(e)}}));return d.trigger=s,d}function Rn(e,t){return de()?(_e(e,t),!0):!1}var zn=new WeakMap,Bn=(...e)=>{let t=e[0],r=n()?.proxy??de();if(r==null&&!c())throw Error(`injectLocal must be called in setup`);return r&&zn.has(r)&&t in zn.get(r)?zn.get(r)[t]:se(...e)},Z=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Vn=e=>e!==void 0,Hn=Object.prototype.toString,Un=e=>Hn.call(e)===`[object Object]`;function Wn(e,t=!1,n=`Timeout`){return new Promise((r,i)=>{t?setTimeout(i,e,n):setTimeout(r,e)})}function Gn(e){return e}function Kn(e,t){if(typeof e==`number`)return e+t;let n=e.match(/^-?\d+\.?\d*/)?.[0]||``,r=e.slice(n.length),i=Number.parseFloat(n)+t;return Number.isNaN(i)?e:i+r}function qn(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function Jn(e){return Array.isArray(e)?e:[e]}function Yn(e){return e||n()}function Xn(e){if(!O(e))return Re(e);let t=new Proxy({},{get(t,n,r){return D(Reflect.get(e.value,n,r))},set(t,n,r){return O(e.value[n])&&!O(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Re(t)}function Zn(e){return Xn(Le(e))}function Qn(e,...t){let n=t.flat(),r=n[0];return Zn(()=>Object.fromEntries(typeof r==`function`?Object.entries(_(e)).filter(([e,t])=>!r(Ce(t),e)):Object.entries(_(e)).filter(e=>!n.includes(e[0]))))}function $n(e,t=!0,n){Yn(n)?me(e,n):t?e():xe(e)}function er(e,t=1e3,n={}){let{immediate:r=!0,immediateCallback:a=!1}=n,o=null,s=Ne(!1);function c(){o&&=(clearInterval(o),null)}function l(){s.value=!1,c()}function d(){let n=Ce(t);n<=0||(s.value=!0,a&&e(),c(),s.value&&(o=setInterval(e,n)))}return r&&Z&&d(),(O(t)||typeof t==`function`)&&Rn(u(t,()=>{s.value&&Z&&d()})),Rn(l),{isActive:i(s),pause:l,resume:d}}function tr(e,t,n){return u(e,t,{...n,immediate:!0})}function nr(e){return e===0?`reconnecting`:e===1?`live`:`unavailable`}function rr(e){return Math.min(1e3*2**e,3e4)}function ir(e,t){let n=new URLSearchParams;return e&&n.set(`since`,e),t&&n.set(`topics`,`logs`),`/api/stream${n.size?`?${n}`:``}`}function ar(e=globalThis.crypto){if(typeof e?.randomUUID==`function`)return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues==`function`)e.getRandomValues(t);else for(let e=0;e<t.length;e+=1)t[e]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,e=>e.toString(16).padStart(2,`0`));return`${n.slice(0,4).join(``)}-${n.slice(4,6).join(``)}-${n.slice(6,8).join(``)}-${n.slice(8,10).join(``)}-${n.slice(10).join(``)}`}var or=15e3;function Q(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e||{}))r!==``&&r!=null&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}async function sr(e){try{let t=(await e.text()).trim();if(t)return t.split(`
|
|
`)[0].slice(0,200)}catch{}return`${e.status} ${e.statusText}`}var cr;function lr(e){cr=e}var ur=class extends Error{status;constructor(e,t){super(e),this.name=`ApiError`,this.status=t}};function dr(e){let t=e instanceof ur?e.status:void 0,n=e instanceof Error&&e.message?e.message:`Action failed`;return t===401?{kind:`session-expired`,message:n}:t!==void 0&&t>=400&&t<500?{kind:`refused`,message:n}:{kind:`broken`,message:n}}async function fr(e,t){let n=await fetch(e,t);if(cr?.(n.status===401),!n.ok)throw new ur(await sr(n),n.status);return n}async function $(e,t={}){let{method:n=`GET`,body:r,timeoutMs:i=or,parse:a=!0}=t,o={Accept:`application/json`},s={method:n,headers:o,signal:AbortSignal.timeout(i)};n!==`GET`&&(o[`Content-Type`]=`application/json`,o[`X-Archie-CSRF`]=`1`),r!==void 0&&(s.body=JSON.stringify(r));let c=await fr(e,s);return a?await c.json():void 0}var pr={recoveryCode:()=>$(`/api/account/recovery`,{method:`POST`,body:{}}),recoverAccount:(e,t,n)=>$(`/api/auth/recover`,{method:`POST`,body:{email:e,code:t,password:n},parse:!1}),authStatus:()=>$(`/api/auth/status`),setupAccount:e=>$(`/api/auth/setup`,{method:`POST`,body:e}),signIn:(e,t)=>$(`/api/auth/login`,{method:`POST`,body:{email:e,password:t}}),signOut:()=>$(`/api/auth/logout`,{method:`POST`,body:{},parse:!1}),createAccount:e=>$(`/api/accounts`,{method:`POST`,body:e}),changePassword:(e,t)=>$(`/api/account/password`,{method:`POST`,body:{current_password:e,new_password:t},parse:!1}),authentication:()=>$(`/api/authentication`),saveAuthentication:e=>$(`/api/authentication`,{method:`PUT`,body:e,parse:!1}),tokens:()=>$(`/api/tokens`),createToken:()=>$(`/api/tokens`,{method:`POST`,body:{}}),revokeToken:e=>$(`/api/tokens/${encodeURIComponent(e)}`,{method:`DELETE`,body:{},parse:!1}),passkeys:()=>$(`/api/account/passkeys`),deletePasskey:e=>$(`/api/account/passkeys/${encodeURIComponent(e)}`,{method:`DELETE`,body:{},parse:!1}),beginPasskey:e=>$(e?`/api/account/passkeys/begin`:`/api/auth/passkey/begin`,{method:`POST`,body:{}}),finishPasskey:(e,t,n)=>$(e?`/api/account/passkeys/finish`:`/api/auth/passkey/finish`,{method:`POST`,body:{credential:t,name:n}}),secretEngines:()=>$(`/api/secret-engines`),checkSecret:e=>$(`/api/secret-references/check`,{method:`POST`,body:e}),health:()=>$(`/health/detailed`),services:()=>$(`/api/services`),policies:()=>$(`/api/access/policies`),putPolicy:e=>$(`/api/access/policies`,{method:`PUT`,body:e}),deletePolicy:e=>$(`/api/access/policies`,{method:`DELETE`,body:e,parse:!1}),orgs:()=>$(`/api/orgs`),orgCreate:e=>$(`/api/orgs`,{method:`POST`,body:e}),org:e=>$(`/api/orgs/${encodeURIComponent(e)}`),orgWorkspaces:e=>$(`/api/orgs/${encodeURIComponent(e)}/workspaces`),createOrgWorkspace:(e,t)=>$(`/api/orgs/${encodeURIComponent(e)}/workspaces`,{method:`POST`,body:t}),orgAgents:e=>$(`/api/orgs/${encodeURIComponent(e)}/agents`),orgMembers:e=>$(`/api/orgs/${encodeURIComponent(e)}/members`),addOrgMember:(e,t)=>$(`/api/orgs/${encodeURIComponent(e)}/members`,{method:`POST`,body:t}),setOrgMember:(e,t,n)=>$(`/api/orgs/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`,{method:`PUT`,body:n}),removeOrgMember:(e,t,n)=>$(`/api/orgs/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`+Q({workspace:n}),{method:`DELETE`,parse:!1}),assignOrgAgent:(e,t)=>$(`/api/orgs/${encodeURIComponent(e)}/agents/${encodeURIComponent(t)}`,{method:`PUT`}),alerts:()=>$(`/api/alerts`),dismissAlert:e=>$(`/api/alerts/${e}/dismiss`,{method:`POST`,parse:!1}),identities:()=>$(`/api/identities`),identityCreate:e=>$(`/api/identities`,{method:`POST`,body:e}),identityCommand:(e,t,n)=>$(`/api/identities/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,{method:`POST`,body:n}),summary:()=>$(`/api/summary`),tasks:()=>$(`/api/tasks`),taskPage:async e=>{let t=await fr(`/api/tasks`+Q(e),{headers:{Accept:`application/json`},signal:AbortSignal.timeout(or)});return{tasks:await t.json(),next:t.headers.get(`X-Next-Cursor`)}},taskMeta:()=>$(`/api/task-meta`),task:e=>$(`/api/tasks/${encodeURIComponent(e)}`),taskAttempts:e=>$(`/api/tasks/${encodeURIComponent(e)}/attempts`),taskChanges:(e,t)=>$(`/api/tasks/${encodeURIComponent(e)}/changes`+Q(t)),taskDebug:(e,t)=>$(`/api/tasks/${encodeURIComponent(e)}/debug`+Q(t)),taskAction:(e,t,n)=>$(`/api/tasks/${encodeURIComponent(e)}/action`,{method:`POST`,body:{action:t,...n}}),setup:()=>$(`/api/setup`),capabilities:()=>$(`/api/capabilities`),workflows:()=>$(`/api/workflows`),workflowEnabled:(e,t)=>$(`/api/workflows/${encodeURIComponent(e)}/enabled`,{method:`PUT`,body:{enabled:t},parse:!1}),checkRepository:e=>$(`/api/control-plane/resources/repository-policies/check`,{method:`POST`,body:e,timeoutMs:35e3}),repositories:()=>$(`/api/repositories`),workRequest:e=>$(`/api/work-requests`,{method:`POST`,body:e}),skills:()=>$(`/api/skills`),channels:()=>$(`/api/channels`),curators:()=>$(`/api/curators`),channelReload:e=>$(`/api/channels/${encodeURIComponent(e)}/reload`,{method:`POST`,body:{}}),config:()=>$(`/api/config`),logs:e=>$(`/api/logs`+Q(e)),taskLogs:(e,t)=>$(`/api/tasks/${encodeURIComponent(e)}/logs`+Q(t)),taskLogDownloadURL:(e,t)=>`/api/tasks/${encodeURIComponent(e)}/logs/download`+(t==null?``:`?attempt=${t}`),version:()=>$(`/api/version`),updateSnapshot:()=>$(`/api/chat/update`),updateDefer:e=>$(`/api/chat/update/defer`,{method:`POST`,body:{snapshot:e}}),updateInstall:e=>$(`/api/chat/update/install`,{method:`POST`,body:{snapshot:e},timeoutMs:9e5}),captures:e=>$(`/api/captures`+Q({limit:e})),eventTypes:e=>$(`/api/event-types`+Q({workspace:e})),eventTypeCreate:e=>$(`/api/event-types`,{method:`POST`,body:e}),eventTypeUpdate:(e,t)=>$(`/api/event-types/${encodeURIComponent(e)}`,{method:`PUT`,body:t}),eventTypeDelete:e=>$(`/api/event-types/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),mappings:e=>$(`/api/mappings`+Q({workspace:e})),mappingCreate:e=>$(`/api/mappings`,{method:`POST`,body:e}),mappingUpdate:(e,t)=>$(`/api/mappings/${encodeURIComponent(e)}`,{method:`PATCH`,body:t}),mappingDelete:e=>$(`/api/mappings/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),mappingPreview:(e,t)=>$(`/api/mappings/preview`,{method:`POST`,body:{capture_id:e,fields:t}}),bindings:e=>$(`/api/bindings`+Q({workspace:e})),dispatches:(e,t)=>$(`/api/${e}/${encodeURIComponent(t)}/dispatches`),bindingCreate:e=>$(`/api/bindings`,{method:`POST`,body:e}),bindingUpdate:(e,t)=>$(`/api/bindings/${encodeURIComponent(e)}`,{method:`PATCH`,body:t}),bindingDelete:e=>$(`/api/bindings/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),bindingApprove:e=>$(`/api/bindings/${encodeURIComponent(e)}/approve`,{method:`POST`}),bindingPause:e=>$(`/api/bindings/${encodeURIComponent(e)}/pause`,{method:`POST`}),bindingResume:e=>$(`/api/bindings/${encodeURIComponent(e)}/resume`,{method:`POST`}),harnessBindings:()=>$(`/api/harness/bindings`),sources:e=>$(`/api/sources`+Q({workspace:e})),sourceCreate:(e,t=``)=>$(`/api/sources`,{method:`POST`,body:{path:e,workspace:t}}),sourceSigning:(e,t)=>$(`/api/sources/${encodeURIComponent(e)}/signing`,{method:`POST`,body:{signed:t}}),sourceApproveUnsigned:e=>$(`/api/sources/${encodeURIComponent(e)}/approve-unsigned`,{method:`POST`}),sourceName:(e,t)=>$(`/api/sources/${encodeURIComponent(e)}/name`,{method:`PUT`,body:{name:t}}),sourceDeliveryHeader:(e,t)=>$(`/api/sources/${encodeURIComponent(e)}/delivery-header`,{method:`PUT`,body:{header:t}}),sourceDelete:e=>$(`/api/sources/${encodeURIComponent(e)}`,{method:`DELETE`,parse:!1}),sourceSecret:e=>$(`/api/sources/${encodeURIComponent(e)}/secret`,{method:`POST`}),chatSessions:()=>$(`/api/chat/sessions`),chatAnswer:(e,t)=>$(`/api/chat/answer`,{method:`POST`,body:{id:e,answer:t}}),chatMessages:e=>$(`/api/chat/sessions/${encodeURIComponent(e)}/messages`),chatTurns:e=>$(`/api/chat/sessions/${encodeURIComponent(e)}/turns`),chatCancel:e=>$(`/api/chat/cancel`,{method:`POST`,body:{session_id:e}}),chatMessage:(e,t)=>$(`/api/chat/message`,{method:`POST`,body:{channel_id:e,source_id:ar(),text:t,page:location.pathname+location.search||`/`}}),chatStream:(e,t={})=>fr(`/api/chat/stream`,{method:`POST`,headers:{Accept:`text/event-stream`,"Content-Type":`application/json`,"X-Archie-CSRF":`1`},body:JSON.stringify(e),signal:t.signal})};function mr(e,t,n=``,r=!1){let i=new EventSource(ir(n,r));return i.onopen=()=>t(`live`),i.onerror=()=>t(nr(i.readyState)),i.onmessage=t=>{try{e(JSON.parse(t.data),t.lastEventId)}catch{}},()=>i.close()}export{Vt as A,Wt as B,In as C,jn as D,Mn as E,wn as F,dn as G,Ht as H,An as I,q as J,on as K,Ke as L,En as M,Rt as N,Ye as O,zt as P,Pt as R,tr as S,Pn as T,Ut as U,ft as V,rn as W,vn as X,lt as Y,gn as Z,Qn as _,mr as a,Rn as b,Ln as c,Bn as d,Z as f,qn as g,Wn as h,lr as i,Tn as j,Jt as k,Gn as l,Un as m,pr as n,ar as o,Vn as p,sn as q,dr as r,rr as s,ur as t,Kn as u,Jn as v,Fn as w,er as x,$n as y,Cn as z}; |