mirror of
https://github.com/Ladebeze66/projetcbaollm.git
synced 2025-12-18 02:07:50 +01:00
3 lines
6.5 KiB
JavaScript
3 lines
6.5 KiB
JavaScript
import{S as N}from"./index-B1gfMDT9.js";import"./IconButtonWrapper.svelte_svelte_type_style_lang-BOpxTcdu.js";import"./StreamingBar.svelte_svelte_type_style_lang-CDNxkBIr.js";import Q from"./Index-CRGGsrTx.js";import"./index-C7PS0jJm.js";import"./svelte/svelte.js";import"./MarkdownCode.svelte_svelte_type_style_lang-3tofWDHK.js";import"./prism-python-qapVsvY8.js";import"./IconButton-B-aAVSzy.js";import"./Clear-By3xiIwg.js";const{SvelteComponent:W,append:E,attr:g,binding_callbacks:A,create_slot:F,detach:G,element:L,flush:M,get_all_dirty_from_scope:J,get_slot_changes:K,init:O,insert:U,listen:V,safe_not_equal:X,space:Y,toggle_class:m,transition_in:Z,transition_out:x,update_slot_base:ee}=window.__gradio__svelte__internal,{createEventDispatcher:te,onMount:ne}=window.__gradio__svelte__internal;function ie(i){let e,n,s,o,_,c,l,t;const r=i[10].default,u=F(r,i,i[9],null);return{c(){e=L("div"),n=L("button"),n.innerHTML='<div class="chevron svelte-y4v1h1"><span class="chevron-left svelte-y4v1h1"></span></div>',s=Y(),o=L("div"),u&&u.c(),g(n,"class","toggle-button svelte-y4v1h1"),g(n,"aria-label","Toggle Sidebar"),g(o,"class","sidebar-content svelte-y4v1h1"),g(e,"class","sidebar svelte-y4v1h1"),g(e,"style",_="width: "+i[5]+"; "+i[0]+": calc("+i[5]+" * -1)"),m(e,"open",i[1]),m(e,"right",i[0]==="right"),m(e,"reduce-motion",i[3])},m(a,p){U(a,e,p),E(e,n),E(e,s),E(e,o),u&&u.m(o,null),i[12](e),c=!0,l||(t=V(n,"click",i[11]),l=!0)},p(a,[p]){u&&u.p&&(!c||p&512)&&ee(u,r,a,a[9],c?K(r,a[9],p,null):J(a[9]),null),(!c||p&1&&_!==(_="width: "+a[5]+"; "+a[0]+": calc("+a[5]+" * -1)"))&&g(e,"style",_),(!c||p&2)&&m(e,"open",a[1]),(!c||p&1)&&m(e,"right",a[0]==="right"),(!c||p&8)&&m(e,"reduce-motion",a[3])},i(a){c||(Z(u,a),c=!0)},o(a){x(u,a),c=!1},d(a){a&&G(e),u&&u.d(a),i[12](null),l=!1,t()}}}function se(i,e,n){let{$$slots:s={},$$scope:o}=e;const _=te();let{open:c=!0}=e,{width:l}=e,{position:t="left"}=e,r=!1,u=!1,a,p=0,S=typeof l=="number"?`${l}px`:l,v;function f(){if(!a.closest(".wrap"))return;const d=a.closest(".wrap")?.getBoundingClientRect();if(!d)return;const $=a.getBoundingClientRect(),k=t==="left"?d.left:window.innerWidth-d.right;p=Math.max(0,$.width-k+30)}ne(()=>{a.closest(".wrap")?.classList.add("sidebar-parent"),f(),window.addEventListener("resize",f),(()=>{document.documentElement.style.setProperty("--overlap-amount",`${p}px`)})(),n(8,r=!0);const $=window.matchMedia("(prefers-reduced-motion: reduce)");n(3,v=$.matches);const k=H=>{n(3,v=H.matches)};return $.addEventListener("change",k),()=>{window.removeEventListener("resize",f),$.removeEventListener("change",k)}});const j=()=>{n(1,u=!u),_(u?"expand":"collapse")};function D(d){A[d?"unshift":"push"](()=>{a=d,n(2,a)})}return i.$$set=d=>{"open"in d&&n(6,c=d.open),"width"in d&&n(7,l=d.width),"position"in d&&n(0,t=d.position),"$$scope"in d&&n(9,o=d.$$scope)},i.$$.update=()=>{i.$$.dirty&320&&r&&n(1,u=c)},[t,u,a,v,_,S,c,l,r,o,s,j,D]}class oe extends W{constructor(e){super(),O(this,e,se,ie,X,{open:6,width:7,position:0})}get open(){return this.$$.ctx[6]}set open(e){this.$$set({open:e}),M()}get width(){return this.$$.ctx[7]}set width(e){this.$$set({width:e}),M()}get position(){return this.$$.ctx[0]}set position(e){this.$$set({position:e}),M()}}const{SvelteComponent:le,add_flush_callback:y,assign:re,bind:z,binding_callbacks:B,check_outros:ae,create_component:C,create_slot:ue,destroy_component:q,detach:I,empty:_e,flush:b,get_all_dirty_from_scope:ce,get_slot_changes:fe,get_spread_object:de,get_spread_update:pe,group_outros:he,init:ge,insert:P,mount_component:R,safe_not_equal:me,space:be,transition_in:h,transition_out:w,update_slot_base:we}=window.__gradio__svelte__internal;function T(i){let e,n,s,o;function _(t){i[7](t)}function c(t){i[8](t)}let l={width:i[4],$$slots:{default:[$e]},$$scope:{ctx:i}};return i[0]!==void 0&&(l.open=i[0]),i[1]!==void 0&&(l.position=i[1]),e=new oe({props:l}),B.push(()=>z(e,"open",_)),B.push(()=>z(e,"position",c)),e.$on("expand",i[9]),e.$on("collapse",i[10]),{c(){C(e.$$.fragment)},m(t,r){R(e,t,r),o=!0},p(t,r){const u={};r&16&&(u.width=t[4]),r&2048&&(u.$$scope={dirty:r,ctx:t}),!n&&r&1&&(n=!0,u.open=t[0],y(()=>n=!1)),!s&&r&2&&(s=!0,u.position=t[1],y(()=>s=!1)),e.$set(u)},i(t){o||(h(e.$$.fragment,t),o=!0)},o(t){w(e.$$.fragment,t),o=!1},d(t){q(e,t)}}}function ve(i){let e;const n=i[6].default,s=ue(n,i,i[11],null);return{c(){s&&s.c()},m(o,_){s&&s.m(o,_),e=!0},p(o,_){s&&s.p&&(!e||_&2048)&&we(s,n,o,o[11],e?fe(n,o[11],_,null):ce(o[11]),null)},i(o){e||(h(s,o),e=!0)},o(o){w(s,o),e=!1},d(o){s&&s.d(o)}}}function $e(i){let e,n;return e=new Q({props:{$$slots:{default:[ve]},$$scope:{ctx:i}}}),{c(){C(e.$$.fragment)},m(s,o){R(e,s,o),n=!0},p(s,o){const _={};o&2048&&(_.$$scope={dirty:o,ctx:s}),e.$set(_)},i(s){n||(h(e.$$.fragment,s),n=!0)},o(s){w(e.$$.fragment,s),n=!1},d(s){q(e,s)}}}function ke(i){let e,n,s,o;const _=[{autoscroll:i[3].autoscroll},{i18n:i[3].i18n},i[2]];let c={};for(let t=0;t<_.length;t+=1)c=re(c,_[t]);e=new N({props:c});let l=i[5]&&T(i);return{c(){C(e.$$.fragment),n=be(),l&&l.c(),s=_e()},m(t,r){R(e,t,r),P(t,n,r),l&&l.m(t,r),P(t,s,r),o=!0},p(t,[r]){const u=r&12?pe(_,[r&8&&{autoscroll:t[3].autoscroll},r&8&&{i18n:t[3].i18n},r&4&&de(t[2])]):{};e.$set(u),t[5]?l?(l.p(t,r),r&32&&h(l,1)):(l=T(t),l.c(),h(l,1),l.m(s.parentNode,s)):l&&(he(),w(l,1,1,()=>{l=null}),ae())},i(t){o||(h(e.$$.fragment,t),h(l),o=!0)},o(t){w(e.$$.fragment,t),w(l),o=!1},d(t){t&&(I(n),I(s)),q(e,t),l&&l.d(t)}}}function Se(i,e,n){let{$$slots:s={},$$scope:o}=e,{open:_=!0}=e,{position:c="left"}=e,{loading_status:l}=e,{gradio:t}=e,{width:r}=e,{visible:u=!0}=e;function a(f){_=f,n(0,_)}function p(f){c=f,n(1,c)}const S=()=>t.dispatch("expand"),v=()=>t.dispatch("collapse");return i.$$set=f=>{"open"in f&&n(0,_=f.open),"position"in f&&n(1,c=f.position),"loading_status"in f&&n(2,l=f.loading_status),"gradio"in f&&n(3,t=f.gradio),"width"in f&&n(4,r=f.width),"visible"in f&&n(5,u=f.visible),"$$scope"in f&&n(11,o=f.$$scope)},[_,c,l,t,r,u,s,a,p,S,v,o]}class Pe extends le{constructor(e){super(),ge(this,e,Se,ke,me,{open:0,position:1,loading_status:2,gradio:3,width:4,visible:5})}get open(){return this.$$.ctx[0]}set open(e){this.$$set({open:e}),b()}get position(){return this.$$.ctx[1]}set position(e){this.$$set({position:e}),b()}get loading_status(){return this.$$.ctx[2]}set loading_status(e){this.$$set({loading_status:e}),b()}get gradio(){return this.$$.ctx[3]}set gradio(e){this.$$set({gradio:e}),b()}get width(){return this.$$.ctx[4]}set width(e){this.$$set({width:e}),b()}get visible(){return this.$$.ctx[5]}set visible(e){this.$$set({visible:e}),b()}}export{Pe as default};
|
|
//# sourceMappingURL=Index-BPt-5aGz.js.map
|