1import{bj as k,bk as v,$ as b,bl as M,bm as _,y as n}from"./app-DhbzpxNh.js";import{u as C}from"./BIUatlku.js";import{M as H,r as P}from"./BhCrKpCi.js";import{M as W}from"./ekk5CR_R.js";import{b as S,a as c,w as B,e as I,g as m,h as l,j as d,s as N,A as V,H as $,q as j}from"./BI8qgwQJ.js";import"./BTqQ_sdn.js";import"./LXhm4yn3.js";import"./BbrKSk-I.js";import"./Br3jrAqb.js";const u="aiscriptApp",O=S({__name:"WidgetAiscriptApp",props:{widget:{}},emits:["updateProps"],setup(g,{expose:w,emit:f}){const A={script:{type:"string",multiline:!0,default:""},showHeader:{type:"boolean",default:!0}},r=g,y=f,{widgetProps:s,configure:x}=C(u,A,r,y),h=new _,o=c(),a=c([]);async function i(){const p=new k({...v({storageKey:"widget",token:b?.token}),...P(a.value,e=>{o.value=e.value})},{in:M,out:e=>{},log:(e,z)=>{}});let t;try{t=h.parse(s.script)}catch{n({type:"error",text:"Syntax error :("});return}try{await p.exec(t)}catch(e){n({type:"error",title:"AiScript Error",text:e.message})}}return B(()=>s.script,()=>{i()}),I(()=>{i()}),w({name:u,configure:x,id:r.widget?r.widget.id:null}),(p,t)=>(l(),m(W,{showHeader:j(s).showHeader,class:"mkw-aiscriptApp"},{header:d(()=>t[0]||(t[0]=[$("App")])),default:d(()=>[N("div",{class:"WidgetAiscriptApp-root-sIcm"},[o.value?(l(),m(H,{key:0,component:o.value,components:a.value,size:"small"},null,8,["component","components"])):V("",!0)],2)]),_:1},8,["showHeader"]))}});export{O as default};
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.