@trintel/zooy 1.0.12 → 1.0.16

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 (152) hide show
  1. package/dist/chunks/{button-CRxkguK3.js → button-D3QMXGP6.js} +1 -1
  2. package/dist/chunks/{button-By7aRhFi.js → button-cEVHuDC9.js} +4 -4
  3. package/dist/chunks/{button-skeleton-CZmGLr_c.js → button-skeleton-BuDQrAgi.js} +1 -1
  4. package/dist/chunks/{button-skeleton-DlCzuT6h.js → button-skeleton-CxKOKEQr.js} +4 -4
  5. package/dist/chunks/{checkbox-GUazWfM6.js → checkbox-B_b_oOJ5.js} +1 -1
  6. package/dist/chunks/{checkbox-BMZ3_jkv.js → checkbox-CsuLOYIT.js} +5 -5
  7. package/dist/chunks/{class-map-Bpavh3zd.js → class-map-BwrbvkxB.js} +1 -1
  8. package/dist/chunks/{class-map-CewEiUeS.js → class-map-CgGieoOz.js} +1 -1
  9. package/dist/chunks/{content-switcher-item-BzWtaEk8.js → content-switcher-item-C1gdd6k4.js} +4 -4
  10. package/dist/chunks/{content-switcher-item-DBiwY_5f.js → content-switcher-item-c0sXBGJ-.js} +1 -1
  11. package/dist/chunks/{dropdown-item-B8fOInIi.js → dropdown-item-T1jCm1fo.js} +1 -1
  12. package/dist/chunks/{dropdown-item-C1hnXvNw.js → dropdown-item-Wc8Nj3w-.js} +6 -6
  13. package/dist/chunks/{icon-loader-BX6j0QV9.js → icon-loader-CTCoE5GC.js} +1 -1
  14. package/dist/chunks/{icon-loader-Cv5XYGqj.js → icon-loader-C_ze306U.js} +1 -1
  15. package/dist/chunks/{icon-loader-utils-C_72Dnig.js → icon-loader-utils-DSajrZop.js} +1 -1
  16. package/dist/chunks/{icon-loader-utils-CjBhA13V.js → icon-loader-utils-DxaQOvJB.js} +1 -1
  17. package/dist/chunks/{if-defined-B-VZmIag.js → if-defined-7syLabv-.js} +1 -1
  18. package/dist/chunks/{if-defined-Zq_Rpirs.js → if-defined-CfI-rREy.js} +1 -1
  19. package/dist/chunks/{if-non-empty-CaK_h1Vn.js → if-non-empty-CsjL_4Ck.js} +1 -1
  20. package/dist/chunks/if-non-empty-Dp8CFMva.js +1 -0
  21. package/dist/chunks/{index-DRYB8Q2c.js → index-24ucriY6.js} +1 -1
  22. package/dist/chunks/{index-BX1au7I9.js → index-5uuGFlSc.js} +1 -1
  23. package/dist/chunks/{index-DQhfyFM4.js → index-ACUVets3.js} +4 -4
  24. package/dist/chunks/{index-DD3tbFs9.js → index-B-VOos8Q.js} +4 -4
  25. package/dist/chunks/{index-BERUsrwS.js → index-B-qA_3dy.js} +1 -1
  26. package/dist/chunks/{index-CVH7Hv6v.js → index-B0PkuE0I.js} +5 -5
  27. package/dist/chunks/{index-BJ0SBIwX.js → index-B1QlHHpn.js} +6 -6
  28. package/dist/chunks/{index-CYLJDFiF.js → index-B2dVOGmx.js} +5 -5
  29. package/dist/chunks/{index-CwXwz8dA.js → index-BEAD73rD.js} +1 -1
  30. package/dist/chunks/{index-DhwMNjJj.js → index-BEyeMcZh.js} +4 -4
  31. package/dist/chunks/{index-BeQ7ZTCw.js → index-BJ3okuBC.js} +5 -5
  32. package/dist/chunks/{index-C6nmbFvI.js → index-BJNdKx6x.js} +1 -1
  33. package/dist/chunks/{index-DrRc4GOh.js → index-BL8xz2V4.js} +5 -5
  34. package/dist/chunks/{index-UDUbB14y.js → index-BL_Y57_H.js} +1 -1
  35. package/dist/chunks/{index-D-20UbuG.js → index-BLxE94Et.js} +1 -1
  36. package/dist/chunks/{index-DU7E0qo4.js → index-BP0bDhTG.js} +7 -7
  37. package/dist/chunks/{index-B4L1iU-L.js → index-BUXzbqzT.js} +7 -7
  38. package/dist/chunks/{index-jRYYdv4C.js → index-BVDZj6Fh.js} +5 -5
  39. package/dist/chunks/{index-Smwc4F8-.js → index-BWqDKfds.js} +1 -1
  40. package/dist/chunks/{index-yIVEgAA_.js → index-BaVSzIan.js} +1 -1
  41. package/dist/chunks/{index-f2QnoTe2.js → index-BatQ1Mfz.js} +3 -3
  42. package/dist/chunks/{index-DYtqDqPL.js → index-BefBe_sK.js} +1 -1
  43. package/dist/chunks/{index-D2B2bs5k.js → index-BekoThXC.js} +2 -2
  44. package/dist/chunks/{index-Cit60IYk.js → index-BnOH6_4r.js} +1 -1
  45. package/dist/chunks/{index-DW9xYANG.js → index-Bnfa6YBY.js} +3 -3
  46. package/dist/chunks/{index-B7CvW1Hr.js → index-BrtdLKIG.js} +9 -9
  47. package/dist/chunks/{index-B-OulI8n.js → index-BtFYirUg.js} +1 -1
  48. package/dist/chunks/{index-C6YhnCuw.js → index-BtHVJn7K.js} +1 -1
  49. package/dist/chunks/{index-ePccMpcM.js → index-Bu7ZAHDG.js} +1 -1
  50. package/dist/chunks/{index-m978pani.js → index-BxRbUwdY.js} +3 -3
  51. package/dist/chunks/{index-BmMr-B9I.js → index-ByQl0Dwz.js} +1 -1
  52. package/dist/chunks/{index-BXPG0d_k.js → index-C-PAoN2Y.js} +2 -2
  53. package/dist/chunks/{index-BIWPmvxN.js → index-C2-pFkgT.js} +6 -6
  54. package/dist/chunks/{index-1eFOI8oe.js → index-C2r3MkpB.js} +5 -5
  55. package/dist/chunks/{index-CvnLooVH.js → index-C5DwYOee.js} +1 -1
  56. package/dist/chunks/{index-1OOPg4-d.js → index-C5euLddc.js} +1 -1
  57. package/dist/chunks/{index-D1xYcspc.js → index-C89rc2i5.js} +1 -1
  58. package/dist/chunks/{index-XY3TWQ_7.js → index-C8IUL9KS.js} +1 -1
  59. package/dist/chunks/{index-C9adbF3V.js → index-C99Nf_aK.js} +1 -1
  60. package/dist/chunks/{index-DLt6oTR3.js → index-CDaECc1q.js} +1 -1
  61. package/dist/chunks/{index-UfSJPzl_.js → index-CIeU44CB.js} +5 -5
  62. package/dist/chunks/{index-BwpbR54Z.js → index-CL8Un64Y.js} +4 -4
  63. package/dist/chunks/{index-BftJaPKS.js → index-CQ1zfW-Z.js} +1 -1
  64. package/dist/chunks/{index-CW3NpEbP.js → index-CR6HxSEn.js} +1 -1
  65. package/dist/chunks/{index-CZi-f4G4.js → index-CSH8oUIN.js} +1 -1
  66. package/dist/chunks/{index-CCOIDxIB.js → index-CTB8Esah.js} +1 -1
  67. package/dist/chunks/{index-DFzKxIGc.js → index-CX6f-3xD.js} +7 -7
  68. package/dist/chunks/{index-B_Lmpm35.js → index-CXSCYGFC.js} +8 -8
  69. package/dist/chunks/{index-C0JKLTdV.js → index-CZQ45Dj9.js} +1 -1
  70. package/dist/chunks/{index-Dcs-4ouA.js → index-Cc-HBEN2.js} +4 -4
  71. package/dist/chunks/{index-Cdk8HqBZ.js → index-Cf3ALdZ-.js} +1 -1
  72. package/dist/chunks/{index-DKJCj-0F.js → index-Cid77wr3.js} +1 -1
  73. package/dist/chunks/{index-DRsjyMRL.js → index-ClBPGpC0.js} +4 -4
  74. package/dist/chunks/{index-CQY3cMqQ.js → index-CmXHpydu.js} +1 -1
  75. package/dist/chunks/{index-CVqAaFaO.js → index-CsaKV6jI.js} +5 -5
  76. package/dist/chunks/{index-CbKeQETj.js → index-CvxrJ8vE.js} +3 -3
  77. package/dist/chunks/{index-Bx5tyF27.js → index-Cy6EogCp.js} +3 -3
  78. package/dist/chunks/{index-BoIS4S70.js → index-CyTN35KA.js} +3 -3
  79. package/dist/chunks/{index-ChbKcl-Z.js → index-D3hwHwSn.js} +5 -5
  80. package/dist/chunks/{index-DW24dyDr.js → index-D6Eg6Zh4.js} +1 -1
  81. package/dist/chunks/{index-BsVpu7Ej.js → index-D7GY2E-B.js} +1 -1
  82. package/dist/chunks/{index-C2Q5YPz1.js → index-DCqxl0e0.js} +1 -1
  83. package/dist/chunks/{index-Cy5Gs96d.js → index-DDKqKtU4.js} +1 -1
  84. package/dist/chunks/{index-D2Z_PWuf.js → index-DHksIe-y.js} +1 -1
  85. package/dist/chunks/{index-CyHAdAxX.js → index-DI-PunST.js} +7 -7
  86. package/dist/chunks/{index-DScZj-56.js → index-DIWoAC3Z.js} +1 -1
  87. package/dist/chunks/{index-CuuD-d5b.js → index-DLWyvZrE.js} +2 -2
  88. package/dist/chunks/{index-DxlTsgQ8.js → index-DLa-KLg_.js} +5 -5
  89. package/dist/chunks/{index-pT9YwIX-.js → index-DLwGUJd2.js} +1 -1
  90. package/dist/chunks/index-DMIKb9St.js +2 -0
  91. package/dist/chunks/{index-BfiLUJJ3.js → index-DOfvb1f6.js} +1 -1
  92. package/dist/chunks/{index-Bb8PCTuf.js → index-DQoGlgyI.js} +1 -1
  93. package/dist/chunks/{index-BlfAhx-m.js → index-DR8UmItB.js} +1 -1
  94. package/dist/chunks/{index-o7Ly8WNV.js → index-DUiT0Yz_.js} +1 -1
  95. package/dist/chunks/{index-ScGZvs71.js → index-DW1p-hc-.js} +10 -10
  96. package/dist/chunks/{index-TelAKDy3.js → index-DbPU3mfX.js} +5 -5
  97. package/dist/chunks/{index-LSL0pD4U.js → index-DgI4_4yz.js} +1 -1
  98. package/dist/chunks/index-DhPg7DCD.js +1 -0
  99. package/dist/chunks/{index-CDpK5GU3.js → index-Dj-7w7wt.js} +1 -1
  100. package/dist/chunks/{index-DbT4fJLV.js → index-DjSdHUmw.js} +7 -7
  101. package/dist/chunks/{index-DvbDUmZp.js → index-DpCo2duE.js} +7 -7
  102. package/dist/chunks/{index-DayFRhmw.js → index-DqLDehu6.js} +8 -8
  103. package/dist/chunks/{index-DEH3Oujh.js → index-Ds3e0NlH.js} +5 -5
  104. package/dist/chunks/{index-CRvczclO.js → index-DsKNYemW.js} +6 -6
  105. package/dist/chunks/{index-Do0fzNBP.js → index-DwGKd66A.js} +4 -4
  106. package/dist/chunks/{index-ByxUjlpc.js → index-FAwjNd-C.js} +1 -1
  107. package/dist/chunks/{index-DqWolj0i.js → index-HTZtnvAV.js} +1 -1
  108. package/dist/chunks/{index-s53NHb2d.js → index-JUJu4Jsu.js} +8 -8
  109. package/dist/chunks/{index-BpfNVIsW.js → index-JmiGhJR9.js} +1 -1
  110. package/dist/chunks/{index-DVTOmcgu.js → index-K3aE8_a_.js} +2 -2
  111. package/dist/chunks/{index-DdzuoIsX.js → index-LVNWqV95.js} +6 -6
  112. package/dist/chunks/{index-ZmTVduMY.js → index-NduNWecG.js} +4 -4
  113. package/dist/chunks/{index-Bz-sh-N4.js → index-QOHPo0v8.js} +1 -1
  114. package/dist/chunks/{index-D5_-tX11.js → index-TnoTOPwm.js} +1 -1
  115. package/dist/chunks/{index-DKOcsQER.js → index-UIEjSWhu.js} +1 -1
  116. package/dist/chunks/{index-B4O0_8IT.js → index-WQ40q6Fp.js} +1 -1
  117. package/dist/chunks/{index-DYmmXHAT.js → index-a_56_OA-.js} +5 -5
  118. package/dist/chunks/{index-CyeWQ9VJ.js → index-azaqRvif.js} +1 -1
  119. package/dist/chunks/{index-BugJTHwJ.js → index-dT_yGOFJ.js} +1 -1
  120. package/dist/chunks/{index-CuZwN_ME.js → index-kjtnf5Y1.js} +3 -3
  121. package/dist/chunks/{index-Bv0Kq6vx.js → index-lOiJBnZe.js} +1 -1
  122. package/dist/chunks/{index-BATw38c7.js → index-sl9jQQX-.js} +3 -3
  123. package/dist/chunks/{index-C7bz1V4O.js → index-vkfOeAd5.js} +3 -3
  124. package/dist/chunks/{index-Cm3Uqia6.js → index-z2pAR1iR.js} +6 -6
  125. package/dist/chunks/{loading-icon-Dx2ktHir.js → loading-icon-9-L_8sVv.js} +1 -1
  126. package/dist/chunks/{loading-icon-Co-jn71c.js → loading-icon-CMPQny72.js} +1 -1
  127. package/dist/chunks/{main-BqOledN0.js → main-CXPn-jnk.js} +196 -147
  128. package/dist/chunks/{main-DHy75dVb.js → main-CZIPBRMI.js} +5 -4
  129. package/dist/chunks/{property-B0b41oBL.js → property-BIgIlh0E.js} +1 -1
  130. package/dist/chunks/{property-Dg6D0XVD.js → property-CTp3Zz2M.js} +1 -1
  131. package/dist/chunks/{register-bMHOSpvM.js → register-BgvWUC9m.js} +1 -1
  132. package/dist/chunks/{register-BH6NpHIA.js → register-CFDNay1l.js} +1 -1
  133. package/dist/chunks/{register-h6ZQPYju.js → register-DyYwnhHb.js} +1 -1
  134. package/dist/chunks/{register-DgYdd65A.js → register-HH_4Uw0Q.js} +2 -2
  135. package/dist/chunks/{search-CdbmNKGt.js → search-CC47funo.js} +6 -6
  136. package/dist/chunks/{search-hgh8azYe.js → search-DB4cjN-w.js} +1 -1
  137. package/dist/chunks/{select-item-bxxL-G6O.js → select-item-D6rKfA9z.js} +1 -1
  138. package/dist/chunks/{select-item-B7Nispm3.js → select-item-Dj2fYOn6.js} +7 -7
  139. package/dist/chunks/{state-8K5PPQVS.js → state-4XYw1ZN5.js} +1 -1
  140. package/dist/chunks/{state-C1eYNc3M.js → state-BoZ0xvIn.js} +1 -1
  141. package/dist/chunks/{text-input-BFGnBN6w.js → text-input-BUBwT5gK.js} +1 -1
  142. package/dist/chunks/{text-input-Cax4HzgZ.js → text-input-Dpl3TIYz.js} +5 -5
  143. package/dist/chunks/{tooltip-content-CF2lm8EZ.js → tooltip-content-BV1N7BVi.js} +1 -1
  144. package/dist/chunks/{tooltip-content-l8Mg7xk8.js → tooltip-content-UQcG3dlT.js} +3 -3
  145. package/dist/chunks/{unsafe-html-Dw4MFH2g.js → unsafe-html-CCJqBESk.js} +1 -1
  146. package/dist/chunks/{unsafe-html-Hoj8nqTC.js → unsafe-html-KUWR4Xn7.js} +1 -1
  147. package/dist/zooy.cjs.js +1 -1
  148. package/dist/zooy.es.js +1 -1
  149. package/package.json +3 -3
  150. package/dist/chunks/if-non-empty-Dy-cc4QJ.js +0 -1
  151. package/dist/chunks/index-CNQHUhaQ.js +0 -1
  152. package/dist/chunks/index-DjLSW4tB.js +0 -2
@@ -1229,16 +1229,16 @@ class UserManager {
1229
1229
  * @param {AbortSignal|undefined} signal
1230
1230
  * @return {Promise}
1231
1231
  */
1232
- async fetchJson(w, D = void 0) {
1233
- const O = new Request(w.toString()), F = genCatchClause(`fetchJson: ${w}`, {}), q = basicGetInit(this.jwt, D);
1232
+ async fetchJson(w, D = void 0, O = void 0) {
1233
+ const F = new Request(w.toString()), q = genCatchClause(`fetchJson: ${w}`, O), W = basicGetInit(this.jwt, D);
1234
1234
  await startSpin();
1235
- let W = {};
1235
+ let Y = {};
1236
1236
  try {
1237
- W = await (await fetch(O, q)).json();
1238
- } catch (Y) {
1239
- return F(Y);
1237
+ Y = await (await fetch(F, W)).json();
1238
+ } catch (G) {
1239
+ return q(G);
1240
1240
  }
1241
- return await stopSpin(), W;
1241
+ return await stopSpin(), Y;
1242
1242
  }
1243
1243
  /**
1244
1244
  * @param {string} uri
@@ -2377,6 +2377,7 @@ const convertElToSplit = (U, w) => (U.classList.add("zoo_split", `zoo_split__${w
2377
2377
  class View extends Evt {
2378
2378
  #t = void 0;
2379
2379
  #e = void 0;
2380
+ #s = {};
2380
2381
  //--[ Static ]--
2381
2382
  /**
2382
2383
  * Returns the view event type code used for dispatching view events.
@@ -2404,6 +2405,12 @@ class View extends Evt {
2404
2405
  get registerViewConstructor() {
2405
2406
  return this.#t;
2406
2407
  }
2408
+ set utils(w) {
2409
+ this.#s = w;
2410
+ }
2411
+ get utils() {
2412
+ return this.#s;
2413
+ }
2407
2414
  set split(w) {
2408
2415
  this.split_ = w, this.listen(this.split_, UiEventType.SPLIT, (D) => {
2409
2416
  const O = D.detail.getValue(), F = D.detail.getData();
@@ -2566,8 +2573,13 @@ class View extends Evt {
2566
2573
  */
2567
2574
  onPanelEvent(w) {
2568
2575
  let D = w.detail.getValue();
2576
+ if (this.debugMe(`PanelEvent Value: ${D}`), !isDefAndNotNull(D)) {
2577
+ this.debugMe(`The panel received an event without a value.
2578
+ There is nothing we can do with that.`);
2579
+ return;
2580
+ }
2569
2581
  const O = w.detail.getData();
2570
- D.startsWith("switch_view:") && (O.view = D.split(":")[1], D = "switch_view");
2582
+ D?.startsWith("switch_view:") && (O.view = D.split(":")[1], D = "switch_view");
2571
2583
  const F = (
2572
2584
  /** @type {Panel} */
2573
2585
  w.target
@@ -2665,142 +2677,6 @@ class View extends Evt {
2665
2677
  return this.metaData_.has(w);
2666
2678
  }
2667
2679
  }
2668
- class Conductor extends Evt {
2669
- #t = /* @__PURE__ */ new Map();
2670
- #e = null;
2671
- /**
2672
- * @type {!UserManager|undefined}
2673
- * @private
2674
- */
2675
- #s = void 0;
2676
- #r = void 0;
2677
- #n = /* @__PURE__ */ new Map();
2678
- /**
2679
- * Creates a new Conductor instance. Sets up browser history listening
2680
- * and initializes view event handling.
2681
- */
2682
- constructor() {
2683
- super(), this.#n = this.#i(), window.addEventListener("popstate", (w) => {
2684
- w.state !== null && this.navTo(w.state);
2685
- }), this.doOnBeat(() => {
2686
- document.dispatchEvent(new CustomEvent("zoo-tick-60", {
2687
- detail: { timestamp: Date.now() }
2688
- }));
2689
- }, 6e4);
2690
- }
2691
- set split(w) {
2692
- this.#r = w;
2693
- }
2694
- get split() {
2695
- if (!this.#r)
2696
- throw new Error("No SPLIT component available");
2697
- return this.#r;
2698
- }
2699
- /**
2700
- * @param {!UserManager} user
2701
- */
2702
- set user(w) {
2703
- this.#s = w, this.#e && (this.#e.user = this.user);
2704
- }
2705
- /**
2706
- * @return {!UserManager}
2707
- */
2708
- get user() {
2709
- return this.#s || (this.#s = new UserManager()), this.#s;
2710
- }
2711
- /**
2712
- * Initializes the internal view event map with default event handlers.
2713
- * Sets up handlers for common view events like 'switch_view'.
2714
- * @return {!Map<string, !Function>} Map of event names to handler functions
2715
- * @private
2716
- */
2717
- #i() {
2718
- return (/* @__PURE__ */ new Map()).set("switch_view", (w, D) => {
2719
- if (this.#t.has(w.view)) {
2720
- const O = this.#t.get(w.view)(
2721
- w.pk || w.recordId,
2722
- w
2723
- );
2724
- this.switchView(O);
2725
- }
2726
- });
2727
- }
2728
- /**
2729
- * Maps a view event name to a handler function. Allows dynamic registration
2730
- * of custom view event handlers at runtime.
2731
- * @param {string} s The event name to map
2732
- * @param {!Function} func The handler function that receives (eventData, eView)
2733
- */
2734
- mapViewEv(w, D) {
2735
- this.#n.set(w, D);
2736
- }
2737
- /**
2738
- * Registers a view constructor function that can be used to create instances
2739
- * of a specific view type.
2740
- * @param {string} s The view type identifier
2741
- * @param {!Function} f Constructor function that receives (pk, data) and returns a View
2742
- */
2743
- registerViewConstructor(w, D) {
2744
- this.#t.set(w, D);
2745
- }
2746
- /**
2747
- * @param {!CustomEvent} e Event object.
2748
- */
2749
- onViewEvent(w) {
2750
- const D = w.detail.getValue(), O = w.detail.getData(), F = (
2751
- /** @type {Panel} */
2752
- w.target
2753
- );
2754
- this.#n.has(D) ? this.#n.get(D)(O, F) : console.warn("Unhandled VIEW Event:", w, D, O, F);
2755
- }
2756
- /**
2757
- * Make the given view active.
2758
- * @param {!View} view
2759
- */
2760
- setActiveView(w) {
2761
- this.#e && (this.stopListeningTo(this.#e), this.#e.dispose(), this.#e = null), this.#e = w, this.#e.render();
2762
- }
2763
- /**
2764
- * @param {!View} view
2765
- * @returns {!View}
2766
- */
2767
- initView(w) {
2768
- return w.user = this.user, w.split = this.split, w.recordHistory = this.recordHistory.bind(this), w.registerViewConstructor = this.registerViewConstructor.bind(this), this.listen(w, View.viewEventCode(), this.onViewEvent.bind(this)), w;
2769
- }
2770
- //--[ Views Utilities ]--
2771
- /**
2772
- * @param {!View} view The view we want active.
2773
- */
2774
- switchView(w) {
2775
- this.setActiveView(this.initView(w));
2776
- }
2777
- //--[ History and Navigation ]--
2778
- /**
2779
- * Records the given item in browser history. If item.init is true, replaces
2780
- * the current history state. Otherwise, pushes a new history state unless
2781
- * item.history is true.
2782
- * @param {!Object} item The history item containing view state
2783
- */
2784
- recordHistory(w) {
2785
- this.debugMe("HISTORY", w), w.init ? history.replaceState(w, "", document.location.href) : w.history || history.pushState(w, "", null);
2786
- }
2787
- /**
2788
- * Navigates to a specific view based on the history item. Attempts to use
2789
- * the active view's switchViewMap first, falling back to registered view
2790
- * constructors if needed.
2791
- * @param {!Object} item History item containing {view, pk, ...} properties
2792
- */
2793
- navTo = (w) => {
2794
- w.history = !0;
2795
- const D = w.view, O = this.#e;
2796
- if (O.switchViewMap_.has(D))
2797
- this.debugMe("NAV:VIEW:MAP", w), O.switchViewMap_.get(D)(w);
2798
- else if (this.#t.has(D)) {
2799
- const F = this.#t.get(D)(w.pk, w);
2800
- this.debugMe("NAV:NEW:VIEW", w), this.switchView(F);
2801
- }
2802
- };
2803
- }
2804
2680
  function _isPlaceholder(U) {
2805
2681
  return U != null && typeof U == "object" && U["@@functional/placeholder"] === !0;
2806
2682
  }
@@ -3134,6 +3010,19 @@ var liftN = /* @__PURE__ */ _curry2(function U(w, D) {
3134
3010
  }), has = /* @__PURE__ */ _curry2(function U(w, D) {
3135
3011
  return hasPath([w], D);
3136
3012
  });
3013
+ function _objectAssign(U) {
3014
+ if (U == null)
3015
+ throw new TypeError("Cannot convert undefined or null to object");
3016
+ for (var w = Object(U), D = 1, O = arguments.length; D < O; ) {
3017
+ var F = arguments[D];
3018
+ if (F != null)
3019
+ for (var q in F)
3020
+ _has(q, F) && (w[q] = F[q]);
3021
+ D += 1;
3022
+ }
3023
+ return w;
3024
+ }
3025
+ const _objectAssign$1 = typeof Object.assign == "function" ? Object.assign : _objectAssign;
3137
3026
  function _path(U, w) {
3138
3027
  for (var D = w, O = 0; O < U.length; O += 1) {
3139
3028
  if (D == null)
@@ -3143,7 +3032,167 @@ function _path(U, w) {
3143
3032
  }
3144
3033
  return D;
3145
3034
  }
3146
- var path = /* @__PURE__ */ _curry2(_path);
3035
+ var mergeRight = /* @__PURE__ */ _curry2(function U(w, D) {
3036
+ return _objectAssign$1({}, w, D);
3037
+ }), path = /* @__PURE__ */ _curry2(_path);
3038
+ class Conductor extends Evt {
3039
+ #t = /* @__PURE__ */ new Map();
3040
+ #e = null;
3041
+ /**
3042
+ * @type {!UserManager|undefined}
3043
+ * @private
3044
+ */
3045
+ #s = void 0;
3046
+ #r = void 0;
3047
+ #n = /* @__PURE__ */ new Map();
3048
+ /**
3049
+ * This is a userspace map where consuming applications can register shared functions
3050
+ * that are available to all views and panels.
3051
+ * @type {{}}
3052
+ */
3053
+ #i = {};
3054
+ /**
3055
+ * Creates a new Conductor instance. Sets up browser history listening
3056
+ * and initializes view event handling.
3057
+ */
3058
+ constructor() {
3059
+ super(), this.#n = this.#o(), window.addEventListener("popstate", (w) => {
3060
+ w.state !== null && this.navTo(w.state);
3061
+ }), this.doOnBeat(() => {
3062
+ document.dispatchEvent(new CustomEvent("zoo-tick-60", {
3063
+ detail: { timestamp: Date.now() }
3064
+ }));
3065
+ }, 6e4);
3066
+ }
3067
+ set split(w) {
3068
+ this.#r = w;
3069
+ }
3070
+ get split() {
3071
+ if (!this.#r)
3072
+ throw new Error("No SPLIT component available");
3073
+ return this.#r;
3074
+ }
3075
+ /**
3076
+ * @param {!UserManager} user
3077
+ */
3078
+ set user(w) {
3079
+ this.#s = w, this.#e && (this.#e.user = this.user);
3080
+ }
3081
+ /**
3082
+ * @return {!UserManager}
3083
+ */
3084
+ get user() {
3085
+ return this.#s || (this.#s = new UserManager()), this.#s;
3086
+ }
3087
+ get utils() {
3088
+ return this.#i;
3089
+ }
3090
+ /**
3091
+ * Register utility functions that will be made available to all views.
3092
+ * @Example:
3093
+ * const myUtil = () => {console.log("hello")};
3094
+ * c.registerUtil({myUtil});
3095
+ *
3096
+ * // Elsewhere in the panel or view code:
3097
+ * view.utils.myUtil(); // Prints "hello"
3098
+ * @param obj
3099
+ */
3100
+ registerUtil(w) {
3101
+ this.#i = mergeRight(this.#i, w);
3102
+ }
3103
+ /**
3104
+ * Initializes the internal view event map with default event handlers.
3105
+ * Sets up handlers for common view events like 'switch_view'.
3106
+ * @return {!Map<string, !Function>} Map of event names to handler functions
3107
+ * @private
3108
+ */
3109
+ #o() {
3110
+ return (/* @__PURE__ */ new Map()).set("switch_view", (w, D) => {
3111
+ if (this.#t.has(w.view)) {
3112
+ const O = this.#t.get(w.view)(
3113
+ w.pk || w.recordId,
3114
+ w
3115
+ );
3116
+ this.switchView(O);
3117
+ }
3118
+ });
3119
+ }
3120
+ /**
3121
+ * Maps a view event name to a handler function. Allows dynamic registration
3122
+ * of custom view event handlers at runtime.
3123
+ * @param {string} s The event name to map
3124
+ * @param {!Function} func The handler function that receives (eventData, eView)
3125
+ */
3126
+ mapViewEv(w, D) {
3127
+ this.#n.set(w, D);
3128
+ }
3129
+ /**
3130
+ * Registers a view constructor function that can be used to create instances
3131
+ * of a specific view type.
3132
+ * @param {string} s The view type identifier
3133
+ * @param {!Function} f Constructor function that receives (pk, data) and returns a View
3134
+ */
3135
+ registerViewConstructor(w, D) {
3136
+ this.#t.set(w, D);
3137
+ }
3138
+ /**
3139
+ * @param {!CustomEvent} e Event object.
3140
+ */
3141
+ onViewEvent(w) {
3142
+ const D = w.detail.getValue(), O = w.detail.getData(), F = (
3143
+ /** @type {Panel} */
3144
+ w.target
3145
+ );
3146
+ this.#n.has(D) ? this.#n.get(D)(O, F) : console.warn("Unhandled VIEW Event:", w, D, O, F);
3147
+ }
3148
+ /**
3149
+ * Make the given view active.
3150
+ * @param {!View} view
3151
+ */
3152
+ setActiveView(w) {
3153
+ this.#e && (this.stopListeningTo(this.#e), this.#e.dispose(), this.#e = null), this.#e = w, this.#e.render();
3154
+ }
3155
+ /**
3156
+ * @param {!View} view
3157
+ * @returns {!View}
3158
+ */
3159
+ initView(w) {
3160
+ return w.user = this.user, w.split = this.split, w.utils = this.utils, w.recordHistory = this.recordHistory.bind(this), w.registerViewConstructor = this.registerViewConstructor.bind(this), this.listen(w, View.viewEventCode(), this.onViewEvent.bind(this)), w;
3161
+ }
3162
+ //--[ Views Utilities ]--
3163
+ /**
3164
+ * @param {!View} view The view we want active.
3165
+ */
3166
+ switchView(w) {
3167
+ this.setActiveView(this.initView(w));
3168
+ }
3169
+ //--[ History and Navigation ]--
3170
+ /**
3171
+ * Records the given item in browser history. If item.init is true, replaces
3172
+ * the current history state. Otherwise, pushes a new history state unless
3173
+ * item.history is true.
3174
+ * @param {!Object} item The history item containing view state
3175
+ */
3176
+ recordHistory(w) {
3177
+ this.debugMe("HISTORY", w), w.init ? history.replaceState(w, "", document.location.href) : w.history || history.pushState(w, "", null);
3178
+ }
3179
+ /**
3180
+ * Navigates to a specific view based on the history item. Attempts to use
3181
+ * the active view's switchViewMap first, falling back to registered view
3182
+ * constructors if needed.
3183
+ * @param {!Object} item History item containing {view, pk, ...} properties
3184
+ */
3185
+ navTo = (w) => {
3186
+ w.history = !0;
3187
+ const D = w.view, O = this.#e;
3188
+ if (O.switchViewMap_.has(D))
3189
+ this.debugMe("NAV:VIEW:MAP", w), O.switchViewMap_.get(D)(w);
3190
+ else if (this.#t.has(D)) {
3191
+ const F = this.#t.get(D)(w.pk, w);
3192
+ this.debugMe("NAV:NEW:VIEW", w), this.switchView(F);
3193
+ }
3194
+ };
3195
+ }
3147
3196
  const DEFAULT_FORMATTERS = {
3148
3197
  /**
3149
3198
  * Format as JSON (useful for debugging)
@@ -4140,11 +4189,11 @@ const zoo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
4140
4189
  getSemanticAttributes
4141
4190
  }, Symbol.toStringTag, { value: "Module" }));
4142
4191
  async function registerCarbonLibrary(U = {}) {
4143
- const { registerCarbonLibrary: w } = await import("./register-DgYdd65A.js");
4192
+ const { registerCarbonLibrary: w } = await import("./register-HH_4Uw0Q.js");
4144
4193
  return w(U);
4145
4194
  }
4146
4195
  async function registerMdcLibrary() {
4147
- const { registerMdcLibrary: U } = await import("./register-bMHOSpvM.js");
4196
+ const { registerMdcLibrary: U } = await import("./register-BgvWUC9m.js");
4148
4197
  return U();
4149
4198
  }
4150
4199
  const zooy = {