@jxsuite/studio 10.1.0 → 10.2.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 (239) hide show
  1. package/dist/chunks/{2020-mkb0qa6p.js → 2020-bx702wqa.js} +3 -3
  2. package/dist/chunks/adapter-pp011m5x.js +4 -0
  3. package/dist/chunks/add-new-flow-ecqmzz76.js +4 -0
  4. package/dist/chunks/cf-account-picker-c07znkqt.js +4 -0
  5. package/dist/chunks/cf-settings-0v2bmqy0.js +4 -0
  6. package/dist/chunks/components-yn0dn2pq.js +4 -0
  7. package/dist/chunks/content-source-g0j41yy6.js +4 -0
  8. package/dist/chunks/{convert-to-repeater-f92ey3kp.js → convert-to-repeater-sbjk7tgn.js} +3 -3
  9. package/dist/chunks/editor-xz02jeh1.js +4 -0
  10. package/dist/chunks/entry-commands-kmt02crp.js +4 -0
  11. package/dist/chunks/extension-sections-0rprf12d.js +4 -0
  12. package/dist/chunks/file-ops-mexj5qed.js +4 -0
  13. package/dist/chunks/files-b2tcppdd.js +4 -0
  14. package/dist/chunks/format-host-btsevv0c.js +4 -0
  15. package/dist/chunks/fs-events-r0apejva.js +4 -0
  16. package/dist/chunks/grid-open-n2a8xkht.js +4 -0
  17. package/dist/chunks/{grid-view-r22jsqht.js → grid-view-tghcwrrt.js} +12 -12
  18. package/dist/chunks/iframe-host-gx0ypyh3.js +4 -0
  19. package/dist/chunks/index-bs4k9tr6.js +4 -0
  20. package/dist/chunks/{index-pxwwf00y.js → index-vr006kbt.js} +3 -3
  21. package/dist/chunks/{javascript-pzqryby6.js → javascript-z1g3s9fd.js} +2 -2
  22. package/dist/chunks/{jsonMode-tcnyxyap.js → jsonMode-7szwg8c4.js} +5 -5
  23. package/dist/chunks/jx-validate-ymf10teh.js +4 -0
  24. package/dist/chunks/layers-p9nfya38.js +4 -0
  25. package/dist/chunks/layers-panel-tt1hzhhf.js +4 -0
  26. package/dist/chunks/lit-html-x18n2sfz.js +4 -0
  27. package/dist/chunks/media-library-0n45gv8r.js +4 -0
  28. package/dist/chunks/media-picker-s09at95z.js +4 -0
  29. package/dist/chunks/{monaco-binding-bqpge64f.js → monaco-binding-v42w9c1v.js} +3 -3
  30. package/dist/chunks/monaco-buffer-een2ea0v.js +4 -0
  31. package/dist/chunks/{monaco-setup-1mkab762.js → monaco-setup-7bffxd6v.js} +3 -3
  32. package/dist/chunks/notify-qwb8radt.js +4 -0
  33. package/dist/chunks/parse-v77xtwv7.js +4 -0
  34. package/dist/chunks/platform-8jnez0wr.js +4 -0
  35. package/dist/chunks/publish-panel-aysnj611.js +4 -0
  36. package/dist/chunks/{publish-quick-m9vkhahq.js → publish-quick-kpbqs9mz.js} +3 -3
  37. package/dist/chunks/publish-workspace-nd0a8q99.js +4 -0
  38. package/dist/chunks/quick-search-vg0jkhk2.js +4 -0
  39. package/dist/chunks/references-a7v6a0e2.js +4 -0
  40. package/dist/chunks/right-panel-cvk1vxx5.js +4 -0
  41. package/dist/chunks/source-control-fsqzc6he.js +4 -0
  42. package/dist/chunks/studio-05jfwbmf.js +5 -0
  43. package/dist/chunks/{studio-qyb5bebs.js → studio-0q5jwddh.js} +7 -7
  44. package/dist/chunks/{studio-cvz0e00f.js → studio-0w2dr0q8.js} +4 -4
  45. package/dist/chunks/{studio-eesyjg7h.js → studio-1tzpds97.js} +5 -5
  46. package/dist/chunks/{studio-a3s6frde.js → studio-216b27sv.js} +3 -3
  47. package/dist/chunks/studio-2ejhqns4.js +5 -0
  48. package/dist/chunks/studio-2r90cts3.js +16 -0
  49. package/dist/chunks/{studio-dy2xtt7a.js → studio-399a25za.js} +4 -4
  50. package/dist/chunks/studio-399xknkb.js +6 -0
  51. package/dist/chunks/{studio-jh6t5qz4.js → studio-43y04qck.js} +4 -4
  52. package/dist/chunks/{studio-skynbac3.js → studio-4g8yb6jn.js} +2 -2
  53. package/dist/chunks/{studio-jw0q5j6k.js → studio-4jhw38b2.js} +4 -4
  54. package/dist/chunks/{studio-4smcnv33.js → studio-4ncmwqw5.js} +4 -4
  55. package/dist/chunks/studio-5atwjgkj.js +7 -0
  56. package/dist/chunks/{studio-vcz63n42.js → studio-5frqk7c0.js} +4 -4
  57. package/dist/chunks/{studio-hsr3k06v.js → studio-646nn2ys.js} +5 -5
  58. package/dist/chunks/{studio-ch8gt8vt.js → studio-6cwj6xrx.js} +4 -4
  59. package/dist/chunks/studio-6hzdjfv0.js +5 -0
  60. package/dist/chunks/{studio-9cp96v90.js → studio-71m92v9s.js} +7 -7
  61. package/dist/chunks/{studio-brdp85q7.js → studio-75kcdbsk.js} +4 -4
  62. package/dist/chunks/{studio-6vwvshw8.js → studio-78pywnp2.js} +5 -5
  63. package/dist/chunks/{studio-ggm7zf70.js → studio-86r8hp7r.js} +5 -5
  64. package/dist/chunks/studio-886t6ztg.js +5 -0
  65. package/dist/chunks/{studio-5dmgmyw4.js → studio-8wnvtr4z.js} +4 -4
  66. package/dist/chunks/studio-8z66jk4z.js +5 -0
  67. package/dist/chunks/{studio-x2metr13.js → studio-9rbe2xpw.js} +3 -3
  68. package/dist/chunks/{studio-8qejv8yf.js → studio-awxwjawq.js} +4 -4
  69. package/dist/chunks/studio-b2qpt0xy.js +14 -0
  70. package/dist/chunks/{studio-9rcbvksg.js → studio-bvs9kpst.js} +7 -7
  71. package/dist/chunks/studio-c71806xz.js +7 -0
  72. package/dist/chunks/{studio-vjhej0w5.js → studio-cbwks69x.js} +140 -140
  73. package/dist/chunks/studio-cg1bfyhf.js +9 -0
  74. package/dist/chunks/studio-cg710sk9.js +5 -0
  75. package/dist/chunks/studio-cw0wb9qk.js +7 -0
  76. package/dist/chunks/studio-cyheys7k.js +5 -0
  77. package/dist/chunks/studio-ea5m9kg5.js +5 -0
  78. package/dist/chunks/{studio-4nkm4404.js → studio-ea74s8c1.js} +4 -4
  79. package/dist/chunks/{studio-37twdaf7.js → studio-efdxjwyp.js} +34 -34
  80. package/dist/chunks/{studio-pmzg17fj.js → studio-egmw2837.js} +4 -4
  81. package/dist/chunks/{studio-8jb31dcf.js → studio-er5f383a.js} +4 -4
  82. package/dist/chunks/studio-f746039f.js +5 -0
  83. package/dist/chunks/studio-fmdymd9v.js +5 -0
  84. package/dist/chunks/studio-gcm12z00.js +6 -0
  85. package/dist/chunks/{studio-t3j8htp7.js → studio-gj98m8gy.js} +5 -5
  86. package/dist/chunks/{studio-cgb97rwv.js → studio-hasbgjah.js} +4 -4
  87. package/dist/chunks/studio-hhp4x8xf.js +6 -0
  88. package/dist/chunks/{studio-848rk4p1.js → studio-hz5n7x27.js} +4 -4
  89. package/dist/chunks/{studio-0g2sm01j.js → studio-j3d2fjqz.js} +4 -4
  90. package/dist/chunks/studio-jeraxdgv.js +7 -0
  91. package/dist/chunks/studio-jvgek9xt.js +5 -0
  92. package/dist/chunks/studio-jws1a87n.js +5 -0
  93. package/dist/chunks/studio-k2sz13zg.js +5 -0
  94. package/dist/chunks/studio-k3m4jkdk.js +5 -0
  95. package/dist/chunks/{studio-7vb997ff.js → studio-kg1abnz0.js} +4 -4
  96. package/dist/chunks/{studio-s0fg2wav.js → studio-kg5ya5r2.js} +4 -4
  97. package/dist/chunks/studio-khwbgrtg.js +5 -0
  98. package/dist/chunks/studio-mx6wzh25.js +5 -0
  99. package/dist/chunks/studio-mxs3ar9t.js +5 -0
  100. package/dist/chunks/studio-nm4szey4.js +5 -0
  101. package/dist/chunks/studio-nqxqf8p2.js +4 -0
  102. package/dist/chunks/{studio-07k0geap.js → studio-pjtntksy.js} +4 -4
  103. package/dist/chunks/studio-qh8berdz.js +5 -0
  104. package/dist/chunks/studio-qn7z4krm.js +5 -0
  105. package/dist/chunks/studio-qyed0ah6.js +5 -0
  106. package/dist/chunks/{studio-5e7p1vgd.js → studio-r4bcdwhq.js} +4 -4
  107. package/dist/chunks/{studio-mwnmzx7g.js → studio-r7pf0rkv.js} +6 -6
  108. package/dist/chunks/studio-rtfnhrdg.js +5 -0
  109. package/dist/chunks/{studio-zacvfm31.js → studio-rzqaz21g.js} +4 -4
  110. package/dist/chunks/studio-s5tzw84t.js +5 -0
  111. package/dist/chunks/{studio-nf0pqpbj.js → studio-sevbc3xv.js} +4 -4
  112. package/dist/chunks/{studio-va0e63sk.js → studio-sxdb9h3q.js} +6 -6
  113. package/dist/chunks/studio-t51y8v1d.js +5 -0
  114. package/dist/chunks/{studio-pd9dsqpq.js → studio-t98vq4r6.js} +4 -4
  115. package/dist/chunks/studio-th7z3fg7.js +5 -0
  116. package/dist/chunks/studio-tsxpqvh0.js +6 -0
  117. package/dist/chunks/{studio-7823f0g8.js → studio-v1yascv2.js} +4 -4
  118. package/dist/chunks/{studio-tpy3rdxn.js → studio-wc6za3zs.js} +4 -4
  119. package/dist/chunks/{studio-5m0w815d.js → studio-wxq6v5sv.js} +4 -4
  120. package/dist/chunks/{studio-ahf3cspq.js → studio-y60sts62.js} +3 -3
  121. package/dist/chunks/studio-ybnwymxw.js +5 -0
  122. package/dist/chunks/studio-zndrqawb.js +5 -0
  123. package/dist/chunks/studio-zwaxn5s2.js +5 -0
  124. package/dist/chunks/{tsMode-6vwhy6ty.js → tsMode-f54j66ym.js} +5 -5
  125. package/dist/chunks/workspace-home-x1787wpv.js +4 -0
  126. package/dist/chunks/workspace-zpe1np43.js +4 -0
  127. package/dist/chunks/{ws-client-zcxkfgmf.js → ws-client-e8kj684q.js} +3 -3
  128. package/dist/manifest.json +76 -75
  129. package/dist/studio.js +81 -82
  130. package/package.json +4 -4
  131. package/src/browse/library-model.ts +56 -23
  132. package/src/commands/context.ts +1 -0
  133. package/src/editor/shortcuts.ts +3 -0
  134. package/src/panels/data-grid.ts +0 -4
  135. package/src/panels/settings-menu.ts +3 -3
  136. package/src/panels/settings-pane.ts +42 -56
  137. package/src/services/ai-import-tools.ts +6 -3
  138. package/src/services/ai-models.ts +65 -11
  139. package/src/services/ai-settings.ts +45 -5
  140. package/src/services/document-assistant.ts +5 -2
  141. package/src/services/settings/definitions.ts +19 -0
  142. package/src/settings/contributed-section.ts +16 -7
  143. package/src/settings/css-vars-editor.ts +4 -4
  144. package/src/settings/general-settings.ts +1 -4
  145. package/src/settings/preferences-accounts.ts +2 -2
  146. package/src/settings/preferences-dialog.ts +4 -2
  147. package/src/settings/project-sections.ts +1 -1
  148. package/src/settings/section-registry.ts +5 -4
  149. package/src/settings/settings-document.ts +33 -24
  150. package/src/settings/settings-workspace.ts +205 -0
  151. package/src/shell.ts +31 -6
  152. package/src/surfaces/ai-credentials-form.json +59 -5
  153. package/src/surfaces/ai-credentials-form.ts +15 -2
  154. package/src/surfaces/commandbar.ts +7 -3
  155. package/src/surfaces/settings-contributed.json +4 -4
  156. package/src/surfaces/settings-contributed.ts +2 -2
  157. package/src/surfaces/settings-pane.json +262 -180
  158. package/src/surfaces/settings-pane.ts +63 -14
  159. package/src/ui/ai-credentials-form.ts +128 -11
  160. package/src/ui/regions.ts +5 -5
  161. package/src/workspace/tab-workspace.ts +3 -2
  162. package/src/workspace/workspace-home.ts +18 -4
  163. package/src/workspace/workspace-ids.ts +40 -7
  164. package/dist/chunks/adapter-xcpsmecx.js +0 -4
  165. package/dist/chunks/add-new-flow-ptmhmzr9.js +0 -4
  166. package/dist/chunks/cf-account-picker-z1sgwpwd.js +0 -4
  167. package/dist/chunks/cf-settings-xqvhxxe9.js +0 -4
  168. package/dist/chunks/components-whsc81a7.js +0 -4
  169. package/dist/chunks/content-source-jwtxg78w.js +0 -4
  170. package/dist/chunks/editor-zdqdpq1x.js +0 -4
  171. package/dist/chunks/entry-commands-w8p2fbpt.js +0 -4
  172. package/dist/chunks/extension-sections-y2p1te2r.js +0 -4
  173. package/dist/chunks/file-ops-13ab4swj.js +0 -4
  174. package/dist/chunks/files-zbc8p6v1.js +0 -4
  175. package/dist/chunks/format-host-zjsbktbx.js +0 -4
  176. package/dist/chunks/fs-events-t6x0hch6.js +0 -4
  177. package/dist/chunks/grid-open-fyzdwpkh.js +0 -4
  178. package/dist/chunks/iframe-host-kbyqc7pt.js +0 -4
  179. package/dist/chunks/index-6nvj89vb.js +0 -4
  180. package/dist/chunks/jx-validate-5sp8a4rm.js +0 -4
  181. package/dist/chunks/layers-panel-qrxj9vr2.js +0 -4
  182. package/dist/chunks/layers-tpzayggx.js +0 -4
  183. package/dist/chunks/lit-html-x6nrxsx3.js +0 -4
  184. package/dist/chunks/media-library-ywppnjrz.js +0 -4
  185. package/dist/chunks/media-picker-etxgc8qq.js +0 -4
  186. package/dist/chunks/monaco-buffer-qrnqhk0b.js +0 -4
  187. package/dist/chunks/notify-kcv38wwe.js +0 -4
  188. package/dist/chunks/parse-df2kkmhc.js +0 -4
  189. package/dist/chunks/platform-dtsysmyd.js +0 -4
  190. package/dist/chunks/publish-panel-evb1rcxt.js +0 -4
  191. package/dist/chunks/publish-workspace-ktk9h536.js +0 -4
  192. package/dist/chunks/quick-search-2f47fxcw.js +0 -4
  193. package/dist/chunks/references-5w6ajjv7.js +0 -4
  194. package/dist/chunks/right-panel-kz0a6byf.js +0 -4
  195. package/dist/chunks/source-control-1phx90zk.js +0 -4
  196. package/dist/chunks/studio-0hr000ba.js +0 -5
  197. package/dist/chunks/studio-1wyp7dt5.js +0 -5
  198. package/dist/chunks/studio-20ap8dds.js +0 -5
  199. package/dist/chunks/studio-291gqh98.js +0 -5
  200. package/dist/chunks/studio-4zqfw5ha.js +0 -5
  201. package/dist/chunks/studio-56egy6vf.js +0 -5
  202. package/dist/chunks/studio-695k95bw.js +0 -5
  203. package/dist/chunks/studio-732mw0g8.js +0 -5
  204. package/dist/chunks/studio-76t560kn.js +0 -6
  205. package/dist/chunks/studio-8486jn4r.js +0 -5
  206. package/dist/chunks/studio-8x8616xd.js +0 -5
  207. package/dist/chunks/studio-bkmv1h3e.js +0 -9
  208. package/dist/chunks/studio-cqf1k4qk.js +0 -5
  209. package/dist/chunks/studio-dbgv4fv9.js +0 -16
  210. package/dist/chunks/studio-et6t8g4m.js +0 -4
  211. package/dist/chunks/studio-f2j9et3h.js +0 -14
  212. package/dist/chunks/studio-fep7hr66.js +0 -7
  213. package/dist/chunks/studio-fyf7j57j.js +0 -5
  214. package/dist/chunks/studio-g5prntab.js +0 -5
  215. package/dist/chunks/studio-ga77mf07.js +0 -5
  216. package/dist/chunks/studio-h7gy12h2.js +0 -5
  217. package/dist/chunks/studio-j933k8nr.js +0 -5
  218. package/dist/chunks/studio-jgbvqcgh.js +0 -5
  219. package/dist/chunks/studio-k4xc5g6h.js +0 -5
  220. package/dist/chunks/studio-p0nf2e1f.js +0 -6
  221. package/dist/chunks/studio-pzfa2vmb.js +0 -5
  222. package/dist/chunks/studio-rf8d6p9f.js +0 -7
  223. package/dist/chunks/studio-rt498t2v.js +0 -5
  224. package/dist/chunks/studio-sd07xva5.js +0 -6
  225. package/dist/chunks/studio-thj81e98.js +0 -7
  226. package/dist/chunks/studio-tyw7tk0x.js +0 -5
  227. package/dist/chunks/studio-vffwe9k7.js +0 -5
  228. package/dist/chunks/studio-vxjap704.js +0 -5
  229. package/dist/chunks/studio-w67vfgy5.js +0 -5
  230. package/dist/chunks/studio-xebavr9s.js +0 -5
  231. package/dist/chunks/studio-yg5n49za.js +0 -5
  232. package/dist/chunks/studio-yhz5b313.js +0 -5
  233. package/dist/chunks/studio-zsjpsw08.js +0 -5
  234. package/dist/chunks/studio-zxm98z2m.js +0 -7
  235. package/dist/chunks/workspace-d65bz1qk.js +0 -4
  236. package/dist/chunks/workspace-home-vbg9b3jh.js +0 -4
  237. package/src/settings/settings-dialog.ts +0 -192
  238. package/src/surfaces/settings-dialog.json +0 -51
  239. package/src/surfaces/settings-dialog.ts +0 -169
@@ -1,5 +1,5 @@
1
- import{VA}from"./studio-f2j9et3h.js";import{bC,h}from"./studio-j933k8nr.js";import{g}from"./studio-ahf3cspq.js";import{T,R}from"./studio-cvz0e00f.js";import{Wt}from"./studio-5e7p1vgd.js";import{Se}from"./studio-tpy3rdxn.js";import{n,Z,Ze,_,v,Me,Oa,Ma}from"./studio-zsjpsw08.js";var B={anyOf:[{additionalProperties:!1,description:"Two-way: `target` is the test, `value` the tag when it is truthy, `initial` the tag when it is not.",properties:{initial:{$ref:"#/$defs/TagName"},operator:{const:"?:",type:"string"},target:{$ref:"#/$defs/ExpressionOperand"},value:{$ref:"#/$defs/TagName"}},required:["operator","target","value","initial"],title:"?: — the tag when the test holds, and the tag when it does not"},{additionalProperties:!1,description:"Multiway: `target` is the discriminant, matched against case keys by its string form. "+"`default` is required — an element with no tag cannot exist.",properties:{cases:{additionalProperties:{$ref:"#/$defs/TagName"},type:"object"},default:{$ref:"#/$defs/TagName"},operator:{const:"switch",type:"string"},target:{$ref:"#/$defs/ExpressionOperand"}},required:["operator","target","cases","default"],title:"switch — one tag per discriminant value, with a required fallback"}],description:"A tag name chosen at element creation. Every branch resolves to a `TagName`, so the candidate set is enumerable without evaluating anything."},G={anyOf:[{$ref:"#/$defs/TagName"},{additionalProperties:!1,properties:{$expression:{$ref:"#/$defs/TagExpression"}},required:["$expression"],type:"object"}]};var K={description:"HTML element tag name or custom element name (must contain a hyphen per Web Components spec). "+"A NAME, never an expression: no `${…}` position in the pipeline evaluates a tagName. Use "+"`$switch`/`cases` to vary the element.",minLength:1,pattern:"^[a-zA-Z][a-zA-Z0-9._-]*$",type:"string"};var Y={oneOf:[{type:"string"},{$ref:"#/$defs/RefObject"}]};var Ce={additionalProperties:!0,description:"A page-level <head> entry. Defines meta tags, link tags, script tags, etc.",properties:{attributes:{additionalProperties:{oneOf:[{type:"string"},{type:"boolean"}]},type:"object"},children:{items:{$ref:"#/$defs/HeadEntry"},type:"array"},tagName:{type:"string"},textContent:{description:"Element content. An object is serialized to JSON inside the tag — that is how a "+'JSON-LD block (`<script type="application/ld+json">`) is authored.',oneOf:[{type:"string"},{type:"object"}]}},required:["tagName"],type:"object"};var Ee={description:"Reference to a $defs type definition in the current component.",examples:["#/$defs/Count","#/$defs/TodoItem","#/$defs/Status"],pattern:String.raw`^#/\$defs/`,type:"string"};var Re={description:"Reference to an external Jx component file.",examples:["./card.json","https://cdn.example.com/button.json"],pattern:String.raw`^(\./|\.\./).*\.json$|^https?://`,type:"string"};var Pe={description:"Reference to the current Array map iteration context.",examples:["$map/item","$map/index","$map/item/text","$map/item/done"],pattern:String.raw`^\$map/(item|index)(/.*)?$`,type:"string"};var X={additionalProperties:!1,description:"A $ref binding. Resolves to a state entry (reactive) or plain value (static).",properties:{$ref:{$ref:"#/$defs/AnyRef"}},required:["$ref"],type:"object"};var H={additionalProperties:{anyOf:[{type:"string"},{type:"number"},{$ref:"#/$defs/RefObject"},{$ref:"#/$defs/StyleObject"}]},description:"CSS style definition. camelCase property names follow CSSOM convention. Keys starting with :, ., &, or [ are treated as nested CSS selectors. Keys matching $media breakpoint names (or other @-prefixed at-rules) group nested rules. Nesting is recursive: selector and at-rule groups may nest to arbitrary depth "+"(e.g. breakpoint → selector → pseudo-class), mirroring the compiler's recursive emission. "+"An object carrying $ref is a reactive VALUE, and the runtime reads it as one. It also matches the nested-block branch vacuously, since a block admits a string under any key, which is why these branches are anyOf rather than oneOf. A DECLARATION at-rule (@font-face, @property, @position-try, @counter-style) may hold an ARRAY of blocks, which is that key written more than once, in order: an object's keys are "+"unique, so @font-face — the at-rule whose identity is not in its key — could not otherwise "+"state a family's second weight at all.",patternProperties:{"^@(font-face|property|position-try|counter-style)":{anyOf:[{$ref:"#/$defs/StyleObject"},{items:{$ref:"#/$defs/StyleObject"},minItems:1,type:"array"}]}},properties:{$description:{description:"Why this rule exists. Emitted as a comment by static builds, ignored at runtime.",type:"string"}},type:"object"};var q={additionalProperties:!1,description:"Dynamic mapped list. Re-renders when the items state entry changes.",properties:{$prototype:{const:"Array",type:"string"},filter:{$ref:"#/$defs/RefObject"},items:{oneOf:[{$ref:"#/$defs/RefObject"},{type:"array"}]},key:{additionalProperties:!1,description:"The identity of each rendered row: a $map/item pointer read per item. A row whose key survives a change keeps its DOM node and its effects across reorders, insertions and "+"removals; without a key, rows are keyed by index. $map/index is not a key — an index "+"names a position, not a row.",properties:{$ref:{pattern:String.raw`^\$map/item(/.+)?$`,type:"string"}},required:["$ref"],type:"object"},map:{$ref:"#/$defs/ElementDef"},sort:{$ref:"#/$defs/RefObject"}},required:["$prototype","items","map"],type:"object"},Ae={description:"Array of child definitions — elements, text, or Array namespaces (dynamic lists) mixed "+"freely. A bare Array namespace (the whole children slot is one dynamic list) is also "+"accepted for backward compatibility, as is a ${…} template string that resolves at build "+"time to an array of child definitions.",oneOf:[{items:{anyOf:[{$ref:"#/$defs/ElementDef"},{$ref:"#/$defs/SwitchNode"},{$ref:"#/$defs/ArrayNamespace"},{type:"string"},{type:"number"}]},type:"array"},{$ref:"#/$defs/ArrayNamespace"},{description:"Computed children — a ${…} template that resolves at build time to an array of child "+'definitions (e.g. "${state.entry.$children}" for parsed content). A bare plain-text string is NOT a valid children value; text children must be array items.',pattern:String.raw`\$\{`,type:"string"}]};var Q={additionalProperties:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{$ref:"#/$defs/RefObject"}]},description:"HTML attributes and ARIA attributes set via element.setAttribute().",type:"object"},ee={additionalProperties:{anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object"},{$ref:"#/$defs/RefObject"}]},description:"Explicit prop passing at a component boundary.",type:"object"},te={oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"},{$ref:"#/$defs/RefObject"}]},re={additionalProperties:!1,description:"Reactive $ref that drives which case to render: a state entry, or inside a mapped array's template the row's $map/item or $map/index (spec §14.1).",properties:{$ref:{oneOf:[{$ref:"#/$defs/StateRef"},{$ref:"#/$defs/MapRef"}],type:"string"}},required:["$ref"],type:"object"};var oe={additionalProperties:!1,description:'A function declaration. $prototype must be "Function". body (inline) and $src (external) are mutually exclusive. First parameter is always state (the reactive scope).',properties:{$export:{description:"Named export in $src module. Defaults to the state key name.",type:"string"},$lazy:{description:"Load $src on first call instead of importing it up front. The function then returns a "+"promise, so it may only be called from a handler or lifecycle hook — never bound as a "+"computed value. Use it for code most visitors never reach.",type:"boolean"},$prototype:{const:"Function",type:"string"},$src:{description:"External module specifier. Mutually exclusive with body.",examples:["./counter.js","npm:@myorg/validators"],type:"string"},arguments:{description:"Legacy alias for parameters: bare string parameter names (state may be listed explicitly as the first name). Superseded by parameters.",examples:[["state","event"]],items:{type:"string"},type:"array"},body:{description:"Inline function body: an opaque JS source string (first implicit parameter is state), or a structured statement array (spec §20) — explicit structured function declaration, analyzable by tooling and editable visually. The escalation ladder within the shape is structured statements → JS string.",examples:["state.count++",'state.items.push({ id: Date.now(), text: "", done: false })','return state.score >= 90 ? "gold" : "silver"',[{operator:"push",target:{$ref:"#/state/cart"},value:1},{dispatchEvent:"cart-changed",detail:{$ref:"#/state/cart"}}]],oneOf:[{type:"string"},{$ref:"#/$defs/StatementList"}]},description:{type:"string"},emits:{description:"Array of CEM-compatible Event objects this function dispatches. Used for CEM extraction and studio event discovery.",items:{$ref:"#/$defs/CemEvent"},type:"array"},name:{description:"Explicit function name. Defaults to the state key name.",type:"string"},parameters:{description:"Function parameters (after the implicit state parameter). Accepts CEM-compatible parameter objects or bare string names for backward compatibility.",examples:[["event"],[{name:"event",type:{text:"Event"}}],[{description:"Item identifier",name:"id",type:{text:"number"}}]],items:{oneOf:[{type:"string"},{$ref:"#/$defs/CemParameter"}]},type:"array"},type:{description:"Return type for tooling (JSON Schema or CEM { text } format)."}},required:["$prototype"],type:"object"};var Fe={additionalProperties:!1,description:"A JSON Pointer $ref operand within an expression node. $args/<name> resolves a named formula's parameter (callable entries only).",properties:{$ref:{pattern:String.raw`^(\$map/|\$reduce/|\$args/|event#/|#/|parent#/|window#/|document#/)`,type:"string"}},required:["$ref"],type:"object"},Ne={anyOf:[{not:{pattern:String.raw`\$\{`},type:"string"},{type:"number"},{type:"boolean"},{type:"null"},{items:{$ref:"#/$defs/ExpressionOperand"},type:"array"},{description:"Plain-object literal (e.g. an Intl options bag). Objects carrying $ref or operator keys are pointers/nodes, never literals.",not:{anyOf:[{required:["$ref"]},{required:["operator"]}]},type:"object"}],description:"A non-reactive operand: scalar, plain-object literal, or array of operands."};var Te={additionalProperties:!1,description:"The core expression node. operator + target, with value gated by arity.",oneOf:[{not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{operator:{$ref:"#/$defs/UnaryOperator"}},required:["operator"],title:"Unary — target only, no value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/BinaryOperator"}},required:["operator","value"],title:"Binary — left in target, right in value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/AssignmentOperator"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator","value"],title:"Assignment — writable target, value required"},{not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{operator:{$ref:"#/$defs/NoArgMethod"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator"],title:"pop / shift — array receiver, no value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/OneArgMethod"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator","value"],title:"push / unshift — array receiver, single value argument"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/SpliceMethod"},target:{$ref:"#/$defs/ExpressionPointer"},value:{items:{$ref:"#/$defs/ExpressionOperand"},minItems:1,type:"array"}},required:["operator","value"],title:"splice — array receiver, [start, deleteCount, ...items]"},{properties:{operator:{$ref:"#/$defs/ReduceMethod"},target:{anyOf:[{$ref:"#/$defs/ExpressionPointer"},{$ref:"#/$defs/ExpressionNode"}]},value:{$ref:"#/$defs/ExpressionNode"}},required:["operator","value","initial"],title:"reduce — pure fold over a pointer or derived array; seed in initial"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/MapFilterMethod"},target:{anyOf:[{$ref:"#/$defs/ExpressionPointer"},{$ref:"#/$defs/ExpressionNode"}]},value:{$ref:"#/$defs/ExpressionNode"}},required:["operator","value"],title:"map / filter — pure over a pointer or derived array; per-item expression in value"},{description:"The ECMAScript conditional (ternary) operator, pure: target is the test, value the consequent, initial the alternate (the reduce precedent for repurposing initial). Chain else-if by nesting another ?: node in initial.",properties:{operator:{$ref:"#/$defs/ConditionalOperator"}},required:["operator","value","initial"],title:"?: — pure conditional; test in target, consequent in value, alternate in initial"},{description:"Value-keyed multiway selection, pure: target is the discriminant (matched against case keys by its string form, like element-level $switch), cases maps matched values to result operands, default is the operand when no case matches (result is undefined without it). Condition-chain branching composes from nested ?: nodes instead.",not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{cases:{additionalProperties:{$ref:"#/$defs/ExpressionOperand"},type:"object"},default:{$ref:"#/$defs/ExpressionOperand"},operator:{$ref:"#/$defs/SwitchOperator"}},required:["operator","cases"],title:"switch — pure value-keyed selection; discriminant in target, results in cases/default"},{description:"A pure standard-library method call: target is the receiver (any operand — never mutated; change-by-copy names replace the mutating originals), value the optional argument (bare scalar) or argument list (array). A missing receiver or method yields undefined, matching null-safe path reads.",not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/PureMethod"}},required:["operator"],title:"Pure method — genuine prototype methods; receiver in target, args in value"},{description:"Invoke a callable, pure in formula position: target is the callee pointer — a named formula entry (#/state/…) or a blessed pure global via window#/ (Math.*, JSON.*, Object.keys/values/entries, and "+`${VA()}) — and value is the positional argument list (the splice args-in-value precedent). Argument order follows the callee's declared parameters.`,not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/CallOperator"},target:{$ref:"#/$defs/ExpressionPointer"},value:{items:{$ref:"#/$defs/ExpressionOperand"},type:"array"}},required:["operator"],title:"call — invoke a named formula or blessed global; callee in target, args in value"}],properties:{cases:{additionalProperties:{$ref:"#/$defs/ExpressionOperand"},description:"switch only: matched discriminant value (string form) → result operand.",type:"object"},default:{$ref:"#/$defs/ExpressionOperand",description:"switch only: result operand when no case key matches."},initial:{$ref:"#/$defs/ExpressionOperand"},operator:{type:"string"},target:{$ref:"#/$defs/ExpressionOperand"},value:{$ref:"#/$defs/ExpressionOperand"}},required:["operator","target"],type:"object"},ne={additionalProperties:!1,description:"A declarative expression entry (Shape 5). Used as a state entry or inline event handler. With parameters it is a named formula: a pure, reusable computation invoked via the call operator, its parameters resolved through $args/<name> refs in the body.",properties:{$description:{type:"string"},$expression:{$ref:"#/$defs/ExpressionNode"},$title:{type:"string"},parameters:{description:"Named-formula parameters (CEM convention, as on Function entries): bare names or CEM parameter objects. Present ⇒ the entry is callable, not a computed value.",items:{anyOf:[{type:"string"},{$ref:"#/$defs/CemParameter"}]},type:"array"}},required:["$expression"],type:"object"};var De={description:"A single state entry. Shape is determined by value type: "+"scalar/array → naked reactive property, string with ${} → computed, "+'object with $prototype: "Function" → function, '+"object with $prototype: <other> → data source, "+"object with type and default → typed reactive property, "+"plain object → naked object reactive property.",oneOf:[{type:"number"},{type:"boolean"},{type:"null"},{type:"string"},{type:"array"},{$ref:"#/$defs/TypedStateDef"},{$ref:"#/$defs/FunctionDef"},{$ref:"#/$defs/ExternalClassDef"},{$ref:"#/$defs/ExpressionEntry"},{not:{anyOf:[{required:["$prototype"]},{required:["default"]},{required:["type"]},{required:["$expression"]}]},type:"object"}]};var Je={description:"Format participation marker. A class carrying this block is auto-discovered from the project imports map and used for file-extension dispatch by the compiler, server, and studio.",properties:{documentKinds:{description:'"page"/"component" allow the extension in pages/components discovery; "content" allows it as a content-type source.',items:{enum:["page","component","content"],type:"string"},type:"array"},exportTarget:{description:"When true, site builds emit a serialized sidecar per page in this format.",type:"boolean"},extensions:{description:'File extensions this format claims, with leading dot (e.g. [".md"]).',items:{pattern:String.raw`^\.`,type:"string"},minItems:1,type:"array"},mediaType:{description:"MIME type for the format (icons, labels, HTTP).",type:"string"},remote:{description:"When true, the load capability accepts http(s) URLs as sources.",type:"boolean"}},required:["extensions"],type:"object"},qe={additionalProperties:!1,description:"Project-section admission block (specs/extensions.md §9). A class carrying this block owns "+"the project.json section named by `key`; hosts dispatch that section's data through the class's projectData/resolvePaths capabilities.",properties:{description:{type:"string"},key:{description:"The project.json top-level section this class owns (exclusive per project).",type:"string"},referenceable:{description:"Whether section entries can be referenced from documents (e.g. content types).",type:"boolean"},title:{type:"string"}},required:["key"],type:"object"},Le={additionalProperties:!1,description:"Server-mount admission block (specs/extensions.md §11). A class carrying this block mounts "+"routes under its /_jx/ basePath in the site worker and dev server.",properties:{basePath:{description:"Route subtree this class mounts — must be under /_jx/ (exclusive per project).",examples:["/_jx/data","/_jx/auth"],type:"string"},module:{description:"Module specifier exporting the mount handler.",type:"string"},order:{description:"Mount order (ascending; default 100).",type:"number"}},required:["basePath"],type:"object"},Ve={description:"Connection-provider admission block (specs/extensions.md §12). A class carrying this block "+"provides database connections of the given provider/kind.",properties:{kind:{description:"SQL dialect family the provider speaks.",enum:["sqlite","postgres"],type:"string"},local:{description:"Local-development substitute provider (e.g. sqlite for D1).",type:"string"},module:{description:"Module specifier exporting the provider implementation.",type:"string"},provider:{description:"Provider identifier (e.g. d1, supabase, sqlite).",type:"string"},serve:{description:"Module specifier exporting the serve-time worker binding.",type:"string"}},required:["provider","kind"],type:"object"};var cw=[301,302,303,307,308],He={description:"Schema for Jx project.json files. A project.json file is the root anchor file for a Jx project, declaring site metadata, default settings, global styles, extensions, and build configuration. Open by design: extension-contributed sections (e.g. `content`) are opaque top-level keys; the generated per-project entry document (project.schema.json) closes the composition.",properties:{$defs:{description:"Global type definitions available to all pages.",type:"object"},$elements:{description:"Global custom element dependencies available to all pages. Items are $ref objects or npm package specifier strings.",items:{oneOf:[{additionalProperties:!1,properties:{$ref:{type:"string"}},required:["$ref"],type:"object"},{type:"string"}]},type:"array"},$head:{description:"Global <head> entries applied to all pages. Array of element definitions for meta tags, link tags, script tags, etc.",examples:[[{attributes:{href:"/favicon.svg",rel:"icon"},tagName:"link"},{attributes:{content:"Jx",name:"generator"},tagName:"meta"}]],items:{properties:{attributes:{additionalProperties:{type:"string"},type:"object"},tagName:{type:"string"}},type:"object"},type:"array"},$media:{additionalProperties:{type:"string"},description:'Named media breakpoints following CSS @custom-media convention. Available in all component style objects. Declaring a pure color-scheme query (e.g. "--dark": "(prefers-color-scheme: dark)") additionally opts the site into the forced-scheme contract: @--dark style blocks are dual-emitted so a data-color-scheme attribute on <html> overrides the OS preference, color-scheme is declared on :root, and a pre-paint script restores the '+"visitor's persisted choice (spec §9.5).",examples:[{"--dark":"(prefers-color-scheme: dark)","--lg":"(min-width: 1024px)","--md":"(min-width: 768px)","--sm":"(min-width: 640px)"}],type:"object"},$schema:{description:"Relative path to the generated per-project schema (conventionally ./project.schema.json, written by `jx schema`).",type:"string"},build:{description:"Build configuration.",properties:{adapter:{description:"Platform adapter for deployment-specific output.",enum:["static","cloudflare-pages","cloudflare-workers","node","bun"],type:"string"},deploy:{additionalProperties:!1,description:"Deployment tracking: the hosting project this repo publishes to. Identifiers "+"only (no secrets) — safe to commit; Studio uses it to tell whether the publish "+"workflow already exists. `adapter` says how the build is packaged; `deploy` says where it ships.",properties:{accountId:{description:"Hosting account id (e.g. the Cloudflare account id).",type:"string"},productionUrl:{description:"Production URL of the connected hosting project.",type:"string"},projectName:{description:"Hosting project name (e.g. the Cloudflare Pages project).",pattern:"^[a-z0-9][a-z0-9-]*$",type:"string"},provider:{description:"Hosting provider the project is connected to.",enum:["cloudflare-pages"],type:"string"}},required:["provider","accountId","projectName"],type:"object"},format:{default:"directory",description:"Reserved; currently unused. Accepted for forward compatibility with single-file output (desktop single-file mode) — the build emits per-route directories regardless.",enum:["directory","single"],type:"string"},outDir:{default:"./dist",description:"Output directory for compiled site.",type:"string"},headers:{additionalProperties:!1,description:"Emit dist/_headers — the response headers only the build can know. Honored by "+"Cloudflare Pages/Workers assets and Netlify; on the node/bun adapters the file documents what a reverse proxy in front of them must send.",properties:{cache:{default:"auto",description:'"auto" marks the content-addressed image variants immutable (RFC 8246) and revalidates everything else (RFC 9111). "off" emits no Cache-Control at all.',enum:["auto","off"],type:"string"},enabled:{default:!0,type:"boolean"},rules:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},description:"Verbatim rules, merged after the generated block.",propertyNames:{pattern:"^/"},type:"object"},security:{additionalProperties:!1,properties:{contentTypeOptions:{default:!0,type:"boolean"},csp:{default:!1,description:"CSP Level 3. Off by default: unlike the other security headers this one "+"governs code the build cannot see — a third-party script that loads a "+"second script, a widget that opens a frame — so turning it on is a change "+"to verify in the browser console, not a safe default. `script-src` is derived from the inline scripts and external origins the build emitted; `style-src` keeps 'unsafe-inline', because per-page <style> blocks and per-element style attributes have no site-wide hash.",oneOf:[{type:"boolean"},{const:"report-only"},{additionalProperties:!1,properties:{directives:{additionalProperties:{oneOf:[{type:"string"},{const:!1}]},description:"Replace (string) or remove (false) a computed directive. A replacement is wholesale, so an addition restates the defaults.",type:"object"},mode:{default:"enforce",enum:["enforce","report-only"]},reportUri:{format:"uri-reference",type:"string"}},type:"object"}]},frameOptions:{default:"SAMEORIGIN",oneOf:[{enum:["DENY","SAMEORIGIN"],type:"string"},{const:!1}]},hsts:{default:!1,description:"RFC 6797. Off by default: a wrong max-age locks the apex domain to HTTPS for that long, and the mistake is invisible until a certificate lapses. `preload` requires `includeSubDomains` and is a build error without it.",oneOf:[{type:"boolean"},{additionalProperties:!1,properties:{includeSubDomains:{default:!0,type:"boolean"},maxAge:{default:31536000,minimum:0,type:"integer"},preload:{default:!1,type:"boolean"}},type:"object"}]},permissionsPolicy:{default:"camera=(), microphone=(), geolocation=()",oneOf:[{type:"string"},{const:!1}]},referrerPolicy:{default:"strict-origin-when-cross-origin",oneOf:[{enum:["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"],type:"string"},{const:!1}]}},type:"object"}},type:"object"},sitemap:{default:!0,description:"Generate sitemap.xml from the route table (requires `url`). Set false to disable.",type:"boolean"},trailingSlash:{default:"always",description:"Trailing slash behavior for generated URLs.",enum:["always","never","ignore"],type:"string"}},type:"object"},copy:{additionalProperties:{type:"string"},description:"Declarative file copy map. Keys are source paths (relative to project root), values are destination paths (relative to outDir).",type:"object"},defaults:{description:"Default settings applied to all pages unless overridden.",properties:{charset:{default:"utf8",description:"Default charset for the page.",type:"string"},dir:{description:"Base direction for the <html> element. Omitted when unset — a page's `$dir` "+"overrides it. Right-to-left content renders left-to-right without this.",enum:["ltr","rtl","auto"],type:"string"},lang:{default:"en",description:"Default lang attribute for the <html> element. A page's `$lang` overrides it.",type:"string"},layout:{default:null,description:"Default layout file path applied to all pages. Set to null to render pages without a layout.",examples:["./layouts/base.json"],oneOf:[{type:"string"},{type:"null"}]},shadow:{default:!1,description:"Default shadow-DOM mode for every component (spec.md §16.6). Off unless set: a "+"shadow root isolates component styles from the page and replaces the <slot> emulation with real slot distribution. A component's own `$shadow` overrides this in both directions.",oneOf:[{enum:["open","closed"],type:"string"},{const:!1,type:"boolean"}]}},type:"object"},extensions:{description:"Extension packages: bare package names (resolved project-first through the package exports map) or relative paths. Each must export jx-extension.json.",examples:[["@jxsuite/parser"]],items:{type:"string"},type:"array"},manifest:{additionalProperties:!1,description:'W3C Web App Manifest, emitted as manifest.webmanifest with a <link rel="manifest"> on every page. Absent means no manifest: it is a claim that a site is meant to be installed, and most are not.',properties:{backgroundColor:{type:"string"},categories:{items:{type:"string"},type:"array"},description:{type:"string"},dir:{enum:["ltr","rtl","auto"],type:"string"},display:{default:"standalone",enum:["fullscreen","standalone","minimal-ui","browser"],type:"string"},enabled:{default:!0,type:"boolean"},icons:{description:"Icons at 192px and 512px are what browsers require before offering to install the site; the build warns when either is missing.",items:{additionalProperties:!1,properties:{purpose:{type:"string"},sizes:{examples:["192x192"],type:"string"},src:{type:"string"},type:{type:"string"}},required:["src"],type:"object"},type:"array"},lang:{type:"string"},name:{description:"Defaults to the project name.",type:"string"},orientation:{type:"string"},scope:{type:"string"},shortName:{type:"string"},startUrl:{default:"/",type:"string"},themeColor:{type:"string"}},type:"object"},serviceWorker:{default:!1,description:"W3C Service Worker, emitted as sw.js. Off unless declared — a worker is sticky, so it "+"is the one output that can keep breaking visitors after a deploy tries to fix them. **Turning it off means `false`, not deleting the key**: `false` emits a tombstone at the same URL that unregisters the old worker and clears its caches, and a 404 there is not an instruction to stop. HTML is always network-first; only the content-addressed /images/_optimized/* is served cache-first.",oneOf:[{type:"boolean"},{additionalProperties:!1,properties:{enabled:{default:!0,type:"boolean"},offlineFallback:{description:"Page served for a failed navigation. Added to `precache` if not already there.",type:"string"},precache:{description:"Site-absolute URLs fetched at install time. Each must be a file this build produces; one that is not fails the build, because a single unreachable entry stops the worker installing at all.",items:{pattern:"^/",type:"string"},type:"array"},scope:{default:"/",type:"string"}},type:"object"}]},securityTxt:{additionalProperties:!1,description:"RFC 9116 security.txt, emitted at .well-known/security.txt. `expires` is required by "+"§2.5.5 and an absent or past value is a build error — an expired file advertises a "+"reporting channel while telling the reporter not to trust it. A hand-placed public/.well-known/security.txt shadows this, which is how a clearsigned file ships.",properties:{acknowledgments:{items:{type:"string"},type:"array"},canonical:{type:"string"},contact:{description:"At least one mailto:, https: or tel: URI (§2.5.3).",items:{type:"string"},type:"array"},enabled:{default:!0,type:"boolean"},encryption:{items:{type:"string"},type:"array"},expires:{format:"date-time",type:"string"},hiring:{items:{type:"string"},type:"array"},policy:{items:{type:"string"},type:"array"},preferredLanguages:{description:"BCP 47 tags, validated and canonicalized like i18n.locales.",items:{pattern:bC,type:"string"},type:"array"}},type:"object"},i18n:{description:"Internationalization configuration.",properties:{defaultLocale:{description:"Default locale, as a BCP 47 language tag. The pattern catches shape errors (`en_US`, `en--US`); the build is the authority on well-formedness.",examples:["en"],pattern:bC,type:"string"},locales:{description:"Available locales, as BCP 47 language tags.",examples:[["en","fr","de"]],items:{pattern:bC,type:"string"},type:"array"},routing:{description:"Locale routing strategy.",enum:["prefix-except-default","prefix-always"],type:"string"}},type:"object"},images:{$ref:"#/$defs/ImageConfig"},imports:{additionalProperties:{type:"string"},description:"Global import map: $prototype names to .class.json file paths. Makes external classes available by name in all pages.",examples:[{Markdown:"@jxsuite/parser/Markdown.class.json",MarkdownCollection:"@jxsuite/parser/MarkdownCollection.class.json"}],type:"object"},name:{default:"Jx Site",description:"Human-readable project name.",examples:["My Portfolio","Jx Example Site"],type:"string"},redirects:{additionalProperties:{oneOf:[{description:"Destination path or URL; implies a 301.",type:"string"},{additionalProperties:!1,description:"A redirect with an explicit RFC 9110 §15.4 status.",properties:{destination:{type:"string"},status:{default:301,description:"RFC 9110 §15.4 redirection status. 307 and 308 preserve the request method; "+"301 and 302 historically do not.",enum:[...cw],type:"integer"}},required:["destination"],type:"object"},{additionalProperties:!1,description:"A rewrite (proxy): the destination's content is served AT the source URL, with no "+"redirect. Emitted as status 200 in `_redirects`, which is the host convention — "+"not an HTTP redirection status.",properties:{destination:{type:"string"},rewrite:{const:!0,type:"boolean"}},required:["destination","rewrite"],type:"object"}]},description:"Static redirect and rewrite rules. Keys are source paths in URLPattern pathname syntax.",examples:[{"/api/*":{destination:"https://api.example.com/*",rewrite:!0},"/legacy/*":{destination:"/archive/*",status:308},"/old-about":"/about"}],propertyNames:{pattern:"^/"},type:"object"},state:{description:"Site-wide reactive state available to all pages.",type:"object"},style:{additionalProperties:{oneOf:[{type:"string"},{type:"number"},{$ref:"#/$defs/StyleObject"}]},description:"Global CSS styles applied to the <body> element. Uses the same camelCase CSSOM convention and recursive selector/at-rule nesting as component styles.",type:"object"},url:{description:"Production URL of the deployed site.",examples:["https://example.com","https://jxsuite.com"],type:"string"}},type:"object"};var Ie={additionalProperties:!1,description:"Schema for jx-extension.json manifests. Located at the extension package root and exported so hosts can resolve <package>/jx-extension.json through the exports map.",properties:{$schema:{type:"string"},classes:{additionalProperties:{type:"string"},description:"$prototype-visible class name → class descriptor path, relative to the manifest.",type:"object"},description:{description:"One-line description.",type:"string"},name:{description:"Package name; must match package.json.",type:"string"},schemas:{additionalProperties:!1,description:"Schema fragments this package contributes, relative to the manifest.",properties:{document:{description:"Document-schema fragment (positions like $paths values).",type:"string"},fields:{description:"Field-union fragment: its $defs members are unioned into the per-project "+"field-schema resource as extension field extras (specs/extensions.md §5.3).",type:"string"},project:{description:"Project-schema fragment (top-level project.json sections).",type:"string"}},type:"object"},title:{description:"Human-readable name for studio surfaces.",type:"string"}},required:["name"],type:"object"};var _e=["literal","ref","template","expression","function"],zo={expression:"Formula",function:"Inline function",literal:"Fixed value",ref:"From data…",template:"Mixed text"},q_={expression:"Computed from other values, built up operator by operator.",function:"Code that runs when this fires.",literal:"A value you type here, the same every time.",ref:"The current value of a signal, picked from a list.",template:"Text with ${…} placeholders that fill in from signals."};function Pu(e){if(Me(e))return"ref";if(Oa(e))return"function";if(Ma(e))return"template";if(_(e)&&"$expression"in e)return"expression";return"literal"}var We={oneOf:[{$ref:"#/$defs/RefObject"},{$ref:"#/$defs/ExpressionEntry"},{$ref:"#/$defs/FunctionDef"}]},Ue=new Map([["ExpressionEntry",ne],["FunctionDef",oe],["RefObject",X],["StyleObject",H]]);function ze(e){let{properties:t,required:r}=e;return Array.isArray(r)&&r.includes("$ref")&&v(t)&&Boolean(t.$ref)}function Be(e){let{required:t}=e;return Array.isArray(t)&&t.includes("$expression")}function Ge(e){let{properties:t}=e;return v(t)&&v(t.$prototype)&&t.$prototype.const==="Function"}function Ke(e){return e.type==="string"&&e.pattern===void 0&&e.enum===void 0&&e.const===void 0}var Ye=new Set(["array","boolean","integer","null","number","object","string"]);function ie(e,t){if(!v(e))return;if(t.seen.has(e))return;t.seen.add(e);let r=n(e.$ref)?e.$ref:void 0;if(r!==void 0&&Object.keys(e).length===1){let o=r.startsWith("#/$defs/")?r.slice(8):r,l=Ue.get(o);if(l)ie(l,t);else t.unresolved.add(r);return}if(ze(e)){t.found.add("ref");return}if(Be(e)){t.found.add("expression");return}if(Ge(e)){t.found.add("function");return}let a=!1;for(let o of["oneOf","anyOf","allOf"]){let l=e[o];if(Array.isArray(l)){a=!0;for(let y of l)ie(y,t)}}if(a)return;if(Ke(e)){t.found.add("literal"),t.found.add("template");return}if(e.enum!==void 0||e.const!==void 0){t.found.add("literal");return}if(n(e.type)&&Ye.has(e.type))t.found.add("literal")}function Xe(e){let t={found:new Set,seen:new Set,unresolved:new Set};return ie(e,t),{caps:_e.filter((r)=>t.found.has(r)),unresolved:[...t.unresolved].toSorted()}}function ae(e){return Xe(e).caps}var Qe={anyOf:[K,...G.anyOf.slice(1)]},ED=B.anyOf.map((e)=>e.properties.operator.const),et={attribute:Q.additionalProperties,componentProp:ee.additionalProperties,elementProperty:te,eventHandler:We,repeaterFilter:q.properties.filter,repeaterItems:q.properties.items,repeaterSort:q.properties.sort,styleProperty:H.additionalProperties,switchDiscriminant:re,elementTag:Qe,textProperty:Y},de=new Map;function IE(e){let t=de.get(e);if(t)return t;let r=ae(et[e]);return de.set(e,r),r}function $d(e){return n(e)?IE(e):ae(e.schema)}function me(e){return{anyOf:[ae(e).length>0?e:{type:"string"},{$ref:"#/$defs/RefObject"}]}}var pe=new Map,se=new Map;function ce(e,t){return`${h.value?.id??"-"}|${e}|${t}`}function ue(e){return`${h.value?.id??"-"}|${e}`}function pp(e,t,r){pe.set(ce(e,t),Se(r))}function fp(e,t){return pe.has(ce(e,t))}function tt(e,t){return Se(pe.get(ce(e,t)))}function rt(e,t){se.set(ue(e),t)}function fe(e){return e==="literal"||e==="template"}function Fu(e,t){let r=ue(e),a=Pu(t),o=se.get(r),l=o!==void 0&&fe(o)&&fe(a)?o:a;return se.set(r,l),l}function ju(e,t){switch(e){case"ref":{let[r]=t.stateDefs;return r?{$ref:`#/state/${r}`}:{$ref:t.extraSignals?.[0]?.value??""}}case"template":{let[r]=t.stateDefs;return r?`\${state.${r}}`:"${}"}case"expression":return{$expression:{operator:"??",target:null,value:null}};case"function":return{$prototype:"Function",body:"",parameters:[]};default:return t.literalDefault}}function Id(e,t,r,a,o){return pp(e,t,a),rt(e,r),fp(e,r)?tt(e,r):o}var he={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSchemaForm",$description:"The shared schema→form engine as a document: one row per property of a JSON Schema, drawn from a projection `ui/schema-form.ts` computes. Nothing here reads a schema. The flow decides which of nine controls a property gets, what its options are, which rungs of the value ladder the position permits, what a commit is worth and whether the value is refused; this document draws the answer. That split is what lets the Entry editor, Project Settings and the Signals panel all embed the same form and get the same row — and it is why the engine hands back a HOST ELEMENT rather than a template: a document clears the host it is given, so a caller that is still lit renders an empty element for it and puts it in its own tree (studio-ui-guidelines.md §9.3, §9.4).",tagName:"div",attributes:{part:"form"},style:{$description:"What `.style-row`, `.style-row-label`, `.style-row--invalid`, `.style-row-error`, `.style-row-error-count`, `.array-object-field`, `.array-object-row` and `.schema-param-editor` said in `styles/inspector.css`, keyed on `part` and re-pointed at the studio token layer. Those rules are DEAD in the stylesheet now rather than shared: `ui/field-row.ts` drew the same row for the inspector panels and `ui/expression-editor.ts` the same array rows, and both converted, so this document's copy is the only emitter left. Every `--spectrum-font-size-*` reference is gone rather than renamed — those names resolve only inside `<sp-theme>`, and a document mounted in a settings pane or an entry editor is outside it, so each would silently have taken its hard-coded fallback.",display:"contents",'& [part="field"]':{padding:"var(--jx-space-1) 0"},'& [part="value"]':{$description:"The control line: the source chip, then whatever the rung draws. `min-width: 0` is load-bearing — without it a monospaced pointer or a long JSON line pushes the row past the pane's right edge instead of scrolling inside its own control.",display:"flex",alignItems:"flex-start",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="value"] > *':{minWidth:"0"},'& [part="widget"] > *':{$description:"The switch wrapper is `display: contents`, so whatever rung it drew is the flex item of the line above rather than a box inside a box — which is what keeps `min-width: 0` reaching the control that actually needs it.",flex:"1",minWidth:"0"},'& [part="source"]':{$description:"Quiet while the value is fixed, accent-tinted the moment it is produced from something else — the one place in the row that says a value is not what it looks like.",flex:"none",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="source"][data-source="bound"]':{color:"var(--accent)"},'& [part="pointer-group"]':{display:"flex",flex:"1",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="pointer-group"] > *':{flex:"1",minWidth:"0"},'& [part="json"]':{display:"flex",flexDirection:"column",flex:"1",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="chips"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-1)"},'& [part="chip"]':{padding:"1px var(--jx-space-2)",borderRadius:"var(--radius)",background:"var(--bg)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="rows"]':{display:"flex",flexDirection:"column",flex:"1",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="row"]':{$description:"Wraps rather than scrolls: an item with five declared properties in a 260px inspector is a column of controls, not a horizontal scroller nobody finds the end of.",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="row"] > [part="cell"]:only-of-type > *':{$description:"A row of one cell (an item of a list of single values: a category, a picture) gives that cell the row's width, so a list reads as the fields around it do rather than as a column of stubs.",flex:"1",minWidth:"0"},'& [part="row-add"]':{alignSelf:"flex-start"},'& [part="field-error"]':{$description:"The left rule is what makes the line read as belonging to the control above it rather than to the row below.",margin:"var(--jx-space-1) 0 0",paddingLeft:"var(--jx-space-2)",borderLeft:"2px solid var(--danger)",fontSize:"var(--jx-text-sm)",lineHeight:"1.35",color:"var(--danger)"},'& [part="field-error-count"]':{marginLeft:"var(--jx-space-1)",fontFamily:"var(--font-mono)",opacity:"0.75"}},children:[{$prototype:"Array",items:{$ref:"#/state/fields"},key:{$ref:"$map/item/key"},map:{$description:"One property of the schema. `jx-field` owns the label, the required mark, the invalid shade and the association between the label and whatever control ends up in the slot, so none of that is written here — which is the whole of what the four hand-rolled `.style-row` variants used to carry.",tagName:"jx-field",attributes:{part:"field","data-prop":"${$map.item.prop}"},$props:{label:{$ref:"$map/item/label"},description:{$ref:"$map/item/description"},required:{$ref:"$map/item/required"},invalid:{$ref:"$map/item/invalid"},span:!0},children:[{tagName:"div",attributes:{part:"value",role:"none"},children:[{tagName:"span",attributes:{part:"source-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasChip"},cases:{true:{$description:"The Value Source chip (§6.6): what produces this value, in the same four words every other bindable position in Studio uses. It opens the rung picker rather than cycling, so any rung the position permits is one action away. Drawn only where the host named somewhere a value could come from — a settings form that names none edits fixed values and shows no chip.",tagName:"jx-action-button",attributes:{part:"source","data-source":"${$map.item.source}"},$props:{label:{$ref:"$map/item/sourceName"},hint:{$ref:"$map/item/sourceHint"},size:"sm",haspopup:"menu",disabled:{$ref:"$map/item/sourceLocked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickSource"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",textContent:"${$map.item.sourceLabel}"}]}}},{tagName:"span",attributes:{part:"widget",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{$description:"The default control, and the one every scalar without a narrower answer lands on. Commits on input, debounced by the flow, which is what makes the canvas and the preview follow a value being typed rather than waiting for a blur.",tagName:"jx-textfield",attributes:{part:"text"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},size:"sm",invalid:{$ref:"$map/item/invalid"},mono:{$ref:"$map/item/mono"},multiline:{$ref:"$map/item/multiline"},type:{$ref:"$map/item/inputType"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/edit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},template:{$description:"The Mixed text rung: a string with `${…}` holes in it. Monospaced because what is being written is half text and half pointer, and committed on change rather than on input — a half-typed placeholder is not a template anybody meant.",tagName:"jx-textfield",attributes:{part:"template"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:"${state.templatePlaceholder}",size:"sm",mono:!0},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},pointer:{$description:"The From data… rung. It is TWO controls over one value because the kit has no combobox and this rung needs one: the list is a set of suggestions rather than a whitelist (a value may point at a route param, a signal, or a pointer neither the form nor its host enumerates), so the select offers what the host named and the field accepts anything. Picking a row writes the field; typing a pointer the host never named leaves the select showing it, because a select whose value matches no option synthesises the row rather than lying about what it holds.",tagName:"span",attributes:{part:"pointer-group",role:"none"},children:[{tagName:"jx-textfield",attributes:{part:"pointer"},$props:{label:"${$map.item.label} pointer",value:{$ref:"$map/item/value"},placeholder:"#/state/…",size:"sm",mono:!0},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"span",attributes:{part:"pointer-pick-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasOptions"},cases:{true:{tagName:"jx-select",attributes:{part:"pointer-pick"},$props:{label:"${$map.item.label} source",options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}}}]},select:{$description:"A closed set the schema itself declares, or one the host resolved through a `#/$context/…` pointer. The empty row is offered only where the property is optional — a required field has no “none” to choose.",tagName:"jx-select",attributes:{part:"select"},$props:{label:{$ref:"$map/item/label"},options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm",invalid:{$ref:"$map/item/invalid"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},checkbox:{tagName:"jx-checkbox",attributes:{part:"checkbox"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitChecked"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},number:{$description:"`min`, `max` and `step` come straight off the property schema, so the control refuses out-of-range input before the flow has to say why. The stepper is off: these are configuration values that get typed, not nudged.",tagName:"jx-number-field",attributes:{part:"number"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},min:{$ref:"$map/item/min"},max:{$ref:"$map/item/max"},step:{$ref:"$map/item/step"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},json:{$description:"A value with structure, edited as the JSON it is. The chips above it are a read of the shape currently held — property name and declared type — so the common case (“what is in here?”) is answered without reading the text. The flow parses on a debounce and keeps the last parsable value; a mid-keystroke `{` is not a refusal.",tagName:"span",attributes:{part:"json",role:"none"},children:[{tagName:"span",attributes:{part:"chips-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasChips"},cases:{true:{tagName:"span",attributes:{part:"chips",role:"none"},children:[{$prototype:"Array",items:{$ref:"$map/item/chips"},key:{$ref:"$map/item/key"},map:{tagName:"span",attributes:{part:"chip"},textContent:"${$map.item.label}"}}]}}},{tagName:"jx-textfield",attributes:{part:"json-text"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},size:"sm",mono:!0,multiline:!0,grows:!0},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editJson"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}]},rows:{$description:"An array whose items have a declared shape: one row per item, one cell per declared property of an object item, or one cell for a single-value item (a list of categories, a gallery of pictures), with a remove beside each and one add below. The alternative was the raw-JSON editor, which is what an array of anything else still gets: a shape the schema states is a shape the form can draw.",tagName:"span",attributes:{part:"rows",role:"none"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/key"},map:{tagName:"span",attributes:{part:"row",role:"none","data-row":"${$map.item.key}"},children:[{$prototype:"Array",items:{$ref:"$map/item/cells"},key:{$ref:"$map/item/id"},map:{tagName:"span",attributes:{part:"cell",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{tagName:"jx-textfield",attributes:{part:"cell-text"},$description:"Committed on input AND on change: a cell showing a pointer is committed when it is left, exactly as the pointer field above is, and a cell showing text follows the canvas while it is typed. The two never disagree — a change after an input carries the same string.",$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/label"},size:"sm"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},select:{tagName:"jx-select",attributes:{part:"cell-select"},$props:{label:{$ref:"$map/item/label"},options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},checkbox:{tagName:"jx-checkbox",attributes:{part:"cell-checkbox"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCellChecked"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},number:{tagName:"jx-number-field",attributes:{part:"cell-number"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},control:{$description:"A cell a registered control owns: a relationship to another collection, or a picture (the media field). The document draws the empty host and nothing inside it; `ui/schema-form.ts` mounts the control into it, by the same dispatch a FIELD host gets. An extension's control is its own surface rather than part of this one, and the seam between them is this empty node.",tagName:"span",attributes:{part:"cell-control-host","data-control":"${$map.item.id}",role:"none"}}}}},{tagName:"jx-action-button",attributes:{part:"row-remove"},$props:{icon:"trash",label:"${$map.item.removeLabel}",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeRow"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/key"}]}]}}]}},{tagName:"jx-action-button",attributes:{part:"row-add"},$props:{icon:"plus",label:"${$map.item.addLabel}",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addRow"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"Add"}]}]},control:{$description:"A field a registered control owns outright — `schema-builder`, `secret`, or the `reference` picker. The document draws the empty host and the flow MOUNTS the control into it: the registry's contract (specs/extensions.md §9.1) is a control that owns a host, all three built-ins are documents of their own, and a document clears the host it is given — which is why this node is drawn empty and never written to twice.",tagName:"div",attributes:{part:"control-host","data-control":{$ref:"$map/item/key"},role:"none"}}}}]},{tagName:"span",attributes:{part:"error-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasError"},cases:{true:{$description:'§16.1\'s inline tier: why this value is refused, said AT the control that refuses it and for exactly as long as the value stays bad. `role="alert"` so it is announced when it appears, and a repeat counter from two up — “it refused me again” is otherwise indistinguishable from “the field is still red from last time”.',tagName:"p",attributes:{part:"field-error",role:"alert"},children:[{tagName:"span",attributes:{part:"field-error-text"},textContent:"${$map.item.error}"},{tagName:"span",attributes:{part:"error-count-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasCount"},cases:{true:{tagName:"span",attributes:{part:"field-error-count"},textContent:"${$map.item.errorCount}"}}}]}}}]}}]};T("schema-form",he);function nt(e,t){let r=t?.$map,a=v(r)&&v(r.item)?r.item:void 0,o=e==="control-host"?a?.key:e==="cell-control-host"?a?.id:void 0;return n(o)?o:""}function it(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function ye(e,t,r){let a=document.createElement("div");a.style.display="contents";let o=g({...e,...t,templatePlaceholder:"${state.…}"}),l=null,y=!1,b=!1;function d(){y=!0,R("schema-form",o,a,{onNodeCreated:(m,f,S,w)=>{if(!(m instanceof HTMLElement))return;let O=nt(it(S),w);if(O!=="")r(O,m)}}).then((m)=>{if(y=!1,b){m.dispose();return}l=m})}return d(),{dispose(){b=!0,l?.dispose(),l=null,a.textContent=""},host:a,update(m){if(o.fields=m.fields,b||y||l!==null&&a.contains(l.root))return;l?.dispose(),l=null,a.textContent="",d()}}}var M=new Map;function dw(e,t){M.set(e,t)}var at=/^#\/content\/([^/]+)$/;function Hu(e){let t=e?.$ref,r=n(t)?at.exec(t):null;return r?r[1]:null}var ge={resolvePointer:()=>{}};function xe(e,t,r){if(Array.isArray(e))return e;let a;if(v(e)){let l=e.$ref;if(n(l))a=l}else if(n(e))a=e;if(a===void 0||!t)return;let o=t.resolvePointer(a,r);if(Array.isArray(o))return o.map(String);if(v(o))return Object.keys(o);return}function be(e,t){if(e.trim()==="")return Number.NaN;return t?Math.trunc(Number(e)):Number(e)}function $e(e){return e.format!=="json-schema"&&e.type!=="object"&&e.type!=="array"}function st(e){return[...(e.signals??[]).map((t)=>({label:t,value:`#/state/${t}`})),...(e.params??[]).map((t)=>({label:`$params/${t}`,value:`#/$params/${t}`}))]}var F="__none__";function ve(e){if(e===void 0||e===null)return"";return _(e)?JSON.stringify(e,null,2):String(e)}function pt(e,t,r){if(Me(t))return"";if(t===void 0||t===null||t==="")return r?"Required.":"";if(Array.isArray(e.enum)&&!e.enum.includes(t))return`Choose one of: ${e.enum.map(String).join(", ")}.`;if(e.type==="number"||e.type==="integer"){let o=Z(t)?t:Number(t);if(!Number.isFinite(o))return"Enter a number.";if(e.type==="integer"&&!Number.isInteger(o))return"Enter a whole number.";if(e.minimum!==void 0&&o<e.minimum)return`Must be ${e.minimum} or more.`;if(e.maximum!==void 0&&o>e.maximum)return`Must be ${e.maximum} or less.`;return""}if(e.type==="boolean"&&!Ze(t))return"Must be true or false.";if(e.type==="array"&&!Array.isArray(t))return"Must be a list.";if(e.type==="object"&&!v(t))return"Must be an object.";return""}var ct=500,lt=400,I=new Map;function Fl(e,t,r,a){dt(e);let o=I.get(e);if(!o)o=mt(),I.set(e,o);return o.update(t,r,a),o.host}function dt(e){for(let[t,r]of I)if(t!==e&&!r.host.isConnected)r.dispose(),I.delete(t)}function mt(){let e={},t={},r={onChange:()=>{}},a=ge,o=new Map,l=new Map,y=new Map,b=new Map,d=null,m=(i,s,c)=>{if(clearTimeout(l.get(i)),s<=0){c();return}l.set(i,setTimeout(c,s))},f=(i,s)=>{clearTimeout(l.get(i)),l.delete(i),s()},S=(i,s)=>{r.onChange({[i]:s})},w=(i,s)=>{if(i.commit==="none")return;switch(i.commit){case"ref":{let c=s.trim();S(i.prop,c?{$ref:c}:void 0);return}case"template":{S(i.prop,s);return}case"select":{S(i.prop,s===F?void 0:s);return}case"number":{let c=be(s,i.schema.type==="integer");S(i.prop,Number.isNaN(c)?void 0:c);return}case"json":{try{S(i.prop,JSON.parse(s))}catch{}return}default:{if(i.member!==void 0){let c=t[i.prop],u=v(c)?{...c}:{};if(s)u[i.member]=s;else delete u[i.member];S(i.prop,Object.keys(u).length>0?u:void 0);return}S(i.prop,s||void 0)}}},O=(i,s)=>{let c;if(s.length>0)c=i.scalarItems?s.map((u)=>u[le]??""):s;S(i.prop,c)},P=(i)=>{let s=[];for(let c of i.rows??[])s.push({...c});return s},W={addRow:(i)=>{let s=o.get(i);if(!s?.itemProps)return;let c={};for(let[u,x]of Object.entries(s.itemProps))if(x.default!==void 0)c[u]=x.default;O(s,[...P(s),c]),r.rerender?.()},commit:(i,s)=>{let c=o.get(i);if(c)f(i,()=>w(c,s))},commitChecked:(i,s)=>{let c=o.get(i);if(c)S(c.prop,s)},edit:(i,s)=>{let c=o.get(i);if(c&&c.debounceMs>0)m(i,c.debounceMs,()=>w(c,s))},editCell:(i,s,c,u)=>{p(i,s,c,u)},editCellChecked:(i,s,c,u)=>{p(i,s,c,u)},editJson:(i,s)=>{let c=o.get(i);if(c)m(i,ct,()=>w(c,s))},pickSource:(i,s)=>{U(i,s)},removeRow:(i,s)=>{let c=o.get(i);if(!c)return;let u=Number(s);O(c,P(c).filter((x,C)=>C!==u)),r.rerender?.()}};function p(i,s,c,u){let x=o.get(i);if(!x?.itemProps)return;let C=Number(s),J=P(x),E=J[C];if(!E)return;let A=x.itemProps[c];J[C]={...E,[c]:L(A,u,x.refCells?.has(`${i}/${s}/${c}`)??!1)},O(x,J)}function L(i,s,c){if(Ze(s))return s;let u=String(s);if(c){let x=u.trim();return x?{$ref:x}:void 0}if(i?.type==="integer"||i?.type==="number"){let x=be(u,i.type==="integer");return Number.isNaN(x)?void 0:x}if(u===F||u==="")return;return u}function U(i,s){let c=o.get(i);if(!c?.ladder)return;let{fieldKey:u,mode:x,offered:C,sources:J}=c.ladder;d?.close(),d=Wt({label:"Value source",onClosed:()=>{d=null},opener:s,region:"value-source",rows:C.map((E)=>({checked:E===x?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:E,title:zo[E]})),run:(E)=>{let A=C.find((ke)=>ke===E);if(A===void 0||A===x)return;let z=c.schema.default;if(x==="ref"&&z!==void 0&&!fp(u,"literal"))pp(u,"literal",z);S(c.prop,Id(u,x,A,Se(t[c.prop]),ju(A,{extraSignals:J,literalDefault:z,stateDefs:[]})))}})}function N(i){let s=o.get(i);if(s?.control)return{args:{ctx:a,key:s.prop,onChange:(c)=>S(s.prop,c),rerender:r.rerender,schema:s.schema,value:t[s.prop]},control:s.control};for(let c of o.values()){let u=c.cellControls?.get(i);if(!u)continue;let x=(c.rows??[])[Number(u.row)]??{};return{args:{ctx:a,key:u.key,onChange:(C)=>p(c.prop,u.row,u.key,C),rerender:r.rerender,schema:u.schema,value:x[u.key]},control:u.control}}return}function D(i,s){let c=N(i);if(!c)return;let u=b.get(i);if(u?.host===s){u.handle.update(c.args);return}u?.handle.dispose(),b.set(i,{handle:c.control.mount(s,c.args),host:s})}function V(){for(let[i,s]of b)if(!N(i))s.handle.dispose(),b.delete(i)}function j(){V();for(let[i,s]of y)D(i,s)}let k=ye({fields:[]},W,(i,s)=>{y.set(i,s),D(i,s)});return{dispose(){for(let i of l.values())clearTimeout(i);l.clear(),d?.close(),d=null;for(let i of b.values())i.handle.dispose();b.clear(),y.clear(),o.clear(),k.dispose()},host:k.host,update(i,s,c){e=i,t=s,r=c,a=c.context??ge,o.clear(),k.update({fields:ft(e,t,r,a,o)}),j()}}}function ft(e,t,r,a,o){let l=new Set(e.required),y=st(a);return Object.entries(e.properties??{}).flatMap(([b,d])=>{let m={ctx:a,opts:r,plans:o,required:l.has(b),sources:y,value:t},f=je(b,d,m);return f.kind==="control"&&we(d)&&d.properties?.alt?[f,yt(b,m)]:[f]})}var ut=new Set(["src","alt","width","height","title"]);function we(e){let t=e.properties??{};return e.type==="object"&&t.src?.type==="string"&&Object.keys(t).every((r)=>ut.has(r))}function ht(e){let t=(r)=>{let a=v(r.value)?r.value:{},{src:o}=a;return{...r,onChange:(l)=>{if(l===o)return;let{height:y,width:b,...d}=a,m;if(l!==void 0&&l!=="")m={...d,src:l};r.onChange(m)},value:n(o)?o:void 0}};return{mount(r,a){let o=e.mount(r,t(a));return{dispose:()=>o.dispose(),update:(l)=>o.update(t(l))}}}}function yt(e,t){let r=`${e}/alt`,a=t.value[e],o=v(a)?a.alt:void 0,l=je(r,{type:"string"},{...t,required:!1}),y=t.plans.get(r);if(y)y.prop=e,y.member="alt";return{...l,label:`${t.opts.ui?.[e]?.label??e} alt text`,value:n(o)?o:""}}function je(e,t,r){let{ctx:a,opts:o,plans:l,required:y,sources:b,value:d}=r,m=d[e],f={commit:"text",debounceMs:lt,prop:e,schema:t};l.set(e,f);let S=o.errors?.[e]||pt(t,m,Boolean(o.showRequired)&&y),w=o.errorCounts?.[e],O=o.ui?.[e]?.control,P=O?M.get(O):void 0,W=b.length>0&&$e(t)&&!O,p={addLabel:`Add ${e}`,checked:!1,chips:[],description:t.description??"",error:S,errorCount:w!==void 0&&w>1?`×${w}`:"",hasChip:!1,hasChips:!1,hasCount:w!==void 0&&w>1,hasError:S!=="",hasOptions:!1,invalid:S!=="",key:e,kind:"text",label:o.ui?.[e]?.label??e,max:"",min:"",mono:!1,multiline:!1,inputType:"text",options:[],placeholder:"",prop:t.name||e,required:y,rows:[],source:"fixed",sourceHint:"",sourceLabel:"",sourceLocked:!1,sourceName:"",step:"",value:""};if(W){let j=`${a.fieldKeyPrefix??""}.${e}`,k=Fu(j,m),i=$d({schema:me(t)});if(f.ladder={fieldKey:j,mode:k,offered:i,sources:b},p.hasChip=!0,p.sourceLabel=zo[k],p.sourceHint=q_[k],p.source=k==="literal"?"fixed":"bound",p.sourceLocked=!i.some((s)=>s!==k),p.sourceName=p.sourceLocked?`Value source: ${p.sourceLabel} (no other source available here)`:`Value source: ${p.sourceLabel} — click to change`,k==="ref")return f.commit="ref",f.debounceMs=0,p.kind="pointer",p.value=Me(m)?m.$ref:"",p.options=b.map((s)=>({label:s.label,value:s.value})),p.hasOptions=p.options.length>0,p;if(k==="template")return f.commit="template",f.debounceMs=0,p.kind="template",p.value=String(m??""),p}if(P)return f.commit="none",f.control=P,p.kind="control",p;if(Me(m)&&$e(t))return f.commit="ref",f.debounceMs=0,p.kind="text",p.mono=!0,p.value=m.$ref,p.placeholder=e,p;if(Hu(t)!==null){let j=M.get("reference");if(j)return f.commit="none",f.control=j,p.kind="control",p}if(t.format==="image"){let j=M.get("media");if(j)return f.commit="none",f.control=j,p.kind="control",p}let L=we(t)?M.get("media"):void 0;if(L)return f.commit="none",f.control=ht(L),p.kind="control",p;let U=o.ui?.[e]?.enum??t.enum,N=xe(U,a,d);if(N)return f.commit="select",f.debounceMs=0,p.kind="select",p.value=m!==void 0?String(m):t.default!==void 0?String(t.default):F,p.options=[...y?[]:[{label:"—",value:F}],...N.map((j)=>({label:j,value:j}))],p;if(t.type==="boolean")return f.commit="none",p.kind="checkbox",p.checked=Boolean(m??t.default??!1),p;if(t.type==="integer"||t.type==="number")return f.commit="number",f.debounceMs=0,p.kind="number",p.value=m!==void 0?String(m):"",p.placeholder=t.default!=null?String(t.default):"",p.min=t.minimum!==void 0?String(t.minimum):"",p.max=t.maximum!==void 0?String(t.maximum):"",p.step=t.type==="integer"?"1":"",p;if(t.format==="json-schema")return f.commit="json",p.kind="json",p.value=m!==void 0?JSON.stringify(m,null,2):"",p.placeholder=t.description??"JSON Schema defining the data shape…",p.chips=bt(m),p.hasChips=p.chips.length>0,p;if(t.type==="array"&&t.items?.type==="object"&&t.items.properties)return $t(e,t.items.properties,r,f,p);if(t.type==="array"&&St(t.items))return xt(e,t.items,r,f,p);let D=Array.isArray(t.type)?t.type:[t.type];if(D.includes("array")||D.includes("object"))return f.commit="json",p.kind="json",p.value=m!==void 0?JSON.stringify(m,null,2):"",p.placeholder=t.default!==void 0?JSON.stringify(t.default):"",p;p.kind="text",p.value=ve(m),p.placeholder=t.default!==void 0?String(t.default):t.examples?.[0]??"",p.inputType=gt.get(t.format??"")??"text";let V=/^"?(\d{4}-\d{2}-\d{2})/.exec(p.value);if(p.inputType==="date"&&V)p.value=V[1]??p.value;return p}var gt=new Map([["date","date"],["email","email"],["uri","url"]]);function bt(e){if(!v(e))return[];let{properties:t}=e;if(e.$ref||t===null||!_(t))return[];return Object.entries(t).map(([r,a])=>({key:r,label:`${r}: ${String((v(a)?a.type:void 0)??"any")}`}))}function $t(e,t,r,a,o){let l=r.value[e],y=Array.isArray(l)?l:[];return a.commit="none",a.itemProps=t,a.rows=y,a.cellControls=new Map,a.refCells=new Set,o.kind="rows",o.rows=y.map((b,d)=>Oe(e,String(d),b,t,r,a)),o}var le="value";function St(e){if(e===void 0||e.format==="json-schema")return!1;if(Hu(e)!==null||Array.isArray(e.enum))return!0;return e.type==="string"||e.type==="number"||e.type==="integer"||e.type==="boolean"}function xt(e,t,r,a,o){let l=r.value[e],y=[];if(Array.isArray(l))y=l;else if(l!==void 0&&l!==null&&l!=="")y=[l];let b=y.map((f)=>({[le]:f})),d={[le]:t},m=r.opts.ui?.[e]?.label??e;return a.commit="none",a.itemProps=d,a.rows=b,a.scalarItems=!0,a.cellControls=new Map,a.refCells=new Set,o.kind="rows",o.rows=b.map((f,S)=>{let w=Oe(e,String(S),f,d,r,a);for(let O of w.cells)O.label=`${m} ${S+1}`;return w}),o}function Oe(e,t,r,a,o,l){return{cells:Object.entries(a).map(([y,b])=>vt(e,t,y,b,r[y],o,l)),field:e,key:t,removeLabel:`Remove ${e} ${Number(t)+1}`}}function vt(e,t,r,a,o,l,y){let b=`${e}/${t}/${r}`,d={checked:!1,field:e,id:b,key:r,kind:"text",label:r,options:[],row:t,value:""};if(Me(o))return d.value=o.$ref,y.refCells?.add(b),d;if(Hu(a)!==null){let S=M.get("reference");if(S)return d.kind="control",y.cellControls?.set(b,{control:S,key:r,row:t,schema:a}),d}let m=a.format==="image"?M.get("media"):void 0;if(m)return d.kind="control",y.cellControls?.set(b,{control:m,key:r,row:t,schema:a}),d;let f=xe(a.enum,l.ctx,l.value);if(f)return d.kind="select",d.value=o!==void 0?String(o):F,d.options=[{label:"—",value:F},...f.map((S)=>({label:S,value:S}))],d;if(a.type==="boolean")return d.kind="checkbox",d.checked=Boolean(o),d;if(a.type==="integer"||a.type==="number")return d.kind="number",d.value=o!==void 0?String(o):"",d;return d.value=ve(o),d}var wt=/^\{@(\w+)\}$/;function mp(e,t){if(!e.startsWith("#/$context/"))return;let r=[];for(let o of e.slice(11).split("/")){let l=o.match(wt);if(l){let y=t.scope?.[l[1]];if(!n(y)&&!Z(y))return;let b=String(y);if(!b)return;r.push(b)}else r.push(o)}if(r[0]==="$formats"){if(r.length!==1)return;return(t.formats??[]).map((o)=>o.name)}let a=t.projectConfig;for(let o of r){if(!_(a))return;a=a[o]}return a}
2
- export{cw,zo,q_,Pu,ED,IE,$d,pp,fp,Fu,ju,Id,dw,Hu,Fl,mp};
1
+ import{XA}from"./studio-b2qpt0xy.js";import{bC,h}from"./studio-k2sz13zg.js";import{g}from"./studio-y60sts62.js";import{L,R}from"./studio-0w2dr0q8.js";import{Bt}from"./studio-r4bcdwhq.js";import{Se}from"./studio-wc6za3zs.js";import{n,Z,Ze,_,v,Me,Fa,ja}from"./studio-8z66jk4z.js";var B={anyOf:[{additionalProperties:!1,description:"Two-way: `target` is the test, `value` the tag when it is truthy, `initial` the tag when it is not.",properties:{initial:{$ref:"#/$defs/TagName"},operator:{const:"?:",type:"string"},target:{$ref:"#/$defs/ExpressionOperand"},value:{$ref:"#/$defs/TagName"}},required:["operator","target","value","initial"],title:"?: — the tag when the test holds, and the tag when it does not"},{additionalProperties:!1,description:"Multiway: `target` is the discriminant, matched against case keys by its string form. "+"`default` is required — an element with no tag cannot exist.",properties:{cases:{additionalProperties:{$ref:"#/$defs/TagName"},type:"object"},default:{$ref:"#/$defs/TagName"},operator:{const:"switch",type:"string"},target:{$ref:"#/$defs/ExpressionOperand"}},required:["operator","target","cases","default"],title:"switch — one tag per discriminant value, with a required fallback"}],description:"A tag name chosen at element creation. Every branch resolves to a `TagName`, so the candidate set is enumerable without evaluating anything."},G={anyOf:[{$ref:"#/$defs/TagName"},{additionalProperties:!1,properties:{$expression:{$ref:"#/$defs/TagExpression"}},required:["$expression"],type:"object"}]};var K={description:"HTML element tag name or custom element name (must contain a hyphen per Web Components spec). "+"A NAME, never an expression: no `${…}` position in the pipeline evaluates a tagName. Use "+"`$switch`/`cases` to vary the element.",minLength:1,pattern:"^[a-zA-Z][a-zA-Z0-9._-]*$",type:"string"};var Y={oneOf:[{type:"string"},{$ref:"#/$defs/RefObject"}]};var Ce={additionalProperties:!0,description:"A page-level <head> entry. Defines meta tags, link tags, script tags, etc.",properties:{attributes:{additionalProperties:{oneOf:[{type:"string"},{type:"boolean"}]},type:"object"},children:{items:{$ref:"#/$defs/HeadEntry"},type:"array"},tagName:{type:"string"},textContent:{description:"Element content. An object is serialized to JSON inside the tag — that is how a "+'JSON-LD block (`<script type="application/ld+json">`) is authored.',oneOf:[{type:"string"},{type:"object"}]}},required:["tagName"],type:"object"};var Ee={description:"Reference to a $defs type definition in the current component.",examples:["#/$defs/Count","#/$defs/TodoItem","#/$defs/Status"],pattern:String.raw`^#/\$defs/`,type:"string"};var Re={description:"Reference to an external Jx component file.",examples:["./card.json","https://cdn.example.com/button.json"],pattern:String.raw`^(\./|\.\./).*\.json$|^https?://`,type:"string"};var Pe={description:"Reference to the current Array map iteration context.",examples:["$map/item","$map/index","$map/item/text","$map/item/done"],pattern:String.raw`^\$map/(item|index)(/.*)?$`,type:"string"};var X={additionalProperties:!1,description:"A $ref binding. Resolves to a state entry (reactive) or plain value (static).",properties:{$ref:{$ref:"#/$defs/AnyRef"}},required:["$ref"],type:"object"};var H={additionalProperties:{anyOf:[{type:"string"},{type:"number"},{$ref:"#/$defs/RefObject"},{$ref:"#/$defs/StyleObject"}]},description:"CSS style definition. camelCase property names follow CSSOM convention. Keys starting with :, ., &, or [ are treated as nested CSS selectors. Keys matching $media breakpoint names (or other @-prefixed at-rules) group nested rules. Nesting is recursive: selector and at-rule groups may nest to arbitrary depth "+"(e.g. breakpoint → selector → pseudo-class), mirroring the compiler's recursive emission. "+"An object carrying $ref is a reactive VALUE, and the runtime reads it as one. It also matches the nested-block branch vacuously, since a block admits a string under any key, which is why these branches are anyOf rather than oneOf. A DECLARATION at-rule (@font-face, @property, @position-try, @counter-style) may hold an ARRAY of blocks, which is that key written more than once, in order: an object's keys are "+"unique, so @font-face — the at-rule whose identity is not in its key — could not otherwise "+"state a family's second weight at all.",patternProperties:{"^@(font-face|property|position-try|counter-style)":{anyOf:[{$ref:"#/$defs/StyleObject"},{items:{$ref:"#/$defs/StyleObject"},minItems:1,type:"array"}]}},properties:{$description:{description:"Why this rule exists. Emitted as a comment by static builds, ignored at runtime.",type:"string"}},type:"object"};var J={additionalProperties:!1,description:"Dynamic mapped list. Re-renders when the items state entry changes.",properties:{$prototype:{const:"Array",type:"string"},filter:{$ref:"#/$defs/RefObject"},items:{oneOf:[{$ref:"#/$defs/RefObject"},{type:"array"}]},key:{additionalProperties:!1,description:"The identity of each rendered row: a $map/item pointer read per item. A row whose key survives a change keeps its DOM node and its effects across reorders, insertions and "+"removals; without a key, rows are keyed by index. $map/index is not a key — an index "+"names a position, not a row.",properties:{$ref:{pattern:String.raw`^\$map/item(/.+)?$`,type:"string"}},required:["$ref"],type:"object"},map:{$ref:"#/$defs/ElementDef"},sort:{$ref:"#/$defs/RefObject"}},required:["$prototype","items","map"],type:"object"},Ae={description:"Array of child definitions — elements, text, or Array namespaces (dynamic lists) mixed "+"freely. A bare Array namespace (the whole children slot is one dynamic list) is also "+"accepted for backward compatibility, as is a ${…} template string that resolves at build "+"time to an array of child definitions.",oneOf:[{items:{anyOf:[{$ref:"#/$defs/ElementDef"},{$ref:"#/$defs/SwitchNode"},{$ref:"#/$defs/ArrayNamespace"},{type:"string"},{type:"number"}]},type:"array"},{$ref:"#/$defs/ArrayNamespace"},{description:"Computed children — a ${…} template that resolves at build time to an array of child "+'definitions (e.g. "${state.entry.$children}" for parsed content). A bare plain-text string is NOT a valid children value; text children must be array items.',pattern:String.raw`\$\{`,type:"string"}]};var Q={additionalProperties:{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{$ref:"#/$defs/RefObject"}]},description:"HTML attributes and ARIA attributes set via element.setAttribute().",type:"object"},ee={additionalProperties:{anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object"},{$ref:"#/$defs/RefObject"}]},description:"Explicit prop passing at a component boundary.",type:"object"},te={oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"},{$ref:"#/$defs/RefObject"}]},re={additionalProperties:!1,description:"Reactive $ref that drives which case to render: a state entry, or inside a mapped array's template the row's $map/item or $map/index (spec §14.1).",properties:{$ref:{oneOf:[{$ref:"#/$defs/StateRef"},{$ref:"#/$defs/MapRef"}],type:"string"}},required:["$ref"],type:"object"};var oe={additionalProperties:!1,description:'A function declaration. $prototype must be "Function". body (inline) and $src (external) are mutually exclusive. First parameter is always state (the reactive scope).',properties:{$export:{description:"Named export in $src module. Defaults to the state key name.",type:"string"},$lazy:{description:"Load $src on first call instead of importing it up front. The function then returns a "+"promise, so it may only be called from a handler or lifecycle hook — never bound as a "+"computed value. Use it for code most visitors never reach.",type:"boolean"},$prototype:{const:"Function",type:"string"},$src:{description:"External module specifier. Mutually exclusive with body.",examples:["./counter.js","npm:@myorg/validators"],type:"string"},arguments:{description:"Legacy alias for parameters: bare string parameter names (state may be listed explicitly as the first name). Superseded by parameters.",examples:[["state","event"]],items:{type:"string"},type:"array"},body:{description:"Inline function body: an opaque JS source string (first implicit parameter is state), or a structured statement array (spec §20) — explicit structured function declaration, analyzable by tooling and editable visually. The escalation ladder within the shape is structured statements → JS string.",examples:["state.count++",'state.items.push({ id: Date.now(), text: "", done: false })','return state.score >= 90 ? "gold" : "silver"',[{operator:"push",target:{$ref:"#/state/cart"},value:1},{dispatchEvent:"cart-changed",detail:{$ref:"#/state/cart"}}]],oneOf:[{type:"string"},{$ref:"#/$defs/StatementList"}]},description:{type:"string"},emits:{description:"Array of CEM-compatible Event objects this function dispatches. Used for CEM extraction and studio event discovery.",items:{$ref:"#/$defs/CemEvent"},type:"array"},name:{description:"Explicit function name. Defaults to the state key name.",type:"string"},parameters:{description:"Function parameters (after the implicit state parameter). Accepts CEM-compatible parameter objects or bare string names for backward compatibility.",examples:[["event"],[{name:"event",type:{text:"Event"}}],[{description:"Item identifier",name:"id",type:{text:"number"}}]],items:{oneOf:[{type:"string"},{$ref:"#/$defs/CemParameter"}]},type:"array"},type:{description:"Return type for tooling (JSON Schema or CEM { text } format)."}},required:["$prototype"],type:"object"};var Fe={additionalProperties:!1,description:"A JSON Pointer $ref operand within an expression node. $args/<name> resolves a named formula's parameter (callable entries only).",properties:{$ref:{pattern:String.raw`^(\$map/|\$reduce/|\$args/|event#/|#/|parent#/|window#/|document#/)`,type:"string"}},required:["$ref"],type:"object"},Ne={anyOf:[{not:{pattern:String.raw`\$\{`},type:"string"},{type:"number"},{type:"boolean"},{type:"null"},{items:{$ref:"#/$defs/ExpressionOperand"},type:"array"},{description:"Plain-object literal (e.g. an Intl options bag). Objects carrying $ref or operator keys are pointers/nodes, never literals.",not:{anyOf:[{required:["$ref"]},{required:["operator"]}]},type:"object"}],description:"A non-reactive operand: scalar, plain-object literal, or array of operands."};var Te={additionalProperties:!1,description:"The core expression node. operator + target, with value gated by arity.",oneOf:[{not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{operator:{$ref:"#/$defs/UnaryOperator"}},required:["operator"],title:"Unary — target only, no value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/BinaryOperator"}},required:["operator","value"],title:"Binary — left in target, right in value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/AssignmentOperator"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator","value"],title:"Assignment — writable target, value required"},{not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{operator:{$ref:"#/$defs/NoArgMethod"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator"],title:"pop / shift — array receiver, no value"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/OneArgMethod"},target:{$ref:"#/$defs/ExpressionPointer"}},required:["operator","value"],title:"push / unshift — array receiver, single value argument"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/SpliceMethod"},target:{$ref:"#/$defs/ExpressionPointer"},value:{items:{$ref:"#/$defs/ExpressionOperand"},minItems:1,type:"array"}},required:["operator","value"],title:"splice — array receiver, [start, deleteCount, ...items]"},{properties:{operator:{$ref:"#/$defs/ReduceMethod"},target:{anyOf:[{$ref:"#/$defs/ExpressionPointer"},{$ref:"#/$defs/ExpressionNode"}]},value:{$ref:"#/$defs/ExpressionNode"}},required:["operator","value","initial"],title:"reduce — pure fold over a pointer or derived array; seed in initial"},{not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/MapFilterMethod"},target:{anyOf:[{$ref:"#/$defs/ExpressionPointer"},{$ref:"#/$defs/ExpressionNode"}]},value:{$ref:"#/$defs/ExpressionNode"}},required:["operator","value"],title:"map / filter — pure over a pointer or derived array; per-item expression in value"},{description:"The ECMAScript conditional (ternary) operator, pure: target is the test, value the consequent, initial the alternate (the reduce precedent for repurposing initial). Chain else-if by nesting another ?: node in initial.",properties:{operator:{$ref:"#/$defs/ConditionalOperator"}},required:["operator","value","initial"],title:"?: — pure conditional; test in target, consequent in value, alternate in initial"},{description:"Value-keyed multiway selection, pure: target is the discriminant (matched against case keys by its string form, like element-level $switch), cases maps matched values to result operands, default is the operand when no case matches (result is undefined without it). Condition-chain branching composes from nested ?: nodes instead.",not:{anyOf:[{required:["value"]},{required:["initial"]}]},properties:{cases:{additionalProperties:{$ref:"#/$defs/ExpressionOperand"},type:"object"},default:{$ref:"#/$defs/ExpressionOperand"},operator:{$ref:"#/$defs/SwitchOperator"}},required:["operator","cases"],title:"switch — pure value-keyed selection; discriminant in target, results in cases/default"},{description:"A pure standard-library method call: target is the receiver (any operand — never mutated; change-by-copy names replace the mutating originals), value the optional argument (bare scalar) or argument list (array). A missing receiver or method yields undefined, matching null-safe path reads.",not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/PureMethod"}},required:["operator"],title:"Pure method — genuine prototype methods; receiver in target, args in value"},{description:"Invoke a callable, pure in formula position: target is the callee pointer — a named formula entry (#/state/…) or a blessed pure global via window#/ (Math.*, JSON.*, Object.keys/values/entries, and "+`${XA()}) — and value is the positional argument list (the splice args-in-value precedent). Argument order follows the callee's declared parameters.`,not:{required:["initial"]},properties:{operator:{$ref:"#/$defs/CallOperator"},target:{$ref:"#/$defs/ExpressionPointer"},value:{items:{$ref:"#/$defs/ExpressionOperand"},type:"array"}},required:["operator"],title:"call — invoke a named formula or blessed global; callee in target, args in value"}],properties:{cases:{additionalProperties:{$ref:"#/$defs/ExpressionOperand"},description:"switch only: matched discriminant value (string form) → result operand.",type:"object"},default:{$ref:"#/$defs/ExpressionOperand",description:"switch only: result operand when no case key matches."},initial:{$ref:"#/$defs/ExpressionOperand"},operator:{type:"string"},target:{$ref:"#/$defs/ExpressionOperand"},value:{$ref:"#/$defs/ExpressionOperand"}},required:["operator","target"],type:"object"},ne={additionalProperties:!1,description:"A declarative expression entry (Shape 5). Used as a state entry or inline event handler. With parameters it is a named formula: a pure, reusable computation invoked via the call operator, its parameters resolved through $args/<name> refs in the body.",properties:{$description:{type:"string"},$expression:{$ref:"#/$defs/ExpressionNode"},$title:{type:"string"},parameters:{description:"Named-formula parameters (CEM convention, as on Function entries): bare names or CEM parameter objects. Present ⇒ the entry is callable, not a computed value.",items:{anyOf:[{type:"string"},{$ref:"#/$defs/CemParameter"}]},type:"array"}},required:["$expression"],type:"object"};var De={description:"A single state entry. Shape is determined by value type: "+"scalar/array → naked reactive property, string with ${} → computed, "+'object with $prototype: "Function" → function, '+"object with $prototype: <other> → data source, "+"object with type and default → typed reactive property, "+"plain object → naked object reactive property.",oneOf:[{type:"number"},{type:"boolean"},{type:"null"},{type:"string"},{type:"array"},{$ref:"#/$defs/TypedStateDef"},{$ref:"#/$defs/FunctionDef"},{$ref:"#/$defs/ExternalClassDef"},{$ref:"#/$defs/ExpressionEntry"},{not:{anyOf:[{required:["$prototype"]},{required:["default"]},{required:["type"]},{required:["$expression"]}]},type:"object"}]};var Je={description:"Format participation marker. A class carrying this block is auto-discovered from the project imports map and used for file-extension dispatch by the compiler, server, and studio.",properties:{documentKinds:{description:'"page"/"component" allow the extension in pages/components discovery; "content" allows it as a content-type source.',items:{enum:["page","component","content"],type:"string"},type:"array"},exportTarget:{description:"When true, site builds emit a serialized sidecar per page in this format.",type:"boolean"},extensions:{description:'File extensions this format claims, with leading dot (e.g. [".md"]).',items:{pattern:String.raw`^\.`,type:"string"},minItems:1,type:"array"},mediaType:{description:"MIME type for the format (icons, labels, HTTP).",type:"string"},remote:{description:"When true, the load capability accepts http(s) URLs as sources.",type:"boolean"}},required:["extensions"],type:"object"},qe={additionalProperties:!1,description:"Project-section admission block (specs/extensions.md §9). A class carrying this block owns "+"the project.json section named by `key`; hosts dispatch that section's data through the class's projectData/resolvePaths capabilities.",properties:{description:{type:"string"},key:{description:"The project.json top-level section this class owns (exclusive per project).",type:"string"},referenceable:{description:"Whether section entries can be referenced from documents (e.g. content types).",type:"boolean"},title:{type:"string"}},required:["key"],type:"object"},Le={additionalProperties:!1,description:"Server-mount admission block (specs/extensions.md §11). A class carrying this block mounts "+"routes under its /_jx/ basePath in the site worker and dev server.",properties:{basePath:{description:"Route subtree this class mounts — must be under /_jx/ (exclusive per project).",examples:["/_jx/data","/_jx/auth"],type:"string"},module:{description:"Module specifier exporting the mount handler.",type:"string"},order:{description:"Mount order (ascending; default 100).",type:"number"}},required:["basePath"],type:"object"},Ve={description:"Connection-provider admission block (specs/extensions.md §12). A class carrying this block "+"provides database connections of the given provider/kind.",properties:{kind:{description:"SQL dialect family the provider speaks.",enum:["sqlite","postgres"],type:"string"},local:{description:"Local-development substitute provider (e.g. sqlite for D1).",type:"string"},module:{description:"Module specifier exporting the provider implementation.",type:"string"},provider:{description:"Provider identifier (e.g. d1, supabase, sqlite).",type:"string"},serve:{description:"Module specifier exporting the serve-time worker binding.",type:"string"}},required:["provider","kind"],type:"object"};var cw=[301,302,303,307,308],He={description:"Schema for Jx project.json files. A project.json file is the root anchor file for a Jx project, declaring site metadata, default settings, global styles, extensions, and build configuration. Open by design: extension-contributed sections (e.g. `content`) are opaque top-level keys; the generated per-project entry document (project.schema.json) closes the composition.",properties:{$defs:{description:"Global type definitions available to all pages.",type:"object"},$elements:{description:"Global custom element dependencies available to all pages. Items are $ref objects or npm package specifier strings.",items:{oneOf:[{additionalProperties:!1,properties:{$ref:{type:"string"}},required:["$ref"],type:"object"},{type:"string"}]},type:"array"},$head:{description:"Global <head> entries applied to all pages. Array of element definitions for meta tags, link tags, script tags, etc.",examples:[[{attributes:{href:"/favicon.svg",rel:"icon"},tagName:"link"},{attributes:{content:"Jx",name:"generator"},tagName:"meta"}]],items:{properties:{attributes:{additionalProperties:{type:"string"},type:"object"},tagName:{type:"string"}},type:"object"},type:"array"},$media:{additionalProperties:{type:"string"},description:'Named media breakpoints following CSS @custom-media convention. Available in all component style objects. Declaring a pure color-scheme query (e.g. "--dark": "(prefers-color-scheme: dark)") additionally opts the site into the forced-scheme contract: @--dark style blocks are dual-emitted so a data-color-scheme attribute on <html> overrides the OS preference, color-scheme is declared on :root, and a pre-paint script restores the '+"visitor's persisted choice (spec §9.5).",examples:[{"--dark":"(prefers-color-scheme: dark)","--lg":"(min-width: 1024px)","--md":"(min-width: 768px)","--sm":"(min-width: 640px)"}],type:"object"},$schema:{description:"Relative path to the generated per-project schema (conventionally ./project.schema.json, written by `jx schema`).",type:"string"},build:{description:"Build configuration.",properties:{adapter:{description:"Platform adapter for deployment-specific output.",enum:["static","cloudflare-pages","cloudflare-workers","node","bun"],type:"string"},deploy:{additionalProperties:!1,description:"Deployment tracking: the hosting project this repo publishes to. Identifiers "+"only (no secrets) — safe to commit; Studio uses it to tell whether the publish "+"workflow already exists. `adapter` says how the build is packaged; `deploy` says where it ships.",properties:{accountId:{description:"Hosting account id (e.g. the Cloudflare account id).",type:"string"},productionUrl:{description:"Production URL of the connected hosting project.",type:"string"},projectName:{description:"Hosting project name (e.g. the Cloudflare Pages project).",pattern:"^[a-z0-9][a-z0-9-]*$",type:"string"},provider:{description:"Hosting provider the project is connected to.",enum:["cloudflare-pages"],type:"string"}},required:["provider","accountId","projectName"],type:"object"},format:{default:"directory",description:"Reserved; currently unused. Accepted for forward compatibility with single-file output (desktop single-file mode) — the build emits per-route directories regardless.",enum:["directory","single"],type:"string"},outDir:{default:"./dist",description:"Output directory for compiled site.",type:"string"},headers:{additionalProperties:!1,description:"Emit dist/_headers — the response headers only the build can know. Honored by "+"Cloudflare Pages/Workers assets and Netlify; on the node/bun adapters the file documents what a reverse proxy in front of them must send.",properties:{cache:{default:"auto",description:'"auto" marks the content-addressed image variants immutable (RFC 8246) and revalidates everything else (RFC 9111). "off" emits no Cache-Control at all.',enum:["auto","off"],type:"string"},enabled:{default:!0,type:"boolean"},rules:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},description:"Verbatim rules, merged after the generated block.",propertyNames:{pattern:"^/"},type:"object"},security:{additionalProperties:!1,properties:{contentTypeOptions:{default:!0,type:"boolean"},csp:{default:!1,description:"CSP Level 3. Off by default: unlike the other security headers this one "+"governs code the build cannot see — a third-party script that loads a "+"second script, a widget that opens a frame — so turning it on is a change "+"to verify in the browser console, not a safe default. `script-src` is derived from the inline scripts and external origins the build emitted; `style-src` keeps 'unsafe-inline', because per-page <style> blocks and per-element style attributes have no site-wide hash.",oneOf:[{type:"boolean"},{const:"report-only"},{additionalProperties:!1,properties:{directives:{additionalProperties:{oneOf:[{type:"string"},{const:!1}]},description:"Replace (string) or remove (false) a computed directive. A replacement is wholesale, so an addition restates the defaults.",type:"object"},mode:{default:"enforce",enum:["enforce","report-only"]},reportUri:{format:"uri-reference",type:"string"}},type:"object"}]},frameOptions:{default:"SAMEORIGIN",oneOf:[{enum:["DENY","SAMEORIGIN"],type:"string"},{const:!1}]},hsts:{default:!1,description:"RFC 6797. Off by default: a wrong max-age locks the apex domain to HTTPS for that long, and the mistake is invisible until a certificate lapses. `preload` requires `includeSubDomains` and is a build error without it.",oneOf:[{type:"boolean"},{additionalProperties:!1,properties:{includeSubDomains:{default:!0,type:"boolean"},maxAge:{default:31536000,minimum:0,type:"integer"},preload:{default:!1,type:"boolean"}},type:"object"}]},permissionsPolicy:{default:"camera=(), microphone=(), geolocation=()",oneOf:[{type:"string"},{const:!1}]},referrerPolicy:{default:"strict-origin-when-cross-origin",oneOf:[{enum:["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"],type:"string"},{const:!1}]}},type:"object"}},type:"object"},sitemap:{default:!0,description:"Generate sitemap.xml from the route table (requires `url`). Set false to disable.",type:"boolean"},trailingSlash:{default:"always",description:"Trailing slash behavior for generated URLs.",enum:["always","never","ignore"],type:"string"}},type:"object"},copy:{additionalProperties:{type:"string"},description:"Declarative file copy map. Keys are source paths (relative to project root), values are destination paths (relative to outDir).",type:"object"},defaults:{description:"Default settings applied to all pages unless overridden.",properties:{charset:{default:"utf8",description:"Default charset for the page.",type:"string"},dir:{description:"Base direction for the <html> element. Omitted when unset — a page's `$dir` "+"overrides it. Right-to-left content renders left-to-right without this.",enum:["ltr","rtl","auto"],type:"string"},lang:{default:"en",description:"Default lang attribute for the <html> element. A page's `$lang` overrides it.",type:"string"},layout:{default:null,description:"Default layout file path applied to all pages. Set to null to render pages without a layout.",examples:["./layouts/base.json"],oneOf:[{type:"string"},{type:"null"}]},shadow:{default:!1,description:"Default shadow-DOM mode for every component (spec.md §16.6). Off unless set: a "+"shadow root isolates component styles from the page and replaces the <slot> emulation with real slot distribution. A component's own `$shadow` overrides this in both directions.",oneOf:[{enum:["open","closed"],type:"string"},{const:!1,type:"boolean"}]}},type:"object"},extensions:{description:"Extension packages: bare package names (resolved project-first through the package exports map) or relative paths. Each must export jx-extension.json.",examples:[["@jxsuite/parser"]],items:{type:"string"},type:"array"},manifest:{additionalProperties:!1,description:'W3C Web App Manifest, emitted as manifest.webmanifest with a <link rel="manifest"> on every page. Absent means no manifest: it is a claim that a site is meant to be installed, and most are not.',properties:{backgroundColor:{type:"string"},categories:{items:{type:"string"},type:"array"},description:{type:"string"},dir:{enum:["ltr","rtl","auto"],type:"string"},display:{default:"standalone",enum:["fullscreen","standalone","minimal-ui","browser"],type:"string"},enabled:{default:!0,type:"boolean"},icons:{description:"Icons at 192px and 512px are what browsers require before offering to install the site; the build warns when either is missing.",items:{additionalProperties:!1,properties:{purpose:{type:"string"},sizes:{examples:["192x192"],type:"string"},src:{type:"string"},type:{type:"string"}},required:["src"],type:"object"},type:"array"},lang:{type:"string"},name:{description:"Defaults to the project name.",type:"string"},orientation:{type:"string"},scope:{type:"string"},shortName:{type:"string"},startUrl:{default:"/",type:"string"},themeColor:{type:"string"}},type:"object"},serviceWorker:{default:!1,description:"W3C Service Worker, emitted as sw.js. Off unless declared — a worker is sticky, so it "+"is the one output that can keep breaking visitors after a deploy tries to fix them. **Turning it off means `false`, not deleting the key**: `false` emits a tombstone at the same URL that unregisters the old worker and clears its caches, and a 404 there is not an instruction to stop. HTML is always network-first; only the content-addressed /images/_optimized/* is served cache-first.",oneOf:[{type:"boolean"},{additionalProperties:!1,properties:{enabled:{default:!0,type:"boolean"},offlineFallback:{description:"Page served for a failed navigation. Added to `precache` if not already there.",type:"string"},precache:{description:"Site-absolute URLs fetched at install time. Each must be a file this build produces; one that is not fails the build, because a single unreachable entry stops the worker installing at all.",items:{pattern:"^/",type:"string"},type:"array"},scope:{default:"/",type:"string"}},type:"object"}]},securityTxt:{additionalProperties:!1,description:"RFC 9116 security.txt, emitted at .well-known/security.txt. `expires` is required by "+"§2.5.5 and an absent or past value is a build error — an expired file advertises a "+"reporting channel while telling the reporter not to trust it. A hand-placed public/.well-known/security.txt shadows this, which is how a clearsigned file ships.",properties:{acknowledgments:{items:{type:"string"},type:"array"},canonical:{type:"string"},contact:{description:"At least one mailto:, https: or tel: URI (§2.5.3).",items:{type:"string"},type:"array"},enabled:{default:!0,type:"boolean"},encryption:{items:{type:"string"},type:"array"},expires:{format:"date-time",type:"string"},hiring:{items:{type:"string"},type:"array"},policy:{items:{type:"string"},type:"array"},preferredLanguages:{description:"BCP 47 tags, validated and canonicalized like i18n.locales.",items:{pattern:bC,type:"string"},type:"array"}},type:"object"},i18n:{description:"Internationalization configuration.",properties:{defaultLocale:{description:"Default locale, as a BCP 47 language tag. The pattern catches shape errors (`en_US`, `en--US`); the build is the authority on well-formedness.",examples:["en"],pattern:bC,type:"string"},locales:{description:"Available locales, as BCP 47 language tags.",examples:[["en","fr","de"]],items:{pattern:bC,type:"string"},type:"array"},routing:{description:"Locale routing strategy.",enum:["prefix-except-default","prefix-always"],type:"string"}},type:"object"},images:{$ref:"#/$defs/ImageConfig"},imports:{additionalProperties:{type:"string"},description:"Global import map: $prototype names to .class.json file paths. Makes external classes available by name in all pages.",examples:[{Markdown:"@jxsuite/parser/Markdown.class.json",MarkdownCollection:"@jxsuite/parser/MarkdownCollection.class.json"}],type:"object"},name:{default:"Jx Site",description:"Human-readable project name.",examples:["My Portfolio","Jx Example Site"],type:"string"},redirects:{additionalProperties:{oneOf:[{description:"Destination path or URL; implies a 301.",type:"string"},{additionalProperties:!1,description:"A redirect with an explicit RFC 9110 §15.4 status.",properties:{destination:{type:"string"},status:{default:301,description:"RFC 9110 §15.4 redirection status. 307 and 308 preserve the request method; "+"301 and 302 historically do not.",enum:[...cw],type:"integer"}},required:["destination"],type:"object"},{additionalProperties:!1,description:"A rewrite (proxy): the destination's content is served AT the source URL, with no "+"redirect. Emitted as status 200 in `_redirects`, which is the host convention — "+"not an HTTP redirection status.",properties:{destination:{type:"string"},rewrite:{const:!0,type:"boolean"}},required:["destination","rewrite"],type:"object"}]},description:"Static redirect and rewrite rules. Keys are source paths in URLPattern pathname syntax.",examples:[{"/api/*":{destination:"https://api.example.com/*",rewrite:!0},"/legacy/*":{destination:"/archive/*",status:308},"/old-about":"/about"}],propertyNames:{pattern:"^/"},type:"object"},state:{description:"Site-wide reactive state available to all pages.",type:"object"},style:{additionalProperties:{oneOf:[{type:"string"},{type:"number"},{$ref:"#/$defs/StyleObject"}]},description:"Global CSS styles applied to the <body> element. Uses the same camelCase CSSOM convention and recursive selector/at-rule nesting as component styles.",type:"object"},url:{description:"Production URL of the deployed site.",examples:["https://example.com","https://jxsuite.com"],type:"string"}},type:"object"};var Ie={additionalProperties:!1,description:"Schema for jx-extension.json manifests. Located at the extension package root and exported so hosts can resolve <package>/jx-extension.json through the exports map.",properties:{$schema:{type:"string"},classes:{additionalProperties:{type:"string"},description:"$prototype-visible class name → class descriptor path, relative to the manifest.",type:"object"},description:{description:"One-line description.",type:"string"},name:{description:"Package name; must match package.json.",type:"string"},schemas:{additionalProperties:!1,description:"Schema fragments this package contributes, relative to the manifest.",properties:{document:{description:"Document-schema fragment (positions like $paths values).",type:"string"},fields:{description:"Field-union fragment: its $defs members are unioned into the per-project "+"field-schema resource as extension field extras (specs/extensions.md §5.3).",type:"string"},project:{description:"Project-schema fragment (top-level project.json sections).",type:"string"}},type:"object"},title:{description:"Human-readable name for studio surfaces.",type:"string"}},required:["name"],type:"object"};var _e=["literal","ref","template","expression","function"],Wo={expression:"Formula",function:"Inline function",literal:"Fixed value",ref:"From data…",template:"Mixed text"},q_={expression:"Computed from other values, built up operator by operator.",function:"Code that runs when this fires.",literal:"A value you type here, the same every time.",ref:"The current value of a signal, picked from a list.",template:"Text with ${…} placeholders that fill in from signals."};function Mu(e){if(Me(e))return"ref";if(Fa(e))return"function";if(ja(e))return"template";if(_(e)&&"$expression"in e)return"expression";return"literal"}var We={oneOf:[{$ref:"#/$defs/RefObject"},{$ref:"#/$defs/ExpressionEntry"},{$ref:"#/$defs/FunctionDef"}]},Ue=new Map([["ExpressionEntry",ne],["FunctionDef",oe],["RefObject",X],["StyleObject",H]]);function ze(e){let{properties:t,required:r}=e;return Array.isArray(r)&&r.includes("$ref")&&v(t)&&Boolean(t.$ref)}function Be(e){let{required:t}=e;return Array.isArray(t)&&t.includes("$expression")}function Ge(e){let{properties:t}=e;return v(t)&&v(t.$prototype)&&t.$prototype.const==="Function"}function Ke(e){return e.type==="string"&&e.pattern===void 0&&e.enum===void 0&&e.const===void 0}var Ye=new Set(["array","boolean","integer","null","number","object","string"]);function ie(e,t){if(!v(e))return;if(t.seen.has(e))return;t.seen.add(e);let r=n(e.$ref)?e.$ref:void 0;if(r!==void 0&&Object.keys(e).length===1){let o=r.startsWith("#/$defs/")?r.slice(8):r,l=Ue.get(o);if(l)ie(l,t);else t.unresolved.add(r);return}if(ze(e)){t.found.add("ref");return}if(Be(e)){t.found.add("expression");return}if(Ge(e)){t.found.add("function");return}let a=!1;for(let o of["oneOf","anyOf","allOf"]){let l=e[o];if(Array.isArray(l)){a=!0;for(let y of l)ie(y,t)}}if(a)return;if(Ke(e)){t.found.add("literal"),t.found.add("template");return}if(e.enum!==void 0||e.const!==void 0){t.found.add("literal");return}if(n(e.type)&&Ye.has(e.type))t.found.add("literal")}function Xe(e){let t={found:new Set,seen:new Set,unresolved:new Set};return ie(e,t),{caps:_e.filter((r)=>t.found.has(r)),unresolved:[...t.unresolved].toSorted()}}function ae(e){return Xe(e).caps}var Qe={anyOf:[K,...G.anyOf.slice(1)]},RD=B.anyOf.map((e)=>e.properties.operator.const),et={attribute:Q.additionalProperties,componentProp:ee.additionalProperties,elementProperty:te,eventHandler:We,repeaterFilter:J.properties.filter,repeaterItems:J.properties.items,repeaterSort:J.properties.sort,styleProperty:H.additionalProperties,switchDiscriminant:re,elementTag:Qe,textProperty:Y},de=new Map;function NE(e){let t=de.get(e);if(t)return t;let r=ae(et[e]);return de.set(e,r),r}function Id(e){return n(e)?NE(e):ae(e.schema)}function me(e){return{anyOf:[ae(e).length>0?e:{type:"string"},{$ref:"#/$defs/RefObject"}]}}var pe=new Map,se=new Map;function ce(e,t){return`${h.value?.id??"-"}|${e}|${t}`}function ue(e){return`${h.value?.id??"-"}|${e}`}function fp(e,t,r){pe.set(ce(e,t),Se(r))}function mp(e,t){return pe.has(ce(e,t))}function tt(e,t){return Se(pe.get(ce(e,t)))}function rt(e,t){se.set(ue(e),t)}function fe(e){return e==="literal"||e==="template"}function Pu(e,t){let r=ue(e),a=Mu(t),o=se.get(r),l=o!==void 0&&fe(o)&&fe(a)?o:a;return se.set(r,l),l}function Fu(e,t){switch(e){case"ref":{let[r]=t.stateDefs;return r?{$ref:`#/state/${r}`}:{$ref:t.extraSignals?.[0]?.value??""}}case"template":{let[r]=t.stateDefs;return r?`\${state.${r}}`:"${}"}case"expression":return{$expression:{operator:"??",target:null,value:null}};case"function":return{$prototype:"Function",body:"",parameters:[]};default:return t.literalDefault}}function Rd(e,t,r,a,o){return fp(e,t,a),rt(e,r),mp(e,r)?tt(e,r):o}var he={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSchemaForm",$description:"The shared schema→form engine as a document: one row per property of a JSON Schema, drawn from a projection `ui/schema-form.ts` computes. Nothing here reads a schema. The flow decides which of nine controls a property gets, what its options are, which rungs of the value ladder the position permits, what a commit is worth and whether the value is refused; this document draws the answer. That split is what lets the Entry editor, Project Settings and the Signals panel all embed the same form and get the same row — and it is why the engine hands back a HOST ELEMENT rather than a template: a document clears the host it is given, so a caller that is still lit renders an empty element for it and puts it in its own tree (studio-ui-guidelines.md §9.3, §9.4).",tagName:"div",attributes:{part:"form"},style:{$description:"What `.style-row`, `.style-row-label`, `.style-row--invalid`, `.style-row-error`, `.style-row-error-count`, `.array-object-field`, `.array-object-row` and `.schema-param-editor` said in `styles/inspector.css`, keyed on `part` and re-pointed at the studio token layer. Those rules are DEAD in the stylesheet now rather than shared: `ui/field-row.ts` drew the same row for the inspector panels and `ui/expression-editor.ts` the same array rows, and both converted, so this document's copy is the only emitter left. Every `--spectrum-font-size-*` reference is gone rather than renamed — those names resolve only inside `<sp-theme>`, and a document mounted in a settings pane or an entry editor is outside it, so each would silently have taken its hard-coded fallback.",display:"contents",'& [part="field"]':{padding:"var(--jx-space-1) 0"},'& [part="value"]':{$description:"The control line: the source chip, then whatever the rung draws. `min-width: 0` is load-bearing — without it a monospaced pointer or a long JSON line pushes the row past the pane's right edge instead of scrolling inside its own control.",display:"flex",alignItems:"flex-start",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="value"] > *':{minWidth:"0"},'& [part="widget"] > *':{$description:"The switch wrapper is `display: contents`, so whatever rung it drew is the flex item of the line above rather than a box inside a box — which is what keeps `min-width: 0` reaching the control that actually needs it.",flex:"1",minWidth:"0"},'& [part="source"]':{$description:"Quiet while the value is fixed, accent-tinted the moment it is produced from something else — the one place in the row that says a value is not what it looks like.",flex:"none",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="source"][data-source="bound"]':{color:"var(--accent)"},'& [part="pointer-group"]':{display:"flex",flex:"1",gap:"var(--jx-space-2)",minWidth:"0"},'& [part="pointer-group"] > *':{flex:"1",minWidth:"0"},'& [part="json"]':{display:"flex",flexDirection:"column",flex:"1",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="chips"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-1)"},'& [part="chip"]':{padding:"1px var(--jx-space-2)",borderRadius:"var(--radius)",background:"var(--bg)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="rows"]':{display:"flex",flexDirection:"column",flex:"1",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="row"]':{$description:"Wraps rather than scrolls: an item with five declared properties in a 260px inspector is a column of controls, not a horizontal scroller nobody finds the end of.",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="row"] > [part="cell"]:only-of-type > *':{$description:"A row of one cell (an item of a list of single values: a category, a picture) gives that cell the row's width, so a list reads as the fields around it do rather than as a column of stubs.",flex:"1",minWidth:"0"},'& [part="row-add"]':{alignSelf:"flex-start"},'& [part="field-error"]':{$description:"The left rule is what makes the line read as belonging to the control above it rather than to the row below.",margin:"var(--jx-space-1) 0 0",paddingLeft:"var(--jx-space-2)",borderLeft:"2px solid var(--danger)",fontSize:"var(--jx-text-sm)",lineHeight:"1.35",color:"var(--danger)"},'& [part="field-error-count"]':{marginLeft:"var(--jx-space-1)",fontFamily:"var(--font-mono)",opacity:"0.75"}},children:[{$prototype:"Array",items:{$ref:"#/state/fields"},key:{$ref:"$map/item/key"},map:{$description:"One property of the schema. `jx-field` owns the label, the required mark, the invalid shade and the association between the label and whatever control ends up in the slot, so none of that is written here — which is the whole of what the four hand-rolled `.style-row` variants used to carry.",tagName:"jx-field",attributes:{part:"field","data-prop":"${$map.item.prop}"},$props:{label:{$ref:"$map/item/label"},description:{$ref:"$map/item/description"},required:{$ref:"$map/item/required"},invalid:{$ref:"$map/item/invalid"},span:!0},children:[{tagName:"div",attributes:{part:"value",role:"none"},children:[{tagName:"span",attributes:{part:"source-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasChip"},cases:{true:{$description:"The Value Source chip (§6.6): what produces this value, in the same four words every other bindable position in Studio uses. It opens the rung picker rather than cycling, so any rung the position permits is one action away. Drawn only where the host named somewhere a value could come from — a settings form that names none edits fixed values and shows no chip.",tagName:"jx-action-button",attributes:{part:"source","data-source":"${$map.item.source}"},$props:{label:{$ref:"$map/item/sourceName"},hint:{$ref:"$map/item/sourceHint"},size:"sm",haspopup:"menu",disabled:{$ref:"$map/item/sourceLocked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickSource"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",textContent:"${$map.item.sourceLabel}"}]}}},{tagName:"span",attributes:{part:"widget",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{$description:"The default control, and the one every scalar without a narrower answer lands on. Commits on input, debounced by the flow, which is what makes the canvas and the preview follow a value being typed rather than waiting for a blur.",tagName:"jx-textfield",attributes:{part:"text"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},size:"sm",invalid:{$ref:"$map/item/invalid"},mono:{$ref:"$map/item/mono"},multiline:{$ref:"$map/item/multiline"},type:{$ref:"$map/item/inputType"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/edit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},template:{$description:"The Mixed text rung: a string with `${…}` holes in it. Monospaced because what is being written is half text and half pointer, and committed on change rather than on input — a half-typed placeholder is not a template anybody meant.",tagName:"jx-textfield",attributes:{part:"template"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:"${state.templatePlaceholder}",size:"sm",mono:!0},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},pointer:{$description:"The From data… rung. It is TWO controls over one value because the kit has no combobox and this rung needs one: the list is a set of suggestions rather than a whitelist (a value may point at a route param, a signal, or a pointer neither the form nor its host enumerates), so the select offers what the host named and the field accepts anything. Picking a row writes the field; typing a pointer the host never named leaves the select showing it, because a select whose value matches no option synthesises the row rather than lying about what it holds.",tagName:"span",attributes:{part:"pointer-group",role:"none"},children:[{tagName:"jx-textfield",attributes:{part:"pointer"},$props:{label:"${$map.item.label} pointer",value:{$ref:"$map/item/value"},placeholder:"#/state/…",size:"sm",mono:!0},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"span",attributes:{part:"pointer-pick-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasOptions"},cases:{true:{tagName:"jx-select",attributes:{part:"pointer-pick"},$props:{label:"${$map.item.label} source",options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}}}]},select:{$description:"A closed set the schema itself declares, or one the host resolved through a `#/$context/…` pointer. The empty row is offered only where the property is optional — a required field has no “none” to choose.",tagName:"jx-select",attributes:{part:"select"},$props:{label:{$ref:"$map/item/label"},options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm",invalid:{$ref:"$map/item/invalid"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},checkbox:{tagName:"jx-checkbox",attributes:{part:"checkbox"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitChecked"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},number:{$description:"`min`, `max` and `step` come straight off the property schema, so the control refuses out-of-range input before the flow has to say why. The stepper is off: these are configuration values that get typed, not nudged.",tagName:"jx-number-field",attributes:{part:"number"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},min:{$ref:"$map/item/min"},max:{$ref:"$map/item/max"},step:{$ref:"$map/item/step"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commit"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},json:{$description:"A value with structure, edited as the JSON it is. The chips above it are a read of the shape currently held — property name and declared type — so the common case (“what is in here?”) is answered without reading the text. The flow parses on a debounce and keeps the last parsable value; a mid-keystroke `{` is not a refusal.",tagName:"span",attributes:{part:"json",role:"none"},children:[{tagName:"span",attributes:{part:"chips-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasChips"},cases:{true:{tagName:"span",attributes:{part:"chips",role:"none"},children:[{$prototype:"Array",items:{$ref:"$map/item/chips"},key:{$ref:"$map/item/key"},map:{tagName:"span",attributes:{part:"chip"},textContent:"${$map.item.label}"}}]}}},{tagName:"jx-textfield",attributes:{part:"json-text"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/placeholder"},size:"sm",mono:!0,multiline:!0,grows:!0},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editJson"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}}]},rows:{$description:"An array whose items have a declared shape: one row per item, one cell per declared property of an object item, or one cell for a single-value item (a list of categories, a gallery of pictures), with a remove beside each and one add below. The alternative was the raw-JSON editor, which is what an array of anything else still gets: a shape the schema states is a shape the form can draw.",tagName:"span",attributes:{part:"rows",role:"none"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/key"},map:{tagName:"span",attributes:{part:"row",role:"none","data-row":"${$map.item.key}"},children:[{$prototype:"Array",items:{$ref:"$map/item/cells"},key:{$ref:"$map/item/id"},map:{tagName:"span",attributes:{part:"cell",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{tagName:"jx-textfield",attributes:{part:"cell-text"},$description:"Committed on input AND on change: a cell showing a pointer is committed when it is left, exactly as the pointer field above is, and a cell showing text follows the canvas while it is typed. The two never disagree — a change after an input carries the same string.",$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},placeholder:{$ref:"$map/item/label"},size:"sm"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},select:{tagName:"jx-select",attributes:{part:"cell-select"},$props:{label:{$ref:"$map/item/label"},options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},checkbox:{tagName:"jx-checkbox",attributes:{part:"cell-checkbox"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCellChecked"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},number:{tagName:"jx-number-field",attributes:{part:"cell-number"},$props:{label:{$ref:"$map/item/label"},value:{$ref:"$map/item/value"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editCell"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/row"},{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},control:{$description:"A cell a registered control owns: a relationship to another collection, or a picture (the media field). The document draws the empty host and nothing inside it; `ui/schema-form.ts` mounts the control into it, by the same dispatch a FIELD host gets. An extension's control is its own surface rather than part of this one, and the seam between them is this empty node.",tagName:"span",attributes:{part:"cell-control-host","data-control":"${$map.item.id}",role:"none"}}}}},{tagName:"jx-action-button",attributes:{part:"row-remove"},$props:{icon:"trash",label:"${$map.item.removeLabel}",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeRow"},value:[{$ref:"$map/item/field"},{$ref:"$map/item/key"}]}]}}]}},{tagName:"jx-action-button",attributes:{part:"row-add"},$props:{icon:"plus",label:"${$map.item.addLabel}",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addRow"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"Add"}]}]},control:{$description:"A field a registered control owns outright — `schema-builder`, `secret`, or the `reference` picker. The document draws the empty host and the flow MOUNTS the control into it: the registry's contract (specs/extensions.md §9.1) is a control that owns a host, all three built-ins are documents of their own, and a document clears the host it is given — which is why this node is drawn empty and never written to twice.",tagName:"div",attributes:{part:"control-host","data-control":{$ref:"$map/item/key"},role:"none"}}}}]},{tagName:"span",attributes:{part:"error-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasError"},cases:{true:{$description:'§16.1\'s inline tier: why this value is refused, said AT the control that refuses it and for exactly as long as the value stays bad. `role="alert"` so it is announced when it appears, and a repeat counter from two up — “it refused me again” is otherwise indistinguishable from “the field is still red from last time”.',tagName:"p",attributes:{part:"field-error",role:"alert"},children:[{tagName:"span",attributes:{part:"field-error-text"},textContent:"${$map.item.error}"},{tagName:"span",attributes:{part:"error-count-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasCount"},cases:{true:{tagName:"span",attributes:{part:"field-error-count"},textContent:"${$map.item.errorCount}"}}}]}}}]}}]};L("schema-form",he);function nt(e,t){let r=t?.$map,a=v(r)&&v(r.item)?r.item:void 0,o=e==="control-host"?a?.key:e==="cell-control-host"?a?.id:void 0;return n(o)?o:""}function it(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function ye(e,t,r){let a=document.createElement("div");a.style.display="contents";let o=g({...e,...t,templatePlaceholder:"${state.…}"}),l=null,y=!1,b=!1;function d(){y=!0,R("schema-form",o,a,{onNodeCreated:(m,f,S,w)=>{if(!(m instanceof HTMLElement))return;let O=nt(it(S),w);if(O!=="")r(O,m)}}).then((m)=>{if(y=!1,b){m.dispose();return}l=m})}return d(),{dispose(){b=!0,l?.dispose(),l=null,a.textContent=""},host:a,update(m){if(o.fields=m.fields,b||y||l!==null&&a.contains(l.root))return;l?.dispose(),l=null,a.textContent="",d()}}}var M=new Map;function dw(e,t){M.set(e,t)}var at=/^#\/content\/([^/]+)$/;function ju(e){let t=e?.$ref,r=n(t)?at.exec(t):null;return r?r[1]:null}var ge={resolvePointer:()=>{}};function xe(e,t,r){if(Array.isArray(e))return e;let a;if(v(e)){let l=e.$ref;if(n(l))a=l}else if(n(e))a=e;if(a===void 0||!t)return;let o=t.resolvePointer(a,r);if(Array.isArray(o))return o.map(String);if(v(o))return Object.keys(o);return}function be(e,t){if(e.trim()==="")return Number.NaN;return t?Math.trunc(Number(e)):Number(e)}function $e(e){return e.format!=="json-schema"&&e.type!=="object"&&e.type!=="array"}function st(e){return[...(e.signals??[]).map((t)=>({label:t,value:`#/state/${t}`})),...(e.params??[]).map((t)=>({label:`$params/${t}`,value:`#/$params/${t}`}))]}var F="__none__";function ve(e){if(e===void 0||e===null)return"";return _(e)?JSON.stringify(e,null,2):String(e)}function pt(e,t,r){if(Me(t))return"";if(t===void 0||t===null||t==="")return r?"Required.":"";if(Array.isArray(e.enum)&&!e.enum.includes(t))return`Choose one of: ${e.enum.map(String).join(", ")}.`;if(e.type==="number"||e.type==="integer"){let o=Z(t)?t:Number(t);if(!Number.isFinite(o))return"Enter a number.";if(e.type==="integer"&&!Number.isInteger(o))return"Enter a whole number.";if(e.minimum!==void 0&&o<e.minimum)return`Must be ${e.minimum} or more.`;if(e.maximum!==void 0&&o>e.maximum)return`Must be ${e.maximum} or less.`;return""}if(e.type==="boolean"&&!Ze(t))return"Must be true or false.";if(e.type==="array"&&!Array.isArray(t))return"Must be a list.";if(e.type==="object"&&!v(t))return"Must be an object.";return""}var ct=500,lt=400,I=new Map;function Bl(e,t,r,a){dt(e);let o=I.get(e);if(!o)o=mt(),I.set(e,o);return o.update(t,r,a),o.host}function dt(e){for(let[t,r]of I)if(t!==e&&!r.host.isConnected)r.dispose(),I.delete(t)}function mt(){let e={},t={},r={onChange:()=>{}},a=ge,o=new Map,l=new Map,y=new Map,b=new Map,d=null,m=(i,s,c)=>{if(clearTimeout(l.get(i)),s<=0){c();return}l.set(i,setTimeout(c,s))},f=(i,s)=>{clearTimeout(l.get(i)),l.delete(i),s()},S=(i,s)=>{r.onChange({[i]:s})},w=(i,s)=>{if(i.commit==="none")return;switch(i.commit){case"ref":{let c=s.trim();S(i.prop,c?{$ref:c}:void 0);return}case"template":{S(i.prop,s);return}case"select":{S(i.prop,s===F?void 0:s);return}case"number":{let c=be(s,i.schema.type==="integer");S(i.prop,Number.isNaN(c)?void 0:c);return}case"json":{try{S(i.prop,JSON.parse(s))}catch{}return}default:{if(i.member!==void 0){let c=t[i.prop],u=v(c)?{...c}:{};if(s)u[i.member]=s;else delete u[i.member];S(i.prop,Object.keys(u).length>0?u:void 0);return}S(i.prop,s||void 0)}}},O=(i,s)=>{let c;if(s.length>0)c=i.scalarItems?s.map((u)=>u[le]??""):s;S(i.prop,c)},P=(i)=>{let s=[];for(let c of i.rows??[])s.push({...c});return s},W={addRow:(i)=>{let s=o.get(i);if(!s?.itemProps)return;let c={};for(let[u,x]of Object.entries(s.itemProps))if(x.default!==void 0)c[u]=x.default;O(s,[...P(s),c]),r.rerender?.()},commit:(i,s)=>{let c=o.get(i);if(c)f(i,()=>w(c,s))},commitChecked:(i,s)=>{let c=o.get(i);if(c)S(c.prop,s)},edit:(i,s)=>{let c=o.get(i);if(c&&c.debounceMs>0)m(i,c.debounceMs,()=>w(c,s))},editCell:(i,s,c,u)=>{p(i,s,c,u)},editCellChecked:(i,s,c,u)=>{p(i,s,c,u)},editJson:(i,s)=>{let c=o.get(i);if(c)m(i,ct,()=>w(c,s))},pickSource:(i,s)=>{U(i,s)},removeRow:(i,s)=>{let c=o.get(i);if(!c)return;let u=Number(s);O(c,P(c).filter((x,C)=>C!==u)),r.rerender?.()}};function p(i,s,c,u){let x=o.get(i);if(!x?.itemProps)return;let C=Number(s),D=P(x),E=D[C];if(!E)return;let A=x.itemProps[c];D[C]={...E,[c]:q(A,u,x.refCells?.has(`${i}/${s}/${c}`)??!1)},O(x,D)}function q(i,s,c){if(Ze(s))return s;let u=String(s);if(c){let x=u.trim();return x?{$ref:x}:void 0}if(i?.type==="integer"||i?.type==="number"){let x=be(u,i.type==="integer");return Number.isNaN(x)?void 0:x}if(u===F||u==="")return;return u}function U(i,s){let c=o.get(i);if(!c?.ladder)return;let{fieldKey:u,mode:x,offered:C,sources:D}=c.ladder;d?.close(),d=Bt({label:"Value source",onClosed:()=>{d=null},opener:s,region:"value-source",rows:C.map((E)=>({checked:E===x?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:E,title:Wo[E]})),run:(E)=>{let A=C.find((ke)=>ke===E);if(A===void 0||A===x)return;let z=c.schema.default;if(x==="ref"&&z!==void 0&&!mp(u,"literal"))fp(u,"literal",z);S(c.prop,Rd(u,x,A,Se(t[c.prop]),Fu(A,{extraSignals:D,literalDefault:z,stateDefs:[]})))}})}function N(i){let s=o.get(i);if(s?.control)return{args:{ctx:a,key:s.prop,onChange:(c)=>S(s.prop,c),rerender:r.rerender,schema:s.schema,value:t[s.prop]},control:s.control};for(let c of o.values()){let u=c.cellControls?.get(i);if(!u)continue;let x=(c.rows??[])[Number(u.row)]??{};return{args:{ctx:a,key:u.key,onChange:(C)=>p(c.prop,u.row,u.key,C),rerender:r.rerender,schema:u.schema,value:x[u.key]},control:u.control}}return}function T(i,s){let c=N(i);if(!c)return;let u=b.get(i);if(u?.host===s){u.handle.update(c.args);return}u?.handle.dispose(),b.set(i,{handle:c.control.mount(s,c.args),host:s})}function V(){for(let[i,s]of b)if(!N(i))s.handle.dispose(),b.delete(i)}function j(){V();for(let[i,s]of y)T(i,s)}let k=ye({fields:[]},W,(i,s)=>{y.set(i,s),T(i,s)});return{dispose(){for(let i of l.values())clearTimeout(i);l.clear(),d?.close(),d=null;for(let i of b.values())i.handle.dispose();b.clear(),y.clear(),o.clear(),k.dispose()},host:k.host,update(i,s,c){e=i,t=s,r=c,a=c.context??ge,o.clear(),k.update({fields:ft(e,t,r,a,o)}),j()}}}function ft(e,t,r,a,o){let l=new Set(e.required),y=st(a);return Object.entries(e.properties??{}).flatMap(([b,d])=>{let m={ctx:a,opts:r,plans:o,required:l.has(b),sources:y,value:t},f=je(b,d,m);return f.kind==="control"&&we(d)&&d.properties?.alt?[f,yt(b,m)]:[f]})}var ut=new Set(["src","alt","width","height","title"]);function we(e){let t=e.properties??{};return e.type==="object"&&t.src?.type==="string"&&Object.keys(t).every((r)=>ut.has(r))}function ht(e){let t=(r)=>{let a=v(r.value)?r.value:{},{src:o}=a;return{...r,onChange:(l)=>{if(l===o)return;let{height:y,width:b,...d}=a,m;if(l!==void 0&&l!=="")m={...d,src:l};r.onChange(m)},value:n(o)?o:void 0}};return{mount(r,a){let o=e.mount(r,t(a));return{dispose:()=>o.dispose(),update:(l)=>o.update(t(l))}}}}function yt(e,t){let r=`${e}/alt`,a=t.value[e],o=v(a)?a.alt:void 0,l=je(r,{type:"string"},{...t,required:!1}),y=t.plans.get(r);if(y)y.prop=e,y.member="alt";return{...l,label:`${t.opts.ui?.[e]?.label??e} alt text`,value:n(o)?o:""}}function je(e,t,r){let{ctx:a,opts:o,plans:l,required:y,sources:b,value:d}=r,m=d[e],f={commit:"text",debounceMs:lt,prop:e,schema:t};l.set(e,f);let S=o.errors?.[e]||pt(t,m,Boolean(o.showRequired)&&y),w=o.errorCounts?.[e],O=o.ui?.[e]?.control,P=O?M.get(O):void 0,W=b.length>0&&$e(t)&&!O,p={addLabel:`Add ${e}`,checked:!1,chips:[],description:t.description??"",error:S,errorCount:w!==void 0&&w>1?`×${w}`:"",hasChip:!1,hasChips:!1,hasCount:w!==void 0&&w>1,hasError:S!=="",hasOptions:!1,invalid:S!=="",key:e,kind:"text",label:o.ui?.[e]?.label??e,max:"",min:"",mono:!1,multiline:!1,inputType:"text",options:[],placeholder:"",prop:t.name||e,required:y,rows:[],source:"fixed",sourceHint:"",sourceLabel:"",sourceLocked:!1,sourceName:"",step:"",value:""};if(W){let j=`${a.fieldKeyPrefix??""}.${e}`,k=Pu(j,m),i=Id({schema:me(t)});if(f.ladder={fieldKey:j,mode:k,offered:i,sources:b},p.hasChip=!0,p.sourceLabel=Wo[k],p.sourceHint=q_[k],p.source=k==="literal"?"fixed":"bound",p.sourceLocked=!i.some((s)=>s!==k),p.sourceName=p.sourceLocked?`Value source: ${p.sourceLabel} (no other source available here)`:`Value source: ${p.sourceLabel} — click to change`,k==="ref")return f.commit="ref",f.debounceMs=0,p.kind="pointer",p.value=Me(m)?m.$ref:"",p.options=b.map((s)=>({label:s.label,value:s.value})),p.hasOptions=p.options.length>0,p;if(k==="template")return f.commit="template",f.debounceMs=0,p.kind="template",p.value=String(m??""),p}if(P)return f.commit="none",f.control=P,p.kind="control",p;if(Me(m)&&$e(t))return f.commit="ref",f.debounceMs=0,p.kind="text",p.mono=!0,p.value=m.$ref,p.placeholder=e,p;if(ju(t)!==null){let j=M.get("reference");if(j)return f.commit="none",f.control=j,p.kind="control",p}if(t.format==="image"){let j=M.get("media");if(j)return f.commit="none",f.control=j,p.kind="control",p}let q=we(t)?M.get("media"):void 0;if(q)return f.commit="none",f.control=ht(q),p.kind="control",p;let U=o.ui?.[e]?.enum??t.enum,N=xe(U,a,d);if(N)return f.commit="select",f.debounceMs=0,p.kind="select",p.value=m!==void 0?String(m):t.default!==void 0?String(t.default):F,p.options=[...y?[]:[{label:"—",value:F}],...N.map((j)=>({label:j,value:j}))],p;if(t.type==="boolean")return f.commit="none",p.kind="checkbox",p.checked=Boolean(m??t.default??!1),p;if(t.type==="integer"||t.type==="number")return f.commit="number",f.debounceMs=0,p.kind="number",p.value=m!==void 0?String(m):"",p.placeholder=t.default!=null?String(t.default):"",p.min=t.minimum!==void 0?String(t.minimum):"",p.max=t.maximum!==void 0?String(t.maximum):"",p.step=t.type==="integer"?"1":"",p;if(t.format==="json-schema")return f.commit="json",p.kind="json",p.value=m!==void 0?JSON.stringify(m,null,2):"",p.placeholder=t.description??"JSON Schema defining the data shape…",p.chips=bt(m),p.hasChips=p.chips.length>0,p;if(t.type==="array"&&t.items?.type==="object"&&t.items.properties)return $t(e,t.items.properties,r,f,p);if(t.type==="array"&&St(t.items))return xt(e,t.items,r,f,p);let T=Array.isArray(t.type)?t.type:[t.type];if(T.includes("array")||T.includes("object"))return f.commit="json",p.kind="json",p.value=m!==void 0?JSON.stringify(m,null,2):"",p.placeholder=t.default!==void 0?JSON.stringify(t.default):"",p;p.kind="text",p.value=ve(m),p.placeholder=t.default!==void 0?String(t.default):t.examples?.[0]??"",p.inputType=gt.get(t.format??"")??"text";let V=/^"?(\d{4}-\d{2}-\d{2})/.exec(p.value);if(p.inputType==="date"&&V)p.value=V[1]??p.value;return p}var gt=new Map([["date","date"],["email","email"],["uri","url"]]);function bt(e){if(!v(e))return[];let{properties:t}=e;if(e.$ref||t===null||!_(t))return[];return Object.entries(t).map(([r,a])=>({key:r,label:`${r}: ${String((v(a)?a.type:void 0)??"any")}`}))}function $t(e,t,r,a,o){let l=r.value[e],y=Array.isArray(l)?l:[];return a.commit="none",a.itemProps=t,a.rows=y,a.cellControls=new Map,a.refCells=new Set,o.kind="rows",o.rows=y.map((b,d)=>Oe(e,String(d),b,t,r,a)),o}var le="value";function St(e){if(e===void 0||e.format==="json-schema")return!1;if(ju(e)!==null||Array.isArray(e.enum))return!0;return e.type==="string"||e.type==="number"||e.type==="integer"||e.type==="boolean"}function xt(e,t,r,a,o){let l=r.value[e],y=[];if(Array.isArray(l))y=l;else if(l!==void 0&&l!==null&&l!=="")y=[l];let b=y.map((f)=>({[le]:f})),d={[le]:t},m=r.opts.ui?.[e]?.label??e;return a.commit="none",a.itemProps=d,a.rows=b,a.scalarItems=!0,a.cellControls=new Map,a.refCells=new Set,o.kind="rows",o.rows=b.map((f,S)=>{let w=Oe(e,String(S),f,d,r,a);for(let O of w.cells)O.label=`${m} ${S+1}`;return w}),o}function Oe(e,t,r,a,o,l){return{cells:Object.entries(a).map(([y,b])=>vt(e,t,y,b,r[y],o,l)),field:e,key:t,removeLabel:`Remove ${e} ${Number(t)+1}`}}function vt(e,t,r,a,o,l,y){let b=`${e}/${t}/${r}`,d={checked:!1,field:e,id:b,key:r,kind:"text",label:r,options:[],row:t,value:""};if(Me(o))return d.value=o.$ref,y.refCells?.add(b),d;if(ju(a)!==null){let S=M.get("reference");if(S)return d.kind="control",y.cellControls?.set(b,{control:S,key:r,row:t,schema:a}),d}let m=a.format==="image"?M.get("media"):void 0;if(m)return d.kind="control",y.cellControls?.set(b,{control:m,key:r,row:t,schema:a}),d;let f=xe(a.enum,l.ctx,l.value);if(f)return d.kind="select",d.value=o!==void 0?String(o):F,d.options=[{label:"—",value:F},...f.map((S)=>({label:S,value:S}))],d;if(a.type==="boolean")return d.kind="checkbox",d.checked=Boolean(o),d;if(a.type==="integer"||a.type==="number")return d.kind="number",d.value=o!==void 0?String(o):"",d;return d.value=ve(o),d}var wt=/^\{@(\w+)\}$/;function gp(e,t){if(!e.startsWith("#/$context/"))return;let r=[];for(let o of e.slice(11).split("/")){let l=o.match(wt);if(l){let y=t.scope?.[l[1]];if(!n(y)&&!Z(y))return;let b=String(y);if(!b)return;r.push(b)}else r.push(o)}if(r[0]==="$formats"){if(r.length!==1)return;return(t.formats??[]).map((o)=>o.name)}let a=t.projectConfig;for(let o of r){if(!_(a))return;a=a[o]}return a}
2
+ export{cw,Wo,q_,Mu,RD,NE,Id,fp,mp,Pu,Fu,Rd,dw,ju,Bl,gp};
3
3
 
4
- //# debugId=D2AA730C33BB28BA64756E2164756E21
5
- //# sourceMappingURL=studio-zacvfm31.js.map
4
+ //# debugId=FCDA6BE05D4F438664756E2164756E21
5
+ //# sourceMappingURL=studio-rzqaz21g.js.map
@@ -0,0 +1,5 @@
1
+ function _p(t){if(Number.isNaN(t.getTime()))return"";let r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${String(t.getFullYear()).padStart(4,"0")}-${r}-${n}`}
2
+ export{_p};
3
+
4
+ //# debugId=2A9EE7A4F081623164756E2164756E21
5
+ //# sourceMappingURL=studio-s5tzw84t.js.map
@@ -1,5 +1,5 @@
1
- import{p}from"./studio-w67vfgy5.js";import{S}from"./studio-rt498t2v.js";import{n,Z,_,v}from"./studio-zsjpsw08.js";function y(e,o=[]){if(!v(e))return o;let{children:t}=e;if(e.tagName==="slot"){let s=e.attributes,r=v(s)?s.name:void 0,l={name:n(r)?r.trim():""};if(Array.isArray(t)&&t.length>0)l.fallback=t;o.push(l)}if(Array.isArray(t))for(let s of t)y(s,o);return o}function YS(e,o=new Set){if(!v(e))return o;let t=(i)=>{if(v(i)){if(n(i.tagName)&&i.tagName.includes("-"))o.add(i.tagName);YS(i,o)}},{cases:s,children:r,map:l}=e,a=[...Array.isArray(r)?r:[r],l];if(v(s))a.push(...Object.values(s));for(let i of a)t(i);return o}function h(e){if(n(e))return"string";return Z(e)?"number":"boolean"}function x(e,o){if(o==null)return null;if(!_(o))return{default:o,name:e,type:h(o)};let t=v(o)?o:{};if(t.$prototype||t.$handler||t.$compute)return null;return{default:t.default,format:t.format,name:e,type:t.type}}function ZS(e,o){if(!v(e))return null;let{tagName:t}=e;if(!n(t)||!t.includes("-"))return null;let s=y(e),r=e.state,l=v(r)||Array.isArray(r)||n(r)?Object.entries(r):[],a={$id:n(e.$id)&&e.$id?e.$id:null,hasElements:Array.isArray(e.$elements)&&e.$elements.length>0,path:o,props:l.flatMap(([u,f])=>{let m=x(u,f);return m===null?[]:[m]})};if(s.length>0)a.slots=s;let i=[...YS(e)].filter((u)=>u!==t).toSorted();if(i.length>0)a.uses=i;return{...a,tagName:t}}var Ne=[],Zw=!1,g=0,b=Promise.resolve();function xa(){g+=1;let e=g,o=(async()=>{let t=null;try{t=await p().discoverComponents(S?.projectRoot||void 0)}catch{t=null}if(e!==g){await b;return}if(t)Ne=t;Zw=!0})();return b=o,o}function Mb(e,o){if(!e)return!1;let t=Ne.findIndex((l)=>l.path===e),s=ZS(o,e);if(!s){if(t===-1)return!1;return Ne.splice(t,1),!0}let r=s;if(t===-1)Ne.push(r);else Ne[t]=r;return!0}function jc(e){let o=Object.fromEntries((e.props??[]).map((r)=>[r.name,r.default!==void 0?r.default:""])),t=[];for(let r of e.slots??[])for(let l of structuredClone(r.fallback??[]))if(!r.name)t.push(l);else if(_(l)&&n(l.tagName))l.attributes={slot:r.name,...l.attributes},t.push(l);else t.push({attributes:{slot:r.name},children:[l],tagName:"span"});let s={$props:o,tagName:e.tagName};if(t.length>0)s.children=t;return s}function c(e){let o=[];for(let t of e){if(t===".")continue;if(t===".."&&o.length>0&&o.at(-1)!=="..")o.pop();else o.push(t)}return o}function Hc(e,o,t=S?.projectRoot??null){if(!e)return`./${o}`;let s=e.replaceAll("\\","/"),r=o.replaceAll("\\","/"),l=s.includes("/")?s.slice(0,s.lastIndexOf("/")):"",a=c(l.split("/").filter(Boolean)),i=c(r.split("/").filter(Boolean));if(a[0]===".."&&t){let d=t.replaceAll("\\","/").split("/").filter(Boolean);a=c([...d,...a]),i=c([...d,...i])}let u=0;while(u<a.length&&u<i.length&&a[u]===i[u])u+=1;let f=a.length-u,m=i.slice(u);return(f>0?"../".repeat(f):"./")+m.join("/")}
2
- export{YS,ZS,Ne,Zw,xa,Mb,jc,Hc};
1
+ import{p}from"./studio-jws1a87n.js";import{S}from"./studio-cg710sk9.js";import{n,Z,_,v}from"./studio-8z66jk4z.js";function y(e,o=[]){if(!v(e))return o;let{children:t}=e;if(e.tagName==="slot"){let s=e.attributes,r=v(s)?s.name:void 0,l={name:n(r)?r.trim():""};if(Array.isArray(t)&&t.length>0)l.fallback=t;o.push(l)}if(Array.isArray(t))for(let s of t)y(s,o);return o}function YS(e,o=new Set){if(!v(e))return o;let t=(i)=>{if(v(i)){if(n(i.tagName)&&i.tagName.includes("-"))o.add(i.tagName);YS(i,o)}},{cases:s,children:r,map:l}=e,a=[...Array.isArray(r)?r:[r],l];if(v(s))a.push(...Object.values(s));for(let i of a)t(i);return o}function h(e){if(n(e))return"string";return Z(e)?"number":"boolean"}function x(e,o){if(o==null)return null;if(!_(o))return{default:o,name:e,type:h(o)};let t=v(o)?o:{};if(t.$prototype||t.$handler||t.$compute)return null;return{default:t.default,format:t.format,name:e,type:t.type}}function ZS(e,o){if(!v(e))return null;let{tagName:t}=e;if(!n(t)||!t.includes("-"))return null;let s=y(e),r=e.state,l=v(r)||Array.isArray(r)||n(r)?Object.entries(r):[],a={$id:n(e.$id)&&e.$id?e.$id:null,hasElements:Array.isArray(e.$elements)&&e.$elements.length>0,path:o,props:l.flatMap(([u,f])=>{let m=x(u,f);return m===null?[]:[m]})};if(s.length>0)a.slots=s;let i=[...YS(e)].filter((u)=>u!==t).toSorted();if(i.length>0)a.uses=i;return{...a,tagName:t}}var Ne=[],Zw=!1,g=0,b=Promise.resolve();function xa(){g+=1;let e=g,o=(async()=>{let t=null;try{t=await p().discoverComponents(S?.projectRoot||void 0)}catch{t=null}if(e!==g){await b;return}if(t)Ne=t;Zw=!0})();return b=o,o}function Fb(e,o){if(!e)return!1;let t=Ne.findIndex((l)=>l.path===e),s=ZS(o,e);if(!s){if(t===-1)return!1;return Ne.splice(t,1),!0}let r=s;if(t===-1)Ne.push(r);else Ne[t]=r;return!0}function Hc(e){let o=Object.fromEntries((e.props??[]).map((r)=>[r.name,r.default!==void 0?r.default:""])),t=[];for(let r of e.slots??[])for(let l of structuredClone(r.fallback??[]))if(!r.name)t.push(l);else if(_(l)&&n(l.tagName))l.attributes={slot:r.name,...l.attributes},t.push(l);else t.push({attributes:{slot:r.name},children:[l],tagName:"span"});let s={$props:o,tagName:e.tagName};if(t.length>0)s.children=t;return s}function c(e){let o=[];for(let t of e){if(t===".")continue;if(t===".."&&o.length>0&&o.at(-1)!=="..")o.pop();else o.push(t)}return o}function Bc(e,o,t=S?.projectRoot??null){if(!e)return`./${o}`;let s=e.replaceAll("\\","/"),r=o.replaceAll("\\","/"),l=s.includes("/")?s.slice(0,s.lastIndexOf("/")):"",a=c(l.split("/").filter(Boolean)),i=c(r.split("/").filter(Boolean));if(a[0]===".."&&t){let d=t.replaceAll("\\","/").split("/").filter(Boolean);a=c([...d,...a]),i=c([...d,...i])}let u=0;while(u<a.length&&u<i.length&&a[u]===i[u])u+=1;let f=a.length-u,m=i.slice(u);return(f>0?"../".repeat(f):"./")+m.join("/")}
2
+ export{YS,ZS,Ne,Zw,xa,Fb,Hc,Bc};
3
3
 
4
- //# debugId=9FAF3C0208E7D37164756E2164756E21
5
- //# sourceMappingURL=studio-nf0pqpbj.js.map
4
+ //# debugId=049116082B36BF1564756E2164756E21
5
+ //# sourceMappingURL=studio-sevbc3xv.js.map
@@ -1,8 +1,8 @@
1
- import{ip,pe}from"./studio-0g2sm01j.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=ip(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 ol(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=ip(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){ol(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=ip(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=ip(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 zr(){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){ol(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.
1
+ import{op,pe}from"./studio-j3d2fjqz.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=op(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 al(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=op(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){al(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=op(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=op(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 zr(){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){al(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
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=zr(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){ol(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 zr(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:Gs,monitor:Ks}=de;function Wr(e){if(!1)var r;var t=zr(de.registerUsage(),jt(e),ee(e.element,{attribute:"draggable",value:"true"}));return A(t)}export{ol,zr,Gs,Ks,Wr};
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){al(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 zr(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:Gs,monitor:Ks}=de;function Wr(e){if(!1)var r;var t=zr(de.registerUsage(),jt(e),ee(e.element,{attribute:"draggable",value:"true"}));return A(t)}export{al,zr,Gs,Ks,Wr};
6
6
 
7
- //# debugId=8970FD6068B07C0064756E2164756E21
8
- //# sourceMappingURL=studio-va0e63sk.js.map
7
+ //# debugId=000D5FF775C29D5264756E2164756E21
8
+ //# sourceMappingURL=studio-sxdb9h3q.js.map