mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-01 01:12:43 -05:00
feat: python code execution
This commit is contained in:
1 parent
ba61f87a2f
commit
58a13aec7e
67 files changed
+1918
-11
No files matched your search
@@ -0,0 +1,2 @@
|
||||
import{RangeValue as t,RangeSet as e,MapMode as i,Facet as s,ChangeSet as o,EditorSelection as n,EditorState as r,Transaction as l,Prec as h,StateEffect as a,codePointAt as c,codePointSize as d,countColumn as u,StateField as f,findClusterBreak as p,findColumn as g,Annotation as m,Text as w,combineConfig as v,RangeSetBuilder as b,CharCategory as y}from"./codemirror_state-BKbyfKsm.js";const S="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),x="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class k{constructor(t,e){this.rules=[];let{finish:i}=e||{};function s(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function o(t,e,n,r){let l=[],h=/^@(\w+)\b/.exec(t[0]),a=h&&"keyframes"==h[1];if(h&&null==e)return n.push(t[0]+";");for(let i in e){let r=e[i];if(/&/.test(i))o(i.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),r,n);else if(r&&"object"==typeof r){if(!h)throw new RangeError("The value of a property ("+i+") should be a primitive value.");o(s(i),r,l,a)}else null!=r&&l.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+r+";")}(l.length||a)&&n.push((!i||h||r?t:t.map(i)).join(", ")+" {"+l.join(" ")+"}")}for(let e in t)o(s(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=M[S]||1;return M[S]=t+1,"ͼ"+t.toString(36)}static mount(t,e,i){let s=t[x],o=i&&i.nonce;s?o&&s.setNonce(o):s=new A(t,o),s.mount(Array.isArray(e)?e:[e])}}let C=new Map;class A{constructor(t,e){let i=t.ownerDocument||t,s=i.defaultView;if(!t.head&&t.adoptedStyleSheets&&s.CSSStyleSheet){let e=C.get(i);if(e)return t.adoptedStyleSheets=[e.sheet,...t.adoptedStyleSheets],t[x]=e;this.sheet=new s.CSSStyleSheet,t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets],C.set(i,this)}else{this.styleTag=i.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);let s=t.head||t;s.insertBefore(this.styleTag,s.firstChild)}this.modules=[],t[x]=this}mount(t){let e=this.sheet,i=0,s=0;for(let o=0;o<t.length;o++){let n=t[o],r=this.modules.indexOf(n);if(r<s&&r>-1&&(this.modules.splice(r,1),s--,r=-1),-1==r){if(this.modules.splice(s++,0,n),e)for(let t=0;t<n.rules.length;t++)e.insertRule(n.rules[t],i++)}else{for(;s<r;)i+=this.modules[s++].rules.length;i+=n.rules.length,s++}}if(!e){let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}for(var D={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},T={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},O="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),E="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),R=0;R<10;R++)D[48+R]=D[96+R]=String(R);for(R=1;R<=24;R++)D[R+111]="F"+R;for(R=65;R<=90;R++)D[R]=String.fromCharCode(R+32),T[R]=String.fromCharCode(R);for(var L in D)T.hasOwnProperty(L)||(T[L]=D[L]);function B(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function H(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function P(t,e){if(!e.anchorNode)return!1;try{return H(t,e.anchorNode)}catch(t){return!1}}function V(t){return 3==t.nodeType?U(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function N(t,e,i,s){return!!i&&(F(t,e,i,s,-1)||F(t,e,i,s,1))}function W(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function z(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function F(t,e,i,s,o){for(;;){if(t==i&&e==s)return!0;if(e==(o<0?0:K(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=W(t)+(o<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(o<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=o<0?K(t):0}}}function K(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function I(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function q(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function Y(t,e){let i=e.width/t.offsetWidth,s=e.height/t.offsetHeight;return(i>.99Line truncated
|
||||
//# sourceMappingURL=codemirror_view-C0PMO2z_.js.map
|
||||
Reference in new issue
Block a user