@jxsuite/studio 10.5.0 → 10.6.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.
Files changed (279) hide show
  1. package/data/locales/en/elements.json +434 -0
  2. package/data/webdata.json +116 -139
  3. package/dist/chunks/{2020-7sx2vexa.js → 2020-rqm7qrje.js} +3 -3
  4. package/dist/chunks/adapter-cyy8vbcx.js +4 -0
  5. package/dist/chunks/add-new-flow-8cgtejv2.js +4 -0
  6. package/dist/chunks/{cf-account-picker-ajh60k54.js → cf-account-picker-v3qd2dhw.js} +3 -3
  7. package/dist/chunks/cf-settings-1fnw874z.js +4 -0
  8. package/dist/chunks/{color-area-gbcftzh3.js → color-area-frd9y9q6.js} +2 -2
  9. package/dist/chunks/{color-field-85136598.js → color-field-rebpbe33.js} +3 -3
  10. package/dist/chunks/{color-slider-w1s3ndd8.js → color-slider-6bzmk3s7.js} +2 -2
  11. package/dist/chunks/color-t2bnnj8y.js +4 -0
  12. package/dist/chunks/{combobox-dk98wc5x.js → combobox-c49x7gf1.js} +2 -2
  13. package/dist/chunks/components-y8yhdd7d.js +4 -0
  14. package/dist/chunks/content-source-9e7qvmsf.js +4 -0
  15. package/dist/chunks/convert-to-repeater-pd2w4z21.js +4 -0
  16. package/dist/chunks/editor-mb9jzdrw.js +4 -0
  17. package/dist/chunks/entry-commands-at0wnx3f.js +4 -0
  18. package/dist/chunks/extension-sections-4z9qq0gh.js +4 -0
  19. package/dist/chunks/file-ops-dtdvjmza.js +4 -0
  20. package/dist/chunks/files-8pf70854.js +4 -0
  21. package/dist/chunks/format-host-fd3m2y2a.js +4 -0
  22. package/dist/chunks/fs-events-hrk29vcv.js +4 -0
  23. package/dist/chunks/grid-open-bh74v82z.js +4 -0
  24. package/dist/chunks/{grid-view-0v4hjspb.js → grid-view-a51mgzmq.js} +10 -10
  25. package/dist/chunks/{icons-j9eksgew.js → icons-qp8fn1k8.js} +2 -2
  26. package/dist/chunks/{iframe-entry-4zqtn3ry.js → iframe-entry-mpwe5pwk.js} +4 -4
  27. package/dist/chunks/{iframe-entry-2x9bn5ng.js → iframe-entry-msd43x9h.js} +4 -4
  28. package/dist/chunks/iframe-entry-rt8jz5t8.js +5 -0
  29. package/dist/chunks/{iframe-entry-54kwwhmg.js → iframe-entry-v40cr813.js} +2 -2
  30. package/dist/chunks/iframe-host-q0s0wwy3.js +4 -0
  31. package/dist/chunks/{image-bake-m8gzaan9.js → image-bake-q9ajdjsj.js} +3 -3
  32. package/dist/chunks/{image-editor-0afyws7c.js → image-editor-ke9std9b.js} +2 -2
  33. package/dist/chunks/index-57ang7ma.js +4 -0
  34. package/dist/chunks/index-eytr7av4.js +17 -0
  35. package/dist/chunks/{index-2q88g57p.js → index-x495reff.js} +3 -3
  36. package/dist/chunks/{javascript-5sxtr1g7.js → javascript-qe34bvaz.js} +3 -3
  37. package/dist/chunks/{jsonMode-m6sf47hq.js → jsonMode-m8rseh31.js} +8 -8
  38. package/dist/chunks/jx-validate-bbd1mary.js +4 -0
  39. package/dist/chunks/layers-panel-wcjtdqsa.js +4 -0
  40. package/dist/chunks/layers-yscpys6q.js +4 -0
  41. package/dist/chunks/{listbox-k5p41049.js → listbox-tktzq5xj.js} +2 -2
  42. package/dist/chunks/lit-html-qm5wbhqz.js +4 -0
  43. package/dist/chunks/media-library-2hfff88g.js +4 -0
  44. package/dist/chunks/media-open-4pb05cne.js +4 -0
  45. package/dist/chunks/media-picker-bzktmmwr.js +4 -0
  46. package/dist/chunks/{menu-26nez152.js → menu-xc3cbgsd.js} +2 -2
  47. package/dist/chunks/{monaco-binding-1s2b8snq.js → monaco-binding-7t38arh9.js} +3 -3
  48. package/dist/chunks/monaco-buffer-3vz94c9f.js +4 -0
  49. package/dist/chunks/monaco-setup-fstdew02.js +4 -0
  50. package/dist/chunks/notify-gbdcckrh.js +4 -0
  51. package/dist/chunks/parse-fpdzgk4c.js +4 -0
  52. package/dist/chunks/platform-9g72gdqr.js +4 -0
  53. package/dist/chunks/{popover-fhdnt4be.js → popover-cnmsav6b.js} +2 -2
  54. package/dist/chunks/publish-panel-91x1cb5d.js +4 -0
  55. package/dist/chunks/publish-quick-e2dmf7eg.js +4 -0
  56. package/dist/chunks/publish-workspace-1x8mnzrj.js +4 -0
  57. package/dist/chunks/quick-search-2m4y6p1x.js +4 -0
  58. package/dist/chunks/references-yg1g9rwx.js +4 -0
  59. package/dist/chunks/right-panel-7mfyhzrk.js +4 -0
  60. package/dist/chunks/source-control-rrc4jgp5.js +4 -0
  61. package/dist/chunks/{split-qh21j2b0.js → split-d15yencd.js} +2 -2
  62. package/dist/chunks/{studio-r5g7fx7q.js → studio-0jhhznxy.js} +6 -6
  63. package/dist/chunks/studio-0nb57pjg.js +7 -0
  64. package/dist/chunks/{studio-bpzwhn88.js → studio-0wa4wv4s.js} +4 -4
  65. package/dist/chunks/studio-0z8kp4xk.js +5 -0
  66. package/dist/chunks/{studio-jqvke4ac.js → studio-18gc5t3v.js} +4 -4
  67. package/dist/chunks/{studio-xh6rf05g.js → studio-1b79rpcb.js} +4 -4
  68. package/dist/chunks/studio-211q5j7m.js +4 -0
  69. package/dist/chunks/studio-213pyfxh.js +16 -0
  70. package/dist/chunks/studio-2b1smjvp.js +5 -0
  71. package/dist/chunks/{studio-dst8y8vh.js → studio-2v6tc9jp.js} +4 -4
  72. package/dist/chunks/studio-30j0wz99.js +5 -0
  73. package/dist/chunks/studio-3kmqhwtt.js +5 -0
  74. package/dist/chunks/studio-44drsmhw.js +5 -0
  75. package/dist/chunks/{studio-d5f7sskn.js → studio-495b6f2r.js} +4 -4
  76. package/dist/chunks/{studio-g65t6svn.js → studio-4gthb2fd.js} +4 -4
  77. package/dist/chunks/{studio-bmwgj8ez.js → studio-4xadhxj1.js} +4 -4
  78. package/dist/chunks/{studio-zav9hgb3.js → studio-52mzbxqm.js} +4 -4
  79. package/dist/chunks/{studio-thgexj3w.js → studio-56mmnsw8.js} +7 -7
  80. package/dist/chunks/studio-59hz8f4r.js +5 -0
  81. package/dist/chunks/{studio-bk0anq3b.js → studio-5k9mfafh.js} +3 -3
  82. package/dist/chunks/{studio-qarg1xf9.js → studio-5qez462c.js} +5 -5
  83. package/dist/chunks/studio-6tnpg0vx.js +5 -0
  84. package/dist/chunks/studio-6w8mt734.js +6 -0
  85. package/dist/chunks/studio-7hm04x5z.js +5 -0
  86. package/dist/chunks/studio-8atmfjjm.js +7 -0
  87. package/dist/chunks/{studio-69g6a0jn.js → studio-8n99z71s.js} +4 -4
  88. package/dist/chunks/{studio-ep1384t9.js → studio-8vmad6x2.js} +4 -4
  89. package/dist/chunks/{studio-6sxnqqw8.js → studio-93p5k4r4.js} +4 -4
  90. package/dist/chunks/{studio-hy936516.js → studio-9gb0m81w.js} +4 -4
  91. package/dist/chunks/{studio-ek4fb4eb.js → studio-a4ymg4vd.js} +4 -4
  92. package/dist/chunks/studio-anc8067x.js +5 -0
  93. package/dist/chunks/{studio-ketrgtph.js → studio-dbdt67kr.js} +5 -5
  94. package/dist/chunks/studio-dbex091t.js +5 -0
  95. package/dist/chunks/{studio-nngc45ct.js → studio-dj8ctxey.js} +4 -4
  96. package/dist/chunks/{studio-pgze9p34.js → studio-ed9bz68j.js} +5 -5
  97. package/dist/chunks/{studio-4ncxzw5m.js → studio-fe2d1fp5.js} +4 -4
  98. package/dist/chunks/{studio-m8hesdrw.js → studio-fgp4cyy3.js} +4 -4
  99. package/dist/chunks/{studio-151kgn69.js → studio-ft706q02.js} +4 -4
  100. package/dist/chunks/{studio-pv1ts08p.js → studio-g79s1dyg.js} +5 -5
  101. package/dist/chunks/{studio-zkkt13qd.js → studio-gahswxp4.js} +4 -4
  102. package/dist/chunks/{studio-x5ffyssw.js → studio-gbqc12bk.js} +4 -4
  103. package/dist/chunks/{studio-4jy967rj.js → studio-gxphbetb.js} +5 -5
  104. package/dist/chunks/studio-hdf01j7q.js +7 -0
  105. package/dist/chunks/studio-hf259xzd.js +48 -0
  106. package/dist/chunks/studio-jbva4wxw.js +5 -0
  107. package/dist/chunks/{studio-td3h1644.js → studio-jj9gf1qc.js} +4 -4
  108. package/dist/chunks/studio-jsjg3mjv.js +5 -0
  109. package/dist/chunks/studio-jtvb8hd7.js +5 -0
  110. package/dist/chunks/{studio-c72v1kwc.js → studio-kp4vzrct.js} +4 -4
  111. package/dist/chunks/{studio-s4k1v7dt.js → studio-kpx02gaa.js} +6 -6
  112. package/dist/chunks/{studio-3yr1zdp9.js → studio-kv1728ex.js} +8 -8
  113. package/dist/chunks/studio-m25ry0mf.js +5 -0
  114. package/dist/chunks/studio-mcbwmkyh.js +5 -0
  115. package/dist/chunks/studio-meajkr51.js +5 -0
  116. package/dist/chunks/studio-mkjrjpr2.js +6 -0
  117. package/dist/chunks/{studio-nv5eq0f7.js → studio-mr084886.js} +181 -181
  118. package/dist/chunks/{studio-43pynnhz.js → studio-mrb10hv3.js} +4 -4
  119. package/dist/chunks/{studio-7qqb7hb8.js → studio-nhpg405j.js} +4 -4
  120. package/dist/chunks/{studio-n271vdsg.js → studio-nsec0hxm.js} +41 -41
  121. package/dist/chunks/{studio-ztzf8mce.js → studio-nv0mh0p5.js} +4 -4
  122. package/dist/chunks/studio-pafmb06w.js +5 -0
  123. package/dist/chunks/{studio-4s5bka8t.js → studio-pgftd79b.js} +4 -4
  124. package/dist/chunks/{studio-wn2cmf9q.js → studio-pk961xgz.js} +4 -4
  125. package/dist/chunks/studio-pzbr7g05.js +5 -0
  126. package/dist/chunks/{studio-15mfah02.js → studio-qcc5hsw2.js} +6 -6
  127. package/dist/chunks/studio-qfq58c8n.js +5 -0
  128. package/dist/chunks/{studio-j3bq30yz.js → studio-qvb2jr83.js} +4 -4
  129. package/dist/chunks/studio-r85zw6ay.js +5 -0
  130. package/dist/chunks/{studio-f69wcajk.js → studio-s0kwce5w.js} +5 -5
  131. package/dist/chunks/studio-s6ymkf3q.js +14 -0
  132. package/dist/chunks/{studio-8ncm9zwx.js → studio-s7p5ccxa.js} +4 -4
  133. package/dist/chunks/{studio-zzgp5yka.js → studio-s9jjap3x.js} +4 -4
  134. package/dist/chunks/{studio-ber1dgte.js → studio-t5hde1ws.js} +4 -4
  135. package/dist/chunks/studio-vj9yv897.js +5 -0
  136. package/dist/chunks/{studio-ajfq4fmr.js → studio-wmak8xjw.js} +4 -4
  137. package/dist/chunks/{studio-k05g7efh.js → studio-wqsmvtqj.js} +4 -4
  138. package/dist/chunks/studio-x3z3rhej.js +5 -0
  139. package/dist/chunks/{studio-7qr8k0v2.js → studio-xb55kpmy.js} +4 -4
  140. package/dist/chunks/{studio-f3awr5nc.js → studio-xxtdajmv.js} +7 -7
  141. package/dist/chunks/{studio-1a7zshnv.js → studio-xxttcym1.js} +4 -4
  142. package/dist/chunks/{studio-czpmzs9r.js → studio-y2zsnzye.js} +7 -7
  143. package/dist/chunks/{studio-9f5vcb4w.js → studio-y3tjh2xb.js} +3 -3
  144. package/dist/chunks/studio-y4f1rdsj.js +5 -0
  145. package/dist/chunks/studio-ybkd5w8k.js +5 -0
  146. package/dist/chunks/{studio-cv6gnjqd.js → studio-yetr4gg1.js} +4 -4
  147. package/dist/chunks/{studio-ehj3csbm.js → studio-z295anhs.js} +5 -5
  148. package/dist/chunks/{studio-pte5w7rf.js → studio-z89e6wpg.js} +8 -8
  149. package/dist/chunks/{studio-4z0cdh16.js → studio-zbwr6prc.js} +3 -3
  150. package/dist/chunks/{studio-w3aafbpk.js → studio-zdbsv5q2.js} +3 -3
  151. package/dist/chunks/{studio-eq5vqn1q.js → studio-zvthj8hg.js} +4 -4
  152. package/dist/chunks/toast-2kn2vrn4.js +4 -0
  153. package/dist/chunks/{toast-host-g3r2s0kn.js → toast-host-3rxeyj3d.js} +3 -3
  154. package/dist/chunks/{tooltip-gtx40bjg.js → tooltip-ghkxkasp.js} +2 -2
  155. package/dist/chunks/{tree-a19s1c05.js → tree-vw4nc63s.js} +2 -2
  156. package/dist/chunks/{tsMode-3f116hth.js → tsMode-7gngmamr.js} +7 -7
  157. package/dist/chunks/workspace-gv0hxgsm.js +4 -0
  158. package/dist/chunks/workspace-home-j7e0mjy5.js +4 -0
  159. package/dist/chunks/{ws-client-cb49m87s.js → ws-client-vs11sxc5.js} +3 -3
  160. package/dist/iframe-entry.js +14 -14
  161. package/dist/manifest.json +84 -83
  162. package/dist/studio.js +80 -80
  163. package/package.json +12 -12
  164. package/src/browse/preview-style.ts +2 -1
  165. package/src/canvas/canvas-render.ts +6 -1
  166. package/src/canvas/iframe-drop.ts +84 -1
  167. package/src/canvas/iframe-entry.ts +9 -6
  168. package/src/canvas/iframe-render.ts +13 -0
  169. package/src/collab/collab-session.ts +2 -2
  170. package/src/commands/levels.ts +1 -1
  171. package/src/create/add-new-flow.ts +2 -1
  172. package/src/editor/convert-targets.ts +2 -23
  173. package/src/editor/slash-menu.ts +35 -17
  174. package/src/files/files.ts +18 -0
  175. package/src/format/format-choices.ts +5 -5
  176. package/src/format/format-host.ts +35 -3
  177. package/src/grid/redirects-grid.ts +4 -4
  178. package/src/locale/element-names.ts +131 -0
  179. package/src/panels/dnd.ts +3 -1
  180. package/src/panels/elements-panel.ts +93 -36
  181. package/src/panels/imports-panel.ts +3 -2
  182. package/src/panels/navigator-panels.ts +10 -10
  183. package/src/panels/panel-registry.ts +3 -3
  184. package/src/panels/site-panel.ts +2 -1
  185. package/src/panels/style-panel.ts +2 -1
  186. package/src/panels/styles-panel.ts +2 -2
  187. package/src/platforms/cloud.ts +5 -2
  188. package/src/services/ai-command-tools.ts +2 -1
  189. package/src/services/ai-project-tools.ts +18 -5
  190. package/src/services/jxn-language.ts +110 -0
  191. package/src/services/model-uri.ts +3 -0
  192. package/src/services/monaco-setup.ts +6 -2
  193. package/src/settings/contributed-section.ts +2 -1
  194. package/src/settings/extension-commands.ts +2 -1
  195. package/src/settings/general-settings.ts +2 -2
  196. package/src/settings/settings-document.ts +5 -5
  197. package/src/shell.ts +1 -1
  198. package/src/studio.ts +28 -11
  199. package/src/style/variables-view.ts +2 -2
  200. package/src/surfaces/panel-elements.json +466 -206
  201. package/src/surfaces/panel-elements.ts +61 -25
  202. package/src/tabs/project-config.ts +13 -13
  203. package/src/tabs/tab.ts +7 -2
  204. package/src/types.ts +11 -2
  205. package/src/view.ts +9 -2
  206. package/src/workspace/tab-workspace.ts +2 -2
  207. package/src/workspace/workspace-back.ts +2 -2
  208. package/dist/chunks/adapter-12dxr3z7.js +0 -4
  209. package/dist/chunks/add-new-flow-any4pw2q.js +0 -4
  210. package/dist/chunks/cf-settings-hbj16kh3.js +0 -4
  211. package/dist/chunks/color-thzpppyc.js +0 -4
  212. package/dist/chunks/components-a98hzqw9.js +0 -4
  213. package/dist/chunks/content-source-jq3fjs3w.js +0 -4
  214. package/dist/chunks/convert-to-repeater-g66r6qp1.js +0 -4
  215. package/dist/chunks/editor-rth1rzj8.js +0 -4
  216. package/dist/chunks/entry-commands-02j0s19w.js +0 -4
  217. package/dist/chunks/extension-sections-rqrs7dr0.js +0 -4
  218. package/dist/chunks/file-ops-6a49er4c.js +0 -4
  219. package/dist/chunks/files-b2p9y0yz.js +0 -4
  220. package/dist/chunks/format-host-7xe57k1s.js +0 -4
  221. package/dist/chunks/fs-events-0xsy168g.js +0 -4
  222. package/dist/chunks/grid-open-h3q4fjy5.js +0 -4
  223. package/dist/chunks/iframe-entry-m24fza30.js +0 -5
  224. package/dist/chunks/iframe-host-8jcmaktg.js +0 -4
  225. package/dist/chunks/index-7nj2375a.js +0 -4
  226. package/dist/chunks/jx-validate-808zgbgy.js +0 -4
  227. package/dist/chunks/layers-0ffdtqjn.js +0 -4
  228. package/dist/chunks/layers-panel-rw62wtvf.js +0 -4
  229. package/dist/chunks/lit-html-9bz9rcfv.js +0 -4
  230. package/dist/chunks/media-library-2a5hdbek.js +0 -4
  231. package/dist/chunks/media-open-069kzhj4.js +0 -4
  232. package/dist/chunks/media-picker-4p4pd28y.js +0 -4
  233. package/dist/chunks/monaco-buffer-m9fd2dka.js +0 -4
  234. package/dist/chunks/monaco-setup-e0crh3v6.js +0 -4
  235. package/dist/chunks/notify-re3js157.js +0 -4
  236. package/dist/chunks/parse-hee7ne9b.js +0 -4
  237. package/dist/chunks/platform-rywy3tkg.js +0 -4
  238. package/dist/chunks/publish-panel-czkpg8m4.js +0 -4
  239. package/dist/chunks/publish-quick-b9wbhqj6.js +0 -4
  240. package/dist/chunks/publish-workspace-yy6d23b7.js +0 -4
  241. package/dist/chunks/quick-search-tp7pjnmv.js +0 -4
  242. package/dist/chunks/references-wd2yj8s1.js +0 -4
  243. package/dist/chunks/right-panel-x971k0zc.js +0 -4
  244. package/dist/chunks/source-control-k4p00hpe.js +0 -4
  245. package/dist/chunks/studio-1d8m5s38.js +0 -16
  246. package/dist/chunks/studio-35pmfjtx.js +0 -5
  247. package/dist/chunks/studio-44xqe0b7.js +0 -4
  248. package/dist/chunks/studio-48yzqzqr.js +0 -5
  249. package/dist/chunks/studio-5rq3e4q5.js +0 -5
  250. package/dist/chunks/studio-6hcfm9q3.js +0 -5
  251. package/dist/chunks/studio-6mf31e16.js +0 -5
  252. package/dist/chunks/studio-8w5pa88p.js +0 -7
  253. package/dist/chunks/studio-9c6cbq2c.js +0 -4
  254. package/dist/chunks/studio-aaw7wxv8.js +0 -5
  255. package/dist/chunks/studio-afx9brsc.js +0 -5
  256. package/dist/chunks/studio-dmgh2rrj.js +0 -5
  257. package/dist/chunks/studio-erjccagy.js +0 -5
  258. package/dist/chunks/studio-ex1644g2.js +0 -5
  259. package/dist/chunks/studio-gw83z798.js +0 -7
  260. package/dist/chunks/studio-j52ks8q7.js +0 -5
  261. package/dist/chunks/studio-kefs4sz4.js +0 -5
  262. package/dist/chunks/studio-m3jrjfhy.js +0 -14
  263. package/dist/chunks/studio-n4pnf0sw.js +0 -5
  264. package/dist/chunks/studio-ncwx602y.js +0 -5
  265. package/dist/chunks/studio-nzp0sqjg.js +0 -5
  266. package/dist/chunks/studio-ph17an19.js +0 -5
  267. package/dist/chunks/studio-q509sqt8.js +0 -5
  268. package/dist/chunks/studio-s49y6m5b.js +0 -5
  269. package/dist/chunks/studio-t46rt6gx.js +0 -5
  270. package/dist/chunks/studio-veh91hjv.js +0 -5
  271. package/dist/chunks/studio-vswmz40d.js +0 -6
  272. package/dist/chunks/studio-w4mfaaam.js +0 -5
  273. package/dist/chunks/studio-x5py815g.js +0 -5
  274. package/dist/chunks/studio-z6s56dzz.js +0 -5
  275. package/dist/chunks/studio-ze1sm147.js +0 -7
  276. package/dist/chunks/studio-zn7ysyzb.js +0 -5
  277. package/dist/chunks/toast-w11qpkyz.js +0 -4
  278. package/dist/chunks/workspace-home-61n1jz3q.js +0 -4
  279. package/dist/chunks/workspace-sheek6zw.js +0 -4
@@ -1,5 +1,5 @@
1
- import{cM,k1,gM}from"./studio-m3jrjfhy.js";var d=new Map,m=1;function R(e){let t=m;return m+=1,d.set(t,{...e,id:t}),t}function g(e){d.delete(e)}function x(){return[...d.values()]}function QP(e){let t=e.toLowerCase();return x().filter((n)=>n.elements.has(t))}function eM(e){return x().filter((t)=>t.name===e)}var p=null;function GR(e=document){return p??=gM({document:e}),p}function S(){return p??GR()}var ze="data-jx-region",b=["rail","navigator","inspector","pane","dock.bottom","statusbar","commandbar","overlay"],M=new Set(["dock.bottom"]);function T(e){let t=e.indexOf("/"),n=t===-1?e:e.slice(0,t),o=t===-1?void 0:e.slice(t+1);if(o===""||n==="")return null;let s=n,r;if(!M.has(n)){let a=n.indexOf(".");if(a!==-1){if(s=n.slice(0,a),r=n.slice(a+1),r==="")return null}}let i=b.find((a)=>a===s);if(i===void 0)return null;return r===void 0?o===void 0?{surface:i}:{part:o,surface:i}:o===void 0?{instance:r,surface:i}:{instance:r,part:o,surface:i}}function O(e){return T(e)!==null}function A(e){if(e==="pane")return"pane.primary";return e.startsWith("pane/")?`pane.primary/${e.slice(5)}`:e}function y(e){return e??document}var N=[{locate:([,e],t)=>{let o=hf(`inspector/field:${e}`,t)?.querySelector('[part="browse"]');return o?[o]:[]},pattern:/^inspector\/field:(.+)\/browse$/},{locate:([,e],t)=>{let n=hf("inspector",t);return n?[...n.querySelectorAll(`[data-prop="${CSS.escape(e)}"]`)]:[]},pattern:/^inspector\/field:(.+)$/}];function w(e,t){let n=A(e);if(!O(n))return[];let o=[...y(t).querySelectorAll(`[data-jx-region="${CSS.escape(n)}"]`)];if(o.length>0)return o;for(let s of N){let r=n.match(s.pattern);if(r)return s.locate(r,y(t))}return[]}function hf(e,t){return w(e,t).at(-1)??null}var JR={dock:"dock.bottom",inspector:"inspector",navigator:"navigator",pane:"pane.primary",rail:"rail",status:"statusbar"};function $n(e,t){return t?`pane.${e}/${t}`:`pane.${e}`}function tM(e){return $n(e,"tabs")}function nM(e){return`navigator/panel:${e}`}function iM(e){return`inspector/tab:${e}`}var rM="navigator/statements";function oM(e){return`inspector/statements:${e}`}function y_(e){return`dock.bottom/panel:${e}`}var h={dialog:"dialog",modal:"dialog",popover:"menu",toast:"toasts"};function yt(e,t){let n=h[e];return t?`overlay.${n}:${t}`:`overlay.${n}`}var c="jx-studio:/surfaces/",u=new Map;function E(e,t){u.set(e,t),k1(H(e),t)}function H(e){return`${c}${e}.json`}function sM(e){return u.get(e)}function L(e){if(!e.startsWith(c)||!e.endsWith(".json"))return;return u.get(e.slice(c.length,-5))}async function I(e,t,n,o={}){let s=u.get(e);if(!s)throw Error(`Studio surface "${e}" is not registered`);if(await S(),o.region)n.setAttribute(ze,o.region);let r={scope:t,base:c,resolver:L};if(o.onNodeCreated)r.onNodeCreated=o.onNodeCreated;if(o.onNodeMoved)r.onNodeMoved=o.onNodeMoved;if(o.signal)r.signal=o.signal;let i=await cM(s,n,r),a=(v)=>({dispose:v,elements:i.elements,root:i.root,scope:i.scope});if(o.signal?.aborted)return a(i.dispose);let l=0,f=()=>{i.dispose(),g(l)};return l=R({elements:i.elements,host:n,name:e,remount:async()=>{f(),await I(e,t,n,o)}}),o.signal?.addEventListener("abort",()=>g(l),{once:!0}),a(f)}
2
- export{QP,eM,GR,ze,hf,JR,$n,tM,nM,iM,rM,oM,y_,yt,E,sM,I};
1
+ import{_M,D1,LM}from"./studio-s6ymkf3q.js";var d=new Map,m=1;function R(e){let t=m;return m+=1,d.set(t,{...e,id:t}),t}function g(e){d.delete(e)}function x(){return[...d.values()]}function hM(e){let t=e.toLowerCase();return x().filter((n)=>n.elements.has(t))}function pM(e){return x().filter((t)=>t.name===e)}var p=null;function iI(e=document){return p??=LM({document:e}),p}function S(){return p??iI()}var ze="data-jx-region",b=["rail","navigator","inspector","pane","dock.bottom","statusbar","commandbar","overlay"],M=new Set(["dock.bottom"]);function T(e){let t=e.indexOf("/"),n=t===-1?e:e.slice(0,t),o=t===-1?void 0:e.slice(t+1);if(o===""||n==="")return null;let s=n,r;if(!M.has(n)){let a=n.indexOf(".");if(a!==-1){if(s=n.slice(0,a),r=n.slice(a+1),r==="")return null}}let i=b.find((a)=>a===s);if(i===void 0)return null;return r===void 0?o===void 0?{surface:i}:{part:o,surface:i}:o===void 0?{instance:r,surface:i}:{instance:r,part:o,surface:i}}function O(e){return T(e)!==null}function A(e){if(e==="pane")return"pane.primary";return e.startsWith("pane/")?`pane.primary/${e.slice(5)}`:e}function y(e){return e??document}var N=[{locate:([,e],t)=>{let o=gf(`inspector/field:${e}`,t)?.querySelector('[part="browse"]');return o?[o]:[]},pattern:/^inspector\/field:(.+)\/browse$/},{locate:([,e],t)=>{let n=gf("inspector",t);return n?[...n.querySelectorAll(`[data-prop="${CSS.escape(e)}"]`)]:[]},pattern:/^inspector\/field:(.+)$/}];function w(e,t){let n=A(e);if(!O(n))return[];let o=[...y(t).querySelectorAll(`[data-jx-region="${CSS.escape(n)}"]`)];if(o.length>0)return o;for(let s of N){let r=n.match(s.pattern);if(r)return s.locate(r,y(t))}return[]}function gf(e,t){return w(e,t).at(-1)??null}var rI={dock:"dock.bottom",inspector:"inspector",navigator:"navigator",pane:"pane.primary",rail:"rail",status:"statusbar"};function $n(e,t){return t?`pane.${e}/${t}`:`pane.${e}`}function fM(e){return $n(e,"tabs")}function mM(e){return`navigator/panel:${e}`}function gM(e){return`inspector/tab:${e}`}var bM="navigator/statements";function yM(e){return`inspector/statements:${e}`}function k_(e){return`dock.bottom/panel:${e}`}var h={dialog:"dialog",modal:"dialog",popover:"menu",toast:"toasts"};function yt(e,t){let n=h[e];return t?`overlay.${n}:${t}`:`overlay.${n}`}var c="jx-studio:/surfaces/",u=new Map;function E(e,t){u.set(e,t),D1(H(e),t)}function H(e){return`${c}${e}.json`}function vM(e){return u.get(e)}function L(e){if(!e.startsWith(c)||!e.endsWith(".json"))return;return u.get(e.slice(c.length,-5))}async function I(e,t,n,o={}){let s=u.get(e);if(!s)throw Error(`Studio surface "${e}" is not registered`);if(await S(),o.region)n.setAttribute(ze,o.region);let r={scope:t,base:c,resolver:L};if(o.onNodeCreated)r.onNodeCreated=o.onNodeCreated;if(o.onNodeMoved)r.onNodeMoved=o.onNodeMoved;if(o.signal)r.signal=o.signal;let i=await _M(s,n,r),a=(v)=>({dispose:v,elements:i.elements,root:i.root,scope:i.scope});if(o.signal?.aborted)return a(i.dispose);let l=0,f=()=>{i.dispose(),g(l)};return l=R({elements:i.elements,host:n,name:e,remount:async()=>{f(),await I(e,t,n,o)}}),o.signal?.addEventListener("abort",()=>g(l),{once:!0}),a(f)}
2
+ export{hM,pM,iI,ze,gf,rI,$n,fM,mM,gM,bM,yM,k_,yt,E,vM,I};
3
3
 
4
- //# debugId=D356ADC2423EFBA364756E2164756E21
5
- //# sourceMappingURL=studio-1a7zshnv.js.map
4
+ //# debugId=22C93012C65FA05D64756E2164756E21
5
+ //# sourceMappingURL=studio-xxttcym1.js.map
@@ -1,8 +1,8 @@
1
- import{up,pe}from"./studio-7qqb7hb8.js";var ne=pe(function(be){Object.defineProperty(be,"__esModule",{value:!0});be.bind=void 0;function at(e,r){var{type:t,listener:n,options:o}=r;return e.addEventListener(t,n,o),function i(){e.removeEventListener(t,n,o)}}be.bind=at});var Te=pe(function(k){var N=k&&k.__assign||function(){return N=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o))e[o]=r[o]}return e},N.apply(this,arguments)};Object.defineProperty(k,"__esModule",{value:!0});k.bindAll=void 0;var it=ne();function xe(e){if(typeof e>"u")return;if(typeof e==="boolean")return{capture:e};return e}function ut(e,r){if(r==null)return e;var t=N(N({},e),{options:N(N({},xe(r)),xe(e.options))});return t}function lt(e,r,t){var n=r.map(function(o){var i=ut(o,t);return(0,it.bind)(e,i)});return function o(){n.forEach(function(i){return i()})}}k.bindAll=lt});var R=pe(function(V){Object.defineProperty(V,"__esModule",{value:!0});V.bindAll=V.bind=void 0;var ct=ne();Object.defineProperty(V,"bind",{enumerable:!0,get:function(){return ct.bind}});var st=Te();Object.defineProperty(V,"bindAll",{enumerable:!0,get:function(){return st.bindAll}})});function me(e){if(Array.isArray(e))return e}function ge(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,o,i,u,l=[],a=!0,c=!1;try{if(i=(t=t.call(e)).next,r===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(n=i.call(t)).done)&&(l.push(n.value),l.length!==r);a=!0);}catch(d){c=!0,o=d}finally{try{if(!a&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(c)throw o}}return l}}function L(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function X(e,r){if(e){if(typeof e=="string")return L(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?L(e,r):void 0}}function ye(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(e,r){return me(e)||ge(e,r)||X(e,r)||ye()}var ot=up(R());var q="data-pdnd-honey-pot";function z(e){return e instanceof Element&&e.hasAttribute(q)}function G(e){var r=document.elementsFromPoint(e.x,e.y),t=B(r,2),n=t[0],o=t[1];if(!n)return null;if(z(n))return o!==null&&o!==void 0?o:null;return n}function H(e){return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},H(e)}function we(e,r){if(H(e)!="object"||!e)return e;var t;if(typeof Symbol<"u"&&(t=e[Symbol.toPrimitive])!==void 0){var n=t.call(e,r||"default");if(H(n)!="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function De(e){var r=we(e,"string");return H(r)=="symbol"?r:r+""}function ml(e,r,t){return(r=De(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Y=up(R());var Ae=2147483647;var Oe={inset:"unset",border:"none",padding:0,margin:0,overflow:"visible",color:"inherit",background:"transparent",width:"auto",height:"auto"};function A(e){var r=null;return function t(){if(!r){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];var u=e.apply(this,o);r={result:u}}return r.result}}var Z=A(function e(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover==="function"});function Ee(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Se(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ee(Object(t),!0).forEach(function(n){ml(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var U=2,Pe=U/2;function ft(e){return{x:Math.floor(e.x),y:Math.floor(e.y)}}function dt(e){return{x:e.x-Pe,y:e.y-Pe}}function vt(e){return{x:Math.max(e.x,0),y:Math.max(e.y,0)}}function mt(e){return{x:Math.min(e.x,window.innerWidth-U),y:Math.min(e.y,window.innerHeight-U)}}function je(e){var r=e.client,t=mt(vt(dt(ft(r))));return DOMRect.fromRect({x:t.x,y:t.y,width:U,height:U})}function Ie(e){var r=e.clientRect;return{left:"".concat(r.left,"px"),top:"".concat(r.top,"px"),width:"".concat(r.width,"px"),height:"".concat(r.height,"px")}}function gt(e){var{client:r,clientRect:t}=e;return r.x>=t.x&&r.x<=t.x+t.width&&r.y>=t.y&&r.y<=t.y+t.height}function yt(e){var r=e.initial,t=document.createElement("div");if(t.setAttribute(q,"true"),Z())t.setAttribute("popover","manual");var n=je({client:r});if(Object.assign(t.style,Se(Se({position:"fixed"},Z()?Oe:{zIndex:Ae}),{},{backgroundColor:"transparent",padding:0,margin:0,boxSizing:"border-box",pointerEvents:"auto"},Ie({clientRect:n}))),document.body.appendChild(t),Z())t.showPopover();var o=Y.bind(window,{type:"pointermove",listener:function i(u){var l={x:u.clientX,y:u.clientY};n=je({client:l}),Object.assign(t.style,Ie({clientRect:n}))},options:{capture:!0}});return function i(u){var l=u.current;if(o(),gt({client:l,clientRect:n})){t.remove();return}function a(){c(),t.remove()}var c=Y.bindAll(window,[{type:"pointerdown",listener:a},{type:"pointermove",listener:a},{type:"focusin",listener:a},{type:"focusout",listener:a},{type:"dragstart",listener:a},{type:"dragenter",listener:a},{type:"dragover",listener:a}],{capture:!0})}}function Fe(){var e=null;function r(){return e=null,Y.bind(window,{type:"pointermove",listener:function n(o){e={x:o.clientX,y:o.clientY}},options:{capture:!0}})}function t(){var n=null;return function o(i){var{eventName:u,payload:l}=i;if(u==="onDragStart"){var a=l.location.initial.input,c=e!==null&&e!==void 0?e:{x:a.clientX,y:a.clientY};n=yt({initial:c})}if(u==="onDrop"){var d,f=l.location.current.input;(d=n)===null||d===void 0||d({current:{x:f.clientX,y:f.clientY}}),n=null,e=null}}}return{bindEvents:r,getOnPostDispatch:t}}function He(e){if(Array.isArray(e))return L(e)}function Ce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Me(){throw TypeError(`Invalid attempt to spread non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J(e){return He(e)||Ce(e)||X(e)||Me()}var Xe=up(R());var Ne=A(function e(){return navigator.userAgent.includes("Firefox")});var W=A(function e(){var r=navigator,t=r.userAgent;return t.includes("AppleWebKit")&&!t.includes("Chrome")});function bt(e){return"nodeName"in e}function ke(e){return bt(e)&&e.ownerDocument!==document}var We=up(R());var Q={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};(function e(){if(typeof window>"u")return;if(!W())return;function r(){return{enterCount:0,isOverWindow:!1}}var t=r();function n(){t=r()}We.bindAll(window,[{type:"dragstart",listener:function o(){t.enterCount=0,t.isOverWindow=!0}},{type:"drop",listener:n},{type:"dragend",listener:n},{type:"dragenter",listener:function o(i){if(!t.isOverWindow&&t.enterCount===0)i[Q.isEnteringWindow]=!0;t.isOverWindow=!0,t.enterCount++}},{type:"dragleave",listener:function o(i){if(t.enterCount--,t.isOverWindow&&t.enterCount===0)i[Q.isLeavingWindow]=!0,t.isOverWindow=!1}}],{capture:!0})})();function Ke(e){var r=e.dragLeave;if(!W())return!1;return r.hasOwnProperty(Q.isLeavingWindow)}function Le(e){var r=e.dragLeave,{type:t,relatedTarget:n}=r;if(t!=="dragleave")return!1;if(W())return Ke({dragLeave:r});if(n==null)return!0;if(Ne())return ke(n);return n instanceof HTMLIFrameElement}function Re(e){var r=e.onDragEnd;return[{type:"pointermove",listener:function(){var t=0;return function n(){if(t<20){t++;return}r()}}()},{type:"pointerdown",listener:r}]}function C(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var ht=function e(r){var t=[],n=null,o=function i(){for(var u=arguments.length,l=Array(u),a=0;a<u;a++)l[a]=arguments[a];if(t=l,n)return;n=requestAnimationFrame(function(){n=null,r.apply(void 0,t)})};return o.cancel=function(){if(!n)return;cancelAnimationFrame(n),n=null},o},Ue=ht;var oe=Ue(function(e){return e()}),_=function(){var e=null;function r(n){var o=requestAnimationFrame(function(){e=null,n()});e={frameId:o,fn:n}}function t(){if(e)cancelAnimationFrame(e.frameId),e.fn(),e=null}return{schedule:r,flush:t}}();function Ye(e){var{source:r,initial:t,dispatchEvent:n}=e,o={dropTargets:[]};function i(l){n(l),o={dropTargets:l.payload.location.current.dropTargets}}var u={start:function l(a){var c=a.nativeSetDragImage,d={current:t,previous:o,initial:t};i({eventName:"onGenerateDragPreview",payload:{source:r,location:d,nativeSetDragImage:c}}),_.schedule(function(){i({eventName:"onDragStart",payload:{source:r,location:d}})})},dragUpdate:function l(a){var c=a.current;_.flush(),oe.cancel(),i({eventName:"onDropTargetChange",payload:{source:r,location:{initial:t,previous:o,current:c}}})},drag:function l(a){var c=a.current;oe(function(){_.flush();var d={initial:t,previous:o,current:c};i({eventName:"onDrag",payload:{source:r,location:d}})})},drop:function l(a){var{current:c,updatedSourcePayload:d}=a;_.flush(),oe.cancel(),i({eventName:"onDrop",payload:{source:d!==null&&d!==void 0?d:r,location:{current:c,previous:o,initial:t}}})}};return u}var ie={isActive:!1};function Be(){return!ie.isActive}function xt(e){if(e.dataTransfer)return e.dataTransfer.setDragImage.bind(e.dataTransfer);return null}function Tt(e){var{current:r,next:t}=e;if(r.length!==t.length)return!0;for(var n=0;n<r.length;n++)if(r[n].element!==t[n].element)return!0;return!1}function wt(e){var{event:r,dragType:t,getDropTargetsOver:n,dispatchEvent:o}=e;if(!Be())return;var i=Dt({event:r,dragType:t,getDropTargetsOver:n});ie.isActive=!0;var u={current:i};ae({event:r,current:i.dropTargets});var l=Ye({source:t.payload,dispatchEvent:o,initial:i});function a(s){var p=Tt({current:u.current.dropTargets,next:s.dropTargets});if(u.current=s,p)l.dragUpdate({current:u.current})}function c(s){var p=C(s),m=z(s.target)?G({x:p.clientX,y:p.clientY}):s.target,g=n({target:m,input:p,source:t.payload,current:u.current.dropTargets});if(g.length)s.preventDefault(),ae({event:s,current:g});a({dropTargets:g,input:p})}function d(){if(u.current.dropTargets.length)a({dropTargets:[],input:u.current.input});l.drop({current:u.current,updatedSourcePayload:null}),f()}function f(){ie.isActive=!1,w()}var w=Xe.bindAll(window,[{type:"dragover",listener:function s(p){c(p),l.drag({current:u.current})}},{type:"dragenter",listener:c},{type:"dragleave",listener:function s(p){if(!Le({dragLeave:p}))return;if(a({input:u.current.input,dropTargets:[]}),t.startedFrom==="external")d()}},{type:"drop",listener:function s(p){if(u.current={dropTargets:u.current.dropTargets,input:C(p)},!u.current.dropTargets.length){d();return}p.preventDefault(),ae({event:p,current:u.current.dropTargets}),l.drop({current:u.current,updatedSourcePayload:t.type==="external"?t.getDropPayload(p):null}),f()}},{type:"dragend",listener:function s(p){u.current={dropTargets:u.current.dropTargets,input:C(p)},d()}}].concat(J(Re({onDragEnd:d}))),{capture:!0});l.start({nativeSetDragImage:xt(r)})}function ae(e){var r,{event:t,current:n}=e,o=(r=n[0])===null||r===void 0?void 0:r.dropEffect;if(o!=null&&t.dataTransfer)t.dataTransfer.dropEffect=o}function Dt(e){var{event:r,dragType:t,getDropTargetsOver:n}=e,o=C(r);if(t.startedFrom==="external")return{input:o,dropTargets:[]};var i=n({input:o,source:t.payload,target:r.target,current:[]});return{input:o,dropTargets:i}}var ue={canStart:Be,start:wt};var le=new Map;function At(e){var{typeKey:r,mount:t}=e,n=le.get(r);if(n)return n.usageCount++,n;var o={typeKey:r,unmount:t(),usageCount:1};return le.set(r,o),o}function Ve(e){var r=At(e);return function t(){if(r.usageCount--,r.usageCount>0)return;r.unmount(),le.delete(e.typeKey)}}function zo(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return function n(){r.forEach(function(o){return o()})}}function ee(e,r){var{attribute:t,value:n}=r;return e.setAttribute(t,n),function(){return e.removeAttribute(t)}}function qe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function F(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(t),!0).forEach(function(n){ml(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ce(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Ot(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,o=function a(){};return{s:o,n:function a(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function a(c){throw c},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,u=!0,l=!1;return{s:function a(){t=t.call(e)},n:function a(){var c=t.next();return u=c.done,c},e:function a(c){l=!0,i=c},f:function a(){try{u||t.return==null||t.return()}finally{if(l)throw i}}}}function Ot(e,r){if(e){if(typeof e=="string")return ze(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ze(e,r):void 0}}function ze(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function se(e){return e.slice(0).reverse()}function Ge(e){var{typeKey:r,defaultDropEffect:t}=e,n=new WeakMap,o="data-drop-target-for-".concat(r),i="[".concat(o,"]");function u(s){return n.set(s.element,s),function(){return n.delete(s.element)}}function l(s){if(!1)var p;var m=zo(ee(s.element,{attribute:o,value:"true"}),u(s));return A(m)}function a(s){var p,m,g,D,{source:y,target:h,input:b,result:T}=s,v=T===void 0?[]:T;if(h==null)return v;if(!(h instanceof Element)){if(h instanceof Node)return a({source:y,target:h.parentElement,input:b,result:v});return v}var P=h.closest(i);if(P==null)return v;var x=n.get(P);if(x==null)return v;var E={input:b,source:y,element:x.element};if(x.canDrop&&!x.canDrop(E))return a({source:y,target:x.element.parentElement,input:b,result:v});var S=(p=(m=x.getData)===null||m===void 0?void 0:m.call(x,E))!==null&&p!==void 0?p:{},j=(g=(D=x.getDropEffect)===null||D===void 0?void 0:D.call(x,E))!==null&&g!==void 0?g:t,O={data:S,element:x.element,dropEffect:j,isActiveDueToStickiness:!1};return a({source:y,target:x.element.parentElement,input:b,result:[].concat(J(v),[O])})}function c(s){var{eventName:p,payload:m}=s,g=ce(m.location.current.dropTargets),D;try{for(g.s();!(D=g.n()).done;){var y,h=D.value,b=n.get(h.element),T=F(F({},m),{},{self:h});b===null||b===void 0||(y=b[p])===null||y===void 0||y.call(b,T)}}catch(v){g.e(v)}finally{g.f()}}var d={onGenerateDragPreview:c,onDrag:c,onDragStart:c,onDrop:c,onDropTargetChange:function s(p){var m=p.payload,g=new Set(m.location.current.dropTargets.map(function(K){return K.element})),D=new Set,y=ce(m.location.previous.dropTargets),h;try{for(y.s();!(h=y.n()).done;){var b,T=h.value;D.add(T.element);var v=n.get(T.element),P=g.has(T.element),x=F(F({},m),{},{self:T});if(v===null||v===void 0||(b=v.onDropTargetChange)===null||b===void 0||b.call(v,x),!P){var E;v===null||v===void 0||(E=v.onDragLeave)===null||E===void 0||E.call(v,x)}}}catch(K){y.e(K)}finally{y.f()}var S=ce(m.location.current.dropTargets),j;try{for(S.s();!(j=S.n()).done;){var O,M,re=j.value;if(D.has(re.element))continue;var ve=F(F({},m),{},{self:re}),I=n.get(re.element);I===null||I===void 0||(O=I.onDropTargetChange)===null||O===void 0||O.call(I,ve),I===null||I===void 0||(M=I.onDragEnter)===null||M===void 0||M.call(I,ve)}}catch(K){S.e(K)}finally{S.f()}}};function f(s){d[s.eventName](s)}function w(s){var{source:p,target:m,input:g,current:D}=s,y=a({source:p,target:m,input:g});if(y.length>=D.length)return y;var h=se(D),b=se(y),T=[];for(var v=0;v<h.length;v++){var P,x=h[v],E=b[v];if(E!=null){T.push(E);continue}var S=T[v-1],j=h[v-1];if((S===null||S===void 0?void 0:S.element)!==(j===null||j===void 0?void 0:j.element))break;var O=n.get(x.element);if(!O)break;var M={input:g,source:p,element:O.element};if(O.canDrop&&!O.canDrop(M))break;if(!((P=O.getIsSticky)!==null&&P!==void 0&&P.call(O,M)))break;T.push(F(F({},x),{},{isActiveDueToStickiness:!0}))}return se(T)}return{dropTargetForConsumers:l,getIsOver:w,dispatchEvent:f}}function Et(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=St(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,o=function a(){};return{s:o,n:function a(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function a(c){throw c},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
5
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,u=!0,l=!1;return{s:function a(){t=t.call(e)},n:function a(){var c=t.next();return u=c.done,c},e:function a(c){l=!0,i=c},f:function a(){try{u||t.return==null||t.return()}finally{if(l)throw i}}}}function St(e,r){if(e){if(typeof e=="string")return Ze(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ze(e,r):void 0}}function Ze(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function $e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Pt(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?$e(Object(t),!0).forEach(function(n){ml(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Je(){var e=new Set,r=null;function t(i){if(!r)return;if(!i.canMonitor||i.canMonitor(r.canMonitorArgs))r.active.add(i)}function n(i){var u=Pt({},i);e.add(u),t(u);function l(){if(e.delete(u),r)r.active.delete(u)}return A(l)}function o(i){var{eventName:u,payload:l}=i;if(u==="onGenerateDragPreview"){r={canMonitorArgs:{initial:l.location.initial,source:l.source},active:new Set};var a=Et(e),c;try{for(a.s();!(c=a.n()).done;){var d=c.value;t(d)}}catch(g){a.e(g)}finally{a.f()}}if(!r)return;var f=Array.from(r.active);for(var w=0,s=f;w<s.length;w++){var p=s[w];if(r.active.has(p)){var m;(m=p[u])===null||m===void 0||m.call(p,l)}}if(u==="onDrop")r.active.clear(),r=null}return{dispatchEvent:o,monitorForConsumers:n}}function Qe(e){var{typeKey:r,mount:t,dispatchEventToSource:n,onPostDispatch:o,defaultDropEffect:i}=e,u=Je(),l=Ge({typeKey:r,defaultDropEffect:i});function a(f){n===null||n===void 0||n(f),l.dispatchEvent(f),u.dispatchEvent(f),o===null||o===void 0||o(f)}function c(f){var{event:w,dragType:s}=f;ue.start({event:w,dragType:s,getDropTargetsOver:l.getIsOver,dispatchEvent:a})}function d(){function f(){var w={canStart:ue.canStart,start:c};return t(w)}return Ve({typeKey:r,mount:f})}return{registerUsage:d,dropTarget:l.dropTargetForConsumers,monitor:u.monitorForConsumers}}var _e=A(function e(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),et="pdnd:android-fallback";var fe="text/plain";var tt="text/uri-list";var rt="application/vnd.pdnd";var te=new WeakMap;function jt(e){return te.set(e.element,e),function r(){te.delete(e.element)}}var nt=Fe(),de=Qe({typeKey:"element",defaultDropEffect:"move",mount:function e(r){return zo(nt.bindEvents(),ot.bind(document,{type:"dragstart",listener:function t(n){var o,i,u,l,a,c;if(!r.canStart(n))return;if(n.defaultPrevented)return;if(!n.dataTransfer)return;var d=n.target;if(!(d instanceof HTMLElement))return;var f=te.get(d);if(!f)return;var w=C(n),s={element:f.element,dragHandle:(o=f.dragHandle)!==null&&o!==void 0?o:null,input:w};if(f.canDrag&&!f.canDrag(s)){n.preventDefault();return}if(f.dragHandle){var p=G({x:w.clientX,y:w.clientY});if(!f.dragHandle.contains(p)){n.preventDefault();return}}var m=(i=(u=f.getInitialDataForExternal)===null||u===void 0?void 0:u.call(f,s))!==null&&i!==void 0?i:null;if(m)for(var g=0,D=Object.entries(m);g<D.length;g++){var y=B(D[g],2),h=y[0],b=y[1];n.dataTransfer.setData(h,b!==null&&b!==void 0?b:"")}if(_e()&&!n.dataTransfer.types.includes(fe)&&!n.dataTransfer.types.includes(tt))n.dataTransfer.setData(fe,et);n.dataTransfer.setData(rt,"");var T={element:f.element,dragHandle:(l=f.dragHandle)!==null&&l!==void 0?l:null,data:(a=(c=f.getInitialData)===null||c===void 0?void 0:c.call(f,s))!==null&&a!==void 0?a:{}},v={type:"element",payload:T,startedFrom:"internal"};r.start({event:n,dragType:v})}}))},dispatchEventToSource:function e(r){var t,n,{eventName:o,payload:i}=r;(t=te.get(i.source.element))===null||t===void 0||(n=t[o])===null||n===void 0||n.call(t,i)},onPostDispatch:nt.getOnPostDispatch()}),{dropTarget:Zs,monitor:Xs}=de;function Uo(e){if(!1)var r;var t=zo(de.registerUsage(),jt(e),ee(e.element,{attribute:"draggable",value:"true"}));return A(t)}export{ml,zo,Zs,Xs,Uo};
1
+ import{fp,pe}from"./studio-nhpg405j.js";var ne=pe(function(be){Object.defineProperty(be,"__esModule",{value:!0});be.bind=void 0;function at(e,r){var{type:t,listener:n,options:o}=r;return e.addEventListener(t,n,o),function i(){e.removeEventListener(t,n,o)}}be.bind=at});var Te=pe(function(k){var N=k&&k.__assign||function(){return N=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o))e[o]=r[o]}return e},N.apply(this,arguments)};Object.defineProperty(k,"__esModule",{value:!0});k.bindAll=void 0;var it=ne();function xe(e){if(typeof e>"u")return;if(typeof e==="boolean")return{capture:e};return e}function ut(e,r){if(r==null)return e;var t=N(N({},e),{options:N(N({},xe(r)),xe(e.options))});return t}function lt(e,r,t){var n=r.map(function(o){var i=ut(o,t);return(0,it.bind)(e,i)});return function o(){n.forEach(function(i){return i()})}}k.bindAll=lt});var R=pe(function(V){Object.defineProperty(V,"__esModule",{value:!0});V.bindAll=V.bind=void 0;var ct=ne();Object.defineProperty(V,"bind",{enumerable:!0,get:function(){return ct.bind}});var st=Te();Object.defineProperty(V,"bindAll",{enumerable:!0,get:function(){return st.bindAll}})});function me(e){if(Array.isArray(e))return e}function ge(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,o,i,u,l=[],a=!0,c=!1;try{if(i=(t=t.call(e)).next,r===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(n=i.call(t)).done)&&(l.push(n.value),l.length!==r);a=!0);}catch(d){c=!0,o=d}finally{try{if(!a&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(c)throw o}}return l}}function L(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function X(e,r){if(e){if(typeof e=="string")return L(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?L(e,r):void 0}}function ye(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(e,r){return me(e)||ge(e,r)||X(e,r)||ye()}var ot=fp(R());var q="data-pdnd-honey-pot";function z(e){return e instanceof Element&&e.hasAttribute(q)}function G(e){var r=document.elementsFromPoint(e.x,e.y),t=B(r,2),n=t[0],o=t[1];if(!n)return null;if(z(n))return o!==null&&o!==void 0?o:null;return n}function H(e){return H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},H(e)}function we(e,r){if(H(e)!="object"||!e)return e;var t;if(typeof Symbol<"u"&&(t=e[Symbol.toPrimitive])!==void 0){var n=t.call(e,r||"default");if(H(n)!="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function De(e){var r=we(e,"string");return H(r)=="symbol"?r:r+""}function bl(e,r,t){return(r=De(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Y=fp(R());var Ae=2147483647;var Oe={inset:"unset",border:"none",padding:0,margin:0,overflow:"visible",color:"inherit",background:"transparent",width:"auto",height:"auto"};function A(e){var r=null;return function t(){if(!r){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];var u=e.apply(this,o);r={result:u}}return r.result}}var Z=A(function e(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover==="function"});function Ee(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Se(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ee(Object(t),!0).forEach(function(n){bl(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var U=2,Pe=U/2;function ft(e){return{x:Math.floor(e.x),y:Math.floor(e.y)}}function dt(e){return{x:e.x-Pe,y:e.y-Pe}}function vt(e){return{x:Math.max(e.x,0),y:Math.max(e.y,0)}}function mt(e){return{x:Math.min(e.x,window.innerWidth-U),y:Math.min(e.y,window.innerHeight-U)}}function je(e){var r=e.client,t=mt(vt(dt(ft(r))));return DOMRect.fromRect({x:t.x,y:t.y,width:U,height:U})}function Ie(e){var r=e.clientRect;return{left:"".concat(r.left,"px"),top:"".concat(r.top,"px"),width:"".concat(r.width,"px"),height:"".concat(r.height,"px")}}function gt(e){var{client:r,clientRect:t}=e;return r.x>=t.x&&r.x<=t.x+t.width&&r.y>=t.y&&r.y<=t.y+t.height}function yt(e){var r=e.initial,t=document.createElement("div");if(t.setAttribute(q,"true"),Z())t.setAttribute("popover","manual");var n=je({client:r});if(Object.assign(t.style,Se(Se({position:"fixed"},Z()?Oe:{zIndex:Ae}),{},{backgroundColor:"transparent",padding:0,margin:0,boxSizing:"border-box",pointerEvents:"auto"},Ie({clientRect:n}))),document.body.appendChild(t),Z())t.showPopover();var o=Y.bind(window,{type:"pointermove",listener:function i(u){var l={x:u.clientX,y:u.clientY};n=je({client:l}),Object.assign(t.style,Ie({clientRect:n}))},options:{capture:!0}});return function i(u){var l=u.current;if(o(),gt({client:l,clientRect:n})){t.remove();return}function a(){c(),t.remove()}var c=Y.bindAll(window,[{type:"pointerdown",listener:a},{type:"pointermove",listener:a},{type:"focusin",listener:a},{type:"focusout",listener:a},{type:"dragstart",listener:a},{type:"dragenter",listener:a},{type:"dragover",listener:a}],{capture:!0})}}function Fe(){var e=null;function r(){return e=null,Y.bind(window,{type:"pointermove",listener:function n(o){e={x:o.clientX,y:o.clientY}},options:{capture:!0}})}function t(){var n=null;return function o(i){var{eventName:u,payload:l}=i;if(u==="onDragStart"){var a=l.location.initial.input,c=e!==null&&e!==void 0?e:{x:a.clientX,y:a.clientY};n=yt({initial:c})}if(u==="onDrop"){var d,f=l.location.current.input;(d=n)===null||d===void 0||d({current:{x:f.clientX,y:f.clientY}}),n=null,e=null}}}return{bindEvents:r,getOnPostDispatch:t}}function He(e){if(Array.isArray(e))return L(e)}function Ce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Me(){throw TypeError(`Invalid attempt to spread non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J(e){return He(e)||Ce(e)||X(e)||Me()}var Xe=fp(R());var Ne=A(function e(){return navigator.userAgent.includes("Firefox")});var W=A(function e(){var r=navigator,t=r.userAgent;return t.includes("AppleWebKit")&&!t.includes("Chrome")});function bt(e){return"nodeName"in e}function ke(e){return bt(e)&&e.ownerDocument!==document}var We=fp(R());var Q={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};(function e(){if(typeof window>"u")return;if(!W())return;function r(){return{enterCount:0,isOverWindow:!1}}var t=r();function n(){t=r()}We.bindAll(window,[{type:"dragstart",listener:function o(){t.enterCount=0,t.isOverWindow=!0}},{type:"drop",listener:n},{type:"dragend",listener:n},{type:"dragenter",listener:function o(i){if(!t.isOverWindow&&t.enterCount===0)i[Q.isEnteringWindow]=!0;t.isOverWindow=!0,t.enterCount++}},{type:"dragleave",listener:function o(i){if(t.enterCount--,t.isOverWindow&&t.enterCount===0)i[Q.isLeavingWindow]=!0,t.isOverWindow=!1}}],{capture:!0})})();function Ke(e){var r=e.dragLeave;if(!W())return!1;return r.hasOwnProperty(Q.isLeavingWindow)}function Le(e){var r=e.dragLeave,{type:t,relatedTarget:n}=r;if(t!=="dragleave")return!1;if(W())return Ke({dragLeave:r});if(n==null)return!0;if(Ne())return ke(n);return n instanceof HTMLIFrameElement}function Re(e){var r=e.onDragEnd;return[{type:"pointermove",listener:function(){var t=0;return function n(){if(t<20){t++;return}r()}}()},{type:"pointerdown",listener:r}]}function C(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var ht=function e(r){var t=[],n=null,o=function i(){for(var u=arguments.length,l=Array(u),a=0;a<u;a++)l[a]=arguments[a];if(t=l,n)return;n=requestAnimationFrame(function(){n=null,r.apply(void 0,t)})};return o.cancel=function(){if(!n)return;cancelAnimationFrame(n),n=null},o},Ue=ht;var oe=Ue(function(e){return e()}),_=function(){var e=null;function r(n){var o=requestAnimationFrame(function(){e=null,n()});e={frameId:o,fn:n}}function t(){if(e)cancelAnimationFrame(e.frameId),e.fn(),e=null}return{schedule:r,flush:t}}();function Ye(e){var{source:r,initial:t,dispatchEvent:n}=e,o={dropTargets:[]};function i(l){n(l),o={dropTargets:l.payload.location.current.dropTargets}}var u={start:function l(a){var c=a.nativeSetDragImage,d={current:t,previous:o,initial:t};i({eventName:"onGenerateDragPreview",payload:{source:r,location:d,nativeSetDragImage:c}}),_.schedule(function(){i({eventName:"onDragStart",payload:{source:r,location:d}})})},dragUpdate:function l(a){var c=a.current;_.flush(),oe.cancel(),i({eventName:"onDropTargetChange",payload:{source:r,location:{initial:t,previous:o,current:c}}})},drag:function l(a){var c=a.current;oe(function(){_.flush();var d={initial:t,previous:o,current:c};i({eventName:"onDrag",payload:{source:r,location:d}})})},drop:function l(a){var{current:c,updatedSourcePayload:d}=a;_.flush(),oe.cancel(),i({eventName:"onDrop",payload:{source:d!==null&&d!==void 0?d:r,location:{current:c,previous:o,initial:t}}})}};return u}var ie={isActive:!1};function Be(){return!ie.isActive}function xt(e){if(e.dataTransfer)return e.dataTransfer.setDragImage.bind(e.dataTransfer);return null}function Tt(e){var{current:r,next:t}=e;if(r.length!==t.length)return!0;for(var n=0;n<r.length;n++)if(r[n].element!==t[n].element)return!0;return!1}function wt(e){var{event:r,dragType:t,getDropTargetsOver:n,dispatchEvent:o}=e;if(!Be())return;var i=Dt({event:r,dragType:t,getDropTargetsOver:n});ie.isActive=!0;var u={current:i};ae({event:r,current:i.dropTargets});var l=Ye({source:t.payload,dispatchEvent:o,initial:i});function a(s){var p=Tt({current:u.current.dropTargets,next:s.dropTargets});if(u.current=s,p)l.dragUpdate({current:u.current})}function c(s){var p=C(s),m=z(s.target)?G({x:p.clientX,y:p.clientY}):s.target,g=n({target:m,input:p,source:t.payload,current:u.current.dropTargets});if(g.length)s.preventDefault(),ae({event:s,current:g});a({dropTargets:g,input:p})}function d(){if(u.current.dropTargets.length)a({dropTargets:[],input:u.current.input});l.drop({current:u.current,updatedSourcePayload:null}),f()}function f(){ie.isActive=!1,w()}var w=Xe.bindAll(window,[{type:"dragover",listener:function s(p){c(p),l.drag({current:u.current})}},{type:"dragenter",listener:c},{type:"dragleave",listener:function s(p){if(!Le({dragLeave:p}))return;if(a({input:u.current.input,dropTargets:[]}),t.startedFrom==="external")d()}},{type:"drop",listener:function s(p){if(u.current={dropTargets:u.current.dropTargets,input:C(p)},!u.current.dropTargets.length){d();return}p.preventDefault(),ae({event:p,current:u.current.dropTargets}),l.drop({current:u.current,updatedSourcePayload:t.type==="external"?t.getDropPayload(p):null}),f()}},{type:"dragend",listener:function s(p){u.current={dropTargets:u.current.dropTargets,input:C(p)},d()}}].concat(J(Re({onDragEnd:d}))),{capture:!0});l.start({nativeSetDragImage:xt(r)})}function ae(e){var r,{event:t,current:n}=e,o=(r=n[0])===null||r===void 0?void 0:r.dropEffect;if(o!=null&&t.dataTransfer)t.dataTransfer.dropEffect=o}function Dt(e){var{event:r,dragType:t,getDropTargetsOver:n}=e,o=C(r);if(t.startedFrom==="external")return{input:o,dropTargets:[]};var i=n({input:o,source:t.payload,target:r.target,current:[]});return{input:o,dropTargets:i}}var ue={canStart:Be,start:wt};var le=new Map;function At(e){var{typeKey:r,mount:t}=e,n=le.get(r);if(n)return n.usageCount++,n;var o={typeKey:r,unmount:t(),usageCount:1};return le.set(r,o),o}function Ve(e){var r=At(e);return function t(){if(r.usageCount--,r.usageCount>0)return;r.unmount(),le.delete(e.typeKey)}}function Uo(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return function n(){r.forEach(function(o){return o()})}}function ee(e,r){var{attribute:t,value:n}=r;return e.setAttribute(t,n),function(){return e.removeAttribute(t)}}function qe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function F(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?qe(Object(t),!0).forEach(function(n){bl(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ce(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Ot(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,o=function a(){};return{s:o,n:function a(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function a(c){throw c},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,u=!0,l=!1;return{s:function a(){t=t.call(e)},n:function a(){var c=t.next();return u=c.done,c},e:function a(c){l=!0,i=c},f:function a(){try{u||t.return==null||t.return()}finally{if(l)throw i}}}}function Ot(e,r){if(e){if(typeof e=="string")return ze(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ze(e,r):void 0}}function ze(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function se(e){return e.slice(0).reverse()}function Ge(e){var{typeKey:r,defaultDropEffect:t}=e,n=new WeakMap,o="data-drop-target-for-".concat(r),i="[".concat(o,"]");function u(s){return n.set(s.element,s),function(){return n.delete(s.element)}}function l(s){if(!1)var p;var m=Uo(ee(s.element,{attribute:o,value:"true"}),u(s));return A(m)}function a(s){var p,m,g,D,{source:y,target:h,input:b,result:T}=s,v=T===void 0?[]:T;if(h==null)return v;if(!(h instanceof Element)){if(h instanceof Node)return a({source:y,target:h.parentElement,input:b,result:v});return v}var P=h.closest(i);if(P==null)return v;var x=n.get(P);if(x==null)return v;var E={input:b,source:y,element:x.element};if(x.canDrop&&!x.canDrop(E))return a({source:y,target:x.element.parentElement,input:b,result:v});var S=(p=(m=x.getData)===null||m===void 0?void 0:m.call(x,E))!==null&&p!==void 0?p:{},j=(g=(D=x.getDropEffect)===null||D===void 0?void 0:D.call(x,E))!==null&&g!==void 0?g:t,O={data:S,element:x.element,dropEffect:j,isActiveDueToStickiness:!1};return a({source:y,target:x.element.parentElement,input:b,result:[].concat(J(v),[O])})}function c(s){var{eventName:p,payload:m}=s,g=ce(m.location.current.dropTargets),D;try{for(g.s();!(D=g.n()).done;){var y,h=D.value,b=n.get(h.element),T=F(F({},m),{},{self:h});b===null||b===void 0||(y=b[p])===null||y===void 0||y.call(b,T)}}catch(v){g.e(v)}finally{g.f()}}var d={onGenerateDragPreview:c,onDrag:c,onDragStart:c,onDrop:c,onDropTargetChange:function s(p){var m=p.payload,g=new Set(m.location.current.dropTargets.map(function(K){return K.element})),D=new Set,y=ce(m.location.previous.dropTargets),h;try{for(y.s();!(h=y.n()).done;){var b,T=h.value;D.add(T.element);var v=n.get(T.element),P=g.has(T.element),x=F(F({},m),{},{self:T});if(v===null||v===void 0||(b=v.onDropTargetChange)===null||b===void 0||b.call(v,x),!P){var E;v===null||v===void 0||(E=v.onDragLeave)===null||E===void 0||E.call(v,x)}}}catch(K){y.e(K)}finally{y.f()}var S=ce(m.location.current.dropTargets),j;try{for(S.s();!(j=S.n()).done;){var O,M,re=j.value;if(D.has(re.element))continue;var ve=F(F({},m),{},{self:re}),I=n.get(re.element);I===null||I===void 0||(O=I.onDropTargetChange)===null||O===void 0||O.call(I,ve),I===null||I===void 0||(M=I.onDragEnter)===null||M===void 0||M.call(I,ve)}}catch(K){S.e(K)}finally{S.f()}}};function f(s){d[s.eventName](s)}function w(s){var{source:p,target:m,input:g,current:D}=s,y=a({source:p,target:m,input:g});if(y.length>=D.length)return y;var h=se(D),b=se(y),T=[];for(var v=0;v<h.length;v++){var P,x=h[v],E=b[v];if(E!=null){T.push(E);continue}var S=T[v-1],j=h[v-1];if((S===null||S===void 0?void 0:S.element)!==(j===null||j===void 0?void 0:j.element))break;var O=n.get(x.element);if(!O)break;var M={input:g,source:p,element:O.element};if(O.canDrop&&!O.canDrop(M))break;if(!((P=O.getIsSticky)!==null&&P!==void 0&&P.call(O,M)))break;T.push(F(F({},x),{},{isActiveDueToStickiness:!0}))}return se(T)}return{dropTargetForConsumers:l,getIsOver:w,dispatchEvent:f}}function Et(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=St(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,o=function a(){};return{s:o,n:function a(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function a(c){throw c},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
5
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,u=!0,l=!1;return{s:function a(){t=t.call(e)},n:function a(){var c=t.next();return u=c.done,c},e:function a(c){l=!0,i=c},f:function a(){try{u||t.return==null||t.return()}finally{if(l)throw i}}}}function St(e,r){if(e){if(typeof e=="string")return Ze(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ze(e,r):void 0}}function Ze(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function $e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Pt(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?$e(Object(t),!0).forEach(function(n){bl(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Je(){var e=new Set,r=null;function t(i){if(!r)return;if(!i.canMonitor||i.canMonitor(r.canMonitorArgs))r.active.add(i)}function n(i){var u=Pt({},i);e.add(u),t(u);function l(){if(e.delete(u),r)r.active.delete(u)}return A(l)}function o(i){var{eventName:u,payload:l}=i;if(u==="onGenerateDragPreview"){r={canMonitorArgs:{initial:l.location.initial,source:l.source},active:new Set};var a=Et(e),c;try{for(a.s();!(c=a.n()).done;){var d=c.value;t(d)}}catch(g){a.e(g)}finally{a.f()}}if(!r)return;var f=Array.from(r.active);for(var w=0,s=f;w<s.length;w++){var p=s[w];if(r.active.has(p)){var m;(m=p[u])===null||m===void 0||m.call(p,l)}}if(u==="onDrop")r.active.clear(),r=null}return{dispatchEvent:o,monitorForConsumers:n}}function Qe(e){var{typeKey:r,mount:t,dispatchEventToSource:n,onPostDispatch:o,defaultDropEffect:i}=e,u=Je(),l=Ge({typeKey:r,defaultDropEffect:i});function a(f){n===null||n===void 0||n(f),l.dispatchEvent(f),u.dispatchEvent(f),o===null||o===void 0||o(f)}function c(f){var{event:w,dragType:s}=f;ue.start({event:w,dragType:s,getDropTargetsOver:l.getIsOver,dispatchEvent:a})}function d(){function f(){var w={canStart:ue.canStart,start:c};return t(w)}return Ve({typeKey:r,mount:f})}return{registerUsage:d,dropTarget:l.dropTargetForConsumers,monitor:u.monitorForConsumers}}var _e=A(function e(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),et="pdnd:android-fallback";var fe="text/plain";var tt="text/uri-list";var rt="application/vnd.pdnd";var te=new WeakMap;function jt(e){return te.set(e.element,e),function r(){te.delete(e.element)}}var nt=Fe(),de=Qe({typeKey:"element",defaultDropEffect:"move",mount:function e(r){return Uo(nt.bindEvents(),ot.bind(document,{type:"dragstart",listener:function t(n){var o,i,u,l,a,c;if(!r.canStart(n))return;if(n.defaultPrevented)return;if(!n.dataTransfer)return;var d=n.target;if(!(d instanceof HTMLElement))return;var f=te.get(d);if(!f)return;var w=C(n),s={element:f.element,dragHandle:(o=f.dragHandle)!==null&&o!==void 0?o:null,input:w};if(f.canDrag&&!f.canDrag(s)){n.preventDefault();return}if(f.dragHandle){var p=G({x:w.clientX,y:w.clientY});if(!f.dragHandle.contains(p)){n.preventDefault();return}}var m=(i=(u=f.getInitialDataForExternal)===null||u===void 0?void 0:u.call(f,s))!==null&&i!==void 0?i:null;if(m)for(var g=0,D=Object.entries(m);g<D.length;g++){var y=B(D[g],2),h=y[0],b=y[1];n.dataTransfer.setData(h,b!==null&&b!==void 0?b:"")}if(_e()&&!n.dataTransfer.types.includes(fe)&&!n.dataTransfer.types.includes(tt))n.dataTransfer.setData(fe,et);n.dataTransfer.setData(rt,"");var T={element:f.element,dragHandle:(l=f.dragHandle)!==null&&l!==void 0?l:null,data:(a=(c=f.getInitialData)===null||c===void 0?void 0:c.call(f,s))!==null&&a!==void 0?a:{}},v={type:"element",payload:T,startedFrom:"internal"};r.start({event:n,dragType:v})}}))},dispatchEventToSource:function e(r){var t,n,{eventName:o,payload:i}=r;(t=te.get(i.source.element))===null||t===void 0||(n=t[o])===null||n===void 0||n.call(t,i)},onPostDispatch:nt.getOnPostDispatch()}),{dropTarget:Xs,monitor:Qs}=de;function qo(e){if(!1)var r;var t=Uo(de.registerUsage(),jt(e),ee(e.element,{attribute:"draggable",value:"true"}));return A(t)}export{bl,Uo,Xs,Qs,qo};
6
6
 
7
- //# debugId=9FC41F18ACA25BBA64756E2164756E21
8
- //# sourceMappingURL=studio-czpmzs9r.js.map
7
+ //# debugId=A6CAE43A89E790A764756E2164756E21
8
+ //# sourceMappingURL=studio-y2zsnzye.js.map
@@ -1,4 +1,4 @@
1
- function Y(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return(n)=>(n in t)}var V=Object.assign;var Ve=Object.prototype.hasOwnProperty,F=(e,t)=>Ve.call(e,t),A=Array.isArray,C=(e)=>pe(e)==="[object Map]";var ue=(e)=>typeof e==="function",Fe=(e)=>typeof e==="string",R=(e)=>typeof e==="symbol",x=(e)=>e!==null&&typeof e==="object";var je=Object.prototype.toString,pe=(e)=>je.call(e),he=(e)=>pe(e).slice(8,-1);var j=(e)=>Fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var H=(e)=>{let t=Object.create(null);return(n)=>t[n]||(t[n]=e(n))},He=/-\w/g,rt=H((e)=>e.replace(He,(t)=>t.slice(1).toUpperCase())),Ue=/\B([A-Z])/g,st=H((e)=>e.replace(Ue,"-$1").toLowerCase()),de=H((e)=>e.charAt(0).toUpperCase()+e.slice(1)),ot=H((e)=>e?`on${de(e)}`:""),y=(e,t)=>!Object.is(e,t);var Ke="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly";var at=Y(Ke+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var h;class ye{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&&h)if(h.active)this.parent=h,this.index=(h.scopes||(h.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=h;try{return h=this,e()}finally{h=t}}}on(){if(++this._on===1)this.prevScope=h,h=this}off(){if(this._on>0&&--this._on===0){if(h===this)h=this.prevScope;else{let e=h;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 me(e){return new ye(e)}function Ds(e,t=!1){if(h)h.cleanups.push(e)}var f;var B=new WeakSet;class z{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,h)if(h.active)h.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,B.has(this))B.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))be(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ge(this),Se(this);let e=f,t=_;f=this,_=!0;try{return this.fn()}finally{we(this),f=e,_=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)re(e);this.deps=this.depsTail=void 0,ge(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)B.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(J(this))this.run()}get dirty(){return J(this)}}var Ee=0,I,L;function be(e,t=!1){if(e.flags|=8,t){e.next=L,L=e;return}e.next=I,I=e}function ne(){Ee++}function ie(){if(--Ee>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(I){let t=I;I=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 Se(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function we(e){let t,n=e.depsTail,r=n;while(r){let i=r.prevDep;if(r.version===-1){if(r===n)n=i;re(r),ze(r)}else t=r;r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function J(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Te(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Te(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===M)return;if(e.globalVersion=M,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!J(e)))return;e.flags|=2;let t=e.dep,n=f,r=_;f=e,_=!0;try{Se(e);let i=e.fn(e._value);if(t.version===0||y(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{f=n,_=r,we(e),e.flags&=-3}}function re(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)re(s,!0)}}if(!t&&!--n.sc&&n.map)n.map.delete(n.key)}function ze(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 te(e,t){if(e.effect instanceof z)e=e.effect.fn;let n=new z(e);if(t)V(n,t);try{n.run()}catch(i){throw n.stop(),i}let r=n.run.bind(n);return r.effect=n,r}var _=!0,Ne=[];function $o(){Ne.push(_),_=!1}function Lo(){let e=Ne.pop();_=e===void 0?!0:e}function R1(e,t=!1){if(f instanceof z)f.cleanup=e}function ge(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=f;f=void 0;try{t()}finally{f=n}}}var M=0;class Oe{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 G{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 Oe(f,this),!f.deps)f.deps=f.depsTail=t;else t.prevDep=f.depsTail,f.depsTail.nextDep=t,f.depsTail=t;Ae(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++,M++,this.notify(e)}notify(e){ne();try{for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{ie()}}}function Ae(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)Ae(r)}let n=e.dep.subs;if(n!==e){if(e.prevSub=n,n)n.nextSub=e}e.dep.subs=e}}var Z=new WeakMap,N=Symbol(""),Q=Symbol(""),P=Symbol("");function d(e,t,n){if(_&&f){let r=Z.get(e);if(!r)Z.set(e,r=new Map);let i=r.get(n);if(!i)r.set(n,i=new G),i.map=r,i.key=n;i.track()}}function w(e,t,n,r,i,s){let o=Z.get(e);if(!o){M++;return}let a=(c)=>{if(c)c.trigger()};if(ne(),t==="clear")o.forEach(a);else{let c=A(e),l=c&&j(n);if(c&&n==="length"){let u=Number(r);o.forEach((p,g)=>{if(g==="length"||g===P||!R(g)&&g>=u)a(p)})}else{if(n!==void 0||o.has(void 0))a(o.get(n));if(l)a(o.get(P));switch(t){case"add":if(!c){if(a(o.get(N)),C(e))a(o.get(Q))}else if(l)a(o.get("length"));break;case"delete":if(!c){if(a(o.get(N)),C(e))a(o.get(Q))}break;case"set":if(C(e))a(o.get(N));break}}}ie()}function D(e){let t=le(e);if(t===e)return t;if(d(t,"iterate",P),T(e))return t;if(!S(e))return t.map(v);return Jy(e)?t.map((n)=>O(v(n))):t.map(O)}function se(e){return d(e=le(e),"iterate",P),e}function m(e,t){if(S(e))return Jy(e)?O(v(t)):O(t);return v(t)}var We={__proto__:null,[Symbol.iterator](){return q(this,Symbol.iterator,(e)=>m(this,e))},concat(...e){return D(this).concat(...e.map((t)=>A(t)?D(t):t))},entries(){return q(this,"entries",(e)=>(e[1]=m(this,e[1]),e))},every(e,t){return E(this,"every",e,t,void 0,arguments)},filter(e,t){return E(this,"filter",e,t,(n)=>n.map((r)=>m(this,r)),arguments)},find(e,t){return E(this,"find",e,t,(n)=>m(this,n),arguments)},findIndex(e,t){return E(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return E(this,"findLast",e,t,(n)=>m(this,n),arguments)},findLastIndex(e,t){return E(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return E(this,"forEach",e,t,void 0,arguments)},includes(...e){return X(this,"includes",e)},indexOf(...e){return X(this,"indexOf",e)},join(e){return D(this).join(e)},lastIndexOf(...e){return X(this,"lastIndexOf",e)},map(e,t){return E(this,"map",e,t,void 0,arguments)},pop(){return k(this,"pop")},push(...e){return k(this,"push",e)},reduce(e,...t){return ve(this,"reduce",e,t)},reduceRight(e,...t){return ve(this,"reduceRight",e,t)},shift(){return k(this,"shift")},some(e,t){return E(this,"some",e,t,void 0,arguments)},splice(...e){return k(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 k(this,"unshift",e)},values(){return q(this,"values",(e)=>m(this,e))}};function q(e,t,n){let r=se(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=()=>_e(s.next(),n),i!==Re[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=()=>_e(s._next(),n)}return s}function _e(e,t){if(!e.done)e.value=t(e.value);return e}var Re=Array.prototype;function E(e,t,n,r,i,s){let o=se(e),a=o!==e&&!T(e),c=o[t];if(c!==Re[t]){let p=c.apply(e,s);return a?v(p):p}let l=n;if(o!==e){if(a)l=function(p,g){return n.call(this,m(e,p),g,e)};else if(n.length>2)l=function(p,g){return n.call(this,p,g,e)}}let u=c.call(o,l,r);return a&&i?i(u):u}function ve(e,t,n,r){let i=se(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=m(e,l);return n.call(this,l,m(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?m(e,c):c}function X(e,t,n){let r=le(e);d(r,"iterate",P);let i=r[t](...n);if((i===-1||i===!1)&&it(n[0]))return n[0]=le(n[0]),r[t](...n);return i}function k(e,t,n=[]){$o(),ne();let r=le(e)[t].apply(e,n);return ie(),Lo(),r}var Ge=Y("__proto__,__v_isRef,__isVue"),xe=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(R));function Ye(e){if(!R(e))e=String(e);let t=le(this);return d(t,"has",e),t.hasOwnProperty(e)}class oe{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?tt:Ie:i?ke:Ce).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n))return e;return}let s=A(e);if(!r){let a;if(s&&(a=We[t]))return a;if(t==="hasOwnProperty")return Ye}let o=Reflect.get(e,t,Dh(e)?e:n);if(R(t)?xe.has(t):Ge(t))return o;if(!r)d(e,"get",t);if(i)return o;if(Dh(o)){let a=s&&j(t)?o:o.value;return r&&x(a)?W(a):a}if(x(o))return r?W(o):b(o);return o}}class ae extends oe{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],s=A(e)&&j(t);if(!this._isShallow){let c=S(i);if(!T(n)&&!S(n))i=le(i),n=le(n);if(!s&&Dh(i)&&!Dh(n))if(c)return!0;else return i.value=n,!0}let o=s?Number(t)<e.length:F(e,t),a=Reflect.set(e,t,n,Dh(e)?e:r);if(e===le(r)&&a){if(!o)w(e,"add",t,n);else if(y(n,i))w(e,"set",t,n,i)}return a}deleteProperty(e,t){let n=F(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(!R(t)||!xe.has(t))d(e,"has",t);return n}ownKeys(e){return d(e,"iterate",A(e)?"length":N),Reflect.ownKeys(e)}}class De extends oe{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}var Be=new ae,$e=new De,qe=new ae(!0);var ee=(e)=>e,U=(e)=>Reflect.getPrototypeOf(e);function Xe(e,t,n){return function(...r){let i=this.__v_raw,s=le(i),o=C(s),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,l=i[e](...r),u=n?ee:t?O:v;return!t&&d(s,"iterate",c?Q:N),V(Object.create(l),{next(){let{value:p,done:g}=l.next();return g?{value:p,done:g}:{value:a?[u(p[0]),u(p[1])]:u(p),done:g}}})}}function K(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Je(e,t){let n={get(i){let s=this.__v_raw,o=le(s),a=le(i);if(!e){if(y(i,a))d(o,"get",i);d(o,"get",a)}let{has:c}=U(o),l=t?ee:e?O: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&&d(le(i),"iterate",N),i.size},has(i){let s=this.__v_raw,o=le(s),a=le(i);if(!e){if(y(i,a))d(o,"has",i);d(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=le(a),l=t?ee:e?O:v;return!e&&d(c,"iterate",N),a.forEach((u,p)=>i.call(s,l(u),l(p),o))}};return V(n,e?{add:K("add"),set:K("set"),delete:K("delete"),clear:K("clear")}:{add(i){let s=le(this),o=U(s),a=le(i),c=!t&&!T(i)&&!S(i)?a:i;if(!(o.has.call(s,c)||y(i,c)&&o.has.call(s,i)||y(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=le(s);let o=le(this),{has:a,get:c}=U(o),l=a.call(o,i);if(!l)i=le(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(y(s,u))w(o,"set",i,s,u);return this},delete(i){let s=le(this),{has:o,get:a}=U(s),c=o.call(s,i);if(!c)i=le(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=le(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]=Xe(i,e,t)}),n}function ce(e,t){let n=Je(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(F(n,i)&&i in r?n:r,i,s)}}var Ze={get:ce(!1,!1)},Qe={get:ce(!1,!0)},et={get:ce(!0,!1)};var Ce=new WeakMap,ke=new WeakMap,Ie=new WeakMap,tt=new WeakMap;function nt(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function b(e){if(S(e))return e;return fe(e,!1,Be,Ze,Ce)}function Gy(e){return fe(e,!1,qe,Qe,ke)}function W(e){return fe(e,!0,$e,et,Ie)}function fe(e,t,n,r,i){if(!x(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=nt(he(e));if(o===0)return e;let a=new Proxy(e,o===2?r:n);return i.set(e,a),a}function Jy(e){if(S(e))return Jy(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 it(e){return e?!!e.__v_raw:!1}function le(e){let t=e&&e.__v_raw;return t?le(t):e}var v=(e)=>x(e)?b(e):e,O=(e)=>x(e)?W(e):e;function Dh(e){return e?e.__v_isRef===!0:!1}function Oh(e){return Le(e,!1)}function Ha(e){return Le(e,!0)}function Le(e,t){if(Dh(e))return e;return new Me(e,t)}class Me{constructor(e,t){this.dep=new G,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:le(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:le(e),y(e,t))this._rawValue=e,this._value=n?e:v(e),this.dep.trigger()}}class Pe{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new G(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=M-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 be(this,!0),!0}get value(){let e=this.dep.track();if(Te(this),e)e.version=this.dep.version;return this._value}set value(e){if(this.setter)this.setter(e)}}function Ah(e,t,n=!1){let r,i;if(ue(e))r=e;else r=e.get,i=e.set;return new Pe(r,i,n)}export{me,Ds,te,$o,Lo,R1,b,Gy,Jy,le,Dh,Oh,Ha,Ah};
1
+ function Y(e){let t=Object.create(null);for(let n of e.split(","))t[n]=1;return(n)=>(n in t)}var V=Object.assign;var Ve=Object.prototype.hasOwnProperty,F=(e,t)=>Ve.call(e,t),A=Array.isArray,C=(e)=>pe(e)==="[object Map]";var ue=(e)=>typeof e==="function",Fe=(e)=>typeof e==="string",R=(e)=>typeof e==="symbol",x=(e)=>e!==null&&typeof e==="object";var je=Object.prototype.toString,pe=(e)=>je.call(e),he=(e)=>pe(e).slice(8,-1);var j=(e)=>Fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var H=(e)=>{let t=Object.create(null);return(n)=>t[n]||(t[n]=e(n))},He=/-\w/g,rt=H((e)=>e.replace(He,(t)=>t.slice(1).toUpperCase())),Ue=/\B([A-Z])/g,st=H((e)=>e.replace(Ue,"-$1").toLowerCase()),de=H((e)=>e.charAt(0).toUpperCase()+e.slice(1)),ot=H((e)=>e?`on${de(e)}`:""),y=(e,t)=>!Object.is(e,t);var Ke="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly";var at=Y(Ke+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var h;class ye{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&&h)if(h.active)this.parent=h,this.index=(h.scopes||(h.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=h;try{return h=this,e()}finally{h=t}}}on(){if(++this._on===1)this.prevScope=h,h=this}off(){if(this._on>0&&--this._on===0){if(h===this)h=this.prevScope;else{let e=h;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 me(e){return new ye(e)}function Os(e,t=!1){if(h)h.cleanups.push(e)}var f;var B=new WeakSet;class z{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,h)if(h.active)h.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,B.has(this))B.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))be(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ge(this),Se(this);let e=f,t=_;f=this,_=!0;try{return this.fn()}finally{we(this),f=e,_=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)re(e);this.deps=this.depsTail=void 0,ge(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)B.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(J(this))this.run()}get dirty(){return J(this)}}var Ee=0,I,L;function be(e,t=!1){if(e.flags|=8,t){e.next=L,L=e;return}e.next=I,I=e}function ne(){Ee++}function ie(){if(--Ee>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(I){let t=I;I=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 Se(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function we(e){let t,n=e.depsTail,r=n;while(r){let i=r.prevDep;if(r.version===-1){if(r===n)n=i;re(r),ze(r)}else t=r;r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}e.deps=t,e.depsTail=n}function J(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Te(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Te(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===M)return;if(e.globalVersion=M,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!J(e)))return;e.flags|=2;let t=e.dep,n=f,r=_;f=e,_=!0;try{Se(e);let i=e.fn(e._value);if(t.version===0||y(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{f=n,_=r,we(e),e.flags&=-3}}function re(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)re(s,!0)}}if(!t&&!--n.sc&&n.map)n.map.delete(n.key)}function ze(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 te(e,t){if(e.effect instanceof z)e=e.effect.fn;let n=new z(e);if(t)V(n,t);try{n.run()}catch(i){throw n.stop(),i}let r=n.run.bind(n);return r.effect=n,r}var _=!0,Ne=[];function Lo(){Ne.push(_),_=!1}function Ro(){let e=Ne.pop();_=e===void 0?!0:e}function F1(e,t=!1){if(f instanceof z)f.cleanup=e}function ge(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=f;f=void 0;try{t()}finally{f=n}}}var M=0;class Oe{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 G{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 Oe(f,this),!f.deps)f.deps=f.depsTail=t;else t.prevDep=f.depsTail,f.depsTail.nextDep=t,f.depsTail=t;Ae(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++,M++,this.notify(e)}notify(e){ne();try{for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{ie()}}}function Ae(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)Ae(r)}let n=e.dep.subs;if(n!==e){if(e.prevSub=n,n)n.nextSub=e}e.dep.subs=e}}var Z=new WeakMap,N=Symbol(""),Q=Symbol(""),P=Symbol("");function d(e,t,n){if(_&&f){let r=Z.get(e);if(!r)Z.set(e,r=new Map);let i=r.get(n);if(!i)r.set(n,i=new G),i.map=r,i.key=n;i.track()}}function w(e,t,n,r,i,s){let o=Z.get(e);if(!o){M++;return}let a=(c)=>{if(c)c.trigger()};if(ne(),t==="clear")o.forEach(a);else{let c=A(e),l=c&&j(n);if(c&&n==="length"){let u=Number(r);o.forEach((p,g)=>{if(g==="length"||g===P||!R(g)&&g>=u)a(p)})}else{if(n!==void 0||o.has(void 0))a(o.get(n));if(l)a(o.get(P));switch(t){case"add":if(!c){if(a(o.get(N)),C(e))a(o.get(Q))}else if(l)a(o.get("length"));break;case"delete":if(!c){if(a(o.get(N)),C(e))a(o.get(Q))}break;case"set":if(C(e))a(o.get(N));break}}}ie()}function D(e){let t=le(e);if(t===e)return t;if(d(t,"iterate",P),T(e))return t;if(!S(e))return t.map(v);return ev(e)?t.map((n)=>O(v(n))):t.map(O)}function se(e){return d(e=le(e),"iterate",P),e}function m(e,t){if(S(e))return ev(e)?O(v(t)):O(t);return v(t)}var We={__proto__:null,[Symbol.iterator](){return q(this,Symbol.iterator,(e)=>m(this,e))},concat(...e){return D(this).concat(...e.map((t)=>A(t)?D(t):t))},entries(){return q(this,"entries",(e)=>(e[1]=m(this,e[1]),e))},every(e,t){return E(this,"every",e,t,void 0,arguments)},filter(e,t){return E(this,"filter",e,t,(n)=>n.map((r)=>m(this,r)),arguments)},find(e,t){return E(this,"find",e,t,(n)=>m(this,n),arguments)},findIndex(e,t){return E(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return E(this,"findLast",e,t,(n)=>m(this,n),arguments)},findLastIndex(e,t){return E(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return E(this,"forEach",e,t,void 0,arguments)},includes(...e){return X(this,"includes",e)},indexOf(...e){return X(this,"indexOf",e)},join(e){return D(this).join(e)},lastIndexOf(...e){return X(this,"lastIndexOf",e)},map(e,t){return E(this,"map",e,t,void 0,arguments)},pop(){return k(this,"pop")},push(...e){return k(this,"push",e)},reduce(e,...t){return ve(this,"reduce",e,t)},reduceRight(e,...t){return ve(this,"reduceRight",e,t)},shift(){return k(this,"shift")},some(e,t){return E(this,"some",e,t,void 0,arguments)},splice(...e){return k(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 k(this,"unshift",e)},values(){return q(this,"values",(e)=>m(this,e))}};function q(e,t,n){let r=se(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=()=>_e(s.next(),n),i!==Re[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=()=>_e(s._next(),n)}return s}function _e(e,t){if(!e.done)e.value=t(e.value);return e}var Re=Array.prototype;function E(e,t,n,r,i,s){let o=se(e),a=o!==e&&!T(e),c=o[t];if(c!==Re[t]){let p=c.apply(e,s);return a?v(p):p}let l=n;if(o!==e){if(a)l=function(p,g){return n.call(this,m(e,p),g,e)};else if(n.length>2)l=function(p,g){return n.call(this,p,g,e)}}let u=c.call(o,l,r);return a&&i?i(u):u}function ve(e,t,n,r){let i=se(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=m(e,l);return n.call(this,l,m(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?m(e,c):c}function X(e,t,n){let r=le(e);d(r,"iterate",P);let i=r[t](...n);if((i===-1||i===!1)&&it(n[0]))return n[0]=le(n[0]),r[t](...n);return i}function k(e,t,n=[]){Lo(),ne();let r=le(e)[t].apply(e,n);return ie(),Ro(),r}var Ge=Y("__proto__,__v_isRef,__isVue"),xe=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(R));function Ye(e){if(!R(e))e=String(e);let t=le(this);return d(t,"has",e),t.hasOwnProperty(e)}class oe{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?tt:Ie:i?ke:Ce).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n))return e;return}let s=A(e);if(!r){let a;if(s&&(a=We[t]))return a;if(t==="hasOwnProperty")return Ye}let o=Reflect.get(e,t,Ph(e)?e:n);if(R(t)?xe.has(t):Ge(t))return o;if(!r)d(e,"get",t);if(i)return o;if(Ph(o)){let a=s&&j(t)?o:o.value;return r&&x(a)?W(a):a}if(x(o))return r?W(o):b(o);return o}}class ae extends oe{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],s=A(e)&&j(t);if(!this._isShallow){let c=S(i);if(!T(n)&&!S(n))i=le(i),n=le(n);if(!s&&Ph(i)&&!Ph(n))if(c)return!0;else return i.value=n,!0}let o=s?Number(t)<e.length:F(e,t),a=Reflect.set(e,t,n,Ph(e)?e:r);if(e===le(r)&&a){if(!o)w(e,"add",t,n);else if(y(n,i))w(e,"set",t,n,i)}return a}deleteProperty(e,t){let n=F(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(!R(t)||!xe.has(t))d(e,"has",t);return n}ownKeys(e){return d(e,"iterate",A(e)?"length":N),Reflect.ownKeys(e)}}class De extends oe{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}var Be=new ae,$e=new De,qe=new ae(!0);var ee=(e)=>e,U=(e)=>Reflect.getPrototypeOf(e);function Xe(e,t,n){return function(...r){let i=this.__v_raw,s=le(i),o=C(s),a=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,l=i[e](...r),u=n?ee:t?O:v;return!t&&d(s,"iterate",c?Q:N),V(Object.create(l),{next(){let{value:p,done:g}=l.next();return g?{value:p,done:g}:{value:a?[u(p[0]),u(p[1])]:u(p),done:g}}})}}function K(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Je(e,t){let n={get(i){let s=this.__v_raw,o=le(s),a=le(i);if(!e){if(y(i,a))d(o,"get",i);d(o,"get",a)}let{has:c}=U(o),l=t?ee:e?O: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&&d(le(i),"iterate",N),i.size},has(i){let s=this.__v_raw,o=le(s),a=le(i);if(!e){if(y(i,a))d(o,"has",i);d(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=le(a),l=t?ee:e?O:v;return!e&&d(c,"iterate",N),a.forEach((u,p)=>i.call(s,l(u),l(p),o))}};return V(n,e?{add:K("add"),set:K("set"),delete:K("delete"),clear:K("clear")}:{add(i){let s=le(this),o=U(s),a=le(i),c=!t&&!T(i)&&!S(i)?a:i;if(!(o.has.call(s,c)||y(i,c)&&o.has.call(s,i)||y(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=le(s);let o=le(this),{has:a,get:c}=U(o),l=a.call(o,i);if(!l)i=le(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(y(s,u))w(o,"set",i,s,u);return this},delete(i){let s=le(this),{has:o,get:a}=U(s),c=o.call(s,i);if(!c)i=le(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=le(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]=Xe(i,e,t)}),n}function ce(e,t){let n=Je(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(F(n,i)&&i in r?n:r,i,s)}}var Ze={get:ce(!1,!1)},Qe={get:ce(!1,!0)},et={get:ce(!0,!1)};var Ce=new WeakMap,ke=new WeakMap,Ie=new WeakMap,tt=new WeakMap;function nt(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function b(e){if(S(e))return e;return fe(e,!1,Be,Ze,Ce)}function Qy(e){return fe(e,!1,qe,Qe,ke)}function W(e){return fe(e,!0,$e,et,Ie)}function fe(e,t,n,r,i){if(!x(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=nt(he(e));if(o===0)return e;let a=new Proxy(e,o===2?r:n);return i.set(e,a),a}function ev(e){if(S(e))return ev(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 it(e){return e?!!e.__v_raw:!1}function le(e){let t=e&&e.__v_raw;return t?le(t):e}var v=(e)=>x(e)?b(e):e,O=(e)=>x(e)?W(e):e;function Ph(e){return e?e.__v_isRef===!0:!1}function Mh(e){return Le(e,!1)}function Va(e){return Le(e,!0)}function Le(e,t){if(Ph(e))return e;return new Me(e,t)}class Me{constructor(e,t){this.dep=new G,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:le(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:le(e),y(e,t))this._rawValue=e,this._value=n?e:v(e),this.dep.trigger()}}class Pe{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new G(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=M-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 be(this,!0),!0}get value(){let e=this.dep.track();if(Te(this),e)e.version=this.dep.version;return this._value}set value(e){if(this.setter)this.setter(e)}}function Fh(e,t,n=!1){let r,i;if(ue(e))r=e;else r=e.get,i=e.set;return new Pe(r,i,n)}export{me,Os,te,Lo,Ro,F1,b,Qy,ev,le,Ph,Mh,Va,Fh};
2
2
 
3
- //# debugId=B96B950E031C715664756E2164756E21
4
- //# sourceMappingURL=studio-9f5vcb4w.js.map
3
+ //# debugId=C33C3711B27E817F64756E2164756E21
4
+ //# sourceMappingURL=studio-y3tjh2xb.js.map
@@ -0,0 +1,5 @@
1
+ import{ft}from"./studio-zbwr6prc.js";import{qo}from"./studio-y2zsnzye.js";import{uL,ml,ry}from"./studio-m25ry0mf.js";import{p,we}from"./studio-1b79rpcb.js";import{ln,Aa,X,Co,Xp,h}from"./studio-ybkd5w8k.js";import{Wy}from"./studio-hf259xzd.js";import{Ud,ea,io}from"./studio-jj9gf1qc.js";import{De,Nx,Ra,Jc}from"./studio-mrb10hv3.js";import{it}from"./studio-yetr4gg1.js";import{ei}from"./studio-0nb57pjg.js";import{jb}from"./studio-qcc5hsw2.js";import{Gu}from"./studio-fe2d1fp5.js";import{vw,qN,bb,Nd,JN,KN,UE,ww,xw}from"./studio-kpx02gaa.js";import{Rw,Iw,Cp}from"./studio-6w8mt734.js";import{Em}from"./studio-z89e6wpg.js";import{x,wn}from"./studio-anc8067x.js";import{E,I}from"./studio-xxttcym1.js";import{b}from"./studio-y3tjh2xb.js";import{Ni}from"./studio-213pyfxh.js";import{n,J,f}from"./studio-0z8kp4xk.js";import{ce}from"./studio-nhpg405j.js";var Z=new Map([["img","src"],["source","src"],["video","poster"]]);function ee(e,t,a=De){if(!e||t!=="image")return{mode:"insert"};let r=Z.get(e.tagName);if(r)return{attr:r,mode:"replace-attr",path:e.path};if(e.tagName.includes("-")){let s=(a.find((l)=>l.tagName===e.tagName)?.props??[]).filter((l)=>Aa(l.format));if(s.length===1)return{mode:"replace-prop",path:e.path,prop:s[0].name}}return{mode:"insert"}}function F(e){switch(e.kind){case"image":return{attributes:{src:e.ref},tagName:"img"};case"video":return{attributes:{controls:"",src:e.ref},tagName:"video"};case"audio":return{attributes:{controls:"",src:e.ref},tagName:"audio"};default:return{attributes:{href:e.ref},tagName:"a",textContent:e.name}}}function te(e,t){let a=[...e.targetPath],r=a.at(-1);if(t===0||!J(r))return a;return a[a.length-1]=r+t,a}async function AN(e,t,a,r){if(!e||t.length===0)return;let o=await ea(t),[s]=o;if(!s)return;let l=ee(a,s.kind);if(l.mode==="replace-attr"){X(e,(m)=>Co(m,l.path,l.attr,s.ref));return}if(l.mode==="replace-prop"){X(e,(m)=>Xp(m,l.path,l.prop,s.ref));return}for(let[m,i]of o.entries()){let u={fragment:F(i),type:"block"};if(r)ry(e,{type:r.instruction},u,te(r,m));else ry(e,{type:"make-child"},u,[])}}var O={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSitePanel",$description:"The Site panel (specs/studio.md §5.7): the project as an author thinks of it, pages by address and then the parts pages are made of. Four sections under a header holding one filter and a + that opens Add new (`file.new`, §9.1.1). `panels/site-panel.ts` keeps every decision: which files are pages, the route order and nesting (`panels/site-model.ts`, over `@jxsuite/site/routes`), how many entries a collection has and how many pages use a template, which media the project holds (the Media section is a short strip of the first few, and the rest are one click away in Media), what a click opens and what a drag inserts. This document draws rows whose every field is already a string, and a section state that is one of loading, empty, nomatch or listed, so a section a filter empties keeps its heading and says why. Component previews are an island the flow fills, and the drag sources are registered by the adapter through `onNodeCreated`.",tagName:"div",attributes:{part:"site"},style:{$description:"The Site panel's own look, keyed on `part`. Rows are native buttons, because a row opens one thing and a button is the element that says so to every reader; the selected row is the one whose `data-selected` is true, which the flow sets from the focused pane's document. A collection heading is not a button: it opens nothing in Design, and its pages are the buttons under it, indented one step. Component cards and media thumbnails are drag sources as well as buttons; the adapter registers the drags through `onNodeCreated`, so nothing here names a drag.",display:"flex",flexDirection:"column",height:"100%",minHeight:"0",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="header"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"var(--jx-space-2)",borderBottom:"1px solid var(--border)",flexShrink:"0"},'& [part="filter"]':{flex:"1",minWidth:"0"},'& [part="sections"]':{flex:"1",minHeight:"0",overflowY:"auto",padding:"var(--jx-space-1) 0 var(--jx-space-4)"},'& [part="section"]':{padding:"var(--jx-space-2) 0"},'& [part="section-head"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"0 var(--jx-space-3) var(--jx-space-1)"},'& [part="section-title"]':{margin:"0",fontSize:"var(--jx-text-sm)",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg-dim)"},'& [part="section-count"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="open-media"]':{marginLeft:"auto"},'& [part="no-project"]':{margin:"0",padding:"var(--jx-space-6) var(--jx-space-4)",textAlign:"center",lineHeight:"1.5",color:"var(--fg-dim)"},'& [part="note"]':{margin:"0",padding:"var(--jx-space-1) var(--jx-space-3)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="rows"]':{display:"flex",flexDirection:"column"},'& [part="page-row"], & [part="template-row"], & [part="collection-row"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",width:"100%",boxSizing:"border-box",minHeight:"26px",padding:"var(--jx-space-1) var(--jx-space-3)",border:"none",background:"transparent",color:"inherit",font:"inherit",textAlign:"start"},'& [part="page-row"], & [part="template-row"]':{cursor:"pointer",":hover":{background:"var(--hover-bg)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"}},'& [part="page-row"][data-nested="true"]':{paddingLeft:"calc(var(--jx-space-3) + var(--jx-space-4))"},'& [data-selected="true"]':{background:"var(--accent-15)",color:"var(--fg)"},'& [part="collection-row"]':{color:"var(--fg-dim)"},'& [part="row-label"]':{flex:"1",minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="row-detail"]':{flexShrink:"0",maxWidth:"55%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="cards"]':{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(96px, 1fr))",gap:"var(--jx-space-2)",padding:"0 var(--jx-space-3)"},'& [part="component-card"]':{display:"flex",flexDirection:"column",width:"100%",padding:"0",overflow:"hidden",border:"1px solid var(--border)",borderRadius:"var(--jx-radius-md)",background:"var(--bg-panel)",color:"inherit",font:"inherit",cursor:"grab",":hover":{borderColor:"var(--fg-dim)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"1px"}},'& [part="card-preview"]':{$description:"A live render on the light document surface the Insert panel's element cards use (`--canvas-*` does not follow the theme, because what is drawn here is a page's part, and a site's dark text on the dark chrome read as an empty black box). It is drawn at half size, so a component laid out for a page shows its face rather than a clipped corner of one oversized glyph. The render is in the island's own shadow root (`mountPreview` in `browse/library-preview.ts`), so no rule here can reach its elements: the half size is the island's `zoom`, which lays the render out twice as wide and draws it at half, and the 128px height is the 64px box at that zoom. The broken-image rule went into the root with it.",position:"relative",height:"128px",zoom:"0.5",overflow:"hidden",pointerEvents:"none",background:"white",color:"var(--canvas-fg-2)",fontSize:"var(--jx-text-md)"},'& [part="card-label"]':{padding:"var(--jx-space-1) var(--jx-space-2)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--jx-text-sm)",textAlign:"start"},'& [part="thumbs"]':{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(56px, 1fr))",gap:"var(--jx-space-1)",padding:"0 var(--jx-space-3)"},'& [part="media-strip"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="media-more"]':{alignSelf:"flex-start",marginInline:"var(--jx-space-3)"},'& [part="media-thumb"]':{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",aspectRatio:"1",padding:"0",overflow:"hidden",border:"1px solid var(--border)",borderRadius:"var(--jx-radius-sm)",background:"var(--bg-panel)",color:"var(--fg-dim)",font:"inherit",cursor:"grab",":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"1px"}},'& [part="thumb-image"]':{width:"100%",height:"100%",objectFit:"cover"},'& [part="thumb-name"]':{padding:"var(--jx-space-1)",overflow:"hidden",fontSize:"var(--jx-text-xs)",wordBreak:"break-all"}},children:[{tagName:"div",attributes:{part:"header"},children:[{tagName:"jx-textfield",attributes:{part:"filter"},$props:{size:"sm",type:"search",clearable:!0,label:"Filter the site",placeholder:"Filter the site…",value:{$ref:"#/state/filter"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setFilter"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",attributes:{part:"add"},$props:{size:"sm",icon:"plus",label:"Add new",hint:"Add new",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/add"},value:[]}]}}]},{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/body"},cases:{none:{tagName:"p",attributes:{part:"no-project"},textContent:"Open a project to see its pages, templates, components and media."},project:{tagName:"div",attributes:{part:"sections"},children:[{tagName:"section",attributes:{part:"section","data-section":"pages","aria-labelledby":"site-section-pages"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"site-section-pages"},textContent:"Pages"},{tagName:"span",attributes:{part:"section-count"},textContent:"${state.pagesCount}"}]},{tagName:"div",attributes:{part:"section-body",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/pagesState"},cases:{loading:{tagName:"p",attributes:{part:"note"},textContent:"Reading the project…"},empty:{tagName:"p",attributes:{part:"note"},textContent:"No pages yet. Add one with +."},nomatch:{tagName:"p",attributes:{part:"note"},textContent:"Nothing here matches the filter."},listed:{tagName:"div",attributes:{part:"rows",role:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/pages"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"page-item",role:"listitem","data-kind":"${$map.item.kind}"},$switch:{$ref:"$map/item/kind"},cases:{collection:{tagName:"div",attributes:{part:"collection-row"},children:[{tagName:"span",attributes:{part:"row-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"row-detail"},textContent:"${$map.item.detail}"}]},page:{tagName:"button",attributes:{part:"page-row",type:"button","data-path":"${$map.item.path}","data-selected":"${$map.item.selected}","aria-current":"${$map.item.selected === 'true' ? 'true' : null}",title:"${$map.item.path}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/path"}]}]},children:[{tagName:"span",attributes:{part:"row-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"row-detail"},textContent:"${$map.item.detail}"}]},"entry-page":{tagName:"button",attributes:{part:"page-row",type:"button","data-path":"${$map.item.path}","data-selected":"${$map.item.selected}","aria-current":"${$map.item.selected === 'true' ? 'true' : null}",title:"${$map.item.path}","data-nested":"true"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/path"}]}]},children:[{tagName:"span",attributes:{part:"row-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"row-detail"},textContent:"${$map.item.detail}"}]}}}}]}}}]},{tagName:"section",attributes:{part:"section","data-section":"templates","aria-labelledby":"site-section-templates"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"site-section-templates"},textContent:"Templates"},{tagName:"span",attributes:{part:"section-count"},textContent:"${state.templatesCount}"}]},{tagName:"div",attributes:{part:"section-body",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/templatesState"},cases:{loading:{tagName:"p",attributes:{part:"note"},textContent:"Reading the project…"},empty:{tagName:"p",attributes:{part:"note"},textContent:"No templates in layouts/ yet."},nomatch:{tagName:"p",attributes:{part:"note"},textContent:"Nothing here matches the filter."},listed:{tagName:"div",attributes:{part:"rows",role:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/templates"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"template-item",role:"listitem"},children:[{tagName:"button",attributes:{part:"template-row",type:"button","data-path":"${$map.item.path}","data-selected":"${$map.item.selected}","aria-current":"${$map.item.selected === 'true' ? 'true' : null}",title:"${$map.item.path}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/path"}]}]},children:[{tagName:"span",attributes:{part:"row-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"row-detail"},textContent:"${$map.item.detail}"}]}]}}]}}}]},{tagName:"section",attributes:{part:"section","data-section":"components","aria-labelledby":"site-section-components"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"site-section-components"},textContent:"Components"},{tagName:"span",attributes:{part:"section-count"},textContent:"${state.componentsCount}"}]},{tagName:"div",attributes:{part:"section-body",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/componentsState"},cases:{loading:{tagName:"p",attributes:{part:"note"},textContent:"Reading the project…"},empty:{tagName:"p",attributes:{part:"note"},textContent:"No components yet."},nomatch:{tagName:"p",attributes:{part:"note"},textContent:"Nothing here matches the filter."},listed:{tagName:"div",attributes:{part:"cards",role:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/components"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"card-item",role:"listitem"},children:[{tagName:"button",attributes:{part:"component-card",type:"button","data-tag":"${$map.item.tagName}","data-selected":"${$map.item.selected}","aria-current":"${$map.item.selected === 'true' ? 'true' : null}",title:"${$map.item.hint}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openComponent"},value:[{$ref:"$map/item/tagName"}]}]},children:[{$description:'The preview ISLAND: empty here, filled by the flow with the component rendered live from the Library\'s preview cache as the card scrolls into view (specs/studio-ui-guidelines.md §9.4). It is `inert`, not merely `aria-hidden`: a component\'s own links and buttons stay focusable under `aria-hidden`, and Chrome then counts their text into the card\'s name ("Contact Us Today Eer cta", "◀ ▶ Eer reviews"). Inert takes the render out of the accessibility tree, the tab order and the pointer at once, so the card is named by its label alone.',tagName:"div",attributes:{part:"card-preview",inert:""}},{tagName:"span",attributes:{part:"card-label"},textContent:"${$map.item.label}"}]}]}}]}}}]},{tagName:"section",attributes:{part:"section","data-section":"media","aria-labelledby":"site-section-media"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"site-section-media"},textContent:"Media"},{tagName:"span",attributes:{part:"section-count"},textContent:"${state.mediaCount}"},{tagName:"jx-button",attributes:{part:"open-media"},$props:{size:"sm",variant:"secondary",quiet:!0},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openMedia"},value:[]}]},children:[{tagName:"span",textContent:"Open Media"}]}]},{tagName:"div",attributes:{part:"section-body",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/mediaState"},cases:{loading:{tagName:"p",attributes:{part:"note"},textContent:"Reading the project…"},empty:{tagName:"p",attributes:{part:"note"},textContent:"No media in public/ yet."},nomatch:{tagName:"p",attributes:{part:"note"},textContent:"Nothing here matches the filter."},listed:{tagName:"div",attributes:{part:"media-strip"},children:[{tagName:"div",attributes:{part:"thumbs",role:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/media"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"thumb-item",role:"listitem"},children:[{tagName:"button",attributes:{part:"media-thumb",type:"button","data-path":"${$map.item.path}","data-selected":"${$map.item.selected}","aria-current":"${$map.item.selected === 'true' ? 'true' : null}",title:"Open ${$map.item.name} in Media, or drag it onto the canvas","aria-label":"${$map.item.name}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/path"}]}]},children:[{tagName:"span",attributes:{part:"thumb-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/thumb"},cases:{image:{tagName:"img",attributes:{part:"thumb-image",src:"${$map.item.src}",alt:"",loading:"lazy",draggable:"false"}},file:{tagName:"span",attributes:{part:"thumb-name"},textContent:"${$map.item.name}"}}}]}]}}]},{tagName:"jx-button",attributes:{part:"media-more",hidden:"${state.mediaMore === '' ? '' : null}"},$props:{size:"sm",variant:"secondary",quiet:!0},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openMedia"},value:[]}]},children:[{tagName:"span",textContent:"${state.mediaMore}"}]}]}}}]}]}}}]};E("site-panel",O);function A(){return{body:"none",components:[],componentsCount:"",componentsState:"loading",filter:"",media:[],mediaCount:"",mediaMore:"",mediaState:"loading",pages:[],pagesCount:"",pagesState:"loading",templates:[],templatesCount:"",templatesState:"loading"}}function z(e,t){e.body=t.body,e.filter=t.filter,e.pages=t.pages,e.pagesState=t.pagesState,e.pagesCount=t.pagesCount,e.templates=t.templates,e.templatesState=t.templatesState,e.templatesCount=t.templatesCount,e.components=t.components,e.componentsState=t.componentsState,e.componentsCount=t.componentsCount,e.media=t.media,e.mediaState=t.mediaState,e.mediaCount=t.mediaCount,e.mediaMore=t.mediaMore}function ne(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function re(e){let t=e?.$map,a=f(t)?t.item:void 0;return f(a)?a:null}function R(e,t){let a=re(e)?.[t];return n(a)?a:""}function _(e,t,a,r){let o=b({...A(),...a});z(o,t);let s=null,l=!1,m=I("site-panel",o,e,{onNodeCreated:(i,u,P,g)=>{if(l||!(i instanceof HTMLElement))return;switch(ne(P)){case"card-preview":{let d=R(g,"tagName");if(d!=="")r.preview(i,d);break}case"component-card":{let d=R(g,"tagName");if(d!=="")r.componentSource(i,d);break}case"media-thumb":{let d=R(g,"path");if(d!=="")r.mediaSource(i,d);break}default:break}}}).then((i)=>{if(l)return i.dispose(),i;return s=i,i});return{connected:()=>!l&&(s===null||s.root.parentNode===e),dispose(){l=!0,s?.dispose(),s=null},ready:m,update:(i)=>{z(o,i)}}}var N=null,D=!1,w=null,y=0;function ie(){return Object.keys(x?.projectConfig?.content??{})}async function oe(e){return(await uL(e)).contentType}async function se(e){let[t,a]=await Promise.all([Em(["pages","layouts"],p()),Wy()]),r=t.files.filter((i)=>i.path.startsWith("pages/")),o=await Promise.all(r.map(async(i)=>({contentType:i.path.includes("[")?await oe(i.path):null,path:i.path})));if(e!==y)return;let s=N?.collections,l=new Map(ie().map((i)=>[i,s?.get(i)??null]));D=!1,N={collections:l,layouts:t.files.flatMap((i)=>i.path.startsWith("layouts/")?[i.path]:[]),pageExtensions:a,pages:o},C();let m=new Set(o.flatMap((i)=>i.contentType&&l.has(i.contentType)?[i.contentType]:[]));if(await Promise.all([...m].map(async(i)=>{let u=await jb(i).catch(()=>null);if(e===y&&u)l.set(i,u.length)})),e===y)C()}function le(){if((!N||D)&&!w&&we()&&x){let e=y;w=se(e).finally(()=>{if(e===y)w=null})}return N}function hb(e){if(y+=1,D=!0,w=null,e===void 0||e.some((t)=>me(t)))T=!0;if(c)C()}var pe=["pages/","layouts/","content/","public/"];function me(e){if(e.startsWith("components/"))return!0;return e.endsWith(".json")&&!Ni(e)&&!pe.some((t)=>e.startsWith(t))}var T=!1,M=!1;function de(){if(M||Nx&&!T||!we())return;M=!0,T=!1,Ra().finally(()=>{M=!1,C()})}function V(e,t){return De.flatMap((a)=>{let r=Nd(a.tagName),o=`<${a.tagName}>`,s=L(a);if(!bb(e,a.tagName,s??"",a.package??""))return[];return[{hint:s?`Open ${o}, or drag it onto the canvas`:`${o} from ${a.package??"a package"}: open Packages, or drag it onto the canvas`,key:a.tagName,label:r,path:s??"",selected:vw(s!==null&&s===t),tagName:a.tagName}]})}function L(e){return e?.path!==void 0&&e.source!=="npm"?e.path:null}var W=8;function ue(e,t){return e>t?`Show all ${e} in Media`:""}function B(e,t,a){return e.flatMap((r)=>bb(t,r.name,r.file)?[{key:r.file,name:r.name,path:r.file,selected:vw(r.file===a),src:r.isImage?io(r.file):"",thumb:r.isImage?"image":"file"}]:[])}function ge(){let e=x?.projectConfig?.defaults?.layout;return n(e)?e.replace(/^\.\//,""):null}var S="";function j(e,t,a){if(e)return"loading";if(t===0)return"empty";return a===0?"nomatch":"listed"}function k(e,t,a){if(a||e===0)return"";return t===e?String(e):`${t} of ${e}`}function U(){if(!x)return{...A(),filter:S};let e=qN(S),t=h.value?.documentPath??null,a=le();de();let r=Gu(),o=a?JN(a.pages,a.collections,t,{extensions:a.pageExtensions,i18n:ln(x.projectConfig??{}).i18n}):[],s=KN(o,e),l=ge(),m=a?UE(a.layouts,t,"",l):[],i=a?UE(a.layouts,t,e,l):[],u=!Nx,P=V("",t),g=V(e,t),d=r?B(r,"",t):[],v=r?B(r,e,t):[],H=(Y)=>Y.filter((Q)=>Q.kind!=="collection").length;return{body:"project",components:g,componentsCount:k(P.length,g.length,u),componentsState:j(u,P.length,g.length),filter:S,media:v.slice(0,W),mediaCount:k(d.length,v.length,r===null),mediaMore:ue(v.length,Math.min(v.length,W)),mediaState:j(r===null,d.length,v.length),pages:s,pagesCount:k(H(o),H(s),a===null),pagesState:j(a===null,o.length,s.length),templates:i,templatesCount:k(m.length,i.length,a===null),templatesState:j(a===null,m.length,i.length)}}function q(e){(ce("8pf70854"),import("./files-8pf70854.js")).then(({openFileInTab:t})=>t(e))}var fe={add:()=>{it("file.new",{},"Site panel")},open:q,openComponent:(e)=>{let t=De.find((r)=>r.tagName===e);if(!t)return;let a=L(t);if(a){q(a);return}it("view.setActivity",{tab:"packages"},"Site panel")},openMedia:()=>{it("view.setWorkspace",{workspace:"media"},"Site panel")},setFilter:(e)=>{S=e,C()}},c=null;async function he(e,t,a){let r=await Iw(a,e.cache);if(r&&c===e&&t.isConnected&&!xw(t))ww(t,r)}function G(e,t,a){let r=qo({element:t,getInitialData:()=>a()??{},onGenerateDragPreview:({nativeSetDragImage:o})=>{ml({nativeSetDragImage:o})}});e.sources.set(t,r)}function be(e){for(let[t,a]of e.sources)if(!t.isConnected)a(),e.sources.delete(t);e.observer.releaseDetached()}function K(e){e.handle?.dispose();for(let t of e.sources.values())t();e.sources.clear(),e.observer.destroy(),e.cache.clear()}function ye(e){let t=De.find((a)=>a.tagName===e);return t?{fragment:Jc(t),type:"block"}:null}function ve(e){let t=Gu()?.find((r)=>r.file===e);if(!t)return null;return{fragment:F({kind:Ud({name:t.name}),name:t.name,path:t.file,ref:t.ref}),type:"block"}}function xe(e){if(c&&(c.host!==e||c.handle?.connected()===!1))K(c),c=null;if(c){c.handle?.update(U()),be(c);return}let t=new Map,a={cache:Rw(),handle:null,host:e,observer:Cp((r)=>{let o=r instanceof HTMLElement?t.get(r):void 0;if(o!==void 0&&r instanceof HTMLElement)t.delete(r),he(a,r,o)}),pending:t,sources:new Map};c=a,a.handle=_(e,U(),fe,{componentSource:(r,o)=>{G(a,r,()=>ye(o))},mediaSource:(r,o)=>{G(a,r,()=>ve(o))},preview:(r,o)=>{let s=L(De.find((l)=>l.tagName===o));if(s)t.set(r,s),a.observer.observe(r)}})}function C(){wn("leftPanel")}function Se(e){return e.querySelector(".panel-content")??e}function PN(){ei({id:"site",title:"Site",level:"project",dock:"navigator",icon:"browser",render:()=>ft,afterRender:(e,t)=>{xe(Se(t))}})}function MN(){if(c)K(c);c=null,S="",y+=1,N=null,D=!1,w=null,T=!0,M=!1}
2
+ export{AN,hb,PN,MN};
3
+
4
+ //# debugId=C265AC8420826AAF64756E2164756E21
5
+ //# sourceMappingURL=studio-y4f1rdsj.js.map
@@ -0,0 +1,5 @@
1
+ import{w}from"./studio-5k9mfafh.js";import{iu}from"./studio-r85zw6ay.js";import{p}from"./studio-1b79rpcb.js";import{zi,fn,co}from"./studio-hf259xzd.js";import{uI,P1,Rr,RM,R_,hI,pI,fI,Xy}from"./studio-52mzbxqm.js";import{Fy,JR,Eo,x}from"./studio-anc8067x.js";import{Ce,re,Uy,qy,I1,ff,N1,sa,mf,pg,C_}from"./studio-ft706q02.js";import{me,Os,te,b,le,Fh}from"./studio-y3tjh2xb.js";import{da,Ni}from"./studio-213pyfxh.js";import{n,J,qe,S,f,Ir,Di,dd,Ef}from"./studio-0z8kp4xk.js";import{ce}from"./studio-nhpg405j.js";var en=new Set(["Adlm","Arab","Aran","Armi","Avst","Cprt","Egyd","Egyh","Elym","Gara","Hatr","Hebr","Hluw","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogd","Sogo","Syrc","Thaa","Todr","Yezi"]),p1="^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$";function jn(e){if(!n(e)||e.trim()==="")return null;try{return new Intl.Locale(e.trim()).toString()}catch{return null}}function Yx(e){return jn(e)!==null}function Sy(e){let t=jn(e);if(t===null)return"ltr";let o=new Intl.Locale(t),r=o.script??o.maximize().script;return r!==void 0&&en.has(r)?"rtl":"ltr"}function Wt(e){let t=jn(e);if(t===null)return n(e)?e:"";return new Intl.DisplayNames([t],{type:"language"}).of(t)??t}var tn="prefix-except-default";function ln(e){let t=e.i18n,o=[];if(!S(t))return{errors:o,i18n:null};let r=Array.isArray(t.locales)?t.locales:[],i=[];for(let l of r){let c=jn(l);if(c===null){o.push(`i18n.locales: "${String(l)}" is not a well-formed BCP 47 language tag.`);continue}if(!i.includes(c))i.push(c)}let s=jn(t.defaultLocale)??i[0]??null;if(t.defaultLocale!==void 0&&jn(t.defaultLocale)===null)o.push(`i18n.defaultLocale: "${String(t.defaultLocale)}" is not a well-formed BCP 47 language tag.`);if(s===null)return o.push("i18n is declared with no usable locale — set `defaultLocale` or `locales`."),{errors:o,i18n:null};if(!i.includes(s))i.unshift(s);let a=t.routing==="prefix-always"||t.routing==="prefix-except-default"?t.routing:tn;return{errors:o,i18n:{defaultLocale:s,locales:i,routing:a}}}function br(e,t){let o=we(G(e),t);if(o===-1||t===null)return null;return jn(G(e)[o])}function Zx(e,t){let o=br(e,t);if(o!==null||t===null||t.routing!=="prefix-except-default")return o;return G(e)[0]==="pages"?t.defaultLocale:null}function Cy(e,t){let o=G(e),r=we(o,t);return r===-1?o.join("/"):o.filter((i,s)=>s!==r).join("/")}function td(e,t,o){if(o===null)return null;let r=jn(t);if(r===null||!o.locales.includes(r))return null;let i=G(e),s=we(i,o),a=s===-1?nn(i):s;if(a===-1)return null;let l=s===-1?i:i.filter((c,u)=>u!==s);if(r===o.defaultLocale&&o.routing==="prefix-except-default")return l.join("/");return l.toSpliced(a,0,r.toLowerCase()).join("/")}function G(e){return e.replace(/^\.\//,"").split("/").filter(Boolean)}function we(e,t){if(t===null)return-1;return e.findIndex((o)=>{let r=jn(o);return r!==null&&t.locales.includes(r)})}function nn(e){if(e[0]==="pages"&&e.length>1)return 1;if(e[0]==="content"&&e.length>2)return 2;return-1}function fP(e,t){if(t===null)return null;let o=e.split("/").find(Boolean);if(o===void 0)return t.defaultLocale;let r=jn(o);return r!==null&&t.locales.includes(r)?r:t.defaultLocale}var f1=["design","content","media","styles","publish","settings"],Kp="design",Ye=[{icon:"frame-corners",id:"design",switcher:!0,title:"Design"},{icon:"file-text",id:"content",switcher:!0,title:"Content"},{icon:"image",id:"media",switcher:!0,title:"Media"},{icon:"paint-brush",id:"styles",switcher:!0,title:"Styles"},{icon:"paper-plane-tilt",id:"publish",switcher:!0,title:"Publish"},{icon:"gear-six",id:"settings",switcher:!1,title:"Project settings"}],Xx=Ye.filter((e)=>e.switcher);function ER(e){return typeof e==="string"&&f1.some((t)=>t===e)}function vh(e){return Ye.find((t)=>t.id===e)}var Re="workspace://",Qx={content:"content-home",media:"media-home",publish:"publish-home",settings:"settings-home"};function Gp(e){return Object.hasOwn(Qx,e)}function Da(e){return`${Re}${e}`}function vl(e){if(!e.startsWith(Re))return null;let t=e.slice(Re.length);return ER(t)&&Gp(t)?t:null}function ky(e){let t=vl(e);return t?vh(t).title:null}var on=new Map([["design","canvas"],["edit","canvas"],["entry","entry"],["git-diff","diff"],["grid","grid"],["content-home","home"],["media-home","home"],["publish-home","home"],["settings-home","home"],["media","media"],["image","image"],["preview","canvas"],["source","code"],["stylebook","config"],["tokens","tokens"]]),Yp={canvas:"Canvas",code:"Code",config:"Elements",diff:"Diff",entry:"Entry",grid:"Grid",home:"Home",image:"Image",media:"Media",none:"None",tokens:"Variables"};function ia(e){return on.get(e)??"canvas"}var rn=new Map([["design","design"],["edit","edit"],["preview","preview"]]);function mP(e){return rn.get(e)??"design"}var e_=(e)=>e.editor.kind==="canvas",wh=(e)=>e_(e)&&e.selection.count>0,t_=(e)=>wh(e)&&!e.selection.isRoot;function Ey(){return{project:{open:!1,isSite:!1,isRepo:!1,isMultilingual:!1},git:{ahead:0,behind:0,dirtyCount:0},workspace:{id:Kp},document:{open:!1,dirty:!1,mode:"",canUndo:!1,canRedo:!1},editor:{kind:"none"},canvas:{view:"design"},pane:{count:1,derived:!1},selection:{count:0,paths:[],kind:"",isRoot:!1,isComponentInstance:!1,isLayoutNode:!1,isRepeater:!1},caret:{active:!1,inCanvas:!1},focus:{region:"pane"},modal:{open:!1},collab:{attached:!1,readOnly:!1,sourceCanonical:!1},ai:{configured:!1,streaming:!1,waiting:!1},capability:{gitClone:!1,importSite:!1,openProjectInNewWindow:!1,openProject:!1,dataRows:!1,windowControls:!1,findReferences:!1,readFileBytes:!1,publish:!1}}}function m1(e={}){let t=Ey();for(let o of Object.keys(e)){let r=e[o];if(r)Object.assign(t[o],r)}return t}var sn=["palette"],an=["caret","global"],cn=["dock","global"],un=["canvas","global"],dn=["grid","global"],mn=["code","global"],Ze=["global"];function gP(e){if(e.modal.open)return sn;if(e.caret.active)return an;if(e.focus.region!=="pane")return cn;switch(e.editor.kind){case"grid":return dn;case"code":return mn;case"canvas":return e.canvas.view==="preview"?Ze:un;default:return Ze}}var Ae=b(new Set);function Qm(e){Ae.add(e)}function n_(e){Ae.delete(e)}function g1(e){return Ae.has(e)}var TR=()=>({kind:"proceed"});function Ty(e,t){return{success:!0,data:e,summary:t}}function Hn(e){return{success:!1,error:e}}function Ko({name:e,description:t,parameters:o,strict:r=!0,llmStrict:i=!1,interactive:s,title:a,annotations:l,interaction:c,settle:u,execute:d}){let m={name:e,description:t,parameters:o,strict:r,llmStrict:i,execute:d};if(s!==void 0)m.interactive=s;if(a!==void 0)m.title=a;if(l!==void 0)m.annotations=l;if(c!==void 0)m.interaction=c;if(u!==void 0)m.settle=u;return m}function i_(e){let t=[];return{record(o){t.push(o),e?.(o)},writes:t}}function xh(e=null,t={}){let o=new Map(Object.entries(t));return{sessionId:e,get:(r)=>o.get(r),set:(r,i)=>{o.set(r,i)},toJSON:()=>Object.fromEntries(o)}}var gn=new AbortController().signal;function r_(e={}){let t=e.session??xh();return{actor:e.actor??{id:`assistant:${t.sessionId??"local"}:`,kind:"assistant",sessionId:t.sessionId,turnId:""},callId:e.callId??"",ledger:e.ledger??i_(),progress:e.progress??(()=>{}),session:t,signal:e.signal??gn}}function bP(e){let t=new AbortController;if(e.aborted)return t.abort(e.reason),{release:()=>{},signal:t.signal};let o=()=>{t.abort(e.reason)};return e.addEventListener("abort",o,{once:!0}),{release:()=>{e.removeEventListener("abort",o)},signal:t.signal}}function o_(){let e=new Map;return{register(t){if(e.has(t.name))console.warn(`Tool "${t.name}" is being re-registered.`);e.set(t.name,t)},list(){return[...e.values()]},listForLLM(){return[...e.values()].map((t)=>{let o={name:t.name,description:t.description,parameters:t.parameters};if(t.llmStrict===!0)o.strict=!0;return{type:"function",function:o}})},getDefinition(t){return e.get(t)},validate(t,o){let r=e.get(t);if(!r)return{valid:!1,errors:[`Unknown tool: "${t}"`]};if(!r.strict)return{valid:!0};let i=r.parameters;if(!i.properties)return{valid:!0};let s=[],a=i.properties,l=i.required||[];for(let c of l)if(!(c in o)||o[c]===void 0||o[c]===null)s.push(`Missing required argument: "${c}"`);for(let[c,u]of Object.entries(o)){let d=a[c];if(!d)continue;let m=d.type;if(!m)continue;let v=Qe(u);if(m==="number"||m==="integer"){if(Je(u,"number"))continue;if(Je(u,"string")){if(!Number.isNaN(Number(u)))continue;s.push(`Argument "${c}" should be a number, got non-numeric string "${u}"`);continue}s.push(`Argument "${c}" should be a number, got ${v}`);continue}if(m==="string"&&v!=="string")s.push(`Argument "${c}" should be a string, got ${v}`);else if(m==="boolean"&&v!=="boolean")s.push(`Argument "${c}" should be a boolean, got ${v}`);else if(m==="array"&&v!=="array")s.push(`Argument "${c}" should be an array, got ${v}`);else if(m==="object"&&v!=="object")s.push(`Argument "${c}" should be an object, got ${v}`)}return s.length>0?{valid:!1,errors:s}:{valid:!0}},async execute(t,o,r=r_()){let i=e.get(t);if(!i)return Hn(`Unknown tool: "${t}"`);let s=this.validate(t,o);if(!s.valid)return Hn(`Validation failed: ${(s.errors||[]).join("; ")}`);try{return await i.execute(o,r)}catch(a){return Hn(`Tool "${t}" execution error: ${ge(a)}`)}}}}var yn="The author declined this call.";function hn(e){return JSON.parse(JSON.stringify(e))}function ge(e){return e.message}var bn=["string","number","boolean","undefined"];function Je(e,t){return typeof e===t}function Tn(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Qe(e){if(Array.isArray(e))return"array";return bn.find((t)=>Je(e,t))??"object"}function vn(e){if(!e)return{};let t=JSON.parse(e);if(!Tn(t)){let o=t===null?"null":Qe(t);throw TypeError(`arguments must be a JSON object, got ${o}`)}return t}async function $R(e,t,o,{approval:r=TR,response:i}={}){let s=!1,a;try{let l=vn(t.argumentsText),c=e.getDefinition(t.name),u=c?On(e,c,l,r,i):null;if(u?.status==="needs_input")return u;if(u)({result:a}=u);else s=!0,a=await e.execute(t.name,l,o)}catch(l){a=Hn(`Failed to parse arguments: ${ge(l)}`)}try{return{status:"done",result:hn(a),executed:s}}catch(l){let c=ge(l);return{status:"done",result:Hn(`Tool "${t.name}" returned a result that cannot be serialized: ${c}`),executed:s}}}function On(e,t,o,r,i){let{interaction:s,settle:a}=t;if(s&&a){let c=e.validate(t.name,o);if(!c.valid)return pe(`Validation failed: ${(c.errors||[]).join("; ")}`);if(i)return{status:"done",result:Pn(t.name,a,o,i),executed:!1};let u=s(o);return"refusal"in u?pe(u.refusal):{status:"needs_input",request:u}}let l=r(t,o);if(l.kind==="deny")return pe(l.message);if(l.kind==="confirm"){if(!i)return{status:"needs_input",request:{kind:"approval",reason:l.reason,summary:l.summary,title:t.title??t.name,tool:t.name}};if(i.kind!=="approval"||!i.approved)return pe(yn)}return null}function pe(e){return{status:"done",result:Hn(e),executed:!1}}function Pn(e,t,o,r){try{return t(o,r)}catch(i){return Hn(`Tool "${e}" execution error: ${ge(i)}`)}}function DR(e,t){return et(e,"v",t)}function l_(e,t){return et(e,"r",t)}function et(e,t,o){if(!n(o)||o==="")return e;let r=e.indexOf("#"),i=r===-1?"":e.slice(r),s=r===-1?e:e.slice(0,r),a=s.indexOf("?"),l=a===-1?s:s.slice(0,a),u=(a===-1?[]:s.slice(a+1).split("&")).filter((d)=>d!==""&&!Sn(d,t));return u.push(`${t}=${encodeURIComponent(o)}`),`${l}?${u.join("&")}${i}`}function Sn(e,t){let o=e.indexOf("="),r=o===-1?e:e.slice(0,o);if(r===t)return!0;if(!r.includes("%"))return!1;try{return decodeURIComponent(r)===t}catch{return!1}}function Ie(e,t){if(!e||!Object.hasOwn(e,t))return;let o=e[t];return n(o)?o:void 0}function Ry(e,t,o=[]){if(!e||!t)return null;let r=e.replaceAll("\\","/").replace(/^\.\//,""),i=null,s=(a,l)=>{if(r.startsWith(`${a}/`)&&(!i||a.length>i.dir.length))i={dir:a,urlPrefix:l}};for(let[a,l]of Object.entries(t)){if(!l?.source||!P1.test(a))continue;let c=Cn(l.source);if(c===""||c.startsWith(".."))continue;if(c.includes(Rr)){let u=wn(r,c,a,o);if(u)s(u.dir,u.urlPrefix);continue}if(/\.[a-z0-9]+$/i.test(c))continue;s(c,`/${uI}/${a}`)}return i}function wn(e,t,o,r){let i=t.indexOf(Rr),s=t.slice(0,i),a=t.slice(i+Rr.length);if(!e.startsWith(s))return null;let l=e.slice(s.length).split("/")[0]??"";if(l===""||!P1.test(l))return null;let c=r.find((d)=>d.toLowerCase()===l.toLowerCase());if(c===void 0||!P1.test(c))return null;return{dir:`${s}${l}${a}`.replace(/\/+$/,""),urlPrefix:`/${uI}/${o}/${c}`}}function Cn(e){return e.replaceAll("\\","/").replace(/^\.\//,"").replace(/\/+$/,"")}function Iy(e,t){if(!t||e==="")return null;if(t.space==="repo"){if(!t.fileBaseUrl)return null;let s=fI(e,t.documentDir,t.mounts,t.lanes);if(s===null)return null;let{suffix:a}=R_(e);return l_(DR(`${t.fileBaseUrl}${Xy(s)}${a}`,Ie(t.versions,s)),Ie(t.revisions,s))}let[o]=t.mounts,r=o?An(e,t.documentDir,o):null,i=Rn(e,t);return i===void 0?r:l_(r??e,i)}function Rn(e,t){if(!t.revisions||Object.keys(t.revisions).length===0)return;let o=fI(e,t.documentDir,t.mounts,t.lanes);return o===null?void 0:Ie(t.revisions,o)}function An(e,t,o){if(hI(e))return null;let{path:r,suffix:i}=R_(e),s;try{s=decodeURIComponent(r)}catch{return null}let a=pI(t,s);if(a===null)return null;let l=RM([o],a);if(!l)return null;return`${l}${i}`}function tt(e){return e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}function z(e){return e.replaceAll("\\","/").replace(/^\.\//,"").replace(/\/+$/,"")}function nt(e){return e??x?.projectConfig??null}function ot(e){return e?.content??{}}function In(e){let t=ln(e??{}).i18n?.locales??[];return t.length>0?[...t]:null}function rt(e){if(e.endsWith("/"))return!1;let t=e.slice(e.lastIndexOf("/")+1);return/\.[a-z\d]+$/i.test(t)}function it(e){if(e.format==="json")return{ext:".json",unresolvedFormat:null};if(e.format===void 0||e.format==="")return{ext:co()?.extensions[0]??".json",unresolvedFormat:null};let t=zi(e.format);return t?.extensions[0]===void 0?{ext:null,unresolvedFormat:e.format}:{ext:t.extensions[0],unresolvedFormat:null}}function kn(e,t){let o=t===null?"[^/]+":`(?:${t.map((i)=>tt(i)).join("|")})`,r=z(e).split(Rr).map((i)=>tt(i)).join(o);return new RegExp(`^${r}(?:/|$)`,"i")}function Dn(e,t,o){let r=kn(e,o).exec(t);if(!r)return null;return r[0].replace(/\/$/,"")}function En(e){return z(e).replaceAll(Rr,"").length}function Yd(e,t){if(e===null||e===void 0||e==="")return null;let o=nt(t),r=In(o),i=z(e),s=null,a=-1;for(let[l,c]of Object.entries(ot(o))){let{source:u}=c;if(u===void 0||u===""||rt(u))continue;let d=En(u);if(d<=a)continue;let m=Dn(u,i,r);if(m===null)continue;s={def:c,dir:i,fileBacked:!1,isSourceRoot:i.length===m.length,name:l,...it(c)},a=d}return s}function Jn(e,t){if(e===null||e===void 0||e==="")return null;let o=nt(t),r=z(e),i=r.toLowerCase();for(let[s,a]of Object.entries(ot(o))){let{source:l}=a;if(l===void 0||l===""||!rt(l))continue;let c=z(l).toLowerCase();if(i===c||i.endsWith(`/${c}`))return{def:a,dir:r.includes("/")?r.slice(0,r.lastIndexOf("/")):".",fileBacked:!0,isSourceRoot:!1,name:s,...it(a)}}return Yd(r.includes("/")?r.slice(0,r.lastIndexOf("/")):".",o)}function nd(e){return e.replaceAll(/([A-Z])/g," $1").replace(/^./,(t)=>t.toUpperCase())}function u_(e){return e.replaceAll(/[^a-zA-Z0-9]+(.)?/g,(t,o)=>o?o.toUpperCase():"").replace(/^[A-Z]/,(t)=>t.toLowerCase())}function h_(e){return e.replaceAll(/(^|-)(\w)/g,(t,o,r)=>(o?" ":"")+r.toUpperCase())}function v1(e,t){return e?.$label||nd(t)}function NP(e,t){if(e?.$label)return e.$label;if(t.includes("-"))return t.replaceAll(/(^|-)(\w)/g,(o,r,i)=>(r?" ":"")+i.toUpperCase());return nd(t)}function Aa(e){return e==="image"||e==="uri-reference"}function _h(e){if(e.$shorthand===!0)return"shorthand";if(e.$input==="button-group")return"button-group";if(e.$input==="media")return"media";if(e.format==="color")return"color";if(Aa(e.format))return"media";if(e.$units!==void 0)return"number-unit";if(e.type==="number")return"number";if(Array.isArray(e.enum))return"select";if(Array.isArray(e.examples)||Array.isArray(e.presets))return"combobox";return"text"}function Sh(e,t){if(!e||!t?.content)return null;let o=Jn(e,t);if(!o||!o.def.schema)return null;if(!o.fileBacked){let r=o.ext??co()?.extensions[0]??".json";if(!e.toLowerCase().endsWith(r.toLowerCase()))return null}return{name:o.name,schema:o.def.schema}}function Ny(e,t){let o=e.trim().toLowerCase().replaceAll(/[^a-z0-9\s-]/g,"").replaceAll(/\s+/g,"-").replaceAll(/-+/g,"-").replaceAll(/^-|-$/g,"");if(!o)return"";return`${t}${o}`}function p_(e,t){return e.replace(new RegExp(`^${t.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)}`),"").replace(/^--/,"").replaceAll("-"," ").replaceAll(/\b\w/g,(o)=>o.toUpperCase())||e}function DP(e){if(!e)return{kind:"text"};let t=e.trim().replaceAll(/\s*\|\s*undefined\b/g,"").trim();if(t==="boolean")return{kind:"boolean"};if(t==="number")return{kind:"number"};if(t.match(/^'[^']*'(\s*\|\s*'[^']*')+$/))return{kind:"combobox",options:[...t.matchAll(/'([^']*)'/g)].map((i)=>i[1])};return{kind:"text"}}function ro(e){return JSON.parse(JSON.stringify(e))}function Pe(e){return e?.at(-1)??null}function wP(e){return e?.[0]??null}function s_(e,t){if(!t||!e)return!1;return e.some((o)=>Eo(o,t))}function Oa(e){return Y(e)}function Y(e){let t=[];for(let o of e)t.push([...o]);return t}function a_(e,t){if(s_(e,t))return Y(e.filter((o)=>!Eo(o,t)));return[...Y(e),[...t]]}function xP(e,t,o){let r=e.findIndex((a)=>Eo(a,o)),i=t?e.findIndex((a)=>Eo(a,t)):-1;if(r===-1||i===-1)return[[...o]];let s=i<=r?e.slice(i,r+1):e.slice(r,i+1).toReversed();return Y(s)}function ye(e,t){return Y(e.filter((o)=>!sa(t,o)))}function _P(e){let t=[];for(let o of e)if(!t.some((r)=>Eo(r,o)))t.push([...o]);return t}function ng(e){if(e.length===0)return{mixed:!1,value:void 0};let[t]=e,o=JSON.stringify(t??null);for(let r=1;r<e.length;r++)if(JSON.stringify(e[r]??null)!==o)return{mixed:!0,value:void 0};return{mixed:!1,value:t}}var st=null;function IP(e){st=e}function at(){return st}var Z=null,Q=null,ee=null,ke=!0;function lt(){Z=[],Q=[],ee=[],ke=!0}function y(e){if(Z)Z.push(e)}function Vi(e){if(Q)Q.push(e)}function ct(e){if(ee)ee.push(e)}function ut(){let e={docOps:Q??[],fmOps:ee??[],invertible:ke,ops:Z??[]};return Z=null,Q=null,ee=null,ke=!0,e}var Mn=100,$n=20;function ne(){try{return typeof localStorage>"u"||!localStorage.getItem("jx-legacy-history")}catch{return!0}}function R(e,t){let o=re(e,t);if(!o)throw TypeError(`No node at path [${t.join(", ")}]`);return o}function C(e,t,o,r){return{forward:{key:t,op:"set-key",path:e,value:r},inverse:{key:t,op:"set-key",path:e,value:o}}}var dt=null;function ft(e){dt=e}var pt=null;function mt(e){pt=e}function Ln(e,t,o,r){for(let i=t.docOps.length-1;i>=0;i--)qy(e.doc.document,le(t.docOps[i].inverse));for(let i=t.fmOps.length-1;i>=0;i--){let s=t.fmOps[i];Me(e,s.field,s.before)}e.doc.document={...le(e.doc.document)},e.session.selection=o,e.doc.dirty=r}function X(e,t,{skipHistory:o=!1,origin:r="user",coalesceKey:i=null,actor:s=null}={}){if(!e)return!1;if(r!=="remote"&&pt?.(e,r))return!1;let a=s??he;if(r!=="remote")Ee(e,a);let l=Oa(e.session.selection),c=e.doc.dirty;lt();let u,d=null;try{t(e)}catch(I){d={error:I}}finally{u=ut()}if(d)throw Ln(e,u,l,c),d.error;let m=le(e.doc.document),v={...m},j=at(),M=j===null?{patchable:!1,reason:"no-patch-consumer"}:u.ops.length===0?{patchable:!1,reason:"unrecorded-mutation"}:j.classify(e,u.ops);if(M.patchable)j.markConsumed(v,e);if(e.doc.document=v,M.patchable)try{j.apply(e,u.ops,u)}catch(I){j.escalate(`patch-apply-failed: ${I instanceof Error?I.message:String(I)}`,e)}if(!o){let I=a?Fn(a):null;if(I)Vn(I,e,u,l);else gt(e,m,u,l,i)}return e.doc.dirty=!0,dt?.(e,u,r),!0}function gt(e,t,o,r,i=null){let s=e.history.snapshots.slice(0,e.history.index+1),a=ne()&&o.invertible&&(o.docOps.length>0||o.fmOps.length>0),l=s.at(-1);if(i&&a&&l&&l.coalesceKey===i&&l.inverseOps){if(l.forwardOps=[...l.forwardOps??[],...o.docOps.map((u)=>u.forward)],l.inverseOps=[...l.inverseOps,...o.docOps.map((u)=>u.inverse)],l.selection=Oa(e.session.selection),l.document)l.document=ro(t);e.history.snapshots=s,e.history.index=s.length-1;return}let c=!a||s.length%$n===0;if(s.push({document:c?ro(t):null,fmOps:a&&o.fmOps.length>0?o.fmOps:null,forwardOps:a?o.docOps.map((u)=>u.forward):null,inverseOps:a?o.docOps.map((u)=>u.inverse):null,coalesceKey:i,selection:Oa(e.session.selection),selectionBefore:r}),s.length>Mn){if(!s[1].document)s[1].document=De(s,1);s.shift()}e.history.snapshots=s,e.history.index=s.length-1}function De(e,t){let o=t;while(o>=0&&!e[o].document)o-=1;let r=o<0?null:e[o].document;if(!r)throw Error("history-missing-checkpoint");let i=ro(r);for(let s=o+1;s<=t;s++)for(let a of e[s].forwardOps??[])qy(i,a);return i}function Zd(e,t,o){return X(e,(r)=>t(r.doc.document),o)}function je(e,t){X(e,(o)=>{for(let r of t)xe(o,r)},{origin:"remote",skipHistory:!0})}function OP(e,t,{actor:o=null,selection:r={kind:"keep"}}={}){if(t.length===0)return"unchanged";return X(e,(s)=>{for(let a of t)xe(s,a,N1(le(s.doc.document),a));Nn(s,r)},{actor:o})?"applied":"refused"}function Nn(e,t){if(t.kind==="prune")for(let o of t.under)e.session.selection=ye(e.session.selection,o);else if(t.kind==="follow"&&Eo(Pe(e.session.selection),t.from))e.session.selection=[[...t.to]]}var _n=new Set(["state","$media","$head","$elements","imports","$layout"]);function xe(e,t,o=t){let r=null;if(t.op==="set-key")r=re(e.doc.document,t.path)?.[t.key];switch(qy(e.doc.document,t),Vi({forward:t,inverse:o}),t.op){case"set-key":{if(_n.has(t.key))y({key:t.key,op:"doc-meta"});else if(t.key==="style")y({op:"set-style",path:t.path});else if(t.key==="textContent")y({op:"set-text",path:t.path});else if(t.key==="attributes"||t.key==="cases"||t.key==="$props")y({op:"replace",path:t.path});else{let i=t.key.startsWith("on")&&(Ef(t.value)||Ef(r));y({isEvent:i,key:t.key,op:"set-prop",path:t.path})}return}case"insert-child":{y({index:t.index,op:"insert",parentPath:t.parentPath});return}case"remove-child":{y({op:"remove",path:[...t.parentPath,"children",t.index]});return}case"set-child":{y({op:"replace",path:[...t.parentPath,"children",t.index]});return}case"move-child":{y({fromPath:[...t.fromParentPath,"children",t.fromIndex],op:"move",toIndex:t.toIndex,toParentPath:t.toParentPath});break}default:break}}var W=new Map,N=new Map,he=null,yt=null;function ht(e){yt=e}function AP(e){let t=W.get(e.id);if(t)be(t);let o={owner:e,receipts:[]};return W.set(e.id,o),{owner:e,flush:()=>be(o),close:()=>{if(be(o),W.get(e.id)===o)W.delete(e.id);return[...o.receipts]}}}function PR(e,t){let o=he;he=e;try{return t()}finally{he=o}}function bt(e,t){let o=N.get(e);return o!==void 0&&(!t||o.lane.owner.id===t.id)}function PP(){for(let e of W.values())be(e)}function Fn(e){return W.get(e.id)??null}function be(e){for(let[t,o]of N)if(o.lane===e)xt(t,o)}function Vn(e,t,o,r){let i=N.get(t);if(!i)i={docOps:[],fmOps:[],invertible:!0,lane:e,selectionBefore:r},N.set(t,i);if(i.docOps.push(...o.docOps),i.fmOps.push(...o.fmOps),!o.invertible||o.docOps.length===0&&o.fmOps.length===0)i.invertible=!1}function Ee(e,t){let o=N.get(e);if(o&&o.lane.owner.id!==t?.id)xt(e,o)}function xt(e,t){N.delete(e);let{owner:o}=t.lane,r=o.turnId??"";if(V.has(e))t.lane.receipts.push({entry:null,tab:e,turnId:r});else{let i={docOps:t.docOps,fmOps:t.fmOps,invertible:t.invertible,ops:[]};gt(e,le(e.doc.document),i,t.selectionBefore);let s=e.history.snapshots[e.history.index];if(s.actor=o.id,o.turnId!==void 0)s.turnId=o.turnId;t.lane.receipts.push({entry:s,tab:e,turnId:r})}yt?.(e)}var V=new WeakMap;function Xd(e,t){if(t)V.set(e,t);else V.delete(e)}function MP(e){let t=V.get(e);return t?t.canUndo(e):e.history.index>0||N.has(e)}function FP(e){let t=V.get(e);return t?t.canRedo(e):!N.has(e)&&e.history.index<e.history.snapshots.length-1}function Tt(e,t){let{snapshots:o}=e.history;e.doc.document=De(o,t);let r=o[t];e.session.selection=Oa(le(r.selection))}function vt(e,t){try{if(typeof localStorage>"u"||!localStorage.getItem("jx-canvas-debug"))return}catch{return}let o=JSON.stringify(De(e.history.snapshots,t)),r=JSON.stringify(ro(le(e.doc.document)));if(o!==r)console.error("jx history: ops-based undo/redo diverged from checkpoint replay",{index:t})}function w1(e){Ee(e,null);let t=V.get(e);if(t){t.undo(e);return}if(e.history.index<=0)return;let o=e.history.snapshots[e.history.index],r=ne()?o.inverseOps:null,i=ne()?o.fmOps:null;if(r&&r.length>0||i&&i.length>0){if(!X(e,(a)=>{if(r)for(let l=r.length-1;l>=0;l--)xe(a,le(r[l]));if(i)for(let l=i.length-1;l>=0;l--){let c=le(i[l]);Me(a,c.field,c.before)}},{origin:"history",skipHistory:!0}))return;e.session.selection=Oa(le(o.selectionBefore??[])),e.history.index-=1,vt(e,e.history.index)}else e.history.index-=1,Tt(e,e.history.index);e.doc.dirty=!0}function jP(e){Ee(e,null);let t=V.get(e);if(t){t.redo(e);return}if(e.history.index>=e.history.snapshots.length-1)return;let o=e.history.snapshots[e.history.index+1],r=ne()?o.forwardOps:null,i=ne()?o.fmOps:null;if(r&&r.length>0||i&&i.length>0){if(!X(e,(a)=>{if(r)for(let l of r)xe(a,le(l));if(i)for(let l of i){let c=le(l);Me(a,c.field,c.after)}},{origin:"history",skipHistory:!0}))return;e.session.selection=Oa(le(o.selection)),e.history.index+=1,vt(e,e.history.index)}else e.history.index+=1,Tt(e,e.history.index);e.doc.dirty=!0}function oo(e,t,o,r){let i=re(e.doc.document,t);if(!i)return;let s=Uy(i),a=ff(o,s.length);s.splice(a,0,structuredClone(r)),y({index:a,op:"insert",parentPath:t}),Vi({forward:{index:a,node:Ce(r),op:"insert-child",parentPath:t},inverse:{index:a,op:"remove-child",parentPath:t}})}function Ch(e,t){let o=mf(t);if(!o)return;let{index:r,parentPath:i}=o,[s]=R(e.doc.document,i).children.splice(r,1);y({op:"remove",path:t}),Vi({forward:{index:r,op:"remove-child",parentPath:i},inverse:{index:r,node:Ce(s),op:"insert-child",parentPath:i}}),e.session.selection=ye(e.session.selection,t)}function MR(e,t){let o=mf(t);if(!o)return;let r=re(e.doc.document,t);if(!r)return;let{index:i,parentPath:s}=o,a=structuredClone(le(r));R(e.doc.document,s).children.splice(i+1,0,a),y({index:i+1,op:"insert",parentPath:s}),Vi({forward:{index:i+1,node:Ce(a),op:"insert-child",parentPath:s},inverse:{index:i+1,op:"remove-child",parentPath:s}}),e.session.selection=[[...s,"children",i+1]]}function ig(e,t){for(let o of pg(t))Ch(e,o)}function f_(e,t){let o=[];for(let r of pg(t)){let i=e.session.selection;MR(e,r);let s=Pe(e.session.selection),a=mf(s);if(!s||!a||e.session.selection===i)continue;o=o.map((l)=>I1(a.parentPath,l,a.index,1,!0)),o.unshift(s)}if(o.length>0)e.session.selection=o}function HP(e,t,o="div"){let r=mf(t);if(!r)return;let i=re(e.doc.document,t);if(!i)return;let{index:s,parentPath:a}=r,l={children:[structuredClone(le(i))],tagName:o},c=Ce(i);R(e.doc.document,a).children.splice(s,1,l),y({op:"replace",path:t}),Vi({forward:{index:s,node:Ce(l),op:"set-child",parentPath:a},inverse:{index:s,node:c,op:"set-child",parentPath:a}}),e.session.selection=[[...a,"children",s]]}function Zp(e,t,o,r){let i=e.doc.document,s=C_(i,t,o,r);if(!s)return;let{forward:a,inverse:l}=s,c=re(i,a.fromParentPath),u=re(i,o),[d]=c.children.splice(a.fromIndex,1);if(Uy(u).splice(a.toIndex,0,d),y({fromPath:t,op:"move",toIndex:a.toIndex,toParentPath:o}),Vi({forward:a,inverse:l}),Eo(Pe(e.session.selection),t))e.session.selection=[[...l.fromParentPath,"children",l.fromIndex]]}function Xe(e,t,o,r){let i=re(e.doc.document,t);if(!i)return;let s=i[o],a=Ce(s);if(r===void 0||r===null||r==="")delete i[o];else i[o]=r;if(Vi(C(t,o,a,Ce(i[o]))),o==="children")e.session.selection=ye(e.session.selection,[...t,"children"]);if(o==="textContent")y({op:"set-text",path:t});else if(o==="style")y({op:"set-style",path:t});else{let l=r===void 0||r===null||r===""?s:r,c=o.startsWith("on")&&Ef(l);y({isEvent:c,key:o,op:"set-prop",path:t})}}function rg(e,t,o,r){let i=R(e.doc.document,t),s=Ce(i.style);if(!i.style)i.style={};if(r===void 0||r==="")delete i.style[o];else i.style[o]=r;if(Object.keys(i.style).length===0)delete i.style;Vi(C(t,"style",s,Ce(i.style))),y({op:"set-style",path:t})}function Co(e,t,o,r){let i=R(e.doc.document,t),s=Ce(i.attributes);if(!i.attributes)i.attributes={};if(r===void 0||r==="")delete i.attributes[o];else i.attributes[o]=r;if(Object.keys(i.attributes).length===0)delete i.attributes;Vi(C(t,"attributes",s,Ce(i.attributes))),y({attr:o,op:"set-attr",path:t})}function BP(e,t,o,r,i){if(!o)return rg(e,t,r,i);let s=R(e.doc.document,t),a=Ce(s.style);if(!s.style)s.style={};let l=`@${o}`,c=dd(s.style,l);if(i===void 0||i===""){if(delete c[r],Object.keys(c).length===0)delete s.style[l]}else c[r]=i;if(Object.keys(s.style).length===0)delete s.style;Vi(C(t,"style",a,Ce(s.style))),y({op:"set-style",path:t})}function m_(e,t,o,r,i){let s=R(e.doc.document,t),a=Ce(s.style);if(!s.style)s.style={};let l=dd(s.style,o);if(i===void 0||i===""){if(delete l[r],Object.keys(l).length===0)delete s.style[o]}else l[r]=i;if(Object.keys(s.style).length===0)delete s.style;Vi(C(t,"style",a,Ce(s.style))),y({op:"set-style",path:t})}function VP(e,t,o,r,i,s){let a=R(e.doc.document,t),l=Ce(a.style);if(!a.style)a.style={};let c=`@${o}`,u=dd(a.style,c),d=dd(u,r);if(s===void 0||s===""){if(delete d[i],Object.keys(d).length===0)delete u[r];if(Object.keys(u).length===0)delete a.style[c]}else d[i]=s;if(Object.keys(a.style).length===0)delete a.style;Vi(C(t,"style",l,Ce(a.style))),y({op:"set-style",path:t})}function Ot(e,t){let o=[e];for(let r of t){let i=Di(o.at(-1),r);if(!i)break;o.push(i)}for(let r=o.length-2;r>=0;r--){let i=o[r],s=t[r],a=Di(i,s);if(a&&Object.keys(a).length===0)delete i[s]}}function g_(e,t,o,r,i){let s=R(e.doc.document,t),a=Ce(s.style);if(!s.style)s.style={};let l=s.style;for(let c of o)l=dd(l,c);if(i===void 0||i==="")delete l[r],Ot(s.style,o);else l[r]=i;if(Object.keys(s.style).length===0)delete s.style;Vi(C(t,"style",a,Ce(s.style))),y({op:"set-style",path:t})}function WP(e,t,o,r,i,s){let a=R(e.doc.document,t),l=Ce(a.style);if(!a.style)a.style={};let c=`@${o}`,u=dd(a.style,c),d=u;for(let m of r)d=dd(d,m);if(s===void 0||s===""){if(delete d[i],Ot(u,r),Object.keys(u).length===0)delete a.style[c]}else d[i]=s;if(Object.keys(a.style).length===0)delete a.style;Vi(C(t,"style",l,Ce(a.style))),y({op:"set-style",path:t})}function zP(e,t,o){let r=R(e.doc.document,t),i=Ce(r.style);if(o&&Object.keys(o).length>0)r.style=o;else delete r.style;Vi(C(t,"style",i,Ce(r.style))),y({op:"set-style",path:t})}function Qd(e,t,o){let r=e.doc.document,i=Ce(r.state);if(!r.state)r.state={};r.state[t]=o,Vi(C([],"state",i,Ce(r.state))),y({key:"state",op:"doc-meta"})}function UP(e,t){let o=e.doc.document;if(o.state){let r=Ce(o.state);if(delete o.state[t],Object.keys(o.state).length===0)delete o.state;Vi(C([],"state",r,Ce(o.state))),y({key:"state",op:"doc-meta"})}}function Go(e,t,o){let r=e.doc.document,i=Ce(r.state);if(!r.state)r.state={};let s=r.state[t],a=s==null?{}:!S(s)||Array.isArray(s)?{default:s}:s;r.state[t]=a,Object.assign(a,o);for(let l of Object.keys(a))if(a[l]===void 0||a[l]===null)delete a[l];Vi(C([],"state",i,Ce(r.state))),y({key:"state",op:"doc-meta"})}function qP(e,t,o){let r=e.doc.document;if(!r.state||!r.state[t])return;let i=Ce(r.state);r.state[o]=r.state[t],delete r.state[t],Vi(C([],"state",i,Ce(r.state))),y({key:"state",op:"doc-meta"})}function Xp(e,t,o,r){let i=R(e.doc.document,t),s=Ce(i.$props);if(!i.$props)i.$props={};if(r===void 0||r===null||r==="")delete i.$props[o];else i.$props[o]=r;if(Object.keys(i.$props).length===0)delete i.$props;Vi(C(t,"$props",s,Ce(i.$props))),y({op:"replace",path:t})}function JP(e,t,o,r){let i=R(e.doc.document,t),s=Ce(i.cases);if(!i.cases)i.cases={};i.cases[o]=r||{tagName:"div",textContent:o},Vi(C(t,"cases",s,Ce(i.cases))),y({op:"replace",path:t})}function KP(e,t,o){let r=R(e.doc.document,t);if(r.cases){let i=Ce(r.cases);delete r.cases[o],Vi(C(t,"cases",i,Ce(r.cases))),y({op:"replace",path:t})}}function GP(e,t,o,r){let i=R(e.doc.document,t);if(!i.cases||!i.cases[o])return;let s=Ce(i.cases);i.cases[r]=i.cases[o],delete i.cases[o],Vi(C(t,"cases",s,Ce(i.cases))),y({op:"replace",path:t})}function eu(e,t,o){let r=e.doc.content.frontmatter,i=Object.hasOwn(r,t)?Ce(r[t]):void 0,s=o===void 0||o===null||o==="";if(s)delete r[t];else r[t]=o;let a=s?void 0:Ce(o);ct({after:a,before:i,field:t}),e.doc.dirty=!0}function Me(e,t,o){if(o===void 0)delete e.doc.content.frontmatter[t];else e.doc.content.frontmatter[t]=o}var B=[],Wn=50;function YP(e){return Object.assign(i_(),{turnId:e})}function ZP(e,t,o=[]){if(t.length===0)return[];let r={batches:[...o],id:e,writes:[...t]};B.push(r);while(B.length>Wn)B.shift();return r.writes}function XP(e){return B.find((t)=>t.id===e)?.writes??[]}function QP(e){let t=B.find((s)=>s.id===e),o="There is no longer a record of what that turn changed.";if(!t)return"There is no longer a record of what that turn changed.";let r=t.writes.filter((s)=>s.disk).map((s)=>s.path);if(r.length>0)return`Cannot restore: ${r.join(", ")} ${r.length===1?"was":"were"} written straight to disk, which undo cannot reach.`;if(t.batches.length===0)return"There is no longer a record of what that turn changed.";let i=new Map;for(let s of t.batches)i.set(s.tab,[...i.get(s.tab)??[],s]);for(let[s,a]of i){let l=Bn(s,a);if(l)return l}for(let[s,a]of i)for(let l of a)w1(s);return[...i.keys()]}function Bn(e,t){let o=e.documentPath??"(untitled)";if(e.scope.active===!1)return`Cannot restore: ${o} was closed after that turn.`;if(t.some((l)=>l.entry===null))return`Cannot restore: ${o} is shared live, and Restore cannot check its undo history. Undo it in the document instead.`;let{index:r,snapshots:i}=e.history,s=i.slice(r-t.length+1,r+1);if(r-t.length>=0&&t.every((l,c)=>s[c]===l.entry))return null;return i.indexOf(t.at(-1).entry)>r?`Cannot restore: that turn's change to ${o} was already undone.`:`Cannot restore: ${o} has edits made since that turn began, which Restore would undo too.`}function eM(e){let t=e.filter((l)=>l.ok),o=new Set(t.map((l)=>l.path)),r=e.length-t.length;if(o.size===0)return r>0?`${r} change${r===1?"":"s"} failed`:"";let i=`Changed ${o.size} file${o.size===1?"":"s"}`,s=new Set(t.flatMap((l)=>l.disk?[l.path]:[])),a=[i];if(s.size>0)a.push(`${s.size} written to disk — undo cannot reach ${s.size===1?"it":"them"}`);if(r>0)a.push(`${r} failed`);return a.join(" · ")}function x1(){B.splice(0)}function tM(e,t){let o=null;for(let r=e.length-1;r>=0;r--){let i=e[r];if(i.id===t)return o;let s=i.role==="assistant"&&(i.content||(i.toolCalls?.length??0)>0);if(o===null&&s)o=i.id}return t===void 0?o:null}function eg(e){let t=new Set,o=new Set;return Fy(e,(r,i)=>{t.add(r),o.add(JSON.stringify(i))}),t.size===0?null:{fingerprints:o,pointers:t}}function yP(e,t){if(!t)return e;return $e(e,"",t)}function $e(e,t,o){if(Array.isArray(e)){let i=null;for(let[s,a]of e.entries()){let l=$e(a,`${t}/${s}`,o);if(l!==a)i??=[...e],i[s]=l}return i??e}if(!f(e))return e;let r=null;for(let[i,s]of Object.entries(e)){let a=$e(s,`${t}/${JR(i)}`,o);if(i==="children"&&Array.isArray(a)&&a.length===1){let[l]=a;if(Ir(l)&&(o.pointers.has(t)||o.fingerprints.has(JSON.stringify(l))))a=l}if(a!==s)r??={...e},r[i]=a}return r??e}function Qt(){return da}function Kn(e,t=!1){return{activeMedia:null,activeSelector:null,openPopover:null,openDialog:null,canvasMode:e,editZoom:1,editingFormula:null,editingFunction:null,featureToggles:{},inspectorSections:{},pendingInlineEdit:null,preview:t,previewColorScheme:"auto",previewLocale:null,previewParams:{},previewProps:null,rightTab:"page",elementTab:"properties",showLayout:!0,styleFilter:"",styleSections:{},dataRows:{},dataLimits:{},styleShorthands:{},zoom:1}}var Un=["edit","design","preview","source","stylebook","git-diff"];function $y({id:e,documentPath:t=null,fileHandle:o=null,document:r,frontmatter:i,sourceFormat:s=null,capabilities:a,openedFrom:l=null,preview:c=!1,layout:u=null,source:d=null,canvasMode:m}){let v=me(),j=eg(r),M=a?.modes??Gn(t,s),I=m??M.find((T)=>T!=="preview")??"edit",ue=M[0]==="preview",L={bareRepeaters:j,content:{frontmatter:i||{}},dirty:!1,document:r,handlersSource:null,layout:u,mode:zn(t,s),source:d,sourceFormat:s},de={index:0,snapshots:[{document:structuredClone(r),selection:[]}]},q={canvas:{refreshing:!1,error:null,livePreviews:null,pendingInlineEdit:null,scope:null,status:"idle"},clipboard:null,hover:null,openedFrom:l,selection:[],ui:Kn(I,ue)};return v.run(()=>({capabilities:{modes:M},doc:b(L),documentPath:t,fileHandle:o,history:b(de),id:e,pinned:!1,preview:c,scope:v,session:b(q)}))}function Gn(e,t){if(Ni(e))return["stylebook","tokens","source"];let o=zi(t)??fn(e);if(o)return o.studio?.modes??["edit","design","preview","source"];return Un}function zn(e,t){let o=zi(t)??fn(e);if(o)return o.studio?.documentMode?.default??"content";return"component"}function b1(e){return ia(e.session.ui.canvasMode)}function LR(e){let t=[];for(let o of e.capabilities.modes){if(o==="preview")continue;let r=ia(o);if(!t.includes(r))t.push(r)}return t}function vP(e,t){return e.capabilities.modes.find((o)=>o!=="preview"&&ia(o)===t)}function tg(e){e.scope.stop()}var Pt=new WeakMap,H=new Map;function xn(e){let t=le(e),o=Pt.get(t);if(!o)o=b({active:!1,attachError:"",peers:[],readOnly:!1,sourceCanonical:!1,status:"unavailable"}),Pt.set(t,o);return o}function wt(e){H.set(e,(H.get(e)??0)+1)}function Ct(e){let t=H.get(e)??0;if(t<=1)H.delete(e);else H.set(e,t-1)}function Ly(e){return H.has(e.replaceAll("\\","/"))}var Yn=8000,Zn=800,Xn=2500,Rt=null;function Qn(){return Rt??=(ce("57ang7ma"),import("./index-57ang7ma.js")),Rt}function Jt(){try{return p()}catch{return null}}var K=null;function SP(e){K=e}var Ne=null;function CP(e){Ne=e}var It=()=>{};function kP(e){It=e??(()=>{})}var _e=new WeakMap;function kt(e){return le(e)}function Ve(e,t){return e.frontmatterMap(t)}function eo(e){return e.synced}function E(e){return _e.get(kt(e))}function He(e){let t=kt(e),o=_e.get(t);if(!o)o={attaching:null,generation:0,optedOut:b({value:!1}),session:null,watcherInstalled:!1},_e.set(t,o);return o}var At=!1;function to(){if(At)return;At=!0,ft(no),ht(io),mt((e)=>{if(E(e)?.session?.synced&&xn(e).sourceCanonical)return It("Source editing in progress — structural edits are paused"),"source-canonical";return null})}function no(e,t,o){let r=E(e)?.session;if(!r||!r.synced)return;if(r.lastSeenRef=le(e.doc.document),o==="remote"){Te(r);return}if(r.canWrite)so(r,t),Te(r)}function io(e){let t=E(e)?.session;if(!t?.synced||t.batchOps===null)return;let{batchOps:o,batchNeedsDiff:r}=t;if(t.batchOps=null,t.batchNeedsDiff=!1,!t.canWrite)return;if(t.undoManager?.stopCapturing(),r)oe(t);else if(o.length>0)try{t.collab.applyDocOpsToY(t.handle.doc,o,t.collab.LOCAL_ORIGIN)}catch{oe(t)}t.undoManager?.stopCapturing()}function so(e,t){let o=t.docOps.map((r)=>r.forward);if(bt(e.tab)){if(e.batchOps??=[],o.length===0)e.batchNeedsDiff=!0;else e.batchOps.push(...o);return}if(o.length===0){oe(e);return}try{e.collab.applyDocOpsToY(e.handle.doc,o,e.collab.LOCAL_ORIGIN)}catch{oe(e)}}function oe(e){let{collab:t,handle:o,tab:r}=e,i=t.yDocToJson(o.doc),s=ro(le(r.doc.document)),a=t.diffDocs(i,s);if(a===null)t.replaceYStructure(o.doc,s,t.LOCAL_ORIGIN);else if(a.length>0)try{t.applyDocOpsToY(o.doc,a,t.LOCAL_ORIGIN)}catch{t.replaceYStructure(o.doc,s,t.LOCAL_ORIGIN)}}function Le(e){let t=e.collab.yDocToJson(e.handle.doc);X(e.tab,(o)=>{let r=o.doc.document;for(let i of Object.keys(r))if(!(i in t))delete r[i];Object.assign(r,t)},{origin:"remote",skipHistory:!0})}function ao(e){if(!e.canWrite)return!1;let{awareness:t}=e.handle,o=t.clientID;for(let[r,i]of t.getStates())if(i.canWrite!==!1&&r<o)o=r;return o===e.handle.awareness.clientID}function Te(e){if(!K||!ao(e))return;if(e.collab.canonicalOf(e.handle.doc)==="source")return;let t=Date.now();if(e.lastMirrorAt??=t,t-e.lastMirrorAt>=Xn){if(e.mirrorTimer)clearTimeout(e.mirrorTimer),e.mirrorTimer=null;e.lastMirrorAt=t,We(e);return}if(e.mirrorTimer)clearTimeout(e.mirrorTimer);e.mirrorTimer=setTimeout(()=>{e.mirrorTimer=null,e.lastMirrorAt=Date.now(),We(e)},Zn)}async function We(e){if(!K||!e.synced)return;try{let t=await K(e.tab);e.collab.updateSourceText(e.handle.doc,t,e.collab.MIRROR_ORIGIN)}catch{}}async function Dt(e){if(!Ne||!e.synced||!e.canWrite)return;let{collab:t,handle:o,tab:r}=e,i=t.canonicalRevOf(o.doc),s=t.sourceText(o.doc).toString(),a;try{a=await Ne(r,s)}catch{return}if(!eo(e)||t.canonicalRevOf(o.doc)!==i)return;let l=t.diffDocs(t.yDocToJson(o.doc),a.document);if(l===null)t.replaceYStructure(o.doc,a.document,t.MIRROR_ORIGIN);else if(l.length>0)try{t.applyDocOpsToY(o.doc,l,t.MIRROR_ORIGIN)}catch{t.replaceYStructure(o.doc,a.document,t.MIRROR_ORIGIN)}let c=Ve(t,o.doc),u=a.frontmatter??{};o.doc.transact(()=>{let d=[...c.keys()];for(let m of d)if(!(m in u))c.delete(m);for(let[m,v]of Object.entries(u))if(!t.deepEqual(c.get(m),v))c.set(m,v)},t.MIRROR_ORIGIN)}function EP(e){let t=E(e)?.session;if(!t?.synced)return null;let{collab:o,handle:r}=t,i=null,s=()=>i!==null&&t.sourceLockOwner===i;return{awareness:r.awareness,enter:async()=>{i={},t.sourceLockOwner=i;let a=r.awareness.getLocalState();if(a)r.awareness.setLocalState({...a,mode:"source"});if(!t.canWrite)return;let l=null;if(K)try{l=await K(e)}catch{l=null}if(!s())return;o.acquireSourceCanonical(r.doc,l??o.sourceText(r.doc).toString(),o.LOCAL_ORIGIN)},leave:()=>{if(!s()){i=null;return}i=null,t.sourceLockOwner=null;let a=r.awareness.getLocalState();if(a)r.awareness.setLocalState({...a,mode:"structure"});if(!t.canWrite)return;if(o.otherSourceEditors(r.awareness,t.path,r.awareness.clientID).filter((c)=>r.awareness.getStates().get(c)?.canWrite!==!1).length===0)Dt(t).then(()=>{o.releaseSourceCanonical(r.doc,o.LOCAL_ORIGIN)})},localOrigin:o.LOCAL_ORIGIN,readOnly:!t.canWrite,text:o.sourceText(r.doc)}}function ra(e){let t=xn(e);return t.active&&t.readOnly}async function RR(e){let t=E(e)?.session;if(!t?.synced||!t.canWrite)return!1;if(t.mirrorTimer)clearTimeout(t.mirrorTimer),t.mirrorTimer=null;return await We(t),await t.handle.flush(),!0}async function TP(){for(let e of Be)if(E(e)?.session?.synced)await RR(e)}var Be=new Set;function ie(e){if(!Jt()?.collab||!e.documentPath||Ni(e.documentPath))return;let o=He(e);if(o.watcherInstalled)return;o.watcherInstalled=!0,to(),Be.add(e),e.scope.run(()=>{te(()=>{if(o.optedOut.value)ve(e);else Ke(e)}),Os(()=>{Be.delete(e),ve(e)})})}function IR(e,t){let o=He(e);if(o.optedOut.value===!t)return;if(o.optedOut.value=!t,!o.watcherInstalled&&t)ie(e)}function NR(e){return E(e)?.optedOut.value!==!0}function jt(e){if(!E(e)?.watcherInstalled){ie(e);return}ve(e),Ke(e)}async function Ke(e){let t=He(e);if(t.session||t.attaching)return;let{documentPath:o}=e,r=Jt();if(!o||!r?.collab){xn(e).status="unavailable";return}let{generation:i}=t,s=xn(e);s.status="connecting",s.attachError="";let a=(async()=>{try{let[l,c]=await Promise.all([Qn(),r.collab(o)]);if(!c){s.status="detached";return}if(t.generation!==i){c.destroy();return}let u,d=new Promise((m,v)=>{u=setTimeout(()=>v(Error("collab-sync-timeout")),Yn)});try{await Promise.race([c.whenSynced,d])}finally{clearTimeout(u)}if(t.generation!==i){c.destroy();return}t.session=lo(e,o,l,c),s.active=!0,s.status="synced",s.readOnly=!t.session.canWrite,s.attachError="",wt(o)}catch(l){s.status="failed",s.active=!1,s.attachError=l instanceof Error?l.message:String(l),w.warn(`Live collaboration is not available for "${o}" — ${s.attachError}`,{key:`collab:${o}`,path:o,source:"Collaboration"})}finally{t.attaching=null}})();t.attaching=a,await a}function ve(e){let t=E(e);if(!t)return;t.generation+=1;let{session:o}=t;t.session=null;let r=xn(e);if(r.active=!1,r.status="detached",r.attachError="",r.peers=[],!o)return;if(Ct(o.path),o.mirrorTimer)clearTimeout(o.mirrorTimer);if(o.sourceParseTimer)clearTimeout(o.sourceParseTimer);for(let i of o.disposers)try{i()}catch{}Xd(e,null),e.history.snapshots=[{document:ro(le(e.doc.document)),selection:Oa(e.session.selection)}],e.history.index=0,o.undoManager?.destroy(),o.handle.destroy()}function lo(e,t,o,r){let i=r.identity(),s={applyingRemoteFrontmatter:!1,batchNeedsDiff:!1,batchOps:null,canWrite:i?i.permission!=="read":!0,collab:o,disposers:[],handle:r,lastSeenRef:le(e.doc.document),mirrorTimer:null,path:t,sourceLockOwner:null,sourceParseTimer:null,synced:!1,tab:e,undoManager:null};if(o.metaMap(r.doc).get("structureSeeded")===!0){let T=o.yDocToJson(r.doc),O=ro(le(e.doc.document));if(!o.deepEqual(T,O)){let k=o.diffDocs(O,T);if(k===null)s.synced=!0,Le(s),s.synced=!1;else if(k.length>0)je(e,k)}s.applyingRemoteFrontmatter=!0;let P=Ve(o,r.doc);for(let[k,F]of P.entries())e.doc.content.frontmatter[k]=F;s.applyingRemoteFrontmatter=!1}else if(s.canWrite)o.seedStructure(r.doc,ro(le(e.doc.document)),{frontmatter:ro(le(e.doc.content.frontmatter)),origin:o.SEED_ORIGIN,sourceFormat:e.doc.sourceFormat});s.lastSeenRef=le(e.doc.document),s.disposers.push(r.onDirty((T)=>{e.doc.dirty=T})),r.awareness.setLocalState({canWrite:s.canWrite,focusedPath:t,structuralSelection:null,user:i?{avatarUrl:i.avatarUrl,color:i.color,login:i.login,name:i.name}:{color:o.colorForKey(String(r.awareness.clientID)),login:`guest-${r.awareness.clientID%1000}`}});let l=new o.UndoManager([o.structureMap(r.doc),o.frontmatterMap(r.doc)],{trackedOrigins:new Set([o.LOCAL_ORIGIN])});s.undoManager=l;let c=({stackItem:T})=>{T.meta.set("selection",Oa(e.session.selection))},u=({stackItem:T})=>{let O=T.meta.get("selection");e.session.selection=Oa(O??[])};l.on("stack-item-added",c),l.on("stack-item-popped",u),s.disposers.push(()=>{l.off("stack-item-added",c),l.off("stack-item-popped",u)}),Xd(e,{canRedo:()=>l.canRedo(),canUndo:()=>l.canUndo(),redo:()=>{l.redo()},undo:()=>{l.undo()}});let d=o.structureMap(r.doc),m=(T,O)=>{if(O.origin===o.LOCAL_ORIGIN||!s.synced)return;let P=o.yEventsToDocOps(T);if(P===null){Le(s);return}if(P.length===0)return;try{je(e,P)}catch{Le(s)}};d.observeDeep(m),s.disposers.push(()=>d.unobserveDeep(m));let v=xn(e);v.sourceCanonical=o.canonicalOf(r.doc)==="source";let j=o.metaMap(r.doc),M=()=>{v.sourceCanonical=o.canonicalOf(r.doc)==="source"};j.observe(M),s.disposers.push(()=>j.unobserve(M));let I=o.sourceText(r.doc),ue=(T,O)=>{if(O.origin===o.MIRROR_ORIGIN||!s.synced)return;if(o.canonicalOf(r.doc)!=="source")return;if(!o.isSourceReconciler(r.awareness,s.path))return;if(s.sourceParseTimer)clearTimeout(s.sourceParseTimer);s.sourceParseTimer=setTimeout(()=>{s.sourceParseTimer=null,Dt(s)},600)};I.observe(ue),s.disposers.push(()=>I.unobserve(ue));let L=Ve(o,r.doc),de=(T,O)=>{if(O.origin===o.LOCAL_ORIGIN||!s.synced)return;s.applyingRemoteFrontmatter=!0;try{for(let[P,k]of T.changes.keys)if(k.action==="delete")delete e.doc.content.frontmatter[P];else e.doc.content.frontmatter[P]=L.get(P)}finally{s.applyingRemoteFrontmatter=!1}};L.observe(de),s.disposers.push(()=>L.unobserve(de)),e.scope.run(()=>{let T=JSON.stringify(e.doc.content.frontmatter);te(()=>{let O=JSON.stringify(e.doc.content.frontmatter);if(O===T)return;if(T=O,s.applyingRemoteFrontmatter||!s.synced||!s.canWrite)return;let P=JSON.parse(O);r.doc.transact(()=>{let k=[...L.keys()];for(let F of k)if(!(F in P))L.delete(F);for(let[F,ze]of Object.entries(P))if(!o.deepEqual(L.get(F),ze))L.set(F,ze)},o.LOCAL_ORIGIN),Te(s)}),te(()=>{let O=e.session.selection.length>0?Oa(e.session.selection):null,P=r.awareness.getLocalState();if(P)r.awareness.setLocalState({...P,structuralSelection:O})}),te(()=>{let O=le(e.doc.document);queueMicrotask(()=>{if(E(e)?.session!==s||!s.synced||!s.canWrite)return;let k=le(e.doc.document);if(k!==O||k===s.lastSeenRef)return;s.lastSeenRef=k,oe(s),Te(s)})})});let q=xn(e),fe=()=>{let T=[];for(let[O,P]of r.awareness.getStates())if(O!==r.awareness.clientID&&P.user)T.push({clientId:O,state:P});q.peers=T};return fe(),r.awareness.on("change",fe),s.disposers.push(()=>r.awareness.off("change",fe),r.onStatus((T)=>{if(T==="offline"||T==="connecting")q.status="offline";else if(s.synced)q.status="synced"}),r.onReset(()=>{ve(e),Ke(e)})),s.synced=!0,s}function D(e,t,o){return RangeError(`command "${e}" argument "${t}": ${o}`)}function uo(e){if(J(e))return"number";if(qe(e))return"boolean";return n(e)?"string":"object"}function A(e){if(e===void 0)return"missing";return n(e)?`"${e}"`:`${uo(e)} ${JSON.stringify(e)}`}function Mt(e){return Array.isArray(e)&&e.every((t)=>n(t)||J(t))}function St(e,t,o){let r=t[o];if(!n(r)||r==="")throw D(e,o,`expected a non-empty string, got ${A(r)}`);return r}function ti(e,t,o){if(t[o]===void 0)return;return St(e,t,o)}function $t(e,t,o){let r=t[o];if(!J(r)||!Number.isFinite(r))throw D(e,o,`expected a finite number, got ${A(r)}`);return r}function Et(e,t,o){let r=t[o];if(!J(r)||!Number.isInteger(r))throw D(e,o,`expected an integer, got ${A(r)}`);return r}function c_(e,t,o,r,i){let s=$t(e,t,o);if(s<r||s>i)throw D(e,o,`${s} is outside the supported range ${r}–${i}`);return s}function Bi(e,t,o){let r=t[o];if(!qe(r))throw D(e,o,`expected a boolean, got ${A(r)}`);return r}function qn(e,t,o,r){let i=t[o],s=n(i)?r.find((a)=>a===i):void 0;if(s===void 0)throw D(e,o,`${A(i)} is not declared — declared: ${r.join(", ")||"none"}`);return s}function y1(e,t,o){let r=t[o];if(!Mt(r))throw D(e,o,`expected an array of path segments (strings or numbers), got ${A(r)}`);return r}function $P(e,t,o){if(t[o]===null)return null;return y1(e,t,o)}function OR(e,t,o){let r=t[o];if(!Array.isArray(r))throw D(e,o,`expected an array of document paths, got ${A(r)}`);return r.map((i,s)=>{if(!Mt(i))throw D(e,o,`entry ${s} is not a document path — expected an array of segments, got ${A(i)}`);return i})}function Se(e,t=Object.keys(e)){return{additionalProperties:!1,properties:e,required:[...t],type:"object"}}function fi(e,t){return{description:t,enum:[...e],type:"string"}}function wl(e,t){return{description:t,get enum(){return[...e()]},type:"string"}}function AR(e,t={}){return{description:e,type:"number",...t}}function $r(e){return{description:e,type:"boolean"}}function d_(e,t=!1){let o={items:{type:["string","number"]},type:"array"};return t?{description:e,oneOf:[o,{type:"null"}]}:{description:e,...o}}function LP(e){return{description:e,items:{items:{type:["string","number"]},type:"array"},type:"array"}}function Fe(e){return{description:e,type:"string"}}function fo(e){return e.length===2&&e.includes("string")&&e.includes("number")}function Ue(e){return n(e)?[e]:e}function Lt(e){let t=e;if("enum"in t)return"enum";if("const"in t)return"const";if(Array.isArray(t.oneOf))return"one-of";if(Array.isArray(t.type))return"typed";switch(t.type){case"boolean":return"boolean";case"number":case"integer":{if(t.minimum!==void 0&&t.maximum!==void 0)return"bounded-number";return t.type==="integer"?"integer":"number"}case"string":return"string";case"array":{let o=t.items?.type;if(Array.isArray(o))return fo(o)?"path":"pass-through";return o==="array"?"path-list":"pass-through"}case"null":case"object":return"typed";default:break}return"pass-through"}function Nt(e,t){switch(e){case"null":return t===null;case"boolean":return qe(t);case"string":return n(t);case"number":return J(t)&&Number.isFinite(t);case"integer":return J(t)&&Number.isInteger(t);case"array":return Array.isArray(t);case"object":return S(t)&&!Array.isArray(t);default:break}return!1}function _t(e){if(e.length<=1)return e.join("");return`${e.slice(0,-1).join(", ")} or ${e.at(-1)}`}function po(e,t,o,r){let i=t[o];if(i===void 0||!r.some((s)=>Nt(s,i)))throw D(e,o,`expected ${_t(r)}, got ${A(i)}`);return i}function Vt(e){switch(Lt(e)){case"enum":return`one of ${(e.enum??[]).map((t)=>A(t)).join(" | ")}`;case"const":return`the constant ${A(e.const)}`;case"one-of":return(e.oneOf??[]).map((t)=>Vt(t)).join(" or ");case"typed":return _t(Ue(e.type??[]));case"boolean":return"a boolean";case"bounded-number":return`a number from ${e.minimum} to ${e.maximum}`;case"number":return"a finite number";case"integer":return"an integer";case"string":return"a non-empty string";case"path":return"a document path";case"path-list":return"a list of document paths";default:return"anything"}}function mo(e,t,o,r){let i=t[o],s=[];for(let a of r){if(a.type!==void 0&&!Ue(a.type).some((l)=>Nt(l,i)))continue;try{return Bt(e,t,o,a)}catch(l){s.push(l)}}if(s.length===1)throw s[0];throw D(e,o,`expected ${r.map((a)=>Vt(a)).join(" or ")}, got ${A(i)}`)}function Bt(e,t,o,r){switch(Lt(r)){case"enum":return qn(e,t,o,r.enum??[]);case"const":{let i=t[o];if(i!==r.const)throw D(e,o,`expected the constant ${A(r.const)}, got ${A(i)}`);return i}case"one-of":return mo(e,t,o,r.oneOf??[]);case"typed":return po(e,t,o,Ue(r.type??[]));case"boolean":return Bi(e,t,o);case"bounded-number":{if(r.type==="integer")Et(e,t,o);return c_(e,t,o,r.minimum,r.maximum)}case"number":return $t(e,t,o);case"integer":return Et(e,t,o);case"string":return St(e,t,o);case"path":return y1(e,t,o);case"path-list":return OR(e,t,o);default:return t[o]}}function RP(e,t,o){let r=t,i=r.properties??{},s=Object.keys(i),a=r.required??[],l={};for(let[c,u]of Object.entries(o)){if(u===void 0||Object.hasOwn(i,c))continue;if(r.additionalProperties===!1)throw D(e,c,`not declared — declared: ${s.join(", ")||"none"}`);l[c]=u}for(let c of s){if(o[c]===void 0&&!a.includes(c))continue;l[c]=Bt(e,o,c,i[c])}return l}var go=20,mi="primary",og="secondary",FR=2,g=b({activePaneId:mi,clipboard:null,closedTabs:[],componentRegistry:[],mruOrder:[],fileTree:{dirs:new Map,expanded:new Set,searchQuery:"",selectedPath:null},panes:[{activeTabId:null,derived:null,id:mi,tabOrder:[]}],projectConfig:null,projectRoot:null,styleClipboard:null,tabs:new Map,ui:{activityBar:"files"},get activeTabId(){let e=Yo();return e.derived?.kind==="lens"?pn(e.derived.sourcePaneId)?.activeTabId??null:e.activeTabId},get tabOrder(){return Yo().tabOrder}}),h=Fh(()=>g.activeTabId?g.tabs.get(g.activeTabId)??null:null);function Yo(){let{panes:e}=g;return e.find((t)=>t.id===g.activePaneId)??e[0]}function pn(e){return g.panes.find((t)=>t.id===e)}function Pa(e){return g.panes.find((t)=>t.tabOrder.includes(e))}function ko(e){let t=pn(e);if(!t||t.id===g.activePaneId)return;g.activePaneId=t.id,_();let{activeTabId:o}=t;if(o){Ge(o);let r=g.tabs.get(o);if(r)zt(r)}}function sg(e){return g.activePaneId===e}function _1(e){let t=e??Yo().activeTabId,o=t?g.tabs.get(t):null;if(!t||!o)return null;let r=Pa(t);if(!r)return null;let i=lc(r.id);return cg(t),kh(i,t),i.activeTabId=t,g.activePaneId=i.id,_(),Ge(t),i}function S1(e){return g.panes.find((t)=>t.id!==e)??yo(og)}function lc(e){let t=S1(e);if(t.derived)t.derived=null;return t}function yo(e){let t=pn(e);if(t)return t;return g.panes=[...g.panes,{activeTabId:null,derived:null,id:e,tabOrder:[]}],pn(e)}function ag(e){if(g.panes.length<2)return;let t=e===mi?g.panes.find((s)=>s.id!==mi)?.id:e,o=t===void 0?void 0:pn(t),r=g.panes.find((s)=>s.id!==t);if(!o||!r)return;for(let s of o.tabOrder)kh(r,s);let i=o.activeTabId!==null&&U(o.activeTabId)?o.activeTabId:null;if(r.activeTabId=g.activePaneId===o.id?i??r.activeTabId??o.activeTabId:r.activeTabId??o.activeTabId,g.activePaneId=r.id,r.derived?.sourcePaneId===o.id)r.derived=null;g.panes=g.panes.filter((s)=>s.id!==o.id),_()}function lg(e){return e.tabOrder.length===0&&e.derived===null}var U=()=>!0;function C1(e){U=e??(()=>!0)}var Ut=null;function k1(e){Ut=e}var qt=null;function E1(e){qt=e}function ho(){let e=0;for(let t of g.tabs.keys())if(U(t))e+=1;return e}function Gt(e){return e.tabOrder.findLast((t)=>U(t))??null}function cg(e){let t=[];for(let o of g.panes){if(!o.tabOrder.includes(e))continue;if(o.tabOrder=o.tabOrder.filter((r)=>r!==e),o.activeTabId===e)o.activeTabId=Gt(o);if(o.id!==mi&&lg(o))t.push(o.id)}for(let o of t)ag(o)}function kh(e,t,o){if(e.tabOrder.includes(t))return;let r=o??xo(e,t);e.tabOrder=[...e.tabOrder.slice(0,r),t,...e.tabOrder.slice(r)]}function bo(e){let t=0;for(let o of e.tabOrder){if(g.tabs.get(o)?.pinned!==!0)break;t+=1}return t}function xo(e,t){return g.tabs.get(t)?.pinned===!0?bo(e):e.tabOrder.length}function cc(e,t=null){if(g.projectRoot&&e!==g.projectRoot)x1();g.projectRoot=e,g.projectConfig=t}function Qp(e){let t=h.value;return e!==null&&t!==null&&le(t)===le(e)}function xl(e){if(!e)return!1;let t=g.tabs.get(e.id);return t!==void 0&&le(t)===le(e)}function Ge(e){g.mruOrder=[e,...g.mruOrder.filter((t)=>t!==e)]}var Oe=null,se=0;function _(){Oe=null,se=0}function zt(e){if(x&&e.documentPath)x.selectedPath=e.documentPath}function T1(e){let t=pn(e);if(t)t.activeTabId=null}function ae(e,t={}){let o=g.tabs.get(e),r=Pa(e);if(!o||!r)return;if(r.activeTabId=e,t.focus===!1)return;if(g.activePaneId=r.id,!t.cycling)_(),Ge(e);zt(o)}function Si(e){if(e.background===!0){let a=g.tabs.get(e.id);if(a)return a;let l=$y({...e,preview:!1}),c=(e.paneId===void 0?void 0:pn(e.paneId))??Yo();return kh(c,l.id),g.tabs.set(l.id,l),l}let t=g.tabs.get(e.id),o=e.preview===!0&&t?.pinned!==!0,r=$y({...e,preview:o}),i=(e.paneId===void 0?void 0:pn(e.paneId))??Yo(),s;if(t)r.pinned=t.pinned,tg(t);else{if(o){let l=Ht(i),c=l?g.tabs.get(l):null;if(c)iu(c);$1()}let a=o?Ht(i):null;if(a)s=i.tabOrder.indexOf(a),tu(a);kh(i,r.id,s)}return g.tabs.set(r.id,r),ae(r.id,{focus:e.focus!==!1}),ie(r),r}function Ht(e){return e.tabOrder.find((t)=>g.tabs.get(t)?.preview===!0)??null}function id(e){let t=g.tabs.get(e);if(t?.preview===!0)t.preview=!1}function $1(){for(let[e,t]of g.tabs)if(t.preview&&(t.doc.dirty||Dy(t)))id(e)}var Yt=null;function jR(e){Yt=e}function Dy(e){return Yt?.(e)??!1}function b_(e,t){let o=g.tabs.get(e),r=Pa(e);if(!o||!r)return;if(o.pinned=t,t)o.preview=!1;let i=r.tabOrder.filter((a)=>a!==e),s=i.filter((a)=>g.tabs.get(a)?.pinned===!0).length;r.tabOrder=[...i.slice(0,s),e,...i.slice(s)]}function HR(e,t){let o=g.tabs.get(e),r=Pa(e);if(!o||!r)return;r.tabOrder=Zt(r,e,t)}function Zt(e,t,o){let r=g.tabs.get(t);if(!r)return e.tabOrder;let i=e.tabOrder.filter((u)=>u!==t),s=i.filter((u)=>g.tabs.get(u)?.pinned===!0).length,a=r.pinned?0:s,l=r.pinned?s:i.length,c=Math.min(Math.max(o,a),l);return[...i.slice(0,c),t,...i.slice(c)]}function tu(e){let t=g.tabs.get(e);if(!t)return;let o=Pa(e),r=o?.activeTabId===e;if(To(t),tg(t),g.tabs.delete(e),n_(e),cg(e),g.mruOrder=g.mruOrder.filter((l)=>l!==e),_(),o&&lg(o))ag(o.id);if(!r)return;let i=Yo(),s=qt?.(i.id)??null,a=(s!==null&&i.tabOrder.includes(s)?s:null)??g.mruOrder.find((l)=>i.tabOrder.includes(l)&&U(l))??Gt(i);if(a)ae(a);else Ut?.(i.id)}function BR(){let e=[...g.tabs.values()];g.tabs.clear(),Xt(),g.mruOrder=[],_();for(let t of e)tg(t)}function Xt(){g.panes=[{activeTabId:null,derived:null,id:mi,tabOrder:[]}],g.activePaneId=mi}function To(e){if(!e.documentPath)return;let t=e.documentPath;g.closedTabs=[{documentPath:t},...g.closedTabs.filter((o)=>o.documentPath!==t)].slice(0,go)}function vo(){let[e]=g.closedTabs;if(!e)return;return g.closedTabs=g.closedTabs.slice(1),e.documentPath}function Kt(e){if(!Oe)Oe=g.mruOrder.filter((r)=>g.tabs.has(r)&&U(r)),se=0;let t=Oe;if(t.length<2)return;se=((se+e)%t.length+t.length)%t.length;let o=t[se];return ae(o,{cycling:!0}),o}function VR(e){let t=[...g.tabs.keys()],o=[...g.tabs.values()],r=$y(e);g.tabs.set(r.id,r),Xt(),g.panes[0].tabOrder=[r.id],g.mruOrder=[],_(),ae(r.id),ie(r);for(let i of t){if(i===r.id)continue;g.tabs.delete(i)}for(let i of o)tg(i);return r}function Ft(e,t={}){ae(e,t)}function Oy(e,t,o){let r=pn(t);if(!r||!g.tabs.has(e))return null;if(r.tabOrder.includes(e)){if(o!==void 0)r.tabOrder=Zt(r,e,o);return r}return cg(e),kh(r,e,o),r}function WR(e,t,o){let r=g.tabs.get(e);if(!r)return;if(r.id=t,r.documentPath=o,g1(e))n_(e),Qm(t);g.tabs.delete(e),g.tabs.set(t,r);for(let i of g.panes)if(i.tabOrder=i.tabOrder.map((s)=>s===e?t:s),i.activeTabId===e)i.activeTabId=t;g.mruOrder=g.mruOrder.map((i)=>i===e?t:i),_(),jt(r)}function zR(e,t){e.registerAll([...Oo(t),...Po(t)])}function Oo(e){let t=()=>ho()>1;return[{id:"document.nextTab",title:"Next Tab",category:"Document",level:"document",keybinding:["ctrl+tab","mod+tab"],menus:["palette"],group:"2_navigate",when:(o)=>o.document.open,enablement:t,requires:"a second open document in this workspace",run:()=>{Kt(1)}},{id:"document.previousTab",title:"Previous Tab",category:"Document",level:"document",keybinding:["ctrl+shift+tab","mod+shift+tab"],menus:["palette"],group:"2_navigate",when:(o)=>o.document.open,enablement:t,requires:"a second open document in this workspace",run:()=>{Kt(-1)}},{args:Se({path:Fe('Project-relative path of the file to open, e.g. "pages/about.json" or "components/nav-bar.json". It must exist.')}),id:"document.open",title:"Open Document",category:"Document",level:"project",menus:["palette"],group:"1_file",when:(o)=>o.project.open,requires:"an open project",aiTool:{description:"Open a project file as the active document; the document tools then operate on it. Use it when the user should SEE the page, or for iterative visual refinement after creating a page or component.",name:"open_document",report:({after:o,args:r})=>{let i=St("document.open",r,"path"),s=h.value?.documentPath??null;if(s!==i)return`Opened "${i}", but the active document is ${s===null?"none":`"${s}"`}.`;let a=o.editor.kind==="canvas"?"on the canvas; the document tools now operate on it":`in the ${Yp[o.editor.kind]} editor, which is not an element tree the document tools can edit`;return`"${i}" is the active document, ${a}.`}},run:async(o,r)=>{let i=St("document.open",r,"path");if(await e.openFile(i),![...g.tabs.values()].some((s)=>s.documentPath===i))throw RangeError(`command "document.open" argument "path": "${i}" could not be opened — it does `+"not exist, or no editor claims its format. Problems has the reason.")}},{args:Se({file:Fe('Project-relative path of the file to open in the other pane, e.g. "pages/about.json". It must exist.')}),id:"document.openToSide",title:"Open to the Side",category:"Document",level:"project",menus:["context/file","palette"],group:"1_file",when:(o)=>o.project.open,requires:"an open project",undo:"none",run:async(o,r)=>{let i=St("document.openToSide",r,"file"),s=lc(Yo().id);if(await e.openFile(i,{paneId:s.id}),![...g.tabs.values()].some((a)=>a.documentPath===i)){if(lg(s)&&s.id!==mi)ag(s.id);throw RangeError(`command "document.openToSide" argument "file": "${i}" could not be opened — it `+"does not exist, or no editor claims its format. Problems has the reason.")}}},{id:"document.reopenClosed",title:"Reopen Closed Document",category:"Document",level:"document",keybinding:"mod+shift+t",menus:["context/tab","palette"],group:"1_file",enablement:()=>g.closedTabs.length>0,requires:"a document closed in this session",run:async()=>{let o=vo();if(o)await e.openFile(o)}},{id:"document.togglePinned",title:"Pin / Unpin Document",category:"Document",level:"document",menus:["context/tab","palette"],group:"1_file",when:(o)=>o.document.open,requires:"an open document",run:()=>{let o=g.activeTabId,r=o?g.tabs.get(o):null;if(o&&r)b_(o,!r.pinned)}},{args:Se({pinned:$r("True to pin the active document's tab, false to unpin it.")}),id:"document.setPinned",title:"Set Document Pinned",category:"Document",level:"document",menus:["palette"],group:"1_file",when:(o)=>o.document.open,requires:"an open document",run:(o,r)=>{let i=g.activeTabId;if(i&&g.tabs.get(i))b_(i,Bi("document.setPinned",r,"pinned"))}},{id:"document.keepOpen",title:"Keep Document Open",category:"Document",level:"document",menus:["context/tab","palette"],group:"1_file",when:(o)=>o.document.open,enablement:()=>{let o=g.activeTabId;return o!==null&&g.tabs.get(o)?.preview===!0},requires:"a preview document — one opened by a single click",run:()=>{let o=g.activeTabId;if(o)id(o)}}]}function Po(e){let t=()=>g.panes.length>1;return[{id:"pane.splitRight",title:"Split Right",category:"View",level:"document",keybinding:"mod+\\",menus:["context/pane","context/tab","palette"],group:"5_pane",when:(o)=>o.document.open,enablement:()=>g.activeTabId!==null,requires:"an open document",undo:"none",run:()=>{_1()}},{args:Se({path:Fe("Project-relative path of the document to open beside this one.")}),id:"pane.compareWith",title:"Compare With…",category:"View",level:"document",menus:["context/pane","context/tab","palette"],group:"5_pane",when:(o)=>o.document.open,enablement:()=>g.activeTabId!==null,requires:"an open document",undo:"none",run:async(o,r)=>{let i=St("pane.compareWith",r,"path"),s=Yo();if((s.activeTabId?g.tabs.get(s.activeTabId):null)?.documentPath===i)throw RangeError(`command "pane.compareWith" argument "path": "${i}" is the document this pane is `+"already showing — name a different one");await e.openFileInPane(lc(s.id).id,i)}},{id:"pane.focusPrimary",title:"Focus Primary Pane",category:"View",level:"document",keybinding:"mod+0",menus:["palette"],group:"5_pane",enablement:t,requires:"a split pane grid",undo:"none",run:()=>{ko(mi)}},{id:"pane.focusSecondary",title:"Focus Side Pane",category:"View",level:"document",keybinding:"mod+alt+0",menus:["palette"],group:"5_pane",enablement:t,requires:"a split pane grid",undo:"none",run:()=>{ko(og)}},{id:"pane.unsplit",title:"Close Side Pane",category:"View",level:"document",menus:["context/pane","palette"],group:"5_pane",enablement:t,requires:"a second pane",undo:"none",run:So}]}function So(){let e=g.panes.find((t)=>t.derived!==null);if(e?.id===mi){if(e.derived=null,!lg(e))return}ag(e?.id??og)}
2
+ export{p1,jn,Yx,Sy,Wt,ln,br,Zx,Cy,td,fP,f1,Kp,Xx,ER,vh,Qx,Gp,Da,vl,ky,Yp,ia,mP,e_,wh,t_,Ey,m1,gP,Qm,n_,g1,TR,Ty,Hn,Ko,i_,xh,r_,bP,o_,$R,eg,yP,Qt,$y,b1,LR,vP,tg,xn,Ly,Pe,wP,s_,Oa,a_,xP,_P,ng,SP,CP,kP,EP,ra,RR,TP,IR,NR,DR,l_,Ry,Iy,St,ti,c_,Bi,qn,y1,$P,OR,Se,fi,wl,AR,$r,d_,LP,Fe,RP,IP,Vi,Yd,Jn,nd,u_,h_,v1,NP,Aa,_h,Sh,Ny,p_,DP,ro,X,Zd,OP,AP,PR,PP,Xd,MP,FP,w1,jP,oo,Ch,MR,ig,f_,HP,Zp,Xe,rg,Co,BP,m_,VP,g_,WP,zP,Qd,UP,Go,qP,Xp,JP,KP,GP,eu,YP,ZP,XP,QP,eM,x1,tM,mi,og,FR,g,h,Yo,pn,Pa,ko,sg,_1,S1,lc,ag,lg,C1,k1,E1,cg,kh,cc,Qp,xl,T1,Si,id,$1,jR,Dy,b_,HR,tu,BR,VR,Ft,Oy,WR,zR};
3
+
4
+ //# debugId=CEF9503BF9D5E82C64756E2164756E21
5
+ //# sourceMappingURL=studio-ybkd5w8k.js.map