@jxsuite/studio 8.1.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{2020-dg097k3e.js → 2020-j56903f1.js} +3 -3
- package/dist/chunks/adapter-wc5zvg9a.js +4 -0
- package/dist/chunks/add-new-flow-snx1s4b0.js +4 -0
- package/dist/chunks/cf-account-picker-xyqw0jex.js +4 -0
- package/dist/chunks/cf-settings-hp1pjm0n.js +4 -0
- package/dist/chunks/color-04361ttk.js +4 -0
- package/dist/chunks/{color-area-vh9cew51.js → color-area-h8dbasp1.js} +2 -2
- package/dist/chunks/{color-field-e78f16bs.js → color-field-qv5r2b16.js} +3 -3
- package/dist/chunks/{color-slider-fg4yhvk6.js → color-slider-nz2mrzky.js} +2 -2
- package/dist/chunks/components-nkwphrx3.js +4 -0
- package/dist/chunks/content-source-6a253wmk.js +4 -0
- package/dist/chunks/{convert-to-repeater-grnmea6c.js → convert-to-repeater-fhdwyg14.js} +3 -3
- package/dist/chunks/editor-wqrc68ca.js +4 -0
- package/dist/chunks/entry-commands-nef0wrmp.js +4 -0
- package/dist/chunks/{extension-sections-rp7fkega.js → extension-sections-8ez2rrk8.js} +3 -3
- package/dist/chunks/file-ops-y3w71k1n.js +4 -0
- package/dist/chunks/files-de90apn9.js +4 -0
- package/dist/chunks/format-host-zfjz4rzm.js +4 -0
- package/dist/chunks/fs-events-77c0mr0x.js +4 -0
- package/dist/chunks/grid-open-4n4fjfpf.js +4 -0
- package/dist/chunks/{grid-view-x26rfpz1.js → grid-view-ka55z38f.js} +10 -10
- package/dist/chunks/{iframe-entry-pkgmcgp0.js → iframe-entry-2x9bn5ng.js} +4 -4
- package/dist/chunks/{iframe-entry-02wzcyvy.js → iframe-entry-btck0e9s.js} +4 -4
- package/dist/chunks/iframe-host-na2mywz4.js +4 -0
- package/dist/chunks/index-ewmgdb7c.js +4 -0
- package/dist/chunks/{index-203h71wy.js → index-qb98xhse.js} +3 -3
- package/dist/chunks/{javascript-ww5pv5ae.js → javascript-ces13wny.js} +2 -2
- package/dist/chunks/{jsonMode-vwbdwwq3.js → jsonMode-6md16d4v.js} +6 -6
- package/dist/chunks/jx-validate-b309c020.js +4 -0
- package/dist/chunks/layers-8rn8y6qv.js +4 -0
- package/dist/chunks/layers-panel-eyah7h9z.js +4 -0
- package/dist/chunks/lit-html-wyqw04y2.js +4 -0
- package/dist/chunks/media-library-gs3np47y.js +4 -0
- package/dist/chunks/media-picker-tt7dk4tb.js +4 -0
- package/dist/chunks/{monaco-binding-63tqze27.js → monaco-binding-p8j80s4w.js} +3 -3
- package/dist/chunks/monaco-buffer-wsf6cmnq.js +4 -0
- package/dist/chunks/{monaco-setup-zyyynnj8.js → monaco-setup-wasktzfg.js} +3 -3
- package/dist/chunks/notify-qwst108r.js +4 -0
- package/dist/chunks/parse-n8dfxnqf.js +4 -0
- package/dist/chunks/platform-c16mqvmp.js +4 -0
- package/dist/chunks/publish-panel-d34bhvwj.js +4 -0
- package/dist/chunks/{publish-quick-ajzdhhs6.js → publish-quick-vr695j26.js} +3 -3
- package/dist/chunks/publish-workspace-2yr60mt4.js +4 -0
- package/dist/chunks/quick-search-e6xsdv0d.js +4 -0
- package/dist/chunks/references-gsj6trdv.js +4 -0
- package/dist/chunks/right-panel-33jv1knc.js +4 -0
- package/dist/chunks/source-control-bj9bejjv.js +4 -0
- package/dist/chunks/studio-03mqh8ax.js +5 -0
- package/dist/chunks/{studio-957jg8g3.js → studio-06j4en5h.js} +4 -4
- package/dist/chunks/studio-0ydxv2mr.js +7 -0
- package/dist/chunks/{studio-v2ek69cb.js → studio-1e8dw2w2.js} +4 -4
- package/dist/chunks/studio-2hsqbq7b.js +7 -0
- package/dist/chunks/studio-2j86y34y.js +6 -0
- package/dist/chunks/studio-2ks6ka4g.js +5 -0
- package/dist/chunks/studio-34jrz12k.js +5 -0
- package/dist/chunks/{studio-1meqbxns.js → studio-35vrtpdq.js} +4 -4
- package/dist/chunks/studio-38g0jdz7.js +5 -0
- package/dist/chunks/{studio-25a5by3h.js → studio-396srjbk.js} +4 -4
- package/dist/chunks/{studio-zm7dnr9g.js → studio-3c8pp7pb.js} +4 -4
- package/dist/chunks/{studio-x3ge4rts.js → studio-3v5cagy9.js} +4 -4
- package/dist/chunks/studio-3w35qvay.js +5 -0
- package/dist/chunks/studio-3zge48z4.js +7 -0
- package/dist/chunks/studio-45gyxpcq.js +5 -0
- package/dist/chunks/{studio-hw60n5dh.js → studio-4kzbrr5t.js} +3 -3
- package/dist/chunks/{studio-533py3yy.js → studio-5tzgq6fx.js} +4 -4
- package/dist/chunks/studio-5wzdy1jc.js +16 -0
- package/dist/chunks/studio-732mw0g8.js +5 -0
- package/dist/chunks/{studio-3q6n9qvq.js → studio-771k2n12.js} +4 -4
- package/dist/chunks/{studio-z42kysg7.js → studio-7dzyz9n8.js} +137 -137
- package/dist/chunks/{studio-fqs1a22a.js → studio-7xag4na8.js} +4 -4
- package/dist/chunks/{studio-jqrg9xxg.js → studio-881z1xrx.js} +4 -4
- package/dist/chunks/studio-88bmt9rh.js +5 -0
- package/dist/chunks/{studio-8nyw10dp.js → studio-9b7177jq.js} +4 -4
- package/dist/chunks/{studio-nm9qev4p.js → studio-9cxmp61c.js} +5 -5
- package/dist/chunks/{studio-4dsdnan2.js → studio-9dz76yqc.js} +5 -5
- package/dist/chunks/{studio-a6x058ew.js → studio-agyvzfm4.js} +4 -4
- package/dist/chunks/{studio-2b8443ms.js → studio-ajw4k8hp.js} +3 -3
- package/dist/chunks/studio-c1pxszat.js +5 -0
- package/dist/chunks/studio-cpkamjdn.js +14 -0
- package/dist/chunks/studio-d038kqbs.js +5 -0
- package/dist/chunks/studio-d83m0wyq.js +5 -0
- package/dist/chunks/studio-dbxv7w4s.js +5 -0
- package/dist/chunks/studio-de1s2x9v.js +5 -0
- package/dist/chunks/{studio-94ppxeqy.js → studio-dx73md4n.js} +8 -8
- package/dist/chunks/studio-ekgtrndg.js +5 -0
- package/dist/chunks/studio-epenqmvk.js +7 -0
- package/dist/chunks/studio-et2q4s8n.js +5 -0
- package/dist/chunks/{studio-txkx6586.js → studio-ewarnzm4.js} +7 -7
- package/dist/chunks/{studio-bf0rgyf7.js → studio-fy7jzj9j.js} +4 -4
- package/dist/chunks/{studio-332hesdk.js → studio-gr36vnte.js} +4 -4
- package/dist/chunks/{studio-rdnezzkd.js → studio-gwrhcrss.js} +5 -5
- package/dist/chunks/{studio-9wyqyfqy.js → studio-h310mbqm.js} +4 -4
- package/dist/chunks/{studio-zht0x0v3.js → studio-h5tpz5ke.js} +4 -4
- package/dist/chunks/studio-h7weqf2q.js +5 -0
- package/dist/chunks/{studio-1gdfsr49.js → studio-hcsba201.js} +7 -7
- package/dist/chunks/studio-hwejq03c.js +5 -0
- package/dist/chunks/{studio-wcakp5bt.js → studio-hy4ye0dx.js} +7 -7
- package/dist/chunks/{studio-02phtmqn.js → studio-jttyqrmh.js} +4 -4
- package/dist/chunks/{studio-j5jqvyn3.js → studio-jw0q5j6k.js} +4 -4
- package/dist/chunks/studio-k3a8rp3d.js +5 -0
- package/dist/chunks/{studio-hnx1h1pr.js → studio-k3bcy02e.js} +4 -4
- package/dist/chunks/studio-m48v13s3.js +4 -0
- package/dist/chunks/{studio-bqgs90r8.js → studio-ndskgqef.js} +4 -4
- package/dist/chunks/studio-p1n2xjda.js +5 -0
- package/dist/chunks/studio-pgm83a2f.js +6 -0
- package/dist/chunks/studio-pqqq6v85.js +5 -0
- package/dist/chunks/studio-psh8mwnw.js +4 -0
- package/dist/chunks/{studio-cpdzrdgp.js → studio-r17asgs0.js} +4 -4
- package/dist/chunks/{studio-6vrxzkba.js → studio-ry81j4q1.js} +4 -4
- package/dist/chunks/studio-rzg8hnkf.js +5 -0
- package/dist/chunks/{studio-nsv7g1qn.js → studio-s0fg2wav.js} +4 -4
- package/dist/chunks/{studio-v0gsjav0.js → studio-tj2s0tks.js} +4 -4
- package/dist/chunks/studio-tyw7tk0x.js +5 -0
- package/dist/chunks/studio-v9ywz2se.js +6 -0
- package/dist/chunks/{studio-dmn7gpba.js → studio-vswcpzk7.js} +5 -5
- package/dist/chunks/studio-vzgmyt0v.js +5 -0
- package/dist/chunks/{studio-2dtc90zs.js → studio-wxdcd42g.js} +6 -6
- package/dist/chunks/{studio-c5dj3dzk.js → studio-wxhy1yh7.js} +4 -4
- package/dist/chunks/studio-x08a3m0a.js +5 -0
- package/dist/chunks/studio-x3mjr5cc.js +5 -0
- package/dist/chunks/{studio-xddgbwhe.js → studio-x97ay0v4.js} +4 -4
- package/dist/chunks/{studio-mmqr9awv.js → studio-xdpz9rpe.js} +33 -33
- package/dist/chunks/studio-xh683qzy.js +5 -0
- package/dist/chunks/{studio-hxq1ebp0.js → studio-xkxetm65.js} +6 -6
- package/dist/chunks/{studio-73wz63nn.js → studio-y26hx9re.js} +4 -4
- package/dist/chunks/{studio-kdseew9m.js → studio-yg3djpnm.js} +4 -4
- package/dist/chunks/studio-yx8hzqja.js +5 -0
- package/dist/chunks/studio-zg16eeq1.js +5 -0
- package/dist/chunks/studio-zgx7svjd.js +9 -0
- package/dist/chunks/studio-zkq3r91p.js +5 -0
- package/dist/chunks/{toast-host-1yg5ar8d.js → toast-host-g3r2s0kn.js} +2 -2
- package/dist/chunks/toast-w11qpkyz.js +4 -0
- package/dist/chunks/{tsMode-vra2hh7y.js → tsMode-h6tkz0ea.js} +5 -5
- package/dist/chunks/workspace-home-zkkrxq3r.js +4 -0
- package/dist/chunks/workspace-tdqqjqaa.js +4 -0
- package/dist/chunks/{ws-client-72x5n99j.js → ws-client-e951my95.js} +3 -3
- package/dist/iframe-entry.js +13 -13
- package/dist/manifest.json +77 -77
- package/dist/studio.js +91 -92
- package/package.json +11 -12
- package/src/canvas/iframe-editable-root.ts +32 -2
- package/src/collab/collab-session.ts +6 -2
- package/src/commands/context.ts +4 -0
- package/src/commands/defaults.ts +2 -0
- package/src/commands/live-context.ts +2 -0
- package/src/files/files.ts +6 -3
- package/src/format/format-host.ts +1 -1
- package/src/github/github-auth-status.ts +2 -2
- package/src/media/media-library.ts +73 -3
- package/src/new-project/new-project-modal.ts +1 -4
- package/src/packages/ensure-deps.ts +5 -5
- package/src/packages/pull-package-sync.ts +4 -4
- package/src/panels/activity-panel.ts +1 -1
- package/src/panels/ai-panel.ts +27 -34
- package/src/platform.ts +20 -0
- package/src/platforms/cloud.ts +48 -34
- package/src/platforms/devserver.ts +2 -120
- package/src/services/ai-ask.ts +29 -171
- package/src/services/ai-command-tools.ts +40 -50
- package/src/services/ai-import-tools.ts +4 -5
- package/src/services/ai-project-tools.ts +13 -3
- package/src/services/ai-tools.ts +26 -564
- package/src/services/ai-writes.ts +84 -2
- package/src/services/document-assistant.ts +29 -58
- package/src/services/harness/assistant-tools.ts +68 -0
- package/src/services/harness/interaction-store.ts +118 -0
- package/src/services/harness/studio-documents.ts +105 -0
- package/src/services/harness/turn-hooks.ts +1 -6
- package/src/services/project-adoption.ts +8 -16
- package/src/services/tool-executor.ts +25 -22
- package/src/settings/extension-commands.ts +1 -1
- package/src/settings/extension-rows.ts +1 -6
- package/src/settings/extensions-section.ts +3 -6
- package/src/state.ts +3 -13
- package/src/surfaces/block-action-bar.json +1 -3
- package/src/surfaces/files-panel.json +12 -0
- package/src/surfaces/files-panel.ts +5 -2
- package/src/surfaces/media-library.json +35 -0
- package/src/surfaces/media-library.ts +2 -0
- package/src/surfaces/menu.ts +62 -1
- package/src/surfaces/settings-packages.ts +1 -1
- package/src/surfaces/welcome.ts +4 -1
- package/src/tabs/selection.ts +14 -109
- package/src/tabs/tab.ts +10 -1
- package/src/tabs/transact.ts +316 -124
- package/src/types.ts +23 -16
- package/src/ui/layers.ts +1 -1
- package/src/ui/progress-modal.ts +3 -3
- package/dist/chunks/adapter-tck81zft.js +0 -4
- package/dist/chunks/add-new-flow-a1w0bnm6.js +0 -4
- package/dist/chunks/cf-account-picker-ce3kp3x1.js +0 -4
- package/dist/chunks/cf-settings-7ye6x7g2.js +0 -4
- package/dist/chunks/color-4gj49xq6.js +0 -4
- package/dist/chunks/components-qce0v93f.js +0 -4
- package/dist/chunks/content-source-jjx8kgzr.js +0 -4
- package/dist/chunks/editor-bkja5dbv.js +0 -4
- package/dist/chunks/entry-commands-1wh0btvg.js +0 -4
- package/dist/chunks/file-ops-6pe4z7an.js +0 -4
- package/dist/chunks/files-ybpp3j38.js +0 -4
- package/dist/chunks/format-host-3mtbhxk1.js +0 -4
- package/dist/chunks/fs-events-xfanfxds.js +0 -4
- package/dist/chunks/grid-open-dg5qmnaj.js +0 -4
- package/dist/chunks/iframe-host-j2bk2xkc.js +0 -4
- package/dist/chunks/index-fkrm7pdk.js +0 -4
- package/dist/chunks/jx-validate-w7v32f6a.js +0 -4
- package/dist/chunks/layers-g7j732cm.js +0 -4
- package/dist/chunks/layers-panel-gjrsxcck.js +0 -4
- package/dist/chunks/lit-html-jdfz9rhc.js +0 -4
- package/dist/chunks/media-library-9j0v4wmk.js +0 -4
- package/dist/chunks/media-picker-cpyyt2m0.js +0 -4
- package/dist/chunks/monaco-buffer-9wcme176.js +0 -4
- package/dist/chunks/notify-rahnnnv4.js +0 -4
- package/dist/chunks/parse-v77xtwv7.js +0 -4
- package/dist/chunks/platform-b2aqv7v5.js +0 -4
- package/dist/chunks/publish-panel-4yk2461b.js +0 -4
- package/dist/chunks/publish-workspace-mxestzcf.js +0 -4
- package/dist/chunks/quick-search-9g6z65b0.js +0 -4
- package/dist/chunks/references-c26enpxs.js +0 -4
- package/dist/chunks/right-panel-9d0e0yg7.js +0 -4
- package/dist/chunks/source-control-xyn3a8ds.js +0 -4
- package/dist/chunks/studio-0khd0xdw.js +0 -5
- package/dist/chunks/studio-1fvzq9vs.js +0 -5
- package/dist/chunks/studio-1yhz0s8p.js +0 -5
- package/dist/chunks/studio-2c2mjyzj.js +0 -6
- package/dist/chunks/studio-3pndhat0.js +0 -9
- package/dist/chunks/studio-4fjqdzrb.js +0 -6
- package/dist/chunks/studio-5abge3wy.js +0 -5
- package/dist/chunks/studio-74nzv280.js +0 -5
- package/dist/chunks/studio-7cg75gtj.js +0 -14
- package/dist/chunks/studio-89cwmnae.js +0 -5
- package/dist/chunks/studio-8m1t83kn.js +0 -7
- package/dist/chunks/studio-a3evp7f6.js +0 -6
- package/dist/chunks/studio-ana67wax.js +0 -5
- package/dist/chunks/studio-b4xhpcwy.js +0 -4
- package/dist/chunks/studio-c4rcaftm.js +0 -5
- package/dist/chunks/studio-cgjt1zce.js +0 -5
- package/dist/chunks/studio-cq87hree.js +0 -5
- package/dist/chunks/studio-d140sy8e.js +0 -5
- package/dist/chunks/studio-e1g64q43.js +0 -5
- package/dist/chunks/studio-e8pzjjhf.js +0 -5
- package/dist/chunks/studio-f8kz3krj.js +0 -7
- package/dist/chunks/studio-fw3jp9m7.js +0 -5
- package/dist/chunks/studio-g6ysm05p.js +0 -7
- package/dist/chunks/studio-gmhd0j3f.js +0 -5
- package/dist/chunks/studio-gqpty626.js +0 -5
- package/dist/chunks/studio-grp684wx.js +0 -5
- package/dist/chunks/studio-h98520qr.js +0 -5
- package/dist/chunks/studio-hvxt8z79.js +0 -5
- package/dist/chunks/studio-j4e627w1.js +0 -5
- package/dist/chunks/studio-kt2j51sa.js +0 -5
- package/dist/chunks/studio-m4w6sygj.js +0 -16
- package/dist/chunks/studio-nqxqf8p2.js +0 -4
- package/dist/chunks/studio-p89w12s2.js +0 -7
- package/dist/chunks/studio-pbagym4j.js +0 -5
- package/dist/chunks/studio-pr23qhrw.js +0 -5
- package/dist/chunks/studio-r4ya3sb2.js +0 -5
- package/dist/chunks/studio-rm9m3z60.js +0 -5
- package/dist/chunks/studio-tpmnbgmt.js +0 -5
- package/dist/chunks/studio-ttxhq5yt.js +0 -5
- package/dist/chunks/studio-y1x65h5r.js +0 -5
- package/dist/chunks/studio-zf188hnd.js +0 -5
- package/dist/chunks/toast-1gv0h53h.js +0 -4
- package/dist/chunks/workspace-3nt93k48.js +0 -4
- package/dist/chunks/workspace-home-zbgyqqws.js +0 -4
- package/src/services/directory-picker.ts +0 -187
- package/src/services/gated-registry.ts +0 -77
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{mt}from"./studio-ajw4k8hp.js";import{te}from"./studio-psh8mwnw.js";import{ae}from"./studio-cpkamjdn.js";import{T,R,En,rt,xi}from"./studio-jttyqrmh.js";import{g,ar,C}from"./studio-4kzbrr5t.js";import{rf,p,_e}from"./studio-03mqh8ax.js";import{Ht,Lh,ec,Xd,Na,of,fn,ul}from"./studio-3w35qvay.js";import{Sr}from"./studio-de1s2x9v.js";import{us,Om}from"./studio-k3bcy02e.js";import{Vt,ln,go,Pm,cv,Wd,Un,hi,m,Zl,Xl,Ql,_i,U$,jt,mv,Hx}from"./studio-vzgmyt0v.js";import{Bp,XA,QA,Ta}from"./studio-h310mbqm.js";import{pt,Uo,xr}from"./studio-771k2n12.js";import{ks,eA,GL,oA,ax,lx}from"./studio-5wzdy1jc.js";import{el}from"./studio-hy4ye0dx.js";import{Xn}from"./studio-9cxmp61c.js";import{xa}from"./studio-1e8dw2w2.js";import{Rp}from"./studio-x3mjr5cc.js";import{zr,qs,Gs,Wr}from"./studio-ewarnzm4.js";import{yw,mm,gm,yb}from"./studio-hwejq03c.js";import{zc,Sa}from"./studio-34jrz12k.js";import{ZE,oS}from"./studio-2ks6ka4g.js";import{QD,jr,_b,Sb}from"./studio-c1pxszat.js";import{Nw,ym}from"./studio-ndskgqef.js";import{Wt}from"./studio-x97ay0v4.js";import{mw,gw,bw}from"./studio-k3a8rp3d.js";import{Ic}from"./studio-d038kqbs.js";import{tS,KE,JE,fb}from"./studio-s0fg2wav.js";import{zs}from"./studio-h5tpz5ke.js";import{S,Xc,wn}from"./studio-45gyxpcq.js";import{n,_}from"./studio-zkq3r91p.js";import{le}from"./studio-7xag4na8.js";async function ub(){if(yw(location.search))return!1;let e=p();if(!e.dependenciesNeedInstall||!e.installDependencies)return!1;let t=!1;try{t=await e.dependenciesNeedInstall()}catch{return!1}if(!t)return!1;let o=el({status:"Installing dependencies…",title:"Installing dependencies"});try{let r=await e.installDependencies();if(r.ok)return o.done(),!0;o.fail(r.log??"Install failed")}catch(r){o.fail(r instanceof Error?r.message:String(r))}return!1}var Le=["page","component"],Me={components:"component",pages:"page"};function L(e){return e.replaceAll("\\","/").replace(/^\.\//,"")}function Ae(e){let t=L(e).toLowerCase();for(let[o,r]of Object.entries(Me))if(t.startsWith(`${o}/`))return r;return null}function Y(e){return Le.some((t)=>e.includes(t))}function He(e){let t=S?.projectConfig?.layout;if(!n(t))return!1;return L(t).toLowerCase()===L(e).toLowerCase()}function K_(e){let t=[{ext:".json",label:"JSON (.json)"}];for(let o of ul(e)){let r=Na(o,"parse");if(r&&Na(o,"serialize"))t.push({ext:o,label:`${r.name} (${o})`})}return t}function ie(){return new Set([".json",...Xd().flatMap((e)=>e.extensions)])}function J_(e){if(e===null||e===void 0||e==="")return[];let t=Ae(e);if(t===null||He(e)||Un(e))return[];let o=fn(e);if(!(o?Boolean(o.capabilities.parse)&&Y(o.documentKinds):L(e).toLowerCase().endsWith(".json")))return[];let a=[];if(o)a.push({ext:".json",label:"JSON (.json)"});for(let i of ul()){let s=Na(i,"serialize");if(!s||s.name===o?.name||!Y(s.documentKinds)||!s.documentKinds.includes(t))continue;a.push({ext:i,label:`${s.name} (${i})`})}return a}function RD(){let e=new Set([".json"]);for(let t of Xd()){if(!t.capabilities.serialize||!Y(t.documentKinds))continue;for(let o of t.extensions)e.add(o)}return[...e].toSorted()}var Q="jx-studio-recent-projects",ce="jx-studio-recent-files",se=8,We=10,E=[];function M(){if(!_e())return null;let e=p();return ze(e)?e:null}function ze(e){return Boolean(e.getRecentProjects&&e.saveRecentProjects)}function Ve(){try{let e=localStorage.getItem(Q);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function X(){return M()?E:Ve()}function de(e){E=e;let t=M();if(t)t.saveRecentProjects(e);else try{localStorage.setItem(Q,JSON.stringify(e))}catch{}}async function DD(){let e=M();if(!e)return;try{E=await e.getRecentProjects()}catch{E=[]}}function hw(){return X().toSorted((e,t)=>t.timestamp-e.timestamp)}function pw(e,t){let o=X().filter((r)=>r.root!==t);if(o.unshift({name:e,root:t,timestamp:ar()}),o.length>se)o.length=se;de(o)}function Y_(e){de(X().filter((t)=>t.root!==e))}function ND(){E=[];let e=M();if(e)e.saveRecentProjects([]);else localStorage.removeItem(Q)}function pe(){try{let e=localStorage.getItem(ce);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function AD(e){let t=pe().toSorted((o,r)=>r.timestamp-o.timestamp);return e==null?t:t.filter((o)=>o.root===e)}function hb(e){let t=pe().filter((a)=>!(a.root===e.root&&a.path===e.path));t.unshift({name:e.name,path:e.path,root:e.root,timestamp:ar()});let o=new Map,r=[];for(let a of t.toSorted((i,s)=>s.timestamp-i.timestamp)){let i=(o.get(a.root)??0)+1;if(o.set(a.root,i),i<=We)r.push(a)}localStorage.setItem(ce,JSON.stringify(r))}var ue={$schema:"https://jxsuite.com/schema/v1",$id:"StudioFilesPanel",$description:'The Navigator\'s Files tree, as a Jx document over the kit. `files/files.ts` keeps every decision — which directories are listed, which entries `.gitignore` masks, which rows the window draws, what a click on a row means, what the context menu offers and what each verb does to the filesystem — and hands this document one projection: a word saying which of three things to draw, a toolbar whose state is already resolved, and rows whose every field is already a string. Nothing here asks what a file is, how tall the Navigator is, or whether a directory has been read. THE TREE IS `jx-tree`, and that is what this document no longer says: `role="tree"`, `role="treeitem"`, `aria-level`, `aria-posinset`, `aria-setsize`, the roving `tabindex` and the five arrow-key cases were each written out here and written out again in `panel-outline.json`, two copies of one keyboard contract with nothing holding them in agreement. The element owns all of it; what is left here is what this tree IS — a flat projection of rows, each already carrying its own level and set counts, because the DOM holds a WINDOW onto the model and an expanded `node_modules` is eleven rows rather than ten thousand. The window reaches the element as `padtop`/`padbottom`, and a caret move past either comes back as `move` for the flow to scroll and repaint. Four facts a row carries are bound against ONE scope field each — the current path, the selected path, the dragged path and the drop target — so moving the caret or dragging a file re-evaluates an attribute per drawn row instead of rebuilding the list under the reader\'s pointer. The pragmatic-drag-and-drop handles are an ISLAND: the document draws the rows and the tree, and the adapter attaches sources and targets to them through `onNodeCreated` (specs/studio-ui-guidelines.md §9.4).',tagName:"div",attributes:{part:"files"},style:{$description:"What the twenty `.file-tree*`, `.files-toolbar`, `.project-header` and `.project-name` rules in `styles/panels.css` said, keyed on `part` and re-pointed at the studio token layer. Three names could not come with the declarations. The five `var(--spectrum-font-size-50 | -75, …)` reads are the kit's `--jx-text-sm` and `--jx-text-md`, which are the same 11px and 12px — a `--spectrum-*` name is declared by `<sp-theme>` and by nothing else in this package, so a document that reads one is a document whose type size changes when a component it does not use is removed. The `.selected`, `.dragging`, `.drag-over` and `.drag-over-root` classes are `data-` attributes on a part, because a part is the handle now and because a state a handler adds and forgets to take off is exactly the defect a cancelled drag used to leave on screen. MOST OF THE ROW'S OWN RULES ARE GONE, and that is the point of the element rather than an omission: `jx-tree-item` declares the flex line, the one-control-height box the window reserves scroll by, the indent (`--jx-tree-indent` times one less than `level` — exactly the `8 + depth * 16` this file composed per row), the hover and focus states, the selected wash and the faded dragged row. What is left here is what is TRUE OF THIS TREE and not of trees in general: it owns its own scrollbar, a click on a row opens it, and the row a drag is over wears the drop mark this file draws.",display:"flex",flexDirection:"column",height:"100%",minHeight:"0",overflow:"hidden",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="empty"]':{$description:"The two states that are not a tree. They are two states and not one sentence: a window with no project at all and a monorepo root that has not been pointed at a site are different situations, and only the second has anything to offer (studio-ui-guidelines.md §11).",padding:"var(--jx-space-6)",textAlign:"center",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-4)"},'& [part="empty"] p':{margin:"0"},'& [part="frame"]':{display:"flex",flexDirection:"column",height:"100%",minHeight:"0"},'& [part="project-header"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-3) var(--jx-space-4)",borderBottom:"1px solid var(--border)",flexShrink:"0"},'& [part="project-name"]':{fontSize:"var(--jx-text-md)",fontWeight:"600",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="toolbar"]':{display:"flex",gap:"var(--jx-space-2)",padding:"var(--jx-space-2) var(--jx-space-3)",borderBottom:"1px solid var(--border)",alignItems:"center",flexShrink:"0"},'& [part="search"]':{flex:"1",minWidth:"0"},'& [part="tree"]':{$description:"The scroller as well as the list. `ui/virtual-window.ts` walks up from the element it is given looking for the nearest thing that scrolls, and finding itself is the shortest answer — which is why the element declares no `overflow` of its own and leaves the question to the two trees that answer it differently. The colour is re-declared because `jx-tree` sets `--jx-fg` on itself, and this panel's text colour is the studio alias of it.",flex:"1",minHeight:"0",overflowY:"auto",color:"var(--fg)"},'& [part="tree"][data-drop="true"]':{background:"var(--hover-bg)"},'& [part="row"]':{$description:"What the element does not decide. A click on a row OPENS it here — a directory unfolds, a file takes a tab — so the pointer is a pointer rather than the element's default arrow; and the gap is the wider one this tree has always drawn between a 16px file glyph and its name.",gap:"var(--jx-space-3)",cursor:"pointer"},'& [part="loading-row"]':{$description:"A directory whose listing has not arrived yet. It holds the place and it is NOT a row: it is not a `jx-tree-item`, so the caret cannot land on it, the set counts do not include it and typeahead cannot match it — and it is replaced by the real rows on the repaint the listing provokes. It draws the same box by hand because it is the only line in this tree the element does not draw, and a placeholder of a different height would desynchronise the window's scroll reservation from the rows it reserves for.",display:"flex",alignItems:"center",boxSizing:"border-box",blockSize:"var(--jx-control-h)",paddingInline:"calc(var(--jx-space-3) + var(--depth, 0) * 16px) var(--jx-space-3)",color:"var(--fg-dim)",fontStyle:"italic",cursor:"default",userSelect:"none",whiteSpace:"nowrap"},'& [part="row-icon"]':{flexShrink:"0",display:"flex",alignItems:"center","--jx-icon-size":"16px"},'& [part="locale"]':{$description:"The language chip. Deliberately declares no block size, no padding and no line height: the row above is one control-height by contract, and a chip that grew the box would desynchronise the window's scroll reservation from the height it reserves by. It only ever shrinks the text. A chip, not a filter term: the search matches the file's name alone, because a query that silently also matched a language would make “why is this file here” unanswerable from what is on screen.",marginInlineStart:"auto",flexShrink:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxInlineSize:"6em"},'& [part="view-slot"], & [part="header-slot"], & [part="locale-slot"]':{$description:"A `$switch` renders its own container, and none of these three is a box: each stands exactly where its case does, so the case's own rule is the only one that lays anything out.",display:"contents"}},children:[{tagName:"div",attributes:{part:"view-slot",role:"none"},$switch:{$ref:"#/state/view"},cases:{none:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"No project loaded"}]},address:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"Add ?project= and a project folder's absolute path to this page's address to open it."}]},welcome:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"Open a project folder to get started."},{tagName:"jx-button",attributes:{part:"open-project"},$props:{variant:"accent",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openProject"},value:[]}],description:"The declared `project.open` command, run through the registry — not a second opener of this surface's own. It is the one the chord, the palette and the status bar's PROJECT field already run, so a window that opens a project from here reports the outcome the same way they do (studio-ui-guidelines.md §12.5)."},children:[{tagName:"span",textContent:"Open Project"}]}]},tree:{tagName:"div",attributes:{part:"frame"},children:[{tagName:"div",attributes:{part:"header-slot",role:"none"},$switch:{$ref:"#/state/headerState"},cases:{shown:{tagName:"div",attributes:{part:"project-header"},children:[{tagName:"span",attributes:{part:"project-name",title:"${state.projectName}"},textContent:"${state.projectName}"}]}}},{tagName:"div",attributes:{part:"toolbar"},children:[{$description:"A row of quiet tools, so NOT compact. A compact group draws every member's frame and fill whatever its quiet says, which is the segmented look a choice wants and not the borderless one a toolbar wants; Spectrum's group here was `compact quiet`, a combination the kit spells as compact=false with its members' default quiet.",tagName:"jx-action-group",attributes:{part:"toolbar-actions"},$props:{compact:!1,label:"File tree actions"},children:[{tagName:"jx-action-button",attributes:{part:"new-file"},$props:{size:"sm",icon:"plus",label:"New File",hint:"New File"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/newFile"},value:[]}]}},{tagName:"jx-action-button",attributes:{part:"refresh"},$props:{size:"sm",icon:"arrows-clockwise",label:"Refresh",hint:"Refresh"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/refresh"},value:[]}],description:"The rules go with the listings. Refresh is what an author reaches for after editing a `.gitignore` by hand, and a tree that came back still hiding by the old rules would read as the button not having worked."}},{tagName:"jx-action-button",attributes:{part:"show-ignored"},$props:{size:"sm",icon:{$ref:"#/state/ignoredIcon"},label:{$ref:"#/state/ignoredLabel"},hint:{$ref:"#/state/ignoredLabel"},selected:{$ref:"#/state/ignoredSelected"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleIgnored"},value:[]}],description:"A repaint and nothing else: the ignored entries were never dropped from the cached listings, only from the rows built out of them."}}]},{tagName:"jx-textfield",attributes:{part:"search"},$props:{label:"Filter files",placeholder:"Filter files…",size:"sm",value:{$ref:"#/state/query"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/search"},value:[{$ref:"event#/target/value"}]}],description:"The query matches a file's NAME and nothing else. A directory is kept whatever it says, because hiding the folder a match sits in would leave the match with nowhere to be drawn."}}]},{$description:'The `role="tree"`, and everything that used to be spelled out under it. The element writes the role, the name, the roving tab stop and every row\'s `aria-level` / `aria-posinset` / `aria-setsize`, and it owns the whole ARIA keyboard: the arrows walk the drawn rows without wrapping, `Home` and `End` reach the ends of the MODEL by way of the pads, `ArrowRight` opens a directory and steps into an open one, `ArrowLeft` closes one and otherwise steps out to its parent, `Enter` activates and a printable character is typeahead. Every chord it does not own — cut, copy, paste, delete, rename — passes straight through to the flow, which is the WCAG 2.5.7 obligation this tree carries because dragging a file is the other way to move it. What reaches this document is five events, and each of them is a decision `files.ts` already owned.',tagName:"jx-tree",attributes:{part:"tree",label:"Project files",current:"${state.currentPath}",padtop:"${state.padTop}",padbottom:"${state.padBottom}","data-drop":"${state.rootDrop || null}"},onselect:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/select"},value:[{$ref:"event#/detail/value"}]}],description:"The reader meant that row. This tree is single-select, so the element resolves every modifier to `replace` before it gets here and the detail's `mode` and `anchor` are answers to a question this tree does not ask. There is no `change` handler beside it on purpose: the element OWNS the caret and keeps it across every repaint that does not change `current`, so a second copy of it in the flow would be a variable that only ever went stale."},onactivate:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activate"},value:[{$ref:"event#/detail"}]}],description:"`Enter` or a double click. The same verb a single click reaches, by the same name."},onexpand:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/expand"},value:[{$ref:"event#/detail/value"},{$ref:"event#/detail/expanded"}]}],description:"`ArrowRight`, `ArrowLeft` or the twisty, with ONE dispatcher between them: the detail says the state the row should be PUT INTO, so the flow never has to work out which way a toggle was going."},onmove:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/move"},value:[{$ref:"event#/detail/from"},{$ref:"event#/detail/key"}]}],description:"The caret has to reach a row the window did not draw. The element knows only that the pad on that side is not zero; where the row is in the model, and how far to scroll to bring it into view, is the flow's — which is why this is an event and not a `scrollIntoView`."},ontypeahead:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/typeahead"},value:[{$ref:"event#/detail/from"},{$ref:"event#/detail/char"}]}],description:"A printable character, on a windowed tree. The same hand-off as `onmove` and for a sharper reason: a move off the end of the slice announces itself, and a letter never does — the element's own search over the drawn rows always answers, and over a `node_modules` of ten thousand entries the answer is whichever of the eleven painted rows happened to start with that letter. So the element dispatches EVERY such character and the flow answers it over the model."},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"row-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{item:{tagName:"jx-tree-item",attributes:{part:"row",value:"${$map.item.path}",label:"${$map.item.name}",level:"${$map.item.level}",posinset:"${$map.item.posInSet}",setsize:"${$map.item.setSize}",expanded:"${$map.item.ariaExpanded}",selected:"${state.selectedPath === $map.item.path ? 'true' : 'false'}","data-type":"${$map.item.type}","data-dragging":"${state.dragPath === $map.item.path ? '' : null}","data-drop":"${state.dropPath === $map.item.path ? '' : null}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activate"},value:[{$ref:"$map/item/path"}]}],description:"A single click OPENS the row, which is this tree's own answer and not the element's. `jx-tree` answers a click with `change` and `select`, exactly as it answers an arrow key, and a tree that opened on `select` would open every file the reader arrowed past. So the opening verb is bound here, where a click is a click; what a click MEANS — unfold this directory, take a tab for that file — stays the flow's, and Enter reaches the same verb through `activate`. It does NOT stop the event, which is the correction: the tree's delegated click is what moves the caret and the selection onto the row, so a `stopPropagation` here would leave a reader who clicked a folder with the tab stop still on whatever they had open last. The twisty stops its own click, so opening a directory from the chevron does not also activate the row."},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/contextMenu"},value:[{$ref:"$map/item/path"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]},children:[{tagName:"jx-icon",attributes:{slot:"icon",part:"row-icon","aria-hidden":"true"},$props:{name:{$ref:"$map/item/icon"}}},{tagName:"div",attributes:{slot:"status",part:"locale-slot",role:"none"},$switch:{$ref:"$map/item/localeState"},cases:{shown:{tagName:"span",attributes:{part:"locale"},textContent:"${$map.item.locale}"}}}]},loading:{$description:"A directory whose listing has not arrived yet. Deliberately not a `jx-tree-item`: there is no file there to select, open, rename or drag, and a row the caret could land on that answers to none of the verbs the caret offers is a stop in the walk with nothing behind it.",tagName:"div",attributes:{part:"loading-row",role:"none","data-loading":"true",style:"--depth:${$map.item.depth}"},textContent:"Loading…"}}}}]}]}}}]};T("files-panel",ue);function fe(e,t){e.view=t.view,e.headerState=t.headerState,e.projectName=t.projectName,e.query=t.query,e.ignoredLabel=t.ignoredLabel,e.ignoredIcon=t.ignoredIcon,e.ignoredSelected=t.ignoredSelected,e.padTop=t.padTop,e.padBottom=t.padBottom,e.rows=t.rows,e.selectedPath=t.selectedPath,e.dragPath=t.dragPath,e.dropPath=t.dropPath,e.rootDrop=t.rootDrop,e.currentPath=t.currentPath}function A(){return{currentPath:"",dragPath:"",dropPath:"",headerState:"hidden",ignoredIcon:"eye-slash",ignoredLabel:"Show ignored files",ignoredSelected:!1,padBottom:0,padTop:0,projectName:"",query:"",rootDrop:"",rows:[],selectedPath:"",view:"none"}}function qe(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function Be(e){let t=e?.$map,o=_(t)&&"item"in t?t.item:void 0;if(!_(o)||!("path"in o)||!n(o.path)||!("type"in o)||!n(o.type))return null;return{path:o.path,type:o.type}}function me(e,t,o){let r=g({...A(),...o});fe(r,t);let a=null,i=!1,s=R("files-panel",r,e,{onNodeCreated:(l,c,u,d)=>{if(i||!(l instanceof HTMLElement))return;let b=qe(u);if(b==="tree"){o.treeHost(l);return}if(b!=="row")return;let v=Be(d);if(v)o.rowHost(l,v.path,v.type)}}).then((l)=>{if(i){l.dispose();return}a=l});return{connected:()=>!i&&(a===null||a.root.parentNode===e),dispose(){i=!0,a?.dispose(),a=null},ready:s,update:(l)=>{fe(r,l)}}}async function Bs(e){if(!S)return;try{let t=p(),[o]=await Promise.all([us(()=>t.listDirectory(e)),XA(e)]);S.dirs.set(e,o)}catch{S.dirs.set(e,[])}}var he=new Set(["pages","layouts","components","content","data","public","styles"]);async function pm(){if(!S)return;await Bs(".");let e=[];for(let t of S.dirs.get(".")??[])if(t.type==="directory"&&he.has(t.name))e.push(t.name),S.expanded.add(t.path||t.name),await Bs(t.path||t.name);S.projectDirs=e}async function OE(e){let t=new Set(S?.projectDirs);if(!e.some((r)=>{let a=r.replaceAll("\\","/").replace(/^\.\//,"").split("/")[0]??"";return r.includes("/")&&he.has(a)&&!t.has(a)}))return!1;return await pm(),!0}function ME(){return Uo(pt.showIgnoredFiles)==="true"}function T2(e){xr(pt.showIgnoredFiles,e?"true":"")}async function PE(){try{let e=p(),t=await e.probeRootProject();if(!t)return;let{meta:o,info:r}=t;if(Lh(),Ht(),ec(e),Bp(),Om(),Xc({dirs:new Map,expanded:new Set,isSiteProject:r.isSiteProject,name:r.isSiteProject?r.projectConfig?.name||o.name:o.name,projectConfig:(r.isSiteProject?r.projectConfig:null)||null,projectDirs:r.directories||[],projectRoot:".",root:o.root,searchQuery:"",selectedPath:null}),r.isSiteProject)Ql(o.root||".",r.projectConfig||null);if(r.isSiteProject){if(pw(wn().name,o.root),await gm(),await ub())Lh(),await Ht(),ec(e);await pm(),await xa(),await pb(),mm(o.root)}}catch{}}async function FE({renderLeftPanel:e,resetProjectCaches:t}){try{let o=p(),r=await o.openProject?.();if(!r)return!1;let{config:a,handle:i}=r;if(U$({document:{children:[],tagName:"div"},id:"initial"}),QD(),Lh(),Ht(),ec(o),Bp(),Om(),Xc({...S,dirs:new Map,expanded:new Set,isSiteProject:!0,name:a.name||i.name,projectConfig:a,projectRoot:i.root,searchQuery:"",selectedPath:null}),Ql(i.root,a),await gm(),await ub())Lh(),await Ht(),ec(o);return await pm(),await xa(),yb(),lx(),t?.(),pw(wn().name,wn().projectRoot),e(),await pb(),mm(wn().projectRoot),!0}catch(o){return C.error("Could not open the project.",{detail:te(o),source:"Open Project"}),!1}}async function jE(e){let t=p();if(t.createDestination!=="path")return!1;try{if(await t.activate(e),(await t.gitStatus()).isRepo)return!1;return await t.gitInit(),C.success("Initialized a git repository for this project."),!0}catch(o){return C.warn("Could not initialize a git repository — the project itself was written.",{detail:te(o),source:"Source Control"}),!1}}async function Z_(){await Ht();let e=[...ul("page"),".json"],t;try{t=await p().listDirectory("pages")}catch{return null}let o=new Set(t.filter((r)=>r.type==="file").map((r)=>r.name));for(let r of e)if(o.has(`index${r}`))return`pages/index${r}`;return null}async function L2(){let e=await Z_();if(e)await yi(e)}async function pb(){let e=oA(m.projectRoot),t=GL(m.projectRoot),o=await Ue(e);return ge?.(t),o}var ge=null;function HE(e){ge=e}async function Ue(e){if(ax(m.projectRoot),e){if(await eA(e,{ensureSecondPane:()=>{Xl(hi)},openFile:(o,r)=>yi(o,{focus:!1,paneId:r})})>0)return!0}return await L2(),!1}function Ge(e,t,o){if(t==="directory")return o?"folder-open":"folder";let r=e.split(".").pop()?.toLowerCase();switch(r){case"css":case"js":case"json":case"ts":return"file-code";case"md":return"file-text";default:return r!==void 0&&Rp(r)?"image":"file"}}var $2=24,f=[],k=null,F=new Map,z=null,we=null;function ne(){for(let e of F.values())if(e.isConnected&&e.offsetHeight>0)return e.offsetHeight;return $2}function Ke(){for(let[e,t]of F)if(!t.isConnected)F.delete(e),$e(t)}function ve(e){let t=F.get(e);return t?.isConnected===!0?t:null}function U(e){return f.find((t)=>!t.loading&&t.path===e)}function ye(e,t,o,r){let a=wn().dirs.get(e);if(!a){Bs(e).then(()=>h()),o.push({depth:t,expanded:!1,key:`loading:${e}`,loading:!0,name:"Loading…",path:e,posInSet:1,setSize:1,type:"file"});return}let i=[...a].toSorted((u,d)=>{if(u.type==="directory"&&d.type!=="directory")return-1;if(u.type!=="directory"&&d.type==="directory")return 1;return u.name.localeCompare(d.name)}),s=ME()?i:i.filter((u)=>!QA(e,u.path,u.type==="directory")),l=wn().searchQuery.toLowerCase(),c=l?s.filter((u)=>u.type==="directory"||u.name.toLowerCase().includes(l)):s;for(let[u,d]of c.entries()){let v=d.type==="directory"&&wn().expanded.has(d.path);if(o.push({depth:t,expanded:v,key:d.path,loading:!1,name:d.name,path:d.path,locale:go(d.path,r)??void 0,posInSet:u+1,setSize:c.length,type:d.type}),v)ye(d.path,t+1,o,r)}}function be(e){return e===void 0?-1:f.findIndex((t)=>!t.loading&&t.path===e)}function H(e,t){for(let o=e+t;o>=0&&o<f.length;o+=t)if(!f[o].loading)return o;return-1}function Ye(e){let t=f[e];if(!t)return-1;for(let o=e-1;o>=0;o--){let r=f[o];if(!r.loading&&r.depth<t.depth)return o}return-1}function Qe(){if(k?.isConnected!==!0||j!=="")return;queueMicrotask(h)}function ee(){let e=k;if(e===null)return;z=bw(z,e,{count:()=>f.length,onChange:Qe,rowHeight:ne})}function Xe(e){let t=String(e.depth+1);if(e.loading)return{ariaExpanded:"",depth:String(e.depth),icon:"",key:e.key,kind:"loading",level:t,locale:"",localeState:"hidden",name:e.name,path:e.path,posInSet:"",setSize:"",type:e.type};return{ariaExpanded:e.type==="directory"?String(e.expanded):"",depth:String(e.depth),icon:Ge(e.path,e.type,e.expanded),key:e.key,kind:"item",level:t,locale:e.locale===void 0?"":Vt(e.locale),localeState:e.locale===void 0?"hidden":"shown",name:e.name,path:e.path,posInSet:String(e.posInSet),setSize:String(e.setSize),type:e.type}}function Ze(){if(Ke(),!S){f=[];let l={...A(),view:"none"};return y=l,l}if(!S.isSiteProject&&S.projectRoot==="."){f=[];let l=rf(p())?"welcome":"address",c={...A(),view:l};return y=c,c}let e=wn();f=[];let{i18n:t}=ln(e.projectConfig??{});ye(".",0,f,t);let o=mw(k,{count:f.length,rowHeight:ne()}),r=f.slice(o.start,o.end),a=(e.selectedPath!==null&&U(e.selectedPath)?e.selectedPath:"")||r.find((l)=>!l.loading)?.path||"",i=ME(),s={currentPath:a,dragPath:j,dropPath:I,headerState:e.isSiteProject?"shown":"hidden",ignoredIcon:i?"eye":"eye-slash",ignoredLabel:i?"Hide ignored files":"Show ignored files",ignoredSelected:i,padBottom:o.padBottom,padTop:o.padTop,projectName:e.projectConfig?.name||e.name,query:e.searchQuery,rootDrop:G,rows:r.map((l)=>Xe(l)),selectedPath:e.selectedPath??"",view:"tree"};return y=s,s}function oe(){if(!w||!y)return;y={...y,dragPath:j,dropPath:I,rootDrop:G},w.handle.update(y)}function h(){we?.()}async function et(){let e=wn();e.dirs.clear(),Bp(),await Bs(".");for(let t of e.expanded)await Bs(t);h()}function tt(e){let t=U(e);if(!t)return;if(t.type==="directory"){Fe(e).then(()=>h());return}yi(e)}function ot(e,t){let o=wn();if(U(e)?.type!=="directory"||o.expanded.has(e)===t)return;if(!t){o.expanded.delete(e),h();return}Fe(e).then(()=>h())}function xe(e){if(!S||wn().selectedPath===e)return;wn().selectedPath=e,h()}function nt(e,t){let o=be(e),r;switch(t){case"Home":{r=H(-1,1);break}case"End":{r=H(f.length,-1);break}case"ArrowUp":{r=H(o,-1);break}case"ArrowLeft":{r=Ye(o);break}case"ArrowDown":case"ArrowRight":{r=H(o,1);break}default:return}Pe(r)}function at(e,t){let o=be(e),r=f.length;for(let a=1;a<=r;a++){let i=(o+a+r)%r,s=f[i];if(s&&!s.loading&&s.name.trim().toLowerCase().startsWith(t)){Pe(i);return}}}function Pe(e){let t=f[e];if(!t)return;if(xe(t.path),ve(t.path))return;gw(k,e,ne()),h()}async function Fe(e){let t=wn();if(t.expanded.has(e)){t.expanded.delete(e);return}if(t.expanded.add(e),!t.dirs.has(e))await Bs(e)}var D=new Map,V=null,j="",J="",I="",q=!1,G="";function I2(e){return[...e.dataTransfer?.types??[]].includes("Files")}function je(e,t,o){let r=(s)=>{if(!I2(s))return;if(s.preventDefault(),s.stopPropagation(),s.dataTransfer)s.dataTransfer.dropEffect="copy";o(!0)},a=()=>o(!1),i=(s)=>{o(!1);let l=s.dataTransfer?.files;if(!l?.length)return;s.preventDefault(),s.stopPropagation(),OD(l,t,h)};return e.addEventListener("dragover",r),e.addEventListener("dragleave",a),e.addEventListener("drop",i),()=>{e.removeEventListener("dragover",r),e.removeEventListener("dragleave",a),e.removeEventListener("drop",i)}}function BE(e,t){let o=e.replaceAll("\\","/"),r=t.replaceAll("\\","/");if(!o||o===r)return!1;if(o.startsWith(`${r}/`)||r.startsWith(`${o}/`))return!1;return B(o)!==r}function Z(e,t,o){let r=e.data.path;return o==="directory"&&n(r)&&BE(r,t)}function P(e,t){let o=t?e:"";if(J===e&&I===o)return;J=e,I=o,Se()}function W(e){if(q===e)return;q=e,Se()}function Se(){G=q&&J===""?"true":"",oe()}async function OD(e,t,o){if((await Sa([...e],{dir:t})).length===0)return;if(t!==".")wn().expanded.add(t);o()}function R2(e,t){let o=document.createElement("input");o.type="file",o.multiple=!0,o.accept=zc(),o.addEventListener("change",()=>{if(o.files?.length)OD(o.files,e,t)}),o.click()}function it(e,t,o){$e(e),F.set(t,e);let r=[Wr({element:e,getInitialData(){return{entryType:o,path:t,type:"file-tree"}},onDragStart(){j=t,oe()},onDrop(){j="",P("",!1),oe()}}),je(e,o==="directory"?t:B(t),(a)=>{P(a?t:"",a)}),qs({canDrop({source:a}){return a.data.type==="file-tree"},element:e,getData({source:a}){return Z(a,t,o)?{targetDir:t,type:"file-tree-target"}:{type:"file-tree-refused"}},onDrag({source:a}){P(t,Z(a,t,o))},onDragEnter({source:a}){P(t,Z(a,t,o))},onDragLeave(){P("",!1)},onDrop(){P("",!1)}})];D.set(e,zr(...r))}function $e(e){let t=D.get(e);if(t)t(),D.delete(e)}function st(e){if(V?.element===e)return;Re(),k=e;let t=qs({canDrop({source:r}){let a=r.data.path;return r.data.type==="file-tree"&&n(a)&&BE(a,".")},element:e,getData(){return{targetDir:".",type:"file-tree-target"}},onDragEnter(){W(!0)},onDragLeave(){W(!1)},onDrop(){W(!1)}}),o=Gs({onDrop({source:r,location:a}){let[i]=a.current.dropTargets;if(!i)return;if(r.data.type!=="file-tree")return;if(i.data.type!=="file-tree-target")return;let s=r.data.path,l=i.data.targetDir;if(!n(s)||!n(l)||!BE(s,l))return;let c=s.split("/").pop(),u=l==="."?c:`${l}/${c}`;lt(s,u,h)}});V={cleanup:zr(t,o,je(e,".",W)),element:e},ee()}function Re(){V?.cleanup(),V=null;for(let e of D.values())e();D.clear(),z?.window.destroy(),z=null,k=null,j="",J="",I="",q=!1,G=""}async function lt(e,t,o){let r=p();Ta(e,t);try{let a=await r.renameFile(e,t);Sr();for(let[l]of m.tabs.entries())if(l===e)Hx(e,t,t);else if(l.startsWith(`${e}/`)){let c=t+l.slice(e.length);Hx(l,c,c)}let i=B(e),s=B(t);if(await Bs(i),s!==i)await Bs(s);if(s!==".")wn().expanded.add(s);Te(a,t),o(),MD(`Moved to ${t}`,a,t)}catch(a){C.error(`Could not move ${e}.`,{detail:te(a),path:e,source:"Files"})}}function B(e){let t=e.replaceAll("\\","/"),o=t.lastIndexOf("/");return o===-1?".":t.slice(0,o)}var N=null;function ke(){N?.close(),N=null}function ct(e){let t={};if(e.type==="directory"){let o=Wd(e.path);if(o?.isSourceRoot===!0&&!o.fileBacked)t.name=o.name;return t}if(t.file=e.path,Ic(e.path))t.path=e.path;if(J_(e.path).length>0)t.source=e.path;return t}function x(e,t,o,r={}){return{destructive:!1,disabled:!1,dividerAbove:!1,id:e,run:o,title:t,...r}}function dt(e){let t=ae();if(!t)return[];let o=ct(e),r=[];for(let a of t.forPlacement("context/file")){let i=a.args;if(!(i?.required??[]).every((c)=>(c in o)))continue;let s={};for(let c of Object.keys(i?.properties??{}))if(c in o)s[c]=o[c];let l=t.disabledReason(a.id);r.push(l===void 0?x(a.id,a.title,()=>{En(t,a.id,s,"Files")}):{destructive:!1,disabled:!0,dividerAbove:!1,id:a.id,requires:l,title:a.title})}return r}function ut(e){let t=e.type==="directory",o=[];if(t){if(o.push(x("files.newFile","New File…",()=>{Ee(e.path,h)}),x("files.upload","Upload Files…",()=>{R2(e.path,h)})),e.path==="pages"||e.path.endsWith("/pages"))o.push(x("files.pagesGrid","Edit Pages in Grid",()=>{oS()}))}else o.push(x("files.open","Open",()=>{yi(e.path)}));return o.push(...dt(e),x("files.rename","Rename…",()=>{bt(e,h)},{dividerAbove:!0}),x("files.delete","Delete",()=>{xt(e,h)},{destructive:!0})),o}function ft(e,t,o){let r=U(e);if(!r)return;ke();let a=ve(e);N=Wt({label:"File actions",onClosed:(i)=>{if(N===i)N=null},opener:a,origin:{x:t,y:o},region:"files",rows:ut({name:r.name,path:r.path,type:r.type})})}var ht=JSON.stringify({children:[{children:[],tagName:"p"}],tagName:"div"},null,2);function gt(e){return[...(e.kind==="locked"?[{ext:e.ext,label:`${Na(e.ext)?.name??e.ext} (${e.ext})`}]:K_(e.docKind)).map((o)=>({label:o.label,value:o.ext})),{dividerBefore:!0,label:"Other…",value:tS}]}function wt(e,t,o){let r=e.kind==="choose"?e.defaultExt:e.ext;if(r!==void 0&&t.some((i)=>i.value===r))return r;let a=KE(o);if(a!==""&&t.some((i)=>i.value===a))return a;return t[0]?.value??tS}async function D2(e){let{dir:t,format:o,source:r="Files"}=e;await Ht();let a=await fw(t),i=o!==void 0&&o.kind!=="fixed"?o:null,s=i===null?null:gt(i),l=i===null||s===null?"":wt(i,s,e.suggestedName??""),c={choice:o,dir:t,known:ie(),rows:s,taken:a},u=(K,Oe)=>fb(K,Oe,c),d=l,b={confirmLabel:"Create",message:t==="."?"Creating in the project root.":`Creating in ${t}/`,select:s===null?"stem":"all",validate:u,value:e.suggestedName??"untitled.json"};if(s!==null)b.choice={initial:l,label:"Format",onChange:(K)=>{d=K},options:()=>s};if(e.suggestedName!==void 0)b.placeholder=e.suggestedName;let v=await xi(e.title??"New File",b);if(!v)return null;let O=JE(v,d,o),Ne=t==="."?O:`${t}/${O}`,re=fn(O),De=e.content,Ie=o!==void 0&&d!==tS,Ce=De??re?.studio?.newFileTemplate??(re?"":O.toLowerCase().endsWith(".json")?Ie?ht:`{}
|
|
2
|
+
`:"");return X_(Ne,Ce,{dir:t,source:r})}async function fw(e){try{let t=await p().listDirectory(e);return new Set(t.map((o)=>o.name.toLowerCase()))}catch{return new Set}}async function X_(e,t,o={}){let r=o.dir??(e.includes("/")?e.slice(0,e.lastIndexOf("/")):".");Ta(e);try{if(await p().writeFile(e,t),await Bs(r),o.quiet!==!0)C.success(`Created ${e}`);return e}catch(a){return C.error(`Could not create ${e}.`,{detail:te(a),path:e,source:o.source??"Files"}),null}}async function Ee(e,t){await Ht();let o=Wd(e);if(o?.unresolvedFormat!=null)C.error(`New files in ${e}/ cannot be constrained to the collection's format.`,{detail:`The "${o.name}" content type declares format "${o.unresolvedFormat}", which no installed extension provides. Install the extension that supplies it, or correct `+"the name in Project Settings › Content Types.",path:e,source:"Files"});let r=o?.ext!=null&&o.unresolvedFormat===null,a=r&&o.isSourceRoot&&o.def.schema!==void 0,i;if(a){let{createEntry:s}=await (le("nef0wrmp"),import("./entry-commands-nef0wrmp.js"));i=await s(o.name,{dir:e})}else i=await D2({dir:e,format:r&&o.ext!==null?{because:`${o.name} entries are ${o.ext} files, so a document of another format here would not be one.`,ext:o.ext,kind:"locked"}:{defaultExt:".json",kind:"choose"},suggestedName:"untitled"});if(i!==null)t()}async function vt(e,t){let o=await Sb(t),r={confirmLabel:"Rename",select:"stem",validate:(a)=>a.trim()?"":"Enter a file name.",value:e};if(o!==void 0)r.message=o;return xi("Rename",r)}function yt(e,t){let o=t.references,r=t.tag?`; tag → <${t.tag.to}> (${t.tag.refsUpdated})`:"";if(o&&o.refsUpdated>0)return`Renamed to ${e}; updated ${o.refsUpdated} reference(s) in ${o.filesChanged} file(s)${r}`;if(r)return`Renamed to ${e}${r}`;return`Renamed to ${e}`}function MD(e,t,o){let r=t.errors??[];if(r.length===0){C.success(e);return}let a=r.length===1?"1 file":`${r.length} files`;C.warn(`${e} — references in ${a} could not be updated`,{detail:r.map((i)=>`${i.path}: ${i.error}`).join(`
|
|
3
|
+
`),path:o,source:"Files"})}function Te(e,t){for(let o of e.references?.files??[])if(o.path!==t&&m.tabs.has(o.path))fm(o.path)}function zE(e){let t=e.replaceAll("\\","/");return t.includes("/")?t.slice(0,t.lastIndexOf("/")):"."}async function N2(e,t,o){Sr();let r=zE(e),a=zE(t);if(await Bs(r),a!==r)await Bs(a);if(wn().selectedPath===e)wn().selectedPath=t;Te(o,t)}async function bt(e,t){let o=await vt(e.name,e.path);if(!o||o===e.name)return;let r=zE(e.path),a=r==="."?o:`${r}/${o}`;Ta(e.path,a);try{let s=await p().renameFile(e.path,a);if(m.tabs.has(e.path))Hx(e.path,a,a);await N2(e.path,a,s),t(),MD(yt(o,s),s,a)}catch(i){C.error(`Could not rename ${e.name}.`,{detail:te(i),path:e.path,source:"Files"})}}async function xt(e,t){if(!await _b(e))return;try{let r=p();Ta(e.path),await r.deleteFile(e.path),Sr();let a=e.path.replaceAll("\\","/"),i=a.includes("/")?a.slice(0,a.lastIndexOf("/")):".";if(await Bs(i),wn().selectedPath===e.path)wn().selectedPath=null;t(),C.success(`Deleted ${e.name}`)}catch(r){C.error(`Could not delete ${e.name}.`,{detail:te(r),path:e.path,source:"Files"})}}function Pt(e,t){let o=t.paneId,r=Zl(e);if(o!==void 0&&r){if(r.activeTabId===e&&t.focus===!1)return;mv(e,o)}jt(e,{focus:t.focus!==!1})}async function yi(e,t={}){let o=t.focus!==!1;for(let[a,i]of m.tabs.entries())if(i.documentPath===e){if(t.canvasMode!==void 0)i.session.ui.canvasMode=t.canvasMode;if(Pt(a,t),o)wn().selectedPath=e;return}if(Nw(e)){if(ym(e,t),o)wn().selectedPath=e;hb({name:e.split("/").pop()||e,path:e,root:wn().projectRoot});return}if(e.toLowerCase().endsWith(".csv")){try{if(await ZE(e,t),o)wn().selectedPath=e;hb({name:e.split("/").pop()||e,path:e,root:wn().projectRoot})}catch(a){C.error(`Could not open ${e}.`,{detail:te(a),path:e,source:"Open File"})}return}let r=p();try{let a=await r.readFile(e);if(!a){if(await Ht(),!fn(e)&&!e.toLowerCase().endsWith(".json"))throw of(e);return}await Ht();let i,s,l=null,c=fn(e);if(c){let d=await jr(e,a);({document:i}=d),{frontmatter:s}=d}else if(e.endsWith(".json"))({document:i,layout:l}=ks(a));else throw of(e);if(_i({id:e,documentPath:e,document:i,...s!=null&&{frontmatter:s},layout:l,source:c?a:null,sourceFormat:c?.name??null,...t.paneId!==void 0&&{paneId:t.paneId},...t.preview===!0&&{preview:!0},...t.focus===!1&&{focus:!1},...t.canvasMode!==void 0&&{canvasMode:t.canvasMode}}),o)wn().selectedPath=e;hb({name:e.split("/").pop()||e,path:e,root:wn().projectRoot})}catch(a){C.error(`Could not open ${e}.`,{detail:te(a),path:e,source:"Open File"})}}async function Q_(e,t){await yi(t,{focus:!1,paneId:e,preview:!0})}function WE(e){if(cv(e))return;for(let[,t]of m.tabs.entries())if(t.documentPath===e&&!t.doc.dirty){fm(e);return}}function VE(e){for(let t of e)fm(t,{onlyIfChanged:!0})}async function fm(e,t={}){for(let[,o]of m.tabs.entries())if(o.documentPath===e){let r=p(),a=o.doc.dirty,i=()=>!a&&o.doc.dirty||cv(e);try{let s=await r.readFile(e);if(!s)return;if(await Ht(),i())return;if(fn(e)){let{document:l,frontmatter:c}=await jr(e,s);if(i())return;if(t.onlyIfChanged&&zs(l,o.doc.document)&&zs(c,o.doc.content.frontmatter))return;o.doc.document=l,o.doc.content.frontmatter=c,o.doc.source=s}else if(e.endsWith(".json")){let l=ks(s);o.doc.layout=l.layout;let c=l.document;if(o.doc.bareRepeaters=Pm(c),t.onlyIfChanged&&zs(c,o.doc.document))return;o.doc.document=c}o.doc.dirty=!1}catch(s){C.error(`Could not reload ${e} after it changed on disk.`,{detail:te(s),key:`reload:${e}`,path:e,source:"Files"})}return}}function UE(){Xn({id:"files",title:"Files",level:"project",dock:"navigator",icon:"folder",rail:"developer",render:()=>mt,afterRender:(e,t)=>{A2(t,e.rerender)}})}var Ft={activate:tt,contextMenu:ft,expand:ot,move:nt,newFile:()=>{Ee(".",h)},openProject:()=>{rt("project.open",void 0,"Files")},refresh:()=>{et()},rowHost:it,search:(e)=>{wn().searchQuery=e,h()},select:xe,toggleIgnored:()=>{T2(!ME()),h()},treeHost:st,typeahead:at},w=null,y=null;function A2(e,t){let o=e.querySelector(".panel-content")??e;if(we=t,w&&(w.host!==o||!w.handle.connected()))O2();let r=Ze();if(w)w.handle.update(r);else{let a=me(o,r,Ft);w={handle:a,host:o},a.ready.then(ee)}queueMicrotask(ee)}function O2(){ke(),w?.handle.dispose(),w=null,y=null,Re(),F.clear(),f=[]}
|
|
4
|
+
export{ub,K_,J_,RD,DD,hw,pw,Y_,ND,AD,hb,Bs,pm,OE,ME,T2,PE,FE,jE,Z_,L2,pb,HE,$2,I2,BE,OD,R2,D2,fw,X_,MD,zE,N2,yi,Q_,WE,VE,fm,UE,A2,O2};
|
|
5
|
+
|
|
6
|
+
//# debugId=AD0D8CA2FFE1F76564756E2164756E21
|
|
7
|
+
//# sourceMappingURL=studio-3zge48z4.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n,Z,Ze,Q,_,v,Me,Go,Gn,cf,it}from"./studio-zkq3r91p.js";var vv=400;var Zp=350,NC=300,GO=30000;function rr(e){return Array.isArray(e?.children)?e.children:[]}function yv(e,t,i=""){if(!_(e))return e;if(Array.isArray(e)){for(let[l,s]of e.entries())yv(s,t,`${i}/${l}`);return e}let r=e,{children:o}=r;if(Go(o)){let l=o;t?.(i,l),r.children=[l]}if(Array.isArray(r.children))for(let[l,s]of r.children.entries())yv(s,t,`${i}/children/${l}`);if(r.$prototype==="Array"&&_(r.map))yv(r.map,t,`${i}/map`);if(_(r.cases))for(let[l,s]of Object.entries(r.cases))yv(s,t,`${i}/cases/${J$(l)}`);return e}function J$(e){return String(e).replaceAll("~","~0").replaceAll("/","~1")}function Ut(e){return e.length>=2?e.slice(0,-2):null}function zi(e){return e.at(-1)}function Y$(e){return e.join("/")}function Er(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;return e.every((i,r)=>i===t[r])}function xh(e,t=[],i=0){let r=[];return u(e,t,i,r,!1),r}function u(e,t,i,r,o){if(n(e)||Z(e)||Ze(e)){if(!o)r.push({depth:i,node:e,nodeType:"text",path:t});return}if(e.$prototype==="Array"){if(!o)r.push({depth:i,node:e,nodeType:"map",path:t});let s=e.map;if(_(s))u(s,[...t,"map"],i+1,r,!1);return}if(!o)r.push({depth:i,node:e,nodeType:"element",path:t});if(e.$props&&it(e.tagName).includes("-")&&!Array.isArray(e.children))return;let{children:l}=e;if(Array.isArray(l))for(let s=0;s<l.length;s++){let a=[...t,"children",s];u(l[s],a,i+1,r,!1)}else if(Go(l))u(l,[...t,"children"],i+1,r,!1);if(e.$switch&&_(e.cases))for(let[s,a]of Object.entries(e.cases)){let p=[...t,"cases",s];if(_(a)&&a.$ref)r.push({depth:i+1,node:a,nodeType:"case-ref",path:p});else if(_(a))r.push({depth:i+1,node:a,nodeType:"case",path:p}),u(a,p,i+2,r,!0)}}function Tr(e){if(!e)return"?";if(e.$prototype==="Array"){let{items:r}=e;return`Repeater → ${(Me(r)?r.$ref:void 0)||"items"}`}if(e.$title)return e.$title;if(e.$id)return e.$id;if(e.tagName==="slot"){let r=e.attributes?.name;return n(r)&&r.trim()?`slot: ${r.trim()}`:"slot"}let t=it(e.tagName)||"div",i=e.$switch?" ⇆":"";if(n(e.textContent)&&e.textContent.length>0)return`${t} — ${e.textContent.slice(0,24)}${i}`;return t+i}var S=null;function Xc(e){S=e}function wn(){return S}function _h(e){return _(e)}function Xp(e){if(Array.isArray(e))return e.map((i)=>Xp(i));if(!Gn(e))return e;let t={};for(let[i,r]of Object.entries(e)){if(i.startsWith("on")&&cf(r))continue;if(i==="children")t.children=Array.isArray(r)?r.map((o)=>Xp(o)):Xp(r);else if(i==="cases"&&_h(r)){let o={};for(let[l,s]of Object.entries(r))o[l]=Xp(s);t.cases=o}else if(i==="state"&&_h(r)){let o={};for(let[l,s]of Object.entries(r)){if(v(s)&&s.timing==="server")continue;o[l]=s}t.state=o}else t[i]=r}return t}var AC=null,Sh=null,Z$=null,X$=null,Q$=null;function c(e){let t=document.querySelector(`#${e}`);return t instanceof HTMLElement?t:null}function KO(){AC=c("activity-bar"),Sh=c("left-panel"),Z$=c("right-panel"),X$=c("toolbar"),Q$=c("statusbar")}function Qp(e,t){if(!e)throw TypeError(`#${t} is not in the shell yet; initShellRefs() has not found it`);return e}var Gm=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),eI=[":hover",":focus",":active",":focus-within",":focus-visible",":disabled",":first-child",":last-child","::before","::after","::placeholder"];function Bx(e){return e.startsWith(":")||e.startsWith(".")||e.startsWith("&")||e.startsWith("[")}var f=new Map;function zx(e,t,i){let r=t??vv;return(...o)=>{clearTimeout(f.get(e)),f.set(e,setTimeout(()=>{f.delete(e),i(...o)},r))}}function JO(e){clearTimeout(f.get(e)),f.delete(e)}var x=new Map;function y(e){return(_(e)||Q(e))&&"then"in e&&Q(e.then)}var d=0;function YO(){return d}function m(e,t){d+=1;let i=()=>{d-=1},r=null;try{let o=t();if(y(o))r=o}catch(o){console.error(`Renderer "${e}" failed:`,o)}if(!r){i();return}r.then(i,(o)=>{console.error(`Renderer "${e}" failed:`,o),i()})}function Km(e,t){x.set(e,t)}function sr(){for(let[e,t]of x.entries())m(e,t)}function xn(...e){for(let t of e){let i=x.get(t);if(!i)continue;m(t,i)}}function cl(e,t){if(e){if(t.selection!==void 0)e.session.selection=t.selection;if(t.hover!==void 0)e.session.hover=t.hover;if(t.clipboard!==void 0)e.session.clipboard=t.clipboard;if(t.ui)Object.assign(e.session.ui,t.ui);if(t.canvas)Object.assign(e.session.canvas,t.canvas)}}function Ra(e,t,i){if(e)e.session.ui[t]=i}function ZO(e,t){if(e)Object.assign(e.session.canvas,t)}
|
|
2
|
+
export{vv,Zp,NC,GO,rr,yv,J$,Ut,zi,Y$,Er,xh,Tr,S,Xc,wn,_h,Xp,AC,Sh,Z$,X$,Q$,KO,Qp,Gm,eI,Bx,zx,JO,YO,Km,sr,xn,cl,Ra,ZO};
|
|
3
|
+
|
|
4
|
+
//# debugId=F959D318427EA82964756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-45gyxpcq.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Z}from"./studio-kt2j51sa.js";function q(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return(n)=>(n in t)}var F=Object.assign;var Ke=Object.prototype.hasOwnProperty,j=(e,t)=>Ke.call(e,t),A=Array.isArray,k=(e)=>me(e)==="[object Map]";var de=(e)=>typeof e==="function",ze=(e)=>typeof e==="string",O=(e)=>typeof e==="symbol",R=(e)=>e!==null&&typeof e==="object";var We=Object.prototype.toString,me=(e)=>We.call(e),_e=(e)=>me(e).slice(8,-1);var H=(e)=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var U=(e)=>{let t=Object.create(null);return(n)=>t[n]||(t[n]=e(n))},Ge=/-\w/g,_t=U((e)=>e.replace(Ge,(t)=>t.slice(1).toUpperCase())),$e=/\B([A-Z])/g,yt=U((e)=>e.replace($e,"-$1").toLowerCase()),ye=U((e)=>e.charAt(0).toUpperCase()+e.slice(1)),vt=U((e)=>e?`on${ye(e)}`:""),E=(e,t)=>!Object.is(e,t);var Ye="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly";var Et=q(Ye+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var d;class Se{constructor(e=!1){if(this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&d)if(d.active)this.parent=d,this.index=(d.scopes||(d.scopes=[])).push(this)-1;else this._active=!1,this._warnOnRun=!1}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active){if(this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let r=this.scopes.slice();for(e=0,t=r.length;e<t;e++)r[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}}run(e){if(this._active){let t=d;try{return d=this,e()}finally{d=t}}}on(){if(++this._on===1)this.prevScope=d,d=this}off(){if(this._on>0&&--this._on===0){if(d===this)d=this.prevScope;else{let e=d;while(e){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();this.effects.length=0;for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let r=this.parent.scopes.pop();if(r&&r!==this)this.parent.scopes[this.index]=r,r.index=this.index}this.parent=void 0}}}function ge(e){return new Se(e)}function ea(e,t=!1){if(d)d.cleanups.push(e)}var f;var X=new WeakSet;class W{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,d)if(d.active)d.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,X.has(this))X.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Te(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ve(this),Ne(this);let e=f,t=_;f=this,_=!0;try{return this.fn()}finally{xe(this),f=e,_=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ae(e);this.deps=this.depsTail=void 0,ve(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)X.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(ee(this))this.run()}get dirty(){return ee(this)}}var we=0,M,L;function Te(e,t=!1){if(e.flags|=8,t){e.next=L,L=e;return}e.next=M,M=e}function se(){we++}function oe(){if(--we>0)return;if(L){let t=L;L=void 0;while(t){let n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;while(M){let t=M;M=void 0;while(t){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){if(!e)e=r}t=n}}if(e)throw e}function Ne(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function xe(e){let t,n=e.depsTail,r=n;while(r){let i=r.prevDep;if(r.version===-1){if(r===n)n=i;ae(r),Be(r)}else t=r;r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function ee(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ae(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Ae(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===P)return;if(e.globalVersion=P,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ee(e)))return;e.flags|=2;let t=e.dep,n=f,r=_;f=e,_=!0;try{Ne(e);let i=e.fn(e._value);if(t.version===0||E(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{f=n,_=r,xe(e),e.flags&=-3}}function ae(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r)r.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=r,e.nextSub=void 0;if(n.subs===e){if(n.subs=r,!r&&n.computed){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)ae(s,!0)}}if(!t&&!--n.sc&&n.map)n.map.delete(n.key)}function Be(e){let{prevDep:t,nextDep:n}=e;if(t)t.nextDep=n,e.prevDep=void 0;if(n)n.prevDep=t,e.nextDep=void 0}function ne(e,t){if(e.effect instanceof W)e=e.effect.fn;let n=new W(e);if(t)F(n,t);try{n.run()}catch(i){throw n.stop(),i}let r=n.run.bind(n);return r.effect=n,r}var _=!0,Oe=[];function Kr(){Oe.push(_),_=!1}function Jr(){let e=Oe.pop();_=e===void 0?!0:e}function PC(e,t=!1){if(f instanceof W)f.cleanup=e}function ve(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=f;f=void 0;try{t()}finally{f=n}}}var P=0;class Re{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Y{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!f||!_||f===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==f){if(t=this.activeLink=new Re(f,this),!f.deps)f.deps=f.depsTail=t;else t.prevDep=f.depsTail,f.depsTail.nextDep=t,f.depsTail=t;De(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let n=t.nextDep;if(n.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=n;if(t.prevDep=f.depsTail,t.nextDep=void 0,f.depsTail.nextDep=t,f.depsTail=t,f.deps===t)f.deps=n}}return t}trigger(e){this.version++,P++,this.notify(e)}notify(e){se();try{for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{oe()}}}function De(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)De(r)}let n=e.dep.subs;if(n!==e){if(e.prevSub=n,n)n.nextSub=e}e.dep.subs=e}}var te=new WeakMap,N=Symbol(""),ie=Symbol(""),V=Symbol("");function h(e,t,n){if(_&&f){let r=te.get(e);if(!r)te.set(e,r=new Map);let i=r.get(n);if(!i)r.set(n,i=new Y),i.map=r,i.key=n;i.track()}}function w(e,t,n,r,i,s){let o=te.get(e);if(!o){P++;return}let a=(c)=>{if(c)c.trigger()};if(se(),t==="clear")o.forEach(a);else{let c=A(e),l=c&&H(n);if(c&&n==="length"){let u=Number(r);o.forEach((p,m)=>{if(m==="length"||m===V||!O(m)&&m>=u)a(p)})}else{if(n!==void 0||o.has(void 0))a(o.get(n));if(l)a(o.get(V));switch(t){case"add":if(!c){if(a(o.get(N)),k(e))a(o.get(ie))}else if(l)a(o.get("length"));break;case"delete":if(!c){if(a(o.get(N)),k(e))a(o.get(ie))}break;case"set":if(k(e))a(o.get(N));break}}}oe()}function D(e){let t=he(e);if(t===e)return t;if(h(t,"iterate",V),T(e))return t;if(!S(e))return t.map(v);return yv(e)?t.map((n)=>x(v(n))):t.map(x)}function ce(e){return h(e=he(e),"iterate",V),e}function y(e,t){if(S(e))return yv(e)?x(v(t)):x(t);return v(t)}var qe={__proto__:null,[Symbol.iterator](){return J(this,Symbol.iterator,(e)=>y(this,e))},concat(...e){return D(this).concat(...e.map((t)=>A(t)?D(t):t))},entries(){return J(this,"entries",(e)=>(e[1]=y(this,e[1]),e))},every(e,t){return b(this,"every",e,t,void 0,arguments)},filter(e,t){return b(this,"filter",e,t,(n)=>n.map((r)=>y(this,r)),arguments)},find(e,t){return b(this,"find",e,t,(n)=>y(this,n),arguments)},findIndex(e,t){return b(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return b(this,"findLast",e,t,(n)=>y(this,n),arguments)},findLastIndex(e,t){return b(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return b(this,"forEach",e,t,void 0,arguments)},includes(...e){return Q(this,"includes",e)},indexOf(...e){return Q(this,"indexOf",e)},join(e){return D(this).join(e)},lastIndexOf(...e){return Q(this,"lastIndexOf",e)},map(e,t){return b(this,"map",e,t,void 0,arguments)},pop(){return I(this,"pop")},push(...e){return I(this,"push",e)},reduce(e,...t){return be(this,"reduce",e,t)},reduceRight(e,...t){return be(this,"reduceRight",e,t)},shift(){return I(this,"shift")},some(e,t){return b(this,"some",e,t,void 0,arguments)},splice(...e){return I(this,"splice",e)},toReversed(){return D(this).toReversed()},toSorted(e){return D(this).toSorted(e)},toSpliced(...e){return D(this).toSpliced(...e)},unshift(...e){return I(this,"unshift",e)},values(){return J(this,"values",(e)=>y(this,e))}};function J(e,t,n){let r=ce(e),i=r[t],s=i.call(r);if(r!==e&&!T(e)){if(s[Symbol.toStringTag]==="Array Iterator"){let o=Object.create(Object.getPrototypeOf(s));if(o.next=()=>Ee(s.next(),n),i!==ke[t])Object.defineProperties(o,{return:{get(){let a=s.return;return typeof a==="function"?a.bind(s):a}},throw:{get(){let a=s.throw;return typeof a==="function"?a.bind(s):a}}});return o}s._next=s.next,s.next=()=>Ee(s._next(),n)}return s}function Ee(e,t){if(!e.done)e.value=t(e.value);return e}var ke=Array.prototype;function b(e,t,n,r,i,s){let o=ce(e),a=o!==e&&!T(e),c=o[t];if(c!==ke[t]){let p=c.apply(e,s);return a?v(p):p}let l=n;if(o!==e){if(a)l=function(p,m){return n.call(this,y(e,p),m,e)};else if(n.length>2)l=function(p,m){return n.call(this,p,m,e)}}let u=c.call(o,l,r);return a&&i?i(u):u}function be(e,t,n,r){let i=ce(e),s=i!==e&&!T(e),o=n,a=!1;if(i!==e){if(s)a=r.length===0,o=function(l,u,p){if(a)a=!1,l=y(e,l);return n.call(this,l,y(e,u),p,e)};else if(n.length>3)o=function(l,u,p){return n.call(this,l,u,p,e)}}let c=i[t](o,...r);return a?y(e,c):c}function Q(e,t,n){let r=he(e);h(r,"iterate",V);let i=r[t](...n);if((i===-1||i===!1)&&ct(n[0]))return n[0]=he(n[0]),r[t](...n);return i}function I(e,t,n=[]){Kr(),se();let r=he(e)[t].apply(e,n);return oe(),Jr(),r}var Xe=q("__proto__,__v_isRef,__isVue"),Ce=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(O));function Je(e){if(!O(e))e=String(e);let t=he(this);return h(t,"has",e),t.hasOwnProperty(e)}class le{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t==="__v_skip")return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!r;else if(t==="__v_isReadonly")return r;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(n===(r?i?ot:Pe:i?Le:Me).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n))return e;return}let s=A(e);if(!r){let a;if(s&&(a=qe[t]))return a;if(t==="hasOwnProperty")return Je}let o=Reflect.get(e,t,kh(e)?e:n);if(O(t)?Ce.has(t):Xe(t))return o;if(!r)h(e,"get",t);if(i)return o;if(kh(o)){let a=s&&H(t)?o:o.value;return r&&R(a)?G(a):a}if(R(o))return r?G(o):g(o);return o}}class fe extends le{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],s=A(e)&&H(t);if(!this._isShallow){let c=S(i);if(!T(n)&&!S(n))i=he(i),n=he(n);if(!s&&kh(i)&&!kh(n))if(c)return!0;else return i.value=n,!0}let o=s?Number(t)<e.length:j(e,t),a=Reflect.set(e,t,n,kh(e)?e:r);if(e===he(r)&&a){if(!o)w(e,"add",t,n);else if(E(n,i))w(e,"set",t,n,i)}return a}deleteProperty(e,t){let n=j(e,t),r=e[t],i=Reflect.deleteProperty(e,t);if(i&&n)w(e,"delete",t,void 0,r);return i}has(e,t){let n=Reflect.has(e,t);if(!O(t)||!Ce.has(t))h(e,"has",t);return n}ownKeys(e){return h(e,"iterate",A(e)?"length":N),Reflect.ownKeys(e)}}class Ie extends le{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}var Ze=new fe,Qe=new Ie,et=new fe(!0);var re=(e)=>e,K=(e)=>Reflect.getPrototypeOf(e);function tt(e,t,n){return function(...r){let i=this.__v_raw,s=he(i),o=k(s),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,l=i[e](...r),u=n?re:t?x:v;return!t&&h(s,"iterate",c?ie:N),F(Object.create(l),{next(){let{value:p,done:m}=l.next();return m?{value:p,done:m}:{value:a?[u(p[0]),u(p[1])]:u(p),done:m}}})}}function z(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function nt(e,t){let n={get(i){let s=this.__v_raw,o=he(s),a=he(i);if(!e){if(E(i,a))h(o,"get",i);h(o,"get",a)}let{has:c}=K(o),l=t?re:e?x:v;if(c.call(o,i))return l(s.get(i));else if(c.call(o,a))return l(s.get(a));else if(s!==o)s.get(i)},get size(){let i=this.__v_raw;return!e&&h(he(i),"iterate",N),i.size},has(i){let s=this.__v_raw,o=he(s),a=he(i);if(!e){if(E(i,a))h(o,"has",i);h(o,"has",a)}return i===a?s.has(i):s.has(i)||s.has(a)},forEach(i,s){let o=this,a=o.__v_raw,c=he(a),l=t?re:e?x:v;return!e&&h(c,"iterate",N),a.forEach((u,p)=>i.call(s,l(u),l(p),o))}};return F(n,e?{add:z("add"),set:z("set"),delete:z("delete"),clear:z("clear")}:{add(i){let s=he(this),o=K(s),a=he(i),c=!t&&!T(i)&&!S(i)?a:i;if(!(o.has.call(s,c)||E(i,c)&&o.has.call(s,i)||E(a,c)&&o.has.call(s,a)))s.add(c),w(s,"add",c,c);return this},set(i,s){if(!t&&!T(s)&&!S(s))s=he(s);let o=he(this),{has:a,get:c}=K(o),l=a.call(o,i);if(!l)i=he(i),l=a.call(o,i);let u=c.call(o,i);if(o.set(i,s),!l)w(o,"add",i,s);else if(E(s,u))w(o,"set",i,s,u);return this},delete(i){let s=he(this),{has:o,get:a}=K(s),c=o.call(s,i);if(!c)i=he(i),c=o.call(s,i);let l=a?a.call(s,i):void 0,u=s.delete(i);if(c)w(s,"delete",i,void 0,l);return u},clear(){let i=he(this),s=i.size!==0,o=void 0,a=i.clear();if(s)w(i,"clear",void 0,void 0,void 0);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{n[i]=tt(i,e,t)}),n}function ue(e,t){let n=nt(e,t);return(r,i,s)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_isShallow")return t;else if(i==="__v_raw")return r;return Reflect.get(j(n,i)&&i in r?n:r,i,s)}}var it={get:ue(!1,!1)},rt={get:ue(!1,!0)},st={get:ue(!0,!1)};var Me=new WeakMap,Le=new WeakMap,Pe=new WeakMap,ot=new WeakMap;function at(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function g(e){if(S(e))return e;return pe(e,!1,Ze,it,Me)}function vv(e){return pe(e,!1,et,rt,Le)}function G(e){return pe(e,!0,Qe,st,Pe)}function pe(e,t,n,r,i){if(!R(e))return e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let s=i.get(e);if(s)return s;let o=at(_e(e));if(o===0)return e;let a=new Proxy(e,o===2?r:n);return i.set(e,a),a}function yv(e){if(S(e))return yv(e.__v_raw);return!!(e&&e.__v_isReactive)}function S(e){return!!(e&&e.__v_isReadonly)}function T(e){return!!(e&&e.__v_isShallow)}function ct(e){return e?!!e.__v_raw:!1}function he(e){let t=e&&e.__v_raw;return t?he(t):e}var v=(e)=>R(e)?g(e):e,x=(e)=>R(e)?G(e):e;function kh(e){return e?e.__v_isRef===!0:!1}function Eh(e){return Ve(e,!1)}function Na(e){return Ve(e,!0)}function Ve(e,t){if(kh(e))return e;return new Fe(e,t)}class Fe{constructor(e,t){this.dep=new Y,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:he(e),this._value=t?e:v(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||T(e)||S(e);if(e=n?e:he(e),E(e,t))this._rawValue=e,this._value=n?e:v(e),this.dep.trigger()}}class je{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Y(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=P-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&f!==this)return Te(this,!0),!0}get value(){let e=this.dep.track();if(Ae(this),e)e.version=this.dep.version;return this._value}set value(e){if(this.setter)this.setter(e)}}function Th(e,t,n=!1){let r,i;if(de(e))r=e;else r=e.get,i=e.set;return new je(r,i,n)}var lt={assertive:"jx-live-assertive",polite:"jx-live-polite"};function ft(e){if(typeof document>"u")return null;let t=lt[e],n=document.querySelector(`#${t}`);if(n)return n;let r=document.createElement("div");return r.id=t,r.setAttribute("aria-live",e),r.setAttribute("role",e==="assertive"?"alert":"status"),r.setAttribute("aria-atomic","true"),r.style.cssText="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0",document.body.append(r),r}function Wx(e,t="polite"){if(e==="")return;let n=ft(t);if(!n)return;n.textContent="",setTimeout(()=>{n.textContent=e},0)}var ef=60000,He=null;function lr(){return He??Date.now()}function YO(e){let t=e instanceof Date?e.getTime():Z(e)?e:Date.parse(e);if(!Number.isFinite(t))throw TypeError(`clock: cannot pin to ${JSON.stringify(e)}`);return He=t,t}var ut={error:"problem",info:"toast",success:"toast",warn:"toast"},pt={error:8000,info:4000,success:4000,warn:8000},Ue=0;function dt(){return Ue+=1,`n${Ue}`}var Qd=g([]),ta=g([]),ht=4;function gt(e){return e==="problem"?ta:Qd}function mt(e,t,n,r){let i={at:lr(),id:dt(),message:t,severity:e,tier:n};if(r.action!==void 0)i.action=r.action;if(r.actionArgs!==void 0)i.actionArgs=r.actionArgs;if(r.detail!==void 0)i.detail=r.detail;if(r.source!==void 0)i.source=r.source;if(r.path!==void 0)i.path=r.path;if(r.key!==void 0)i.key=r.key;if(n==="toast")i.timeoutMs=r.timeoutMs??pt[e];return i}function C(e,t,n={}){let r=n.tier??ut[e],i=mt(e,t,r,n),s=gt(r);if(i.key!==void 0){let o=s.findIndex((a)=>a.key===i.key);if(o!==-1)s.splice(o,1)}if(s.push(i),r==="toast")while(Qd.length>ht)Qd.shift();return Wx(i.source===void 0?i.message:`${i.source}: ${i.message}`,e==="error"?"assertive":"polite"),i}function B(e){return(t,n={})=>C(e,t,n)}C.success=B("success");C.info=B("info");C.warn=B("warn");C.error=B("error");function Lh(e){for(let t of[Qd,ta]){let n=t.findIndex((r)=>r.id===e);if(n!==-1)return t.splice(n,1),!0}return!1}function dl(e){let t=e?ta.filter((r)=>!e(r)):[],n=ta.length-t.length;return ta.splice(0,ta.length,...t),n}function tf(e){let t=[];for(let n of ta){if(n.source!==e)continue;let r={message:n.message,severity:n.severity};if(n.detail!==void 0)r.detail=n.detail;if(n.path!==void 0)r.path=n.path;if(n.key!==void 0)r.key=n.key;if(n.action!==void 0)r.action=n.action;if(n.actionArgs!==void 0)r.actionArgs=n.actionArgs;t.push(r)}return t}function wv(e){return e===void 0?ta.length:ta.filter((t)=>t.severity===e).length}export{ge,ea,ne,Kr,Jr,PC,g,vv,yv,he,kh,Eh,Na,Th,Wx,ef,lr,YO,Qd,ta,C,Lh,dl,tf,wv};
|
|
1
|
+
import{Z}from"./studio-zkq3r91p.js";function q(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return(n)=>(n in t)}var F=Object.assign;var Ke=Object.prototype.hasOwnProperty,j=(e,t)=>Ke.call(e,t),A=Array.isArray,k=(e)=>me(e)==="[object Map]";var he=(e)=>typeof e==="function",ze=(e)=>typeof e==="string",O=(e)=>typeof e==="symbol",R=(e)=>e!==null&&typeof e==="object";var We=Object.prototype.toString,me=(e)=>We.call(e),_e=(e)=>me(e).slice(8,-1);var H=(e)=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var U=(e)=>{let t=Object.create(null);return(n)=>t[n]||(t[n]=e(n))},Ge=/-\w/g,_t=U((e)=>e.replace(Ge,(t)=>t.slice(1).toUpperCase())),$e=/\B([A-Z])/g,yt=U((e)=>e.replace($e,"-$1").toLowerCase()),ye=U((e)=>e.charAt(0).toUpperCase()+e.slice(1)),vt=U((e)=>e?`on${ye(e)}`:""),E=(e,t)=>!Object.is(e,t);var Ye="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly";var Et=q(Ye+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var d;class Se{constructor(e=!1){if(this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&d)if(d.active)this.parent=d,this.index=(d.scopes||(d.scopes=[])).push(this)-1;else this._active=!1,this._warnOnRun=!1}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active){if(this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let r=this.scopes.slice();for(e=0,t=r.length;e<t;e++)r[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}}run(e){if(this._active){let t=d;try{return d=this,e()}finally{d=t}}}on(){if(++this._on===1)this.prevScope=d,d=this}off(){if(this._on>0&&--this._on===0){if(d===this)d=this.prevScope;else{let e=d;while(e){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();this.effects.length=0;for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let r=this.parent.scopes.pop();if(r&&r!==this)this.parent.scopes[this.index]=r,r.index=this.index}this.parent=void 0}}}function ge(e){return new Se(e)}function Qs(e,t=!1){if(d)d.cleanups.push(e)}var f;var X=new WeakSet;class W{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,d)if(d.active)d.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,X.has(this))X.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Te(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ve(this),Ne(this);let e=f,t=_;f=this,_=!0;try{return this.fn()}finally{xe(this),f=e,_=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ae(e);this.deps=this.depsTail=void 0,ve(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)X.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(ee(this))this.run()}get dirty(){return ee(this)}}var we=0,M,L;function Te(e,t=!1){if(e.flags|=8,t){e.next=L,L=e;return}e.next=M,M=e}function se(){we++}function oe(){if(--we>0)return;if(L){let t=L;L=void 0;while(t){let n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;while(M){let t=M;M=void 0;while(t){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){if(!e)e=r}t=n}}if(e)throw e}function Ne(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function xe(e){let t,n=e.depsTail,r=n;while(r){let i=r.prevDep;if(r.version===-1){if(r===n)n=i;ae(r),Be(r)}else t=r;r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function ee(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ae(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Ae(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===P)return;if(e.globalVersion=P,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ee(e)))return;e.flags|=2;let t=e.dep,n=f,r=_;f=e,_=!0;try{Ne(e);let i=e.fn(e._value);if(t.version===0||E(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{f=n,_=r,xe(e),e.flags&=-3}}function ae(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r)r.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=r,e.nextSub=void 0;if(n.subs===e){if(n.subs=r,!r&&n.computed){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)ae(s,!0)}}if(!t&&!--n.sc&&n.map)n.map.delete(n.key)}function Be(e){let{prevDep:t,nextDep:n}=e;if(t)t.nextDep=n,e.prevDep=void 0;if(n)n.prevDep=t,e.nextDep=void 0}function ne(e,t){if(e.effect instanceof W)e=e.effect.fn;let n=new W(e);if(t)F(n,t);try{n.run()}catch(i){throw n.stop(),i}let r=n.run.bind(n);return r.effect=n,r}var _=!0,Oe=[];function Kr(){Oe.push(_),_=!1}function Jr(){let e=Oe.pop();_=e===void 0?!0:e}function PC(e,t=!1){if(f instanceof W)f.cleanup=e}function ve(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=f;f=void 0;try{t()}finally{f=n}}}var P=0;class Re{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Y{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!f||!_||f===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==f){if(t=this.activeLink=new Re(f,this),!f.deps)f.deps=f.depsTail=t;else t.prevDep=f.depsTail,f.depsTail.nextDep=t,f.depsTail=t;De(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let n=t.nextDep;if(n.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=n;if(t.prevDep=f.depsTail,t.nextDep=void 0,f.depsTail.nextDep=t,f.depsTail=t,f.deps===t)f.deps=n}}return t}trigger(e){this.version++,P++,this.notify(e)}notify(e){se();try{for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{oe()}}}function De(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)De(r)}let n=e.dep.subs;if(n!==e){if(e.prevSub=n,n)n.nextSub=e}e.dep.subs=e}}var te=new WeakMap,N=Symbol(""),ie=Symbol(""),V=Symbol("");function h(e,t,n){if(_&&f){let r=te.get(e);if(!r)te.set(e,r=new Map);let i=r.get(n);if(!i)r.set(n,i=new Y),i.map=r,i.key=n;i.track()}}function w(e,t,n,r,i,s){let o=te.get(e);if(!o){P++;return}let a=(c)=>{if(c)c.trigger()};if(se(),t==="clear")o.forEach(a);else{let c=A(e),l=c&&H(n);if(c&&n==="length"){let u=Number(r);o.forEach((p,m)=>{if(m==="length"||m===V||!O(m)&&m>=u)a(p)})}else{if(n!==void 0||o.has(void 0))a(o.get(n));if(l)a(o.get(V));switch(t){case"add":if(!c){if(a(o.get(N)),k(e))a(o.get(ie))}else if(l)a(o.get("length"));break;case"delete":if(!c){if(a(o.get(N)),k(e))a(o.get(ie))}break;case"set":if(k(e))a(o.get(N));break}}}oe()}function D(e){let t=de(e);if(t===e)return t;if(h(t,"iterate",V),T(e))return t;if(!S(e))return t.map(v);return _v(e)?t.map((n)=>x(v(n))):t.map(x)}function ce(e){return h(e=de(e),"iterate",V),e}function y(e,t){if(S(e))return _v(e)?x(v(t)):x(t);return v(t)}var qe={__proto__:null,[Symbol.iterator](){return J(this,Symbol.iterator,(e)=>y(this,e))},concat(...e){return D(this).concat(...e.map((t)=>A(t)?D(t):t))},entries(){return J(this,"entries",(e)=>(e[1]=y(this,e[1]),e))},every(e,t){return b(this,"every",e,t,void 0,arguments)},filter(e,t){return b(this,"filter",e,t,(n)=>n.map((r)=>y(this,r)),arguments)},find(e,t){return b(this,"find",e,t,(n)=>y(this,n),arguments)},findIndex(e,t){return b(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return b(this,"findLast",e,t,(n)=>y(this,n),arguments)},findLastIndex(e,t){return b(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return b(this,"forEach",e,t,void 0,arguments)},includes(...e){return Q(this,"includes",e)},indexOf(...e){return Q(this,"indexOf",e)},join(e){return D(this).join(e)},lastIndexOf(...e){return Q(this,"lastIndexOf",e)},map(e,t){return b(this,"map",e,t,void 0,arguments)},pop(){return I(this,"pop")},push(...e){return I(this,"push",e)},reduce(e,...t){return be(this,"reduce",e,t)},reduceRight(e,...t){return be(this,"reduceRight",e,t)},shift(){return I(this,"shift")},some(e,t){return b(this,"some",e,t,void 0,arguments)},splice(...e){return I(this,"splice",e)},toReversed(){return D(this).toReversed()},toSorted(e){return D(this).toSorted(e)},toSpliced(...e){return D(this).toSpliced(...e)},unshift(...e){return I(this,"unshift",e)},values(){return J(this,"values",(e)=>y(this,e))}};function J(e,t,n){let r=ce(e),i=r[t],s=i.call(r);if(r!==e&&!T(e)){if(s[Symbol.toStringTag]==="Array Iterator"){let o=Object.create(Object.getPrototypeOf(s));if(o.next=()=>Ee(s.next(),n),i!==ke[t])Object.defineProperties(o,{return:{get(){let a=s.return;return typeof a==="function"?a.bind(s):a}},throw:{get(){let a=s.throw;return typeof a==="function"?a.bind(s):a}}});return o}s._next=s.next,s.next=()=>Ee(s._next(),n)}return s}function Ee(e,t){if(!e.done)e.value=t(e.value);return e}var ke=Array.prototype;function b(e,t,n,r,i,s){let o=ce(e),a=o!==e&&!T(e),c=o[t];if(c!==ke[t]){let p=c.apply(e,s);return a?v(p):p}let l=n;if(o!==e){if(a)l=function(p,m){return n.call(this,y(e,p),m,e)};else if(n.length>2)l=function(p,m){return n.call(this,p,m,e)}}let u=c.call(o,l,r);return a&&i?i(u):u}function be(e,t,n,r){let i=ce(e),s=i!==e&&!T(e),o=n,a=!1;if(i!==e){if(s)a=r.length===0,o=function(l,u,p){if(a)a=!1,l=y(e,l);return n.call(this,l,y(e,u),p,e)};else if(n.length>3)o=function(l,u,p){return n.call(this,l,u,p,e)}}let c=i[t](o,...r);return a?y(e,c):c}function Q(e,t,n){let r=de(e);h(r,"iterate",V);let i=r[t](...n);if((i===-1||i===!1)&&ct(n[0]))return n[0]=de(n[0]),r[t](...n);return i}function I(e,t,n=[]){Kr(),se();let r=de(e)[t].apply(e,n);return oe(),Jr(),r}var Xe=q("__proto__,__v_isRef,__isVue"),Ce=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(O));function Je(e){if(!O(e))e=String(e);let t=de(this);return h(t,"has",e),t.hasOwnProperty(e)}class le{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t==="__v_skip")return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!r;else if(t==="__v_isReadonly")return r;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(n===(r?i?ot:Pe:i?Le:Me).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n))return e;return}let s=A(e);if(!r){let a;if(s&&(a=qe[t]))return a;if(t==="hasOwnProperty")return Je}let o=Reflect.get(e,t,Ch(e)?e:n);if(O(t)?Ce.has(t):Xe(t))return o;if(!r)h(e,"get",t);if(i)return o;if(Ch(o)){let a=s&&H(t)?o:o.value;return r&&R(a)?G(a):a}if(R(o))return r?G(o):g(o);return o}}class fe extends le{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],s=A(e)&&H(t);if(!this._isShallow){let c=S(i);if(!T(n)&&!S(n))i=de(i),n=de(n);if(!s&&Ch(i)&&!Ch(n))if(c)return!0;else return i.value=n,!0}let o=s?Number(t)<e.length:j(e,t),a=Reflect.set(e,t,n,Ch(e)?e:r);if(e===de(r)&&a){if(!o)w(e,"add",t,n);else if(E(n,i))w(e,"set",t,n,i)}return a}deleteProperty(e,t){let n=j(e,t),r=e[t],i=Reflect.deleteProperty(e,t);if(i&&n)w(e,"delete",t,void 0,r);return i}has(e,t){let n=Reflect.has(e,t);if(!O(t)||!Ce.has(t))h(e,"has",t);return n}ownKeys(e){return h(e,"iterate",A(e)?"length":N),Reflect.ownKeys(e)}}class Ie extends le{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}var Ze=new fe,Qe=new Ie,et=new fe(!0);var re=(e)=>e,K=(e)=>Reflect.getPrototypeOf(e);function tt(e,t,n){return function(...r){let i=this.__v_raw,s=de(i),o=k(s),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,l=i[e](...r),u=n?re:t?x:v;return!t&&h(s,"iterate",c?ie:N),F(Object.create(l),{next(){let{value:p,done:m}=l.next();return m?{value:p,done:m}:{value:a?[u(p[0]),u(p[1])]:u(p),done:m}}})}}function z(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function nt(e,t){let n={get(i){let s=this.__v_raw,o=de(s),a=de(i);if(!e){if(E(i,a))h(o,"get",i);h(o,"get",a)}let{has:c}=K(o),l=t?re:e?x:v;if(c.call(o,i))return l(s.get(i));else if(c.call(o,a))return l(s.get(a));else if(s!==o)s.get(i)},get size(){let i=this.__v_raw;return!e&&h(de(i),"iterate",N),i.size},has(i){let s=this.__v_raw,o=de(s),a=de(i);if(!e){if(E(i,a))h(o,"has",i);h(o,"has",a)}return i===a?s.has(i):s.has(i)||s.has(a)},forEach(i,s){let o=this,a=o.__v_raw,c=de(a),l=t?re:e?x:v;return!e&&h(c,"iterate",N),a.forEach((u,p)=>i.call(s,l(u),l(p),o))}};return F(n,e?{add:z("add"),set:z("set"),delete:z("delete"),clear:z("clear")}:{add(i){let s=de(this),o=K(s),a=de(i),c=!t&&!T(i)&&!S(i)?a:i;if(!(o.has.call(s,c)||E(i,c)&&o.has.call(s,i)||E(a,c)&&o.has.call(s,a)))s.add(c),w(s,"add",c,c);return this},set(i,s){if(!t&&!T(s)&&!S(s))s=de(s);let o=de(this),{has:a,get:c}=K(o),l=a.call(o,i);if(!l)i=de(i),l=a.call(o,i);let u=c.call(o,i);if(o.set(i,s),!l)w(o,"add",i,s);else if(E(s,u))w(o,"set",i,s,u);return this},delete(i){let s=de(this),{has:o,get:a}=K(s),c=o.call(s,i);if(!c)i=de(i),c=o.call(s,i);let l=a?a.call(s,i):void 0,u=s.delete(i);if(c)w(s,"delete",i,void 0,l);return u},clear(){let i=de(this),s=i.size!==0,o=void 0,a=i.clear();if(s)w(i,"clear",void 0,void 0,void 0);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{n[i]=tt(i,e,t)}),n}function ue(e,t){let n=nt(e,t);return(r,i,s)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_isShallow")return t;else if(i==="__v_raw")return r;return Reflect.get(j(n,i)&&i in r?n:r,i,s)}}var it={get:ue(!1,!1)},rt={get:ue(!1,!0)},st={get:ue(!0,!1)};var Me=new WeakMap,Le=new WeakMap,Pe=new WeakMap,ot=new WeakMap;function at(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function g(e){if(S(e))return e;return pe(e,!1,Ze,it,Me)}function xv(e){return pe(e,!1,et,rt,Le)}function G(e){return pe(e,!0,Qe,st,Pe)}function pe(e,t,n,r,i){if(!R(e))return e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let s=i.get(e);if(s)return s;let o=at(_e(e));if(o===0)return e;let a=new Proxy(e,o===2?r:n);return i.set(e,a),a}function _v(e){if(S(e))return _v(e.__v_raw);return!!(e&&e.__v_isReactive)}function S(e){return!!(e&&e.__v_isReadonly)}function T(e){return!!(e&&e.__v_isShallow)}function ct(e){return e?!!e.__v_raw:!1}function de(e){let t=e&&e.__v_raw;return t?de(t):e}var v=(e)=>R(e)?g(e):e,x=(e)=>R(e)?G(e):e;function Ch(e){return e?e.__v_isRef===!0:!1}function kh(e){return Ve(e,!1)}function Da(e){return Ve(e,!0)}function Ve(e,t){if(Ch(e))return e;return new Fe(e,t)}class Fe{constructor(e,t){this.dep=new Y,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:de(e),this._value=t?e:v(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||T(e)||S(e);if(e=n?e:de(e),E(e,t))this._rawValue=e,this._value=n?e:v(e),this.dep.trigger()}}class je{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Y(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=P-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&f!==this)return Te(this,!0),!0}get value(){let e=this.dep.track();if(Ae(this),e)e.version=this.dep.version;return this._value}set value(e){if(this.setter)this.setter(e)}}function Eh(e,t,n=!1){let r,i;if(he(e))r=e;else r=e.get,i=e.set;return new je(r,i,n)}var lt={assertive:"jx-live-assertive",polite:"jx-live-polite"};function ft(e){if(typeof document>"u")return null;let t=lt[e],n=document.querySelector(`#${t}`);if(n)return n;let r=document.createElement("div");return r.id=t,r.setAttribute("aria-live",e),r.setAttribute("role",e==="assertive"?"alert":"status"),r.setAttribute("aria-atomic","true"),r.style.cssText="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0",document.body.append(r),r}function Vx(e,t="polite"){if(e==="")return;let n=ft(t);if(!n)return;n.textContent="",setTimeout(()=>{n.textContent=e},0)}var ef=60000,He=null;function ar(){return He??Date.now()}function oM(e){let t=e instanceof Date?e.getTime():Z(e)?e:Date.parse(e);if(!Number.isFinite(t))throw TypeError(`clock: cannot pin to ${JSON.stringify(e)}`);return He=t,t}var ut={error:"problem",info:"toast",success:"toast",warn:"toast"},pt={error:8000,info:4000,success:4000,warn:8000},Ue=0;function dt(){return Ue+=1,`n${Ue}`}var Zd=g([]),ea=g([]),ht=4;function gt(e){return e==="problem"?ea:Zd}function mt(e,t,n,r){let i={at:ar(),id:dt(),message:t,severity:e,tier:n};if(r.action!==void 0)i.action=r.action;if(r.actionArgs!==void 0)i.actionArgs=r.actionArgs;if(r.detail!==void 0)i.detail=r.detail;if(r.source!==void 0)i.source=r.source;if(r.path!==void 0)i.path=r.path;if(r.key!==void 0)i.key=r.key;if(n==="toast")i.timeoutMs=r.timeoutMs??pt[e];return i}function C(e,t,n={}){let r=n.tier??ut[e],i=mt(e,t,r,n),s=gt(r);if(i.key!==void 0){let o=s.findIndex((a)=>a.key===i.key);if(o!==-1)s.splice(o,1)}if(s.push(i),r==="toast")while(Zd.length>ht)Zd.shift();return Vx(i.source===void 0?i.message:`${i.source}: ${i.message}`,e==="error"?"assertive":"polite"),i}function B(e){return(t,n={})=>C(e,t,n)}C.success=B("success");C.info=B("info");C.warn=B("warn");C.error=B("error");function Th(e){for(let t of[Zd,ea]){let n=t.findIndex((r)=>r.id===e);if(n!==-1)return t.splice(n,1),!0}return!1}function dl(e){let t=e?ea.filter((r)=>!e(r)):[],n=ea.length-t.length;return ea.splice(0,ea.length,...t),n}function tf(e){let t=[];for(let n of ea){if(n.source!==e)continue;let r={message:n.message,severity:n.severity};if(n.detail!==void 0)r.detail=n.detail;if(n.path!==void 0)r.path=n.path;if(n.key!==void 0)r.key=n.key;if(n.action!==void 0)r.action=n.action;if(n.actionArgs!==void 0)r.actionArgs=n.actionArgs;t.push(r)}return t}function Sv(e){return e===void 0?ea.length:ea.filter((t)=>t.severity===e).length}export{ge,Qs,ne,Kr,Jr,PC,g,xv,_v,de,Ch,kh,Da,Eh,Vx,ef,ar,oM,Zd,ea,C,Th,dl,tf,Sv};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
4
|
-
//# sourceMappingURL=studio-
|
|
3
|
+
//# debugId=8788EBD08AAD0F4F64756E2164756E21
|
|
4
|
+
//# sourceMappingURL=studio-4kzbrr5t.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var n;function
|
|
2
|
-
export{
|
|
1
|
+
var n;function aM(e){n=new URL("./",e).href}function Zx(e){if(n===void 0)throw Error(`bundleUrl(${JSON.stringify(e)}) before setBundleBase(). An entry module (src/studio.ts or src/canvas/iframe-entry.ts) must call setBundleBase(import.meta.url) first; a test needs tests/with-dom.ts, which sets one.`);return new URL(e,n).href}
|
|
2
|
+
export{aM,Zx};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=16826B4B6718CFBA64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-5tzgq6fx.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{te}from"./studio-psh8mwnw.js";import{p}from"./studio-03mqh8ax.js";import{ge,ne,Kr,Jr,g,de,oM,C}from"./studio-4kzbrr5t.js";import{Pn,yx,ln,go,vC,xx,iv,I$,an,lv,Fm,Hi,Vn,Ce,ui,To,Y,hi,zm,m,kr,Ql,jt}from"./studio-vzgmyt0v.js";import{nf}from"./studio-3w35qvay.js";import{pt,Uo,xr}from"./studio-771k2n12.js";import{S,Xc,wn}from"./studio-45gyxpcq.js";import{n,Z,Ze,Iv,Q,_,v}from"./studio-zkq3r91p.js";import{le}from"./studio-7xag4na8.js";function F(e){return e.replaceAll("~","~0").replaceAll("/","~1")}var Ue=100;function H(e){let t={blankAfter:new Set,escaped:new Map,inline:new Map},o=0,r=()=>{let l=0;while(o<e.length&&(e[o]===" "||e[o]==="\t"||e[o]==="\r"||e[o]===`
|
|
2
|
+
`)){if(e[o]===`
|
|
3
|
+
`)l+=1;o+=1}return l},s=()=>{let l=o,u=new Set;o+=1;while(o<e.length&&e[o]!=='"')if(e[o]==="\\")if(e[o+1]==="u"){let d=Number.parseInt(e.slice(o+2,o+6),16);if(d>=128)u.add(d);o+=6}else o+=2;else o+=1;return o+=1,{escaped:u,raw:e.slice(l,o)}},i=(l,u)=>{let d=r();if(e[o]===u)return o+=1,!0;if(o+=1,d+=r(),d>=2)t.blankAfter.add(l);return!1},a=(l)=>{r();let u=e[o];if(u==="{"){o+=1;let d=r()>0;if(e[o]==="}"){o+=1;return}t.inline.set(l,!d);while(o<e.length){let c=JSON.parse(s().raw);r(),o+=1;let f=`${l}/${F(c)}`;if(a(f),i(f,"}"))return}}else if(u==="["){if(o+=1,r(),e[o]==="]"){o+=1;return}for(let d=0;o<e.length;d+=1){let c=`${l}/${d}`;if(a(c),i(c,"]"))return}}else if(u==='"'){let{escaped:d}=s();if(d.size>0)t.escaped.set(l,d)}else while(o<e.length&&!`,]} \r
|
|
4
|
+
`.includes(e[o]))o+=1};return a(""),t}function ks(e){return{document:JSON.parse(e),layout:H(e)}}var Ve=/[^\u0020-\u007E]/,He=/^[\p{Mn}\p{Me}\p{Cf}]$/u,Ge=/^\p{Emoji_Presentation}$/u;function Ke(e){return e>=4352&&(e<=4447||e===9001||e===9002||e>=11904&&e<=12871&&e!==12351||e>=12880&&e<=19903||e>=19968&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510||e>=110592&&e<=110593||e>=127488&&e<=127569||e>=131072&&e<=262141)}function me(e){if(!Ve.test(e))return e.length;let t=0;for(let o of e){if(He.test(o))continue;t+=Ke(o.codePointAt(0))||Ge.test(o)?2:1}return t}function be(e){return e===void 0||Q(e)||Iv(e)}function U(e){return Object.entries(e).filter(([,t])=>!be(t))}function M(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function qe(e){if(e.length<2)return!1;let t=Array.isArray(e[0])?"array":M(e[0])?"object":null;if(t===null)return!1;return e.every((o)=>t==="array"?Array.isArray(o)&&o.length>1:M(o)&&U(o).length>1)}function Ye(e){return e.length>1&&e.every((t)=>Z(t))}function V(e,t){let o=be(e)?"null":JSON.stringify(e);return t===void 0?o:o.replaceAll(/[\u0080-\uFFFF]/g,(r)=>{let s=r.codePointAt(0);return t.has(s)?`\\u${s.toString(16).padStart(4,"0")}`:r})}function Co(e,t,o=Ue){let r=t?.inline??new Map,s=t?.blankAfter??new Set,i=t?.escaped??new Map,a=(c,f)=>r.get(c)??f,l=(c,f,b)=>{if(Array.isArray(c)){if(c.length===0)return"[]";if(qe(c))return null;let y=[];for(let[x,P]of c.entries()){let T=`${f}/${x}`,w=s.has(T)?null:l(P,T,b);if(w===null)return null;y.push(w)}return`[${y.join(", ")}]`}if(M(c)){let y=U(c);if(y.length===0)return"{}";if(!a(f,b))return null;let x=[];for(let[P,T]of y){let w=`${f}/${F(P)}`,E=s.has(w)?null:l(T,w,!0);if(E===null)return null;x.push(`${JSON.stringify(P)}: ${E}`)}return`{ ${x.join(", ")} }`}return V(c,i.get(f))},u=(c)=>c.map(({path:f,text:b},y)=>y===c.length-1?b:`${b},
|
|
5
|
+
${s.has(f)?`
|
|
6
|
+
`:""}`).join(""),d=(c,f,b,y,x,P)=>{if(!Array.isArray(c)&&!M(c))return V(c,i.get(f));let T=l(c,f,x);if(T!==null&&y+me(T)+P<=o)return T;let w=" ".repeat(b+2),E=`
|
|
7
|
+
${" ".repeat(b)}`;if(Array.isArray(c)){if(Ye(c))return`[
|
|
8
|
+
${Xe(c,w,o,(A)=>s.has(`${f}/${A}`))}${E}]`;let L=c.map((R,A)=>{let O=`${f}/${A}`,J=A===c.length-1,z=d(R,O,b+2,w.length,x,J?0:1);return{path:O,text:`${w}${z}`}});return`[
|
|
9
|
+
${u(L)}${E}]`}let pe=U(c),Be=a(f,x),We=pe.map(([L,R],A)=>{let O=`${f}/${F(L)}`,J=`${JSON.stringify(L)}: `,z=A===pe.length-1,ze=w.length+me(J),Fe=d(R,O,b+2,ze,Be,z?0:1);return{path:O,text:`${w}${J}${Fe}`}});return`{
|
|
10
|
+
${u(We)}${E}}`};return`${d(e,"",0,0,!1,0)}
|
|
11
|
+
`}function Xe(e,t,o,r){let s=[],i="";for(let[a,l]of e.entries()){let u=`${V(l)}${a===e.length-1?"":","}`;if(i==="")i=`${t}${u}`;else if(i.length+1+u.length<=o)i=`${i} ${u}`;else s.push(i),i=`${t}${u}`;if(r(a)&&a<e.length-1)s.push(i,""),i=""}return s.push(i),s.join(`
|
|
12
|
+
`)}function km(e){return Co(e,ye())}var k=null,j=null,N=null,I=null;function ye(){return we()?.doc.layout??I}var G=null;function we(){let e=m.tabs.get(an);return e?de(e):null}function Qe(){if(j)Fm(j),j=null;k=null,N=null,I=null,G=null}function ve(){return G??=(async()=>{try{let e=await p().readFile(an),{document:t,layout:o}=ks(e);I=o,N=Co(t,ye())}catch{N=null}})(),G}async function jL(e){if(await ve(),e.doc.layout===null&&I!==null)e.doc.layout=I}function et(e){let t=wn();if(t.projectConfig===e)return;Xc({...t,projectConfig:e}),Ql(m.projectRoot,e)}function tt(){let e=S?.projectConfig;return e?de(e):null}function K(e){return de(e)}function xe(e,t){for(let o of Object.keys(e))delete e[o];Object.assign(e,t)}function he(e){return k=e,e.scope.run(()=>{ne(()=>{let t=e.doc.document;if(k!==e||!S)return;et(K(t))})}),e}function XS(){let e=wn(),t=we();if(k&&(k!==(t??j)||de(k.doc.document)!==e.projectConfig))Qe();if(k)return k;if(t)return he(t);return j=lv({document:e.projectConfig??{},documentPath:an,id:an}),he(j)}function Se(e){return JSON.stringify(e.extensions??null)}async function ot(){let{loadFormats:e,refreshExtensionUi:t,refreshFormats:o}=await (le("zfjz4rzm"),import("./format-host-zfjz4rzm.js"));o(),e(),t(p())}async function Gl(e){let t=tt(),o=XS();await jL(o);let r=K(o.doc.document),s=km(r),i=t&&t!==r&&km(t)!==s?t:null;if(i&&o.doc.dirty){let b=Error(`${an} has unsaved changes in its editor tab`);return C.error(`Could not save ${an} — the file is open with unsaved changes. Save or `+"revert that tab, then make the settings change again.",{key:`save:${an}`,path:an,source:"Settings"}),{error:b,ok:!1}}let a=i??r,l=e?{...a,...e}:a,u=km(l);if(!i&&!o.doc.dirty&&u===N)return{ok:!0};let d=Se(r);Y(o,(b)=>{let y=b.doc.document;if(i)xe(y,i);for(let[x,P]of Object.entries(e??{}))y[x]=P});let c=K(o.doc.document),f=km(c);try{await p().writeFile(an,f)}catch(b){return C.error(`Could not save ${an} — ${te(b)}`,{key:`save:${an}`,path:an,source:"Settings"}),{error:b,ok:!1}}if(N=f,o.doc.dirty=!1,Se(c)!==d)await ot();return{ok:!0}}async function ZN(e,t){if(!S){Ql(m.projectRoot,e);return}let o=XS();Y(o,(r)=>xe(r.doc.document,e),{skipHistory:!0}),o.doc.dirty=!1,await ve(),I=H(t),o.doc.layout=I,N=km(e)}function to(e){let t=S?.projectConfig?.$media;if(!t)return e||{};if(!e)return{...t};return{...t,...e}}function wr(e){let t=S?.projectConfig?.style;if(!t)return e||{};if(!e)return{...t};let o={...t};for(let[r,s]of Object.entries(e)){let i=o[r];o[r]=_(s)&&_(i)?{...i,...s}:s}return o}function XN(e,t=[]){return{...HL(t),...S?.projectConfig?.imports,...e}}function HL(e){let t=e.flatMap((o)=>(o.classes??[]).filter((r)=>r.path.endsWith(".class.json")).map((r)=>[r.name,r.path]));return Object.fromEntries(t.toReversed())}function Xw(e){let t=S?.projectConfig?.$elements;if(!t?.length)return e||[];if(!e?.length)return[...t];let o=new Set,r=[];for(let s of[...t,...e]){let i=n(s)?s:_(s)?s.$ref:void 0;if(i&&!o.has(i))o.add(i),r.push(s)}return r}function Qw(e){let t=S?.projectConfig?.$head;if(!t?.length)return e||[];if(!e?.length)return[...t];let o=new Set,r=[];for(let s of[...t,...e]){let i=_(s)?s.attributes:void 0,a=String(i?.href||i?.src||"")||JSON.stringify(s);if(!o.has(a))o.add(a),r.push(s)}return r}function Es(){let e=S?.projectConfig;return e?ln(e).i18n:null}function Ip(e,t){let o=Es();if(o===null)return null;let r=Pn(e);if(r!==null&&o.locales.includes(r))return r;return go(t??"",o)??o.defaultLocale}var q=new Map;function QN(){q.clear()}function il(e){if(e===!1)return null;let t=S?.projectConfig?.defaults?.layout;return e||t||null}async function ex(e){let t=e.replace(/^\.\//,""),o=q.get(t);if(o!==void 0)return structuredClone(o);try{let s=await p().readFile(t),i=JSON.parse(s);return q.set(t,i),structuredClone(i)}catch{return null}}function BL(e,t){let o=t.children??[],r=Array.isArray(o)?o:[],s=new Map,i=[];for(let a of r){let l=n(a)?void 0:a.attributes?.slot;if(!n(a)&&n(l)&&l){if(!s.has(l))s.set(l,[]);s.get(l).push(a)}else i.push(a)}if(Pe(e,s,i),t.state)e.state={...e.state,...t.state};if(t.$media)e.$media={...e.$media,...t.$media};if(t.style)e.style={...e.style,...t.style};if(t.attributes)e.attributes={...e.attributes,...t.attributes};return e}function Pe(e,t,o){if(!Array.isArray(e.children))return;let r=[];for(let s of e.children)if(_(s)&&s.tagName==="slot"){let i=s.attributes?.name;if(n(i)&&i&&t.has(i))r.push(...t.get(i)),t.delete(i);else if(!i&&o.length>0)r.push(...o);else if(Array.isArray(s.children))r.push(...s.children)}else{if(_(s))Pe(s,t,o);r.push(s)}e.children=r}async function no(e){let t=await Gl(e);if(!t.ok)throw t.error}var Te=new Set([hi,zm]),nt=new Set(["auto","light","dark"]);function rt(e){return n(e)&&nt.has(e)}function it(e){let{ui:t}=e.session;return{activeMedia:t.activeMedia,canvasMode:t.canvasMode,editZoom:t.editZoom,preview:t.preview,previewColorScheme:t.previewColorScheme,previewLocale:t.previewLocale,showLayout:t.showLayout,zoom:t.zoom}}function ke(){let e={},t=[];for(let o of m.panes){if(o.derived)continue;let r=[];for(let i of o.tabOrder){let a=m.tabs.get(i);if(!a?.documentPath)continue;r.push(a.documentPath),e[a.documentPath]=it(a)}if(r.length===0)continue;let s=o.activeTabId?m.tabs.get(o.activeTabId):null;t.push({activeFile:s?.documentPath??null,files:r,id:o.id})}return{focusedPane:m.activePaneId,panes:t,ui:e}}function st(e){if(!v(e))return{};let t={};if(n(e.canvasMode))t.canvasMode=e.canvasMode;if(Ze(e.preview))t.preview=e.preview;if(Z(e.zoom)&&Number.isFinite(e.zoom))t.zoom=e.zoom;if(Z(e.editZoom)&&Number.isFinite(e.editZoom))t.editZoom=e.editZoom;if(e.activeMedia===null||n(e.activeMedia))t.activeMedia=e.activeMedia;if(rt(e.previewColorScheme))t.previewColorScheme=e.previewColorScheme;if(e.previewLocale===null||n(e.previewLocale)&&yx(e.previewLocale))t.previewLocale=e.previewLocale;if(Ze(e.showLayout))t.showLayout=e.showLayout;return t}function Ie(e){if(!v(e)||!Array.isArray(e.panes))return null;let t=[];for(let r of e.panes){if(!v(r)||!n(r.id)||!Te.has(r.id))continue;let s=Array.isArray(r.files)?r.files.filter((i)=>n(i)&&i!==""):[];if(s.length===0)continue;t.push({activeFile:n(r.activeFile)&&s.includes(r.activeFile)?r.activeFile:null,files:s,id:r.id})}if(t.length===0)return null;let o={};if(_(e.ui))for(let[r,s]of Object.entries(e.ui))o[r]=st(s);return{focusedPane:n(e.focusedPane)&&Te.has(e.focusedPane)?e.focusedPane:hi,panes:t,ui:o}}async function eA(e,t){let o=0;if(e.panes.some((i)=>i.id===zm))t.ensureSecondPane();for(let i of e.panes)for(let a of i.files){try{await t.openFile(a,i.id)}catch{}if([...m.tabs.values()].some((l)=>l.documentPath===a))o+=1}if(o===0)return 0;for(let i of m.tabs.values()){let a=i.documentPath?e.ui[i.documentPath]:void 0;if(!a)continue;let{ui:l}=i.session;if(a.canvasMode&&i.capabilities.modes.includes(a.canvasMode))l.canvasMode=a.canvasMode;if(a.preview!==void 0)l.preview=a.preview;if(a.zoom!==void 0)l.zoom=a.zoom;if(a.editZoom!==void 0)l.editZoom=a.editZoom;if(a.activeMedia!==void 0)l.activeMedia=a.activeMedia;if(a.previewColorScheme!==void 0)l.previewColorScheme=a.previewColorScheme;if(a.previewLocale!==void 0)l.previewLocale=a.previewLocale;if(a.showLayout!==void 0)l.showLayout=a.showLayout}let r=m.panes.some((i)=>i.id===e.focusedPane)?e.focusedPane:null,s=null;for(let i of e.panes){let a=m.panes.find((u)=>u.id===i.id);if(!a||!i.activeFile)continue;let l=a.tabOrder.find((u)=>m.tabs.get(u)?.documentPath===i.activeFile);if(!l)continue;if(a.id===r)s=l;else jt(l,{focus:!1})}if(s)jt(s);else if(r)kr(r);return o}var Em=["review","deploys","branches","hosting"],QS={branches:"Branches",deploys:"Deploys",hosting:"Hosting",review:"Review changes"},at=["live","review"],_e="review",Ee="live",lt=new Set(Em),ct=new Set(at);function tA(e){return typeof e==="string"&<.has(e)}function tx(e){return typeof e==="string"&&ct.has(e)}var ut={default:{description:"Resume whatever was persisted — layout, recents, settings, chat history.",id:"default",reset:"none"},fresh:{description:"A first-run app: no layout, no recents, no settings, no history.",id:"fresh",reset:"app-state"}},Ae=new Map(Object.entries(ut)),ft="default",dt=/^jx[-._:]/;function mt(e){return dt.test(e)}function gt(){let e=typeof localStorage>"u"?void 0:localStorage;if(!e)return[];let t=[];try{for(let o=0;o<e.length;o++){let r=e.key(o);if(r&&mt(r))t.push(r)}for(let o of t)e.removeItem(o)}catch{}return t}function bt(e){let t=Ae.get(e);if(!t)throw RangeError(`unknown startup profile "${e}"; declared: ${[...Ae.keys()].join(", ")}`);if(t.reset==="app-state")gt();return t}var B=null;function je(e){if(B)return B;let t=new URLSearchParams(e??(typeof location>"u"?"":location.search)),o=bt(t.get("profile")??ft),r=t.get("clock");return B={clock:r===null?null:oM(r),profile:o},B}var W=["site","collections","styles","files","search","i18n","layers","data","packages","insert"],ht=new Set(["collections","styles"]);function Oe(e){return e&&!ht.has(e)?e:yt}var St=new Map([["blocks","insert"],["head","site"],["page","site"],["imports","packages"],["git","site"],["state","data"]]),yt="site";function eC(e,t){let o=W.find((r)=>r===e);if(o===void 0)throw Error(`${t}: "${e}" is not a declared Navigator panel id.`);return o}function se(e){if(!n(e))return null;let t=St.get(e);if(t)return t;return W.find((o)=>o===e)??null}var oe=["page","properties","style","events","assistant"],nx="page",wt=["properties","style","events"],tC="properties";function ix(e){return typeof e==="string"&&wt.some((t)=>t===e)}function zL(e){return typeof e==="string"&&oe.some((t)=>t===e)}var ox=["problems","logic","activity"],WL="problems";function VL(e){return typeof e==="string"&&ox.some((t)=>t===e)}var rx=["light","dark"],Hc={content:{id:"content",inspector:{open:!1,whileWriting:!0},navigator:{open:!0,panel:"collections"},rail:!1,tabStrip:!0},design:{id:"design",inspector:{open:!0},navigator:{initial:"site",open:!0},rail:!0,tabStrip:!0},media:{id:"media",inspector:{open:!1},navigator:{open:!1},rail:!1,tabStrip:!1},publish:{id:"publish",inspector:{open:!1},navigator:{open:!1},rail:!1,tabStrip:!1},styles:{id:"styles",inspector:{open:!1,tab:"style",whileWriting:!0},navigator:{open:!0,panel:"styles"},rail:!1,tabStrip:!1}},De="jx-studio-panel-widths",Le="jx-studio-project::",vt="dark";function UL(e){return typeof e==="string"&&rx.some((t)=>t===e)}function xt(){let e=Uo(pt.theme);return UL(e)?e:vt}var sx=["left","right","bottom"],D={bottom:{collapsed:!0,size:220},left:{collapsed:!1,size:240},right:{collapsed:!1,size:280}},nA={bottom:D.bottom.size,left:D.left.size,right:D.right.size},Pt={bottom:"--dock-h-bottom",left:"--panel-w-left",right:"--panel-w-right"},Tt={bottom:"bottom-collapsed",left:"left-collapsed",right:"right-collapsed"},qL=0.5,nC=0.2,iC=0.8;function kt(e){return Z(e)&&e>=nC&&e<=iC?e:qL}function iA(e){h.paneSplit=Math.min(iC,Math.max(nC,e))}function It(){try{let e=JSON.parse(localStorage.getItem(De)||"{}");return v(e)?e:{}}catch{return{}}}function _t(e){return{left:e("left"),right:e("right"),bottom:e("bottom")}}function Re(){return{branches:null,commitMessage:"",diffState:null,error:null,lastUpdated:null,loading:!1,logEntries:null,rev:0,status:null}}function $e(){return{build:{for:"",state:"idle",text:""},deploys:{error:"",project:"",rows:[],state:"idle"},destination:Ee,review:{number:0,url:""},tab:_e}}var Et="tokens";function Je(){return{customizedOnly:!1,filter:"",selection:null,variable:null,view:Et}}function Ct(){let e=It(),t=_t((o)=>{let r=e[o],s=e[`${o}Collapsed`];return{collapsed:Ze(s)?s:D[o].collapsed,size:Z(r)&&r>0?r:D[o].size}});return{bottomTab:VL(e.bottomTab)?e.bottomTab:WL,docks:t,focusRegion:"pane",paneSplit:kt(e.paneSplit),git:Re(),publish:$e(),layoutSelection:null,leftTab:Oe(se(e.leftTab)),stylebook:Je(),theme:xt(),workspace:xx}}je();var At=["jx-studio-doc-header-expanded"];function Nt(){try{for(let e of At)localStorage.removeItem(e)}catch{}}Nt();var h=g(Ct());function Ad(){try{localStorage.setItem(De,JSON.stringify({bottom:h.docks.bottom.size,bottomCollapsed:h.docks.bottom.collapsed,bottomTab:h.bottomTab,left:h.docks.left.size,leftCollapsed:h.docks.left.collapsed,leftTab:h.leftTab,paneSplit:h.paneSplit,right:h.docks.right.size,rightCollapsed:h.docks.right.collapsed}))}catch{}}var re,ae={};function ce(e){if(!e)return{};try{let t=JSON.parse(localStorage.getItem(`${Le}${e}`)||"{}");return v(t)?t:{}}catch{return{}}}function GL(e){let t=ce(e).workspace;return I$(t)?t:xx}function oA(e){return Ie(ce(e).session)}var ue=null;function ax(e){ue=e}function rA(){fe()}function fe(){let e=m.projectRoot;if(!e)return;try{localStorage.setItem(`${Le}${e}`,JSON.stringify({session:e===ue?ke():ce(e).session,workspace:h.workspace}))}catch{}}function Ot(e){if(e===re)return;if(re=e,ae={},h.workspace=GL(e),e===null){h.leftTab=Oe(se(h.leftTab));return}Kr();try{Me(h.workspace),Ad()}finally{Jr()}}function KL(e,t){let{inspector:o}=Hc[e];return o.open||o.whileWriting===!0&&t}function Me(e,t){let o=Hc[e],r=se(o.navigator.panel??ae[e]??o.navigator.initial??h.leftTab);if(r)h.leftTab=r;if(h.docks.left.collapsed=!o.navigator.open,h.docks.right.collapsed=!KL(e,t?.writingOnCanvas?.()===!0),o.inspector.tab&&t)t.setInspectorTab(o.inspector.tab)}function oC(e,t){if(h.workspace===e)return!1;if(!Hc[h.workspace].navigator.panel)ae[h.workspace]=h.leftTab;return h.workspace=e,Me(e,t),Ad(),fe(),!0}function Tm(e=h.theme){return e==="light"?"vs":"vs-dark"}function Dt(){document.documentElement.dataset.theme=h.theme,nf()?.editor.setTheme(Tm())}var Lt="rail-hidden",Rt="tabs-hidden";function Pb(e=h.workspace){return Hc[e].tabStrip}function $t(){let e=document.documentElement;for(let o of sx)e.style.setProperty(Pt[o],`${h.docks[o].size}px`);let t=document.querySelector("#app");if(!t)return;for(let o of sx)t.classList.toggle(Tt[o],h.docks[o].collapsed);t.classList.toggle(Lt,!Hc[h.workspace].rail),t.classList.toggle(Rt,!Hc[h.workspace].tabStrip)}var X=null,ie=[];function Fb(e){if(!ie.includes(e))ie.push(e)}function sA(){if(X)return;for(let e of ie)e.mount();X=ge(),X.run(()=>{ne(()=>{$t()}),ne(()=>{Dt()}),ne(()=>{Ot(m.projectRoot)}),ne(()=>{let e=m.projectRoot;m.activePaneId;for(let t of m.panes)t.id,t.activeTabId,t.tabOrder.join("\x00");if(e)fe()})})}function ko(e,t){if(h.docks[e].collapsed===t){Ad();return}h.docks[e].collapsed=t,Ad()}function Jt(e){ko(e,!h.docks[e].collapsed)}function aA(e,t){h.docks[e].size=t}function Bc(e){h.leftTab=e,ko("left",!1),Ad()}function oh(e){h.bottomTab=e,ko("bottom",!1),Ad()}function JL(e){if(h.theme===e)return;h.theme=e,xr(pt.theme,e)}function lA(e){if(e===h.leftTab&&!h.docks.left.collapsed){ko("left",!0);return}Bc(e)}function YL(e){h.layoutSelection=e}function lx(){Object.assign(h.git,Re()),Object.assign(h.publish,$e()),Object.assign(h.stylebook,Je()),h.layoutSelection=null,ue=null,re=void 0}function Ne(e,t){if(t.showWorkspace){t.showWorkspace(e);return}oC(e,t)}var ee=(e)=>e.project.open;function Mt(e){return[{args:Ce({tab:ui(W,"Which Navigator panel to show.")}),category:"View",id:"view.setActivity",level:"application",menus:["commandbar/overflow","palette"],group:"4_docks",requires:"an open project",when:ee,run:(t,o)=>{let r=Vn("view.setActivity",o,"tab",W);if(e.panelAvailable&&!e.panelAvailable(r))throw RangeError(`command "view.setActivity" argument "tab": "${r}" names a panel that is registered but not available right now, so showing it would persist a Navigator tab nothing can draw`);Bc(r)},title:"Show Navigator Panel"},{args:Ce({tab:ui(oe,"Which Inspector tab to show.")}),category:"View",id:"view.setRightTab",level:"document",menus:["palette"],group:"4_docks",requires:"an open document",when:(t)=>t.document.open,run:(t,o)=>{e.setInspectorTab(Vn("view.setRightTab",o,"tab",oe))},title:"Show Inspector Tab"},{args:Ce({open:To("True to show the Navigator dock, false to collapse it.")}),category:"View",id:"view.setNavigator",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{ko("left",!Hi("view.setNavigator",o,"open"))},title:"Show Navigator Dock"},{args:Ce({open:To("True to show the Inspector dock, false to collapse it.")}),category:"View",id:"view.setRightPanel",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{ko("right",!Hi("view.setRightPanel",o,"open"))},title:"Show Inspector Dock"},{args:Ce({open:To("True to show the Bottom dock, false to collapse it.")}),category:"View",id:"view.setBottomDock",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{ko("bottom",!Hi("view.setBottomDock",o,"open"))},title:"Show Bottom Dock"},{category:"View",id:"view.toggleBottomDock",keybinding:"mod+j",level:"application",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>{Jt("bottom")},title:"Toggle Bottom Dock"},{args:Ce({tab:ui(ox,"Which Bottom dock tab to show.")}),category:"View",id:"view.setBottomTab",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{let r=Vn("view.setBottomTab",o,"tab",ox);if(e.panelAvailable&&!e.panelAvailable(r))throw RangeError(`command "view.setBottomTab" argument "tab": "${r}" names a panel that is registered but not available right now, so showing it would persist a Bottom dock tab nothing can draw`);oh(r)},title:"Show Bottom Dock Tab"},{args:Ce({open:To("True to show the Assistant tab, false to step off it.")}),category:"View",id:"view.setAssistant",level:"application",menus:["never"],group:"4_docks",run:(t,o)=>{if(Hi("view.setAssistant",o,"open")){ko("right",!1),e.setInspectorTab("assistant");return}if(e.inspectorTab()==="assistant")e.setInspectorTab(e.restingInspectorTab?.()??nx)},title:"Show Assistant"},{args:Ce({workspace:ui(vC,"Which workspace to show.")}),category:"View",id:"view.setWorkspace",level:"application",menus:["never"],group:"4_workspaces",requires:"an open project",when:ee,run:(t,o)=>{Ne(Vn("view.setWorkspace",o,"workspace",vC),e)},title:"Switch Workspace"},...iv.map((t,o)=>({category:"View",id:`workspace.focus.${t.id}`,keybinding:`mod+${o+1}`,level:"application",menus:["palette"],group:"4_workspaces",requires:"an open project",when:ee,run:()=>{Ne(t.id,e)},title:`Go to ${t.title}`})),{args:Ce({color:ui(rx,"The Studio chrome's theme.")}),category:"View",id:"view.setTheme",level:"application",menus:["palette"],group:"6_appearance",run:(t,o)=>{JL(Vn("view.setTheme",o,"color",rx))},title:"Set Theme"}]}function cA(e,t){e.registerAll(Mt(t))}
|
|
13
|
+
export{ks,Co,km,jL,XS,Gl,ZN,to,wr,XN,HL,Xw,Qw,Es,Ip,QN,il,ex,BL,no,eA,Em,QS,tA,tx,eC,nx,tC,ix,zL,ox,WL,VL,rx,Hc,UL,sx,nA,qL,nC,iC,iA,h,Ad,GL,oA,ax,rA,KL,oC,Tm,Pb,Fb,sA,ko,aA,Bc,oh,JL,lA,YL,lx,cA};
|
|
14
|
+
|
|
15
|
+
//# debugId=FB1C2A90793D979A64756E2164756E21
|
|
16
|
+
//# sourceMappingURL=studio-5wzdy1jc.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
function xp(t){if(Number.isNaN(t.getTime()))return"";let r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${String(t.getFullYear()).padStart(4,"0")}-${r}-${n}`}
|
|
2
|
+
export{xp};
|
|
3
|
+
|
|
4
|
+
//# debugId=9AD8167F1024EA6864756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-732mw0g8.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{p,_e}from"./studio-
|
|
2
|
-
export{pt,
|
|
1
|
+
import{p,_e}from"./studio-03mqh8ax.js";import{C}from"./studio-4kzbrr5t.js";function v(e){return e.trim().replace(/\/+$/,"")}function u(e){return e.trim()}var pt={aiBaseUrl:{default:"",key:"jx.ai.baseUrl",normalize:v,scope:"user"},aiOpenAiKey:{default:"",key:"jx.ai.openaiKey",normalize:u,scope:"user",secret:!0},aiModel:{default:"gpt-4o",key:"jx.ai.model",normalize:u,scope:"user"},keybindings:{default:"",key:"jx.keybindings",normalize:(e)=>e.trim()==="{}"?"":e.trim(),scope:"user"},theme:{default:"",key:"jx-studio-theme",normalize:u,scope:"user"},showIgnoredFiles:{default:"",key:"jx.files.showIgnored",normalize:u,scope:"user"},developerPanels:{default:"",key:"jx.panels.developer",normalize:u,scope:"user"},cfAccountId:{default:"",key:"jx.cf.accountId",normalize:u,scope:"user"},cfToken:{default:"",key:"jx.cf.token",normalize:u,scope:"user",secret:!0}},S=Object.values(pt),f=S.filter((e)=>e.scope==="user"),P=f.map((e)=>e.key);function h(e){let t=e.schedule??queueMicrotask,n=null,i=Promise.resolve(),r=Promise.resolve();function s(){let o=n;if(n=null,!o)return i;return i=i.then(()=>e.send(o)).catch((a)=>{e.onError?.(a,o)}),i}return{enqueue(o){if(n){Object.assign(n,o);return}n={...o},r=new Promise((a)=>{t(()=>{s().then(a)})})},settled(){return r}}}var c=new Map;function m(){return typeof localStorage>"u"?void 0:localStorage}function k(e,t){try{if(t===null)m()?.removeItem(e);else m()?.setItem(e,t)}catch{}}try{for(let e of S){let t=m()?.getItem(e.key);if(t!==null&&t!==void 0)c.set(e.key,t)}}catch{}function Uo(e){return c.get(e.key)??""}function IA(e){return(c.get(e.key)??"")!==""}var y=new Set;function Np(e){return y.add(e),()=>{y.delete(e)}}function l(e){for(let t of y)t(e)}var g=h({onError(e){C("error","Your settings could not be saved.",{detail:e instanceof Error?e.message:String(e),key:"settings-write",source:"Settings"})},async send(e){if(!_e())return;let t=p();if(!t.patchSettings)return;let n={},i=[];for(let[r,s]of Object.entries(e))if(s)n[r]=s;else i.push(r);await t.patchSettings({remove:i,set:n})}});function RA(){return g.settled()}function d(e){let t=[];for(let[n,i]of Object.entries(e)){if((c.get(n)??null)===i)continue;if(i===null)c.delete(n);else c.set(n,i);k(n,i),t.push(n)}return t}function fx(e,t){return e.normalize?e.normalize(t):t}function xr(e,t){let n=fx(e,t),i=d({[e.key]:n});if(i.length>0)g.enqueue({[e.key]:n}),l(i)}function DA(e){let t={};for(let[i,r]of e)t[i.key]=fx(i,r);let n=d(t);if(n.length>0)g.enqueue(t),l(n)}function Ap(e){let t={};for(let i of e)t[i.key]=null;let n=d(t);if(n.length>0)g.enqueue(t),l(n)}async function NA(){if(!_e())return;let e=p();if(!e.getSettings)return;let t;try{t=await e.getSettings()}catch{return}let n={},i=!1;for(let s of f){let o=t[s.key];if(o)n[s.key]=o;else if(c.get(s.key))i=!0}let r=d(n);if(r.length>0)l(r);if(i){let s={};for(let o of f){let a=c.get(o.key);if(a&&!t[o.key])s[o.key]=a}g.enqueue(s)}}function x(e){let t={};for(let i of f)t[i.key]=e[i.key]??null;let n=d(t);if(n.length>0)l(n)}function AA(){if(!_e())return;p().subscribeSettings?.(x)}
|
|
2
|
+
export{pt,Uo,IA,Np,RA,fx,xr,DA,Ap,NA,AA};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=8D0B12C760CA6AFC64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-771k2n12.js.map
|