@inkeep/open-knowledge 0.46.0-beta.34 → 0.46.0-beta.36
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/{acp-harness-probe-DT0sl_D0.mjs → acp-harness-probe-CgCKbOa6.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-CBsX6VmY.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/init-AwNwaz8S.mjs +1 -0
- package/dist/{init-DEQGEuYc.mjs → init-BP8ZrhT6.mjs} +3 -3
- package/dist/{launch-json-removal-xx3UAhRW.mjs → launch-json-removal-BRIDVSx6.mjs} +2 -2
- package/dist/{loader-D3FaVs8V.mjs → loader-Bu-tFAqG.mjs} +2 -2
- package/dist/loader-CKek7Fd1.mjs +1 -0
- package/dist/{preview-DhwRKxCk.mjs → preview-BokOfu_R.mjs} +2 -2
- package/dist/preview-pqKTi4EF.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-eZKXi7x3.js → ActivityModeContent-P4Zf22Bs.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-Bk_UuqIm.js → AgentDiffPane-DgyWl0LY.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-CHJ0a-hO.js → ChangedOutsideBadge-D93fNuY2.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-Ci80khj8.js → CodeMirrorPropInput-DTaNg1-M.js} +1 -1
- package/dist/public/assets/{DocumentContext-CXfBU9-L.js → DocumentContext-UuXLA8HR.js} +20 -20
- package/dist/public/assets/FeedbackForm-CLVnd8qb.js +1 -0
- package/dist/public/assets/{GraphPanel-C092olMj.js → GraphPanel-B86tFg1O.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-cZx3HFuS.js → ImportSkillDialog-B9pptBBF.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CQnVDYPq.js +8 -0
- package/dist/public/assets/ManagedArtifactProperties-yxP1OknU.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-DGbbrDkE.js → MermaidDocEditor-DGoGFr6Q.js} +1 -1
- package/dist/public/assets/{SessionsHost-CFKGHP-v.js → SessionsHost-nrZvn3uC.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-DqCUzuqy.js → SettingsDialogBody-DHPy1zCt.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-ZcB-SqtD.js → SkillToolbarControls-DHRQ4dll.js} +1 -1
- package/dist/public/assets/{SourceEditor-nQ1tYmvJ.js → SourceEditor-aduzr_jn.js} +1 -1
- package/dist/public/assets/{TerminalPanel-BzyUYvW1.js → TerminalPanel-CEFylp9e.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-DUsHFj09.js → TerminalWindowApp-bYE3Rjzk.js} +1 -1
- package/dist/public/assets/{TextDocEditor-Mgwc9lXu.js → TextDocEditor-DVdcvFG6.js} +1 -1
- package/dist/public/assets/{ThreadView-Bjw11Cxw.js → ThreadView-C_yxiTQA.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-Chwunr-y.js → TimelineDiffPane-DxGmoF4_.js} +1 -1
- package/dist/public/assets/{agent-diff-store-D6R6MDp1.js → agent-diff-store-Dm4Wpsrw.js} +1 -1
- package/dist/public/assets/{auth-state-cache-DxbIoz7A.js → auth-state-cache-CIkP8Gql.js} +2 -2
- package/dist/public/assets/{file-tree-adapter-BP7EuipU.js → file-tree-adapter-CS4JuYT3.js} +1 -1
- package/dist/public/assets/{globals-Cidq7GOk.js → globals-BJVupD3F.js} +1 -1
- package/dist/public/assets/index-BG8TFON5.js +2092 -0
- package/dist/public/assets/{navigation-targets-CUdNH5TL.js → navigation-targets-GzXvLoSC.js} +1 -1
- package/dist/public/assets/{prop-types-9khllr2u.js → prop-types-ZLa1Cj_J.js} +1 -1
- package/dist/public/assets/{selection-context-QeNscioc.js → selection-context-FnWC5AlG.js} +1 -1
- package/dist/public/assets/{skill-actions-zxcx7XWT.js → skill-actions-WkDFXDFg.js} +2 -2
- package/dist/public/assets/{src-Dr3B9ii7.js → src-1YTF45Kf.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-D6ir9fa8.js → target-navigation-intent-DlmK2vet.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-D9B5ZK28.js → typing-burst-detector-BmD9Pa7E.js} +2 -2
- package/dist/public/assets/{uninstall-sgFzlxFm.js → uninstall-D5OFbWn8.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DZ5Mg5tU.js → use-activity-panel-GOEuTVxn.js} +1 -1
- package/dist/public/assets/{use-open-skill-DpRSbvpY.js → use-open-skill-HTbCYiG5.js} +1 -1
- package/dist/public/assets/{use-skill-directory-BBfJIjk2.js → use-skill-directory-GoiBc97k.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-CD1f20wi.js → use-timeline-entry-diff-DxzRyFwn.js} +1 -1
- package/dist/public/index.html +17 -17
- package/dist/public/uninstall.html +2 -2
- package/dist/{repair-launch-json-G5t-TrFl.mjs → repair-launch-json-Bh35PlKJ.mjs} +2 -2
- package/dist/{repair-mcp-configs-DMqD3_wf.mjs → repair-mcp-configs-DC7eb95K.mjs} +2 -2
- package/dist/{src-BgZFGtwA.mjs → src-BkdDdMKI.mjs} +2 -2
- package/dist/start-CkuVRQqr.mjs +1 -0
- package/dist/{start-DX4YYgK4.mjs → start-DlDxpLrm.mjs} +2 -2
- package/package.json +5 -5
- package/dist/constants-BzSxKeCS.mjs +0 -2
- package/dist/init-CSyU2PH9.mjs +0 -1
- package/dist/loader-BQUss4Yj.mjs +0 -1
- package/dist/preview-Dbs7YrAM.mjs +0 -1
- package/dist/public/assets/FeedbackForm-CYffHrSn.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-BNGK9DX5.js +0 -8
- package/dist/public/assets/ManagedArtifactProperties-GztrNTAZ.js +0 -1
- package/dist/public/assets/index-DGoMcMEu.js +0 -2092
- package/dist/start-BmmEy4iL.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./index-BG8TFON5.js";export{e as FeedbackForm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./useQuery-ZeEDLtxh.js";import{n as s}from"./dist-PQ5KMVDh.js";import{t as c}from"./compiler-runtime-BfE3aGVn.js";import{t as l}from"./utils-CPqDy6Hr.js";import{t as u}from"./button-RQ5o7P7w.js";import{i as d,n as f,t as p}from"./tooltip-x7BNUa3s.js";import{n as m,t as h}from"./toggle-group-Cnezoq-B.js";import{V as g,at as _,ft as v,hr as y,it as b,q as x}from"./dist-OxboORfH2.js";import{t as S}from"./createLucideIcon-DihYAFEK.js";import{t as C}from"./arrow-up-right-CxtRAecj.js";import{i as w,o as T,s as E,t as D}from"./prop-types-9khllr2u.js";import{t as ee}from"./triangle-alert-C2yId37R.js";import{t as O}from"./dist-CzC3AWOn.js";import{f as k}from"./doc-paths-lZOQ-mhw.js";import{d as te}from"./documents-events-5TI0rZAg.js";import{n as ne}from"./external-link-Dvu-nzFi.js";import{t as A}from"./overlay-layers-B39mutdg.js";import{a as re,c as ie,i as ae,n as j,r as oe,s as se,t as ce}from"./panel-Boo96yEj.js";import{t as le}from"./target-navigation-intent-D6ir9fa8.js";import{t as ue}from"./ordinal-DdrNAXbu.js";import{n as de,t as fe}from"./min-B52VabRz.js";import{C as pe,S as M,_ as me,b as he,g as ge,n as N,r as _e,t as ve,v as ye,w as be,x as xe,y as Se}from"./src-CIOeKeVw.js";import{t as Ce}from"./colors-DThYSuj1.js";import{t as we}from"./isObject-CS6pZNNk.js";import{n as Te,t as P}from"./now-D9M3Ys6o.js";var Ee=S(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),De=S(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]);function F(e,n){let r=0;if(n===void 0)for(let n of e)(n=+n)&&(r+=n);else{let i=-1;for(let a of e)(a=+n(a,++i,e))&&(r+=a)}return r}var Oe=e=>()=>e;function ke(e,{sourceEvent:n,subject:r,target:i,identifier:a,active:o,x:s,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}ke.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ae(e){return!e.ctrlKey&&!e.button}function je(){return this.parentNode}function Me(e,n){return n??{x:e.x,y:e.y}}function Ne(){return navigator.maxTouchPoints||`ontouchstart`in this}function Pe(){var e=Ae,n=je,r=Me,i=Ne,a={},o=be(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,Se).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(pe(r.view).on(`mousemove.drag`,h,he).on(`mouseup.drag`,g,he),ge(r.view),xe(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(ye(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){pe(e.view).on(`mousemove.drag mouseup.drag`,null),me(e.view,u),ye(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(xe(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(ye(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(xe(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=M(u||i,n),m,h,g;if((g=r.call(e,new ke(`beforestart`,{sourceEvent:i,target:p,identifier:l,active:s,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),c))!=null)return m=g.x-f[0]||0,h=g.y-f[1]||0,function r(i,o,u){var _=f,v;switch(i){case`start`:a[l]=r,v=s++;break;case`end`:delete a[l],--s;case`drag`:f=M(u||o,n),v=s;break}d.call(i,e,new ke(i,{sourceEvent:o,subject:g,target:p,identifier:l,active:v,x:f[0]+m,y:f[1]+h,dx:f[0]-_[0],dy:f[1]-_[1],dispatch:d}),c)}}return p.filter=function(n){return arguments.length?(e=typeof n==`function`?n:Oe(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Oe(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Oe(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Oe(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function I(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return Fe(this.cover(n,r),n,r,e)}function Fe(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function Ie(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)Fe(this,s[r],c[r],e[r]);return this}function L(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function Le(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Re(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function R(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function ze(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new R(m,a,o,d,f)),r==null?r=1/0:(a=e-r,o=n-r,d=e+r,f=n+r,r*=r);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<a||(u=h.y1)<o))if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new R(m[3],_,v,l,u),new R(m[2],s,v,_,u),new R(m[1],_,c,l,v),new R(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function Be(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function Ve(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function He(){return this._root}function Ue(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function We(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new R(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.x1,l=r.y1)&&i.length){var u=(o+c)/2,d=(s+l)/2;(a=i[3])&&n.push(new R(a,u,d,c,l)),(a=i[2])&&n.push(new R(a,o,d,u,l)),(a=i[1])&&n.push(new R(a,u,s,c,d)),(a=i[0])&&n.push(new R(a,o,s,u,d))}return this}function Ge(e){var n=[],r=[],i;for(this._root&&n.push(new R(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.x1,u=i.y1,d=(s+l)/2,f=(c+u)/2;(o=a[0])&&n.push(new R(o,s,c,d,f)),(o=a[1])&&n.push(new R(o,d,c,l,f)),(o=a[2])&&n.push(new R(o,s,f,d,u)),(o=a[3])&&n.push(new R(o,d,f,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Ke(e){return e[0]}function qe(e){return arguments.length?(this._x=e,this):this._x}function Je(e){return e[1]}function Ye(e){return arguments.length?(this._y=e,this):this._y}function Xe(e,n,r){var i=new Ze(n??Ke,r??Je,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Ze(e,n,r,i,a,o){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function Qe(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var z=Xe.prototype=Ze.prototype;z.copy=function(){var e=new Ze(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Qe(n),e;for(r=[{source:n,target:e._root=[,,,,]}];n=r.pop();)for(var a=0;a<4;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,,,]}):n.target[a]=Qe(i));return e},z.add=I,z.addAll=Ie,z.cover=L,z.data=Le,z.extent=Re,z.find=ze,z.remove=Be,z.removeAll=Ve,z.root=He,z.size=Ue,z.visit=We,z.visitAfter=Ge,z.x=qe,z.y=Ye;var $e=Ce(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),B=n(),V=e(r(),1),et=c(),H=`Expected a function`,tt=Math.max,nt=Math.min;function rt(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(H);n=Te(n)||0,we(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?tt(Te(r.maxWait)||0,n):o,p=`trailing`in r?!!r.trailing:p);function m(n){var r=i,o=a;return i=a=void 0,u=n,s=e.apply(o,r),s}function h(e){return u=e,c=setTimeout(v,n),d?m(e):s}function g(e){var r=e-l,i=e-u,a=n-r;return f?nt(a,o-i):a}function _(e){var r=e-l,i=e-u;return l===void 0||r>=n||r<0||f&&i>=o}function v(){var e=P();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(P())}function S(){var e=P(),r=_(e);if(i=arguments,a=this,l=e,r){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var U=`Expected a function`;function it(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(U);return we(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),rt(e,n,{leading:i,maxWait:n,trailing:a})}var at=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],ot=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function st(e){let n=2;for(let r=0;r<e.length;r++)n=Math.imul(n^e.charCodeAt(r),1540483477),n^=n>>>13,n=Math.imul(n,1540483477),n^=n>>>15;return n>>>0}function ct(e,n){let r=n?at:ot;return r[st(e)%r.length]}var W={fullscreen:{maxEntries:10,containerClassName:`bottom-3 left-3 gap-1 rounded-lg px-3 py-2 text-xs`,titleClassName:`mb-1.5`,rowClassName:`gap-2`,swatchClassName:`size-2.5`,labelClassName:`max-w-[140px]`,overflowClassName:`pl-[18px]`},docked:{maxEntries:6,containerClassName:`bottom-2 left-2 gap-0.5 rounded-md px-2 py-1.5 text-[11px]`,titleClassName:`mb-1`,rowClassName:`gap-1.5`,swatchClassName:`size-2`,labelClassName:`max-w-[112px]`,overflowClassName:`pl-[14px]`}};function lt(e){return W[e]}function ut(e){let n=(0,et.c)(6),{clusters:r,variant:a}=e,o=a===void 0?`fullscreen`:a,{resolvedTheme:c}=s(),u=c===`dark`,d,f;if(n[0]!==r||n[1]!==u||n[2]!==o){f=Symbol.for(`react.early_return_sentinel`);bb0:{let e=lt(o);if(r.length===0){f=null;break bb0}let a=r.slice(0,e.maxEntries),s=r.length-a.length,c;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,B.jsx)(i,{id:`kmKqZg`}),n[5]=c):c=n[5],d=(0,B.jsxs)(`div`,{className:l(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,u?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,B.jsx)(`div`,{className:l(`font-medium`,e.titleClassName,u?`text-slate-300`:`text-slate-700`),children:c}),a.map(n=>(0,B.jsxs)(`div`,{className:l(`flex items-center`,e.rowClassName),children:[(0,B.jsx)(`span`,{className:l(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:ct(n,u)}}),(0,B.jsx)(`span`,{className:l(`truncate`,e.labelClassName),children:n})]},n)),s>0&&(0,B.jsx)(`div`,{className:l(`text-muted-foreground`,e.overflowClassName),children:(0,B.jsx)(i,{id:`lrhetp`,values:{overflow:s}})})]})}n[0]=r,n[1]=u,n[2]=o,n[3]=d,n[4]=f}else d=n[3],f=n[4];return f===Symbol.for(`react.early_return_sentinel`)?d:f}function dt(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function ft(e,n,r){return n=Ct(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function pt(e,n){return gt(e)||dt(e,n)||vt(e,n)||xt()}function mt(e){return ht(e)||_t(e)||vt(e)||bt()}function ht(e){if(Array.isArray(e))return yt(e)}function gt(e){if(Array.isArray(e))return e}function _t(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function vt(e,n){if(e){if(typeof e==`string`)return yt(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Array.from(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yt(e,n)}}function yt(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function bt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./useQuery-ZeEDLtxh.js";import{n as s}from"./dist-PQ5KMVDh.js";import{t as c}from"./compiler-runtime-BfE3aGVn.js";import{t as l}from"./utils-CPqDy6Hr.js";import{t as u}from"./button-RQ5o7P7w.js";import{i as d,n as f,t as p}from"./tooltip-x7BNUa3s.js";import{n as m,t as h}from"./toggle-group-Cnezoq-B.js";import{V as g,at as _,ft as v,hr as y,it as b,q as x}from"./dist-OxboORfH2.js";import{t as S}from"./createLucideIcon-DihYAFEK.js";import{t as C}from"./arrow-up-right-CxtRAecj.js";import{i as w,o as T,s as E,t as D}from"./prop-types-ZLa1Cj_J.js";import{t as ee}from"./triangle-alert-C2yId37R.js";import{t as O}from"./dist-CzC3AWOn.js";import{f as k}from"./doc-paths-lZOQ-mhw.js";import{d as te}from"./documents-events-5TI0rZAg.js";import{n as ne}from"./external-link-Dvu-nzFi.js";import{t as A}from"./overlay-layers-B39mutdg.js";import{a as re,c as ie,i as ae,n as j,r as oe,s as se,t as ce}from"./panel-Boo96yEj.js";import{t as le}from"./target-navigation-intent-DlmK2vet.js";import{t as ue}from"./ordinal-DdrNAXbu.js";import{n as de,t as fe}from"./min-B52VabRz.js";import{C as pe,S as M,_ as me,b as he,g as ge,n as N,r as _e,t as ve,v as ye,w as be,x as xe,y as Se}from"./src-CIOeKeVw.js";import{t as Ce}from"./colors-DThYSuj1.js";import{t as we}from"./isObject-CS6pZNNk.js";import{n as Te,t as P}from"./now-D9M3Ys6o.js";var Ee=S(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),De=S(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]);function F(e,n){let r=0;if(n===void 0)for(let n of e)(n=+n)&&(r+=n);else{let i=-1;for(let a of e)(a=+n(a,++i,e))&&(r+=a)}return r}var Oe=e=>()=>e;function ke(e,{sourceEvent:n,subject:r,target:i,identifier:a,active:o,x:s,y:c,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}ke.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ae(e){return!e.ctrlKey&&!e.button}function je(){return this.parentNode}function Me(e,n){return n??{x:e.x,y:e.y}}function Ne(){return navigator.maxTouchPoints||`ontouchstart`in this}function Pe(){var e=Ae,n=je,r=Me,i=Ne,a={},o=be(`start`,`drag`,`end`),s=0,c,l,u,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(i).on(`touchstart.drag`,_).on(`touchmove.drag`,v,Se).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(r,i){if(!(d||!e.call(this,r,i))){var a=b(this,n.call(this,r,i),r,i,`mouse`);a&&(pe(r.view).on(`mousemove.drag`,h,he).on(`mouseup.drag`,g,he),ge(r.view),xe(r),u=!1,c=r.clientX,l=r.clientY,a(`start`,r))}}function h(e){if(ye(e),!u){var n=e.clientX-c,r=e.clientY-l;u=n*n+r*r>f}a.mouse(`drag`,e)}function g(e){pe(e.view).on(`mousemove.drag mouseup.drag`,null),me(e.view,u),ye(e),a.mouse(`end`,e)}function _(r,i){if(e.call(this,r,i)){var a=r.changedTouches,o=n.call(this,r,i),s=a.length,c,l;for(c=0;c<s;++c)(l=b(this,o,r,i,a[c].identifier,a[c]))&&(xe(r),l(`start`,r,a[c]))}}function v(e){var n=e.changedTouches,r=n.length,i,o;for(i=0;i<r;++i)(o=a[n[i].identifier])&&(ye(e),o(`drag`,e,n[i]))}function y(e){var n=e.changedTouches,r=n.length,i,o;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),i=0;i<r;++i)(o=a[n[i].identifier])&&(xe(e),o(`end`,e,n[i]))}function b(e,n,i,c,l,u){var d=o.copy(),f=M(u||i,n),m,h,g;if((g=r.call(e,new ke(`beforestart`,{sourceEvent:i,target:p,identifier:l,active:s,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),c))!=null)return m=g.x-f[0]||0,h=g.y-f[1]||0,function r(i,o,u){var _=f,v;switch(i){case`start`:a[l]=r,v=s++;break;case`end`:delete a[l],--s;case`drag`:f=M(u||o,n),v=s;break}d.call(i,e,new ke(i,{sourceEvent:o,subject:g,target:p,identifier:l,active:v,x:f[0]+m,y:f[1]+h,dx:f[0]-_[0],dy:f[1]-_[1],dispatch:d}),c)}}return p.filter=function(n){return arguments.length?(e=typeof n==`function`?n:Oe(!!n),p):e},p.container=function(e){return arguments.length?(n=typeof e==`function`?e:Oe(e),p):n},p.subject=function(e){return arguments.length?(r=typeof e==`function`?e:Oe(e),p):r},p.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Oe(!!e),p):i},p.on=function(){var e=o.on.apply(o,arguments);return e===o?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function I(e){let n=+this._x.call(null,e),r=+this._y.call(null,e);return Fe(this.cover(n,r),n,r,e)}function Fe(e,n,r,i){if(isNaN(n)||isNaN(r))return e;var a,o=e._root,s={data:i},c=e._x0,l=e._y0,u=e._x1,d=e._y1,f,p,m,h,g,_,v,y;if(!o)return e._root=s,e;for(;o.length;)if((g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p,a=o,!(o=o[v=_<<1|g]))return a[v]=s,e;if(m=+e._x.call(null,o.data),h=+e._y.call(null,o.data),n===m&&r===h)return s.next=o,a?a[v]=s:e._root=s,e;do a=a?a[v]=[,,,,]:e._root=[,,,,],(g=n>=(f=(c+u)/2))?c=f:u=f,(_=r>=(p=(l+d)/2))?l=p:d=p;while((v=_<<1|g)==(y=(h>=p)<<1|m>=f));return a[y]=o,a[v]=s,e}function Ie(e){var n,r,i=e.length,a,o,s=Array(i),c=Array(i),l=1/0,u=1/0,d=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(a=+this._x.call(null,n=e[r]))||isNaN(o=+this._y.call(null,n))||(s[r]=a,c[r]=o,a<l&&(l=a),a>d&&(d=a),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),r=0;r<i;++r)Fe(this,s[r],c[r],e[r]);return this}function L(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,a=this._x1,o=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,o=(i=Math.floor(n))+1;else{for(var s=a-r||1,c=this._root,l,u;r>e||e>=a||i>n||n>=o;)switch(u=(n<i)<<1|e<r,l=[,,,,],l[u]=c,c=l,s*=2,u){case 0:a=r+s,o=i+s;break;case 1:r=a-s,o=i+s;break;case 2:a=r+s,i=o-s;break;case 3:r=a-s,i=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=i,this._x1=a,this._y1=o,this}function Le(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function Re(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function R(e,n,r,i,a){this.node=e,this.x0=n,this.y0=r,this.x1=i,this.y1=a}function ze(e,n,r){var i,a=this._x0,o=this._y0,s,c,l,u,d=this._x1,f=this._y1,p=[],m=this._root,h,g;for(m&&p.push(new R(m,a,o,d,f)),r==null?r=1/0:(a=e-r,o=n-r,d=e+r,f=n+r,r*=r);h=p.pop();)if(!(!(m=h.node)||(s=h.x0)>d||(c=h.y0)>f||(l=h.x1)<a||(u=h.y1)<o))if(m.length){var _=(s+l)/2,v=(c+u)/2;p.push(new R(m[3],_,v,l,u),new R(m[2],s,v,_,u),new R(m[1],_,c,l,v),new R(m[0],s,c,_,v)),(g=(n>=v)<<1|e>=_)&&(h=p[p.length-1],p[p.length-1]=p[p.length-1-g],p[p.length-1-g]=h)}else{var y=e-+this._x.call(null,m.data),b=n-+this._y.call(null,m.data),x=y*y+b*b;if(x<r){var S=Math.sqrt(r=x);a=e-S,o=n-S,d=e+S,f=n+S,i=m.data}}return i}function Be(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var n,r=this._root,i,a,o,s=this._x0,c=this._y0,l=this._x1,u=this._y1,d,f,p,m,h,g,_,v;if(!r)return this;if(r.length)for(;;){if((h=d>=(p=(s+l)/2))?s=p:l=p,(g=f>=(m=(c+u)/2))?c=m:u=m,n=r,!(r=r[_=g<<1|h]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(i=n,v=_)}for(;r.data!==e;)if(a=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,a?(o?a.next=o:delete a.next,this):n?(o?n[_]=o:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(i?i[v]=r:this._root=r),this):(this._root=o,this)}function Ve(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function He(){return this._root}function Ue(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function We(e){var n=[],r,i=this._root,a,o,s,c,l;for(i&&n.push(new R(i,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(i=r.node,o=r.x0,s=r.y0,c=r.x1,l=r.y1)&&i.length){var u=(o+c)/2,d=(s+l)/2;(a=i[3])&&n.push(new R(a,u,d,c,l)),(a=i[2])&&n.push(new R(a,o,d,u,l)),(a=i[1])&&n.push(new R(a,u,s,c,d)),(a=i[0])&&n.push(new R(a,o,s,u,d))}return this}function Ge(e){var n=[],r=[],i;for(this._root&&n.push(new R(this._root,this._x0,this._y0,this._x1,this._y1));i=n.pop();){var a=i.node;if(a.length){var o,s=i.x0,c=i.y0,l=i.x1,u=i.y1,d=(s+l)/2,f=(c+u)/2;(o=a[0])&&n.push(new R(o,s,c,d,f)),(o=a[1])&&n.push(new R(o,d,c,l,f)),(o=a[2])&&n.push(new R(o,s,f,d,u)),(o=a[3])&&n.push(new R(o,d,f,l,u))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function Ke(e){return e[0]}function qe(e){return arguments.length?(this._x=e,this):this._x}function Je(e){return e[1]}function Ye(e){return arguments.length?(this._y=e,this):this._y}function Xe(e,n,r){var i=new Ze(n??Ke,r??Je,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Ze(e,n,r,i,a,o){this._x=e,this._y=n,this._x0=r,this._y0=i,this._x1=a,this._y1=o,this._root=void 0}function Qe(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var z=Xe.prototype=Ze.prototype;z.copy=function(){var e=new Ze(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,i;if(!n)return e;if(!n.length)return e._root=Qe(n),e;for(r=[{source:n,target:e._root=[,,,,]}];n=r.pop();)for(var a=0;a<4;++a)(i=n.source[a])&&(i.length?r.push({source:i,target:n.target[a]=[,,,,]}):n.target[a]=Qe(i));return e},z.add=I,z.addAll=Ie,z.cover=L,z.data=Le,z.extent=Re,z.find=ze,z.remove=Be,z.removeAll=Ve,z.root=He,z.size=Ue,z.visit=We,z.visitAfter=Ge,z.x=qe,z.y=Ye;var $e=Ce(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),B=n(),V=e(r(),1),et=c(),H=`Expected a function`,tt=Math.max,nt=Math.min;function rt(e,n,r){var i,a,o,s,c,l,u=0,d=!1,f=!1,p=!0;if(typeof e!=`function`)throw TypeError(H);n=Te(n)||0,we(r)&&(d=!!r.leading,f=`maxWait`in r,o=f?tt(Te(r.maxWait)||0,n):o,p=`trailing`in r?!!r.trailing:p);function m(n){var r=i,o=a;return i=a=void 0,u=n,s=e.apply(o,r),s}function h(e){return u=e,c=setTimeout(v,n),d?m(e):s}function g(e){var r=e-l,i=e-u,a=n-r;return f?nt(a,o-i):a}function _(e){var r=e-l,i=e-u;return l===void 0||r>=n||r<0||f&&i>=o}function v(){var e=P();if(_(e))return y(e);c=setTimeout(v,g(e))}function y(e){return c=void 0,p&&i?m(e):(i=a=void 0,s)}function b(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function x(){return c===void 0?s:y(P())}function S(){var e=P(),r=_(e);if(i=arguments,a=this,l=e,r){if(c===void 0)return h(l);if(f)return clearTimeout(c),c=setTimeout(v,n),m(l)}return c===void 0&&(c=setTimeout(v,n)),s}return S.cancel=b,S.flush=x,S}var U=`Expected a function`;function it(e,n,r){var i=!0,a=!0;if(typeof e!=`function`)throw TypeError(U);return we(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),rt(e,n,{leading:i,maxWait:n,trailing:a})}var at=[`#60a5fa`,`#a78bfa`,`#34d399`,`#f472b6`,`#fb923c`,`#22d3ee`,`#c084fc`,`#4ade80`,`#f87171`,`#eab308`,`#ec4899`,`#06b67f`,`#8b5cf6`,`#f43f5e`,`#0ea5e9`,`#a855f7`],ot=[`#1e40af`,`#6b21a8`,`#166534`,`#9f1239`,`#9a3412`,`#164e63`,`#581c87`,`#166534`,`#991b1b`,`#854d0e`,`#831843`,`#0f766e`,`#312e81`,`#9f1239`,`#0c4a6e`,`#6b21a8`];function st(e){let n=2;for(let r=0;r<e.length;r++)n=Math.imul(n^e.charCodeAt(r),1540483477),n^=n>>>13,n=Math.imul(n,1540483477),n^=n>>>15;return n>>>0}function ct(e,n){let r=n?at:ot;return r[st(e)%r.length]}var W={fullscreen:{maxEntries:10,containerClassName:`bottom-3 left-3 gap-1 rounded-lg px-3 py-2 text-xs`,titleClassName:`mb-1.5`,rowClassName:`gap-2`,swatchClassName:`size-2.5`,labelClassName:`max-w-[140px]`,overflowClassName:`pl-[18px]`},docked:{maxEntries:6,containerClassName:`bottom-2 left-2 gap-0.5 rounded-md px-2 py-1.5 text-[11px]`,titleClassName:`mb-1`,rowClassName:`gap-1.5`,swatchClassName:`size-2`,labelClassName:`max-w-[112px]`,overflowClassName:`pl-[14px]`}};function lt(e){return W[e]}function ut(e){let n=(0,et.c)(6),{clusters:r,variant:a}=e,o=a===void 0?`fullscreen`:a,{resolvedTheme:c}=s(),u=c===`dark`,d,f;if(n[0]!==r||n[1]!==u||n[2]!==o){f=Symbol.for(`react.early_return_sentinel`);bb0:{let e=lt(o);if(r.length===0){f=null;break bb0}let a=r.slice(0,e.maxEntries),s=r.length-a.length,c;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,B.jsx)(i,{id:`kmKqZg`}),n[5]=c):c=n[5],d=(0,B.jsxs)(`div`,{className:l(`pointer-events-none absolute z-10 flex flex-col backdrop-blur-sm`,e.containerClassName,u?`bg-black/70 text-gray-200`:`bg-white/80 text-gray-800 ring-1 ring-black/5`),children:[(0,B.jsx)(`div`,{className:l(`font-medium`,e.titleClassName,u?`text-slate-300`:`text-slate-700`),children:c}),a.map(n=>(0,B.jsxs)(`div`,{className:l(`flex items-center`,e.rowClassName),children:[(0,B.jsx)(`span`,{className:l(`inline-block shrink-0 rounded-full`,e.swatchClassName),style:{backgroundColor:ct(n,u)}}),(0,B.jsx)(`span`,{className:l(`truncate`,e.labelClassName),children:n})]},n)),s>0&&(0,B.jsx)(`div`,{className:l(`text-muted-foreground`,e.overflowClassName),children:(0,B.jsx)(i,{id:`lrhetp`,values:{overflow:s}})})]})}n[0]=r,n[1]=u,n[2]=o,n[3]=d,n[4]=f}else d=n[3],f=n[4];return f===Symbol.for(`react.early_return_sentinel`)?d:f}function dt(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function ft(e,n,r){return n=Ct(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function pt(e,n){return gt(e)||dt(e,n)||vt(e,n)||xt()}function mt(e){return ht(e)||_t(e)||vt(e)||bt()}function ht(e){if(Array.isArray(e))return yt(e)}function gt(e){if(Array.isArray(e))return e}function _t(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function vt(e,n){if(e){if(typeof e==`string`)return yt(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Array.from(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yt(e,n)}}function yt(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function bt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xt(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function St(e,n){if(typeof e!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(typeof i!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}function Ct(e){var n=St(e,`string`);return typeof n==`symbol`?n:String(n)}var wt=function(e,n){var r=new Set(n);return Object.assign.apply(Object,[{}].concat(mt(Object.entries(e).filter(function(e){var n=pt(e,1)[0];return!r.has(n)}).map(function(e){var n=pt(e,2),r=n[0],i=n[1];return ft({},r,i)}))))};function Tt(e,{wrapperElementType:n=`div`,nodeMapper:r=e=>e,methodNames:i=[],initPropNames:a=[]}={}){return(0,V.forwardRef)((o,s)=>{let c=(0,V.useRef)(),l=(0,V.useMemo)(()=>e(Object.fromEntries(a.filter(e=>o.hasOwnProperty(e)).map(e=>[e,o[e]]))),[]);Et(()=>{l(r(c.current))},V.useLayoutEffect),Et(()=>l._destructor instanceof Function?l._destructor:void 0);let u=(0,V.useCallback)((e,...n)=>l[e]instanceof Function?l[e](...n):void 0,[l]),d=(0,V.useRef)({});return Object.keys(wt(o,[...i,...a])).filter(e=>d.current[e]!==o[e]).forEach(e=>u(e,o[e])),d.current=o,(0,V.useImperativeHandle)(s,()=>Object.fromEntries(i.map(e=>[e,(...n)=>u(e,...n)])),[u]),V.createElement(n,{ref:c})})}function Et(e,n=V.useEffect){let r=(0,V.useRef)(),i=(0,V.useRef)(!1),a=(0,V.useRef)(!1),[o,s]=(0,V.useState)(0);i.current&&(a.current=!0),n(()=>(i.current||=(r.current=e(),!0),s(e=>e+1),()=>{a.current&&=(r.current&&r.current(),r.current=void 0,i.current=!1,!1)}),[])}var Dt=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:1024**(e-1)},Out:function(e){return e===1?1:1-2**(-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-(2**(10*(e-1)))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:2**(-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*2**(10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*2**(-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=1.70158*1.525;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Dt.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?Dt.Bounce.In(e*2)*.5:Dt.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<2**-52?2**-52:e,e=e>1e4?1e4:e,{In:function(n){return n**+e},Out:function(n){return 1-(1-n)**e},InOut:function(n){return n<.5?(n*2)**e/2:(1-(2-n*2)**e)/2+.5}}}}),Ot=function(){return performance.now()},kt=function(){function e(){var e=[...arguments];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];(e=o._group)==null||e.remove(o),o._group=this,this._tweens[o.getId()]=o,this._tweensAddedDuringUpdate[o.getId()]=o}},e.prototype.remove=function(){for(var e=[...arguments],n=0,r=e;n<r.length;n++){var i=r[n];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},e.prototype.update=function(e,n){e===void 0&&(e=Ot()),n===void 0&&(n=!0);var r=Object.keys(this._tweens);if(r.length!==0)for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var a=this._tweens[r[i]],o=!n;a&&a.update(e,o)===!1&&!n&&this.remove(a)}r=Object.keys(this._tweensAddedDuringUpdate)}},e}(),At={Linear:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=At.Utils.Linear;return n<0?o(e[0],e[1],i):n>1?o(e[r],e[r-1],r-i):o(e[a],e[a+1>r?r:a+1],i-a)},Bezier:function(e,n){for(var r=0,i=e.length-1,a=Math.pow,o=At.Utils.Bernstein,s=0;s<=i;s++)r+=a(1-n,i-s)*a(n,s)*e[s]*o(i,s);return r},CatmullRom:function(e,n){var r=e.length-1,i=r*n,a=Math.floor(i),o=At.Utils.CatmullRom;return e[0]===e[r]?(n<0&&(a=Math.floor(i=r*(1+n))),o(e[(a-1+r)%r],e[a],e[(a+1)%r],e[(a+2)%r],i-a)):n<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):n>1?e[r]-(o(e[r],e[r],e[r-1],e[r-1],i-r)-e[r]):o(e[a?a-1:0],e[a],e[r<a+1?r:a+1],e[r<a+2?r:a+2],i-a)},Utils:{Linear:function(e,n,r){return(n-e)*r+e},Bernstein:function(e,n){var r=At.Utils.Factorial;return r(e)/r(n)/r(e-n)},Factorial:(function(){var e=[1];return function(n){var r=1;if(e[n])return e[n];for(var i=n;i>1;i--)r*=i;return e[n]=r,r}})(),CatmullRom:function(e,n,r,i,a){var o=(r-e)*.5,s=(i-n)*.5,c=a*a,l=a*c;return(2*n-2*r+o+s)*l+(-3*n+3*r-2*o-s)*c+o*a+n}}},jt=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),Mt=new kt,Nt=function(){function e(e,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Dt.Linear.None,this._interpolationFunction=At.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=jt.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof n==`object`?(this._group=n,n.add(this)):n===!0&&(this._group=Mt,Mt.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(e,n){if(n===void 0&&(n=1e3),this._isPlaying)throw Error(`Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.`);return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},e.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,n){if(e===void 0&&(e=Ot()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed)for(var r in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var a in this._valuesEnd)i[a]=this._valuesEnd[a];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,n,r,i,a){for(var o in r){var s=e[o],c=Array.isArray(s),l=c?`array`:typeof s,u=!c&&Array.isArray(r[o]);if(!(l===`undefined`||l===`function`)){if(u){var d=r[o];if(d.length===0)continue;for(var f=[s],p=0,m=d.length;p<m;p+=1){var h=this._handleRelativeValue(s,d[p]);if(isNaN(h)){u=!1,console.warn(`Found invalid interpolation list. Skipping.`);break}f.push(h)}u&&(r[o]=f)}if((l===`object`||c)&&s&&!u){n[o]=c?[]:{};var g=s;for(var _ in g)n[o][_]=g[_];i[o]=c?[]:{};var d=r[o];if(!this._isDynamic){var v={};for(var _ in d)v[_]=d[_];r[o]=d=v}this._setupProperties(g,n[o],d,i[o],a)}else (n[o]===void 0||a)&&(n[o]=s),c||(n[o]*=1),u?i[o]=r[o].slice().reverse():i[o]=n[o]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(e){return e===void 0&&(e=Ot()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},e.prototype.resume=function(e){return e===void 0&&(e=Ot()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return e?(e.add(this),this):(console.warn(`tween.group() without args has been removed, use group.add(tween) instead.`),this)},e.prototype.remove=function(){var e;return(e=this._group)==null||e.remove(this),this},e.prototype.delay=function(e){return e===void 0&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return e===void 0&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return e===void 0&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return e===void 0&&(e=Dt.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return e===void 0&&(e=At.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){return this._chainedTweens=[...arguments],this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(n,r){var i=this;if(n===void 0&&(n=Ot()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var a;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var o=n-this._startTime,s=this._duration+(this._repeatDelayTime??this._delayTime),c=this._duration+this._repeat*s,l=function(){if(i._duration===0||o>c)return 1;var e=o-Math.trunc(o/s)*s,n=Math.min(e/i._duration,1);return n===0&&o===i._duration?1:n}(),u=this._easingFunction(l);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,u),this._onUpdateCallback&&this._onUpdateCallback(this._object,l),this._duration===0||o>=this._duration)if(this._repeat>0){var d=Math.min(Math.trunc((o-this._duration)/s)+1,this._repeat);for(a in isFinite(this._repeat)&&(this._repeat-=d),this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[a]==`string`&&(this._valuesStartRepeat[a]=this._valuesStartRepeat[a]+parseFloat(this._valuesEnd[a])),this._yoyo&&this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=s*d,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var f=0,p=this._chainedTweens.length;f<p;f++)this._chainedTweens[f].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,n,r,i){for(var a in r)if(n[a]!==void 0){var o=n[a]||0,s=r[a];!Array.isArray(e[a])&&Array.isArray(s)?e[a]=this._interpolationFunction(s,i):typeof s==`object`&&s?this._updateProperties(e[a],o,s,i):(s=this._handleRelativeValue(o,s),typeof s==`number`&&(e[a]=o+(s-o)*i))}},e.prototype._handleRelativeValue=function(e,n){return typeof n==`string`?n.charAt(0)===`+`||n.charAt(0)===`-`?e+parseFloat(n):parseFloat(n):n},e.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],r=this._valuesEnd[e];typeof r==`string`?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},e.autoStartOnUpdate=!1,e}();jt.nextId;var Pt=Mt;Pt.getAll.bind(Pt),Pt.removeAll.bind(Pt),Pt.add.bind(Pt),Pt.remove.bind(Pt),Pt.update.bind(Pt);function Ft(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function It(e){if(Array.isArray(e))return e}function Lt(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function Rt(e,n,r){return Object.defineProperty(e,`prototype`,{writable:!1}),e}function zt(e,n){var r=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(r!=null){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,n!==0)for(;!(l=(i=o.call(r)).done)&&(c.push(i.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}function Bt(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vt(e,n){return It(e)||zt(e,n)||Ht(e,n)||Bt()}function Ht(e,n){if(e){if(typeof e==`string`)return Ft(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ft(e,n):void 0}}var Ut=Rt(function e(n,r){var i=r.default,a=i===void 0?null:i,o=r.triggerUpdate,s=o===void 0?!0:o,c=r.onChange,l=c===void 0?function(e,n){}:c;Lt(this,e),this.name=n,this.defaultVal=a,this.triggerUpdate=s,this.onChange=l});function Wt(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,i=e.props,a=i===void 0?{}:i,o=e.methods,s=o===void 0?{}:o,c=e.aliases,l=c===void 0?{}:c,u=e.init,d=u===void 0?function(){}:u,f=e.update,p=f===void 0?function(){}:f,m=Object.keys(a).map(function(e){return new Ut(e,a[e])});return function e(){var n=[...arguments],i=!!(this instanceof e&&this.constructor),a=i?n.shift():void 0,o=n[0],c=o===void 0?{}:o,u=Object.assign({},r instanceof Function?r(c):r,{initialised:!1}),f={};function h(e){return g(e,c),_(),h}var g=function(e,n){d.call(h,e,u,n),u.initialised=!0},_=rt(function(){u.initialised&&(p.call(h,u,f),f={})},1);return m.forEach(function(e){h[e.name]=n(e);function n(e){var n=e.name,r=e.triggerUpdate,i=r===void 0?!1:r,a=e.onChange,o=a===void 0?function(e,n){}:a,s=e.defaultVal,c=s===void 0?null:s;return function(e){var r=u[n];if(!arguments.length)return r;var a=e===void 0?c:e;return u[n]=a,o.call(h,a,u,r),!f.hasOwnProperty(n)&&(f[n]=r),i&&_(),h}}}),Object.keys(s).forEach(function(e){h[e]=function(){var n,r=[...arguments];return(n=s[e]).call.apply(n,[h,u].concat(r))}}),Object.entries(l).forEach(function(e){var n=Vt(e,2),r=n[0];return h[r]=h[n[1]]}),h.resetProps=function(){return m.forEach(function(e){h[e.name](e.defaultVal)}),h},h.resetProps(),u._rerender=_,i&&a&&h(a),h}}var G=(function(e){return typeof e==`function`?e:typeof e==`string`?function(n){return n[e]}:function(n){return e}});function Gt(e){"@babel/helpers - typeof";return Gt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Gt(e)}var Kt=/^\s+/,qt=/\s+$/;function K(e,n){if(e||=``,n||={},e instanceof K)return e;if(!(this instanceof K))return new K(e,n);var r=Jt(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}K.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n=e.r/255,r=e.g/255,i=e.b/255,a=n<=.03928?n/12.92:((n+.055)/1.055)**2.4,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4;return .2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=yn(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Qt(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Qt(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?`hsv(`+n+`, `+r+`%, `+i+`%)`:`hsva(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHsl:function(){var e=Xt(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Xt(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?`hsl(`+n+`, `+r+`%, `+i+`%)`:`hsla(`+n+`, `+r+`%, `+i+`%, `+this._roundA+`)`},toHex:function(e){return en(this._r,this._g,this._b,e)},toHexString:function(e){return`#`+this.toHex(e)},toHex8:function(e){return tn(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return`#`+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?`rgb(`+Math.round(this._r)+`, `+Math.round(this._g)+`, `+Math.round(this._b)+`)`:`rgba(`+Math.round(this._r)+`, `+Math.round(this._g)+`, `+Math.round(this._b)+`, `+this._roundA+`)`},toPercentageRgb:function(){return{r:Math.round(q(this._r,255)*100)+`%`,g:Math.round(q(this._g,255)*100)+`%`,b:Math.round(q(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+Math.round(q(this._r,255)*100)+`%, `+Math.round(q(this._g,255)*100)+`%, `+Math.round(q(this._b,255)*100)+`%)`:`rgba(`+Math.round(q(this._r,255)*100)+`%, `+Math.round(q(this._g,255)*100)+`%, `+Math.round(q(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:_n[en(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n=`#`+nn(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?`GradientType = 1, `:``;if(e){var a=K(e);r=`#`+nn(a._r,a._g,a._b,a._a)}return`progid:DXImageTransform.Microsoft.gradient(`+i+`startColorstr=`+n+`,endColorstr=`+r+`)`},toString:function(e){var n=!!e;e||=this._format;var r=!1,i=this._a<1&&this._a>=0;return!n&&i&&(e===`hex`||e===`hex6`||e===`hex3`||e===`hex4`||e===`hex8`||e===`name`)?e===`name`&&this._a===0?this.toName():this.toRgbString():(e===`rgb`&&(r=this.toRgbString()),e===`prgb`&&(r=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(r=this.toHexString()),e===`hex3`&&(r=this.toHexString(!0)),e===`hex4`&&(r=this.toHex8String(!0)),e===`hex8`&&(r=this.toHex8String()),e===`name`&&(r=this.toName()),e===`hsl`&&(r=this.toHslString()),e===`hsv`&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return K(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(sn,arguments)},brighten:function(){return this._applyModification(cn,arguments)},darken:function(){return this._applyModification(ln,arguments)},desaturate:function(){return this._applyModification(rn,arguments)},saturate:function(){return this._applyModification(an,arguments)},greyscale:function(){return this._applyModification(on,arguments)},spin:function(){return this._applyModification(un,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(mn,arguments)},complement:function(){return this._applyCombination(dn,arguments)},monochromatic:function(){return this._applyCombination(hn,arguments)},splitcomplement:function(){return this._applyCombination(pn,arguments)},triad:function(){return this._applyCombination(fn,[3])},tetrad:function(){return this._applyCombination(fn,[4])}},K.fromRatio=function(e,n){if(Gt(e)==`object`){var r={};for(var i in e)e.hasOwnProperty(i)&&(i===`a`?r[i]=e[i]:r[i]=Tn(e[i]));e=r}return K(e,n)};function Jt(e){var n={r:0,g:0,b:0},r=1,i=null,a=null,o=null,s=!1,c=!1;return typeof e==`string`&&(e=An(e)),Gt(e)==`object`&&(kn(e.r)&&kn(e.g)&&kn(e.b)?(n=Yt(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):kn(e.h)&&kn(e.s)&&kn(e.v)?(i=Tn(e.s),a=Tn(e.v),n=$t(e.h,i,a),s=!0,c=`hsv`):kn(e.h)&&kn(e.s)&&kn(e.l)&&(i=Tn(e.s),o=Tn(e.l),n=Zt(e.h,i,o),s=!0,c=`hsl`),e.hasOwnProperty(`a`)&&(r=e.a)),r=yn(r),{ok:s,format:e.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function Yt(e,n,r){return{r:q(e,255)*255,g:q(n,255)*255,b:q(r,255)*255}}function Xt(e,n,r){e=q(e,255),n=q(n,255),r=q(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=(i+a)/2;if(i==a)o=s=0;else{var l=i-a;switch(s=c>.5?l/(2-i-a):l/(i+a),i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,l:c}}function Zt(e,n,r){var i,a,o;e=q(e,360),n=q(n,100),r=q(r,100);function s(e,n,r){return r<0&&(r+=1),r>1&&--r,r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}if(n===0)i=a=o=r;else{var c=r<.5?r*(1+n):r+n-r*n,l=2*r-c;i=s(l,c,e+1/3),a=s(l,c,e),o=s(l,c,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function Qt(e,n,r){e=q(e,255),n=q(n,255),r=q(r,255);var i=Math.max(e,n,r),a=Math.min(e,n,r),o,s,c=i,l=i-a;if(s=i===0?0:l/i,i==a)o=0;else{switch(i){case e:o=(n-r)/l+(n<r?6:0);break;case n:o=(r-e)/l+2;break;case r:o=(e-n)/l+4;break}o/=6}return{h:o,s,v:c}}function $t(e,n,r){e=q(e,360)*6,n=q(n,100),r=q(r,100);var i=Math.floor(e),a=e-i,o=r*(1-n),s=r*(1-a*n),c=r*(1-(1-a)*n),l=i%6,u=[r,s,o,o,c,r][l],d=[c,r,r,s,o,o][l],f=[o,o,c,r,r,s][l];return{r:u*255,g:d*255,b:f*255}}function en(e,n,r,i){var a=[wn(Math.round(e).toString(16)),wn(Math.round(n).toString(16)),wn(Math.round(r).toString(16))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join(``)}function tn(e,n,r,i,a){var o=[wn(Math.round(e).toString(16)),wn(Math.round(n).toString(16)),wn(Math.round(r).toString(16)),wn(En(i))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(``)}function nn(e,n,r,i){return[wn(En(i)),wn(Math.round(e).toString(16)),wn(Math.round(n).toString(16)),wn(Math.round(r).toString(16))].join(``)}K.equals=function(e,n){return!e||!n?!1:K(e).toRgbString()==K(n).toRgbString()},K.random=function(){return K.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function rn(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.s-=n/100,r.s=bn(r.s),K(r)}function an(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.s+=n/100,r.s=bn(r.s),K(r)}function on(e){return K(e).desaturate(100)}function sn(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.l+=n/100,r.l=bn(r.l),K(r)}function cn(e,n){n=n===0?0:n||10;var r=K(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),K(r)}function ln(e,n){n=n===0?0:n||10;var r=K(e).toHsl();return r.l-=n/100,r.l=bn(r.l),K(r)}function un(e,n){var r=K(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,K(r)}function dn(e){var n=K(e).toHsl();return n.h=(n.h+180)%360,K(n)}function fn(e,n){if(isNaN(n)||n<=0)throw Error(`Argument to polyad must be a positive number`);for(var r=K(e).toHsl(),i=[K(e)],a=360/n,o=1;o<n;o++)i.push(K({h:(r.h+o*a)%360,s:r.s,l:r.l}));return i}function pn(e){var n=K(e).toHsl(),r=n.h;return[K(e),K({h:(r+72)%360,s:n.s,l:n.l}),K({h:(r+216)%360,s:n.s,l:n.l})]}function mn(e,n,r){n||=6,r||=30;var i=K(e).toHsl(),a=360/r,o=[K(e)];for(i.h=(i.h-(a*n>>1)+720)%360;--n;)i.h=(i.h+a)%360,o.push(K(i));return o}function hn(e,n){n||=6;for(var r=K(e).toHsv(),i=r.h,a=r.s,o=r.v,s=[],c=1/n;n--;)s.push(K({h:i,s:a,v:o})),o=(o+c)%1;return s}K.mix=function(e,n,r){r=r===0?0:r||50;var i=K(e).toRgb(),a=K(n).toRgb(),o=r/100;return K({r:(a.r-i.r)*o+i.r,g:(a.g-i.g)*o+i.g,b:(a.b-i.b)*o+i.b,a:(a.a-i.a)*o+i.a})},K.readability=function(e,n){var r=K(e),i=K(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},K.isReadable=function(e,n,r){var i=K.readability(e,n),a,o=!1;switch(a=jn(r),a.level+a.size){case`AAsmall`:case`AAAlarge`:o=i>=4.5;break;case`AAlarge`:o=i>=3;break;case`AAAsmall`:o=i>=7;break}return o},K.mostReadable=function(e,n,r){var i=null,a=0,o,s,c,l;r||={},s=r.includeFallbackColors,c=r.level,l=r.size;for(var u=0;u<n.length;u++)o=K.readability(e,n[u]),o>a&&(a=o,i=K(n[u]));return K.isReadable(e,i,{level:c,size:l})||!s?i:(r.includeFallbackColors=!1,K.mostReadable(e,[`#fff`,`#000`],r))};var gn=K.names={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`0ff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000`,blanchedalmond:`ffebcd`,blue:`00f`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,burntsienna:`ea7e5d`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`0ff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkgrey:`a9a9a9`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkslategrey:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dimgrey:`696969`,dodgerblue:`1e90ff`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`f0f`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,grey:`808080`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgray:`d3d3d3`,lightgreen:`90ee90`,lightgrey:`d3d3d3`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslategray:`789`,lightslategrey:`789`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`0f0`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`f0f`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370db`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`db7093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,rebeccapurple:`663399`,red:`f00`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,slategrey:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`fff`,whitesmoke:`f5f5f5`,yellow:`ff0`,yellowgreen:`9acd32`},_n=K.hexNames=vn(gn);function vn(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function yn(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function q(e,n){Sn(e)&&(e=`100%`);var r=Cn(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function bn(e){return Math.min(1,Math.max(0,e))}function xn(e){return parseInt(e,16)}function Sn(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function Cn(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function wn(e){return e.length==1?`0`+e:``+e}function Tn(e){return e<=1&&(e=e*100+`%`),e}function En(e){return Math.round(parseFloat(e)*255).toString(16)}function Dn(e){return xn(e)/255}var On=function(){var e=`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`,n=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`,r=`[\\s|\\(]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)[,|\\s]+(`+e+`)\\s*\\)?`;return{CSS_UNIT:new RegExp(e),rgb:RegExp(`rgb`+n),rgba:RegExp(`rgba`+r),hsl:RegExp(`hsl`+n),hsla:RegExp(`hsla`+r),hsv:RegExp(`hsv`+n),hsva:RegExp(`hsva`+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function kn(e){return!!On.CSS_UNIT.exec(e)}function An(e){e=e.replace(Kt,``).replace(qt,``).toLowerCase();var n=!1;if(gn[e])e=gn[e],n=!0;else if(e==`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var r;return(r=On.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=On.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=On.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=On.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=On.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=On.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=On.hex8.exec(e))?{r:xn(r[1]),g:xn(r[2]),b:xn(r[3]),a:Dn(r[4]),format:n?`name`:`hex8`}:(r=On.hex6.exec(e))?{r:xn(r[1]),g:xn(r[2]),b:xn(r[3]),format:n?`name`:`hex`}:(r=On.hex4.exec(e))?{r:xn(r[1]+``+r[1]),g:xn(r[2]+``+r[2]),b:xn(r[3]+``+r[3]),a:Dn(r[4]+``+r[4]),format:n?`name`:`hex8`}:(r=On.hex3.exec(e))?{r:xn(r[1]+``+r[1]),g:xn(r[2]+``+r[2]),b:xn(r[3]+``+r[3]),format:n?`name`:`hex`}:!1}function jn(e){var n,r;return e||={level:`AA`,size:`small`},n=(e.level||`AA`).toUpperCase(),r=(e.size||`small`).toLowerCase(),n!==`AA`&&n!==`AAA`&&(n=`AA`),r!==`small`&&r!==`large`&&(r=`small`),{level:n,size:r}}function Mn(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function Nn(e){if(Array.isArray(e))return Mn(e)}function Pn(e,n,r){if(typeof e==`function`?e===n:e.has(n))return arguments.length<3?n:r;throw TypeError(`Private element is not present on this object`)}function Fn(e,n){if(n.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function In(e,n){if(!(e instanceof n))throw TypeError(`Cannot call a class as a function`)}function Ln(e,n){return e.get(Pn(e,n))}function Rn(e,n,r){Fn(e,n),n.set(e,r)}function zn(e,n,r){return e.set(Pn(e,n),r),r}function Bn(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,Kn(i.key),i)}}function Vn(e,n,r){return n&&Bn(e.prototype,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Hn(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Un(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{vn as n}from"./DocumentContext-CXfBU9-L.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./button-RQ5o7P7w.js";import{a as l,c as ee,i as u,n as d,o as f,s as p,t as m}from"./dialog-FGMqkFjm.js";import{t as h}from"./label-G0lbYOgL.js";import{a as g,i as _,n as v,o as y,r as b,s as x,t as te}from"./select-BUOcREjn.js";import{n as S,t as ne}from"./radio-group-MAC3jHHk.js";import{i as C,n as w,r as T,t as re}from"./tabs-BKX_R3ed.js";import{t as E}from"./createLucideIcon-DihYAFEK.js";import{t as ie}from"./git-branch-le6ClqcQ.js";import{t as ae}from"./folder-DcWlgZbb.js";import{t as oe}from"./loader-circle-DJ1nzSAL.js";import{n as se,r as D,t as O}from"./use-skill-directory-BBfJIjk2.js";import{n as k}from"./dist-uN7pEWl0.js";import{t as A}from"./input-Cm94Cun3.js";import{t as j}from"./dist-CzC3AWOn.js";import{d as ce,t as le}from"./skill-scope-CmujX5gW.js";import{E as ue,k as de,r as fe,u as M}from"./skills-api-BeHeMfn9.js";import{t as N}from"./skeleton-CD1oYYfF.js";import{n as pe,r as P,t as me}from"./input-group-DY7bardr.js";var F=E(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),he=o(),I=e(r(),1),L=t(),ge=[`s1`,`s2`,`s3`,`s4`,`s5`,`s6`,`s7`,`s8`],_e=[{label:{id:`f8fH8W`},query:`design`},{label:{id:`-ySLQJ`},query:`git`},{label:{id:`qIJIrD`},query:`test`},{label:{id:`8Uv5e6`},query:`agent`},{label:{id:`UDb2YD`},query:`react`},{label:{id:`TbjyhA`},query:`docs`},{label:{id:`9wQrUU`},query:`refactor`},{label:{id:`HKH-W-`},query:`data`},{label:{id:`43qzxu`},query:`devops`},{label:{id:`a3LDKx`},query:`security`}];function R(e){let t=(0,he.c)(57),{scope:r,onNavigate:o}=e,{_:s}=a(),l;t[0]!==o||t[1]!==r?(l={scope:r,onNavigate:o},t[0]=o,t[1]=r,t[2]=l):l=t[2];let{importedEntry:ee,openResult:u}=O(l),[d,f]=(0,I.useState)(``),p;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],t[3]=p):p=t[3];let[m,h]=(0,I.useState)(p),[S,ne]=(0,I.useState)(!1),[C,w]=(0,I.useState)(`idle`),[T,re]=(0,I.useState)(`relevance`),{skills:E}=se(),ie,ae;t[4]===d?(ie=t[5],ae=t[6]):(ie=()=>{let e=d.trim();if(e.length<2){h([]),w(`idle`);return}let t=!1;w(`searching`);let n=setTimeout(()=>{ue(e).then(e=>{if(!t){if(!e.ok){w(`error`),h([]),ne(!1);return}h(e.results),ne(e.degraded),w(`idle`)}})},300);return()=>{t=!0,clearTimeout(n)}},ae=[d],t[4]=d,t[5]=ie,t[6]=ae),(0,I.useEffect)(ie,ae);let oe;t[7]===d?oe=t[8]:(oe=d.trim(),t[7]=d,t[8]=oe);let k=oe,A;t[9]!==m||t[10]!==T?(A=T===`installs`?[...m].sort(ye):m,t[9]=m,t[10]=T,t[11]=A):A=t[11];let j=A,ce;t[12]!==ee||t[13]!==u?(ce=e=>(0,L.jsx)(D,{result:e,imported:ee(e),onOpen:()=>u(e)},e.id),t[12]=ee,t[13]=u,t[14]=ce):ce=t[14];let le=ce,de;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,L.jsx)(pe,{align:`inline-start`,children:(0,L.jsx)(n,{"aria-hidden":`true`})}),t[15]=de):de=t[15];let fe;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(fe=e=>f(e.target.value),t[16]=fe):fe=t[16];let M;t[17]===s?M=t[18]:(M=s({id:`BlLxpG`}),t[17]=s,t[18]=M);let N;t[19]===s?N=t[20]:(N=s({id:`BlLxpG`}),t[19]=s,t[20]=N);let F;t[21]!==d||t[22]!==M||t[23]!==N?(F=(0,L.jsxs)(me,{className:`h-9 flex-1`,children:[de,(0,L.jsx)(P,{value:d,onChange:fe,placeholder:M,"aria-label":N})]}),t[21]=d,t[22]=M,t[23]=N,t[24]=F):F=t[24];let R;t[25]!==s||t[26]!==k.length||t[27]!==m||t[28]!==T||t[29]!==C?(R=k.length>=2&&C===`idle`&&m.length>0?(0,L.jsxs)(te,{value:T,onValueChange:e=>re(e),children:[(0,L.jsx)(y,{className:`h-9! w-40 shrink-0`,"aria-label":s({id:`eUFXS1`}),children:(0,L.jsx)(x,{})}),(0,L.jsx)(v,{children:(0,L.jsxs)(b,{children:[(0,L.jsx)(g,{children:s({id:`_HgF9q`})}),(0,L.jsx)(_,{value:`relevance`,children:s({id:`7dZnmw`})}),(0,L.jsx)(_,{value:`installs`,children:s({id:`tc65fD`})})]})})]}):null,t[25]=s,t[26]=k.length,t[27]=m,t[28]=T,t[29]=C,t[30]=R):R=t[30];let z;t[31]!==F||t[32]!==R?(z=(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[F,R]}),t[31]=F,t[32]=R,t[33]=z):z=t[33];let B;t[34]!==s||t[35]!==d?(B=_e.map(e=>{let t=d.trim().split(/\s+/).filter(Boolean),n=t.includes(e.query);return(0,L.jsx)(c,{variant:n?`secondary`:`outline`,size:`sm`,"aria-pressed":n,className:`h-6 shrink-0 rounded-full data-[active=true]:border-foreground/30`,"data-active":n,onClick:()=>f((n?t.filter(t=>t!==e.query):[...t,e.query]).join(` `)),children:s(e.label)},e.query)}),t[34]=s,t[35]=d,t[36]=B):B=t[36];let V;t[37]===B?V=t[38]:(V=(0,L.jsx)(`div`,{className:`flex shrink-0 gap-2 overflow-x-auto scroll-fade-mask-x [scrollbar-width:none]`,children:B}),t[37]=B,t[38]=V);let H;t[39]!==S||t[40]!==k.length?(H=S&&k.length>=2?(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:(0,L.jsx)(i,{id:`MBKkUy`})}):null,t[39]=S,t[40]=k.length,t[41]=H):H=t[41];let U;t[42]!==E||t[43]!==k.length||t[44]!==le||t[45]!==m||t[46]!==j||t[47]!==C?(U=k.length<2?E.length>0?(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`h3`,{className:`font-mono text-2xs uppercase tracking-wider text-muted-foreground`,children:(0,L.jsx)(i,{id:`gL_sdV`})}),(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,children:E.map(le)})]}):null:C===`searching`?(0,L.jsxs)(`div`,{"aria-busy":`true`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:(0,L.jsx)(i,{id:`WRNXKp`})}),(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,"aria-hidden":!0,children:ge.map(ve)})]}):C===`error`?(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:(0,L.jsx)(i,{id:`yg_6wQ`})}):m.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`8t9T3-`})}):(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,children:j.map(le)}),t[42]=E,t[43]=k.length,t[44]=le,t[45]=m,t[46]=j,t[47]=C,t[48]=U):U=t[48];let W;t[49]===U?W=t[50]:(W=(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto subtle-scrollbar scroll-fade-mask`,children:U}),t[49]=U,t[50]=W);let G;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,L.jsx)(`p`,{className:`-mb-3.5 shrink-0 text-center text-[11px] text-muted-foreground/80`,children:(0,L.jsx)(i,{id:`fg1U4e`,components:{0:(0,L.jsx)(`a`,{href:`https://skills.sh`,target:`_blank`,rel:`noreferrer`,className:`underline hover:text-foreground`})}})}),t[51]=G):G=t[51];let K;return t[52]!==z||t[53]!==V||t[54]!==H||t[55]!==W?(K=(0,L.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[z,V,H,W,G]}),t[52]=z,t[53]=V,t[54]=H,t[55]=W,t[56]=K):K=t[56],K}function ve(e){return(0,L.jsx)(N,{className:`h-[72px] rounded-xl`},e)}function ye(e,t){return(t.installs??-1)-(e.installs??-1)}function z(e,t){t.alreadyImported?k.success(e===`upload`?j._({id:`tA2-xC`,values:{0:t.name}}):j._({id:`8AjnFz`,values:{0:t.name}})):t.collisionRenamedFrom?k.success(e===`upload`?j._({id:`EPGePE`,values:{0:t.name,1:t.collisionRenamedFrom}}):j._({id:`C0Ciaj`,values:{0:t.name,1:t.collisionRenamedFrom}})):k.success(e===`upload`?j._({id:`Pg83C9`,values:{0:t.name}}):j._({id:`qFKsNl`,values:{0:t.name}}));for(let e of t.warnings??[])k.warning(e)}var B=`flex items-start justify-between gap-3 rounded-md border p-3 text-sm font-normal transition-colors cursor-pointer`;function V(e){let t=(0,he.c)(122),{defaultScope:n,onOpenChange:r,onImported:o}=e,{_:l}=a(),ee=(0,I.useId)(),u=(0,I.useId)(),p=(0,I.useId)(),m=(0,I.useId)(),g=(0,I.useId)(),b=ce(),[C,w]=(0,I.useState)(n),[T,re]=(0,I.useState)(`remote`),[E,se]=(0,I.useState)(``),[D,O]=(0,I.useState)(``),[j,ue]=(0,I.useState)(null),[N,pe]=(0,I.useState)(!1),[P,me]=(0,I.useState)(null),[ge,_e]=(0,I.useState)(!1),[R,ve]=(0,I.useState)(!1),ye=(0,I.useRef)(null),V,G;t[0]===T?(V=t[1],G=t[2]):(V=()=>{let e=ye.current;e&&(T===`folder`?(e.setAttribute(`webkitdirectory`,``),e.setAttribute(`directory`,``)):(e.removeAttribute(`webkitdirectory`),e.removeAttribute(`directory`)))},G=[T],t[0]=T,t[1]=V,t[2]=G),(0,I.useEffect)(V,G);let K;t[3]===E?K=t[4]:(K=E.trim(),t[3]=E,t[4]=K);let q=K,J=T===`zip`||T===`folder`,be=j?.[0]?.webkitRelativePath?.split(`/`)[0]??``,xe,Se;t[5]!==J||t[6]!==q?(xe=()=>{if(J||q===``){me(null),_e(!1),ve(!1),O(``);return}let e=!1,t=new AbortController;_e(!0),ve(!1);let n=setTimeout(()=>{fe(q,t.signal).then(t=>{if(!e){if(_e(!1),!t.ok){me(null),O(``),ve(!0);return}ve(!1),me(t.skills),O(t.skills.length>1?t.skills[0].name:``)}})},500);return()=>{e=!0,t.abort(),clearTimeout(n)}},Se=[q,J],t[5]=J,t[6]=q,t[7]=xe,t[8]=Se):(xe=t[7],Se=t[8]),(0,I.useEffect)(xe,Se);let Ce=!N&&(J?j!==null&&j.length>0:q!==``),we;t[9]!==l||t[10]!==Ce||t[11]!==j||t[12]!==J||t[13]!==o||t[14]!==r||t[15]!==C||t[16]!==D||t[17]!==T||t[18]!==q?(we=async function(){if(!Ce)return;if(pe(!0),J&&j!==null){let e=new FormData;if(T===`zip`)e.append(`file`,j[0]);else for(let t of Array.from(j))e.append(`files`,t,t.webkitRelativePath||t.name);let t=await de(e,C);if(pe(!1),!t.ok){k.error(l({id:`Z8nach`,values:{0:t.error}}));return}z(`upload`,t),o({scope:C,name:t.name}),r(!1);return}let e=await M({source:q,...D.trim()===``?{}:{skill:D.trim()},scope:C});if(pe(!1),!e.ok){if(e.skills&&e.skills.length>1){me(e.skills.map(W)),O(e.skills[0]),k.info(l({id:`iYUTsI`}));return}k.error(l({id:`kfL8BJ`,values:{0:e.error}}));return}z(`import`,e),o({scope:C,name:e.name}),r(!1)},t[9]=l,t[10]=Ce,t[11]=j,t[12]=J,t[13]=o,t[14]=r,t[15]=C,t[16]=D,t[17]=T,t[18]=q,t[19]=we):we=t[19];let Te=we,Ee=d,De;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,L.jsx)(i,{id:`aBgwis`}),t[20]=De):De=t[20];let Y;t[21]===m?Y=t[22]:(Y=(0,L.jsx)(h,{htmlFor:m,children:De}),t[21]=m,t[22]=Y);let Oe;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=e=>w(e),t[23]=Oe):Oe=t[23];let ke;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,L.jsx)(x,{}),t[24]=ke):ke=t[24];let X;t[25]===m?X=t[26]:(X=(0,L.jsx)(y,{id:m,className:`w-full`,children:ke}),t[25]=m,t[26]=X);let Z;t[27]===b?Z=t[28]:(Z=le.map(e=>(0,L.jsx)(_,{value:e,children:b[e]},e)),t[27]=b,t[28]=Z);let Ae;t[29]===Z?Ae=t[30]:(Ae=(0,L.jsx)(v,{children:Z}),t[29]=Z,t[30]=Ae);let je;t[31]!==C||t[32]!==X||t[33]!==Ae?(je=(0,L.jsxs)(te,{value:C,onValueChange:Oe,children:[X,Ae]}),t[31]=C,t[32]=X,t[33]=Ae,t[34]=je):je=t[34];let Me;t[35]!==je||t[36]!==Y?(Me=(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Y,je]}),t[35]=je,t[36]=Y,t[37]=Me):Me=t[37];let Ne;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,L.jsx)(i,{id:`wdxz7K`}),t[38]=Ne):Ne=t[38];let Pe;t[39]===u?Pe=t[40]:(Pe=(0,L.jsx)(h,{id:u,children:Ne}),t[39]=u,t[40]=Pe);let Fe;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=e=>{re(e),ue(null)},t[41]=Fe):Fe=t[41];let Ie=`${u}-remote`,Le=T===`remote`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,Re;t[42]===Le?Re=t[43]:(Re=s(B,Le),t[42]=Le,t[43]=Re);let ze;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(ie,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`qlAIQ1`})]}),t[44]=ze):ze=t[44];let Be;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[ze,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`9m4D_h`})})]}),t[45]=Be):Be=t[45];let Ve=`${u}-remote`,He;t[46]===Ve?He=t[47]:(He=(0,L.jsx)(S,{id:Ve,value:`remote`,className:`mt-0.5`}),t[46]=Ve,t[47]=He);let Ue;t[48]!==Ie||t[49]!==Re||t[50]!==He?(Ue=(0,L.jsxs)(h,{htmlFor:Ie,className:Re,children:[Be,He]}),t[48]=Ie,t[49]=Re,t[50]=He,t[51]=Ue):Ue=t[51];let We=`${u}-zip`,Ge=T===`zip`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,Ke;t[52]===Ge?Ke=t[53]:(Ke=s(B,Ge),t[52]=Ge,t[53]=Ke);let qe;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(F,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`Fr8JGg`})]}),t[54]=qe):qe=t[54];let Je;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[qe,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`hQjvzi`})})]}),t[55]=Je):Je=t[55];let Ye=`${u}-zip`,Xe;t[56]===Ye?Xe=t[57]:(Xe=(0,L.jsx)(S,{id:Ye,value:`zip`,className:`mt-0.5`}),t[56]=Ye,t[57]=Xe);let Ze;t[58]!==We||t[59]!==Ke||t[60]!==Xe?(Ze=(0,L.jsxs)(h,{htmlFor:We,className:Ke,children:[Je,Xe]}),t[58]=We,t[59]=Ke,t[60]=Xe,t[61]=Ze):Ze=t[61];let Qe=`${u}-folder`,$e=T===`folder`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,et;t[62]===$e?et=t[63]:(et=s(B,$e),t[62]=$e,t[63]=et);let tt;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(ae,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`kNqMMd`})]}),t[64]=tt):tt=t[64];let nt;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[tt,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`UPWItY`})})]}),t[65]=nt):nt=t[65];let rt=`${u}-folder`,it;t[66]===rt?it=t[67]:(it=(0,L.jsx)(S,{id:rt,value:`folder`,className:`mt-0.5`}),t[66]=rt,t[67]=it);let at;t[68]!==Qe||t[69]!==et||t[70]!==it?(at=(0,L.jsxs)(h,{htmlFor:Qe,className:et,children:[nt,it]}),t[68]=Qe,t[69]=et,t[70]=it,t[71]=at):at=t[71];let ot;t[72]!==T||t[73]!==u||t[74]!==Ue||t[75]!==Ze||t[76]!==at?(ot=(0,L.jsxs)(ne,{value:T,onValueChange:Fe,"aria-labelledby":u,className:`grid-cols-1 gap-2 sm:grid-cols-3 mb-2`,children:[Ue,Ze,at]}),t[72]=T,t[73]=u,t[74]=Ue,t[75]=Ze,t[76]=at,t[77]=ot):ot=t[77];let st=J?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(A,{ref:ye,id:g,"aria-label":l(T===`zip`?{id:`wErce0`}:{id:`VJaBca`}),type:`file`,"data-testid":`skill-upload-input`,accept:T===`zip`?`.zip,.skill`:void 0,onChange:e=>ue(e.target.files),className:`sr-only`},T),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(c,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>ye.current?.click(),children:T===`zip`?(0,L.jsx)(i,{id:`-yPBXI`}):(0,L.jsx)(i,{id:`TgZOXj`})}),(0,L.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,"data-testid":`skill-upload-filename`,children:j&&j.length>0?T===`folder`?j.length===1?l({id:`BGtzlf`,values:{uploadFolderName:be}}):l({id:`K7NMEc`,values:{0:j.length,uploadFolderName:be}}):j[0].name:(0,L.jsx)(i,{id:`hqCwRf`})})]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(A,{id:ee,"aria-label":l({id:`cLP0Lf`}),"data-testid":`skill-import-source-input`,value:E,onChange:e=>se(e.target.value),onKeyDown:e=>{e.key===`Enter`&&Te()},placeholder:l({id:`gv5w9J`}),className:`font-mono`}),ge||R||P&&P.length===1?(0,L.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:ge?(0,L.jsx)(i,{id:`K4G55s`}):R?(0,L.jsx)(i,{id:`XgqUOy`}):P&&P.length===1?(0,L.jsx)(i,{id:`WpE38V`,values:{0:P[0].name}}):null}):null]}),ct;t[78]!==Pe||t[79]!==ot||t[80]!==st?(ct=(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Pe,ot,st]}),t[78]=Pe,t[79]=ot,t[80]=st,t[81]=ct):ct=t[81];let lt;t[82]!==P||t[83]!==J||t[84]!==D||t[85]!==p?(lt=!J&&P&&P.length>1?(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(h,{htmlFor:p,children:(0,L.jsx)(i,{id:`FCMaBz`})}),(0,L.jsxs)(te,{value:D,onValueChange:O,children:[(0,L.jsx)(y,{id:p,size:`sm`,className:`w-full`,"data-testid":`skill-import-pick`,children:(0,L.jsx)(x,{})}),(0,L.jsx)(v,{children:P.map(U)})]}),(0,L.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`xtJgSe`})})]}):null,t[82]=P,t[83]=J,t[84]=D,t[85]=p,t[86]=lt):lt=t[86];let ut;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,L.jsx)(`p`,{className:`font-medium text-xs font-mono text-muted-foreground/80 uppercase tracking-wider`,children:(0,L.jsx)(i,{id:`DWJtEo`})}),t[87]=ut):ut=t[87];let dt;t[88]===C?dt=t[89]:(dt=(0,L.jsx)(`li`,{children:C===`project`?(0,L.jsx)(i,{id:`rucNcu`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] text-foreground/80`})}}):(0,L.jsx)(i,{id:`vjW-SM`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] text-foreground/80`})}})}),t[88]=C,t[89]=dt);let ft,pt;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,L.jsx)(`li`,{children:(0,L.jsx)(i,{id:`tqQBwN`})}),pt=(0,L.jsx)(`li`,{children:(0,L.jsx)(i,{id:`QB-moX`})}),t[90]=ft,t[91]=pt):(ft=t[90],pt=t[91]);let Q;t[92]===dt?Q=t[93]:(Q=(0,L.jsxs)(`div`,{role:`note`,className:`space-y-3`,"data-testid":`skill-import-disclosure`,children:[ut,(0,L.jsxs)(`ul`,{className:`list-disc space-y-2.5 pl-4 text-sm text-muted-foreground marker:text-muted-foreground/50`,children:[dt,ft,pt]})]}),t[92]=dt,t[93]=Q);let mt;t[94]!==Ee||t[95]!==Me||t[96]!==ct||t[97]!==lt||t[98]!==Q?(mt=(0,L.jsxs)(Ee,{className:`flex flex-col gap-6`,children:[Me,ct,lt,Q]}),t[94]=Ee,t[95]=Me,t[96]=ct,t[97]=lt,t[98]=Q,t[99]=mt):mt=t[99];let ht;t[100]===r?ht=t[101]:(ht=()=>r(!1),t[100]=r,t[101]=ht);let gt;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(gt=(0,L.jsx)(i,{id:`dEgA5A`}),t[102]=gt):gt=t[102];let _t;t[103]!==N||t[104]!==ht?(_t=(0,L.jsx)(c,{variant:`outline`,className:`font-mono uppercase`,onMouseDown:H,onClick:ht,disabled:N,children:gt}),t[103]=N,t[104]=ht,t[105]=_t):_t=t[105];let vt=J?`skill-upload-button`:`skill-import-button`,yt;t[106]===Te?yt=t[107]:(yt=()=>void Te(),t[106]=Te,t[107]=yt);let bt=!Ce,xt;t[108]!==N||t[109]!==J?(xt=N?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(oe,{className:`size-4 animate-spin`}),J?(0,L.jsx)(i,{id:`_eguJc`}):(0,L.jsx)(i,{id:`RqSvT0`})]}):J?(0,L.jsx)(i,{id:`ONWvwQ`}):(0,L.jsx)(i,{id:`l3s5ri`}),t[108]=N,t[109]=J,t[110]=xt):xt=t[110];let St;t[111]!==vt||t[112]!==yt||t[113]!==bt||t[114]!==xt?(St=(0,L.jsx)(c,{"data-testid":vt,onClick:yt,disabled:bt,children:xt}),t[111]=vt,t[112]=yt,t[113]=bt,t[114]=xt,t[115]=St):St=t[115];let $;t[116]!==_t||t[117]!==St?($=(0,L.jsxs)(f,{children:[_t,St]}),t[116]=_t,t[117]=St,t[118]=$):$=t[118];let Ct;return t[119]!==mt||t[120]!==$?(Ct=(0,L.jsxs)(L.Fragment,{children:[mt,$]}),t[119]=mt,t[120]=$,t[121]=Ct):Ct=t[121],Ct}function H(e){return e.preventDefault()}function U(e){return(0,L.jsx)(_,{value:e.name,children:e.name},e.name)}function W(e){return{name:e,description:null}}function G(e){let t=(0,he.c)(21),{defaultScope:n,open:r,onOpenChange:a,defaultTab:o,onImported:s}=e,c=o===void 0?`skills-sh`:o,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,L.jsx)(ee,{children:(0,L.jsx)(i,{id:`GBQjiV`})}),t[0]=d):d=t[0];let f;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,L.jsxs)(p,{children:[d,(0,L.jsx)(l,{className:`sr-only`,children:(0,L.jsx)(i,{id:`qTcVwj`})})]}),t[1]=f):f=t[1];let h;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,L.jsx)(C,{variant:`line`,value:`skills-sh`,children:(0,L.jsx)(i,{id:`8tjQCz`})}),t[2]=h):h=t[2];let g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,L.jsxs)(T,{variant:`line`,className:`w-full justify-start gap-4 border-b p-0`,children:[h,(0,L.jsx)(C,{variant:`line`,value:`upload`,children:(0,L.jsx)(i,{id:`ONWvwQ`})})]}),t[3]=g):g=t[3];let _;t[4]===a?_=t[5]:(_=()=>a(!1),t[4]=a,t[5]=_);let v;t[6]!==n||t[7]!==_?(v=(0,L.jsx)(w,{value:`skills-sh`,className:`h-[62vh] min-h-0 flex-none`,children:(0,L.jsx)(R,{scope:n,onNavigate:_})}),t[6]=n,t[7]=_,t[8]=v):v=t[8];let y;t[9]!==n||t[10]!==s||t[11]!==a?(y=(0,L.jsx)(w,{value:`upload`,className:`mt-3 flex min-h-0 flex-1 flex-col gap-6`,children:(0,L.jsx)(V,{defaultScope:n,onOpenChange:a,onImported:s})}),t[9]=n,t[10]=s,t[11]=a,t[12]=y):y=t[12];let b;t[13]!==c||t[14]!==v||t[15]!==y?(b=(0,L.jsxs)(u,{className:`flex max-h-[85vh] flex-col gap-4 sm:max-w-4xl`,children:[f,(0,L.jsxs)(re,{defaultValue:c,className:`flex min-h-0 flex-1 flex-col gap-3`,children:[g,v,y]})]}),t[13]=c,t[14]=v,t[15]=y,t[16]=b):b=t[16];let x;return t[17]!==a||t[18]!==r||t[19]!==b?(x=(0,L.jsx)(m,{open:r,onOpenChange:a,children:b}),t[17]=a,t[18]=r,t[19]=b,t[20]=x):x=t[20],x}export{G as ImportSkillDialog};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{yn as n}from"./DocumentContext-UuXLA8HR.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./utils-CPqDy6Hr.js";import{t as c}from"./button-RQ5o7P7w.js";import{a as l,c as ee,i as u,n as d,o as f,s as p,t as m}from"./dialog-FGMqkFjm.js";import{t as h}from"./label-G0lbYOgL.js";import{a as g,i as _,n as v,o as y,r as b,s as x,t as te}from"./select-BUOcREjn.js";import{n as S,t as ne}from"./radio-group-MAC3jHHk.js";import{i as C,n as w,r as T,t as re}from"./tabs-BKX_R3ed.js";import{t as E}from"./createLucideIcon-DihYAFEK.js";import{t as ie}from"./git-branch-le6ClqcQ.js";import{t as ae}from"./folder-DcWlgZbb.js";import{t as oe}from"./loader-circle-DJ1nzSAL.js";import{n as se,r as D,t as O}from"./use-skill-directory-GoiBc97k.js";import{n as k}from"./dist-uN7pEWl0.js";import{t as A}from"./input-Cm94Cun3.js";import{t as j}from"./dist-CzC3AWOn.js";import{d as ce,t as le}from"./skill-scope-CmujX5gW.js";import{E as ue,k as de,r as fe,u as M}from"./skills-api-BeHeMfn9.js";import{t as N}from"./skeleton-CD1oYYfF.js";import{n as pe,r as P,t as me}from"./input-group-DY7bardr.js";var F=E(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),he=o(),I=e(r(),1),L=t(),ge=[`s1`,`s2`,`s3`,`s4`,`s5`,`s6`,`s7`,`s8`],_e=[{label:{id:`f8fH8W`},query:`design`},{label:{id:`-ySLQJ`},query:`git`},{label:{id:`qIJIrD`},query:`test`},{label:{id:`8Uv5e6`},query:`agent`},{label:{id:`UDb2YD`},query:`react`},{label:{id:`TbjyhA`},query:`docs`},{label:{id:`9wQrUU`},query:`refactor`},{label:{id:`HKH-W-`},query:`data`},{label:{id:`43qzxu`},query:`devops`},{label:{id:`a3LDKx`},query:`security`}];function R(e){let t=(0,he.c)(57),{scope:r,onNavigate:o}=e,{_:s}=a(),l;t[0]!==o||t[1]!==r?(l={scope:r,onNavigate:o},t[0]=o,t[1]=r,t[2]=l):l=t[2];let{importedEntry:ee,openResult:u}=O(l),[d,f]=(0,I.useState)(``),p;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],t[3]=p):p=t[3];let[m,h]=(0,I.useState)(p),[S,ne]=(0,I.useState)(!1),[C,w]=(0,I.useState)(`idle`),[T,re]=(0,I.useState)(`relevance`),{skills:E}=se(),ie,ae;t[4]===d?(ie=t[5],ae=t[6]):(ie=()=>{let e=d.trim();if(e.length<2){h([]),w(`idle`);return}let t=!1;w(`searching`);let n=setTimeout(()=>{ue(e).then(e=>{if(!t){if(!e.ok){w(`error`),h([]),ne(!1);return}h(e.results),ne(e.degraded),w(`idle`)}})},300);return()=>{t=!0,clearTimeout(n)}},ae=[d],t[4]=d,t[5]=ie,t[6]=ae),(0,I.useEffect)(ie,ae);let oe;t[7]===d?oe=t[8]:(oe=d.trim(),t[7]=d,t[8]=oe);let k=oe,A;t[9]!==m||t[10]!==T?(A=T===`installs`?[...m].sort(ye):m,t[9]=m,t[10]=T,t[11]=A):A=t[11];let j=A,ce;t[12]!==ee||t[13]!==u?(ce=e=>(0,L.jsx)(D,{result:e,imported:ee(e),onOpen:()=>u(e)},e.id),t[12]=ee,t[13]=u,t[14]=ce):ce=t[14];let le=ce,de;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,L.jsx)(pe,{align:`inline-start`,children:(0,L.jsx)(n,{"aria-hidden":`true`})}),t[15]=de):de=t[15];let fe;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(fe=e=>f(e.target.value),t[16]=fe):fe=t[16];let M;t[17]===s?M=t[18]:(M=s({id:`BlLxpG`}),t[17]=s,t[18]=M);let N;t[19]===s?N=t[20]:(N=s({id:`BlLxpG`}),t[19]=s,t[20]=N);let F;t[21]!==d||t[22]!==M||t[23]!==N?(F=(0,L.jsxs)(me,{className:`h-9 flex-1`,children:[de,(0,L.jsx)(P,{value:d,onChange:fe,placeholder:M,"aria-label":N})]}),t[21]=d,t[22]=M,t[23]=N,t[24]=F):F=t[24];let R;t[25]!==s||t[26]!==k.length||t[27]!==m||t[28]!==T||t[29]!==C?(R=k.length>=2&&C===`idle`&&m.length>0?(0,L.jsxs)(te,{value:T,onValueChange:e=>re(e),children:[(0,L.jsx)(y,{className:`h-9! w-40 shrink-0`,"aria-label":s({id:`eUFXS1`}),children:(0,L.jsx)(x,{})}),(0,L.jsx)(v,{children:(0,L.jsxs)(b,{children:[(0,L.jsx)(g,{children:s({id:`_HgF9q`})}),(0,L.jsx)(_,{value:`relevance`,children:s({id:`7dZnmw`})}),(0,L.jsx)(_,{value:`installs`,children:s({id:`tc65fD`})})]})})]}):null,t[25]=s,t[26]=k.length,t[27]=m,t[28]=T,t[29]=C,t[30]=R):R=t[30];let z;t[31]!==F||t[32]!==R?(z=(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[F,R]}),t[31]=F,t[32]=R,t[33]=z):z=t[33];let B;t[34]!==s||t[35]!==d?(B=_e.map(e=>{let t=d.trim().split(/\s+/).filter(Boolean),n=t.includes(e.query);return(0,L.jsx)(c,{variant:n?`secondary`:`outline`,size:`sm`,"aria-pressed":n,className:`h-6 shrink-0 rounded-full data-[active=true]:border-foreground/30`,"data-active":n,onClick:()=>f((n?t.filter(t=>t!==e.query):[...t,e.query]).join(` `)),children:s(e.label)},e.query)}),t[34]=s,t[35]=d,t[36]=B):B=t[36];let V;t[37]===B?V=t[38]:(V=(0,L.jsx)(`div`,{className:`flex shrink-0 gap-2 overflow-x-auto scroll-fade-mask-x [scrollbar-width:none]`,children:B}),t[37]=B,t[38]=V);let H;t[39]!==S||t[40]!==k.length?(H=S&&k.length>=2?(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:(0,L.jsx)(i,{id:`MBKkUy`})}):null,t[39]=S,t[40]=k.length,t[41]=H):H=t[41];let U;t[42]!==E||t[43]!==k.length||t[44]!==le||t[45]!==m||t[46]!==j||t[47]!==C?(U=k.length<2?E.length>0?(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`h3`,{className:`font-mono text-2xs uppercase tracking-wider text-muted-foreground`,children:(0,L.jsx)(i,{id:`gL_sdV`})}),(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,children:E.map(le)})]}):null:C===`searching`?(0,L.jsxs)(`div`,{"aria-busy":`true`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:(0,L.jsx)(i,{id:`WRNXKp`})}),(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,"aria-hidden":!0,children:ge.map(ve)})]}):C===`error`?(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:(0,L.jsx)(i,{id:`yg_6wQ`})}):m.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`8t9T3-`})}):(0,L.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,children:j.map(le)}),t[42]=E,t[43]=k.length,t[44]=le,t[45]=m,t[46]=j,t[47]=C,t[48]=U):U=t[48];let W;t[49]===U?W=t[50]:(W=(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto subtle-scrollbar scroll-fade-mask`,children:U}),t[49]=U,t[50]=W);let G;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,L.jsx)(`p`,{className:`-mb-3.5 shrink-0 text-center text-[11px] text-muted-foreground/80`,children:(0,L.jsx)(i,{id:`fg1U4e`,components:{0:(0,L.jsx)(`a`,{href:`https://skills.sh`,target:`_blank`,rel:`noreferrer`,className:`underline hover:text-foreground`})}})}),t[51]=G):G=t[51];let K;return t[52]!==z||t[53]!==V||t[54]!==H||t[55]!==W?(K=(0,L.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[z,V,H,W,G]}),t[52]=z,t[53]=V,t[54]=H,t[55]=W,t[56]=K):K=t[56],K}function ve(e){return(0,L.jsx)(N,{className:`h-[72px] rounded-xl`},e)}function ye(e,t){return(t.installs??-1)-(e.installs??-1)}function z(e,t){t.alreadyImported?k.success(e===`upload`?j._({id:`tA2-xC`,values:{0:t.name}}):j._({id:`8AjnFz`,values:{0:t.name}})):t.collisionRenamedFrom?k.success(e===`upload`?j._({id:`EPGePE`,values:{0:t.name,1:t.collisionRenamedFrom}}):j._({id:`C0Ciaj`,values:{0:t.name,1:t.collisionRenamedFrom}})):k.success(e===`upload`?j._({id:`Pg83C9`,values:{0:t.name}}):j._({id:`qFKsNl`,values:{0:t.name}}));for(let e of t.warnings??[])k.warning(e)}var B=`flex items-start justify-between gap-3 rounded-md border p-3 text-sm font-normal transition-colors cursor-pointer`;function V(e){let t=(0,he.c)(122),{defaultScope:n,onOpenChange:r,onImported:o}=e,{_:l}=a(),ee=(0,I.useId)(),u=(0,I.useId)(),p=(0,I.useId)(),m=(0,I.useId)(),g=(0,I.useId)(),b=ce(),[C,w]=(0,I.useState)(n),[T,re]=(0,I.useState)(`remote`),[E,se]=(0,I.useState)(``),[D,O]=(0,I.useState)(``),[j,ue]=(0,I.useState)(null),[N,pe]=(0,I.useState)(!1),[P,me]=(0,I.useState)(null),[ge,_e]=(0,I.useState)(!1),[R,ve]=(0,I.useState)(!1),ye=(0,I.useRef)(null),V,G;t[0]===T?(V=t[1],G=t[2]):(V=()=>{let e=ye.current;e&&(T===`folder`?(e.setAttribute(`webkitdirectory`,``),e.setAttribute(`directory`,``)):(e.removeAttribute(`webkitdirectory`),e.removeAttribute(`directory`)))},G=[T],t[0]=T,t[1]=V,t[2]=G),(0,I.useEffect)(V,G);let K;t[3]===E?K=t[4]:(K=E.trim(),t[3]=E,t[4]=K);let q=K,J=T===`zip`||T===`folder`,be=j?.[0]?.webkitRelativePath?.split(`/`)[0]??``,xe,Se;t[5]!==J||t[6]!==q?(xe=()=>{if(J||q===``){me(null),_e(!1),ve(!1),O(``);return}let e=!1,t=new AbortController;_e(!0),ve(!1);let n=setTimeout(()=>{fe(q,t.signal).then(t=>{if(!e){if(_e(!1),!t.ok){me(null),O(``),ve(!0);return}ve(!1),me(t.skills),O(t.skills.length>1?t.skills[0].name:``)}})},500);return()=>{e=!0,t.abort(),clearTimeout(n)}},Se=[q,J],t[5]=J,t[6]=q,t[7]=xe,t[8]=Se):(xe=t[7],Se=t[8]),(0,I.useEffect)(xe,Se);let Ce=!N&&(J?j!==null&&j.length>0:q!==``),we;t[9]!==l||t[10]!==Ce||t[11]!==j||t[12]!==J||t[13]!==o||t[14]!==r||t[15]!==C||t[16]!==D||t[17]!==T||t[18]!==q?(we=async function(){if(!Ce)return;if(pe(!0),J&&j!==null){let e=new FormData;if(T===`zip`)e.append(`file`,j[0]);else for(let t of Array.from(j))e.append(`files`,t,t.webkitRelativePath||t.name);let t=await de(e,C);if(pe(!1),!t.ok){k.error(l({id:`Z8nach`,values:{0:t.error}}));return}z(`upload`,t),o({scope:C,name:t.name}),r(!1);return}let e=await M({source:q,...D.trim()===``?{}:{skill:D.trim()},scope:C});if(pe(!1),!e.ok){if(e.skills&&e.skills.length>1){me(e.skills.map(W)),O(e.skills[0]),k.info(l({id:`iYUTsI`}));return}k.error(l({id:`kfL8BJ`,values:{0:e.error}}));return}z(`import`,e),o({scope:C,name:e.name}),r(!1)},t[9]=l,t[10]=Ce,t[11]=j,t[12]=J,t[13]=o,t[14]=r,t[15]=C,t[16]=D,t[17]=T,t[18]=q,t[19]=we):we=t[19];let Te=we,Ee=d,De;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,L.jsx)(i,{id:`aBgwis`}),t[20]=De):De=t[20];let Y;t[21]===m?Y=t[22]:(Y=(0,L.jsx)(h,{htmlFor:m,children:De}),t[21]=m,t[22]=Y);let Oe;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=e=>w(e),t[23]=Oe):Oe=t[23];let ke;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,L.jsx)(x,{}),t[24]=ke):ke=t[24];let X;t[25]===m?X=t[26]:(X=(0,L.jsx)(y,{id:m,className:`w-full`,children:ke}),t[25]=m,t[26]=X);let Z;t[27]===b?Z=t[28]:(Z=le.map(e=>(0,L.jsx)(_,{value:e,children:b[e]},e)),t[27]=b,t[28]=Z);let Ae;t[29]===Z?Ae=t[30]:(Ae=(0,L.jsx)(v,{children:Z}),t[29]=Z,t[30]=Ae);let je;t[31]!==C||t[32]!==X||t[33]!==Ae?(je=(0,L.jsxs)(te,{value:C,onValueChange:Oe,children:[X,Ae]}),t[31]=C,t[32]=X,t[33]=Ae,t[34]=je):je=t[34];let Me;t[35]!==je||t[36]!==Y?(Me=(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Y,je]}),t[35]=je,t[36]=Y,t[37]=Me):Me=t[37];let Ne;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,L.jsx)(i,{id:`wdxz7K`}),t[38]=Ne):Ne=t[38];let Pe;t[39]===u?Pe=t[40]:(Pe=(0,L.jsx)(h,{id:u,children:Ne}),t[39]=u,t[40]=Pe);let Fe;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=e=>{re(e),ue(null)},t[41]=Fe):Fe=t[41];let Ie=`${u}-remote`,Le=T===`remote`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,Re;t[42]===Le?Re=t[43]:(Re=s(B,Le),t[42]=Le,t[43]=Re);let ze;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(ie,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`qlAIQ1`})]}),t[44]=ze):ze=t[44];let Be;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[ze,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`9m4D_h`})})]}),t[45]=Be):Be=t[45];let Ve=`${u}-remote`,He;t[46]===Ve?He=t[47]:(He=(0,L.jsx)(S,{id:Ve,value:`remote`,className:`mt-0.5`}),t[46]=Ve,t[47]=He);let Ue;t[48]!==Ie||t[49]!==Re||t[50]!==He?(Ue=(0,L.jsxs)(h,{htmlFor:Ie,className:Re,children:[Be,He]}),t[48]=Ie,t[49]=Re,t[50]=He,t[51]=Ue):Ue=t[51];let We=`${u}-zip`,Ge=T===`zip`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,Ke;t[52]===Ge?Ke=t[53]:(Ke=s(B,Ge),t[52]=Ge,t[53]=Ke);let qe;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(F,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`Fr8JGg`})]}),t[54]=qe):qe=t[54];let Je;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[qe,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`hQjvzi`})})]}),t[55]=Je):Je=t[55];let Ye=`${u}-zip`,Xe;t[56]===Ye?Xe=t[57]:(Xe=(0,L.jsx)(S,{id:Ye,value:`zip`,className:`mt-0.5`}),t[56]=Ye,t[57]=Xe);let Ze;t[58]!==We||t[59]!==Ke||t[60]!==Xe?(Ze=(0,L.jsxs)(h,{htmlFor:We,className:Ke,children:[Je,Xe]}),t[58]=We,t[59]=Ke,t[60]=Xe,t[61]=Ze):Ze=t[61];let Qe=`${u}-folder`,$e=T===`folder`?`border-primary bg-primary/5`:`border-border hover:bg-muted/40`,et;t[62]===$e?et=t[63]:(et=s(B,$e),t[62]=$e,t[63]=et);let tt;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(ae,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,L.jsx)(i,{id:`kNqMMd`})]}),t[64]=tt):tt=t[64];let nt;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,L.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[tt,(0,L.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`UPWItY`})})]}),t[65]=nt):nt=t[65];let rt=`${u}-folder`,it;t[66]===rt?it=t[67]:(it=(0,L.jsx)(S,{id:rt,value:`folder`,className:`mt-0.5`}),t[66]=rt,t[67]=it);let at;t[68]!==Qe||t[69]!==et||t[70]!==it?(at=(0,L.jsxs)(h,{htmlFor:Qe,className:et,children:[nt,it]}),t[68]=Qe,t[69]=et,t[70]=it,t[71]=at):at=t[71];let ot;t[72]!==T||t[73]!==u||t[74]!==Ue||t[75]!==Ze||t[76]!==at?(ot=(0,L.jsxs)(ne,{value:T,onValueChange:Fe,"aria-labelledby":u,className:`grid-cols-1 gap-2 sm:grid-cols-3 mb-2`,children:[Ue,Ze,at]}),t[72]=T,t[73]=u,t[74]=Ue,t[75]=Ze,t[76]=at,t[77]=ot):ot=t[77];let st=J?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(A,{ref:ye,id:g,"aria-label":l(T===`zip`?{id:`wErce0`}:{id:`VJaBca`}),type:`file`,"data-testid":`skill-upload-input`,accept:T===`zip`?`.zip,.skill`:void 0,onChange:e=>ue(e.target.files),className:`sr-only`},T),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(c,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>ye.current?.click(),children:T===`zip`?(0,L.jsx)(i,{id:`-yPBXI`}):(0,L.jsx)(i,{id:`TgZOXj`})}),(0,L.jsx)(`span`,{className:`truncate text-sm text-muted-foreground`,"data-testid":`skill-upload-filename`,children:j&&j.length>0?T===`folder`?j.length===1?l({id:`BGtzlf`,values:{uploadFolderName:be}}):l({id:`K7NMEc`,values:{0:j.length,uploadFolderName:be}}):j[0].name:(0,L.jsx)(i,{id:`hqCwRf`})})]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(A,{id:ee,"aria-label":l({id:`cLP0Lf`}),"data-testid":`skill-import-source-input`,value:E,onChange:e=>se(e.target.value),onKeyDown:e=>{e.key===`Enter`&&Te()},placeholder:l({id:`gv5w9J`}),className:`font-mono`}),ge||R||P&&P.length===1?(0,L.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:ge?(0,L.jsx)(i,{id:`K4G55s`}):R?(0,L.jsx)(i,{id:`XgqUOy`}):P&&P.length===1?(0,L.jsx)(i,{id:`WpE38V`,values:{0:P[0].name}}):null}):null]}),ct;t[78]!==Pe||t[79]!==ot||t[80]!==st?(ct=(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Pe,ot,st]}),t[78]=Pe,t[79]=ot,t[80]=st,t[81]=ct):ct=t[81];let lt;t[82]!==P||t[83]!==J||t[84]!==D||t[85]!==p?(lt=!J&&P&&P.length>1?(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(h,{htmlFor:p,children:(0,L.jsx)(i,{id:`FCMaBz`})}),(0,L.jsxs)(te,{value:D,onValueChange:O,children:[(0,L.jsx)(y,{id:p,size:`sm`,className:`w-full`,"data-testid":`skill-import-pick`,children:(0,L.jsx)(x,{})}),(0,L.jsx)(v,{children:P.map(U)})]}),(0,L.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,L.jsx)(i,{id:`xtJgSe`})})]}):null,t[82]=P,t[83]=J,t[84]=D,t[85]=p,t[86]=lt):lt=t[86];let ut;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,L.jsx)(`p`,{className:`font-medium text-xs font-mono text-muted-foreground/80 uppercase tracking-wider`,children:(0,L.jsx)(i,{id:`DWJtEo`})}),t[87]=ut):ut=t[87];let dt;t[88]===C?dt=t[89]:(dt=(0,L.jsx)(`li`,{children:C===`project`?(0,L.jsx)(i,{id:`rucNcu`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] text-foreground/80`})}}):(0,L.jsx)(i,{id:`vjW-SM`,components:{0:(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-[0.9em] text-foreground/80`})}})}),t[88]=C,t[89]=dt);let ft,pt;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,L.jsx)(`li`,{children:(0,L.jsx)(i,{id:`tqQBwN`})}),pt=(0,L.jsx)(`li`,{children:(0,L.jsx)(i,{id:`QB-moX`})}),t[90]=ft,t[91]=pt):(ft=t[90],pt=t[91]);let Q;t[92]===dt?Q=t[93]:(Q=(0,L.jsxs)(`div`,{role:`note`,className:`space-y-3`,"data-testid":`skill-import-disclosure`,children:[ut,(0,L.jsxs)(`ul`,{className:`list-disc space-y-2.5 pl-4 text-sm text-muted-foreground marker:text-muted-foreground/50`,children:[dt,ft,pt]})]}),t[92]=dt,t[93]=Q);let mt;t[94]!==Ee||t[95]!==Me||t[96]!==ct||t[97]!==lt||t[98]!==Q?(mt=(0,L.jsxs)(Ee,{className:`flex flex-col gap-6`,children:[Me,ct,lt,Q]}),t[94]=Ee,t[95]=Me,t[96]=ct,t[97]=lt,t[98]=Q,t[99]=mt):mt=t[99];let ht;t[100]===r?ht=t[101]:(ht=()=>r(!1),t[100]=r,t[101]=ht);let gt;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(gt=(0,L.jsx)(i,{id:`dEgA5A`}),t[102]=gt):gt=t[102];let _t;t[103]!==N||t[104]!==ht?(_t=(0,L.jsx)(c,{variant:`outline`,className:`font-mono uppercase`,onMouseDown:H,onClick:ht,disabled:N,children:gt}),t[103]=N,t[104]=ht,t[105]=_t):_t=t[105];let vt=J?`skill-upload-button`:`skill-import-button`,yt;t[106]===Te?yt=t[107]:(yt=()=>void Te(),t[106]=Te,t[107]=yt);let bt=!Ce,xt;t[108]!==N||t[109]!==J?(xt=N?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(oe,{className:`size-4 animate-spin`}),J?(0,L.jsx)(i,{id:`_eguJc`}):(0,L.jsx)(i,{id:`RqSvT0`})]}):J?(0,L.jsx)(i,{id:`ONWvwQ`}):(0,L.jsx)(i,{id:`l3s5ri`}),t[108]=N,t[109]=J,t[110]=xt):xt=t[110];let St;t[111]!==vt||t[112]!==yt||t[113]!==bt||t[114]!==xt?(St=(0,L.jsx)(c,{"data-testid":vt,onClick:yt,disabled:bt,children:xt}),t[111]=vt,t[112]=yt,t[113]=bt,t[114]=xt,t[115]=St):St=t[115];let $;t[116]!==_t||t[117]!==St?($=(0,L.jsxs)(f,{children:[_t,St]}),t[116]=_t,t[117]=St,t[118]=$):$=t[118];let Ct;return t[119]!==mt||t[120]!==$?(Ct=(0,L.jsxs)(L.Fragment,{children:[mt,$]}),t[119]=mt,t[120]=$,t[121]=Ct):Ct=t[121],Ct}function H(e){return e.preventDefault()}function U(e){return(0,L.jsx)(_,{value:e.name,children:e.name},e.name)}function W(e){return{name:e,description:null}}function G(e){let t=(0,he.c)(21),{defaultScope:n,open:r,onOpenChange:a,defaultTab:o,onImported:s}=e,c=o===void 0?`skills-sh`:o,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,L.jsx)(ee,{children:(0,L.jsx)(i,{id:`GBQjiV`})}),t[0]=d):d=t[0];let f;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,L.jsxs)(p,{children:[d,(0,L.jsx)(l,{className:`sr-only`,children:(0,L.jsx)(i,{id:`qTcVwj`})})]}),t[1]=f):f=t[1];let h;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,L.jsx)(C,{variant:`line`,value:`skills-sh`,children:(0,L.jsx)(i,{id:`8tjQCz`})}),t[2]=h):h=t[2];let g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,L.jsxs)(T,{variant:`line`,className:`w-full justify-start gap-4 border-b p-0`,children:[h,(0,L.jsx)(C,{variant:`line`,value:`upload`,children:(0,L.jsx)(i,{id:`ONWvwQ`})})]}),t[3]=g):g=t[3];let _;t[4]===a?_=t[5]:(_=()=>a(!1),t[4]=a,t[5]=_);let v;t[6]!==n||t[7]!==_?(v=(0,L.jsx)(w,{value:`skills-sh`,className:`h-[62vh] min-h-0 flex-none`,children:(0,L.jsx)(R,{scope:n,onNavigate:_})}),t[6]=n,t[7]=_,t[8]=v):v=t[8];let y;t[9]!==n||t[10]!==s||t[11]!==a?(y=(0,L.jsx)(w,{value:`upload`,className:`mt-3 flex min-h-0 flex-1 flex-col gap-6`,children:(0,L.jsx)(V,{defaultScope:n,onOpenChange:a,onImported:s})}),t[9]=n,t[10]=s,t[11]=a,t[12]=y):y=t[12];let b;t[13]!==c||t[14]!==v||t[15]!==y?(b=(0,L.jsxs)(u,{className:`flex max-h-[85vh] flex-col gap-4 sm:max-w-4xl`,children:[f,(0,L.jsxs)(re,{defaultValue:c,className:`flex min-h-0 flex-1 flex-col gap-3`,children:[g,v,y]})]}),t[13]=c,t[14]=v,t[15]=y,t[16]=b):b=t[16];let x;return t[17]!==a||t[18]!==r||t[19]!==b?(x=(0,L.jsx)(m,{open:r,onOpenChange:a,children:b}),t[17]=a,t[18]=r,t[19]=b,t[20]=x):x=t[20],x}export{G as ImportSkillDialog};
|