1import"../chunks/CWj6FrbW.js";import"../chunks/69_IOA4Y.js";import{p as x,g as y,o as B,h as v,i as w,a as c,b as D,s as J,k as i,l as o,m,c as M,r as P,u as a,f as Q,e as C}from"../chunks/7a2fV5I9.js";import{i as F}from"../chunks/Dw-yaK-_.js";import{k as G}from"../chunks/PFz3DOhQ.js";import{i as H}from"../chunks/CWFN-V6k.js";import{g as L}from"../chunks/BnvOT63w.js";import{c as j,a as z}from"../chunks/8BNfc9w8.js";import{T as A}from"../chunks/BXkVlptz.js";import{e as K,c as X,W as E}from"../chunks/DKKyCjZm.js";import{t as Y}from"../chunks/C33EP41Y.js";import{t as p}from"../chunks/B1RxOmHW.js";var Z=Q('<div class="h-full min-w-0 overflow-x-hidden"><!></div>');function ue(h,S){x(S,!1);const u=()=>C(N,"$i18n",I),[I,$]=J(),N=y("i18n");let g=m(!1),d=m(!1),s=m(null);const O=async t=>{const r=K(t.content);if(X((r==null?void 0:r.required_open_webui_version)??"0.0.0",E)){p.error(u().t("Open WebUI version (v{{OPEN_WEBUI_VERSION}}) is lower than required version (v{{REQUIRED_VERSION}})",{OPEN_WEBUI_VERSION:E,REQUIRED_VERSION:(r==null?void 0:r.required_open_webui_version)??"0.0.0"}));return}await j(localStorage.token,{id:t.id,name:t.name,meta:t.meta,content:t.content,access_grants:t.access_grants}).catch(n=>(p.error(`${n}`),null))&&(p.success(u().t("Tool created successfully")),Y.set(await z(localStorage.token)),await L("/workspace/tools"))};B(()=>{window.addEventListener("message",async t=>{["https://openwebui.com","https://www.openwebui.com","http://localhost:9999"].includes(t.origin)&&(i(s,JSON.parse(t.data)),o(s))}),(window.opener??!1)&&window.opener.postMessage("loaded","*"),sessionStorage.tool&&(i(s,JSON.parse(sessionStorage.tool)),sessionStorage.removeItem("tool"),o(s),i(d,!0)),i(g,!0)}),H();var f=v(),R=w(f);{var b=t=>{var r=v(),_=w(r);G(_,()=>{var n;return(n=o(s))==null?void 0:n.content},n=>{var l=Z(),k=M(l);{let V=a(()=>{var e;return((e=o(s))==null?void 0:e.id)??""}),U=a(()=>{var e;return((e=o(s))==null?void 0:e.name)??""}),q=a(()=>{var e;return((e=o(s))==null?void 0:e.meta)??{description:""}}),T=a(()=>{var e;return((e=o(s))==null?void 0:e.content)??""}),W=a(()=>{var e;return((e=o(s))==null?void 0:e.access_grants)!==void 0?o(s).access_grants:[]});A(k,{get id(){return o(V)},get name(){return o(U)},get meta(){return o(q)},get content(){return o(T)},get accessGrants(){return o(W)},get clone(){return o(d)},onSave:e=>{O(e)}})}P(l),c(n,l)}),c(t,r)};F(R,t=>{o(g)&&t(b)})}c(h,f),D(),$()}export{ue as component}; 2//# sourceMappingURL=50.UDjMvZA5.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.