@aikaara/chat-sdk 1.5.19 → 1.5.22

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.
@@ -1,4 +1,4 @@
1
- import { H as p } from "./MountTenant-BzTKCfBi.mjs";
1
+ import { H as p } from "./MountTenant-BZsuHkjY.mjs";
2
2
  class c extends HTMLElement {
3
3
  shadow;
4
4
  payload = null;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./MountTenant-C-dsPfDW.cjs");class l extends HTMLElement{shadow;payload=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}setPayload(e){this.payload=e,this.render()}render(){const e=this.payload;this.shadow.innerHTML=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./MountTenant-DqoK4QxP.cjs");class l extends HTMLElement{shadow;payload=null;constructor(){super(),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.render()}setPayload(e){this.payload=e,this.render()}render(){const e=this.payload;this.shadow.innerHTML=`
2
2
  <style>
3
3
  :host { display: block; margin-top: 8px; }
4
4
  button {
@@ -558,15 +558,15 @@ function ws(s) {
558
558
  throw new Error("Node.js process " + s + " is not supported by JSPM core outside of Node.js");
559
559
  }
560
560
  function _c() {
561
- !Dt || !Rt || (Dt = !1, Rt.length ? ut = Rt.concat(ut) : dr = -1, ut.length && fa());
561
+ !Dt || !Rt || (Dt = !1, Rt.length ? dt = Rt.concat(dt) : dr = -1, dt.length && fa());
562
562
  }
563
563
  function fa() {
564
564
  if (!Dt) {
565
565
  var s = setTimeout(_c, 0);
566
566
  Dt = !0;
567
- for (var e = ut.length; e; ) {
568
- for (Rt = ut, ut = []; ++dr < e; ) Rt && Rt[dr].run();
569
- dr = -1, e = ut.length;
567
+ for (var e = dt.length; e; ) {
568
+ for (Rt = dt, dt = []; ++dr < e; ) Rt && Rt[dr].run();
569
+ dr = -1, e = dt.length;
570
570
  }
571
571
  Rt = null, Dt = !1, clearTimeout(s);
572
572
  }
@@ -574,7 +574,7 @@ function fa() {
574
574
  function pa(s) {
575
575
  var e = new Array(arguments.length - 1);
576
576
  if (arguments.length > 1) for (var t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
577
- ut.push(new ma(s, e)), ut.length === 1 && !Dt && setTimeout(fa, 0);
577
+ dt.push(new ma(s, e)), dt.length === 1 && !Dt && setTimeout(fa, 0);
578
578
  }
579
579
  function ma(s, e) {
580
580
  this.fun = s, this.array = e;
@@ -612,8 +612,8 @@ function pt() {
612
612
  function _a(s) {
613
613
  return [];
614
614
  }
615
- var ut, Dt, Rt, dr, vn, wn, kn, xn, _n, Sn, En, An, In, Tn, Cn, Pn, On, Ln, Mn, Nn, Rn, jn, Dn, $n, Un, Bn, or, Fn, qn, Hn, Wn, zn, Vn, Kn, Gn, Yn, Jn, Qn, Xn, Zn, ei, ti, ri, ni, ii, si, oi, ai, li, ci, ui, di, gt, ln, Sr, hi, fi, pi, mi, gi, bi, yi, vi, wi, ki, xi, ks, Sc = Qe(() => {
616
- le(), ue(), ce(), ut = [], Dt = !1, dr = -1, ma.prototype.run = function() {
615
+ var dt, Dt, Rt, dr, vn, wn, kn, xn, _n, Sn, En, An, In, Tn, Cn, Pn, On, Ln, Mn, Nn, Rn, jn, Dn, $n, Un, Bn, or, Fn, qn, Hn, Wn, zn, Vn, Kn, Gn, Yn, Jn, Qn, Xn, Zn, ei, ti, ri, ni, ii, si, oi, ai, li, ci, ui, di, gt, ln, Sr, hi, fi, pi, mi, gi, bi, yi, vi, wi, ki, xi, ks, Sc = Qe(() => {
616
+ le(), ue(), ce(), dt = [], Dt = !1, dr = -1, ma.prototype.run = function() {
617
617
  this.fun.apply(null, this.array);
618
618
  }, vn = "browser", wn = "x64", kn = "browser", xn = { PATH: "/usr/bin", LANG: typeof navigator < "u" ? navigator.language + ".UTF-8" : void 0, PWD: "/", HOME: "/home", TMP: "/tmp" }, _n = ["/usr/bin/node"], Sn = [], En = "v16.8.0", An = {}, In = function(s, e) {
619
619
  console.warn((e ? e + ": " : "") + s);
@@ -2961,8 +2961,8 @@ var lr, Ai, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2961
2961
  Se.pipes.length === 1 && (Se.multiAwaitDrain || (Se.multiAwaitDrain = !0, Se.awaitDrainWriters = new d(Se.awaitDrainWriters ? [Se.awaitDrainWriters] : []))), Se.pipes.push(C), v("pipe count=%d opts=%j", Se.pipes.length, R);
2962
2962
  let Ae = (!R || R.end !== !1) && C !== t.stdout && C !== t.stderr ? Ge : Mt;
2963
2963
  Se.endEmitted ? t.nextTick(Ae) : ke.once("end", Ae), C.on("unpipe", Be);
2964
- function Be(ct, ht) {
2965
- v("onunpipe"), ct === ke && ht && ht.hasUnpiped === !1 && (ht.hasUnpiped = !0, nr());
2964
+ function Be(ct, ft) {
2965
+ v("onunpipe"), ct === ke && ft && ft.hasUnpiped === !1 && (ft.hasUnpiped = !0, nr());
2966
2966
  }
2967
2967
  function Ge() {
2968
2968
  v("onend"), C.end();
@@ -2977,13 +2977,13 @@ var lr, Ai, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2977
2977
  ke.on("data", yr);
2978
2978
  function yr(ct) {
2979
2979
  v("ondata");
2980
- let ht = C.write(ct);
2981
- v("dest.write", ht), ht === !1 && ir();
2980
+ let ft = C.write(ct);
2981
+ v("dest.write", ft), ft === !1 && ir();
2982
2982
  }
2983
2983
  function Lt(ct) {
2984
2984
  if (v("onerror", ct), Mt(), C.removeListener("error", Lt), C.listenerCount("error") === 0) {
2985
- let ht = C._writableState || C._readableState;
2986
- ht && !ht.errorEmitted ? M(C, ct) : C.emit("error", ct);
2985
+ let ft = C._writableState || C._readableState;
2986
+ ft && !ft.errorEmitted ? M(C, ct) : C.emit("error", ct);
2987
2987
  }
2988
2988
  }
2989
2989
  w(C, "error", Lt);
@@ -9430,15 +9430,15 @@ function Ts(s) {
9430
9430
  throw new Error("Node.js process " + s + " is not supported by JSPM core outside of Node.js");
9431
9431
  }
9432
9432
  function td() {
9433
- !$t || !jt || ($t = !1, jt.length ? dt = jt.concat(dt) : hr = -1, dt.length && ml());
9433
+ !$t || !jt || ($t = !1, jt.length ? ht = jt.concat(ht) : hr = -1, ht.length && ml());
9434
9434
  }
9435
9435
  function ml() {
9436
9436
  if (!$t) {
9437
9437
  var s = setTimeout(td, 0);
9438
9438
  $t = !0;
9439
- for (var e = dt.length; e; ) {
9440
- for (jt = dt, dt = []; ++hr < e; ) jt && jt[hr].run();
9441
- hr = -1, e = dt.length;
9439
+ for (var e = ht.length; e; ) {
9440
+ for (jt = ht, ht = []; ++hr < e; ) jt && jt[hr].run();
9441
+ hr = -1, e = ht.length;
9442
9442
  }
9443
9443
  jt = null, $t = !1, clearTimeout(s);
9444
9444
  }
@@ -9446,7 +9446,7 @@ function ml() {
9446
9446
  function rd(s) {
9447
9447
  var e = new Array(arguments.length - 1);
9448
9448
  if (arguments.length > 1) for (var t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
9449
- dt.push(new gl(s, e)), dt.length === 1 && !$t && setTimeout(ml, 0);
9449
+ ht.push(new gl(s, e)), ht.length === 1 && !$t && setTimeout(ml, 0);
9450
9450
  }
9451
9451
  function gl(s, e) {
9452
9452
  this.fun = s, this.array = e;
@@ -9484,8 +9484,8 @@ function Et() {
9484
9484
  function ud(s) {
9485
9485
  return [];
9486
9486
  }
9487
- var dt, $t, jt, hr, qs, Hs, Ws, zs, Vs, Ks, Gs, Ys, Js, Qs, Xs, Zs, eo, to, ro, no, io, so, oo, ao, lo, vr, co, uo, ho, fo, po, mo, go, bo, yo, vo, wo, ko, xo, _o, So, Eo, Ao, Io, To, Co, Po, Oo, Lo, Mo, No, bt, un, $r, Ro, jo, Do, $o, Uo, Bo, Fo, qo, Ho, Wo, zo, Cs, bl = Qe(() => {
9488
- le(), ue(), ce(), dt = [], $t = !1, hr = -1, gl.prototype.run = function() {
9487
+ var ht, $t, jt, hr, qs, Hs, Ws, zs, Vs, Ks, Gs, Ys, Js, Qs, Xs, Zs, eo, to, ro, no, io, so, oo, ao, lo, vr, co, uo, ho, fo, po, mo, go, bo, yo, vo, wo, ko, xo, _o, So, Eo, Ao, Io, To, Co, Po, Oo, Lo, Mo, No, bt, un, $r, Ro, jo, Do, $o, Uo, Bo, Fo, qo, Ho, Wo, zo, Cs, bl = Qe(() => {
9488
+ le(), ue(), ce(), ht = [], $t = !1, hr = -1, gl.prototype.run = function() {
9489
9489
  this.fun.apply(null, this.array);
9490
9490
  }, qs = "browser", Hs = "x64", Ws = "browser", zs = { PATH: "/usr/bin", LANG: navigator.language + ".UTF-8", PWD: "/", HOME: "/home", TMP: "/tmp" }, Vs = ["/usr/bin/node"], Ks = [], Gs = "v16.8.0", Ys = {}, Js = function(s, e) {
9491
9491
  console.warn((e ? e + ": " : "") + s);
@@ -12185,6 +12185,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12185
12185
  type: "text",
12186
12186
  label: "IFSC Code",
12187
12187
  required: !0,
12188
+ uppercase: !0,
12188
12189
  pattern: Vl,
12189
12190
  maxLength: 11,
12190
12191
  showWhen: { field: "us80gDonationOnline", gt: 0 }
@@ -12268,7 +12269,15 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12268
12269
  type: "group",
12269
12270
  title: "Section 80EEB — Electric Vehicle Loan Interest",
12270
12271
  fields: [
12271
- { id: "us80eeLoanTakenFrom", type: "text", label: "Loan Taken From" },
12272
+ {
12273
+ id: "us80eeLoanTakenFrom",
12274
+ type: "select",
12275
+ label: "Loan Taken From",
12276
+ options: [
12277
+ { value: "B", label: "Bank" },
12278
+ { value: "O", label: "Other" }
12279
+ ]
12280
+ },
12272
12281
  { id: "us80eeBankName", type: "text", label: "Bank Name" },
12273
12282
  {
12274
12283
  id: "us80eeLoanAccountNumber",
@@ -12460,12 +12469,10 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12460
12469
  {
12461
12470
  id: "business44ad",
12462
12471
  type: "group",
12463
- title: "Business Income 44AD",
12472
+ title: "Business Income",
12464
12473
  collapsible: !0,
12465
12474
  defaultCollapsed: !0,
12466
12475
  fields: [
12467
- { id: "bizName", type: "text", label: "Business / Profession Name" },
12468
- { id: "bizNature", type: "text", label: "Nature of Work" },
12469
12476
  {
12470
12477
  id: "bizReceiptsBank",
12471
12478
  type: "number",
@@ -12492,12 +12499,10 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12492
12499
  {
12493
12500
  id: "profession44ada",
12494
12501
  type: "group",
12495
- title: "Professional Income 44ADA",
12502
+ title: "Professional Income",
12496
12503
  collapsible: !0,
12497
12504
  defaultCollapsed: !0,
12498
12505
  fields: [
12499
- { id: "profName", type: "text", label: "Business / Profession Name" },
12500
- { id: "profNature", type: "text", label: "Nature of Work" },
12501
12506
  {
12502
12507
  id: "profReceiptsBank",
12503
12508
  type: "number",
@@ -15579,7 +15584,7 @@ class hf extends HTMLElement {
15579
15584
  */
15580
15585
  mountLinkButton(e) {
15581
15586
  const t = this.renderGen;
15582
- import("./AikaaraLinkButton-CU-wW3_e.mjs").then(({ registerAikaaraLinkButton: r, AikaaraLinkButton: i }) => {
15587
+ import("./AikaaraLinkButton-DnxH9tlI.mjs").then(({ registerAikaaraLinkButton: r, AikaaraLinkButton: i }) => {
15583
15588
  if (t !== this.renderGen) return;
15584
15589
  r();
15585
15590
  const n = document.createElement("aikaara-link-button");
@@ -16888,7 +16893,7 @@ class Pf extends HTMLElement {
16888
16893
  return this.isRepeatable() ? this.value : [this.value];
16889
16894
  }
16890
16895
  setEntry(e, t, r) {
16891
- this.setEntryNoRender(e, t, r), this.render();
16896
+ this.setEntryNoRender(e, t, r), this.renderPreservingScroll();
16892
16897
  }
16893
16898
  setEntryNoRender(e, t, r) {
16894
16899
  const i = this.getEntries(), n = { ...i[e] || {} };
@@ -16897,12 +16902,12 @@ class Pf extends HTMLElement {
16897
16902
  addEntry() {
16898
16903
  if (!this.isRepeatable() || !this.schema?.repeatable) return;
16899
16904
  const e = this.getEntries();
16900
- e.length >= this.schema.repeatable.maxCount || (e.push({}), this.value = e, this.render());
16905
+ e.length >= this.schema.repeatable.maxCount || (e.push({}), this.value = e, this.renderPreservingScroll());
16901
16906
  }
16902
16907
  removeEntry(e) {
16903
16908
  if (!this.isRepeatable()) return;
16904
16909
  const t = this.getEntries();
16905
- t.length <= 1 || (t.splice(e, 1), this.value = t, this.render());
16910
+ t.length <= 1 || (t.splice(e, 1), this.value = t, this.renderPreservingScroll());
16906
16911
  }
16907
16912
  // ── conditional reveal ──────────────────────────────────────────────
16908
16913
  fieldVisible(e, t) {
@@ -16913,6 +16918,25 @@ class Pf extends HTMLElement {
16913
16918
  };
16914
16919
  return !(r(e.showWhen) === !1 || r(e.hideWhen) === !0);
16915
16920
  }
16921
+ /**
16922
+ * Re-render without yanking the user away from where they were. Rebuilding
16923
+ * the shadow DOM replaces `.scroll`, which resets its `scrollTop` to 0; a
16924
+ * value edit deep in the form would otherwise jump back to the top.
16925
+ *
16926
+ * The restore reads `scrollHeight` first to force layout: assigning
16927
+ * `scrollTop` on the freshly-built container before it has been laid out
16928
+ * silently clamps to 0. A rAF pass re-applies it once flex layout settles.
16929
+ */
16930
+ renderPreservingScroll() {
16931
+ const e = this.shadow.querySelector(".scroll")?.scrollTop ?? 0;
16932
+ this.render();
16933
+ const t = this.shadow.querySelector(".scroll");
16934
+ if (!t) return;
16935
+ const r = () => {
16936
+ t.scrollHeight, t.scrollTop = e;
16937
+ };
16938
+ r(), typeof requestAnimationFrame == "function" && requestAnimationFrame(r);
16939
+ }
16916
16940
  // ── validation ──────────────────────────────────────────────────────
16917
16941
  findField(e) {
16918
16942
  let t;
@@ -17005,8 +17029,33 @@ class Pf extends HTMLElement {
17005
17029
  ${n}
17006
17030
  </div>` : ""}<div class="entry-body">${o}</div></section>`;
17007
17031
  }
17032
+ /**
17033
+ * Conditional fields (`showWhen` / `hideWhen`) are always rendered, inside
17034
+ * a `display: contents` wrapper whose `hidden` attribute tracks the rule.
17035
+ * Typing in a controlling field then only flips `hidden` via
17036
+ * `syncConditionalVisibility()` — the DOM is not rebuilt, so the input
17037
+ * being typed in keeps focus and caret (e.g. the 80G online amount
17038
+ * revealing Transaction Ref No. + IFSC after the first digit).
17039
+ */
17008
17040
  renderField(e, t, r) {
17009
- if (!this.fieldVisible(e, t)) return "";
17041
+ if (!e.showWhen && !e.hideWhen)
17042
+ return this.renderFieldInner(e, t, r);
17043
+ const i = this.fieldVisible(e, t);
17044
+ return `<div class="cond" data-cond-key="${ut(`${r}.${e.id}`)}" ${i ? "" : "hidden"}>${this.renderFieldInner(e, t, r)}</div>`;
17045
+ }
17046
+ /** Flip `hidden` on conditional wrappers to match the current value. */
17047
+ syncConditionalVisibility() {
17048
+ this.getEntries().forEach((t, r) => {
17049
+ this.walkFields(this.schema?.fields || [], (i) => {
17050
+ if (!i.showWhen && !i.hideWhen) return;
17051
+ const n = this.shadow.querySelector(
17052
+ `.cond[data-cond-key="${CSS.escape(`${r}.${i.id}`)}"]`
17053
+ );
17054
+ n && (n.hidden = !this.fieldVisible(i, t));
17055
+ });
17056
+ });
17057
+ }
17058
+ renderFieldInner(e, t, r) {
17010
17059
  if (e.type === "group") {
17011
17060
  const d = e, p = d.fields.map((b) => this.renderField(b, t, r)).join("");
17012
17061
  if (!d.collapsible)
@@ -17021,7 +17070,7 @@ class Pf extends HTMLElement {
17021
17070
  const h = this.collapsed.has(g);
17022
17071
  return `
17023
17072
  <fieldset class="group group--collapsible ${h ? "is-collapsed" : ""}">
17024
- <button type="button" class="group-toggle" data-action="toggle-group" data-group-key="${ft(g)}" aria-expanded="${!h}">
17073
+ <button type="button" class="group-toggle" data-action="toggle-group" data-group-key="${ut(g)}" aria-expanded="${!h}">
17025
17074
  <span class="group-title">${Ve(d.title ?? "")}</span>
17026
17075
  <span class="group-chevron" aria-hidden="true"></span>
17027
17076
  </button>
@@ -17041,25 +17090,25 @@ class Pf extends HTMLElement {
17041
17090
  const i = t[e.id], n = this.fieldHtmlId(e, r), o = `data-field-id="${e.id}" data-entry-index="${r}"`;
17042
17091
  if (e.type === "text") {
17043
17092
  const a = e, l = a.readOnly ? "input--readonly" : "", c = a.readOnly ? "disabled" : "";
17044
- return `<input type="text" class="input ${l}" id="${n}" ${o} value="${ft(String(i ?? ""))}" placeholder="${ft(a.placeholder ?? "")}" ${a.maxLength ? `maxlength="${a.maxLength}"` : ""} ${c}/>`;
17093
+ return `<input type="text" class="input ${l}" id="${n}" ${o} value="${ut(String(i ?? ""))}" placeholder="${ut(a.placeholder ?? "")}" ${a.maxLength ? `maxlength="${a.maxLength}"` : ""} ${c}/>`;
17045
17094
  }
17046
17095
  if (e.type === "textarea") {
17047
17096
  const a = e;
17048
- return `<textarea class="input textarea" id="${n}" ${o} rows="${a.rows ?? 4}" placeholder="${ft(a.placeholder ?? "")}" ${a.maxLength ? `maxlength="${a.maxLength}"` : ""}>${Ve(String(i ?? ""))}</textarea>`;
17097
+ return `<textarea class="input textarea" id="${n}" ${o} rows="${a.rows ?? 4}" placeholder="${ut(a.placeholder ?? "")}" ${a.maxLength ? `maxlength="${a.maxLength}"` : ""}>${Ve(String(i ?? ""))}</textarea>`;
17049
17098
  }
17050
17099
  if (e.type === "number") {
17051
17100
  const a = e, l = a.currency ? `<span class="prefix">${Ve(a.currency)}</span>` : "", c = a.readOnly ? "disabled" : "", u = a.readOnly ? "input--readonly" : "";
17052
17101
  return `
17053
17102
  <div class="input-with-prefix">
17054
17103
  ${l}
17055
- <input type="number" class="input ${u}" id="${n}" ${o} value="${ft(String(i ?? ""))}" placeholder="${ft(a.placeholder ?? "")}" ${a.min !== void 0 ? `min="${a.min}"` : ""} ${a.max !== void 0 ? `max="${a.max}"` : ""} ${c}/>
17104
+ <input type="number" class="input ${u}" id="${n}" ${o} value="${ut(String(i ?? ""))}" placeholder="${ut(a.placeholder ?? "")}" ${a.min !== void 0 ? `min="${a.min}"` : ""} ${a.max !== void 0 ? `max="${a.max}"` : ""} ${c}/>
17056
17105
  </div>`;
17057
17106
  }
17058
17107
  if (e.type === "date")
17059
- return `<input type="date" class="input" id="${n}" ${o} value="${ft(String(i ?? ""))}"/>`;
17108
+ return `<input type="date" class="input" id="${n}" ${o} value="${ut(String(i ?? ""))}"/>`;
17060
17109
  if (e.type === "select") {
17061
17110
  const a = e, l = a.options.map(
17062
- (c) => `<option value="${ft(c.value)}" ${i === c.value ? "selected" : ""}>${Ve(c.label)}</option>`
17111
+ (c) => `<option value="${ut(c.value)}" ${i === c.value ? "selected" : ""}>${Ve(c.label)}</option>`
17063
17112
  ).join("");
17064
17113
  return `<select class="input" id="${n}" ${o}><option value="">${Ve(a.placeholder ?? "Select…")}</option>${l}</select>`;
17065
17114
  }
@@ -17070,7 +17119,7 @@ class Pf extends HTMLElement {
17070
17119
  const c = i === l.value ? "checked" : "", u = `${n}-${l.value}`;
17071
17120
  return `
17072
17121
  <label class="radio-item ${c ? "selected" : ""}" for="${u}">
17073
- <input type="radio" id="${u}" ${o} name="${n}" value="${ft(l.value)}" ${c}/>
17122
+ <input type="radio" id="${u}" ${o} name="${n}" value="${ut(l.value)}" ${c}/>
17074
17123
  <span class="radio-label">${Ve(l.label)}</span>
17075
17124
  </label>`;
17076
17125
  }).join("")}
@@ -17120,12 +17169,12 @@ class Pf extends HTMLElement {
17120
17169
  }
17121
17170
  a = t.value;
17122
17171
  }
17123
- o === "input" ? this.setEntryNoRender(i, r, a) : this.setEntry(i, r, a);
17172
+ o === "input" ? (this.setEntryNoRender(i, r, a), this.syncConditionalVisibility()) : this.setEntry(i, r, a);
17124
17173
  });
17125
17174
  }), this.shadow.querySelector('[data-action="save"]')?.addEventListener("click", () => this.handleSubmit()), this.shadow.querySelector('[data-action="add-entry"]')?.addEventListener("click", () => this.addEntry()), this.shadow.querySelectorAll('[data-action="toggle-group"]').forEach((e) => {
17126
17175
  e.addEventListener("click", () => {
17127
17176
  const t = e.dataset.groupKey;
17128
- this.collapsed.has(t) ? this.collapsed.delete(t) : this.collapsed.add(t), this.render();
17177
+ this.collapsed.has(t) ? this.collapsed.delete(t) : this.collapsed.add(t), this.renderPreservingScroll();
17129
17178
  });
17130
17179
  }), this.shadow.querySelectorAll('[data-action="remove-entry"]').forEach((e) => {
17131
17180
  e.addEventListener("click", () => {
@@ -17153,6 +17202,14 @@ class Pf extends HTMLElement {
17153
17202
  padding: 16px 18px 8px;
17154
17203
  display: flex; flex-direction: column; gap: 14px;
17155
17204
  }
17205
+ /* Flex children with overflow:hidden get an automatic min-height of 0
17206
+ and can be squashed (clipping fields) instead of letting .scroll
17207
+ scroll. Keep every card at its natural height. */
17208
+ .scroll > *, .entries > *, .entry-body > * { flex-shrink: 0; }
17209
+ /* Conditional-field wrapper: layout-transparent when shown, gone when
17210
+ hidden, so parent flex gaps behave as if it were not there. */
17211
+ .cond { display: contents; }
17212
+ .cond[hidden] { display: none; }
17156
17213
  .section-card {
17157
17214
  display: flex; align-items: center; gap: 12px;
17158
17215
  padding: 13px 15px;
@@ -17344,7 +17401,7 @@ class Pf extends HTMLElement {
17344
17401
  `;
17345
17402
  }
17346
17403
  }
17347
- function ft(s) {
17404
+ function ut(s) {
17348
17405
  return s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
17349
17406
  }
17350
17407
  function Ve(s) {