Buckets:

hf-doc-build/doc / optimum-neuron /main /en /_app /immutable /chunks /CopyLLMTxtMenu.f644b58a.js
rtrm's picture
download
raw
20.3 kB
import{s as se,n as W,r as Ce,h as Ve,t as _e,d as be}from"./scheduler.56725da7.js";import{S as le,i as oe,F as L,G as z,f as d,d as c,k as r,m as H,l as i,q as Q,r as X,v as pe,e as N,c as Z,s as S,a as E,g as ee,b as R,n as te,u as G,w as ve,t as U,z as Ne,o as j,y as Ee,p as re,j as De,B as Le}from"./index.18a26576.js";import{g as ze}from"./globals.7f7f1b26.js";import{e as xe}from"./each.e59479a4.js";import{aH as Me,aI as Ae}from"./MermaidChart.svelte_svelte_type_style_lang.401933eb.js";function Be(s){let e,a;return{c(){e=L("svg"),a=L("path"),this.h()},l(t){e=z(t,"svg",{class:!0,width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=d(e);a=z(n,"path",{d:!0,stroke:!0}),d(a).forEach(c),n.forEach(c),this.h()},h(){r(a,"d","M1 1L6 6L11 1"),r(a,"stroke","currentColor"),r(e,"class",s[0]),r(e,"width","1em"),r(e,"height","1em"),r(e,"viewBox","0 0 12 7"),r(e,"fill","none"),r(e,"xmlns","http://www.w3.org/2000/svg")},m(t,n){H(t,e,n),i(e,a)},p(t,[n]){n&1&&r(e,"class",t[0])},i:W,o:W,d(t){t&&c(e)}}}function Te(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Ue extends le{constructor(e){super(),oe(this,e,Te,Be,se,{classNames:0})}}function Pe(s){let e,a,t,n;return{c(){e=L("svg"),a=L("path"),t=L("path"),n=L("path"),this.h()},l(l){e=z(l,"svg",{class:!0,xmlns:!0,"aria-hidden":!0,fill:!0,focusable:!0,role:!0,width:!0,height:!0,preserveAspectRatio:!0,viewBox:!0});var o=d(e);a=z(o,"path",{d:!0}),d(a).forEach(c),t=z(o,"path",{d:!0}),d(t).forEach(c),n=z(o,"path",{d:!0}),d(n).forEach(c),o.forEach(c),this.h()},h(){r(a,"d","M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"),r(t,"d","M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"),r(n,"d","M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"),r(e,"class",s[0]),r(e,"xmlns","http://www.w3.org/2000/svg"),r(e,"aria-hidden","true"),r(e,"fill","currentColor"),r(e,"focusable","false"),r(e,"role","img"),r(e,"width","1em"),r(e,"height","1em"),r(e,"preserveAspectRatio","xMidYMid meet"),r(e,"viewBox","0 0 32 32")},m(l,o){H(l,e,o),i(e,a),i(e,t),i(e,n)},p(l,[o]){o&1&&r(e,"class",l[0])},i:W,o:W,d(l){l&&c(e)}}}function Oe(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Se extends le{constructor(e){super(),oe(this,e,Oe,Pe,se,{classNames:0})}}function Re(s){let e,a,t;return{c(){e=L("svg"),a=L("path"),t=L("path"),this.h()},l(n){e=z(n,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0});var l=d(e);a=z(l,"path",{d:!0}),d(a).forEach(c),t=z(l,"path",{d:!0}),d(t).forEach(c),l.forEach(c),this.h()},h(){r(a,"d","M7 7h10v10"),r(t,"d","M7 17 17 7"),r(e,"class",s[0]),r(e,"xmlns","http://www.w3.org/2000/svg"),r(e,"width","24"),r(e,"height","24"),r(e,"viewBox","0 0 24 24"),r(e,"fill","none"),r(e,"stroke","currentColor"),r(e,"stroke-width","1.75"),r(e,"stroke-linecap","round"),r(e,"stroke-linejoin","round")},m(n,l){H(n,e,l),i(e,a),i(e,t)},p(n,[l]){l&1&&r(e,"class",n[0])},i:W,o:W,d(n){n&&c(e)}}}function je(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Ie extends le{constructor(e){super(),oe(this,e,je,Re,se,{classNames:0})}}function qe(s){let e,a,t,n;return{c(){e=L("svg"),a=L("title"),t=Q("OpenAI"),n=L("path"),this.h()},l(l){e=z(l,"svg",{class:!0,fill:!0,"fill-rule":!0,height:!0,viewBox:!0,width:!0,xmlns:!0});var o=d(e);a=z(o,"title",{});var f=d(a);t=X(f,"OpenAI"),f.forEach(c),n=z(o,"path",{d:!0}),d(n).forEach(c),o.forEach(c),this.h()},h(){r(n,"d","M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z"),r(e,"class",s[0]),r(e,"fill","currentColor"),r(e,"fill-rule","evenodd"),r(e,"height","1em"),r(e,"viewBox","0 0 24 24"),r(e,"width","1em"),r(e,"xmlns","http://www.w3.org/2000/svg")},m(l,o){H(l,e,o),i(e,a),i(a,t),i(e,n)},p(l,[o]){o&1&&r(e,"class",l[0])},i:W,o:W,d(l){l&&c(e)}}}function We(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Fe extends le{constructor(e){super(),oe(this,e,We,qe,se,{classNames:0})}}function He(s){let e,a,t,n;return{c(){e=L("svg"),a=L("title"),t=Q("Anthropic"),n=L("path"),this.h()},l(l){e=z(l,"svg",{class:!0,fill:!0,height:!0,viewBox:!0,width:!0,xmlns:!0});var o=d(e);a=z(o,"title",{});var f=d(a);t=X(f,"Anthropic"),f.forEach(c),n=z(o,"path",{d:!0}),d(n).forEach(c),o.forEach(c),this.h()},h(){r(n,"d","M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"),r(e,"class",s[0]),r(e,"fill","currentColor"),r(e,"height","1em"),r(e,"viewBox","0 0 24 24"),r(e,"width","1em"),r(e,"xmlns","http://www.w3.org/2000/svg")},m(l,o){H(l,e,o),i(e,a),i(a,t),i(e,n)},p(l,[o]){o&1&&r(e,"class",l[0])},i:W,o:W,d(l){l&&c(e)}}}function Ge(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Ke extends le{constructor(e){super(),oe(this,e,Ge,He,se,{classNames:0})}}function Ye(s){let e,a,t,n,l;return{c(){e=L("svg"),a=L("title"),t=Q("ModelContextProtocol"),n=L("path"),l=L("path"),this.h()},l(o){e=z(o,"svg",{xmlns:!0,fill:!0,"fill-rule":!0,height:!0,style:!0,viewBox:!0,width:!0,class:!0});var f=d(e);a=z(f,"title",{});var M=d(a);t=X(M,"ModelContextProtocol"),M.forEach(c),n=z(f,"path",{d:!0}),d(n).forEach(c),l=z(f,"path",{d:!0}),d(l).forEach(c),f.forEach(c),this.h()},h(){r(n,"d","M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"),r(l,"d","M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"),r(e,"xmlns","http://www.w3.org/2000/svg"),r(e,"fill","currentColor"),r(e,"fill-rule","evenodd"),r(e,"height","1em"),pe(e,"flex","none"),pe(e,"line-height","1"),r(e,"viewBox","0 0 24 24"),r(e,"width","1em"),r(e,"class",s[0])},m(o,f){H(o,e,f),i(e,a),i(a,t),i(e,n),i(e,l)},p(o,[f]){f&1&&r(e,"class",o[0])},i:W,o:W,d(o){o&&c(e)}}}function Je(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Qe extends le{constructor(e){super(),oe(this,e,Je,Ye,se,{classNames:0})}}const{window:fe}=ze;function ke(s,e,a){const t=s.slice();return t[35]=e[a],t}function ye(s){let e,a,t,n,l,o,f,M,A,B,p,_,T,V,v,C,I,P,m,g,k,D,q,w,b="View this page as plain text",F,O,K,ae;o=new Me({props:{classNames:"w-4 h-4 shrink-0"}}),I=new Se({props:{classNames:"w-4 h-4 shrink-0"}}),D=new Ie({props:{classNames:"w-4 h-4 text-gray-500 dark:text-gray-300 shrink-0"}});let Y=xe(s[9]),y=[];for(let h=0;h<Y.length;h+=1)y[h]=$e(ke(s,Y,h));const he=h=>j(y[h],1,1,()=>{y[h]=null});return{c(){e=N("div"),a=S(),t=N("div"),n=N("button"),l=N("div"),Z(o.$$.fragment),f=S(),M=N("div"),A=N("div"),B=Q(s[0]),p=S(),_=N("div"),T=Q(s[1]),V=S(),v=N("button"),C=N("div"),Z(I.$$.fragment),P=S(),m=N("div"),g=N("div"),k=Q(`View as Markdown
`),Z(D.$$.fragment),q=S(),w=N("div"),w.textContent=b,F=S();for(let h=0;h<y.length;h+=1)y[h].c();this.h()},l(h){e=E(h,"DIV",{class:!0,"aria-hidden":!0,style:!0}),d(e).forEach(c),a=R(h),t=E(h,"DIV",{role:!0,class:!0,style:!0,"aria-label":!0});var $=d(t);n=E($,"BUTTON",{role:!0,class:!0});var x=d(n);l=E(x,"DIV",{class:!0});var ne=d(l);ee(o.$$.fragment,ne),ne.forEach(c),f=R(x),M=E(x,"DIV",{class:!0});var ie=d(M);A=E(ie,"DIV",{class:!0});var u=d(A);B=X(u,s[0]),u.forEach(c),p=R(ie),_=E(ie,"DIV",{class:!0});var J=d(_);T=X(J,s[1]),J.forEach(c),ie.forEach(c),x.forEach(c),V=R($),v=E($,"BUTTON",{role:!0,class:!0});var ce=d(v);C=E(ce,"DIV",{class:!0});var ue=d(C);ee(I.$$.fragment,ue),ue.forEach(c),P=R(ce),m=E(ce,"DIV",{class:!0});var de=d(m);g=E(de,"DIV",{class:!0});var me=d(g);k=X(me,`View as Markdown
`),ee(D.$$.fragment,me),me.forEach(c),q=R(de),w=E(de,"DIV",{class:!0,"data-svelte-h":!0}),De(w)!=="svelte-8wg9lb"&&(w.textContent=b),de.forEach(c),ce.forEach(c),F=R($);for(let ge=0;ge<y.length;ge+=1)y[ge].l($);$.forEach(c),this.h()},h(){r(e,"class","fixed inset-0 z-40"),r(e,"aria-hidden","true"),pe(e,"background","transparent"),r(l,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),r(A,"class","text-sm font-medium text-gray-800 dark:text-gray-300 flex items-center gap-1"),r(_,"class","text-xs text-gray-600 dark:text-gray-400"),r(M,"class","flex flex-col px-1"),r(n,"role","menuitem"),r(n,"class",we),r(C,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),r(g,"class","text-sm font-medium text-gray-800 dark:text-gray-300 flex items-center gap-1"),r(w,"class","text-xs text-gray-600 dark:text-gray-400"),r(m,"class","flex flex-col px-1"),r(v,"role","menuitem"),r(v,"class",we),r(t,"role","menu"),r(t,"class","fixed z-50 backdrop-blur-xl rounded-xl max-h-[420px] overflow-y-auto p-1 border flex flex-col border-gray-200 bg-white dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200"),r(t,"style",s[8]),r(t,"aria-label","Copy menu")},m(h,$){H(h,e,$),H(h,a,$),H(h,t,$),i(t,n),i(n,l),te(o,l,null),i(n,f),i(n,M),i(M,A),i(A,B),i(M,p),i(M,_),i(_,T),i(t,V),i(t,v),i(v,C),te(I,C,null),i(v,P),i(v,m),i(m,g),i(g,k),te(D,g,null),i(m,q),i(m,w),i(t,F);for(let x=0;x<y.length;x+=1)y[x]&&y[x].m(t,null);s[23](t),O=!0,K||(ae=[G(e,"click",s[11]),G(n,"click",s[20]),G(v,"click",s[21])],K=!0)},p(h,$){if((!O||$[0]&1)&&ve(B,h[0]),(!O||$[0]&2)&&ve(T,h[1]),$[0]&16896){Y=xe(h[9]);let x;for(x=0;x<Y.length;x+=1){const ne=ke(h,Y,x);y[x]?(y[x].p(ne,$),U(y[x],1)):(y[x]=$e(ne),y[x].c(),U(y[x],1),y[x].m(t,null))}for(Ne(),x=Y.length;x<y.length;x+=1)he(x);Ee()}(!O||$[0]&256)&&r(t,"style",h[8])},i(h){if(!O){U(o.$$.fragment,h),U(I.$$.fragment,h),U(D.$$.fragment,h);for(let $=0;$<Y.length;$+=1)U(y[$]);O=!0}},o(h){j(o.$$.fragment,h),j(I.$$.fragment,h),j(D.$$.fragment,h),y=y.filter(Boolean);for(let $=0;$<y.length;$+=1)j(y[$]);O=!1},d(h){h&&(c(e),c(a),c(t)),re(o),re(I),re(D),Le(y,h),s[23](null),K=!1,Ce(ae)}}}function Xe(s){let e,a;return e=new Qe({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){Z(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),a=!0},i(t){a||(U(e.$$.fragment,t),a=!0)},o(t){j(e.$$.fragment,t),a=!1},d(t){re(e,t)}}}function Ze(s){let e,a;return e=new Ke({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){Z(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),a=!0},i(t){a||(U(e.$$.fragment,t),a=!0)},o(t){j(e.$$.fragment,t),a=!1},d(t){re(e,t)}}}function et(s){let e,a;return e=new Fe({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){Z(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),a=!0},i(t){a||(U(e.$$.fragment,t),a=!0)},o(t){j(e.$$.fragment,t),a=!1},d(t){re(e,t)}}}function $e(s){let e,a,t,n,l,o,f,M=s[35].label+"",A,B,p,_=s[35].description+"",T,V,v,C,I,P,m;const g=[et,Ze,Xe],k=[];function D(w,b){return w[35].icon==="chatgpt"?0:w[35].icon==="claude"?1:w[35].icon==="mcp"?2:-1}~(t=D(s))&&(n=k[t]=g[t](s)),v=new Ie({props:{classNames:"w-4 h-4 text-gray-500 dark:text-gray-300"}});function q(){return s[22](s[35])}return{c(){e=N("button"),a=N("div"),n&&n.c(),l=S(),o=N("div"),f=N("div"),A=Q(M),B=S(),p=N("div"),T=Q(_),V=S(),Z(v.$$.fragment),C=S(),this.h()},l(w){e=E(w,"BUTTON",{role:!0,class:!0});var b=d(e);a=E(b,"DIV",{class:!0});var F=d(a);n&&n.l(F),F.forEach(c),l=R(b),o=E(b,"DIV",{class:!0});var O=d(o);f=E(O,"DIV",{class:!0});var K=d(f);A=X(K,M),K.forEach(c),B=R(O),p=E(O,"DIV",{class:!0});var ae=d(p);T=X(ae,_),ae.forEach(c),O.forEach(c),V=R(b),ee(v.$$.fragment,b),C=R(b),b.forEach(c),this.h()},h(){r(a,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),r(f,"class","text-sm font-medium text-gray-800 dark:text-gray-200 flex items-center gap-1"),r(p,"class","text-xs text-gray-600 dark:text-gray-400"),r(o,"class","flex flex-col px-1"),r(e,"role","menuitem"),r(e,"class",we)},m(w,b){H(w,e,b),i(e,a),~t&&k[t].m(a,null),i(e,l),i(e,o),i(o,f),i(f,A),i(o,B),i(o,p),i(p,T),i(e,V),te(v,e,null),i(e,C),I=!0,P||(m=G(e,"click",q),P=!0)},p(w,b){s=w},i(w){I||(U(n),U(v.$$.fragment,w),I=!0)},o(w){j(n),j(v.$$.fragment,w),I=!1},d(w){w&&c(e),~t&&k[t].d(),re(v),P=!1,m()}}}function tt(s){let e,a,t,n,l,o,f,M=(s[5]?"Copied":s[0])+"",A,B,p,_,T,V,v,C,I,P;l=new Me({props:{classNames:"w-3 h-3 max-sm:w-2.5 max-sm:h-2.5"}}),_=new Ue({props:{classNames:`transition-transform text-gray-400 overflow-visible w-3 h-3 max-sm:w-2.5 max-sm:h-2.5 ${s[4]?"rotate-180":"rotate-0"}`}});let m=s[4]&&ye(s);return{c(){e=N("div"),a=N("div"),t=N("button"),n=N("span"),Z(l.$$.fragment),o=S(),f=N("span"),A=Q(M),B=S(),p=N("button"),Z(_.$$.fragment),V=S(),m&&m.c(),this.h()},l(g){e=E(g,"DIV",{class:!0,style:!0});var k=d(e);a=E(k,"DIV",{class:!0});var D=d(a);t=E(D,"BUTTON",{class:!0,"aria-live":!0});var q=d(t);n=E(q,"SPAN",{class:!0});var w=d(n);ee(l.$$.fragment,w),w.forEach(c),o=R(q),f=E(q,"SPAN",{});var b=d(f);A=X(b,M),b.forEach(c),q.forEach(c),B=R(D),p=E(D,"BUTTON",{class:!0,"aria-haspopup":!0,"aria-expanded":!0,"aria-label":!0});var F=d(p);ee(_.$$.fragment,F),F.forEach(c),D.forEach(c),V=R(k),m&&m.l(k),k.forEach(c),this.h()},h(){r(n,"class","inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0"),r(t,"class","inline-flex items-center gap-1 max-sm:gap-0.5 h-6 max-sm:h-5 px-2 max-sm:px-1.5 text-[11px] max-sm:text-[9px] font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800"),r(t,"aria-live","polite"),r(p,"class","inline-flex items-center justify-center w-6 max-sm:w-5 h-6 max-sm:h-5 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800"),r(p,"aria-haspopup","menu"),r(p,"aria-expanded",s[4]),r(p,"aria-label",T=s[4]?"Close copy menu":"Open copy menu"),r(a,"class","inline-flex rounded-md max-sm:rounded-sm"),r(e,"class",v=`items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex${s[2]?` ${s[2]}`:""}`),r(e,"style",s[3])},m(g,k){H(g,e,k),i(e,a),i(a,t),i(t,n),te(l,n,null),i(t,o),i(t,f),i(f,A),i(a,B),i(a,p),te(_,p,null),s[19](a),i(e,V),m&&m.m(e,null),C=!0,I||(P=[G(fe,"mousedown",s[15]),G(fe,"keydown",s[16]),G(fe,"resize",s[17]),G(fe,"scroll",s[18]),G(t,"click",s[10]),G(p,"click",s[12])],I=!0)},p(g,k){(!C||k[0]&33)&&M!==(M=(g[5]?"Copied":g[0])+"")&&ve(A,M);const D={};k[0]&16&&(D.classNames=`transition-transform text-gray-400 overflow-visible w-3 h-3 max-sm:w-2.5 max-sm:h-2.5 ${g[4]?"rotate-180":"rotate-0"}`),_.$set(D),(!C||k[0]&16)&&r(p,"aria-expanded",g[4]),(!C||k[0]&16&&T!==(T=g[4]?"Close copy menu":"Open copy menu"))&&r(p,"aria-label",T),g[4]?m?(m.p(g,k),k[0]&16&&U(m,1)):(m=ye(g),m.c(),U(m,1),m.m(e,null)):m&&(Ne(),j(m,1,1,()=>{m=null}),Ee()),(!C||k[0]&4&&v!==(v=`items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex${g[2]?` ${g[2]}`:""}`))&&r(e,"class",v),(!C||k[0]&8)&&r(e,"style",g[3])},i(g){C||(U(l.$$.fragment,g),U(_.$$.fragment,g),U(m),C=!0)},o(g){j(l.$$.fragment,g),j(_.$$.fragment,g),j(m),C=!1},d(g){g&&c(e),re(l),re(_),s[19](null),m&&m.d(),I=!1,Ce(P)}}}const we="cursor-pointer text-sm group relative w-full select-none outline-none flex items-center gap-1 px-1.5 py-1.5 rounded-xl text-left transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800";function rt(s,e,a){let{label:t="Copy page"}=e,{markdownDescription:n="Copy page as Markdown for LLMs"}=e,{containerClass:l=""}=e,{containerStyle:o=""}=e;const f=typeof window<"u",M=typeof document<"u";function A(){if(!f||!window.location)return;const u=window.location.href.replace(/#.*$/,"");return u.endsWith(".md")?u:`${u}.md`}const B=A();let p=null,_=!1,T=!1,V=null,v=null,C="",I=null,P=null,m=null;const g=[{label:"Open in ChatGPT",description:"Ask questions about this page",icon:"chatgpt",buildUrl:()=>p?`https://chatgpt.com/?hints=search&q=${p}`:"https://chatgpt.com"},{label:"Open in Claude",description:"Ask questions about this page",icon:"claude",buildUrl:()=>p?`https://claude.ai/new?q=${p}`:"https://claude.ai/new"},{label:"Connect to MCP Client",description:"Install MCP server on Cursor, VS Code, etc.",icon:"mcp",buildUrl:()=>"https://huggingface.co/mcp"}];function k(){p||!f||(p=encodeURIComponent(`Read from ${B} so I can ask questions about it.`))}async function D(){return!f||typeof fetch!="function"||!B?"":(k(),P||(m||(m=fetch(B,{headers:{Accept:"text/plain"}}).then(u=>{if(!u.ok)throw new Error(`Failed to fetch source content: ${u.status}`);return u.text()}).then(u=>(P=u,u)).catch(u=>(console.error("Unable to fetch remote markdown",u),P="",""))),m))}async function q(){if(!f){console.warn("Clipboard API unavailable");return}try{const u=await D();if(!u){console.warn("Nothing to copy");return}if(typeof navigator<"u"&&!!navigator.clipboard&&typeof navigator.clipboard.writeText=="function")await navigator.clipboard.writeText(u);else if(M)Ae(u);else{console.warn("Clipboard API unavailable");return}a(5,T=!0),await _e(),I&&clearTimeout(I),I=setTimeout(()=>{a(5,T=!1)},2e3)}catch(u){console.error("Failed to write to clipboard",u)}}function w(){a(4,_=!0),f&&V&&_e().then(()=>{if(!V)return;const u=V.getBoundingClientRect(),J=10,ce=Math.max(u.width+80,220),ue=Math.max(window.innerWidth-u.right,J);a(8,C=`top:${u.bottom+J}px;right:${ue}px;min-width:${ce}px;`)})}function b(){a(4,_=!1)}function F(){_?b():w()}function O(){f&&(window.open(B,"_blank","noopener,noreferrer"),b())}function K(u){k(),f&&window.open(u.buildUrl(),"_blank","noopener,noreferrer"),b()}function ae(u){if(!_||!f)return;const J=u.target;v!=null&&v.contains(J)||V!=null&&V.contains(J)||b()}function Y(u){u.key==="Escape"&&_&&b()}function y(){_&&b()}function he(){_&&b()}Ve(()=>{I&&clearTimeout(I)});function h(u){be[u?"unshift":"push"](()=>{V=u,a(6,V)})}const $=()=>{q(),b()},x=()=>{O()},ne=u=>K(u);function ie(u){be[u?"unshift":"push"](()=>{v=u,a(7,v)})}return s.$$set=u=>{"label"in u&&a(0,t=u.label),"markdownDescription"in u&&a(1,n=u.markdownDescription),"containerClass"in u&&a(2,l=u.containerClass),"containerStyle"in u&&a(3,o=u.containerStyle)},[t,n,l,o,_,T,V,v,C,g,q,b,F,O,K,ae,Y,y,he,h,$,x,ne,ie]}class it extends le{constructor(e){super(),oe(this,e,rt,tt,se,{label:0,markdownDescription:1,containerClass:2,containerStyle:3},null,[-1,-1])}}export{it as C};

Xet Storage Details

Size:
20.3 kB
·
Xet hash:
3e5d697f000d1ccfbd226f9539730ed7fbb3a88c58f9dc185bbf40df5e6bc25c

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.