@webwriter/deep-learning-model 1.0.1 → 1.0.2

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 (138) hide show
  1. package/README.md +3 -3
  2. package/components/model-editor.ts +22 -7
  3. package/custom-elements.json +24 -0
  4. package/dist/widgets/webwriter-feature-engineering.js +1381 -859
  5. package/dist/widgets/webwriter-model-designing.js +1500 -880
  6. package/dist/widgets/webwriter-model-evaluation.js +515 -524
  7. package/dist/widgets/webwriter-model-prediction.js +503 -512
  8. package/dist/widgets/webwriter-model-training.js +633 -559
  9. package/lib/layers/index.ts +77 -15
  10. package/lib/tflib.ts +9 -5
  11. package/localization/ar.xlf +28 -7
  12. package/localization/bg.xlf +28 -7
  13. package/localization/cs.xlf +28 -7
  14. package/localization/da.xlf +28 -7
  15. package/localization/de.xlf +28 -7
  16. package/localization/el.xlf +28 -7
  17. package/localization/es.xlf +28 -7
  18. package/localization/et.xlf +28 -7
  19. package/localization/fi.xlf +28 -7
  20. package/localization/fr.xlf +28 -7
  21. package/localization/generated/ar.ts +1 -0
  22. package/localization/generated/bg.ts +1 -0
  23. package/localization/generated/cs.ts +1 -0
  24. package/localization/generated/da.ts +1 -0
  25. package/localization/generated/de.ts +1 -0
  26. package/localization/generated/el.ts +1 -0
  27. package/localization/generated/es.ts +1 -0
  28. package/localization/generated/et.ts +1 -0
  29. package/localization/generated/fi.ts +1 -0
  30. package/localization/generated/fr.ts +1 -0
  31. package/localization/generated/hu.ts +1 -0
  32. package/localization/generated/id.ts +1 -0
  33. package/localization/generated/it.ts +1 -0
  34. package/localization/generated/ja.ts +1 -0
  35. package/localization/generated/ko.ts +1 -0
  36. package/localization/generated/lt.ts +1 -0
  37. package/localization/generated/lv.ts +1 -0
  38. package/localization/generated/nb.ts +1 -0
  39. package/localization/generated/nl.ts +1 -0
  40. package/localization/generated/pl.ts +1 -0
  41. package/localization/generated/pt-BR.ts +1 -0
  42. package/localization/generated/pt-PT.ts +1 -0
  43. package/localization/generated/ro.ts +1 -0
  44. package/localization/generated/ru.ts +1 -0
  45. package/localization/generated/sk.ts +1 -0
  46. package/localization/generated/sl.ts +1 -0
  47. package/localization/generated/sv.ts +1 -0
  48. package/localization/generated/tr.ts +1 -0
  49. package/localization/generated/uk.ts +1 -0
  50. package/localization/generated/zh-hans.ts +1 -0
  51. package/localization/generated/zh-hant.ts +1 -0
  52. package/localization/hu.xlf +28 -7
  53. package/localization/id.xlf +28 -7
  54. package/localization/it.xlf +28 -7
  55. package/localization/ja.xlf +28 -7
  56. package/localization/ko.xlf +28 -7
  57. package/localization/lt.xlf +28 -7
  58. package/localization/lv.xlf +28 -7
  59. package/localization/nb.xlf +28 -7
  60. package/localization/nl.xlf +28 -7
  61. package/localization/pkg/ar.xliff +1 -1
  62. package/localization/pkg/bg.xliff +1 -1
  63. package/localization/pkg/cs.xliff +1 -1
  64. package/localization/pkg/da.xliff +1 -1
  65. package/localization/pkg/de.xliff +1 -1
  66. package/localization/pkg/el.xliff +1 -1
  67. package/localization/pkg/es.xliff +1 -1
  68. package/localization/pkg/et.xliff +1 -1
  69. package/localization/pkg/fi.xliff +1 -1
  70. package/localization/pkg/fr.xliff +1 -1
  71. package/localization/pkg/hu.xliff +1 -1
  72. package/localization/pkg/id.xliff +1 -1
  73. package/localization/pkg/it.xliff +1 -1
  74. package/localization/pkg/ja.xliff +1 -1
  75. package/localization/pkg/ko.xliff +1 -1
  76. package/localization/pkg/lt.xliff +1 -1
  77. package/localization/pkg/lv.xliff +1 -1
  78. package/localization/pkg/nb.xliff +1 -1
  79. package/localization/pkg/nl.xliff +1 -1
  80. package/localization/pkg/pl.xliff +1 -1
  81. package/localization/pkg/pt-BR.xliff +1 -1
  82. package/localization/pkg/pt-PT.xliff +1 -1
  83. package/localization/pkg/ro.xliff +1 -1
  84. package/localization/pkg/ru.xliff +1 -1
  85. package/localization/pkg/sk.xliff +1 -1
  86. package/localization/pkg/sl.xliff +1 -1
  87. package/localization/pkg/sv.xliff +1 -1
  88. package/localization/pkg/tr.xliff +1 -1
  89. package/localization/pkg/uk.xliff +1 -1
  90. package/localization/pkg/zh-hans.xliff +2 -2
  91. package/localization/pkg/zh-hant.xliff +2 -2
  92. package/localization/pl.xlf +28 -7
  93. package/localization/pt-BR.xlf +28 -7
  94. package/localization/pt-PT.xlf +28 -7
  95. package/localization/ro.xlf +28 -7
  96. package/localization/ru.xlf +28 -7
  97. package/localization/sk.xlf +28 -7
  98. package/localization/sl.xlf +28 -7
  99. package/localization/snippets/ar.xliff +1 -1
  100. package/localization/snippets/bg.xliff +1 -1
  101. package/localization/snippets/cs.xliff +1 -1
  102. package/localization/snippets/da.xliff +1 -1
  103. package/localization/snippets/de.xliff +1 -1
  104. package/localization/snippets/el.xliff +1 -1
  105. package/localization/snippets/es.xliff +1 -1
  106. package/localization/snippets/et.xliff +1 -1
  107. package/localization/snippets/fi.xliff +1 -1
  108. package/localization/snippets/fr.xliff +1 -1
  109. package/localization/snippets/hu.xliff +1 -1
  110. package/localization/snippets/id.xliff +1 -1
  111. package/localization/snippets/it.xliff +1 -1
  112. package/localization/snippets/ja.xliff +1 -1
  113. package/localization/snippets/ko.xliff +1 -1
  114. package/localization/snippets/lt.xliff +1 -1
  115. package/localization/snippets/lv.xliff +1 -1
  116. package/localization/snippets/nb.xliff +1 -1
  117. package/localization/snippets/nl.xliff +1 -1
  118. package/localization/snippets/pl.xliff +1 -1
  119. package/localization/snippets/pt-BR.xliff +1 -1
  120. package/localization/snippets/pt-PT.xliff +1 -1
  121. package/localization/snippets/ro.xliff +1 -1
  122. package/localization/snippets/ru.xliff +1 -1
  123. package/localization/snippets/sk.xliff +1 -1
  124. package/localization/snippets/sl.xliff +1 -1
  125. package/localization/snippets/sv.xliff +1 -1
  126. package/localization/snippets/tr.xliff +1 -1
  127. package/localization/snippets/uk.xliff +1 -1
  128. package/localization/snippets/zh-hans.xliff +2 -2
  129. package/localization/snippets/zh-hant.xliff +2 -2
  130. package/localization/sv.xlf +28 -7
  131. package/localization/tr.xlf +28 -7
  132. package/localization/uk.xlf +28 -7
  133. package/localization/zh-hans.xlf +28 -7
  134. package/localization/zh-hant.xlf +28 -7
  135. package/package.json +2 -2
  136. package/snippets/MNIST.html +1 -1
  137. package/widgets/webwriter-model-designing.ts +25 -2
  138. package/widgets/webwriter-model-training.ts +45 -20
@@ -129,8 +129,8 @@ var init_deferred = __esm({
129
129
  Deferred = class {
130
130
  constructor() {
131
131
  this.settled = false;
132
- this.promise = new Promise((resolve, reject) => {
133
- this._resolve = resolve;
132
+ this.promise = new Promise((resolve2, reject) => {
133
+ this._resolve = resolve2;
134
134
  this._reject = reject;
135
135
  });
136
136
  }
@@ -343,6 +343,9 @@ var require_papaparse_min = __commonJS({
343
343
  })(exports, function r11() {
344
344
  var n13 = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== n13 ? n13 : {};
345
345
  var d4, s7 = !n13.document && !!n13.postMessage, a6 = n13.IS_PAPA_WORKER || false, o15 = {}, h7 = 0, v3 = {};
346
+ function P3(e12) {
347
+ return 65279 === e12.charCodeAt(0) ? e12.slice(1) : e12;
348
+ }
346
349
  function u5(e12) {
347
350
  this._handle = null, this._finished = false, this._completed = false, this._halted = false, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = true, this._completeResults = { data: [], errors: [], meta: {} }, function(e13) {
348
351
  var t8 = b4(e13);
@@ -354,20 +357,20 @@ var require_papaparse_min = __commonJS({
354
357
  let e14 = this._config.newline;
355
358
  e14 || (r12 = this._config.quoteChar || '"', e14 = this._handle.guessLineEndings(t8, r12)), t8 = [...t8.split(e14).slice(i11)].join(e14);
356
359
  }
357
- this.isFirstChunk && U(this._config.beforeFirstChunk) && void 0 !== (r12 = this._config.beforeFirstChunk(t8)) && (t8 = r12), this.isFirstChunk = false, this._halted = false;
360
+ this.isFirstChunk && q(this._config.beforeFirstChunk) && void 0 !== (r12 = this._config.beforeFirstChunk(t8)) && (t8 = r12), this.isFirstChunk = false, this._halted = false;
358
361
  var i11 = this._partialLine + t8, r12 = (this._partialLine = "", this._handle.parse(i11, this._baseIndex, !this._finished));
359
362
  if (!this._handle.paused() && !this._handle.aborted()) {
360
363
  t8 = r12.meta.cursor, i11 = (this._finished || (this._partialLine = i11.substring(t8 - this._baseIndex), this._baseIndex = t8), r12 && r12.data && (this._rowCount += r12.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview);
361
364
  if (a6) n13.postMessage({ results: r12, workerId: v3.WORKER_ID, finished: i11 });
362
- else if (U(this._config.chunk) && !e13) {
365
+ else if (q(this._config.chunk) && !e13) {
363
366
  if (this._config.chunk(r12, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = true);
364
367
  this._completeResults = r12 = void 0;
365
368
  }
366
- return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(r12.data), this._completeResults.errors = this._completeResults.errors.concat(r12.errors), this._completeResults.meta = r12.meta), this._completed || !i11 || !U(this._config.complete) || r12 && r12.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = true), i11 || r12 && r12.meta.paused || this._nextChunk(), r12;
369
+ return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(r12.data), this._completeResults.errors = this._completeResults.errors.concat(r12.errors), this._completeResults.meta = r12.meta), this._completed || !i11 || !q(this._config.complete) || r12 && r12.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = true), i11 || r12 && r12.meta.paused || this._nextChunk(), r12;
367
370
  }
368
371
  this._halted = true;
369
372
  }, this._sendError = function(e13) {
370
- U(this._config.error) ? this._config.error(e13) : a6 && this._config.error && n13.postMessage({ workerId: v3.WORKER_ID, error: e13, finished: false });
373
+ q(this._config.error) ? this._config.error(e13) : a6 && this._config.error && n13.postMessage({ workerId: v3.WORKER_ID, error: e13, finished: false });
371
374
  };
372
375
  }
373
376
  function f5(e12) {
@@ -463,7 +466,7 @@ var require_papaparse_min = __commonJS({
463
466
  return !y5(e14);
464
467
  })), _4()) {
465
468
  let t10 = function(e14, t11) {
466
- U(m6.transformHeader) && (e14 = m6.transformHeader(e14, t11)), c9.push(e14);
469
+ e14 = P3(e14), q(m6.transformHeader) && (e14 = m6.transformHeader(e14, t11)), c9.push(e14);
467
470
  };
468
471
  var t9 = t10;
469
472
  if (p7) if (Array.isArray(p7.data[0])) {
@@ -493,10 +496,10 @@ var require_papaparse_min = __commonJS({
493
496
  e13 = { type: e13, code: t9, message: i12 };
494
497
  void 0 !== r13 && (e13.row = r13), p7.errors.push(e13);
495
498
  }
496
- U(m6.step) && (t8 = m6.step, m6.step = function(e13) {
499
+ q(m6.step) && (t8 = m6.step, m6.step = function(e13) {
497
500
  p7 = e13, _4() ? g4() : (g4(), 0 !== p7.data.length && (r12 += e13.data.length, m6.preview && r12 > m6.preview ? s8.abort() : (p7.data = p7.data[0], t8(p7, i11))));
498
501
  }), this.parse = function(e13, t9, i12) {
499
- var r13 = m6.quoteChar || '"', r13 = (m6.newline || (m6.newline = this.guessLineEndings(e13, r13)), a7 = false, m6.delimiter ? U(m6.delimiter) && (m6.delimiter = m6.delimiter(e13), p7.meta.delimiter = m6.delimiter) : ((r13 = ((e14, t10, i13, r14, n15) => {
502
+ var r13 = m6.quoteChar || '"', r13 = (m6.newline || (m6.newline = this.guessLineEndings(e13, r13)), a7 = false, m6.delimiter ? q(m6.delimiter) && (m6.delimiter = m6.delimiter(e13), p7.meta.delimiter = m6.delimiter) : ((r13 = ((e14, t10, i13, r14, n15) => {
500
503
  var s9, a8, o17, h9;
501
504
  n15 = n15 || [",", " ", "|", ";", v3.RECORD_SEP, v3.UNIT_SEP];
502
505
  for (var u7 = 0; u7 < n15.length; u7++) {
@@ -509,32 +512,32 @@ var require_papaparse_min = __commonJS({
509
512
  }, this.paused = function() {
510
513
  return l8;
511
514
  }, this.pause = function() {
512
- l8 = true, s8.abort(), n14 = U(m6.chunk) ? "" : n14.substring(s8.getCharIndex());
515
+ l8 = true, s8.abort(), n14 = q(m6.chunk) ? "" : n14.substring(s8.getCharIndex());
513
516
  }, this.resume = function() {
514
517
  i11.streamer._halted ? (l8 = false, i11.streamer.parseChunk(n14, true)) : setTimeout(i11.resume, 3);
515
518
  }, this.aborted = function() {
516
519
  return e12;
517
520
  }, this.abort = function() {
518
- e12 = true, s8.abort(), p7.meta.aborted = true, U(m6.complete) && m6.complete(p7), n14 = "";
521
+ e12 = true, s8.abort(), p7.meta.aborted = true, q(m6.complete) && m6.complete(p7), n14 = "";
519
522
  }, this.guessLineEndings = function(e13, t9) {
520
523
  e13 = e13.substring(0, 1048576);
521
- var t9 = new RegExp(P3(t9) + "([^]*?)" + P3(t9), "gm"), i12 = (e13 = e13.replace(t9, "")).split("\r"), t9 = e13.split("\n"), e13 = 1 < t9.length && t9[0].length < i12[0].length;
524
+ var t9 = new RegExp(U(t9) + "([^]*?)" + U(t9), "gm"), i12 = (e13 = e13.replace(t9, "")).split("\r"), t9 = e13.split("\n"), e13 = 1 < t9.length && t9[0].length < i12[0].length;
522
525
  if (1 === i12.length || e13) return "\n";
523
526
  for (var r13 = 0, n15 = 0; n15 < i12.length; n15++) "\n" === i12[n15][0] && r13++;
524
527
  return r13 >= i12.length / 2 ? "\r\n" : "\r";
525
528
  };
526
529
  }
527
- function P3(e12) {
530
+ function U(e12) {
528
531
  return e12.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
529
532
  }
530
533
  function E3(C3) {
531
- var S4 = (C3 = C3 || {}).delimiter, O = C3.newline, x3 = C3.comments, I3 = C3.step, A3 = C3.preview, T3 = C3.fastMode, D2 = null, L3 = false, F = null == C3.quoteChar ? '"' : C3.quoteChar, j3 = F;
532
- if (void 0 !== C3.escapeChar && (j3 = C3.escapeChar), ("string" != typeof S4 || -1 < v3.BAD_DELIMITERS.indexOf(S4)) && (S4 = ","), x3 === S4) throw new Error("Comment character same as delimiter");
534
+ var S4 = (C3 = C3 || {}).delimiter, O = C3.newline, x3 = C3.comments, I3 = C3.step, A3 = C3.preview, T3 = C3.fastMode, D3 = null, L3 = false, F = null == C3.quoteChar ? '"' : C3.quoteChar, j2 = F;
535
+ if (void 0 !== C3.escapeChar && (j2 = C3.escapeChar), ("string" != typeof S4 || -1 < v3.BAD_DELIMITERS.indexOf(S4)) && (S4 = ","), x3 === S4) throw new Error("Comment character same as delimiter");
533
536
  true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v3.BAD_DELIMITERS.indexOf(x3)) && (x3 = false), "\n" !== O && "\r" !== O && "\r\n" !== O && (O = "\n");
534
537
  var z3 = 0, M3 = false;
535
538
  this.parse = function(i11, t8, r12) {
536
539
  if ("string" != typeof i11) throw new Error("Input must be a string");
537
- var n14 = i11.length, e12 = S4.length, s8 = O.length, a7 = x3.length, o16 = U(I3), h8 = [], u6 = [], d5 = [], f6 = z3 = 0;
540
+ var n14 = i11.length, e12 = S4.length, s8 = O.length, a7 = x3.length, o16 = q(I3), h8 = [], u6 = [], d5 = [], f6 = z3 = 0;
538
541
  if (!i11) return w3();
539
542
  if (T3 || false !== T3 && -1 === i11.indexOf(F)) {
540
543
  for (var l8 = i11.split(O), c9 = 0; c9 < l8.length; c9++) {
@@ -549,11 +552,11 @@ var require_papaparse_min = __commonJS({
549
552
  }
550
553
  return w3();
551
554
  }
552
- for (var p7 = i11.indexOf(S4, z3), g4 = i11.indexOf(O, z3), _4 = new RegExp(P3(j3) + P3(F), "g"), m6 = i11.indexOf(F, z3); ; ) if (i11[z3] === F) for (m6 = z3, z3++; ; ) {
555
+ for (var p7 = i11.indexOf(S4, z3), g4 = i11.indexOf(O, z3), _4 = new RegExp(U(j2) + U(F), "g"), m6 = i11.indexOf(F, z3); ; ) if (i11[z3] === F) for (m6 = z3, z3++; ; ) {
553
556
  if (-1 === (m6 = i11.indexOf(F, m6 + 1))) return r12 || u6.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h8.length, index: z3 }), E4();
554
557
  if (m6 === n14 - 1) return E4(i11.substring(z3, m6).replace(_4, F));
555
- if (F === j3 && i11[m6 + 1] === j3) m6++;
556
- else if (F === j3 || 0 === m6 || i11[m6 - 1] !== j3) {
558
+ if (F === j2 && i11[m6 + 1] === j2) m6++;
559
+ else if (F === j2 || 0 === m6 || i11[m6 - 1] !== j2) {
557
560
  -1 !== p7 && p7 < m6 + 1 && (p7 = i11.indexOf(S4, m6 + 1));
558
561
  var y5 = v4(-1 === (g4 = -1 !== g4 && g4 < m6 + 1 ? i11.indexOf(O, m6 + 1) : g4) ? p7 : Math.min(p7, g4));
559
562
  if (i11.substr(m6 + 1 + y5, e12) === S4) {
@@ -597,17 +600,17 @@ var require_papaparse_min = __commonJS({
597
600
  var s9 = h8[0], a8 = /* @__PURE__ */ Object.create(null), o17 = new Set(s9);
598
601
  let n15 = false;
599
602
  for (let r13 = 0; r13 < s9.length; r13++) {
600
- let i12 = s9[r13];
601
- if (a8[i12 = U(C3.transformHeader) ? C3.transformHeader(i12, r13) : i12]) {
603
+ let i12 = P3(s9[r13]);
604
+ if (a8[i12 = q(C3.transformHeader) ? C3.transformHeader(i12, r13) : i12]) {
602
605
  let e14, t9 = a8[i12];
603
606
  for (; e14 = i12 + "_" + t9, t9++, o17.has(e14); ) ;
604
- o17.add(e14), s9[r13] = e14, a8[i12]++, n15 = true, (D2 = null === D2 ? {} : D2)[e14] = i12;
607
+ o17.add(e14), s9[r13] = e14, a8[i12]++, n15 = true, (D3 = null === D3 ? {} : D3)[e14] = i12;
605
608
  } else a8[i12] = 1, s9[r13] = i12;
606
609
  o17.add(i12);
607
610
  }
608
611
  n15 && console.warn("Duplicate headers found and renamed."), L3 = true;
609
612
  }
610
- return { data: h8, errors: u6, meta: { delimiter: S4, linebreak: O, aborted: M3, truncated: !!e13, cursor: f6 + (t8 || 0), renamedHeaders: D2 } };
613
+ return { data: h8, errors: u6, meta: { delimiter: S4, linebreak: O, aborted: M3, truncated: !!e13, cursor: f6 + (t8 || 0), renamedHeaders: D3 } };
611
614
  }
612
615
  function R3() {
613
616
  I3(w3()), h8 = [], u6 = [];
@@ -625,16 +628,16 @@ var require_papaparse_min = __commonJS({
625
628
  var n14 = { abort: function() {
626
629
  r12 = true, _3(t8.workerId, { data: [], errors: [], meta: { aborted: true } });
627
630
  }, pause: m5, resume: m5 };
628
- if (U(i11.userStep)) {
631
+ if (q(i11.userStep)) {
629
632
  for (var s8 = 0; s8 < t8.results.data.length && (i11.userStep({ data: t8.results.data[s8], errors: t8.results.errors, meta: t8.results.meta }, n14), !r12); s8++) ;
630
633
  delete t8.results;
631
- } else U(i11.userChunk) && (i11.userChunk(t8.results, n14, t8.file), delete t8.results);
634
+ } else q(i11.userChunk) && (i11.userChunk(t8.results, n14, t8.file), delete t8.results);
632
635
  }
633
636
  t8.finished && !r12 && _3(t8.workerId, t8.results);
634
637
  }
635
638
  function _3(e12, t8) {
636
639
  var i11 = o15[e12];
637
- U(i11.userComplete) && i11.userComplete(t8), i11.terminate(), delete o15[e12];
640
+ q(i11.userComplete) && i11.userComplete(t8), i11.terminate(), delete o15[e12];
638
641
  }
639
642
  function m5() {
640
643
  throw new Error("Not implemented.");
@@ -650,39 +653,39 @@ var require_papaparse_min = __commonJS({
650
653
  e12.apply(t8, arguments);
651
654
  };
652
655
  }
653
- function U(e12) {
656
+ function q(e12) {
654
657
  return "function" == typeof e12;
655
658
  }
656
659
  return v3.parse = function(e12, t8) {
657
660
  var i11 = (t8 = t8 || {}).dynamicTyping || false;
658
- U(i11) && (t8.dynamicTypingFunction = i11, i11 = {});
659
- if (t8.dynamicTyping = i11, t8.transform = !!U(t8.transform) && t8.transform, !t8.worker || !v3.WORKERS_SUPPORTED) return i11 = null, v3.NODE_STREAM_INPUT, "string" == typeof e12 ? (e12 = ((e13) => 65279 !== e13.charCodeAt(0) ? e13 : e13.slice(1))(e12), i11 = new (t8.download ? f5 : c8)(t8)) : true === e12.readable && U(e12.read) && U(e12.on) ? i11 = new p6(t8) : (n13.File && e12 instanceof File || e12 instanceof Object) && (i11 = new l7(t8)), i11.stream(e12);
661
+ q(i11) && (t8.dynamicTypingFunction = i11, i11 = {});
662
+ if (t8.dynamicTyping = i11, t8.transform = !!q(t8.transform) && t8.transform, !t8.worker || !v3.WORKERS_SUPPORTED) return i11 = null, v3.NODE_STREAM_INPUT, "string" == typeof e12 ? (e12 = P3(e12), i11 = new (t8.download ? f5 : c8)(t8)) : true === e12.readable && q(e12.read) && q(e12.on) ? i11 = new p6(t8) : (n13.File && e12 instanceof File || e12 instanceof Object) && (i11 = new l7(t8)), i11.stream(e12);
660
663
  (i11 = (() => {
661
664
  var e13;
662
665
  return !!v3.WORKERS_SUPPORTED && (e13 = (() => {
663
666
  var e14 = n13.URL || n13.webkitURL || null, t9 = r11.toString();
664
667
  return v3.BLOB_URL || (v3.BLOB_URL = e14.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", t9, ")();"], { type: "text/javascript" })));
665
668
  })(), (e13 = new n13.Worker(e13)).onmessage = g3, e13.id = h7++, o15[e13.id] = e13);
666
- })()).userStep = t8.step, i11.userChunk = t8.chunk, i11.userComplete = t8.complete, i11.userError = t8.error, t8.step = U(t8.step), t8.chunk = U(t8.chunk), t8.complete = U(t8.complete), t8.error = U(t8.error), delete t8.worker, i11.postMessage({ input: e12, config: t8, workerId: i11.id });
669
+ })()).userStep = t8.step, i11.userChunk = t8.chunk, i11.userComplete = t8.complete, i11.userError = t8.error, t8.step = q(t8.step), t8.chunk = q(t8.chunk), t8.complete = q(t8.complete), t8.error = q(t8.error), delete t8.worker, i11.postMessage({ input: e12, config: t8, workerId: i11.id });
667
670
  }, v3.unparse = function(e12, t8) {
668
- var n14 = false, _4 = true, m6 = ",", y5 = "\r\n", s8 = '"', a7 = s8 + s8, i11 = false, r12 = null, o16 = false, h8 = ((() => {
671
+ var s8 = false, _4 = true, m6 = ",", y5 = "\r\n", a7 = '"', o16 = a7 + a7, i11 = false, r12 = null, h8 = false, u6 = ((() => {
669
672
  if ("object" == typeof t8) {
670
673
  if ("string" != typeof t8.delimiter || v3.BAD_DELIMITERS.filter(function(e13) {
671
674
  return -1 !== t8.delimiter.indexOf(e13);
672
- }).length || (m6 = t8.delimiter), "boolean" != typeof t8.quotes && "function" != typeof t8.quotes && !Array.isArray(t8.quotes) || (n14 = t8.quotes), "boolean" != typeof t8.skipEmptyLines && "string" != typeof t8.skipEmptyLines || (i11 = t8.skipEmptyLines), "string" == typeof t8.newline && (y5 = t8.newline), "string" == typeof t8.quoteChar && (s8 = t8.quoteChar), "boolean" == typeof t8.header && (_4 = t8.header), Array.isArray(t8.columns)) {
675
+ }).length || (m6 = t8.delimiter), "boolean" != typeof t8.quotes && "function" != typeof t8.quotes && !Array.isArray(t8.quotes) || (s8 = t8.quotes), "boolean" != typeof t8.skipEmptyLines && "string" != typeof t8.skipEmptyLines || (i11 = t8.skipEmptyLines), "string" == typeof t8.newline && (y5 = t8.newline), "string" == typeof t8.quoteChar && (a7 = t8.quoteChar, o16 = a7 + a7), "boolean" == typeof t8.header && (_4 = t8.header), Array.isArray(t8.columns)) {
673
676
  if (0 === t8.columns.length) throw new Error("Option columns is empty");
674
677
  r12 = t8.columns;
675
678
  }
676
- void 0 !== t8.escapeChar && (a7 = t8.escapeChar + s8), t8.escapeFormulae instanceof RegExp ? o16 = t8.escapeFormulae : "boolean" == typeof t8.escapeFormulae && t8.escapeFormulae && (o16 = /^[=+\-@\t\r].*$/);
679
+ void 0 !== t8.escapeChar && (o16 = t8.escapeChar + a7), t8.escapeFormulae instanceof RegExp ? h8 = t8.escapeFormulae : "boolean" == typeof t8.escapeFormulae && t8.escapeFormulae && (h8 = /^[=+\-@\t\r].*$/);
677
680
  }
678
- })(), new RegExp(P3(s8), "g"));
681
+ })(), new RegExp(U(a7), "g"));
679
682
  "string" == typeof e12 && (e12 = JSON.parse(e12));
680
683
  if (Array.isArray(e12)) {
681
- if (!e12.length || Array.isArray(e12[0])) return u6(null, e12, i11);
682
- if ("object" == typeof e12[0]) return u6(r12 || Object.keys(e12[0]), e12, i11);
683
- } else if ("object" == typeof e12) return "string" == typeof e12.data && (e12.data = JSON.parse(e12.data)), Array.isArray(e12.data) && (e12.fields || (e12.fields = e12.meta && e12.meta.fields || r12), e12.fields || (e12.fields = Array.isArray(e12.data[0]) ? e12.fields : "object" == typeof e12.data[0] ? Object.keys(e12.data[0]) : []), Array.isArray(e12.data[0]) || "object" == typeof e12.data[0] || (e12.data = [e12.data])), u6(e12.fields || [], e12.data || [], i11);
684
+ if (!e12.length || Array.isArray(e12[0])) return n14(null, e12, i11);
685
+ if ("object" == typeof e12[0]) return n14(r12 || Object.keys(e12[0]), e12, i11);
686
+ } else if ("object" == typeof e12) return "string" == typeof e12.data && (e12.data = JSON.parse(e12.data)), Array.isArray(e12.data) && (e12.fields || (e12.fields = e12.meta && e12.meta.fields || r12), e12.fields || (e12.fields = Array.isArray(e12.data[0]) ? e12.fields : "object" == typeof e12.data[0] ? Object.keys(e12.data[0]) : []), Array.isArray(e12.data[0]) || "object" == typeof e12.data[0] || (e12.data = [e12.data])), n14(e12.fields || [], e12.data || [], i11);
684
687
  throw new Error("Unable to serialize unrecognized input");
685
- function u6(e13, t9, i12) {
688
+ function n14(e13, t9, i12) {
686
689
  var r13 = "", n15 = ("string" == typeof e13 && (e13 = JSON.parse(e13)), "string" == typeof t9 && (t9 = JSON.parse(t9)), Array.isArray(e13) && 0 < e13.length), s9 = !Array.isArray(t9[0]);
687
690
  if (n15 && _4) {
688
691
  for (var a8 = 0; a8 < e13.length; a8++) 0 < a8 && (r13 += m6), r13 += k3(e13[a8], a8);
@@ -709,11 +712,11 @@ var require_papaparse_min = __commonJS({
709
712
  return r13;
710
713
  }
711
714
  function k3(e13, t9) {
712
- var i12, r13;
713
- return null == e13 ? "" : e13.constructor === Date ? JSON.stringify(e13).slice(1, 25) : (r13 = false, o16 && "string" == typeof e13 && o16.test(e13) && (e13 = "'" + e13, r13 = true), i12 = e13.toString().replace(h8, a7), (r13 = r13 || true === n14 || "function" == typeof n14 && n14(e13, t9) || Array.isArray(n14) && n14[t9] || ((e14, t10) => {
715
+ var i12, r13, n15;
716
+ return null == e13 ? "" : e13.constructor === Date ? JSON.stringify(e13).slice(1, 25) : (n15 = false, h8 && "string" == typeof e13 && h8.test(e13) && (e13 = "'" + e13, n15 = true), r13 = (i12 = e13.toString()).replace(u6, o16), (n15 = n15 || true === s8 || "function" == typeof s8 && s8(e13, t9) || Array.isArray(s8) && s8[t9] || ((e14, t10) => {
714
717
  for (var i13 = 0; i13 < t10.length; i13++) if (-1 < e14.indexOf(t10[i13])) return true;
715
718
  return false;
716
- })(i12, v3.BAD_DELIMITERS) || -1 < i12.indexOf(m6) || " " === i12.charAt(0) || " " === i12.charAt(i12.length - 1)) ? s8 + i12 + s8 : i12);
719
+ })(r13, v3.BAD_DELIMITERS) || -1 < r13.indexOf(m6) || -1 < i12.indexOf(a7) || " " === r13.charAt(0) || " " === r13.charAt(r13.length - 1)) ? a7 + r13 + a7 : r13);
717
720
  }
718
721
  }, v3.RECORD_SEP = String.fromCharCode(30), v3.UNIT_SEP = String.fromCharCode(31), v3.BYTE_ORDER_MARK = "\uFEFF", v3.BAD_DELIMITERS = ["\r", "\n", '"', v3.BYTE_ORDER_MARK], v3.WORKERS_SUPPORTED = !s7 && !!n13.Worker, v3.NODE_STREAM_INPUT = 1, v3.LocalChunkSize = 10485760, v3.RemoteChunkSize = 5242880, v3.DefaultDelimiter = ",", v3.Parser = E3, v3.ParserHandle = i10, v3.NetworkStreamer = f5, v3.FileStreamer = l7, v3.StringStreamer = c8, v3.ReadableStreamStreamer = p6, n13.jQuery && ((d4 = n13.jQuery).fn.parse = function(o16) {
719
722
  var i11 = o16.config || {}, h8 = [];
@@ -722,20 +725,20 @@ var require_papaparse_min = __commonJS({
722
725
  for (var t8 = 0; t8 < this.files.length; t8++) h8.push({ file: this.files[t8], inputElem: this, instanceConfig: d4.extend({}, i11) });
723
726
  }), e12(), this;
724
727
  function e12() {
725
- if (0 === h8.length) U(o16.complete) && o16.complete();
728
+ if (0 === h8.length) q(o16.complete) && o16.complete();
726
729
  else {
727
730
  var e13, t8, i12, r12, n14 = h8[0];
728
- if (U(o16.before)) {
731
+ if (q(o16.before)) {
729
732
  var s8 = o16.before(n14.file, n14.inputElem);
730
733
  if ("object" == typeof s8) {
731
- if ("abort" === s8.action) return e13 = "AbortError", t8 = n14.file, i12 = n14.inputElem, r12 = s8.reason, void (U(o16.error) && o16.error({ name: e13 }, t8, i12, r12));
734
+ if ("abort" === s8.action) return e13 = "AbortError", t8 = n14.file, i12 = n14.inputElem, r12 = s8.reason, void (q(o16.error) && o16.error({ name: e13 }, t8, i12, r12));
732
735
  if ("skip" === s8.action) return void u6();
733
736
  "object" == typeof s8.config && (n14.instanceConfig = d4.extend(n14.instanceConfig, s8.config));
734
737
  } else if ("skip" === s8) return void u6();
735
738
  }
736
739
  var a7 = n14.instanceConfig.complete;
737
740
  n14.instanceConfig.complete = function(e14) {
738
- U(a7) && a7(e14, n14.file, n14.inputElem), u6();
741
+ q(a7) && a7(e14, n14.file, n14.inputElem), u6();
739
742
  }, v3.parse(n14.file, n14.instanceConfig);
740
743
  }
741
744
  }
@@ -989,11 +992,11 @@ function rightPad(a6, size3) {
989
992
  return a6 + " ".repeat(size3 - a6.length);
990
993
  }
991
994
  function repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter, scheduleFn) {
992
- return new Promise((resolve, reject) => {
995
+ return new Promise((resolve2, reject) => {
993
996
  let tryCount = 0;
994
997
  const tryFn = () => {
995
998
  if (checkFn()) {
996
- resolve();
999
+ resolve2();
997
1000
  return;
998
1001
  }
999
1002
  tryCount++;
@@ -1054,18 +1057,18 @@ function squeezeShape(shape, axis) {
1054
1057
  const keptDims = [];
1055
1058
  const isEmptyArray = axis != null && Array.isArray(axis) && axis.length === 0;
1056
1059
  const axes = axis == null || isEmptyArray ? null : parseAxisParam(axis, shape).sort();
1057
- let j3 = 0;
1060
+ let j2 = 0;
1058
1061
  for (let i10 = 0; i10 < shape.length; ++i10) {
1059
1062
  if (axes != null) {
1060
- if (axes[j3] === i10 && shape[i10] !== 1) {
1063
+ if (axes[j2] === i10 && shape[i10] !== 1) {
1061
1064
  throw new Error(`Can't squeeze axis ${i10} since its dim '${shape[i10]}' is not 1`);
1062
1065
  }
1063
- if ((axes[j3] == null || axes[j3] > i10) && shape[i10] === 1) {
1066
+ if ((axes[j2] == null || axes[j2] > i10) && shape[i10] === 1) {
1064
1067
  newShape.push(shape[i10]);
1065
1068
  keptDims.push(i10);
1066
1069
  }
1067
- if (axes[j3] <= i10) {
1068
- j3++;
1070
+ if (axes[j2] <= i10) {
1071
+ j2++;
1069
1072
  }
1070
1073
  }
1071
1074
  if (shape[i10] !== 1) {
@@ -3031,7 +3034,7 @@ function getFilteredNodesXToY(tape, xs, y4) {
3031
3034
  for (const inputName in nodeInputs) {
3032
3035
  const input2 = nodeInputs[inputName];
3033
3036
  let anyInputFromX = false;
3034
- for (let j3 = 0; j3 < xs.length; j3++) {
3037
+ for (let j2 = 0; j2 < xs.length; j2++) {
3035
3038
  if (tensorsFromX[input2.id]) {
3036
3039
  node.outputs.forEach((output) => tensorsFromX[output.id] = true);
3037
3040
  anyInputFromX = true;
@@ -3050,8 +3053,8 @@ function getFilteredNodesXToY(tape, xs, y4) {
3050
3053
  for (let i10 = tape.length - 1; i10 >= 0; i10--) {
3051
3054
  const node = tape[i10];
3052
3055
  const nodeInputs = node.inputs;
3053
- for (let j3 = 0; j3 < node.outputs.length; j3++) {
3054
- if (tensorsLeadToY[node.outputs[j3].id]) {
3056
+ for (let j2 = 0; j2 < node.outputs.length; j2++) {
3057
+ if (tensorsLeadToY[node.outputs[j2].id]) {
3055
3058
  for (const inputName in nodeInputs) {
3056
3059
  tensorsLeadToY[nodeInputs[inputName].id] = true;
3057
3060
  nodesToY[node.id] = true;
@@ -3148,8 +3151,8 @@ function computeMaxSizePerColumn(vals, shape, dtype, strides) {
3148
3151
  if (rank > 1) {
3149
3152
  for (let row = 0; row < n13 / numCols; row++) {
3150
3153
  const offset3 = row * numCols;
3151
- for (let j3 = 0; j3 < numCols; j3++) {
3152
- padPerCol[j3] = Math.max(padPerCol[j3], valToString(valuesOrTuples[offset3 + j3], 0, dtype).length);
3154
+ for (let j2 = 0; j2 < numCols; j2++) {
3155
+ padPerCol[j2] = Math.max(padPerCol[j2], valToString(valuesOrTuples[offset3 + j2], 0, dtype).length);
3153
3156
  }
3154
3157
  }
3155
3158
  }
@@ -5150,7 +5153,7 @@ async function encodeWeights(tensors, group) {
5150
5153
  }
5151
5154
  const spec = { name, shape: t8.shape, dtype: t8.dtype };
5152
5155
  if (t8.dtype === "string") {
5153
- const utf8bytes = new Promise(async (resolve) => {
5156
+ const utf8bytes = new Promise(async (resolve2) => {
5154
5157
  const vals = await t8.bytes();
5155
5158
  const totalNumBytes = vals.reduce((p6, c8) => p6 + c8.length, 0) + NUM_BYTES_STRING_LENGTH * vals.length;
5156
5159
  const bytes = new Uint8Array(totalNumBytes);
@@ -5163,7 +5166,7 @@ async function encodeWeights(tensors, group) {
5163
5166
  bytes.set(val, offset3);
5164
5167
  offset3 += val.length;
5165
5168
  }
5166
- resolve(bytes);
5169
+ resolve2(bytes);
5167
5170
  });
5168
5171
  dataPromises.push(utf8bytes);
5169
5172
  } else {
@@ -5713,7 +5716,7 @@ var init_indexed_db = __esm({
5713
5716
  * of `ModelArtifacts`, if the action is get.
5714
5717
  */
5715
5718
  databaseAction(modelPath, modelArtifacts) {
5716
- return new Promise((resolve, reject) => {
5719
+ return new Promise((resolve2, reject) => {
5717
5720
  const openRequest = this.indexedDB.open(DATABASE_NAME, DATABASE_VERSION);
5718
5721
  openRequest.onupgradeneeded = () => setUpDatabase(openRequest);
5719
5722
  openRequest.onsuccess = () => {
@@ -5727,7 +5730,7 @@ var init_indexed_db = __esm({
5727
5730
  db.close();
5728
5731
  return reject(new Error(`Cannot find model with path '${this.modelPath}' in IndexedDB.`));
5729
5732
  } else {
5730
- resolve(getRequest.result.modelArtifacts);
5733
+ resolve2(getRequest.result.modelArtifacts);
5731
5734
  }
5732
5735
  };
5733
5736
  getRequest.onerror = (error) => {
@@ -5760,7 +5763,7 @@ var init_indexed_db = __esm({
5760
5763
  } catch (error) {
5761
5764
  return reject(error);
5762
5765
  }
5763
- putModelRequest.onsuccess = () => resolve({ modelArtifactsInfo });
5766
+ putModelRequest.onsuccess = () => resolve2({ modelArtifactsInfo });
5764
5767
  putModelRequest.onerror = (error) => {
5765
5768
  infoStore = infoTx.objectStore(INFO_STORE_NAME);
5766
5769
  const deleteInfoRequest = infoStore.delete(this.modelPath);
@@ -5810,7 +5813,7 @@ var init_indexed_db = __esm({
5810
5813
  this.indexedDB = getIndexedDBFactory();
5811
5814
  }
5812
5815
  async listModels() {
5813
- return new Promise((resolve, reject) => {
5816
+ return new Promise((resolve2, reject) => {
5814
5817
  const openRequest = this.indexedDB.open(DATABASE_NAME, DATABASE_VERSION);
5815
5818
  openRequest.onupgradeneeded = () => setUpDatabase(openRequest);
5816
5819
  openRequest.onsuccess = () => {
@@ -5823,7 +5826,7 @@ var init_indexed_db = __esm({
5823
5826
  for (const item of getAllInfoRequest.result) {
5824
5827
  out[item.modelPath] = item.modelArtifactsInfo;
5825
5828
  }
5826
- resolve(out);
5829
+ resolve2(out);
5827
5830
  };
5828
5831
  getAllInfoRequest.onerror = (error) => {
5829
5832
  db.close();
@@ -5836,7 +5839,7 @@ var init_indexed_db = __esm({
5836
5839
  }
5837
5840
  async removeModel(path) {
5838
5841
  path = maybeStripScheme(path);
5839
- return new Promise((resolve, reject) => {
5842
+ return new Promise((resolve2, reject) => {
5840
5843
  const openRequest = this.indexedDB.open(DATABASE_NAME, DATABASE_VERSION);
5841
5844
  openRequest.onupgradeneeded = () => setUpDatabase(openRequest);
5842
5845
  openRequest.onsuccess = () => {
@@ -5855,7 +5858,7 @@ var init_indexed_db = __esm({
5855
5858
  modelTx = db.transaction(MODEL_STORE_NAME, "readwrite");
5856
5859
  const modelStore = modelTx.objectStore(MODEL_STORE_NAME);
5857
5860
  const deleteModelRequest = modelStore.delete(path);
5858
- deleteModelRequest.onsuccess = () => resolve(getInfoRequest.result.modelArtifactsInfo);
5861
+ deleteModelRequest.onsuccess = () => resolve2(getInfoRequest.result.modelArtifactsInfo);
5859
5862
  deleteModelRequest.onerror = (error) => reject(getInfoRequest.error);
5860
5863
  };
5861
5864
  deleteInfoRequest.onsuccess = deleteModelData;
@@ -6889,8 +6892,8 @@ function computeOutputShape2D(inShape, fieldSize, stride, zeroPad, roundingMode)
6889
6892
  }
6890
6893
  const inputRows = inShape[0];
6891
6894
  const inputCols = inShape[1];
6892
- const outputRows = round2((inputRows - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);
6893
- const outputCols = round2((inputCols - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);
6895
+ const outputRows = round3((inputRows - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);
6896
+ const outputCols = round3((inputCols - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);
6894
6897
  return [outputRows, outputCols];
6895
6898
  }
6896
6899
  function computeOutputShape4D(inShape, filterShape, outChannels, strides, zeroPad, roundingMode) {
@@ -6900,7 +6903,7 @@ function computeOutputShape4D(inShape, filterShape, outChannels, strides, zeroPa
6900
6903
  const outShape = [0, 0, 0, outChannels];
6901
6904
  for (let index = 0; index < 3; index++) {
6902
6905
  if (inShape[index] + 2 * zeroPad >= filterShape[index]) {
6903
- outShape[index] = round2((inShape[index] - filterShape[index] + 2 * zeroPad) / strides[index] + 1, roundingMode);
6906
+ outShape[index] = round3((inShape[index] - filterShape[index] + 2 * zeroPad) / strides[index] + 1, roundingMode);
6904
6907
  }
6905
6908
  }
6906
6909
  return outShape;
@@ -6958,8 +6961,8 @@ function getPadAndOutInfo(pad3, inHeight, inWidth, strideHeight, strideWidth, fi
6958
6961
  const right = dataFormat === "channelsLast" ? pad3[2][1] : pad3[3][1];
6959
6962
  const padType = top === 0 && bottom === 0 && left === 0 && right === 0 ? "VALID" : "EXPLICIT";
6960
6963
  padInfo = { top, bottom, left, right, type: padType };
6961
- outHeight = round2((inHeight - filterHeight + top + bottom) / strideHeight + 1, roundingMode);
6962
- outWidth = round2((inWidth - filterWidth + left + right) / strideWidth + 1, roundingMode);
6964
+ outHeight = round3((inHeight - filterHeight + top + bottom) / strideHeight + 1, roundingMode);
6965
+ outWidth = round3((inWidth - filterWidth + left + right) / strideWidth + 1, roundingMode);
6963
6966
  } else {
6964
6967
  throw Error(`Unknown padding parameter: ${pad3}`);
6965
6968
  }
@@ -7007,7 +7010,7 @@ function get3DPadAndOutInfo(pad3, inDepth, inHeight, inWidth, strideDepth, strid
7007
7010
  }
7008
7011
  return { padInfo, outDepth, outHeight, outWidth };
7009
7012
  }
7010
- function round2(value, roundingMode) {
7013
+ function round3(value, roundingMode) {
7011
7014
  if (!roundingMode) {
7012
7015
  return Math.trunc(value);
7013
7016
  }
@@ -7279,10 +7282,10 @@ function basicLSTMCell_(forgetBias, lstmKernel, lstmBias, data, c8, h7) {
7279
7282
  const sliceCols = res.shape[1] / 4;
7280
7283
  const sliceSize = [batchSize, sliceCols];
7281
7284
  const i10 = slice(res, [0, 0], sliceSize);
7282
- const j3 = slice(res, [0, sliceCols], sliceSize);
7285
+ const j2 = slice(res, [0, sliceCols], sliceSize);
7283
7286
  const f5 = slice(res, [0, sliceCols * 2], sliceSize);
7284
7287
  const o15 = slice(res, [0, sliceCols * 3], sliceSize);
7285
- const newC = add2(mul(sigmoid(i10), tanh2(j3)), mul($c, sigmoid(add2($forgetBias, f5))));
7288
+ const newC = add2(mul(sigmoid(i10), tanh2(j2)), mul($c, sigmoid(add2($forgetBias, f5))));
7286
7289
  const newH = mul(tanh2(newC), sigmoid(o15));
7287
7290
  return [newC, newH];
7288
7291
  }
@@ -10589,22 +10592,22 @@ var require_xorshift7 = __commonJS({
10589
10592
  return v3;
10590
10593
  };
10591
10594
  function init(me2, seed2) {
10592
- var j3, w3, X = [];
10595
+ var j2, w3, X = [];
10593
10596
  if (seed2 === (seed2 | 0)) {
10594
10597
  w3 = X[0] = seed2;
10595
10598
  } else {
10596
10599
  seed2 = "" + seed2;
10597
- for (j3 = 0; j3 < seed2.length; ++j3) {
10598
- X[j3 & 7] = X[j3 & 7] << 15 ^ seed2.charCodeAt(j3) + X[j3 + 1 & 7] << 13;
10600
+ for (j2 = 0; j2 < seed2.length; ++j2) {
10601
+ X[j2 & 7] = X[j2 & 7] << 15 ^ seed2.charCodeAt(j2) + X[j2 + 1 & 7] << 13;
10599
10602
  }
10600
10603
  }
10601
10604
  while (X.length < 8) X.push(0);
10602
- for (j3 = 0; j3 < 8 && X[j3] === 0; ++j3) ;
10603
- if (j3 == 8) w3 = X[7] = -1;
10604
- else w3 = X[j3];
10605
+ for (j2 = 0; j2 < 8 && X[j2] === 0; ++j2) ;
10606
+ if (j2 == 8) w3 = X[7] = -1;
10607
+ else w3 = X[j2];
10605
10608
  me2.x = X;
10606
10609
  me2.i = 0;
10607
- for (j3 = 256; j3 > 0; --j3) {
10610
+ for (j2 = 256; j2 > 0; --j2) {
10608
10611
  me2.next();
10609
10612
  }
10610
10613
  }
@@ -10675,7 +10678,7 @@ var require_xor4096 = __commonJS({
10675
10678
  return v3 + (w3 ^ w3 >>> 16) | 0;
10676
10679
  };
10677
10680
  function init(me2, seed2) {
10678
- var t8, v3, i10, j3, w3, X = [], limit = 128;
10681
+ var t8, v3, i10, j2, w3, X = [], limit = 128;
10679
10682
  if (seed2 === (seed2 | 0)) {
10680
10683
  v3 = seed2;
10681
10684
  seed2 = null;
@@ -10684,16 +10687,16 @@ var require_xor4096 = __commonJS({
10684
10687
  v3 = 0;
10685
10688
  limit = Math.max(limit, seed2.length);
10686
10689
  }
10687
- for (i10 = 0, j3 = -32; j3 < limit; ++j3) {
10688
- if (seed2) v3 ^= seed2.charCodeAt((j3 + 32) % seed2.length);
10689
- if (j3 === 0) w3 = v3;
10690
+ for (i10 = 0, j2 = -32; j2 < limit; ++j2) {
10691
+ if (seed2) v3 ^= seed2.charCodeAt((j2 + 32) % seed2.length);
10692
+ if (j2 === 0) w3 = v3;
10690
10693
  v3 ^= v3 << 10;
10691
10694
  v3 ^= v3 >>> 15;
10692
10695
  v3 ^= v3 << 4;
10693
10696
  v3 ^= v3 >>> 13;
10694
- if (j3 >= 0) {
10697
+ if (j2 >= 0) {
10695
10698
  w3 = w3 + 1640531527 | 0;
10696
- t8 = X[j3 & 127] ^= v3 + w3;
10699
+ t8 = X[j2 & 127] ^= v3 + w3;
10697
10700
  i10 = 0 == t8 ? i10 + 1 : 0;
10698
10701
  }
10699
10702
  }
@@ -10701,7 +10704,7 @@ var require_xor4096 = __commonJS({
10701
10704
  X[(seed2 && seed2.length || 0) & 127] = -1;
10702
10705
  }
10703
10706
  i10 = 127;
10704
- for (j3 = 4 * 128; j3 > 0; --j3) {
10707
+ for (j2 = 4 * 128; j2 > 0; --j2) {
10705
10708
  v3 = X[i10 + 34 & 127];
10706
10709
  t8 = X[i10 = i10 + 1 & 127];
10707
10710
  v3 ^= v3 << 13;
@@ -10905,7 +10908,7 @@ var require_seedrandom = __commonJS({
10905
10908
  );
10906
10909
  }
10907
10910
  function ARC4(key) {
10908
- var t8, keylen = key.length, me = this, i10 = 0, j3 = me.i = me.j = 0, s7 = me.S = [];
10911
+ var t8, keylen = key.length, me = this, i10 = 0, j2 = me.i = me.j = 0, s7 = me.S = [];
10909
10912
  if (!keylen) {
10910
10913
  key = [keylen++];
10911
10914
  }
@@ -10913,17 +10916,17 @@ var require_seedrandom = __commonJS({
10913
10916
  s7[i10] = i10++;
10914
10917
  }
10915
10918
  for (i10 = 0; i10 < width; i10++) {
10916
- s7[i10] = s7[j3 = mask & j3 + key[i10 % keylen] + (t8 = s7[i10])];
10917
- s7[j3] = t8;
10919
+ s7[i10] = s7[j2 = mask & j2 + key[i10 % keylen] + (t8 = s7[i10])];
10920
+ s7[j2] = t8;
10918
10921
  }
10919
10922
  (me.g = function(count2) {
10920
- var t9, r11 = 0, i11 = me.i, j4 = me.j, s8 = me.S;
10923
+ var t9, r11 = 0, i11 = me.i, j3 = me.j, s8 = me.S;
10921
10924
  while (count2--) {
10922
10925
  t9 = s8[i11 = mask & i11 + 1];
10923
- r11 = r11 * width + s8[mask & (s8[i11] = s8[j4 = mask & j4 + t9]) + (s8[j4] = t9)];
10926
+ r11 = r11 * width + s8[mask & (s8[i11] = s8[j3 = mask & j3 + t9]) + (s8[j3] = t9)];
10924
10927
  }
10925
10928
  me.i = i11;
10926
- me.j = j4;
10929
+ me.j = j3;
10927
10930
  return r11;
10928
10931
  })(width);
10929
10932
  }
@@ -10947,9 +10950,9 @@ var require_seedrandom = __commonJS({
10947
10950
  return result.length ? result : typ == "string" ? obj : obj + "\0";
10948
10951
  }
10949
10952
  function mixkey(seed, key) {
10950
- var stringseed = seed + "", smear, j3 = 0;
10951
- while (j3 < stringseed.length) {
10952
- key[mask & j3] = mask & (smear ^= key[mask & j3] * 19) + stringseed.charCodeAt(j3++);
10953
+ var stringseed = seed + "", smear, j2 = 0;
10954
+ while (j2 < stringseed.length) {
10955
+ key[mask & j2] = mask & (smear ^= key[mask & j2] * 19) + stringseed.charCodeAt(j2++);
10953
10956
  }
10954
10957
  return tostring(key);
10955
10958
  }
@@ -11158,16 +11161,16 @@ function createVideoElement(source) {
11158
11161
  video.style.top = "0px";
11159
11162
  video.preload = "auto";
11160
11163
  video.appendChild(source);
11161
- return new Promise((resolve) => {
11162
- video.addEventListener("loadeddata", (_3) => resolve(video));
11164
+ return new Promise((resolve2) => {
11165
+ video.addEventListener("loadeddata", (_3) => resolve2(video));
11163
11166
  video.load();
11164
11167
  });
11165
11168
  }
11166
11169
  async function play(video) {
11167
11170
  await video.play();
11168
11171
  if ("requestVideoFrameCallback" in video) {
11169
- await new Promise((resolve) => {
11170
- video.requestVideoFrameCallback(resolve);
11172
+ await new Promise((resolve2) => {
11173
+ video.requestVideoFrameCallback(resolve2);
11171
11174
  });
11172
11175
  }
11173
11176
  }
@@ -11596,14 +11599,14 @@ function round_(x3) {
11596
11599
  const inputs = { x: $x };
11597
11600
  return ENGINE.runKernel(Round, inputs);
11598
11601
  }
11599
- var round3;
11602
+ var round4;
11600
11603
  var init_round = __esm({
11601
11604
  "node_modules/@tensorflow/tfjs-core/dist/ops/round.js"() {
11602
11605
  init_engine();
11603
11606
  init_kernel_names();
11604
11607
  init_tensor_util_env();
11605
11608
  init_operation();
11606
- round3 = /* @__PURE__ */ op({ round_ });
11609
+ round4 = /* @__PURE__ */ op({ round_ });
11607
11610
  }
11608
11611
  });
11609
11612
 
@@ -13773,8 +13776,8 @@ function nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scor
13773
13776
  break;
13774
13777
  }
13775
13778
  let ignoreCandidate = false;
13776
- for (let j3 = selectedIndices.length - 1; j3 >= suppressBeginIndex; --j3) {
13777
- const iou = intersectionOverUnion(boxes, boxIndex, selectedIndices[j3]);
13779
+ for (let j2 = selectedIndices.length - 1; j2 >= suppressBeginIndex; --j2) {
13780
+ const iou = intersectionOverUnion(boxes, boxIndex, selectedIndices[j2]);
13778
13781
  if (iou >= iouThreshold) {
13779
13782
  ignoreCandidate = true;
13780
13783
  break;
@@ -13809,9 +13812,9 @@ function nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scor
13809
13812
  }
13810
13813
  return result;
13811
13814
  }
13812
- function intersectionOverUnion(boxes, i10, j3) {
13815
+ function intersectionOverUnion(boxes, i10, j2) {
13813
13816
  const iCoord = boxes.subarray(i10 * 4, i10 * 4 + 4);
13814
- const jCoord = boxes.subarray(j3 * 4, j3 * 4 + 4);
13817
+ const jCoord = boxes.subarray(j2 * 4, j2 * 4 + 4);
13815
13818
  const yminI = Math.min(iCoord[0], iCoord[2]);
13816
13819
  const xminI = Math.min(iCoord[1], iCoord[3]);
13817
13820
  const ymaxI = Math.max(iCoord[0], iCoord[2]);
@@ -14108,7 +14111,7 @@ function threshold_(image2, method = "binary", inverted = false, threshValue = 0
14108
14111
  grayscale = image2;
14109
14112
  }
14110
14113
  if (method === "otsu") {
14111
- const $histogram = bincount(cast(round3(grayscale), "int32"), tensor([]), 256);
14114
+ const $histogram = bincount(cast(round4(grayscale), "int32"), tensor([]), 256);
14112
14115
  $threshold = otsu($histogram, totalPixelsInImage);
14113
14116
  }
14114
14117
  const invCondition = inverted ? lessEqual(grayscale, $threshold) : greater(grayscale, $threshold);
@@ -14216,8 +14219,8 @@ function bandPart_(a6, numLower, numUpper) {
14216
14219
  $numUpper = where(less(numUpper, 0), N3, minimum(numUpper, N3));
14217
14220
  }
14218
14221
  const i10 = reshape(range(0, M3, 1, "int32"), [-1, 1]);
14219
- const j3 = range(0, N3, 1, "int32");
14220
- const ij = sub(i10, j3);
14222
+ const j2 = range(0, N3, 1, "int32");
14223
+ const ij = sub(i10, j2);
14221
14224
  const inBand = logicalAnd(lessEqual(ij, $numLower), greaterEqual(ij, neg($numUpper)));
14222
14225
  const zero = zeros([M3, N3], $a.dtype);
14223
14226
  return reshape(stack(unstack(reshape($a, [-1, M3, N3])).map((mat) => where(inBand, mat, zero))), shape);
@@ -14266,8 +14269,8 @@ function gramSchmidt_(xs) {
14266
14269
  ys.push(ENGINE.tidy(() => {
14267
14270
  let x3 = xs1d[i10];
14268
14271
  if (i10 > 0) {
14269
- for (let j3 = 0; j3 < i10; ++j3) {
14270
- const proj = mul(sum2(mul(ys[j3], x3)), ys[j3]);
14272
+ for (let j2 = 0; j2 < i10; ++j2) {
14273
+ const proj = mul(sum2(mul(ys[j2], x3)), ys[j2]);
14271
14274
  x3 = sub(x3, proj);
14272
14275
  }
14273
14276
  }
@@ -14332,14 +14335,14 @@ function qr2d(x3, fullMatrices = false) {
14332
14335
  const one2D = tensor2d([[1]], [1, 1]);
14333
14336
  let w3 = clone(one2D);
14334
14337
  const iters = m5 >= n13 ? n13 : m5;
14335
- for (let j3 = 0; j3 < iters; ++j3) {
14338
+ for (let j2 = 0; j2 < iters; ++j2) {
14336
14339
  const rTemp = r11;
14337
14340
  const wTemp = w3;
14338
14341
  const qTemp = q;
14339
14342
  [w3, r11, q] = ENGINE.tidy(() => {
14340
- const rjEnd1 = slice(r11, [j3, j3], [m5 - j3, 1]);
14343
+ const rjEnd1 = slice(r11, [j2, j2], [m5 - j2, 1]);
14341
14344
  const normX = norm(rjEnd1);
14342
- const rjj = slice(r11, [j3, j3], [1, 1]);
14345
+ const rjj = slice(r11, [j2, j2], [1, 1]);
14343
14346
  const s7 = where(greater(rjj, 0), tensor2d([[-1]]), tensor2d([[1]]));
14344
14347
  const u1 = sub(rjj, mul(s7, normX));
14345
14348
  const wPre = div(rjEnd1, u1);
@@ -14352,22 +14355,22 @@ function qr2d(x3, fullMatrices = false) {
14352
14355
  ], 0);
14353
14356
  }
14354
14357
  const tau = neg(div(matMul(s7, u1), normX));
14355
- const rjEndAll = slice(r11, [j3, 0], [m5 - j3, n13]);
14358
+ const rjEndAll = slice(r11, [j2, 0], [m5 - j2, n13]);
14356
14359
  const tauTimesW = mul(tau, w3);
14357
14360
  const wT = transpose(w3);
14358
- if (j3 === 0) {
14361
+ if (j2 === 0) {
14359
14362
  r11 = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll)));
14360
14363
  } else {
14361
14364
  const rTimesTau = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll)));
14362
- r11 = concat2([slice(r11, [0, 0], [j3, n13]), rTimesTau], 0);
14365
+ r11 = concat2([slice(r11, [0, 0], [j2, n13]), rTimesTau], 0);
14363
14366
  }
14364
14367
  const tawTimesWT = transpose(tauTimesW);
14365
- const qAllJEnd = slice(q, [0, j3], [m5, q.shape[1] - j3]);
14366
- if (j3 === 0) {
14368
+ const qAllJEnd = slice(q, [0, j2], [m5, q.shape[1] - j2]);
14369
+ if (j2 === 0) {
14367
14370
  q = sub(qAllJEnd, matMul(matMul(qAllJEnd, w3), tawTimesWT));
14368
14371
  } else {
14369
14372
  const qTimesTau = sub(qAllJEnd, matMul(matMul(qAllJEnd, w3), tawTimesWT));
14370
- q = concat2([slice(q, [0, 0], [m5, j3]), qTimesTau], 1);
14373
+ q = concat2([slice(q, [0, 0], [m5, j2]), qTimesTau], 1);
14371
14374
  }
14372
14375
  return [w3, r11, q];
14373
14376
  });
@@ -16276,7 +16279,7 @@ var init_register_optimizers = __esm({
16276
16279
 
16277
16280
  // node_modules/@tensorflow/tfjs-core/dist/io/browser_files.js
16278
16281
  function defer(f5) {
16279
- return new Promise((resolve) => setTimeout(resolve)).then(f5);
16282
+ return new Promise((resolve2) => setTimeout(resolve2)).then(f5);
16280
16283
  }
16281
16284
  function browserDownloads(fileNamePrefix = "model") {
16282
16285
  return new BrowserDownloads(fileNamePrefix);
@@ -16348,7 +16351,7 @@ var init_browser_files = __esm({
16348
16351
  this.weightsFiles = files.slice(1);
16349
16352
  }
16350
16353
  async load() {
16351
- return new Promise((resolve, reject) => {
16354
+ return new Promise((resolve2, reject) => {
16352
16355
  const jsonReader = new FileReader();
16353
16356
  jsonReader.onload = (event) => {
16354
16357
  const modelJSON = JSON.parse(event.target.result);
@@ -16363,11 +16366,11 @@ var init_browser_files = __esm({
16363
16366
  return;
16364
16367
  }
16365
16368
  if (this.weightsFiles.length === 0) {
16366
- resolve({ modelTopology });
16369
+ resolve2({ modelTopology });
16367
16370
  return;
16368
16371
  }
16369
16372
  const modelArtifactsPromise = getModelArtifactsForJSON(modelJSON, (weightsManifest2) => this.loadWeights(weightsManifest2));
16370
- resolve(modelArtifactsPromise);
16373
+ resolve2(modelArtifactsPromise);
16371
16374
  };
16372
16375
  jsonReader.onerror = (error) => reject(`Failed to read model topology and weights manifest JSON from file '${this.jsonFile.name}'. BrowserFiles supports loading Keras-style tf.Model artifacts only.`);
16373
16376
  jsonReader.readAsText(this.jsonFile);
@@ -16385,11 +16388,11 @@ var init_browser_files = __esm({
16385
16388
  return Promise.all(promises).then((buffers) => [weightSpecs, buffers]);
16386
16389
  }
16387
16390
  loadWeightsFile(path, file) {
16388
- return new Promise((resolve, reject) => {
16391
+ return new Promise((resolve2, reject) => {
16389
16392
  const weightFileReader = new FileReader();
16390
16393
  weightFileReader.onload = (event) => {
16391
16394
  const weightData = event.target.result;
16392
- resolve(weightData);
16395
+ resolve2(weightData);
16393
16396
  };
16394
16397
  weightFileReader.onerror = (error) => reject(`Failed to weights data from file of path '${path}'.`);
16395
16398
  weightFileReader.readAsArrayBuffer(file);
@@ -17090,11 +17093,11 @@ async function toPixels(img, canvas) {
17090
17093
  rgba[d4] = value * multiplier;
17091
17094
  }
17092
17095
  }
17093
- const j3 = i10 * 4;
17094
- bytes[j3 + 0] = Math.round(rgba[0]);
17095
- bytes[j3 + 1] = Math.round(rgba[1]);
17096
- bytes[j3 + 2] = Math.round(rgba[2]);
17097
- bytes[j3 + 3] = Math.round(rgba[3]);
17096
+ const j2 = i10 * 4;
17097
+ bytes[j2 + 0] = Math.round(rgba[0]);
17098
+ bytes[j2 + 1] = Math.round(rgba[1]);
17099
+ bytes[j2 + 2] = Math.round(rgba[2]);
17100
+ bytes[j2 + 3] = Math.round(rgba[3]);
17098
17101
  }
17099
17102
  if (canvas != null) {
17100
17103
  if (!hasToPixelsWarned) {
@@ -17830,7 +17833,7 @@ var init_train = __esm({
17830
17833
 
17831
17834
  // node_modules/@tensorflow/tfjs-core/dist/browser_util.js
17832
17835
  function nextFrame() {
17833
- return new Promise((resolve) => delayCallback(() => resolve()));
17836
+ return new Promise((resolve2) => delayCallback(() => resolve2()));
17834
17837
  }
17835
17838
  var delayCallback;
17836
17839
  var init_browser_util = __esm({
@@ -18217,8 +18220,8 @@ function decodeEinsumEquation(equation, numTensors) {
18217
18220
  throw new Error(`Found duplicate axes in input component ${inputTerms[i10]}. Support for duplicate axes in input is not implemented yet.`);
18218
18221
  }
18219
18222
  idDims[i10] = [];
18220
- for (let j3 = 0; j3 < inputTerms[i10].length; ++j3) {
18221
- idDims[i10].push(allDims.indexOf(inputTerms[i10][j3]));
18223
+ for (let j2 = 0; j2 < inputTerms[i10].length; ++j2) {
18224
+ idDims[i10].push(allDims.indexOf(inputTerms[i10][j2]));
18222
18225
  }
18223
18226
  }
18224
18227
  const numDims = allDims.length;
@@ -18248,11 +18251,11 @@ function checkEinsumDimSizes(nDims, idDims, tensors) {
18248
18251
  const dimSizes = new Array(nDims);
18249
18252
  for (let i10 = 0; i10 < tensors.length; ++i10) {
18250
18253
  const shape = tensors[i10].shape;
18251
- for (let j3 = 0; j3 < idDims[i10].length; ++j3) {
18252
- if (dimSizes[idDims[i10][j3]] === void 0) {
18253
- dimSizes[idDims[i10][j3]] = shape[j3];
18254
+ for (let j2 = 0; j2 < idDims[i10].length; ++j2) {
18255
+ if (dimSizes[idDims[i10][j2]] === void 0) {
18256
+ dimSizes[idDims[i10][j2]] = shape[j2];
18254
18257
  } else {
18255
- assert(dimSizes[idDims[i10][j3]] === shape[j3], () => `Expected dimension ${dimSizes[idDims[i10][j3]]} at axis ${j3} of input shaped ${JSON.stringify(shape)}, but got dimension ${shape[j3]}`);
18258
+ assert(dimSizes[idDims[i10][j2]] === shape[j2], () => `Expected dimension ${dimSizes[idDims[i10][j2]]} at axis ${j2} of input shaped ${JSON.stringify(shape)}, but got dimension ${shape[j2]}`);
18256
18259
  }
18257
18260
  }
18258
18261
  }
@@ -19739,8 +19742,8 @@ function arrayRange(start, stop) {
19739
19742
  function arrayConcat(arrays) {
19740
19743
  const result = [];
19741
19744
  for (let i10 = 0; i10 < arrays.length; ++i10) {
19742
- for (let j3 = 0; j3 < arrays[i10].length; ++j3) {
19743
- result.push(arrays[i10][j3]);
19745
+ for (let j2 = 0; j2 < arrays[i10].length; ++j2) {
19746
+ result.push(arrays[i10][j2]);
19744
19747
  }
19745
19748
  }
19746
19749
  return result;
@@ -21255,8 +21258,8 @@ var init_Tile_grad = __esm({
21255
21258
  }
21256
21259
  } else if (x3.rank === 2) {
21257
21260
  for (let i10 = 0; i10 < reps[0]; ++i10) {
21258
- for (let j3 = 0; j3 < reps[1]; ++j3) {
21259
- xGrad = add2(xGrad, slice(dy, [i10 * x3.shape[0], j3 * x3.shape[1]], [
21261
+ for (let j2 = 0; j2 < reps[1]; ++j2) {
21262
+ xGrad = add2(xGrad, slice(dy, [i10 * x3.shape[0], j2 * x3.shape[1]], [
21260
21263
  x3.shape[0],
21261
21264
  x3.shape[1]
21262
21265
  ]));
@@ -21264,20 +21267,20 @@ var init_Tile_grad = __esm({
21264
21267
  }
21265
21268
  } else if (x3.rank === 3) {
21266
21269
  for (let i10 = 0; i10 < reps[0]; ++i10) {
21267
- for (let j3 = 0; j3 < reps[1]; ++j3) {
21270
+ for (let j2 = 0; j2 < reps[1]; ++j2) {
21268
21271
  for (let k3 = 0; k3 < reps[2]; ++k3) {
21269
- xGrad = add2(xGrad, slice(dy, [i10 * x3.shape[0], j3 * x3.shape[1], k3 * x3.shape[2]], [x3.shape[0], x3.shape[1], x3.shape[2]]));
21272
+ xGrad = add2(xGrad, slice(dy, [i10 * x3.shape[0], j2 * x3.shape[1], k3 * x3.shape[2]], [x3.shape[0], x3.shape[1], x3.shape[2]]));
21270
21273
  }
21271
21274
  }
21272
21275
  }
21273
21276
  } else if (x3.rank === 4) {
21274
21277
  for (let i10 = 0; i10 < reps[0]; ++i10) {
21275
- for (let j3 = 0; j3 < reps[1]; ++j3) {
21278
+ for (let j2 = 0; j2 < reps[1]; ++j2) {
21276
21279
  for (let k3 = 0; k3 < reps[2]; ++k3) {
21277
21280
  for (let l7 = 0; l7 < reps[3]; ++l7) {
21278
21281
  xGrad = add2(xGrad, slice(dy, [
21279
21282
  i10 * x3.shape[0],
21280
- j3 * x3.shape[1],
21283
+ j2 * x3.shape[1],
21281
21284
  k3 * x3.shape[2],
21282
21285
  l7 * x3.shape[3]
21283
21286
  ], [x3.shape[0], x3.shape[1], x3.shape[2], x3.shape[3]]));
@@ -22842,7 +22845,7 @@ var init_round2 = __esm({
22842
22845
  init_tensor();
22843
22846
  getGlobalTensorClass().prototype.round = function() {
22844
22847
  this.throwIfDisposed();
22845
- return round3(this);
22848
+ return round4(this);
22846
22849
  };
22847
22850
  }
22848
22851
  });
@@ -28127,10 +28130,10 @@ var init_container = __esm({
28127
28130
  continue;
28128
28131
  }
28129
28132
  const inputShapes2 = [];
28130
- for (let j3 = 0; j3 < node.inboundLayers.length; j3++) {
28131
- const inboundLayer = node.inboundLayers[j3];
28132
- const nodeIndex2 = node.nodeIndices[j3];
28133
- const tensorIndex = node.tensorIndices[j3];
28133
+ for (let j2 = 0; j2 < node.inboundLayers.length; j2++) {
28134
+ const inboundLayer = node.inboundLayers[j2];
28135
+ const nodeIndex2 = node.nodeIndices[j2];
28136
+ const tensorIndex = node.tensorIndices[j2];
28134
28137
  const shapeKey = `${inboundLayer.name}_${nodeIndex2}_${tensorIndex}`;
28135
28138
  const inputShape2 = layersToOutputShapes[shapeKey];
28136
28139
  inputShapes2.push(inputShape2);
@@ -28138,9 +28141,9 @@ var init_container = __esm({
28138
28141
  const outputShape = layer.computeOutputShape(singletonOrArray(inputShapes2));
28139
28142
  const outputShapes2 = normalizeShapeList(outputShape);
28140
28143
  const nodeIndex = layer.inboundNodes.indexOf(node);
28141
- for (let j3 = 0; j3 < outputShapes2.length; j3++) {
28142
- const shapeKey = `${layer.name}_${nodeIndex}_${j3}`;
28143
- layersToOutputShapes[shapeKey] = outputShapes2[j3];
28144
+ for (let j2 = 0; j2 < outputShapes2.length; j2++) {
28145
+ const shapeKey = `${layer.name}_${nodeIndex}_${j2}`;
28146
+ layersToOutputShapes[shapeKey] = outputShapes2[j2];
28144
28147
  }
28145
28148
  }
28146
28149
  }
@@ -29042,12 +29045,12 @@ function standardizeInputData(data, names2, shapes, checkBatchAxis = true, excep
29042
29045
  if (array2.shape.length !== shapes[i10].length) {
29043
29046
  throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names2[i10]} to have ${shapes[i10].length} dimension(s). but got array with shape ${array2.shape}`);
29044
29047
  }
29045
- for (let j3 = 0; j3 < shapes[i10].length; ++j3) {
29046
- if (j3 === 0 && !checkBatchAxis) {
29048
+ for (let j2 = 0; j2 < shapes[i10].length; ++j2) {
29049
+ if (j2 === 0 && !checkBatchAxis) {
29047
29050
  continue;
29048
29051
  }
29049
- const dim = array2.shape[j3];
29050
- const refDim = shapes[i10][j3];
29052
+ const dim = array2.shape[j2];
29053
+ const refDim = shapes[i10][j2];
29051
29054
  if (refDim != null && refDim >= 0 && dim !== refDim) {
29052
29055
  throw new ValueError(`${exceptionPrefix} expected a batch of elements where each example has shape [${shapes[i10].slice(1, shapes[i10].length)}] (i.e.,tensor shape [*,${shapes[i10].slice(1, shapes[i10].length)}]) but the ${exceptionPrefix} received an input with ${array2.shape[0]} examples, each with shape [${array2.shape.slice(1, array2.shape.length)}] (tensor shape [${array2.shape}])`);
29053
29056
  }
@@ -29092,9 +29095,9 @@ function checkLossAndTargetCompatibility(targets, lossFns, outputShapes) {
29092
29095
  if (keyLosses.indexOf(loss) !== -1) {
29093
29096
  const slicedYShape = y4.shape.slice(1);
29094
29097
  const slicedShape = shape.slice(1);
29095
- for (let j3 = 0; j3 < slicedYShape.length; ++j3) {
29096
- const targetDim = slicedYShape[j3];
29097
- const outDim = slicedShape[j3];
29098
+ for (let j2 = 0; j2 < slicedYShape.length; ++j2) {
29099
+ const targetDim = slicedYShape[j2];
29100
+ const outDim = slicedShape[j2];
29098
29101
  if (outDim != null && targetDim !== outDim) {
29099
29102
  throw new ValueError(`A target Tensor with shape ${y4.shape} was passed for an output of shape ${shape}, while using a loss function that expects targets to have the same shape as the output.`);
29100
29103
  }
@@ -29124,12 +29127,12 @@ function checkInputData(data, names2, shapes, checkBatchAxis = true, exceptionPr
29124
29127
  if (array2.shape.length !== shapes[i10].length) {
29125
29128
  throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names2[i10]} to have ${shapes[i10].length} dimension(s), but got array with shape ${JSON.stringify(array2.shape)}`);
29126
29129
  }
29127
- for (let j3 = 0; j3 < shapes[i10].length; ++j3) {
29128
- if (j3 === 0 && !checkBatchAxis) {
29130
+ for (let j2 = 0; j2 < shapes[i10].length; ++j2) {
29131
+ if (j2 === 0 && !checkBatchAxis) {
29129
29132
  continue;
29130
29133
  }
29131
- const dim = array2.shape[j3];
29132
- const refDim = shapes[i10][j3];
29134
+ const dim = array2.shape[j2];
29135
+ const refDim = shapes[i10][j2];
29133
29136
  if (refDim != null) {
29134
29137
  if (refDim !== dim) {
29135
29138
  throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names2[i10]} to have shape ${JSON.stringify(shapes[i10])} but got array with shape ${JSON.stringify(array2.shape)}.`);
@@ -34712,15 +34715,15 @@ var init_merge = __esm({
34712
34715
  const outputShape = shape1.slice(0, shape1.length - shape2.length);
34713
34716
  for (let k3 = 0; k3 < shape2.length; ++k3) {
34714
34717
  const i10 = shape1[shape1.length - shape2.length + k3];
34715
- const j3 = shape2[k3];
34716
- if (i10 == null || j3 == null || i10 < 0 || j3 < 0) {
34718
+ const j2 = shape2[k3];
34719
+ if (i10 == null || j2 == null || i10 < 0 || j2 < 0) {
34717
34720
  outputShape.push(null);
34718
34721
  } else if (i10 === 1) {
34719
- outputShape.push(j3);
34720
- } else if (j3 === 1) {
34722
+ outputShape.push(j2);
34723
+ } else if (j2 === 1) {
34721
34724
  outputShape.push(i10);
34722
34725
  } else {
34723
- if (i10 !== j3) {
34726
+ if (i10 !== j2) {
34724
34727
  throw new ValueError("Operands could not be broadcast together with shapes " + JSON.stringify(shape1) + " " + JSON.stringify(shape2));
34725
34728
  }
34726
34729
  outputShape.push(i10);
@@ -44767,7 +44770,7 @@ __export(ops_for_converter_exports, {
44767
44770
  reverse3d: () => reverse3d,
44768
44771
  reverse4d: () => reverse4d,
44769
44772
  rfft: () => rfft,
44770
- round: () => round3,
44773
+ round: () => round4,
44771
44774
  rsqrt: () => rsqrt,
44772
44775
  scalar: () => scalar,
44773
44776
  scatterND: () => scatterND,
@@ -50485,12 +50488,12 @@ var init_microphone_iterator = __esm({
50485
50488
  const freqDataQueue = [];
50486
50489
  const timeDataQueue = [];
50487
50490
  let currentFrames = 0;
50488
- return new Promise((resolve) => {
50491
+ return new Promise((resolve2) => {
50489
50492
  const intervalID = setInterval(() => {
50490
50493
  if (this.includeSpectrogram) {
50491
50494
  this.analyser.getFloatFrequencyData(this.freqData);
50492
50495
  if (this.freqData[0] === -Infinity) {
50493
- resolve({ freqDataQueue, timeDataQueue });
50496
+ resolve2({ freqDataQueue, timeDataQueue });
50494
50497
  }
50495
50498
  freqDataQueue.push(this.freqData.slice(0, this.columnTruncateLength));
50496
50499
  }
@@ -50500,7 +50503,7 @@ var init_microphone_iterator = __esm({
50500
50503
  }
50501
50504
  if (++currentFrames === this.numFrames) {
50502
50505
  clearInterval(intervalID);
50503
- resolve({ freqDataQueue, timeDataQueue });
50506
+ resolve2({ freqDataQueue, timeDataQueue });
50504
50507
  }
50505
50508
  }, this.fftSize / this.sampleRateHz * 1e3);
50506
50509
  });
@@ -50618,9 +50621,9 @@ var init_webcam_iterator = __esm({
50618
50621
  }
50619
50622
  this.webcamVideoElement.play();
50620
50623
  this.isClosed = false;
50621
- return new Promise((resolve) => {
50624
+ return new Promise((resolve2) => {
50622
50625
  this.webcamVideoElement.onloadedmetadata = () => {
50623
- resolve();
50626
+ resolve2();
50624
50627
  };
50625
50628
  });
50626
50629
  }
@@ -50860,10 +50863,10 @@ var init_file_chunk_iterator = __esm({
50860
50863
  if (this.offset >= (this.file instanceof Uint8Array ? this.file.byteLength : this.file.size)) {
50861
50864
  return { value: null, done: true };
50862
50865
  }
50863
- const chunk = new Promise((resolve, reject) => {
50866
+ const chunk = new Promise((resolve2, reject) => {
50864
50867
  const end = this.offset + this.chunkSize;
50865
50868
  if (this.file instanceof Uint8Array) {
50866
- resolve(new Uint8Array(this.file.slice(this.offset, end)));
50869
+ resolve2(new Uint8Array(this.file.slice(this.offset, end)));
50867
50870
  } else {
50868
50871
  const fileReader = new FileReader();
50869
50872
  fileReader.onload = (event) => {
@@ -50874,7 +50877,7 @@ var init_file_chunk_iterator = __esm({
50874
50877
  if (!(data instanceof Uint8Array)) {
50875
50878
  return reject(new TypeError("FileReader returned unknown type."));
50876
50879
  }
50877
- resolve(data);
50880
+ resolve2(data);
50878
50881
  };
50879
50882
  fileReader.onabort = (event) => {
50880
50883
  return reject(new Error("Aborted"));
@@ -51617,8 +51620,8 @@ function bincountReduceImpl(xBuf, weightsBuf, size3, binaryOutput = false) {
51617
51620
  const numCols = xBuf.shape[1];
51618
51621
  const outBuf = buffer([numRows, size3], weightsBuf.dtype);
51619
51622
  for (let i10 = 0; i10 < numRows; i10++) {
51620
- for (let j3 = 0; j3 < numCols; j3++) {
51621
- const value = xBuf.get(i10, j3);
51623
+ for (let j2 = 0; j2 < numCols; j2++) {
51624
+ const value = xBuf.get(i10, j2);
51622
51625
  if (value < 0) {
51623
51626
  throw new Error("Input x must be non-negative!");
51624
51627
  }
@@ -51629,7 +51632,7 @@ function bincountReduceImpl(xBuf, weightsBuf, size3, binaryOutput = false) {
51629
51632
  outBuf.set(1, i10, value);
51630
51633
  } else {
51631
51634
  if (weightsBuf.size > 0) {
51632
- outBuf.set(outBuf.get(i10, value) + weightsBuf.get(i10, j3), i10, value);
51635
+ outBuf.set(outBuf.get(i10, value) + weightsBuf.get(i10, j2), i10, value);
51633
51636
  } else {
51634
51637
  outBuf.set(outBuf.get(i10, value) + 1, i10, value);
51635
51638
  }
@@ -51850,9 +51853,9 @@ function gatherNdImpl(indicesData, paramsBuf, dtype, numSlices, sliceRank, slice
51850
51853
  for (let i10 = 0; i10 < numSlices; i10++) {
51851
51854
  const index = [];
51852
51855
  let flattenIndex = 0;
51853
- for (let j3 = 0; j3 < sliceRank; j3++) {
51854
- const dim = indicesData[i10 * sliceRank + j3];
51855
- flattenIndex += dim * strides[j3];
51856
+ for (let j2 = 0; j2 < sliceRank; j2++) {
51857
+ const dim = indicesData[i10 * sliceRank + j2];
51858
+ flattenIndex += dim * strides[j2];
51856
51859
  index.push(dim);
51857
51860
  }
51858
51861
  if (flattenIndex < 0 || flattenIndex >= paramsSize / sliceSize) {
@@ -52000,8 +52003,8 @@ function maxImpl(aVals, reduceSize, outShape, dtype) {
52000
52003
  for (let i10 = 0; i10 < vals.length; ++i10) {
52001
52004
  const offset3 = i10 * reduceSize;
52002
52005
  let max6 = aVals[offset3];
52003
- for (let j3 = 0; j3 < reduceSize; ++j3) {
52004
- const value = aVals[offset3 + j3];
52006
+ for (let j2 = 0; j2 < reduceSize; ++j2) {
52007
+ const value = aVals[offset3 + j2];
52005
52008
  if (Number.isNaN(value) || value > max6) {
52006
52009
  max6 = value;
52007
52010
  }
@@ -52180,8 +52183,8 @@ function prodImpl(xShape, xDtype, xVals, reductionAxes) {
52180
52183
  for (let i10 = 0; i10 < outVals.length; ++i10) {
52181
52184
  const offset3 = i10 * reduceSize;
52182
52185
  let prod4 = 1;
52183
- for (let j3 = 0; j3 < reduceSize; ++j3) {
52184
- prod4 *= xVals[offset3 + j3];
52186
+ for (let j2 = 0; j2 < reduceSize; ++j2) {
52187
+ prod4 *= xVals[offset3 + j2];
52185
52188
  }
52186
52189
  outVals[i10] = prod4;
52187
52190
  }
@@ -52278,8 +52281,8 @@ function makeSplits(indices, indicesShape, paramsNestedSplits, numParamsDenseVal
52278
52281
  if (outDim >= 0) {
52279
52282
  const outSplitsOutDim = outSplits[outDim];
52280
52283
  const delta = outSplitsOutDim[outSplitsOutDim.length - 1] - splits[start];
52281
- for (let j3 = start; j3 < limit; ++j3) {
52282
- outSplits[outDim].push(splits[j3 + 1] + delta);
52284
+ for (let j2 = start; j2 < limit; ++j2) {
52285
+ outSplits[outDim].push(splits[j2 + 1] + delta);
52283
52286
  }
52284
52287
  }
52285
52288
  start = splits[start];
@@ -52298,7 +52301,7 @@ function getSplits(outSplits) {
52298
52301
  const numSplits = outSplits[i10].length;
52299
52302
  const splits = util_exports.getArrayFromDType("int32", numSplits);
52300
52303
  splitsOut.push(splits);
52301
- outSplits[i10].forEach((value, j3) => splits[j3] = value);
52304
+ outSplits[i10].forEach((value, j2) => splits[j2] = value);
52302
52305
  }
52303
52306
  return splitsOut;
52304
52307
  }
@@ -52318,8 +52321,8 @@ function writeValueSlices(paramsDenseValues, paramsDenseValuesShape, valueSlices
52318
52321
  let outPos = 0;
52319
52322
  for (const slice4 of valueSlices) {
52320
52323
  for (let i10 = slice4[0]; i10 < slice4[1]; ++i10) {
52321
- for (let j3 = 0; j3 < valueSize; ++j3) {
52322
- values[outPos * valuesM + j3] = paramsDenseValues[i10 * denseM + j3];
52324
+ for (let j2 = 0; j2 < valueSize; ++j2) {
52325
+ values[outPos * valuesM + j2] = paramsDenseValues[i10 * denseM + j2];
52323
52326
  }
52324
52327
  ++outPos;
52325
52328
  }
@@ -52591,11 +52594,11 @@ var init_RaggedTensorToTensor_impl = __esm({
52591
52594
  if (parentOutputIndexCurrent === -1) {
52592
52595
  realLength = 0;
52593
52596
  }
52594
- for (let j3 = 0; j3 < realLength; ++j3) {
52597
+ for (let j2 = 0; j2 < realLength; ++j2) {
52595
52598
  result.push(parentOutputIndexCurrent);
52596
52599
  parentOutputIndexCurrent += outputIndexMultiplier;
52597
52600
  }
52598
- for (let j3 = 0; j3 < rowLength - realLength; ++j3) {
52601
+ for (let j2 = 0; j2 < rowLength - realLength; ++j2) {
52599
52602
  result.push(-1);
52600
52603
  }
52601
52604
  }
@@ -52846,10 +52849,10 @@ function scatterImpl(indices, updates, shape, outputSize, sliceSize, numUpdates,
52846
52849
  for (let i10 = 0; i10 < numUpdates; i10++) {
52847
52850
  const index = [];
52848
52851
  let flattenIndex = 0;
52849
- for (let j3 = 0; j3 < sliceRank; j3++) {
52850
- const dim = indicesData[i10 * sliceRank + j3];
52852
+ for (let j2 = 0; j2 < sliceRank; j2++) {
52853
+ const dim = indicesData[i10 * sliceRank + j2];
52851
52854
  index.push(dim);
52852
- flattenIndex += dim * strides[j3];
52855
+ flattenIndex += dim * strides[j2];
52853
52856
  }
52854
52857
  if (flattenIndex < 0 || flattenIndex >= outputSize / sliceSize) {
52855
52858
  throw new Error(`Invalid indices: ${index} does not index into ${shape}`);
@@ -52904,7 +52907,7 @@ function sliceImpl(vals, begin, size3, shape, dtype) {
52904
52907
  const outBuf = buffer(size3, dtype);
52905
52908
  for (let i10 = 0; i10 < outBuf.size; ++i10) {
52906
52909
  const outLoc = outBuf.indexToLoc(i10);
52907
- const inLoc = outLoc.map((idx, j3) => idx + begin[j3]);
52910
+ const inLoc = outLoc.map((idx, j2) => idx + begin[j2]);
52908
52911
  outBuf.set(inBuf.get(...inLoc), ...outLoc);
52909
52912
  }
52910
52913
  if (dtype === "string") {
@@ -53005,8 +53008,8 @@ function sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, va
53005
53008
  const offset3 = filledCount[row];
53006
53009
  const outputI = (row === 0 ? 0 : csrOffset[row - 1]) + offset3;
53007
53010
  filledCount[row]++;
53008
- for (let j3 = 0; j3 < rank; ++j3) {
53009
- outputIndices[outputI * rank + j3] = indices[i10 * rank + j3];
53011
+ for (let j2 = 0; j2 < rank; ++j2) {
53012
+ outputIndices[outputI * rank + j2] = indices[i10 * rank + j2];
53010
53013
  }
53011
53014
  outputValues[outputI] = values[i10];
53012
53015
  reverseIndexMap[i10] = outputI;
@@ -53093,12 +53096,12 @@ function sparseReshapeImpl(inputIndices, inputIndicesShape, inputDType, inputSha
53093
53096
  const newIndices = util_exports.getArrayFromDType(inputDType, nnz * outputRank);
53094
53097
  for (let i10 = 0; i10 < nnz; ++i10) {
53095
53098
  let id3 = 0;
53096
- for (let j3 = 0; j3 < inputRank; ++j3) {
53097
- id3 += inputIndices[i10 * inputRank + j3] * inputStrides[j3];
53099
+ for (let j2 = 0; j2 < inputRank; ++j2) {
53100
+ id3 += inputIndices[i10 * inputRank + j2] * inputStrides[j2];
53098
53101
  }
53099
- for (let j3 = 0; j3 < outputRank; ++j3) {
53100
- newIndices[i10 * outputRank + j3] = Math.trunc(id3 / outputStrides[j3]);
53101
- id3 %= outputStrides[j3];
53102
+ for (let j2 = 0; j2 < outputRank; ++j2) {
53103
+ newIndices[i10 * outputRank + j2] = Math.trunc(id3 / outputStrides[j2]);
53104
+ id3 %= outputStrides[j2];
53102
53105
  }
53103
53106
  }
53104
53107
  return [newIndices, [nnz, outputRank], outputShape];
@@ -53158,13 +53161,13 @@ function sparseSegmentReductionImpl(input2, inputShape, inputDType, indices, seg
53158
53161
  if (index < 0 || index >= inputFlat[0]) {
53159
53162
  throw new Error(backend_util_exports.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(i10, indices[i10], inputFlat[0]));
53160
53163
  }
53161
- for (let j3 = 0; j3 < numCol; j3++) {
53162
- output[outIndex * numCol + j3] += input2[index * numCol + j3];
53164
+ for (let j2 = 0; j2 < numCol; j2++) {
53165
+ output[outIndex * numCol + j2] += input2[index * numCol + j2];
53163
53166
  }
53164
53167
  }
53165
53168
  if (isMean) {
53166
- for (let j3 = 0; j3 < numCol; j3++) {
53167
- output[outIndex * numCol + j3] /= end - start;
53169
+ for (let j2 = 0; j2 < numCol; j2++) {
53170
+ output[outIndex * numCol + j2] /= end - start;
53168
53171
  }
53169
53172
  }
53170
53173
  start = end;
@@ -53249,8 +53252,8 @@ function stridedSliceImpl(outShape, xBuf, strides, begin) {
53249
53252
  for (let i10 = 0; i10 < outBuf.size; i10++) {
53250
53253
  const loc = outBuf.indexToLoc(i10);
53251
53254
  const newLoc = new Array(loc.length);
53252
- for (let j3 = 0; j3 < newLoc.length; j3++) {
53253
- newLoc[j3] = loc[j3] * strides[j3] + begin[j3];
53255
+ for (let j2 = 0; j2 < newLoc.length; j2++) {
53256
+ newLoc[j2] = loc[j2] * strides[j2] + begin[j2];
53254
53257
  }
53255
53258
  outBuf.set(xBuf.get(...newLoc), ...loc);
53256
53259
  }
@@ -53455,9 +53458,9 @@ function stringSplitImpl(input2, delimiter, skipEmpty) {
53455
53458
  const shape = [batchSize, maxNumEntries];
53456
53459
  let c8 = 0;
53457
53460
  for (let i10 = 0; i10 < batchSize; ++i10) {
53458
- for (let j3 = 0; j3 < numIndices[i10]; ++j3) {
53461
+ for (let j2 = 0; j2 < numIndices[i10]; ++j2) {
53459
53462
  indices[c8 * 2] = i10;
53460
- indices[c8 * 2 + 1] = j3;
53463
+ indices[c8 * 2 + 1] = j2;
53461
53464
  values[c8] = tokens[c8];
53462
53465
  ++c8;
53463
53466
  }
@@ -53514,8 +53517,8 @@ function tileImpl(xBuf, reps) {
53514
53517
  for (let i10 = 0; i10 < result.values.length; ++i10) {
53515
53518
  const newLoc = result.indexToLoc(i10);
53516
53519
  const originalLoc = new Array(xBuf.rank);
53517
- for (let j3 = 0; j3 < originalLoc.length; j3++) {
53518
- originalLoc[j3] = newLoc[j3] % xBuf.shape[j3];
53520
+ for (let j2 = 0; j2 < originalLoc.length; j2++) {
53521
+ originalLoc[j2] = newLoc[j2] % xBuf.shape[j2];
53519
53522
  }
53520
53523
  const originalIndex = xBuf.locToIndex(originalLoc);
53521
53524
  result.values[i10] = xBuf.values[originalIndex];
@@ -53543,33 +53546,33 @@ function select(array2, k3, left = 0, right = array2.length - 1) {
53543
53546
  }
53544
53547
  const t8 = array2[k3];
53545
53548
  let i10 = left;
53546
- let j3 = right;
53549
+ let j2 = right;
53547
53550
  util_exports.swap(array2, left, k3);
53548
53551
  if (comparePair(array2[right], t8) > 0) {
53549
53552
  util_exports.swap(array2, left, right);
53550
53553
  }
53551
- while (i10 < j3) {
53552
- util_exports.swap(array2, i10, j3);
53554
+ while (i10 < j2) {
53555
+ util_exports.swap(array2, i10, j2);
53553
53556
  i10++;
53554
- j3--;
53557
+ j2--;
53555
53558
  while (comparePair(array2[i10], t8) < 0) {
53556
53559
  i10 = i10 + 1;
53557
53560
  }
53558
- while (comparePair(array2[j3], t8) > 0) {
53559
- j3 = j3 - 1;
53561
+ while (comparePair(array2[j2], t8) > 0) {
53562
+ j2 = j2 - 1;
53560
53563
  }
53561
53564
  }
53562
53565
  if (comparePair(array2[left], t8) === 0) {
53563
- util_exports.swap(array2, left, j3);
53566
+ util_exports.swap(array2, left, j2);
53564
53567
  } else {
53565
- j3 = j3 + 1;
53566
- util_exports.swap(array2, j3, right);
53568
+ j2 = j2 + 1;
53569
+ util_exports.swap(array2, j2, right);
53567
53570
  }
53568
- if (j3 <= k3) {
53569
- left = j3 + 1;
53571
+ if (j2 <= k3) {
53572
+ left = j2 + 1;
53570
53573
  }
53571
- if (k3 <= j3) {
53572
- right = j3 - 1;
53574
+ if (k3 <= j2) {
53575
+ right = j2 - 1;
53573
53576
  }
53574
53577
  }
53575
53578
  }
@@ -54020,7 +54023,7 @@ function batchMatMul(args) {
54020
54023
  for (let k02 = 0; k02 < sharedDim; k02 += blockSize) {
54021
54024
  const kBlock = Math.min(k02 + blockSize, sharedDim);
54022
54025
  for (let i10 = i0; i10 < iBlock; i10++) {
54023
- for (let j3 = j0; j3 < jBlock; j3++) {
54026
+ for (let j2 = j0; j2 < jBlock; j2++) {
54024
54027
  let sum5 = 0;
54025
54028
  for (let k3 = k02; k3 < kBlock; k3++) {
54026
54029
  const aVal = (
@@ -54029,11 +54032,11 @@ function batchMatMul(args) {
54029
54032
  );
54030
54033
  const bVal = (
54031
54034
  // tslint:disable-next-line: max-line-length
54032
- b3dValues[k3 * bInnerStep + j3 * bOuterStep + batchIndexB * bBatch]
54035
+ b3dValues[k3 * bInnerStep + j2 * bOuterStep + batchIndexB * bBatch]
54033
54036
  );
54034
54037
  sum5 += aVal * bVal;
54035
54038
  }
54036
- resVals[bi * size3 + (i10 * rightDim + j3)] += sum5;
54039
+ resVals[bi * size3 + (i10 * rightDim + j2)] += sum5;
54037
54040
  }
54038
54041
  }
54039
54042
  }
@@ -54139,8 +54142,8 @@ function addN2(args) {
54139
54142
  const outVals = outBuf.values;
54140
54143
  for (let i10 = 0; i10 < tensors.length; i10++) {
54141
54144
  const currVals = vals[i10];
54142
- for (let j3 = 0; j3 < outVals.length; j3++) {
54143
- outVals[j3] += currVals[j3];
54145
+ for (let j2 = 0; j2 < outVals.length; j2++) {
54146
+ outVals[j2] += currVals[j2];
54144
54147
  }
54145
54148
  }
54146
54149
  return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);
@@ -54180,8 +54183,8 @@ function all2(args) {
54180
54183
  for (let i10 = 0; i10 < vals.length; ++i10) {
54181
54184
  const offset3 = i10 * reduceSize;
54182
54185
  let all4 = aVals[offset3];
54183
- for (let j3 = 0; j3 < reduceSize; ++j3) {
54184
- const value = aVals[offset3 + j3];
54186
+ for (let j2 = 0; j2 < reduceSize; ++j2) {
54187
+ const value = aVals[offset3 + j2];
54185
54188
  all4 = all4 && value;
54186
54189
  }
54187
54190
  vals[i10] = all4;
@@ -54235,8 +54238,8 @@ function any2(args) {
54235
54238
  for (let i10 = 0; i10 < vals.length; ++i10) {
54236
54239
  const offset3 = i10 * reduceSize;
54237
54240
  let anyVal = aVals[offset3];
54238
- for (let j3 = 0; j3 < reduceSize; ++j3) {
54239
- const value = aVals[offset3 + j3];
54241
+ for (let j2 = 0; j2 < reduceSize; ++j2) {
54242
+ const value = aVals[offset3 + j2];
54240
54243
  anyVal = anyVal || value;
54241
54244
  }
54242
54245
  vals[i10] = anyVal;
@@ -54294,11 +54297,11 @@ function argMax2(args) {
54294
54297
  const offset3 = i10 * reduceSize;
54295
54298
  let max6 = aVals[offset3];
54296
54299
  let maxIndex = 0;
54297
- for (let j3 = 0; j3 < reduceSize; ++j3) {
54298
- const value = aVals[offset3 + j3];
54300
+ for (let j2 = 0; j2 < reduceSize; ++j2) {
54301
+ const value = aVals[offset3 + j2];
54299
54302
  if (value > max6) {
54300
54303
  max6 = value;
54301
- maxIndex = j3;
54304
+ maxIndex = j2;
54302
54305
  }
54303
54306
  }
54304
54307
  vals[i10] = maxIndex;
@@ -54346,11 +54349,11 @@ function argMin2(args) {
54346
54349
  const offset3 = i10 * reduceSize;
54347
54350
  let min6 = aVals[offset3];
54348
54351
  let minIndex = 0;
54349
- for (let j3 = 0; j3 < reduceSize; ++j3) {
54350
- const value = aVals[offset3 + j3];
54352
+ for (let j2 = 0; j2 < reduceSize; ++j2) {
54353
+ const value = aVals[offset3 + j2];
54351
54354
  if (value < min6) {
54352
54355
  min6 = value;
54353
- minIndex = j3;
54356
+ minIndex = j2;
54354
54357
  }
54355
54358
  }
54356
54359
  vals[i10] = minIndex;
@@ -55780,14 +55783,14 @@ function cumprod2(args) {
55780
55783
  const vals = util_exports.makeOnesTypedArray(util_exports.sizeFromShape($x.shape), resultDtype);
55781
55784
  const aVals = backend2.data.get($x.dataId).values;
55782
55785
  const finalDim = $x.shape[$x.shape.length - 1];
55783
- const indexAdjuster = reverse4 ? (i10, j3) => i10 + finalDim - j3 - 1 : (i10, j3) => i10 + j3;
55786
+ const indexAdjuster = reverse4 ? (i10, j2) => i10 + finalDim - j2 - 1 : (i10, j2) => i10 + j2;
55784
55787
  for (let i10 = 0; i10 < aVals.length; i10 += finalDim) {
55785
- for (let j3 = 0; j3 < finalDim; j3++) {
55786
- const idx = indexAdjuster(i10, j3);
55787
- if (j3 === 0) {
55788
+ for (let j2 = 0; j2 < finalDim; j2++) {
55789
+ const idx = indexAdjuster(i10, j2);
55790
+ if (j2 === 0) {
55788
55791
  vals[idx] = exclusive ? 1 : aVals[idx];
55789
55792
  } else {
55790
- const prevIdx = indexAdjuster(i10, j3 - 1);
55793
+ const prevIdx = indexAdjuster(i10, j2 - 1);
55791
55794
  vals[idx] = exclusive ? aVals[prevIdx] * vals[prevIdx] : aVals[idx] * vals[prevIdx];
55792
55795
  }
55793
55796
  }
@@ -55835,14 +55838,14 @@ function cumsum2(args) {
55835
55838
  const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape($x.shape), resultDtype);
55836
55839
  const aVals = backend2.data.get($x.dataId).values;
55837
55840
  const finalDim = $x.shape[$x.shape.length - 1];
55838
- const indexAdjuster = reverse4 ? (i10, j3) => i10 + finalDim - j3 - 1 : (i10, j3) => i10 + j3;
55841
+ const indexAdjuster = reverse4 ? (i10, j2) => i10 + finalDim - j2 - 1 : (i10, j2) => i10 + j2;
55839
55842
  for (let i10 = 0; i10 < aVals.length; i10 += finalDim) {
55840
- for (let j3 = 0; j3 < finalDim; j3++) {
55841
- const idx = indexAdjuster(i10, j3);
55842
- if (j3 === 0) {
55843
+ for (let j2 = 0; j2 < finalDim; j2++) {
55844
+ const idx = indexAdjuster(i10, j2);
55845
+ if (j2 === 0) {
55843
55846
  vals[idx] = exclusive ? 0 : aVals[idx];
55844
55847
  } else {
55845
- const prevIdx = indexAdjuster(i10, j3 - 1);
55848
+ const prevIdx = indexAdjuster(i10, j2 - 1);
55846
55849
  vals[idx] = exclusive ? aVals[prevIdx] + vals[prevIdx] : aVals[idx] + vals[prevIdx];
55847
55850
  }
55848
55851
  }
@@ -56402,11 +56405,11 @@ function draw2(args) {
56402
56405
  rgba[d4] = value * multiplier;
56403
56406
  }
56404
56407
  }
56405
- const j3 = i10 * 4;
56406
- bytes[j3 + 0] = Math.round(rgba[0]);
56407
- bytes[j3 + 1] = Math.round(rgba[1]);
56408
- bytes[j3 + 2] = Math.round(rgba[2]);
56409
- bytes[j3 + 3] = Math.round(rgba[3]);
56408
+ const j2 = i10 * 4;
56409
+ bytes[j2 + 0] = Math.round(rgba[0]);
56410
+ bytes[j2 + 1] = Math.round(rgba[1]);
56411
+ bytes[j2 + 2] = Math.round(rgba[2]);
56412
+ bytes[j2 + 3] = Math.round(rgba[3]);
56410
56413
  }
56411
56414
  canvas.width = width;
56412
56415
  canvas.height = height;
@@ -56457,8 +56460,8 @@ function sum3(args) {
56457
56460
  for (let i10 = 0; i10 < vals.length; ++i10) {
56458
56461
  const offset3 = i10 * reduceSize;
56459
56462
  let sum5 = 0;
56460
- for (let j3 = 0; j3 < reduceSize; ++j3) {
56461
- sum5 += aVals[offset3 + j3];
56463
+ for (let j2 = 0; j2 < reduceSize; ++j2) {
56464
+ sum5 += aVals[offset3 + j2];
56462
56465
  }
56463
56466
  vals[i10] = sum5;
56464
56467
  }
@@ -57770,8 +57773,8 @@ function min4(args) {
57770
57773
  for (let i10 = 0; i10 < vals.length; ++i10) {
57771
57774
  const offset3 = i10 * reduceSize;
57772
57775
  let min6 = aVals[offset3];
57773
- for (let j3 = 0; j3 < reduceSize; ++j3) {
57774
- const value = aVals[offset3 + j3];
57776
+ for (let j2 = 0; j2 < reduceSize; ++j2) {
57777
+ const value = aVals[offset3 + j2];
57775
57778
  if (Number.isNaN(value) || value < min6) {
57776
57779
  min6 = value;
57777
57780
  }
@@ -58769,12 +58772,12 @@ var init_RotateWithOffset = __esm({
58769
58772
  });
58770
58773
 
58771
58774
  // node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Round.js
58772
- var round4, roundConfig;
58775
+ var round5, roundConfig;
58773
58776
  var init_Round = __esm({
58774
58777
  "node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Round.js"() {
58775
58778
  init_dist();
58776
58779
  init_unary_utils();
58777
- round4 = unaryKernelFunc(Round, (xi) => {
58780
+ round5 = unaryKernelFunc(Round, (xi) => {
58778
58781
  const base = Math.floor(xi);
58779
58782
  if (xi - base < 0.5) {
58780
58783
  return Math.floor(xi);
@@ -58791,7 +58794,7 @@ var init_Round = __esm({
58791
58794
  roundConfig = {
58792
58795
  kernelName: Round,
58793
58796
  backendName: "cpu",
58794
- kernelFunc: round4
58797
+ kernelFunc: round5
58795
58798
  };
58796
58799
  }
58797
58800
  });
@@ -58904,7 +58907,7 @@ function select2(args) {
58904
58907
  let index = 0;
58905
58908
  const offset3 = conditionRank === 0 || conditionRank > 1 || t8.shape.length === 1 ? 1 : util_exports.sizeFromShape(t8.shape.slice(1));
58906
58909
  for (let i10 = 0; i10 < values.length; i10++) {
58907
- for (let j3 = 0; j3 < offset3; j3++) {
58910
+ for (let j2 = 0; j2 < offset3; j2++) {
58908
58911
  if (values[i10] === 1) {
58909
58912
  newValues[index++] = tValues[i10];
58910
58913
  } else {
@@ -63961,8 +63964,8 @@ var init_gpgpu_context = __esm({
63961
63964
  }
63962
63965
  }
63963
63966
  pollFence(fenceContext) {
63964
- return new Promise((resolve) => {
63965
- this.addItemToPoll(() => fenceContext.isFencePassed(), () => resolve());
63967
+ return new Promise((resolve2) => {
63968
+ this.addItemToPoll(() => fenceContext.isFencePassed(), () => resolve2());
63966
63969
  });
63967
63970
  }
63968
63971
  pollItems() {
@@ -64785,7 +64788,7 @@ var init_backend_webgl = __esm({
64785
64788
  async read(dataId) {
64786
64789
  if (this.pendingRead.has(dataId)) {
64787
64790
  const subscribers2 = this.pendingRead.get(dataId);
64788
- return new Promise((resolve) => subscribers2.push(resolve));
64791
+ return new Promise((resolve2) => subscribers2.push(resolve2));
64789
64792
  }
64790
64793
  const texData = this.texData.get(dataId);
64791
64794
  const { values, shape, slice: slice4, dtype, complexTensorInfos, isPacked } = texData;
@@ -64845,7 +64848,7 @@ var init_backend_webgl = __esm({
64845
64848
  const dTypeVals = this.convertAndCacheOnCPU(dataId, vals);
64846
64849
  const subscribers = this.pendingRead.get(dataId);
64847
64850
  this.pendingRead.delete(dataId);
64848
- subscribers.forEach((resolve) => resolve(dTypeVals));
64851
+ subscribers.forEach((resolve2) => resolve2(dTypeVals));
64849
64852
  if (this.pendingDisposal.has(dataId)) {
64850
64853
  this.pendingDisposal.delete(dataId);
64851
64854
  if (this.disposeData(dataId)) {
@@ -65420,10 +65423,10 @@ var init_backend_webgl = __esm({
65420
65423
  return Promise.all(ps);
65421
65424
  } else {
65422
65425
  for (const [, binary] of Object.entries(this.binaryCache)) {
65423
- const p6 = new Promise((resolve) => {
65426
+ const p6 = new Promise((resolve2) => {
65424
65427
  try {
65425
65428
  this.checkCompletion_(binary);
65426
- resolve(true);
65429
+ resolve2(true);
65427
65430
  } catch (error) {
65428
65431
  throw error;
65429
65432
  }
@@ -72570,12 +72573,12 @@ var init_gather_nd_gpu = __esm({
72570
72573
  const dtype = getCoordsDataType(shape.length);
72571
72574
  let mainLoop = `
72572
72575
  int index;`;
72573
- for (let j3 = 0; j3 < this.sliceDim; j3++) {
72576
+ for (let j2 = 0; j2 < this.sliceDim; j2++) {
72574
72577
  mainLoop += `
72575
- index = round(getIndices(coords[0], ${j3}));
72578
+ index = round(getIndices(coords[0], ${j2}));
72576
72579
  out_of_bounds = out_of_bounds || index < 0;
72577
- out_of_bounds = out_of_bounds || index >= ${this.paramsShape[j3]};
72578
- flattenIndex += index * ${this.strides[j3]};`;
72580
+ out_of_bounds = out_of_bounds || index >= ${this.paramsShape[j2]};
72581
+ flattenIndex += index * ${this.strides[j2]};`;
72579
72582
  }
72580
72583
  this.userCode = `
72581
72584
  void main() {
@@ -74635,7 +74638,7 @@ var init_pad_packed_gpu = __esm({
74635
74638
  ];
74636
74639
  const paddingArea = rank === 1 ? "rc < start || rc >= end" : "any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))";
74637
74640
  let mainLoop = "";
74638
- for (let i10 = 0, j3 = rank === 1 ? 2 : 4; i10 < j3; i10++) {
74641
+ for (let i10 = 0, j2 = rank === 1 ? 2 : 4; i10 < j2; i10++) {
74639
74642
  mainLoop += `
74640
74643
  ${componentSetup[i10]}
74641
74644
  if (${paddingArea}) {
@@ -75796,7 +75799,7 @@ var init_RotateWithOffset2 = __esm({
75796
75799
  });
75797
75800
 
75798
75801
  // node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Round.js
75799
- var ROUND, round5, roundConfig2;
75802
+ var ROUND, round6, roundConfig2;
75800
75803
  var init_Round2 = __esm({
75801
75804
  "node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Round.js"() {
75802
75805
  init_dist();
@@ -75817,11 +75820,11 @@ var init_Round2 = __esm({
75817
75820
  }
75818
75821
  }
75819
75822
  `;
75820
- round5 = unaryKernelFunc2({ opSnippet: ROUND });
75823
+ round6 = unaryKernelFunc2({ opSnippet: ROUND });
75821
75824
  roundConfig2 = {
75822
75825
  kernelName: Round,
75823
75826
  backendName: "webgl",
75824
- kernelFunc: round5
75827
+ kernelFunc: round6
75825
75828
  };
75826
75829
  }
75827
75830
  });
@@ -78473,7 +78476,7 @@ __export(dist_exports4, {
78473
78476
  reverse3d: () => reverse3d,
78474
78477
  reverse4d: () => reverse4d,
78475
78478
  rfft: () => rfft,
78476
- round: () => round3,
78479
+ round: () => round4,
78477
78480
  rsqrt: () => rsqrt,
78478
78481
  scalar: () => scalar,
78479
78482
  scatterND: () => scatterND,
@@ -78638,6 +78641,7 @@ var init_ar = __esm({
78638
78641
  "s32f2fa78e3267c4e": `\u0627\u0644\u062E\u0635\u0627\u0626\u0635 \u0641\u0642\u0637`,
78639
78642
  "s334f9922638204ab": `\u0645\u062C\u0645\u0648\u0639\u0629 \u0627\u0644\u0628\u064A\u0627\u0646\u0627\u062A \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645\u0629`,
78640
78643
  "s34af392b321cbfa6": `\u062A\u062D\u0631\u064A\u0631 \u0643\u0644 \u0634\u064A\u0621`,
78644
+ "s38c7b3d048d88c07": `\u062D\u0630\u0641 \u0627\u0644\u0645\u062D\u062F\u062F`,
78641
78645
  "s38ddf839c081bbaf": str`
78642
78646
  ${0} الضباب
78643
78647
  `,
@@ -78797,6 +78801,7 @@ var init_bg = __esm({
78797
78801
  "s32f2fa78e3267c4e": `\u0441\u0430\u043C\u043E \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430`,
78798
78802
  "s334f9922638204ab": `\u0418\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u043D\u0435 \u043D\u0430 \u043D\u0430\u0431\u043E\u0440 \u043E\u0442 \u0434\u0430\u043D\u043D\u0438`,
78799
78803
  "s34af392b321cbfa6": `\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u0432\u0441\u0438\u0447\u043A\u043E`,
78804
+ "s38c7b3d048d88c07": `\u0418\u0437\u0442\u0440\u0438\u0439 \u0438\u0437\u0431\u0440\u0430\u043D\u043E\u0442\u043E`,
78800
78805
  "s38ddf839c081bbaf": str`
78801
78806
  ${0} th измерение
78802
78807
  `,
@@ -78955,6 +78960,7 @@ var init_cs = __esm({
78955
78960
  "s32f2fa78e3267c4e": `pouze vlastnosti`,
78956
78961
  "s334f9922638204ab": `Dataset pou\u017E\xEDvaj\xEDc\xED`,
78957
78962
  "s34af392b321cbfa6": `upravit v\u0161e`,
78963
+ "s38c7b3d048d88c07": `Odstranit vybran\xE9`,
78958
78964
  "s38ddf839c081bbaf": str`
78959
78965
  ${0} th dim
78960
78966
  `,
@@ -79114,6 +79120,7 @@ var init_da = __esm({
79114
79120
  "s32f2fa78e3267c4e": `kun egenskaber`,
79115
79121
  "s334f9922638204ab": `Dataset ved hj\xE6lp af`,
79116
79122
  "s34af392b321cbfa6": `rediger alt`,
79123
+ "s38c7b3d048d88c07": `Slet det valgte`,
79117
79124
  "s38ddf839c081bbaf": str`
79118
79125
  ${0} th dim
79119
79126
  `,
@@ -79272,6 +79279,7 @@ var init_de = __esm({
79272
79279
  "s32f2fa78e3267c4e": `nur Eigenschaften`,
79273
79280
  "s334f9922638204ab": `Datensatz unter Verwendung von`,
79274
79281
  "s34af392b321cbfa6": `alles bearbeiten`,
79282
+ "s38c7b3d048d88c07": `Ausgew\xE4hltes l\xF6schen`,
79275
79283
  "s38ddf839c081bbaf": str`
79276
79284
  ${0} Dim.
79277
79285
  `,
@@ -79430,6 +79438,7 @@ var init_el = __esm({
79430
79438
  "s32f2fa78e3267c4e": `\u03B9\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2 \u03BC\u03CC\u03BD\u03BF`,
79431
79439
  "s334f9922638204ab": `\u03A7\u03C1\u03AE\u03C3\u03B7 \u03C3\u03C5\u03BD\u03CC\u03BB\u03BF\u03C5 \u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD`,
79432
79440
  "s34af392b321cbfa6": `\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03CC\u03BB\u03C9\u03BD`,
79441
+ "s38c7b3d048d88c07": `\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03C9\u03BD`,
79433
79442
  "s38ddf839c081bbaf": str`
79434
79443
  ${0} η διάσταση
79435
79444
  `,
@@ -79590,6 +79599,7 @@ var init_es = __esm({
79590
79599
  "s32f2fa78e3267c4e": `solo propiedades`,
79591
79600
  "s334f9922638204ab": `Conjunto de datos utilizando`,
79592
79601
  "s34af392b321cbfa6": `editar todo`,
79602
+ "s38c7b3d048d88c07": `Eliminar los elementos seleccionados`,
79593
79603
  "s38ddf839c081bbaf": str`
79594
79604
  ${0} la dimensión
79595
79605
  `,
@@ -79749,6 +79759,7 @@ var init_et = __esm({
79749
79759
  "s32f2fa78e3267c4e": `ainult omadused`,
79750
79760
  "s334f9922638204ab": `Andmekogum kasutades`,
79751
79761
  "s34af392b321cbfa6": `k\xF5ike muuta`,
79762
+ "s38c7b3d048d88c07": `Kustuta valitud`,
79752
79763
  "s38ddf839c081bbaf": str`
79753
79764
  ${0} th dim
79754
79765
  `,
@@ -79908,6 +79919,7 @@ var init_fi = __esm({
79908
79919
  "s32f2fa78e3267c4e": `vain ominaisuudet`,
79909
79920
  "s334f9922638204ab": `K\xE4ytt\xE4m\xE4si tietojoukko`,
79910
79921
  "s34af392b321cbfa6": `muokkaa kaikkea`,
79922
+ "s38c7b3d048d88c07": `Poista valitut`,
79911
79923
  "s38ddf839c081bbaf": str`
79912
79924
  ${0} th dim
79913
79925
  `,
@@ -80066,6 +80078,7 @@ var init_fr = __esm({
80066
80078
  "s32f2fa78e3267c4e": `propri\xE9t\xE9s uniquement`,
80067
80079
  "s334f9922638204ab": `Ensemble de donn\xE9es utilisant`,
80068
80080
  "s34af392b321cbfa6": `modifier tout`,
80081
+ "s38c7b3d048d88c07": `Supprimer la s\xE9lection`,
80069
80082
  "s38ddf839c081bbaf": str`
80070
80083
  ${0} th dim
80071
80084
  `,
@@ -80225,6 +80238,7 @@ var init_hu = __esm({
80225
80238
  "s32f2fa78e3267c4e": `csak tulajdons\xE1gok`,
80226
80239
  "s334f9922638204ab": `Adatk\xE9szlet haszn\xE1lata`,
80227
80240
  "s34af392b321cbfa6": `mindent szerkeszteni`,
80241
+ "s38c7b3d048d88c07": `A kijel\xF6ltek t\xF6rl\xE9se`,
80228
80242
  "s38ddf839c081bbaf": str`
80229
80243
  ${0} th dim
80230
80244
  `,
@@ -80383,6 +80397,7 @@ var init_id = __esm({
80383
80397
  "s32f2fa78e3267c4e": `hanya properti`,
80384
80398
  "s334f9922638204ab": `Dataset yang menggunakan`,
80385
80399
  "s34af392b321cbfa6": `edit semuanya`,
80400
+ "s38c7b3d048d88c07": `Hapus yang dipilih`,
80386
80401
  "s38ddf839c081bbaf": str`
80387
80402
  ${0} dimensi ke-th
80388
80403
  `,
@@ -80542,6 +80557,7 @@ var init_it = __esm({
80542
80557
  "s32f2fa78e3267c4e": `solo propriet\xE0`,
80543
80558
  "s334f9922638204ab": `Set di dati utilizzando`,
80544
80559
  "s34af392b321cbfa6": `modifica tutto`,
80560
+ "s38c7b3d048d88c07": `Elimina selezionati`,
80545
80561
  "s38ddf839c081bbaf": str`
80546
80562
  ${0} la dimensione
80547
80563
  `,
@@ -80701,6 +80717,7 @@ var init_ja = __esm({
80701
80717
  "s32f2fa78e3267c4e": `\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u307F`,
80702
80718
  "s334f9922638204ab": `\u4F7F\u7528\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8`,
80703
80719
  "s34af392b321cbfa6": `\u3059\u3079\u3066\u3092\u7DE8\u96C6\u3059\u308B`,
80720
+ "s38c7b3d048d88c07": `\u9078\u629E\u3057\u305F\u9805\u76EE\u3092\u524A\u9664`,
80704
80721
  "s38ddf839c081bbaf": str`
80705
80722
  ${0} 第
80706
80723
  `,
@@ -80859,6 +80876,7 @@ var init_ko = __esm({
80859
80876
  "s32f2fa78e3267c4e": `\uC18D\uC131\uB9CC`,
80860
80877
  "s334f9922638204ab": `\uB370\uC774\uD130\uC14B \uC0AC\uC6A9`,
80861
80878
  "s34af392b321cbfa6": `\uBAA8\uB4E0 \uAC83\uC744 \uC218\uC815\uD558\uB2E4`,
80879
+ "s38c7b3d048d88c07": `\uC120\uD0DD\uD55C \uD56D\uBAA9 \uC0AD\uC81C`,
80862
80880
  "s38ddf839c081bbaf": str`
80863
80881
  ${0} th 차원
80864
80882
  `,
@@ -81017,6 +81035,7 @@ var init_lt = __esm({
81017
81035
  "s32f2fa78e3267c4e": `tik savyb\u0117s`,
81018
81036
  "s334f9922638204ab": `Duomen\u0173 rinkinys, naudojantis`,
81019
81037
  "s34af392b321cbfa6": `redaguoti visk\u0105`,
81038
+ "s38c7b3d048d88c07": `I\u0161trinti pa\u017Eym\u0117tus`,
81020
81039
  "s38ddf839c081bbaf": str`
81021
81040
  ${0} th dim
81022
81041
  `,
@@ -81175,6 +81194,7 @@ var init_lv = __esm({
81175
81194
  "s32f2fa78e3267c4e": `tikai \u012Bpa\u0161\u012Bbas`,
81176
81195
  "s334f9922638204ab": `Datu kopa, izmantojot`,
81177
81196
  "s34af392b321cbfa6": `redi\u0123\u0113t visu`,
81197
+ "s38c7b3d048d88c07": `Dz\u0113st atlas\u012Bto`,
81178
81198
  "s38ddf839c081bbaf": str`
81179
81199
  ${0} th dim
81180
81200
  `,
@@ -81333,6 +81353,7 @@ var init_nb = __esm({
81333
81353
  "s32f2fa78e3267c4e": `egenskaper kun`,
81334
81354
  "s334f9922638204ab": `Dataset ved bruk av`,
81335
81355
  "s34af392b321cbfa6": `rediger alt`,
81356
+ "s38c7b3d048d88c07": `Slett det valgte`,
81336
81357
  "s38ddf839c081bbaf": str`
81337
81358
  ${0} th dim
81338
81359
  `,
@@ -81491,6 +81512,7 @@ var init_nl = __esm({
81491
81512
  "s32f2fa78e3267c4e": `alleen eigenschappen`,
81492
81513
  "s334f9922638204ab": `Gebruikte dataset`,
81493
81514
  "s34af392b321cbfa6": `alles bewerken`,
81515
+ "s38c7b3d048d88c07": `Geselecteerde items verwijderen`,
81494
81516
  "s38ddf839c081bbaf": str`
81495
81517
  ${0} th dim
81496
81518
  `,
@@ -81649,6 +81671,7 @@ var init_pl = __esm({
81649
81671
  "s32f2fa78e3267c4e": `tylko w\u0142a\u015Bciwo\u015Bci`,
81650
81672
  "s334f9922638204ab": `Zbi\xF3r danych wykorzystuj\u0105cy`,
81651
81673
  "s34af392b321cbfa6": `edytuj wszystko`,
81674
+ "s38c7b3d048d88c07": `Usu\u0144 zaznaczone`,
81652
81675
  "s38ddf839c081bbaf": str`
81653
81676
  ${0} th dim
81654
81677
  `,
@@ -81808,6 +81831,7 @@ var init_pt_BR = __esm({
81808
81831
  "s32f2fa78e3267c4e": `apenas propriedades`,
81809
81832
  "s334f9922638204ab": `Conjunto de dados utilizando`,
81810
81833
  "s34af392b321cbfa6": `editar tudo`,
81834
+ "s38c7b3d048d88c07": `Excluir os itens selecionados`,
81811
81835
  "s38ddf839c081bbaf": str`
81812
81836
  ${0} a dimensão
81813
81837
  `,
@@ -81967,6 +81991,7 @@ var init_pt_PT = __esm({
81967
81991
  "s32f2fa78e3267c4e": `apenas propriedades`,
81968
81992
  "s334f9922638204ab": `Conjunto de dados utilizando`,
81969
81993
  "s34af392b321cbfa6": `editar tudo`,
81994
+ "s38c7b3d048d88c07": `Apagar os elementos selecionados`,
81970
81995
  "s38ddf839c081bbaf": str`
81971
81996
  ${0} a dimensão
81972
81997
  `,
@@ -82126,6 +82151,7 @@ var init_ro = __esm({
82126
82151
  "s32f2fa78e3267c4e": `numai propriet\u0103\u021Bi`,
82127
82152
  "s334f9922638204ab": `Set de date utilizat`,
82128
82153
  "s34af392b321cbfa6": `editeaz\u0103 totul`,
82154
+ "s38c7b3d048d88c07": `\u0218terge elementele selectate`,
82129
82155
  "s38ddf839c081bbaf": str`
82130
82156
  ${0} dim
82131
82157
  `,
@@ -82285,6 +82311,7 @@ var init_ru = __esm({
82285
82311
  "s32f2fa78e3267c4e": `\u0442\u043E\u043B\u044C\u043A\u043E \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430`,
82286
82312
  "s334f9922638204ab": `\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435 \u043D\u0430\u0431\u043E\u0440\u0430 \u0434\u0430\u043D\u043D\u044B\u0445`,
82287
82313
  "s34af392b321cbfa6": `\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435`,
82314
+ "s38c7b3d048d88c07": `\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0435`,
82288
82315
  "s38ddf839c081bbaf": str`
82289
82316
  ${0} th измерение
82290
82317
  `,
@@ -82444,6 +82471,7 @@ var init_sk = __esm({
82444
82471
  "s32f2fa78e3267c4e": `len vlastnosti`,
82445
82472
  "s334f9922638204ab": `Dataset pou\u017E\xEDvaj\xFAci`,
82446
82473
  "s34af392b321cbfa6": `upravi\u0165 v\u0161etko`,
82474
+ "s38c7b3d048d88c07": `Odstr\xE1ni\u0165 vybran\xE9`,
82447
82475
  "s38ddf839c081bbaf": str`
82448
82476
  ${0} th dim
82449
82477
  `,
@@ -82603,6 +82631,7 @@ var init_sl = __esm({
82603
82631
  "s32f2fa78e3267c4e": `samo lastnosti`,
82604
82632
  "s334f9922638204ab": `Podatkovna zbirka, ki uporablja`,
82605
82633
  "s34af392b321cbfa6": `uredi vse`,
82634
+ "s38c7b3d048d88c07": `Izbri\u0161i izbrano`,
82606
82635
  "s38ddf839c081bbaf": str`
82607
82636
  ${0} th dim
82608
82637
  `,
@@ -82762,6 +82791,7 @@ var init_sv = __esm({
82762
82791
  "s32f2fa78e3267c4e": `endast egenskaper`,
82763
82792
  "s334f9922638204ab": `Dataset som anv\xE4nder`,
82764
82793
  "s34af392b321cbfa6": `redigera allt`,
82794
+ "s38c7b3d048d88c07": `Ta bort det markerade`,
82765
82795
  "s38ddf839c081bbaf": str`
82766
82796
  ${0} th dim
82767
82797
  `,
@@ -82920,6 +82950,7 @@ var init_tr = __esm({
82920
82950
  "s32f2fa78e3267c4e": `sadece \xF6zellikler`,
82921
82951
  "s334f9922638204ab": `Kullan\u0131lan veri k\xFCmesi`,
82922
82952
  "s34af392b321cbfa6": `her \u015Feyi d\xFCzenle`,
82953
+ "s38c7b3d048d88c07": `Se\xE7ilenleri sil`,
82923
82954
  "s38ddf839c081bbaf": str`
82924
82955
  ${0} th dim
82925
82956
  `,
@@ -83078,6 +83109,7 @@ var init_uk = __esm({
83078
83109
  "s32f2fa78e3267c4e": `\u0442\u0456\u043B\u044C\u043A\u0438 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456`,
83079
83110
  "s334f9922638204ab": `\u041D\u0430\u0431\u0456\u0440 \u0434\u0430\u043D\u0438\u0445, \u0449\u043E \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0454\u0442\u044C\u0441\u044F`,
83080
83111
  "s34af392b321cbfa6": `\u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0435`,
83112
+ "s38c7b3d048d88c07": `\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043D\u0435`,
83081
83113
  "s38ddf839c081bbaf": str`
83082
83114
  ${0} th dim
83083
83115
  `,
@@ -83287,6 +83319,7 @@ var init_zh_hans = __esm({
83287
83319
  "s6c5b5757b7756775": `Center View`,
83288
83320
  "s22fde937cb709859": `Zoom In`,
83289
83321
  "sb05582ce916894da": `Zoom Out`,
83322
+ "s38c7b3d048d88c07": `Delete selected`,
83290
83323
  "sdab07807ff1b6b12": `Model Design Widget hidden from students.`,
83291
83324
  "s026fba1543d336b2": `Feature Source`,
83292
83325
  "s32f2fa78e3267c4e": `properties only`,
@@ -83428,6 +83461,7 @@ var init_zh_hant = __esm({
83428
83461
  "s6c5b5757b7756775": `Center View`,
83429
83462
  "s22fde937cb709859": `Zoom In`,
83430
83463
  "sb05582ce916894da": `Zoom Out`,
83464
+ "s38c7b3d048d88c07": `Delete selected`,
83431
83465
  "sdab07807ff1b6b12": `Model Design Widget hidden from students.`,
83432
83466
  "s026fba1543d336b2": `Feature Source`,
83433
83467
  "s32f2fa78e3267c4e": `properties only`,
@@ -83786,13 +83820,13 @@ var N = (t8, i10) => {
83786
83820
  }
83787
83821
  return [V(t8, l7 + (t8[s7] || "<?>") + (2 === i10 ? "</svg>" : 3 === i10 ? "</math>" : "")), e12];
83788
83822
  };
83789
- var S2 = class _S {
83823
+ var S2 = class _S2 {
83790
83824
  constructor({ strings: t8, _$litType$: i10 }, e12) {
83791
83825
  let r11;
83792
83826
  this.parts = [];
83793
83827
  let l7 = 0, a6 = 0;
83794
83828
  const u5 = t8.length - 1, d4 = this.parts, [f5, v3] = N(t8, i10);
83795
- if (this.el = _S.createElement(f5, e12), P.currentNode = this.el.content, 2 === i10 || 3 === i10) {
83829
+ if (this.el = _S2.createElement(f5, e12), P.currentNode = this.el.content, 2 === i10 || 3 === i10) {
83796
83830
  const t9 = this.el.content.firstChild;
83797
83831
  t9.replaceWith(...t9.childNodes);
83798
83832
  }
@@ -83857,7 +83891,7 @@ var R = class {
83857
83891
  for (const s7 of this._$AV) void 0 !== s7 && (void 0 !== s7.strings ? (s7._$AI(t8, s7, i10), i10 += s7.strings.length - 2) : s7._$AI(t8[i10])), i10++;
83858
83892
  }
83859
83893
  };
83860
- var k = class _k {
83894
+ var k = class _k2 {
83861
83895
  get _$AU() {
83862
83896
  return this._$AM?._$AU ?? this._$Cv;
83863
83897
  }
@@ -83903,7 +83937,7 @@ var k = class _k {
83903
83937
  u2(this._$AH) || (this._$AH = [], this._$AR());
83904
83938
  const i10 = this._$AH;
83905
83939
  let s7, e12 = 0;
83906
- for (const h7 of t8) e12 === i10.length ? i10.push(s7 = new _k(this.O(c3()), this.O(c3()), this, this.options)) : s7 = i10[e12], s7._$AI(h7), e12++;
83940
+ for (const h7 of t8) e12 === i10.length ? i10.push(s7 = new _k2(this.O(c3()), this.O(c3()), this, this.options)) : s7 = i10[e12], s7._$AI(h7), e12++;
83907
83941
  e12 < i10.length && (this._$AR(s7 && s7._$AB.nextSibling, e12), i10.length = e12);
83908
83942
  }
83909
83943
  _$AR(t8 = this._$AA.nextSibling, s7) {
@@ -83983,7 +84017,7 @@ var Z = class {
83983
84017
  };
83984
84018
  var j = { M: h2, P: o3, A: n3, C: 1, L: N, R, D: d2, V: M, I: k, H, N: L, U: z, B: I, F: Z };
83985
84019
  var B = t2.litHtmlPolyfillSupport;
83986
- B?.(S2, k), (t2.litHtmlVersions ??= []).push("3.3.2");
84020
+ B?.(S2, k), (t2.litHtmlVersions ??= []).push("3.3.3");
83987
84021
  var D = (t8, i10, s7) => {
83988
84022
  const e12 = s7?.renderBefore ?? i10;
83989
84023
  let h7 = e12._$litPart$;
@@ -84109,10 +84143,10 @@ var __yieldStar = (value) => {
84109
84143
  isAwait = true;
84110
84144
  return {
84111
84145
  done: false,
84112
- value: new __await(new Promise((resolve) => {
84146
+ value: new __await(new Promise((resolve2) => {
84113
84147
  var x3 = obj[k3](v3);
84114
84148
  if (!(x3 instanceof Object)) __typeError("Object expected");
84115
- resolve(x3);
84149
+ resolve2(x3);
84116
84150
  }), 1)
84117
84151
  };
84118
84152
  };
@@ -84479,9 +84513,14 @@ var LocalizeController = class {
84479
84513
  }
84480
84514
  getTranslationData(lang) {
84481
84515
  var _a2, _b;
84482
- const locale = new Intl.Locale(lang.replace(/_/g, "-"));
84483
- const language = locale === null || locale === void 0 ? void 0 : locale.language.toLowerCase();
84484
- const region = (_b = (_a2 = locale === null || locale === void 0 ? void 0 : locale.region) === null || _a2 === void 0 ? void 0 : _a2.toLowerCase()) !== null && _b !== void 0 ? _b : "";
84516
+ let locale;
84517
+ try {
84518
+ locale = new Intl.Locale(lang.replace(/_/g, "-"));
84519
+ } catch (_c) {
84520
+ return { locale: void 0, language: "", region: "", primary: void 0, secondary: void 0 };
84521
+ }
84522
+ const language = locale.language.toLowerCase();
84523
+ const region = (_b = (_a2 = locale.region) === null || _a2 === void 0 ? void 0 : _a2.toLowerCase()) !== null && _b !== void 0 ? _b : "";
84485
84524
  const primary = translations.get(`${language}-${region}`);
84486
84525
  const secondary = translations.get(language);
84487
84526
  return { locale, language, region, primary, secondary };
@@ -88097,10 +88136,6 @@ var oppositeSideMap = {
88097
88136
  bottom: "top",
88098
88137
  top: "bottom"
88099
88138
  };
88100
- var oppositeAlignmentMap = {
88101
- start: "end",
88102
- end: "start"
88103
- };
88104
88139
  function clamp(start, value, end) {
88105
88140
  return max(start, min(value, end));
88106
88141
  }
@@ -88119,9 +88154,9 @@ function getOppositeAxis(axis) {
88119
88154
  function getAxisLength(axis) {
88120
88155
  return axis === "y" ? "height" : "width";
88121
88156
  }
88122
- var yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
88123
88157
  function getSideAxis(placement) {
88124
- return yAxisSides.has(getSide(placement)) ? "y" : "x";
88158
+ const firstChar = placement[0];
88159
+ return firstChar === "t" || firstChar === "b" ? "y" : "x";
88125
88160
  }
88126
88161
  function getAlignmentAxis(placement) {
88127
88162
  return getOppositeAxis(getSideAxis(placement));
@@ -88144,7 +88179,7 @@ function getExpandedPlacements(placement) {
88144
88179
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
88145
88180
  }
88146
88181
  function getOppositeAlignmentPlacement(placement) {
88147
- return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
88182
+ return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
88148
88183
  }
88149
88184
  var lrPlacement = ["left", "right"];
88150
88185
  var rlPlacement = ["right", "left"];
@@ -88175,7 +88210,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
88175
88210
  return list;
88176
88211
  }
88177
88212
  function getOppositePlacement(placement) {
88178
- return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
88213
+ const side = getSide(placement);
88214
+ return oppositeSideMap[side] + placement.slice(side.length);
88179
88215
  }
88180
88216
  function expandPaddingObject(padding) {
88181
88217
  return {
@@ -88269,6 +88305,63 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
88269
88305
  }
88270
88306
  return coords2;
88271
88307
  }
88308
+ async function detectOverflow(state, options) {
88309
+ var _await$platform$isEle;
88310
+ if (options === void 0) {
88311
+ options = {};
88312
+ }
88313
+ const {
88314
+ x: x3,
88315
+ y: y4,
88316
+ platform: platform2,
88317
+ rects,
88318
+ elements,
88319
+ strategy
88320
+ } = state;
88321
+ const {
88322
+ boundary = "clippingAncestors",
88323
+ rootBoundary = "viewport",
88324
+ elementContext = "floating",
88325
+ altBoundary = false,
88326
+ padding = 0
88327
+ } = evaluate(options, state);
88328
+ const paddingObject = getPaddingObject(padding);
88329
+ const altContext = elementContext === "floating" ? "reference" : "floating";
88330
+ const element = elements[altBoundary ? altContext : elementContext];
88331
+ const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
88332
+ element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
88333
+ boundary,
88334
+ rootBoundary,
88335
+ strategy
88336
+ }));
88337
+ const rect = elementContext === "floating" ? {
88338
+ x: x3,
88339
+ y: y4,
88340
+ width: rects.floating.width,
88341
+ height: rects.floating.height
88342
+ } : rects.reference;
88343
+ const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
88344
+ const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
88345
+ x: 1,
88346
+ y: 1
88347
+ } : {
88348
+ x: 1,
88349
+ y: 1
88350
+ };
88351
+ const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
88352
+ elements,
88353
+ rect,
88354
+ offsetParent,
88355
+ strategy
88356
+ }) : rect);
88357
+ return {
88358
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
88359
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
88360
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
88361
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
88362
+ };
88363
+ }
88364
+ var MAX_RESET_COUNT = 50;
88272
88365
  var computePosition = async (reference, floating, config) => {
88273
88366
  const {
88274
88367
  placement = "bottom",
@@ -88276,7 +88369,10 @@ var computePosition = async (reference, floating, config) => {
88276
88369
  middleware = [],
88277
88370
  platform: platform2
88278
88371
  } = config;
88279
- const validMiddleware = middleware.filter(Boolean);
88372
+ const platformWithDetectOverflow = platform2.detectOverflow ? platform2 : {
88373
+ ...platform2,
88374
+ detectOverflow
88375
+ };
88280
88376
  const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
88281
88377
  let rects = await platform2.getElementRects({
88282
88378
  reference,
@@ -88288,13 +88384,17 @@ var computePosition = async (reference, floating, config) => {
88288
88384
  y: y4
88289
88385
  } = computeCoordsFromPlacement(rects, placement, rtl);
88290
88386
  let statefulPlacement = placement;
88291
- let middlewareData = {};
88292
88387
  let resetCount = 0;
88293
- for (let i10 = 0; i10 < validMiddleware.length; i10++) {
88388
+ const middlewareData = {};
88389
+ for (let i10 = 0; i10 < middleware.length; i10++) {
88390
+ const currentMiddleware = middleware[i10];
88391
+ if (!currentMiddleware) {
88392
+ continue;
88393
+ }
88294
88394
  const {
88295
88395
  name,
88296
88396
  fn
88297
- } = validMiddleware[i10];
88397
+ } = currentMiddleware;
88298
88398
  const {
88299
88399
  x: nextX,
88300
88400
  y: nextY,
@@ -88308,7 +88408,7 @@ var computePosition = async (reference, floating, config) => {
88308
88408
  strategy,
88309
88409
  middlewareData,
88310
88410
  rects,
88311
- platform: platform2,
88411
+ platform: platformWithDetectOverflow,
88312
88412
  elements: {
88313
88413
  reference,
88314
88414
  floating
@@ -88316,14 +88416,11 @@ var computePosition = async (reference, floating, config) => {
88316
88416
  });
88317
88417
  x3 = nextX != null ? nextX : x3;
88318
88418
  y4 = nextY != null ? nextY : y4;
88319
- middlewareData = {
88320
- ...middlewareData,
88321
- [name]: {
88322
- ...middlewareData[name],
88323
- ...data
88324
- }
88419
+ middlewareData[name] = {
88420
+ ...middlewareData[name],
88421
+ ...data
88325
88422
  };
88326
- if (reset && resetCount <= 50) {
88423
+ if (reset && resetCount < MAX_RESET_COUNT) {
88327
88424
  resetCount++;
88328
88425
  if (typeof reset === "object") {
88329
88426
  if (reset.placement) {
@@ -88352,62 +88449,6 @@ var computePosition = async (reference, floating, config) => {
88352
88449
  middlewareData
88353
88450
  };
88354
88451
  };
88355
- async function detectOverflow(state, options) {
88356
- var _await$platform$isEle;
88357
- if (options === void 0) {
88358
- options = {};
88359
- }
88360
- const {
88361
- x: x3,
88362
- y: y4,
88363
- platform: platform2,
88364
- rects,
88365
- elements,
88366
- strategy
88367
- } = state;
88368
- const {
88369
- boundary = "clippingAncestors",
88370
- rootBoundary = "viewport",
88371
- elementContext = "floating",
88372
- altBoundary = false,
88373
- padding = 0
88374
- } = evaluate(options, state);
88375
- const paddingObject = getPaddingObject(padding);
88376
- const altContext = elementContext === "floating" ? "reference" : "floating";
88377
- const element = elements[altBoundary ? altContext : elementContext];
88378
- const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
88379
- element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
88380
- boundary,
88381
- rootBoundary,
88382
- strategy
88383
- }));
88384
- const rect = elementContext === "floating" ? {
88385
- x: x3,
88386
- y: y4,
88387
- width: rects.floating.width,
88388
- height: rects.floating.height
88389
- } : rects.reference;
88390
- const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
88391
- const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
88392
- x: 1,
88393
- y: 1
88394
- } : {
88395
- x: 1,
88396
- y: 1
88397
- };
88398
- const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
88399
- elements,
88400
- rect,
88401
- offsetParent,
88402
- strategy
88403
- }) : rect);
88404
- return {
88405
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
88406
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
88407
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
88408
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
88409
- };
88410
- }
88411
88452
  var arrow = (options) => ({
88412
88453
  name: "arrow",
88413
88454
  options,
@@ -88509,7 +88550,7 @@ var flip = function(options) {
88509
88550
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
88510
88551
  }
88511
88552
  const placements2 = [initialPlacement, ...fallbackPlacements];
88512
- const overflow = await detectOverflow(state, detectOverflowOptions);
88553
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
88513
88554
  const overflows = [];
88514
88555
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
88515
88556
  if (checkMainAxis) {
@@ -88658,7 +88699,8 @@ var shift = function(options) {
88658
88699
  const {
88659
88700
  x: x3,
88660
88701
  y: y4,
88661
- placement
88702
+ placement,
88703
+ platform: platform2
88662
88704
  } = state;
88663
88705
  const {
88664
88706
  mainAxis: checkMainAxis = true,
@@ -88681,7 +88723,7 @@ var shift = function(options) {
88681
88723
  x: x3,
88682
88724
  y: y4
88683
88725
  };
88684
- const overflow = await detectOverflow(state, detectOverflowOptions);
88726
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
88685
88727
  const crossAxis = getSideAxis(getSide(placement));
88686
88728
  const mainAxis = getOppositeAxis(crossAxis);
88687
88729
  let mainAxisCoord = coords2[mainAxis];
@@ -88739,7 +88781,7 @@ var size = function(options) {
88739
88781
  },
88740
88782
  ...detectOverflowOptions
88741
88783
  } = evaluate(options, state);
88742
- const overflow = await detectOverflow(state, detectOverflowOptions);
88784
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
88743
88785
  const side = getSide(placement);
88744
88786
  const alignment = getAlignment(placement);
88745
88787
  const isYAxis = getSideAxis(placement) === "y";
@@ -88840,7 +88882,6 @@ function isShadowRoot(value) {
88840
88882
  }
88841
88883
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
88842
88884
  }
88843
- var invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
88844
88885
  function isOverflowElement(element) {
88845
88886
  const {
88846
88887
  overflow,
@@ -88848,29 +88889,31 @@ function isOverflowElement(element) {
88848
88889
  overflowY,
88849
88890
  display
88850
88891
  } = getComputedStyle2(element);
88851
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
88892
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
88852
88893
  }
88853
- var tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
88854
88894
  function isTableElement(element) {
88855
- return tableElements.has(getNodeName(element));
88895
+ return /^(table|td|th)$/.test(getNodeName(element));
88856
88896
  }
88857
- var topLayerSelectors = [":popover-open", ":modal"];
88858
88897
  function isTopLayer(element) {
88859
- return topLayerSelectors.some((selector) => {
88860
- try {
88861
- return element.matches(selector);
88862
- } catch (_e) {
88863
- return false;
88898
+ try {
88899
+ if (element.matches(":popover-open")) {
88900
+ return true;
88864
88901
  }
88865
- });
88902
+ } catch (_e) {
88903
+ }
88904
+ try {
88905
+ return element.matches(":modal");
88906
+ } catch (_e) {
88907
+ return false;
88908
+ }
88866
88909
  }
88867
- var transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
88868
- var willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
88869
- var containValues = ["paint", "layout", "strict", "content"];
88910
+ var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
88911
+ var containRe = /paint|layout|strict|content/;
88912
+ var isNotNone = (value) => !!value && value !== "none";
88913
+ var isWebKitValue;
88870
88914
  function isContainingBlock(elementOrCss) {
88871
- const webkit = isWebKit();
88872
88915
  const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
88873
- return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
88916
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
88874
88917
  }
88875
88918
  function getContainingBlock(element) {
88876
88919
  let currentNode = getParentNode(element);
@@ -88885,12 +88928,13 @@ function getContainingBlock(element) {
88885
88928
  return null;
88886
88929
  }
88887
88930
  function isWebKit() {
88888
- if (typeof CSS === "undefined" || !CSS.supports) return false;
88889
- return CSS.supports("-webkit-backdrop-filter", "none");
88931
+ if (isWebKitValue == null) {
88932
+ isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
88933
+ }
88934
+ return isWebKitValue;
88890
88935
  }
88891
- var lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
88892
88936
  function isLastTraversableNode(node) {
88893
- return lastTraversableNodeNames.has(getNodeName(node));
88937
+ return /^(html|body|#document)$/.test(getNodeName(node));
88894
88938
  }
88895
88939
  function getComputedStyle2(element) {
88896
88940
  return getWindow(element).getComputedStyle(element);
@@ -88944,8 +88988,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
88944
88988
  if (isBody) {
88945
88989
  const frameElement = getFrameElement(win);
88946
88990
  return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
88991
+ } else {
88992
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
88947
88993
  }
88948
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
88949
88994
  }
88950
88995
  function getFrameElement(win) {
88951
88996
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
@@ -89109,7 +89154,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
89109
89154
  if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
89110
89155
  scroll = getNodeScroll(offsetParent);
89111
89156
  }
89112
- if (isHTMLElement(offsetParent)) {
89157
+ if (isOffsetParentAnElement) {
89113
89158
  const offsetRect = getBoundingClientRect(offsetParent);
89114
89159
  scale2 = getScale(offsetParent);
89115
89160
  offsets.x = offsetRect.x + offsetParent.clientLeft;
@@ -89183,7 +89228,6 @@ function getViewportRect(element, strategy) {
89183
89228
  y: y4
89184
89229
  };
89185
89230
  }
89186
- var absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
89187
89231
  function getInnerBoundingClientRect(element, strategy) {
89188
89232
  const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
89189
89233
  const top = clientRect.top + element.clientTop;
@@ -89241,7 +89285,7 @@ function getClippingElementAncestors(element, cache) {
89241
89285
  if (!currentNodeIsContaining && computedStyle.position === "fixed") {
89242
89286
  currentContainingBlockComputedStyle = null;
89243
89287
  }
89244
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
89288
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
89245
89289
  if (shouldDropCurrentNode) {
89246
89290
  result = result.filter((ancestor) => ancestor !== currentNode);
89247
89291
  } else {
@@ -89261,20 +89305,23 @@ function getClippingRect(_ref) {
89261
89305
  } = _ref;
89262
89306
  const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
89263
89307
  const clippingAncestors = [...elementClippingAncestors, rootBoundary];
89264
- const firstClippingAncestor = clippingAncestors[0];
89265
- const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
89266
- const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
89267
- accRect.top = max(rect.top, accRect.top);
89268
- accRect.right = min(rect.right, accRect.right);
89269
- accRect.bottom = min(rect.bottom, accRect.bottom);
89270
- accRect.left = max(rect.left, accRect.left);
89271
- return accRect;
89272
- }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
89308
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
89309
+ let top = firstRect.top;
89310
+ let right = firstRect.right;
89311
+ let bottom = firstRect.bottom;
89312
+ let left = firstRect.left;
89313
+ for (let i10 = 1; i10 < clippingAncestors.length; i10++) {
89314
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i10], strategy);
89315
+ top = max(rect.top, top);
89316
+ right = min(rect.right, right);
89317
+ bottom = min(rect.bottom, bottom);
89318
+ left = max(rect.left, left);
89319
+ }
89273
89320
  return {
89274
- width: clippingRect.right - clippingRect.left,
89275
- height: clippingRect.bottom - clippingRect.top,
89276
- x: clippingRect.left,
89277
- y: clippingRect.top
89321
+ width: right - left,
89322
+ height: bottom - top,
89323
+ x: left,
89324
+ y: top
89278
89325
  };
89279
89326
  }
89280
89327
  function getDimensions(element) {
@@ -89483,7 +89530,7 @@ function autoUpdate(reference, floating, update2, options) {
89483
89530
  animationFrame = false
89484
89531
  } = options;
89485
89532
  const referenceEl = unwrapElement(reference);
89486
- const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
89533
+ const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
89487
89534
  ancestors.forEach((ancestor) => {
89488
89535
  ancestorScroll && ancestor.addEventListener("scroll", update2, {
89489
89536
  passive: true
@@ -89496,7 +89543,7 @@ function autoUpdate(reference, floating, update2, options) {
89496
89543
  if (elementResize) {
89497
89544
  resizeObserver = new ResizeObserver((_ref) => {
89498
89545
  let [firstEntry] = _ref;
89499
- if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
89546
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
89500
89547
  resizeObserver.unobserve(floating);
89501
89548
  cancelAnimationFrame(reobserveFrame);
89502
89549
  reobserveFrame = requestAnimationFrame(() => {
@@ -89509,7 +89556,9 @@ function autoUpdate(reference, floating, update2, options) {
89509
89556
  if (referenceEl && !animationFrame) {
89510
89557
  resizeObserver.observe(referenceEl);
89511
89558
  }
89512
- resizeObserver.observe(floating);
89559
+ if (floating) {
89560
+ resizeObserver.observe(floating);
89561
+ }
89513
89562
  }
89514
89563
  let frameId;
89515
89564
  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
@@ -89721,16 +89770,16 @@ var SlPopup = class extends ShoelaceElement {
89721
89770
  });
89722
89771
  }
89723
89772
  async stop() {
89724
- return new Promise((resolve) => {
89773
+ return new Promise((resolve2) => {
89725
89774
  if (this.cleanup) {
89726
89775
  this.cleanup();
89727
89776
  this.cleanup = void 0;
89728
89777
  this.removeAttribute("data-current-placement");
89729
89778
  this.style.removeProperty("--auto-size-available-width");
89730
89779
  this.style.removeProperty("--auto-size-available-height");
89731
- requestAnimationFrame(() => resolve());
89780
+ requestAnimationFrame(() => resolve2());
89732
89781
  } else {
89733
- resolve();
89782
+ resolve2();
89734
89783
  }
89735
89784
  });
89736
89785
  }
@@ -90006,11 +90055,11 @@ function getAnimation(el, animationName, options) {
90006
90055
 
90007
90056
  // node_modules/@shoelace-style/shoelace/dist/chunks/chunk.B4BZKR24.js
90008
90057
  function waitForEvent(el, eventName) {
90009
- return new Promise((resolve) => {
90058
+ return new Promise((resolve2) => {
90010
90059
  function done(event) {
90011
90060
  if (event.target === el) {
90012
90061
  el.removeEventListener(eventName, done);
90013
- resolve();
90062
+ resolve2();
90014
90063
  }
90015
90064
  }
90016
90065
  el.addEventListener(eventName, done);
@@ -90019,15 +90068,15 @@ function waitForEvent(el, eventName) {
90019
90068
 
90020
90069
  // node_modules/@shoelace-style/shoelace/dist/chunks/chunk.AJ3ENQ5C.js
90021
90070
  function animateTo(el, keyframes, options) {
90022
- return new Promise((resolve) => {
90071
+ return new Promise((resolve2) => {
90023
90072
  if ((options == null ? void 0 : options.duration) === Infinity) {
90024
90073
  throw new Error("Promise-based animations must be finite.");
90025
90074
  }
90026
90075
  const animation = el.animate(keyframes, __spreadProps(__spreadValues({}, options), {
90027
90076
  duration: prefersReducedMotion() ? 0 : options.duration
90028
90077
  }));
90029
- animation.addEventListener("cancel", resolve, { once: true });
90030
- animation.addEventListener("finish", resolve, { once: true });
90078
+ animation.addEventListener("cancel", resolve2, { once: true });
90079
+ animation.addEventListener("finish", resolve2, { once: true });
90031
90080
  });
90032
90081
  }
90033
90082
  function parseDuration(delay) {
@@ -90047,9 +90096,9 @@ function prefersReducedMotion() {
90047
90096
  function stopAnimations(el) {
90048
90097
  return Promise.all(
90049
90098
  el.getAnimations().map((animation) => {
90050
- return new Promise((resolve) => {
90099
+ return new Promise((resolve2) => {
90051
90100
  animation.cancel();
90052
- requestAnimationFrame(resolve);
90101
+ requestAnimationFrame(resolve2);
90053
90102
  });
90054
90103
  })
90055
90104
  );
@@ -92072,8 +92121,8 @@ var __runInitializers = (array2, flags, self2, value) => {
92072
92121
  };
92073
92122
  var __decorateElement = (array2, flags, name, decorators, target, extra) => {
92074
92123
  var fn, it, done, ctx, access, k23 = flags & 7, s42 = !!(flags & 8), p32 = !!(flags & 16);
92075
- var j22 = k23 > 3 ? array2.length + 1 : k23 ? s42 ? 1 : 2 : 0, key = __decoratorStrings[k23 + 5];
92076
- var initializers = k23 > 3 && (array2[j22 - 1] = []), extraInitializers = array2[j22] || (array2[j22] = []);
92124
+ var j2 = k23 > 3 ? array2.length + 1 : k23 ? s42 ? 1 : 2 : 0, key = __decoratorStrings[k23 + 5];
92125
+ var initializers = k23 > 3 && (array2[j2 - 1] = []), extraInitializers = array2[j2] || (array2[j2] = []);
92077
92126
  var desc = k23 && (!p32 && !s42 && (target = target.prototype), k23 < 5 && (k23 > 3 || !p32) && __getOwnPropDesc3(k23 < 4 ? target : { get [name]() {
92078
92127
  return __privateGet2(this, extra);
92079
92128
  }, set [name](x22) {
@@ -92279,13 +92328,15 @@ var y3 = class extends HTMLElement {
92279
92328
  const i52 = this.constructor, e52 = i52._$Eh.get(t32);
92280
92329
  if (void 0 !== e52 && this._$Em !== e52) {
92281
92330
  const t42 = i52.getPropertyOptions(e52), h32 = "function" == typeof t42.converter ? { fromAttribute: t42.converter } : void 0 !== t42.converter?.fromAttribute ? t42.converter : u4;
92282
- this._$Em = e52, this[e52] = h32.fromAttribute(s42, t42.type) ?? this._$Ej?.get(e52) ?? null, this._$Em = null;
92331
+ this._$Em = e52;
92332
+ const r52 = h32.fromAttribute(s42, t42.type);
92333
+ this[e52] = r52 ?? this._$Ej?.get(e52) ?? r52, this._$Em = null;
92283
92334
  }
92284
92335
  }
92285
- requestUpdate(t32, s42, i52) {
92336
+ requestUpdate(t32, s42, i52, e52 = false, h32) {
92286
92337
  if (void 0 !== t32) {
92287
- const e52 = this.constructor, h32 = this[t32];
92288
- if (i52 ??= e52.getPropertyOptions(t32), !((i52.hasChanged ?? f3)(h32, s42) || i52.useDefault && i52.reflect && h32 === this._$Ej?.get(t32) && !this.hasAttribute(e52._$Eu(t32, i52)))) return;
92338
+ const r52 = this.constructor;
92339
+ if (false === e52 && (h32 = this[t32]), i52 ??= r52.getPropertyOptions(t32), !((i52.hasChanged ?? f3)(h32, s42) || i52.useDefault && i52.reflect && h32 === this._$Ej?.get(t32) && !this.hasAttribute(r52._$Eu(t32, i52)))) return;
92289
92340
  this.C(t32, s42, i52);
92290
92341
  }
92291
92342
  false === this.isUpdatePending && (this._$ES = this._$EP());
@@ -92353,96 +92404,97 @@ var y3 = class extends HTMLElement {
92353
92404
  firstUpdated(t32) {
92354
92405
  }
92355
92406
  };
92356
- y3.elementStyles = [], y3.shadowRootOptions = { mode: "open" }, y3[d3("elementProperties")] = /* @__PURE__ */ new Map(), y3[d3("finalized")] = /* @__PURE__ */ new Map(), p4?.({ ReactiveElement: y3 }), (a4.reactiveElementVersions ??= []).push("2.1.0");
92407
+ y3.elementStyles = [], y3.shadowRootOptions = { mode: "open" }, y3[d3("elementProperties")] = /* @__PURE__ */ new Map(), y3[d3("finalized")] = /* @__PURE__ */ new Map(), p4?.({ ReactiveElement: y3 }), (a4.reactiveElementVersions ??= []).push("2.1.2");
92357
92408
  var t22 = globalThis;
92358
- var i32 = t22.trustedTypes;
92359
- var s22 = i32 ? i32.createPolicy("lit-html", { createHTML: (t32) => t32 }) : void 0;
92360
- var e32 = "$lit$";
92361
- var h22 = `lit$${Math.random().toFixed(9).slice(2)}$`;
92362
- var o32 = "?" + h22;
92363
- var n32 = `<${o32}>`;
92364
- var r32 = document;
92365
- var l22 = () => r32.createComment("");
92366
- var c32 = (t32) => null === t32 || "object" != typeof t32 && "function" != typeof t32;
92367
- var a22 = Array.isArray;
92368
- var u22 = (t32) => a22(t32) || "function" == typeof t32?.[Symbol.iterator];
92369
- var d22 = "[ \n\f\r]";
92370
- var f22 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
92371
- var v2 = /-->/g;
92372
- var _2 = />/g;
92373
- var m3 = RegExp(`>|${d22}(?:([^\\s"'>=/]+)(${d22}*=${d22}*(?:[^
92409
+ var i32 = (t32) => t32;
92410
+ var s22 = t22.trustedTypes;
92411
+ var e32 = s22 ? s22.createPolicy("lit-html", { createHTML: (t32) => t32 }) : void 0;
92412
+ var h22 = "$lit$";
92413
+ var o32 = `lit$${Math.random().toFixed(9).slice(2)}$`;
92414
+ var n32 = "?" + o32;
92415
+ var r32 = `<${n32}>`;
92416
+ var l22 = document;
92417
+ var c32 = () => l22.createComment("");
92418
+ var a22 = (t32) => null === t32 || "object" != typeof t32 && "function" != typeof t32;
92419
+ var u22 = Array.isArray;
92420
+ var d22 = (t32) => u22(t32) || "function" == typeof t32?.[Symbol.iterator];
92421
+ var f22 = "[ \n\f\r]";
92422
+ var v2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
92423
+ var _2 = /-->/g;
92424
+ var m3 = />/g;
92425
+ var p22 = RegExp(`>|${f22}(?:([^\\s"'>=/]+)(${f22}*=${f22}*(?:[^
92374
92426
  \f\r"'\`<>=]|("|')|))|$)`, "g");
92375
- var p22 = /'/g;
92376
- var g2 = /"/g;
92377
- var $3 = /^(?:script|style|textarea|title)$/i;
92378
- var y22 = (t32) => (i52, ...s42) => ({ _$litType$: t32, strings: i52, values: s42 });
92379
- var x2 = y22(1);
92380
- var b22 = y22(2);
92381
- var w2 = y22(3);
92382
- var T2 = Symbol.for("lit-noChange");
92383
- var E2 = Symbol.for("lit-nothing");
92384
- var A2 = /* @__PURE__ */ new WeakMap();
92385
- var C2 = r32.createTreeWalker(r32, 129);
92386
- function P2(t32, i52) {
92387
- if (!a22(t32) || !t32.hasOwnProperty("raw")) throw Error("invalid template strings array");
92388
- return void 0 !== s22 ? s22.createHTML(i52) : i52;
92389
- }
92390
- var V2 = (t32, i52) => {
92391
- const s42 = t32.length - 1, o62 = [];
92392
- let r52, l32 = 2 === i52 ? "<svg>" : 3 === i52 ? "<math>" : "", c42 = f22;
92427
+ var g2 = /'/g;
92428
+ var $3 = /"/g;
92429
+ var y22 = /^(?:script|style|textarea|title)$/i;
92430
+ var x2 = (t32) => (i52, ...s42) => ({ _$litType$: t32, strings: i52, values: s42 });
92431
+ var b22 = x2(1);
92432
+ var w2 = x2(2);
92433
+ var T2 = x2(3);
92434
+ var E2 = Symbol.for("lit-noChange");
92435
+ var A2 = Symbol.for("lit-nothing");
92436
+ var C2 = /* @__PURE__ */ new WeakMap();
92437
+ var P2 = l22.createTreeWalker(l22, 129);
92438
+ function V2(t32, i52) {
92439
+ if (!u22(t32) || !t32.hasOwnProperty("raw")) throw Error("invalid template strings array");
92440
+ return void 0 !== e32 ? e32.createHTML(i52) : i52;
92441
+ }
92442
+ var N2 = (t32, i52) => {
92443
+ const s42 = t32.length - 1, e52 = [];
92444
+ let n52, l32 = 2 === i52 ? "<svg>" : 3 === i52 ? "<math>" : "", c42 = v2;
92393
92445
  for (let i62 = 0; i62 < s42; i62++) {
92394
92446
  const s52 = t32[i62];
92395
- let a33, u32, d32 = -1, y32 = 0;
92396
- for (; y32 < s52.length && (c42.lastIndex = y32, u32 = c42.exec(s52), null !== u32); ) y32 = c42.lastIndex, c42 === f22 ? "!--" === u32[1] ? c42 = v2 : void 0 !== u32[1] ? c42 = _2 : void 0 !== u32[2] ? ($3.test(u32[2]) && (r52 = RegExp("</" + u32[2], "g")), c42 = m3) : void 0 !== u32[3] && (c42 = m3) : c42 === m3 ? ">" === u32[0] ? (c42 = r52 ?? f22, d32 = -1) : void 0 === u32[1] ? d32 = -2 : (d32 = c42.lastIndex - u32[2].length, a33 = u32[1], c42 = void 0 === u32[3] ? m3 : '"' === u32[3] ? g2 : p22) : c42 === g2 || c42 === p22 ? c42 = m3 : c42 === v2 || c42 === _2 ? c42 = f22 : (c42 = m3, r52 = void 0);
92397
- const x22 = c42 === m3 && t32[i62 + 1].startsWith("/>") ? " " : "";
92398
- l32 += c42 === f22 ? s52 + n32 : d32 >= 0 ? (o62.push(a33), s52.slice(0, d32) + e32 + s52.slice(d32) + h22 + x22) : s52 + h22 + (-2 === d32 ? i62 : x22);
92447
+ let a33, u32, d32 = -1, f32 = 0;
92448
+ for (; f32 < s52.length && (c42.lastIndex = f32, u32 = c42.exec(s52), null !== u32); ) f32 = c42.lastIndex, c42 === v2 ? "!--" === u32[1] ? c42 = _2 : void 0 !== u32[1] ? c42 = m3 : void 0 !== u32[2] ? (y22.test(u32[2]) && (n52 = RegExp("</" + u32[2], "g")), c42 = p22) : void 0 !== u32[3] && (c42 = p22) : c42 === p22 ? ">" === u32[0] ? (c42 = n52 ?? v2, d32 = -1) : void 0 === u32[1] ? d32 = -2 : (d32 = c42.lastIndex - u32[2].length, a33 = u32[1], c42 = void 0 === u32[3] ? p22 : '"' === u32[3] ? $3 : g2) : c42 === $3 || c42 === g2 ? c42 = p22 : c42 === _2 || c42 === m3 ? c42 = v2 : (c42 = p22, n52 = void 0);
92449
+ const x22 = c42 === p22 && t32[i62 + 1].startsWith("/>") ? " " : "";
92450
+ l32 += c42 === v2 ? s52 + r32 : d32 >= 0 ? (e52.push(a33), s52.slice(0, d32) + h22 + s52.slice(d32) + o32 + x22) : s52 + o32 + (-2 === d32 ? i62 : x22);
92399
92451
  }
92400
- return [P2(t32, l32 + (t32[s42] || "<?>") + (2 === i52 ? "</svg>" : 3 === i52 ? "</math>" : "")), o62];
92452
+ return [V2(t32, l32 + (t32[s42] || "<?>") + (2 === i52 ? "</svg>" : 3 === i52 ? "</math>" : "")), e52];
92401
92453
  };
92402
- var N2 = class _N {
92403
- constructor({ strings: t32, _$litType$: s42 }, n52) {
92454
+ var S22 = class _S {
92455
+ constructor({ strings: t32, _$litType$: i52 }, e52) {
92404
92456
  let r52;
92405
92457
  this.parts = [];
92406
- let c42 = 0, a33 = 0;
92407
- const u32 = t32.length - 1, d32 = this.parts, [f32, v22] = V2(t32, s42);
92408
- if (this.el = _N.createElement(f32, n52), C2.currentNode = this.el.content, 2 === s42 || 3 === s42) {
92458
+ let l32 = 0, a33 = 0;
92459
+ const u32 = t32.length - 1, d32 = this.parts, [f32, v22] = N2(t32, i52);
92460
+ if (this.el = _S.createElement(f32, e52), P2.currentNode = this.el.content, 2 === i52 || 3 === i52) {
92409
92461
  const t42 = this.el.content.firstChild;
92410
92462
  t42.replaceWith(...t42.childNodes);
92411
92463
  }
92412
- for (; null !== (r52 = C2.nextNode()) && d32.length < u32; ) {
92464
+ for (; null !== (r52 = P2.nextNode()) && d32.length < u32; ) {
92413
92465
  if (1 === r52.nodeType) {
92414
- if (r52.hasAttributes()) for (const t42 of r52.getAttributeNames()) if (t42.endsWith(e32)) {
92415
- const i52 = v22[a33++], s52 = r52.getAttribute(t42).split(h22), e52 = /([.?@])?(.*)/.exec(i52);
92416
- d32.push({ type: 1, index: c42, name: e52[2], strings: s52, ctor: "." === e52[1] ? H2 : "?" === e52[1] ? I2 : "@" === e52[1] ? L2 : k2 }), r52.removeAttribute(t42);
92417
- } else t42.startsWith(h22) && (d32.push({ type: 6, index: c42 }), r52.removeAttribute(t42));
92418
- if ($3.test(r52.tagName)) {
92419
- const t42 = r52.textContent.split(h22), s52 = t42.length - 1;
92420
- if (s52 > 0) {
92421
- r52.textContent = i32 ? i32.emptyScript : "";
92422
- for (let i52 = 0; i52 < s52; i52++) r52.append(t42[i52], l22()), C2.nextNode(), d32.push({ type: 2, index: ++c42 });
92423
- r52.append(t42[s52], l22());
92424
- }
92425
- }
92426
- } else if (8 === r52.nodeType) if (r52.data === o32) d32.push({ type: 2, index: c42 });
92466
+ if (r52.hasAttributes()) for (const t42 of r52.getAttributeNames()) if (t42.endsWith(h22)) {
92467
+ const i62 = v22[a33++], s42 = r52.getAttribute(t42).split(o32), e62 = /([.?@])?(.*)/.exec(i62);
92468
+ d32.push({ type: 1, index: l32, name: e62[2], strings: s42, ctor: "." === e62[1] ? I2 : "?" === e62[1] ? L2 : "@" === e62[1] ? z2 : H2 }), r52.removeAttribute(t42);
92469
+ } else t42.startsWith(o32) && (d32.push({ type: 6, index: l32 }), r52.removeAttribute(t42));
92470
+ if (y22.test(r52.tagName)) {
92471
+ const t42 = r52.textContent.split(o32), i62 = t42.length - 1;
92472
+ if (i62 > 0) {
92473
+ r52.textContent = s22 ? s22.emptyScript : "";
92474
+ for (let s42 = 0; s42 < i62; s42++) r52.append(t42[s42], c32()), P2.nextNode(), d32.push({ type: 2, index: ++l32 });
92475
+ r52.append(t42[i62], c32());
92476
+ }
92477
+ }
92478
+ } else if (8 === r52.nodeType) if (r52.data === n32) d32.push({ type: 2, index: l32 });
92427
92479
  else {
92428
92480
  let t42 = -1;
92429
- for (; -1 !== (t42 = r52.data.indexOf(h22, t42 + 1)); ) d32.push({ type: 7, index: c42 }), t42 += h22.length - 1;
92481
+ for (; -1 !== (t42 = r52.data.indexOf(o32, t42 + 1)); ) d32.push({ type: 7, index: l32 }), t42 += o32.length - 1;
92430
92482
  }
92431
- c42++;
92483
+ l32++;
92432
92484
  }
92433
92485
  }
92434
92486
  static createElement(t32, i52) {
92435
- const s42 = r32.createElement("template");
92487
+ const s42 = l22.createElement("template");
92436
92488
  return s42.innerHTML = t32, s42;
92437
92489
  }
92438
92490
  };
92439
- function S22(t32, i52, s42 = t32, e52) {
92440
- if (i52 === T2) return i52;
92491
+ function M2(t32, i52, s42 = t32, e52) {
92492
+ if (i52 === E2) return i52;
92441
92493
  let h32 = void 0 !== e52 ? s42._$Co?.[e52] : s42._$Cl;
92442
- const o62 = c32(i52) ? void 0 : i52._$litDirective$;
92443
- return h32?.constructor !== o62 && (h32?._$AO?.(false), void 0 === o62 ? h32 = void 0 : (h32 = new o62(t32), h32._$AT(t32, s42, e52)), void 0 !== e52 ? (s42._$Co ??= [])[e52] = h32 : s42._$Cl = h32), void 0 !== h32 && (i52 = S22(t32, h32._$AS(t32, i52.values), h32, e52)), i52;
92494
+ const o62 = a22(i52) ? void 0 : i52._$litDirective$;
92495
+ return h32?.constructor !== o62 && (h32?._$AO?.(false), void 0 === o62 ? h32 = void 0 : (h32 = new o62(t32), h32._$AT(t32, s42, e52)), void 0 !== e52 ? (s42._$Co ??= [])[e52] = h32 : s42._$Cl = h32), void 0 !== h32 && (i52 = M2(t32, h32._$AS(t32, i52.values), h32, e52)), i52;
92444
92496
  }
92445
- var M2 = class {
92497
+ var R2 = class {
92446
92498
  constructor(t32, i52) {
92447
92499
  this._$AV = [], this._$AN = void 0, this._$AD = t32, this._$AM = i52;
92448
92500
  }
@@ -92453,29 +92505,29 @@ var M2 = class {
92453
92505
  return this._$AM._$AU;
92454
92506
  }
92455
92507
  u(t32) {
92456
- const { el: { content: i52 }, parts: s42 } = this._$AD, e52 = (t32?.creationScope ?? r32).importNode(i52, true);
92457
- C2.currentNode = e52;
92458
- let h32 = C2.nextNode(), o62 = 0, n52 = 0, l32 = s42[0];
92459
- for (; void 0 !== l32; ) {
92460
- if (o62 === l32.index) {
92508
+ const { el: { content: i52 }, parts: s42 } = this._$AD, e52 = (t32?.creationScope ?? l22).importNode(i52, true);
92509
+ P2.currentNode = e52;
92510
+ let h32 = P2.nextNode(), o62 = 0, n52 = 0, r52 = s42[0];
92511
+ for (; void 0 !== r52; ) {
92512
+ if (o62 === r52.index) {
92461
92513
  let i62;
92462
- 2 === l32.type ? i62 = new R2(h32, h32.nextSibling, this, t32) : 1 === l32.type ? i62 = new l32.ctor(h32, l32.name, l32.strings, this, t32) : 6 === l32.type && (i62 = new z2(h32, this, t32)), this._$AV.push(i62), l32 = s42[++n52];
92514
+ 2 === r52.type ? i62 = new k2(h32, h32.nextSibling, this, t32) : 1 === r52.type ? i62 = new r52.ctor(h32, r52.name, r52.strings, this, t32) : 6 === r52.type && (i62 = new Z2(h32, this, t32)), this._$AV.push(i62), r52 = s42[++n52];
92463
92515
  }
92464
- o62 !== l32?.index && (h32 = C2.nextNode(), o62++);
92516
+ o62 !== r52?.index && (h32 = P2.nextNode(), o62++);
92465
92517
  }
92466
- return C2.currentNode = r32, e52;
92518
+ return P2.currentNode = l22, e52;
92467
92519
  }
92468
92520
  p(t32) {
92469
92521
  let i52 = 0;
92470
92522
  for (const s42 of this._$AV) void 0 !== s42 && (void 0 !== s42.strings ? (s42._$AI(t32, s42, i52), i52 += s42.strings.length - 2) : s42._$AI(t32[i52])), i52++;
92471
92523
  }
92472
92524
  };
92473
- var R2 = class _R {
92525
+ var k2 = class _k {
92474
92526
  get _$AU() {
92475
92527
  return this._$AM?._$AU ?? this._$Cv;
92476
92528
  }
92477
92529
  constructor(t32, i52, s42, e52) {
92478
- this.type = 2, this._$AH = E2, this._$AN = void 0, this._$AA = t32, this._$AB = i52, this._$AM = s42, this.options = e52, this._$Cv = e52?.isConnected ?? true;
92530
+ this.type = 2, this._$AH = A2, this._$AN = void 0, this._$AA = t32, this._$AB = i52, this._$AM = s42, this.options = e52, this._$Cv = e52?.isConnected ?? true;
92479
92531
  }
92480
92532
  get parentNode() {
92481
92533
  let t32 = this._$AA.parentNode;
@@ -92489,7 +92541,7 @@ var R2 = class _R {
92489
92541
  return this._$AB;
92490
92542
  }
92491
92543
  _$AI(t32, i52 = this) {
92492
- t32 = S22(this, t32, i52), c32(t32) ? t32 === E2 || null == t32 || "" === t32 ? (this._$AH !== E2 && this._$AR(), this._$AH = E2) : t32 !== this._$AH && t32 !== T2 && this._(t32) : void 0 !== t32._$litType$ ? this.$(t32) : void 0 !== t32.nodeType ? this.T(t32) : u22(t32) ? this.k(t32) : this._(t32);
92544
+ t32 = M2(this, t32, i52), a22(t32) ? t32 === A2 || null == t32 || "" === t32 ? (this._$AH !== A2 && this._$AR(), this._$AH = A2) : t32 !== this._$AH && t32 !== E2 && this._(t32) : void 0 !== t32._$litType$ ? this.$(t32) : void 0 !== t32.nodeType ? this.T(t32) : d22(t32) ? this.k(t32) : this._(t32);
92493
92545
  }
92494
92546
  O(t32) {
92495
92547
  return this._$AA.parentNode.insertBefore(t32, this._$AB);
@@ -92498,38 +92550,38 @@ var R2 = class _R {
92498
92550
  this._$AH !== t32 && (this._$AR(), this._$AH = this.O(t32));
92499
92551
  }
92500
92552
  _(t32) {
92501
- this._$AH !== E2 && c32(this._$AH) ? this._$AA.nextSibling.data = t32 : this.T(r32.createTextNode(t32)), this._$AH = t32;
92553
+ this._$AH !== A2 && a22(this._$AH) ? this._$AA.nextSibling.data = t32 : this.T(l22.createTextNode(t32)), this._$AH = t32;
92502
92554
  }
92503
92555
  $(t32) {
92504
- const { values: i52, _$litType$: s42 } = t32, e52 = "number" == typeof s42 ? this._$AC(t32) : (void 0 === s42.el && (s42.el = N2.createElement(P2(s42.h, s42.h[0]), this.options)), s42);
92556
+ const { values: i52, _$litType$: s42 } = t32, e52 = "number" == typeof s42 ? this._$AC(t32) : (void 0 === s42.el && (s42.el = S22.createElement(V2(s42.h, s42.h[0]), this.options)), s42);
92505
92557
  if (this._$AH?._$AD === e52) this._$AH.p(i52);
92506
92558
  else {
92507
- const t42 = new M2(e52, this), s52 = t42.u(this.options);
92559
+ const t42 = new R2(e52, this), s52 = t42.u(this.options);
92508
92560
  t42.p(i52), this.T(s52), this._$AH = t42;
92509
92561
  }
92510
92562
  }
92511
92563
  _$AC(t32) {
92512
- let i52 = A2.get(t32.strings);
92513
- return void 0 === i52 && A2.set(t32.strings, i52 = new N2(t32)), i52;
92564
+ let i52 = C2.get(t32.strings);
92565
+ return void 0 === i52 && C2.set(t32.strings, i52 = new S22(t32)), i52;
92514
92566
  }
92515
92567
  k(t32) {
92516
- a22(this._$AH) || (this._$AH = [], this._$AR());
92568
+ u22(this._$AH) || (this._$AH = [], this._$AR());
92517
92569
  const i52 = this._$AH;
92518
92570
  let s42, e52 = 0;
92519
- for (const h32 of t32) e52 === i52.length ? i52.push(s42 = new _R(this.O(l22()), this.O(l22()), this, this.options)) : s42 = i52[e52], s42._$AI(h32), e52++;
92571
+ for (const h32 of t32) e52 === i52.length ? i52.push(s42 = new _k(this.O(c32()), this.O(c32()), this, this.options)) : s42 = i52[e52], s42._$AI(h32), e52++;
92520
92572
  e52 < i52.length && (this._$AR(s42 && s42._$AB.nextSibling, e52), i52.length = e52);
92521
92573
  }
92522
- _$AR(t32 = this._$AA.nextSibling, i52) {
92523
- for (this._$AP?.(false, true, i52); t32 && t32 !== this._$AB; ) {
92524
- const i62 = t32.nextSibling;
92525
- t32.remove(), t32 = i62;
92574
+ _$AR(t32 = this._$AA.nextSibling, s42) {
92575
+ for (this._$AP?.(false, true, s42); t32 !== this._$AB; ) {
92576
+ const s52 = i32(t32).nextSibling;
92577
+ i32(t32).remove(), t32 = s52;
92526
92578
  }
92527
92579
  }
92528
92580
  setConnected(t32) {
92529
92581
  void 0 === this._$AM && (this._$Cv = t32, this._$AP?.(t32));
92530
92582
  }
92531
92583
  };
92532
- var k2 = class {
92584
+ var H2 = class {
92533
92585
  get tagName() {
92534
92586
  return this.element.tagName;
92535
92587
  }
@@ -92537,53 +92589,53 @@ var k2 = class {
92537
92589
  return this._$AM._$AU;
92538
92590
  }
92539
92591
  constructor(t32, i52, s42, e52, h32) {
92540
- this.type = 1, this._$AH = E2, this._$AN = void 0, this.element = t32, this.name = i52, this._$AM = e52, this.options = h32, s42.length > 2 || "" !== s42[0] || "" !== s42[1] ? (this._$AH = Array(s42.length - 1).fill(new String()), this.strings = s42) : this._$AH = E2;
92592
+ this.type = 1, this._$AH = A2, this._$AN = void 0, this.element = t32, this.name = i52, this._$AM = e52, this.options = h32, s42.length > 2 || "" !== s42[0] || "" !== s42[1] ? (this._$AH = Array(s42.length - 1).fill(new String()), this.strings = s42) : this._$AH = A2;
92541
92593
  }
92542
92594
  _$AI(t32, i52 = this, s42, e52) {
92543
92595
  const h32 = this.strings;
92544
92596
  let o62 = false;
92545
- if (void 0 === h32) t32 = S22(this, t32, i52, 0), o62 = !c32(t32) || t32 !== this._$AH && t32 !== T2, o62 && (this._$AH = t32);
92597
+ if (void 0 === h32) t32 = M2(this, t32, i52, 0), o62 = !a22(t32) || t32 !== this._$AH && t32 !== E2, o62 && (this._$AH = t32);
92546
92598
  else {
92547
92599
  const e62 = t32;
92548
92600
  let n52, r52;
92549
- for (t32 = h32[0], n52 = 0; n52 < h32.length - 1; n52++) r52 = S22(this, e62[s42 + n52], i52, n52), r52 === T2 && (r52 = this._$AH[n52]), o62 ||= !c32(r52) || r52 !== this._$AH[n52], r52 === E2 ? t32 = E2 : t32 !== E2 && (t32 += (r52 ?? "") + h32[n52 + 1]), this._$AH[n52] = r52;
92601
+ for (t32 = h32[0], n52 = 0; n52 < h32.length - 1; n52++) r52 = M2(this, e62[s42 + n52], i52, n52), r52 === E2 && (r52 = this._$AH[n52]), o62 ||= !a22(r52) || r52 !== this._$AH[n52], r52 === A2 ? t32 = A2 : t32 !== A2 && (t32 += (r52 ?? "") + h32[n52 + 1]), this._$AH[n52] = r52;
92550
92602
  }
92551
92603
  o62 && !e52 && this.j(t32);
92552
92604
  }
92553
92605
  j(t32) {
92554
- t32 === E2 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t32 ?? "");
92606
+ t32 === A2 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t32 ?? "");
92555
92607
  }
92556
92608
  };
92557
- var H2 = class extends k2 {
92609
+ var I2 = class extends H2 {
92558
92610
  constructor() {
92559
92611
  super(...arguments), this.type = 3;
92560
92612
  }
92561
92613
  j(t32) {
92562
- this.element[this.name] = t32 === E2 ? void 0 : t32;
92614
+ this.element[this.name] = t32 === A2 ? void 0 : t32;
92563
92615
  }
92564
92616
  };
92565
- var I2 = class extends k2 {
92617
+ var L2 = class extends H2 {
92566
92618
  constructor() {
92567
92619
  super(...arguments), this.type = 4;
92568
92620
  }
92569
92621
  j(t32) {
92570
- this.element.toggleAttribute(this.name, !!t32 && t32 !== E2);
92622
+ this.element.toggleAttribute(this.name, !!t32 && t32 !== A2);
92571
92623
  }
92572
92624
  };
92573
- var L2 = class extends k2 {
92625
+ var z2 = class extends H2 {
92574
92626
  constructor(t32, i52, s42, e52, h32) {
92575
92627
  super(t32, i52, s42, e52, h32), this.type = 5;
92576
92628
  }
92577
92629
  _$AI(t32, i52 = this) {
92578
- if ((t32 = S22(this, t32, i52, 0) ?? E2) === T2) return;
92579
- const s42 = this._$AH, e52 = t32 === E2 && s42 !== E2 || t32.capture !== s42.capture || t32.once !== s42.once || t32.passive !== s42.passive, h32 = t32 !== E2 && (s42 === E2 || e52);
92630
+ if ((t32 = M2(this, t32, i52, 0) ?? A2) === E2) return;
92631
+ const s42 = this._$AH, e52 = t32 === A2 && s42 !== A2 || t32.capture !== s42.capture || t32.once !== s42.once || t32.passive !== s42.passive, h32 = t32 !== A2 && (s42 === A2 || e52);
92580
92632
  e52 && this.element.removeEventListener(this.name, this, s42), h32 && this.element.addEventListener(this.name, this, t32), this._$AH = t32;
92581
92633
  }
92582
92634
  handleEvent(t32) {
92583
92635
  "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t32) : this._$AH.handleEvent(t32);
92584
92636
  }
92585
92637
  };
92586
- var z2 = class {
92638
+ var Z2 = class {
92587
92639
  constructor(t32, i52, s42) {
92588
92640
  this.element = t32, this.type = 6, this._$AN = void 0, this._$AM = i52, this.options = s42;
92589
92641
  }
@@ -92591,17 +92643,17 @@ var z2 = class {
92591
92643
  return this._$AM._$AU;
92592
92644
  }
92593
92645
  _$AI(t32) {
92594
- S22(this, t32);
92646
+ M2(this, t32);
92595
92647
  }
92596
92648
  };
92597
- var j2 = t22.litHtmlPolyfillSupport;
92598
- j2?.(N2, R2), (t22.litHtmlVersions ??= []).push("3.3.0");
92599
- var B2 = (t32, i52, s42) => {
92649
+ var B2 = t22.litHtmlPolyfillSupport;
92650
+ B2?.(S22, k2), (t22.litHtmlVersions ??= []).push("3.3.2");
92651
+ var D2 = (t32, i52, s42) => {
92600
92652
  const e52 = s42?.renderBefore ?? i52;
92601
92653
  let h32 = e52._$litPart$;
92602
92654
  if (void 0 === h32) {
92603
92655
  const t42 = s42?.renderBefore ?? null;
92604
- e52._$litPart$ = h32 = new R2(i52.insertBefore(l22(), t42), t42, void 0, s42 ?? {});
92656
+ e52._$litPart$ = h32 = new k2(i52.insertBefore(c32(), t42), t42, void 0, s42 ?? {});
92605
92657
  }
92606
92658
  return h32._$AI(t32), h32;
92607
92659
  };
@@ -92616,7 +92668,7 @@ var i42 = class extends y3 {
92616
92668
  }
92617
92669
  update(t32) {
92618
92670
  const r52 = this.render();
92619
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t32), this._$Do = B2(r52, this.renderRoot, this.renderOptions);
92671
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t32), this._$Do = D2(r52, this.renderRoot, this.renderOptions);
92620
92672
  }
92621
92673
  connectedCallback() {
92622
92674
  super.connectedCallback(), this._$Do?.setConnected(true);
@@ -92625,13 +92677,13 @@ var i42 = class extends y3 {
92625
92677
  super.disconnectedCallback(), this._$Do?.setConnected(false);
92626
92678
  }
92627
92679
  render() {
92628
- return T2;
92680
+ return E2;
92629
92681
  }
92630
92682
  };
92631
92683
  i42._$litElement$ = true, i42["finalized"] = true, s32.litElementHydrateSupport?.({ LitElement: i42 });
92632
92684
  var o42 = s32.litElementPolyfillSupport;
92633
92685
  o42?.({ LitElement: i42 });
92634
- (s32.litElementVersions ??= []).push("4.2.0");
92686
+ (s32.litElementVersions ??= []).push("4.2.2");
92635
92687
  var o52 = { attribute: true, type: String, converter: u4, reflect: false, hasChanged: f3 };
92636
92688
  var r42 = (t32 = o52, e52, r52) => {
92637
92689
  const { kind: n52, metadata: i52 } = r52;
@@ -92640,7 +92692,7 @@ var r42 = (t32 = o52, e52, r52) => {
92640
92692
  const { name: o62 } = r52;
92641
92693
  return { set(r62) {
92642
92694
  const n62 = e52.get.call(this);
92643
- e52.set.call(this, r62), this.requestUpdate(o62, n62, t32);
92695
+ e52.set.call(this, r62), this.requestUpdate(o62, n62, t32, true, r62);
92644
92696
  }, init(e62) {
92645
92697
  return void 0 !== e62 && this.C(o62, void 0, t32, e62), e62;
92646
92698
  } };
@@ -92649,7 +92701,7 @@ var r42 = (t32 = o52, e52, r52) => {
92649
92701
  const { name: o62 } = r52;
92650
92702
  return function(r62) {
92651
92703
  const n62 = this[o62];
92652
- e52.call(this, r62), this.requestUpdate(o62, n62, t32);
92704
+ e52.call(this, r62), this.requestUpdate(o62, n62, t32, true, r62);
92653
92705
  };
92654
92706
  }
92655
92707
  throw Error("Unsupported decorator location: " + n52);
@@ -92775,13 +92827,19 @@ var LitElementWw = class extends (_a = ScopedElementsMixin2(i42), _contentEditab
92775
92827
  constructor() {
92776
92828
  super(...arguments);
92777
92829
  __runInitializers(_init, 5, this);
92778
- __publicField2(this, "options");
92779
- __publicField2(this, "actions", {});
92780
92830
  __publicField2(this, "localize");
92781
92831
  __privateAdd2(this, _contentEditable, __runInitializers(_init, 8, this)), __runInitializers(_init, 11, this);
92782
92832
  __privateAdd2(this, _lang, "");
92783
92833
  __publicField2(this, "_inTransaction", false);
92784
92834
  }
92835
+ /** Declare attributes as options. Used by WebWriter to auto-generate input fields to modify these attributes. As the name suggests, this is mostly suited to simple attributes (boolean, string, etc.). As this is a getter, you can dynamically change options depending on the state of the widget. */
92836
+ get dynamicOptions() {
92837
+ return {};
92838
+ }
92839
+ /** Declare methods as actions. Used by WebWriter to treat all DOM changes triggered by the method as a single change (as a transaction). As this is a getter, you can dynamically change actions depending on the state of the widget. */
92840
+ get dynamicActions() {
92841
+ return {};
92842
+ }
92785
92843
  get lang() {
92786
92844
  return (__privateGet2(this, _lang) || this.parentElement?.closest("[lang]")?.lang) ?? "";
92787
92845
  }
@@ -92986,11 +93044,19 @@ var DEFAULT_PARSERS = {
92986
93044
  stringFromBytes(bytes) {
92987
93045
  return bytes && decoder.decode(bytes);
92988
93046
  },
93047
+ jsonFromBytes(bytes) {
93048
+ return bytes && JSON.parse(decoder.decode(bytes));
93049
+ },
92989
93050
  geometryFromBytes(bytes) {
92990
93051
  return bytes && wkbToGeojson({ view: new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength), offset: 0 });
92991
93052
  },
92992
93053
  geographyFromBytes(bytes) {
92993
93054
  return bytes && wkbToGeojson({ view: new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength), offset: 0 });
93055
+ },
93056
+ uuidFromBytes(bytes) {
93057
+ if (!bytes) return void 0;
93058
+ const hex = Array.from(bytes, (b4) => b4.toString(16).padStart(2, "0")).join("");
93059
+ return hex.slice(0, 8) + "-" + hex.slice(8, 12) + "-" + hex.slice(12, 16) + "-" + hex.slice(16, 20) + "-" + hex.slice(20, 32);
92994
93060
  }
92995
93061
  };
92996
93062
  function convertWithDictionary(data, dictionary, encoding, columnDecoder) {
@@ -93008,8 +93074,13 @@ function convertWithDictionary(data, dictionary, encoding, columnDecoder) {
93008
93074
  }
93009
93075
  }
93010
93076
  function convert(data, columnDecoder) {
93011
- const { element, parsers, utf8 = true } = columnDecoder;
93077
+ const { element, parsers, utf8 = true, schemaPath } = columnDecoder;
93012
93078
  const { type, converted_type: ctype, logical_type: ltype } = element;
93079
+ const nullable = element.repetition_type !== "REQUIRED";
93080
+ const isVariant = schemaPath?.some((s7) => s7.element.logical_type?.type === "VARIANT");
93081
+ if (isVariant && type === "BYTE_ARRAY" && ctype !== "UTF8" && ltype?.type !== "STRING") {
93082
+ return data;
93083
+ }
93013
93084
  if (ctype === "DECIMAL") {
93014
93085
  const scale2 = element.scale || 0;
93015
93086
  const factor = 10 ** -scale2;
@@ -93036,7 +93107,7 @@ function convert(data, columnDecoder) {
93036
93107
  return Array.from(data).map((v3) => parsers.timestampFromMicroseconds(v3));
93037
93108
  }
93038
93109
  if (ctype === "JSON") {
93039
- return data.map((v3) => JSON.parse(decoder.decode(v3)));
93110
+ return data.map((v3) => parsers.jsonFromBytes(v3));
93040
93111
  }
93041
93112
  if (ctype === "BSON") {
93042
93113
  throw new Error("parquet bson not supported");
@@ -93050,23 +93121,24 @@ function convert(data, columnDecoder) {
93050
93121
  if (ltype?.type === "GEOGRAPHY") {
93051
93122
  return data.map((v3) => parsers.geographyFromBytes(v3));
93052
93123
  }
93124
+ if (ltype?.type === "UUID") {
93125
+ return data.map((v3) => parsers.uuidFromBytes(v3));
93126
+ }
93053
93127
  if (ctype === "UTF8" || ltype?.type === "STRING" || utf8 && type === "BYTE_ARRAY") {
93054
93128
  return data.map((v3) => parsers.stringFromBytes(v3));
93055
93129
  }
93056
93130
  if (ctype === "UINT_64" || ltype?.type === "INTEGER" && ltype.bitWidth === 64 && !ltype.isSigned) {
93057
- if (data instanceof BigInt64Array) {
93058
- return new BigUint64Array(data.buffer, data.byteOffset, data.length);
93059
- }
93060
- const arr = new BigUint64Array(data.length);
93061
- for (let i10 = 0; i10 < arr.length; i10++) arr[i10] = BigInt(data[i10]);
93131
+ if (data instanceof BigInt64Array) return new BigUint64Array(data.buffer, data.byteOffset, data.length);
93132
+ const arr = nullable ? new Array(data.length) : new BigUint64Array(data.length);
93133
+ for (let i10 = 0; i10 < arr.length; i10++) arr[i10] = data[i10];
93062
93134
  return arr;
93063
93135
  }
93064
93136
  if (ctype === "UINT_32" || ltype?.type === "INTEGER" && ltype.bitWidth === 32 && !ltype.isSigned) {
93065
- if (data instanceof Int32Array) {
93066
- return new Uint32Array(data.buffer, data.byteOffset, data.length);
93137
+ if (data instanceof Int32Array) return new Uint32Array(data.buffer, data.byteOffset, data.length);
93138
+ const arr = nullable ? new Array(data.length) : new Uint32Array(data.length);
93139
+ for (let i10 = 0; i10 < arr.length; i10++) {
93140
+ arr[i10] = data[i10] < 0 ? 4294967296 + data[i10] : data[i10];
93067
93141
  }
93068
- const arr = new Uint32Array(data.length);
93069
- for (let i10 = 0; i10 < arr.length; i10++) arr[i10] = data[i10];
93070
93142
  return arr;
93071
93143
  }
93072
93144
  if (ltype?.type === "FLOAT16") {
@@ -93202,87 +93274,70 @@ function isFlatColumn(schemaPath) {
93202
93274
  }
93203
93275
 
93204
93276
  // node_modules/hyparquet/src/thrift.js
93205
- var CompactType = {
93206
- STOP: 0,
93207
- TRUE: 1,
93208
- FALSE: 2,
93209
- BYTE: 3,
93210
- I16: 4,
93211
- I32: 5,
93212
- I64: 6,
93213
- DOUBLE: 7,
93214
- BINARY: 8,
93215
- LIST: 9,
93216
- SET: 10,
93217
- MAP: 11,
93218
- STRUCT: 12,
93219
- UUID: 13
93220
- };
93277
+ var STOP = 0;
93278
+ var TRUE = 1;
93279
+ var FALSE = 2;
93280
+ var BYTE = 3;
93281
+ var I16 = 4;
93282
+ var I32 = 5;
93283
+ var I64 = 6;
93284
+ var DOUBLE = 7;
93285
+ var BINARY = 8;
93286
+ var LIST = 9;
93287
+ var STRUCT = 12;
93221
93288
  function deserializeTCompactProtocol(reader) {
93222
- let lastFid = 0;
93223
93289
  const value = {};
93290
+ let fid = 0;
93224
93291
  while (reader.offset < reader.view.byteLength) {
93225
- const [type, fid, newLastFid] = readFieldBegin(reader, lastFid);
93226
- lastFid = newLastFid;
93227
- if (type === CompactType.STOP) {
93228
- break;
93229
- }
93292
+ const byte = reader.view.getUint8(reader.offset++);
93293
+ const type = byte & 15;
93294
+ if (type === STOP) break;
93295
+ const delta = byte >> 4;
93296
+ fid = delta ? fid + delta : readZigZag(reader);
93230
93297
  value[`field_${fid}`] = readElement(reader, type);
93231
93298
  }
93232
93299
  return value;
93233
93300
  }
93234
93301
  function readElement(reader, type) {
93235
93302
  switch (type) {
93236
- case CompactType.TRUE:
93303
+ case TRUE:
93237
93304
  return true;
93238
- case CompactType.FALSE:
93305
+ case FALSE:
93239
93306
  return false;
93240
- case CompactType.BYTE:
93307
+ case BYTE:
93241
93308
  return reader.view.getInt8(reader.offset++);
93242
- case CompactType.I16:
93243
- case CompactType.I32:
93309
+ case I16:
93310
+ case I32:
93244
93311
  return readZigZag(reader);
93245
- case CompactType.I64:
93312
+ case I64:
93246
93313
  return readZigZagBigInt(reader);
93247
- case CompactType.DOUBLE: {
93314
+ case DOUBLE: {
93248
93315
  const value = reader.view.getFloat64(reader.offset, true);
93249
93316
  reader.offset += 8;
93250
93317
  return value;
93251
93318
  }
93252
- case CompactType.BINARY: {
93319
+ case BINARY: {
93253
93320
  const stringLength = readVarInt(reader);
93254
93321
  const strBytes = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, stringLength);
93255
93322
  reader.offset += stringLength;
93256
93323
  return strBytes;
93257
93324
  }
93258
- case CompactType.LIST: {
93325
+ case LIST: {
93259
93326
  const byte = reader.view.getUint8(reader.offset++);
93260
93327
  const elemType = byte & 15;
93261
93328
  let listSize = byte >> 4;
93262
93329
  if (listSize === 15) {
93263
93330
  listSize = readVarInt(reader);
93264
93331
  }
93265
- const boolType = elemType === CompactType.TRUE || elemType === CompactType.FALSE;
93332
+ const boolType = elemType === TRUE || elemType === FALSE;
93266
93333
  const values = new Array(listSize);
93267
93334
  for (let i10 = 0; i10 < listSize; i10++) {
93268
- values[i10] = boolType ? readElement(reader, CompactType.BYTE) === 1 : readElement(reader, elemType);
93335
+ values[i10] = boolType ? readElement(reader, BYTE) === 1 : readElement(reader, elemType);
93269
93336
  }
93270
93337
  return values;
93271
93338
  }
93272
- case CompactType.STRUCT: {
93273
- const structValues = {};
93274
- let lastFid = 0;
93275
- while (true) {
93276
- const [fieldType, fid, newLastFid] = readFieldBegin(reader, lastFid);
93277
- lastFid = newLastFid;
93278
- if (fieldType === CompactType.STOP) {
93279
- break;
93280
- }
93281
- structValues[`field_${fid}`] = readElement(reader, fieldType);
93282
- }
93283
- return structValues;
93284
- }
93285
- // TODO: MAP, SET, UUID
93339
+ case STRUCT:
93340
+ return deserializeTCompactProtocol(reader);
93286
93341
  default:
93287
93342
  throw new Error(`thrift unhandled type: ${type}`);
93288
93343
  }
@@ -93319,16 +93374,6 @@ function readZigZagBigInt(reader) {
93319
93374
  const zigzag = readVarBigInt(reader);
93320
93375
  return zigzag >> 1n ^ -(zigzag & 1n);
93321
93376
  }
93322
- function readFieldBegin(reader, lastFid) {
93323
- const byte = reader.view.getUint8(reader.offset++);
93324
- const type = byte & 15;
93325
- if (type === CompactType.STOP) {
93326
- return [0, 0, lastFid];
93327
- }
93328
- const delta = byte >> 4;
93329
- const fid = delta ? lastFid + delta : readZigZag(reader);
93330
- return [type, fid, fid];
93331
- }
93332
93377
 
93333
93378
  // node_modules/hyparquet/src/geoparquet.js
93334
93379
  function markGeoColumns(schema, key_value_metadata) {
@@ -93336,23 +93381,20 @@ function markGeoColumns(schema, key_value_metadata) {
93336
93381
  const geo = key_value_metadata?.find(({ key }) => key === "geo")?.value;
93337
93382
  const decodedColumns = (geo && JSON.parse(geo)?.columns) ?? {};
93338
93383
  for (const [name, column] of Object.entries(decodedColumns)) {
93339
- if (column.encoding !== "WKB") {
93340
- continue;
93341
- }
93384
+ if (column.encoding !== "WKB") continue;
93342
93385
  const type = column.edges === "spherical" ? "GEOGRAPHY" : "GEOMETRY";
93343
93386
  const id3 = column.crs?.id ?? column.crs?.ids?.[0];
93344
93387
  const crs = id3 ? `${id3.authority}:${id3.code.toString()}` : void 0;
93345
93388
  columns.set(name, { type, crs });
93346
93389
  }
93347
93390
  for (let i10 = 1; i10 < schema.length; i10++) {
93348
- const element = schema[i10];
93349
- const { logical_type, name, num_children, repetition_type, type } = element;
93391
+ const { logical_type, name, num_children, type } = schema[i10];
93350
93392
  if (num_children) {
93351
93393
  i10 += num_children;
93352
93394
  continue;
93353
93395
  }
93354
- if (type === "BYTE_ARRAY" && logical_type === void 0 && repetition_type !== "REPEATED") {
93355
- element.logical_type = columns.get(name);
93396
+ if (type === "BYTE_ARRAY" && !logical_type) {
93397
+ schema[i10].logical_type = columns.get(name);
93356
93398
  }
93357
93399
  }
93358
93400
  }
@@ -93587,6 +93629,7 @@ function convertMetadata(value, schema, parsers) {
93587
93629
  if (type === "INT64" && view.byteLength === 8) return view.getBigInt64(0, true);
93588
93630
  if (converted_type === "DECIMAL") return parseDecimal(value) * 10 ** -(schema.scale || 0);
93589
93631
  if (logical_type?.type === "FLOAT16") return parseFloat16(value);
93632
+ if (logical_type?.type === "UUID") return parsers.uuidFromBytes(value);
93590
93633
  if (type === "FIXED_LEN_BYTE_ARRAY") return value;
93591
93634
  return value;
93592
93635
  }
@@ -93595,16 +93638,216 @@ function convertMetadata(value, schema, parsers) {
93595
93638
  function readOffsetIndex(reader) {
93596
93639
  const thrift = deserializeTCompactProtocol(reader);
93597
93640
  return {
93598
- page_locations: thrift.field_1.map(pageLocation),
93641
+ // @ts-ignore
93642
+ page_locations: thrift.field_1.map((loc) => ({
93643
+ offset: loc.field_1,
93644
+ compressed_page_size: loc.field_2,
93645
+ first_row_index: loc.field_3
93646
+ })),
93599
93647
  unencoded_byte_array_data_bytes: thrift.field_2
93600
93648
  };
93601
93649
  }
93602
- function pageLocation(loc) {
93603
- return {
93604
- offset: loc.field_1,
93605
- compressed_page_size: loc.field_2,
93606
- first_row_index: loc.field_3
93607
- };
93650
+
93651
+ // node_modules/hyparquet/src/xxhash.js
93652
+ var MASK = 0xffffffffffffffffn;
93653
+ var PRIME1 = 0x9e3779b185ebca87n;
93654
+ var PRIME2 = 0xc2b2ae3d27d4eb4fn;
93655
+ var PRIME3 = 0x165667b19e3779f9n;
93656
+ var PRIME4 = 0x85ebca77c2b2ae63n;
93657
+ var PRIME5 = 0x27d4eb2f165667c5n;
93658
+ function rotl64(x3, r11) {
93659
+ return (x3 << r11 | x3 >> 64n - r11) & MASK;
93660
+ }
93661
+ function round2(acc, val) {
93662
+ acc = acc + val * PRIME2 & MASK;
93663
+ acc = rotl64(acc, 31n);
93664
+ return acc * PRIME1 & MASK;
93665
+ }
93666
+ function mergeRound(acc, val) {
93667
+ acc ^= round2(0n, val);
93668
+ return acc * PRIME1 + PRIME4 & MASK;
93669
+ }
93670
+ function xxhash64(input2, seed = 0n) {
93671
+ const view = new DataView(input2.buffer, input2.byteOffset, input2.byteLength);
93672
+ const len = input2.byteLength;
93673
+ let offset3 = 0;
93674
+ let h64;
93675
+ if (len >= 32) {
93676
+ let v1 = seed + PRIME1 + PRIME2 & MASK;
93677
+ let v22 = seed + PRIME2 & MASK;
93678
+ let v3 = seed;
93679
+ let v4 = seed - PRIME1 & MASK;
93680
+ while (offset3 + 32 <= len) {
93681
+ v1 = round2(v1, view.getBigUint64(offset3, true));
93682
+ offset3 += 8;
93683
+ v22 = round2(v22, view.getBigUint64(offset3, true));
93684
+ offset3 += 8;
93685
+ v3 = round2(v3, view.getBigUint64(offset3, true));
93686
+ offset3 += 8;
93687
+ v4 = round2(v4, view.getBigUint64(offset3, true));
93688
+ offset3 += 8;
93689
+ }
93690
+ h64 = rotl64(v1, 1n) + rotl64(v22, 7n) + rotl64(v3, 12n) + rotl64(v4, 18n) & MASK;
93691
+ h64 = mergeRound(h64, v1);
93692
+ h64 = mergeRound(h64, v22);
93693
+ h64 = mergeRound(h64, v3);
93694
+ h64 = mergeRound(h64, v4);
93695
+ } else {
93696
+ h64 = seed + PRIME5 & MASK;
93697
+ }
93698
+ h64 = h64 + BigInt(len) & MASK;
93699
+ while (offset3 + 8 <= len) {
93700
+ h64 ^= round2(0n, view.getBigUint64(offset3, true));
93701
+ h64 = rotl64(h64, 27n) * PRIME1 + PRIME4 & MASK;
93702
+ offset3 += 8;
93703
+ }
93704
+ if (offset3 + 4 <= len) {
93705
+ h64 ^= BigInt(view.getUint32(offset3, true)) * PRIME1 & MASK;
93706
+ h64 = rotl64(h64, 23n) * PRIME2 + PRIME3 & MASK;
93707
+ offset3 += 4;
93708
+ }
93709
+ while (offset3 < len) {
93710
+ h64 ^= BigInt(view.getUint8(offset3)) * PRIME5 & MASK;
93711
+ h64 = rotl64(h64, 11n) * PRIME1 & MASK;
93712
+ offset3 += 1;
93713
+ }
93714
+ h64 ^= h64 >> 33n;
93715
+ h64 = h64 * PRIME2 & MASK;
93716
+ h64 ^= h64 >> 29n;
93717
+ h64 = h64 * PRIME3 & MASK;
93718
+ h64 ^= h64 >> 32n;
93719
+ return h64;
93720
+ }
93721
+
93722
+ // node_modules/hyparquet/src/bloom.js
93723
+ var textEncoder = new TextEncoder();
93724
+ var SALT = new Uint32Array([
93725
+ 1203114875,
93726
+ 1150766481,
93727
+ 2284105051,
93728
+ 2729912477,
93729
+ 1884591559,
93730
+ 770785867,
93731
+ 2667333959,
93732
+ 1550580529
93733
+ ]);
93734
+ function blockIndex(hash, numBlocks) {
93735
+ return Number((hash >> 32n) * BigInt(numBlocks) >> 32n);
93736
+ }
93737
+ function blockMask(hash) {
93738
+ const m5 = new Uint32Array(8);
93739
+ const low = Number(hash & 0xffffffffn) | 0;
93740
+ for (let i10 = 0; i10 < 8; i10++) {
93741
+ m5[i10] = 1 << (Math.imul(low, SALT[i10]) >>> 27);
93742
+ }
93743
+ return m5;
93744
+ }
93745
+ function sbbfContains(blocks, hash) {
93746
+ const offset3 = blockIndex(hash, blocks.length >> 3) << 3;
93747
+ const m5 = blockMask(hash);
93748
+ for (let i10 = 0; i10 < 8; i10++) {
93749
+ if ((blocks[offset3 + i10] & m5[i10]) === 0) return false;
93750
+ }
93751
+ return true;
93752
+ }
93753
+ function readBloomFilter(reader) {
93754
+ const header = deserializeTCompactProtocol(reader);
93755
+ const numBytes = header.field_1;
93756
+ if (typeof numBytes !== "number" || numBytes <= 0 || numBytes % 32 !== 0) return void 0;
93757
+ if (!header.field_2?.field_1) return void 0;
93758
+ if (!header.field_3?.field_1) return void 0;
93759
+ if (!header.field_4?.field_1) return void 0;
93760
+ const { view, offset: offset3 } = reader;
93761
+ if (offset3 + numBytes > view.byteLength) {
93762
+ throw new Error(`parquet bloom filter truncated: need ${numBytes} bytes, have ${view.byteLength - offset3}`);
93763
+ }
93764
+ const blocks = new Uint32Array(numBytes >> 2);
93765
+ for (let i10 = 0; i10 < blocks.length; i10++) {
93766
+ blocks[i10] = view.getUint32(offset3 + i10 * 4, true);
93767
+ }
93768
+ reader.offset = offset3 + numBytes;
93769
+ return { numBytes, blocks };
93770
+ }
93771
+ function hashParquetValue(value, element) {
93772
+ if (value === null || value === void 0) return void 0;
93773
+ const { type, converted_type, logical_type } = element;
93774
+ if (type === "BOOLEAN") {
93775
+ if (typeof value !== "boolean") return void 0;
93776
+ return xxhash64(new Uint8Array([value ? 1 : 0]));
93777
+ }
93778
+ if (type === "FLOAT") {
93779
+ if (typeof value !== "number") return void 0;
93780
+ const buf = new ArrayBuffer(4);
93781
+ new DataView(buf).setFloat32(0, value, true);
93782
+ return xxhash64(new Uint8Array(buf));
93783
+ }
93784
+ if (type === "DOUBLE") {
93785
+ if (typeof value !== "number") return void 0;
93786
+ const buf = new ArrayBuffer(8);
93787
+ new DataView(buf).setFloat64(0, value, true);
93788
+ return xxhash64(new Uint8Array(buf));
93789
+ }
93790
+ if (type === "INT32") {
93791
+ if (converted_type === "DATE" || converted_type === "DECIMAL" || converted_type === "TIME_MILLIS") return void 0;
93792
+ if (logical_type?.type === "DATE" || logical_type?.type === "TIME" || logical_type?.type === "DECIMAL") return void 0;
93793
+ if (typeof value !== "number" || !Number.isInteger(value)) return void 0;
93794
+ const buf = new ArrayBuffer(4);
93795
+ new DataView(buf).setInt32(0, value | 0, true);
93796
+ return xxhash64(new Uint8Array(buf));
93797
+ }
93798
+ if (type === "INT64") {
93799
+ if (converted_type === "TIMESTAMP_MILLIS" || converted_type === "TIMESTAMP_MICROS") return void 0;
93800
+ if (converted_type === "TIME_MICROS" || converted_type === "DECIMAL") return void 0;
93801
+ if (logical_type?.type === "TIMESTAMP" || logical_type?.type === "TIME" || logical_type?.type === "DECIMAL") return void 0;
93802
+ let bigValue;
93803
+ if (typeof value === "bigint") bigValue = value;
93804
+ else if (typeof value === "number" && Number.isSafeInteger(value)) bigValue = BigInt(value);
93805
+ else return void 0;
93806
+ const buf = new ArrayBuffer(8);
93807
+ new DataView(buf).setBigUint64(0, BigInt.asUintN(64, bigValue), true);
93808
+ return xxhash64(new Uint8Array(buf));
93809
+ }
93810
+ if (type === "BYTE_ARRAY") {
93811
+ if (converted_type === "JSON" || converted_type === "BSON" || converted_type === "DECIMAL") return void 0;
93812
+ if (logical_type?.type === "JSON" || logical_type?.type === "BSON" || logical_type?.type === "VARIANT") return void 0;
93813
+ if (logical_type?.type === "GEOMETRY" || logical_type?.type === "GEOGRAPHY") return void 0;
93814
+ if (typeof value === "string") return xxhash64(textEncoder.encode(value));
93815
+ if (value instanceof Uint8Array) return xxhash64(value);
93816
+ return void 0;
93817
+ }
93818
+ if (type === "FIXED_LEN_BYTE_ARRAY") {
93819
+ if (converted_type === "DECIMAL" || converted_type === "INTERVAL") return void 0;
93820
+ if (logical_type?.type === "DECIMAL" || logical_type?.type === "UUID" || logical_type?.type === "FLOAT16") return void 0;
93821
+ if (logical_type?.type === "GEOMETRY" || logical_type?.type === "GEOGRAPHY") return void 0;
93822
+ if (value instanceof Uint8Array) return xxhash64(value);
93823
+ return void 0;
93824
+ }
93825
+ return void 0;
93826
+ }
93827
+ function bloomEligibleColumns(filter) {
93828
+ const out = /* @__PURE__ */ new Set();
93829
+ walkBloomEligible(filter, out);
93830
+ return out;
93831
+ }
93832
+ function walkBloomEligible(filter, out) {
93833
+ if (!filter) return;
93834
+ if ("$and" in filter && Array.isArray(filter.$and)) {
93835
+ for (const sub4 of filter.$and) walkBloomEligible(sub4, out);
93836
+ return;
93837
+ }
93838
+ if ("$or" in filter && Array.isArray(filter.$or)) {
93839
+ for (const sub4 of filter.$or) walkBloomEligible(sub4, out);
93840
+ return;
93841
+ }
93842
+ if ("$nor" in filter) return;
93843
+ for (const [field, condition] of Object.entries(filter)) {
93844
+ if (field.startsWith("$")) continue;
93845
+ if (typeof condition === "object" && condition !== null && !Array.isArray(condition)) {
93846
+ if ("$eq" in condition || "$in" in condition) out.add(field);
93847
+ } else {
93848
+ out.add(field);
93849
+ }
93850
+ }
93608
93851
  }
93609
93852
 
93610
93853
  // node_modules/hyparquet/src/utils.js
@@ -93616,8 +93859,14 @@ function concat(aaa, bbb) {
93616
93859
  }
93617
93860
  function equals(a6, b4, strict = true) {
93618
93861
  if (strict ? a6 === b4 : a6 == b4) return true;
93619
- if (a6 instanceof Uint8Array && b4 instanceof Uint8Array) return equals(Array.from(a6), Array.from(b4), strict);
93620
- if (!a6 || !b4 || typeof a6 !== typeof b4) return false;
93862
+ if (!a6 || !b4 || typeof a6 !== "object" || typeof b4 !== "object") return false;
93863
+ if (a6 instanceof Uint8Array && b4 instanceof Uint8Array) {
93864
+ if (a6.length !== b4.length) return false;
93865
+ for (let i10 = 0; i10 < a6.length; i10++) {
93866
+ if (a6[i10] !== b4[i10]) return false;
93867
+ }
93868
+ return true;
93869
+ }
93621
93870
  if (Array.isArray(a6) && Array.isArray(b4)) {
93622
93871
  if (a6.length !== b4.length) return false;
93623
93872
  for (let i10 = 0; i10 < a6.length; i10++) {
@@ -93625,7 +93874,6 @@ function equals(a6, b4, strict = true) {
93625
93874
  }
93626
93875
  return true;
93627
93876
  }
93628
- if (typeof a6 !== "object") return false;
93629
93877
  const aKeys = Object.keys(a6);
93630
93878
  if (aKeys.length !== Object.keys(b4).length) return false;
93631
93879
  for (const k3 of aKeys) {
@@ -93633,7 +93881,7 @@ function equals(a6, b4, strict = true) {
93633
93881
  }
93634
93882
  return true;
93635
93883
  }
93636
- async function byteLengthFromUrlUsingFetch(url, requestInit = {}, fetchFn = globalThis.fetch) {
93884
+ async function byteLengthFromUrlUsingGet(url, requestInit = {}, fetchFn = globalThis.fetch) {
93637
93885
  const controller = new AbortController();
93638
93886
  const headers = new Headers(requestInit.headers);
93639
93887
  headers.set("Range", "bytes=0-0");
@@ -93661,12 +93909,12 @@ async function byteLengthFromUrl(url, requestInit, customFetch) {
93661
93909
  const fetch4 = customFetch ?? globalThis.fetch;
93662
93910
  const res = await fetch4(url, { ...requestInit, method: "HEAD" });
93663
93911
  if (res.status === 403) {
93664
- return byteLengthFromUrlUsingFetch(url, requestInit, fetch4);
93912
+ return byteLengthFromUrlUsingGet(url, requestInit, fetch4);
93665
93913
  }
93666
93914
  if (!res.ok) throw new Error(`fetch head failed ${res.status}`);
93667
93915
  const length = res.headers.get("Content-Length");
93668
93916
  if (!length) {
93669
- return byteLengthFromUrlUsingFetch(url, requestInit, fetch4);
93917
+ return byteLengthFromUrlUsingGet(url, requestInit, fetch4);
93670
93918
  }
93671
93919
  return parseInt(length);
93672
93920
  }
@@ -93719,9 +93967,9 @@ function columnsNeededForFilter(filter) {
93719
93967
  } else if ("$nor" in filter && Array.isArray(filter.$nor)) {
93720
93968
  columns.push(...filter.$nor.flatMap(columnsNeededForFilter));
93721
93969
  } else {
93722
- columns.push(...Object.keys(filter));
93970
+ columns.push(...Object.keys(filter).map((key) => key.split(".")[0]));
93723
93971
  }
93724
- return columns;
93972
+ return [...new Set(columns)];
93725
93973
  }
93726
93974
  function matchFilter(record, filter, strict = true) {
93727
93975
  if ("$and" in filter && Array.isArray(filter.$and)) {
@@ -93734,7 +93982,7 @@ function matchFilter(record, filter, strict = true) {
93734
93982
  return !filter.$nor.some((subQuery) => matchFilter(record, subQuery, strict));
93735
93983
  }
93736
93984
  return Object.entries(filter).every(([field, condition]) => {
93737
- const value = record[field];
93985
+ const value = resolve(record, field);
93738
93986
  if (typeof condition !== "object" || condition === null || Array.isArray(condition)) {
93739
93987
  return equals(value, condition, strict);
93740
93988
  }
@@ -93752,13 +94000,13 @@ function matchFilter(record, filter, strict = true) {
93752
94000
  });
93753
94001
  });
93754
94002
  }
93755
- function canSkipRowGroup({ rowGroup, physicalColumns, filter, strict = true }) {
94003
+ function canSkipRowGroup({ rowGroup, physicalColumns, filter, strict = true, bloomFilters, schemaElements }) {
93756
94004
  if (!filter) return false;
93757
94005
  if ("$and" in filter && Array.isArray(filter.$and)) {
93758
- return filter.$and.some((subFilter) => canSkipRowGroup({ rowGroup, physicalColumns, filter: subFilter, strict }));
94006
+ return filter.$and.some((subFilter) => canSkipRowGroup({ rowGroup, physicalColumns, filter: subFilter, strict, bloomFilters, schemaElements }));
93759
94007
  }
93760
94008
  if ("$or" in filter && Array.isArray(filter.$or)) {
93761
- return filter.$or.every((subFilter) => canSkipRowGroup({ rowGroup, physicalColumns, filter: subFilter, strict }));
94009
+ return filter.$or.every((subFilter) => canSkipRowGroup({ rowGroup, physicalColumns, filter: subFilter, strict, bloomFilters, schemaElements }));
93762
94010
  }
93763
94011
  if ("$nor" in filter && Array.isArray(filter.$nor)) {
93764
94012
  return false;
@@ -93767,38 +94015,67 @@ function canSkipRowGroup({ rowGroup, physicalColumns, filter, strict = true }) {
93767
94015
  const columnIndex = physicalColumns.indexOf(field);
93768
94016
  if (columnIndex === -1) continue;
93769
94017
  const stats = rowGroup.columns[columnIndex].meta_data?.statistics;
93770
- if (!stats) continue;
93771
- const { min: min6, max: max6, min_value, max_value } = stats;
94018
+ const { min: min6, max: max6, min_value, max_value } = stats || {};
93772
94019
  const minVal = min_value !== void 0 ? min_value : min6;
93773
94020
  const maxVal = max_value !== void 0 ? max_value : max6;
93774
- if (minVal === void 0 || maxVal === void 0) continue;
94021
+ const haveStats = minVal !== void 0 && maxVal !== void 0;
94022
+ const bloom = bloomFilters?.[field];
94023
+ const element = schemaElements?.[field];
93775
94024
  for (const [operator, target] of Object.entries(condition || {})) {
93776
- if (operator === "$gt" && maxVal <= target) return true;
93777
- if (operator === "$gte" && maxVal < target) return true;
93778
- if (operator === "$lt" && minVal >= target) return true;
93779
- if (operator === "$lte" && minVal > target) return true;
93780
- if (operator === "$eq" && (target < minVal || target > maxVal)) return true;
93781
- if (operator === "$ne" && equals(minVal, maxVal, strict) && equals(minVal, target, strict)) return true;
93782
- if (operator === "$in" && Array.isArray(target) && target.every((v3) => v3 < minVal || v3 > maxVal)) return true;
93783
- if (operator === "$nin" && Array.isArray(target) && equals(minVal, maxVal, strict) && target.includes(minVal)) return true;
94025
+ if (haveStats) {
94026
+ if (operator === "$gt" && maxVal <= target) return true;
94027
+ if (operator === "$gte" && maxVal < target) return true;
94028
+ if (operator === "$lt" && minVal >= target) return true;
94029
+ if (operator === "$lte" && minVal > target) return true;
94030
+ if (operator === "$eq" && (target < minVal || target > maxVal)) return true;
94031
+ if (operator === "$ne" && equals(minVal, maxVal, strict) && equals(minVal, target, strict)) return true;
94032
+ if (operator === "$in" && Array.isArray(target) && target.every((v3) => v3 < minVal || v3 > maxVal)) return true;
94033
+ if (operator === "$nin" && Array.isArray(target) && equals(minVal, maxVal, strict) && target.includes(minVal)) return true;
94034
+ }
94035
+ if (bloom && element) {
94036
+ if (operator === "$eq") {
94037
+ const hash = hashParquetValue(target, element);
94038
+ if (hash !== void 0 && !sbbfContains(bloom.blocks, hash)) return true;
94039
+ }
94040
+ if (operator === "$in" && Array.isArray(target) && target.length > 0) {
94041
+ let allAbsent = true;
94042
+ for (const v3 of target) {
94043
+ const h7 = hashParquetValue(v3, element);
94044
+ if (h7 === void 0 || sbbfContains(bloom.blocks, h7)) {
94045
+ allAbsent = false;
94046
+ break;
94047
+ }
94048
+ }
94049
+ if (allAbsent) return true;
94050
+ }
94051
+ }
93784
94052
  }
93785
94053
  }
93786
94054
  return false;
93787
94055
  }
94056
+ function resolve(record, path) {
94057
+ let value = record;
94058
+ for (const part of path.split(".")) {
94059
+ value = value?.[part];
94060
+ }
94061
+ return value;
94062
+ }
93788
94063
 
93789
94064
  // node_modules/hyparquet/src/plan.js
93790
94065
  var runLimit = 1 << 21;
93791
- function parquetPlan({ metadata, rowStart = 0, rowEnd = Infinity, columns, filter, filterStrict = true, useOffsetIndex = false }) {
94066
+ function parquetPlan({ metadata, rowStart = 0, rowEnd = Infinity, columns, filter, filterStrict = true, useOffsetIndex = false, bloomFiltersByGroup, schemaElements }) {
93792
94067
  if (!metadata) throw new Error("parquetPlan requires metadata");
93793
94068
  const groups = [];
93794
94069
  const fetches = [];
93795
94070
  const indexes = [];
93796
94071
  const physicalColumns = getPhysicalColumns(parquetSchema(metadata));
93797
94072
  let groupStart = 0;
94073
+ let rgIdx = 0;
93798
94074
  for (const rowGroup of metadata.row_groups) {
93799
94075
  const groupRows = Number(rowGroup.num_rows);
93800
94076
  const groupEnd = groupStart + groupRows;
93801
- if (groupRows > 0 && groupEnd > rowStart && groupStart < rowEnd && !canSkipRowGroup({ rowGroup, physicalColumns, filter, strict: filterStrict })) {
94077
+ const bloomFilters = bloomFiltersByGroup?.[rgIdx];
94078
+ if (groupRows > 0 && groupEnd > rowStart && groupStart < rowEnd && !canSkipRowGroup({ rowGroup, physicalColumns, filter, strict: filterStrict, bloomFilters, schemaElements })) {
93802
94079
  const chunks = [];
93803
94080
  let groupStartByte = Infinity;
93804
94081
  let groupEndByte = -Infinity;
@@ -93812,7 +94089,7 @@ function parquetPlan({ metadata, rowStart = 0, rowEnd = Infinity, columns, filte
93812
94089
  const endByte = Number(columnOffset + meta.total_compressed_size);
93813
94090
  if (startByte < groupStartByte) groupStartByte = startByte;
93814
94091
  if (endByte > groupEndByte) groupEndByte = endByte;
93815
- if (useOffsetIndex && chunk.offset_index_offset && chunk.offset_index_length) {
94092
+ if (useOffsetIndex && chunk.offset_index_offset && chunk.offset_index_length && (rowStart > groupStart || rowEnd < groupEnd)) {
93816
94093
  const offsetIndexStart = Number(chunk.offset_index_offset);
93817
94094
  chunks.push({
93818
94095
  columnMetadata: meta,
@@ -93820,7 +94097,7 @@ function parquetPlan({ metadata, rowStart = 0, rowEnd = Infinity, columns, filte
93820
94097
  startByte: offsetIndexStart,
93821
94098
  endByte: offsetIndexStart + chunk.offset_index_length
93822
94099
  },
93823
- bounds: { startByte, endByte }
94100
+ range: { startByte, endByte }
93824
94101
  });
93825
94102
  } else {
93826
94103
  chunks.push({
@@ -93852,11 +94129,40 @@ function parquetPlan({ metadata, rowStart = 0, rowEnd = Infinity, columns, filte
93852
94129
  if (run) fetches.push(run);
93853
94130
  }
93854
94131
  groupStart = groupEnd;
94132
+ rgIdx++;
93855
94133
  }
93856
94134
  if (!isFinite(rowEnd)) rowEnd = groupStart;
93857
94135
  fetches.push(...indexes);
93858
94136
  return { metadata, rowStart, rowEnd, columns, fetches, groups };
93859
94137
  }
94138
+ async function prefetchBloomFilters({ file, metadata, filter, filterStrict = true }) {
94139
+ const result = metadata.row_groups.map(() => (
94140
+ /** @type {Record<string, BloomFilter>} */
94141
+ {}
94142
+ ));
94143
+ const eligibleCols = bloomEligibleColumns(filter);
94144
+ if (eligibleCols.size === 0) return result;
94145
+ const physicalColumns = getPhysicalColumns(parquetSchema(metadata));
94146
+ const tasks = [];
94147
+ metadata.row_groups.forEach((rowGroup, rgIdx) => {
94148
+ if (canSkipRowGroup({ rowGroup, physicalColumns, filter, strict: filterStrict })) return;
94149
+ for (const colName of eligibleCols) {
94150
+ const columnIdx = physicalColumns.indexOf(colName);
94151
+ if (columnIdx === -1) continue;
94152
+ const meta = rowGroup.columns[columnIdx]?.meta_data;
94153
+ if (!meta?.bloom_filter_offset || !meta.bloom_filter_length) continue;
94154
+ const start = Number(meta.bloom_filter_offset);
94155
+ const end = start + meta.bloom_filter_length;
94156
+ tasks.push((async () => {
94157
+ const buffer2 = await file.slice(start, end);
94158
+ const bloom = readBloomFilter({ view: new DataView(buffer2), offset: 0 });
94159
+ if (bloom) result[rgIdx][colName] = bloom;
94160
+ })());
94161
+ }
94162
+ });
94163
+ if (tasks.length) await Promise.all(tasks);
94164
+ return result;
94165
+ }
93860
94166
  function prefetchAsyncBuffer(file, { fetches }) {
93861
94167
  const promises = fetches.map(({ startByte, endByte }) => file.slice(startByte, endByte));
93862
94168
  return {
@@ -93881,11 +94187,270 @@ function prefetchAsyncBuffer(file, { fetches }) {
93881
94187
  };
93882
94188
  }
93883
94189
 
94190
+ // node_modules/hyparquet/src/variant.js
94191
+ var decoder3 = new TextDecoder();
94192
+ var metadataCache = /* @__PURE__ */ new WeakMap();
94193
+ function decodeVariantColumn(value, parsers = DEFAULT_PARSERS) {
94194
+ if (Array.isArray(value)) {
94195
+ return value.map((entry) => decodeVariantColumn(entry, parsers));
94196
+ }
94197
+ if (typeof value !== "object") return value;
94198
+ if ("metadata" in value) {
94199
+ const metadata = parseVariantMetadata(value.metadata);
94200
+ const shreddedFields = value.typed_value && decodeTypedValue(value.typed_value, metadata, parsers);
94201
+ const binaryValue = value.value && readVariant(makeReader(value.value), metadata, parsers);
94202
+ if (shreddedFields && binaryValue) {
94203
+ return { ...binaryValue, ...shreddedFields };
94204
+ }
94205
+ return shreddedFields ?? binaryValue;
94206
+ }
94207
+ return value;
94208
+ }
94209
+ function decodeTypedValue(typedValue, metadata, parsers) {
94210
+ if (typedValue instanceof Date) return typedValue;
94211
+ if (typedValue && typeof typedValue === "object" && !Array.isArray(typedValue) && !(typedValue instanceof Uint8Array)) {
94212
+ if ("typed_value" in typedValue && typedValue.typed_value !== null && typedValue.typed_value !== void 0) {
94213
+ return decodeTypedValue(typedValue.typed_value, metadata, parsers);
94214
+ }
94215
+ if ("value" in typedValue && typedValue.value instanceof Uint8Array) {
94216
+ return readVariant(makeReader(typedValue.value), metadata, parsers);
94217
+ }
94218
+ if ("typed_value" in typedValue || "value" in typedValue) {
94219
+ return null;
94220
+ }
94221
+ const result = {};
94222
+ for (const [key, field] of Object.entries(typedValue)) {
94223
+ if (!metadata.dictionary.includes(key)) continue;
94224
+ result[key] = decodeTypedValue(field, metadata, parsers);
94225
+ }
94226
+ return result;
94227
+ }
94228
+ if (typedValue instanceof Uint8Array) {
94229
+ return readVariant(makeReader(typedValue), metadata, parsers);
94230
+ }
94231
+ if (Array.isArray(typedValue)) {
94232
+ return typedValue.map((element) => decodeTypedValue(element, metadata, parsers));
94233
+ }
94234
+ return typedValue;
94235
+ }
94236
+ function makeReader(bytes) {
94237
+ return { view: new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength), offset: 0 };
94238
+ }
94239
+ function parseVariantMetadata(bytes) {
94240
+ let bufferCache = metadataCache.get(bytes.buffer);
94241
+ if (!bufferCache) {
94242
+ bufferCache = /* @__PURE__ */ new Map();
94243
+ metadataCache.set(bytes.buffer, bufferCache);
94244
+ }
94245
+ const key = `${bytes.byteOffset}:${bytes.byteLength}`;
94246
+ const cached = bufferCache.get(key);
94247
+ if (cached) return cached;
94248
+ const reader = makeReader(bytes);
94249
+ const header = reader.view.getUint8(reader.offset++);
94250
+ const version10 = header & 15;
94251
+ if (version10 !== 1) throw new Error(`parquet unsupported variant metadata version: ${version10}`);
94252
+ const sorted = (header >> 4 & 1) === 1;
94253
+ const offsetSize = (header >> 6 & 3) + 1;
94254
+ const dictionarySize = readUnsigned(reader, offsetSize);
94255
+ const offsets = new Array(dictionarySize + 1);
94256
+ for (let i10 = 0; i10 < offsets.length; i10++) {
94257
+ offsets[i10] = readUnsigned(reader, offsetSize);
94258
+ }
94259
+ const base = reader.offset;
94260
+ const dictionary = new Array(dictionarySize);
94261
+ for (let i10 = 0; i10 < dictionarySize; i10++) {
94262
+ const start = offsets[i10];
94263
+ const end = offsets[i10 + 1];
94264
+ const strBytes = new Uint8Array(bytes.buffer, bytes.byteOffset + base + start, end - start);
94265
+ dictionary[i10] = decoder3.decode(strBytes);
94266
+ }
94267
+ const metadata = { dictionary, sorted };
94268
+ bufferCache.set(key, metadata);
94269
+ return metadata;
94270
+ }
94271
+ function readUnsigned(reader, byteWidth2) {
94272
+ let value = 0;
94273
+ for (let i10 = 0; i10 < byteWidth2; i10++) {
94274
+ value |= reader.view.getUint8(reader.offset + i10) << i10 * 8;
94275
+ }
94276
+ reader.offset += byteWidth2;
94277
+ return value;
94278
+ }
94279
+ function readVariant(reader, metadata, parsers) {
94280
+ const typeByte = reader.view.getUint8(reader.offset++);
94281
+ const basicType = typeByte & 3;
94282
+ const header = typeByte >> 2;
94283
+ if (basicType === 0) return readVariantPrimitive(reader, header, parsers);
94284
+ if (basicType === 2) return readVariantObject(reader, header, metadata, parsers);
94285
+ if (basicType === 3) return readVariantArray(reader, header, metadata, parsers);
94286
+ const bytes = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, header);
94287
+ reader.offset += header;
94288
+ return decoder3.decode(bytes);
94289
+ }
94290
+ function readVariantPrimitive(reader, typeId, parsers) {
94291
+ switch (typeId) {
94292
+ case 0:
94293
+ return null;
94294
+ case 1:
94295
+ return true;
94296
+ case 2:
94297
+ return false;
94298
+ case 3: {
94299
+ const value = reader.view.getInt8(reader.offset);
94300
+ reader.offset += 1;
94301
+ return value;
94302
+ }
94303
+ case 4: {
94304
+ const value = reader.view.getInt16(reader.offset, true);
94305
+ reader.offset += 2;
94306
+ return value;
94307
+ }
94308
+ case 5: {
94309
+ const value = reader.view.getInt32(reader.offset, true);
94310
+ reader.offset += 4;
94311
+ return value;
94312
+ }
94313
+ case 6: {
94314
+ const value = reader.view.getBigInt64(reader.offset, true);
94315
+ reader.offset += 8;
94316
+ return value;
94317
+ }
94318
+ case 7: {
94319
+ const value = reader.view.getFloat64(reader.offset, true);
94320
+ reader.offset += 8;
94321
+ return value;
94322
+ }
94323
+ case 8:
94324
+ return readVariantDecimal(reader, 4);
94325
+ case 9:
94326
+ return readVariantDecimal(reader, 8);
94327
+ case 10:
94328
+ return readVariantDecimal(reader, 16);
94329
+ case 11: {
94330
+ const value = reader.view.getInt32(reader.offset, true);
94331
+ reader.offset += 4;
94332
+ return parsers.dateFromDays(value);
94333
+ }
94334
+ case 12:
94335
+ // timestamp_micros (utc)
94336
+ case 13: {
94337
+ const value = reader.view.getBigInt64(reader.offset, true);
94338
+ reader.offset += 8;
94339
+ return parsers.timestampFromMicroseconds(value);
94340
+ }
94341
+ case 14: {
94342
+ const value = reader.view.getFloat32(reader.offset, true);
94343
+ reader.offset += 4;
94344
+ return value;
94345
+ }
94346
+ case 15:
94347
+ return readVariantBinary(reader);
94348
+ case 16: {
94349
+ const bytes = readVariantBinary(reader);
94350
+ return decoder3.decode(bytes);
94351
+ }
94352
+ case 17: {
94353
+ const value = reader.view.getBigInt64(reader.offset, true);
94354
+ reader.offset += 8;
94355
+ return value;
94356
+ }
94357
+ case 18:
94358
+ // timestamp_nanos (utc)
94359
+ case 19: {
94360
+ const value = reader.view.getBigInt64(reader.offset, true);
94361
+ reader.offset += 8;
94362
+ return parsers.timestampFromNanoseconds(value);
94363
+ }
94364
+ case 20: {
94365
+ const bytes = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, 16);
94366
+ reader.offset += 16;
94367
+ const hex = Array.from(bytes, (b4) => b4.toString(16).padStart(2, "0")).join("");
94368
+ return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
94369
+ }
94370
+ default:
94371
+ throw new Error(`parquet unsupported variant primitive type: ${typeId}`);
94372
+ }
94373
+ }
94374
+ function readVariantObject(reader, header, metadata, parsers) {
94375
+ const offsetWidth = (header & 3) + 1;
94376
+ const idWidth = (header >> 2 & 3) + 1;
94377
+ const isLarge = header >> 4 & 1;
94378
+ const numElements = isLarge ? readUnsigned(reader, 4) : reader.view.getUint8(reader.offset++);
94379
+ const fieldIds = new Array(numElements);
94380
+ for (let i10 = 0; i10 < numElements; i10++) {
94381
+ fieldIds[i10] = readUnsigned(reader, idWidth);
94382
+ }
94383
+ const offsets = new Array(numElements + 1);
94384
+ for (let i10 = 0; i10 < offsets.length; i10++) {
94385
+ offsets[i10] = readUnsigned(reader, offsetWidth);
94386
+ }
94387
+ const out = {};
94388
+ for (let i10 = 0; i10 < numElements; i10++) {
94389
+ const key = metadata.dictionary[fieldIds[i10]];
94390
+ const valueReader = {
94391
+ view: reader.view,
94392
+ offset: reader.offset + offsets[i10]
94393
+ };
94394
+ out[key] = readVariant(valueReader, metadata, parsers);
94395
+ }
94396
+ reader.offset += offsets[offsets.length - 1];
94397
+ return out;
94398
+ }
94399
+ function readVariantArray(reader, header, metadata, parsers) {
94400
+ const fieldOffsetSize = header & 3;
94401
+ const isLarge = header >> 2 & 1;
94402
+ const offsetWidth = fieldOffsetSize + 1;
94403
+ const numElements = readUnsigned(reader, isLarge ? 4 : 1);
94404
+ const offsets = new Array(numElements + 1);
94405
+ for (let i10 = 0; i10 < offsets.length; i10++) {
94406
+ offsets[i10] = readUnsigned(reader, offsetWidth);
94407
+ }
94408
+ const valuesStart = reader.offset;
94409
+ const result = new Array(numElements);
94410
+ for (let i10 = 0; i10 < numElements; i10++) {
94411
+ const valueReader = {
94412
+ view: reader.view,
94413
+ offset: valuesStart + offsets[i10]
94414
+ };
94415
+ result[i10] = readVariant(valueReader, metadata, parsers);
94416
+ }
94417
+ reader.offset = valuesStart + offsets[offsets.length - 1];
94418
+ return result;
94419
+ }
94420
+ function readVariantDecimal(reader, width) {
94421
+ const scale2 = reader.view.getUint8(reader.offset);
94422
+ reader.offset += 1;
94423
+ let unscaled;
94424
+ if (width === 4) {
94425
+ unscaled = BigInt(reader.view.getInt32(reader.offset, true));
94426
+ reader.offset += 4;
94427
+ } else if (width === 8) {
94428
+ unscaled = reader.view.getBigInt64(reader.offset, true);
94429
+ reader.offset += 8;
94430
+ } else {
94431
+ const low = reader.view.getBigUint64(reader.offset, true);
94432
+ const high = reader.view.getBigInt64(reader.offset + 8, true);
94433
+ unscaled = high << 64n | low;
94434
+ reader.offset += 16;
94435
+ }
94436
+ return Number(unscaled) * 10 ** -scale2;
94437
+ }
94438
+ function readVariantBinary(reader) {
94439
+ const length = reader.view.getUint32(reader.offset, true);
94440
+ reader.offset += 4;
94441
+ const bytes = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, length);
94442
+ reader.offset += length;
94443
+ return bytes;
94444
+ }
94445
+
93884
94446
  // node_modules/hyparquet/src/assemble.js
93885
94447
  function assembleLists(output, definitionLevels, repetitionLevels, values, schemaPath) {
93886
- const n13 = definitionLevels?.length || repetitionLevels.length;
93887
- if (!n13) return values;
93888
94448
  const maxDefinitionLevel = getMaxDefinitionLevel(schemaPath);
94449
+ if (!definitionLevels?.length && !repetitionLevels.length) {
94450
+ if (!maxDefinitionLevel || !values.length) return values;
94451
+ definitionLevels = new Array(values.length).fill(maxDefinitionLevel);
94452
+ }
94453
+ const n13 = definitionLevels?.length || repetitionLevels.length;
93889
94454
  const repetitionPath = schemaPath.map(({ element }) => element.repetition_type);
93890
94455
  let valueIndex = 0;
93891
94456
  const containerStack = [output];
@@ -93944,7 +94509,7 @@ function assembleLists(output, definitionLevels, repetitionLevels, values, schem
93944
94509
  }
93945
94510
  return output;
93946
94511
  }
93947
- function assembleNested(subcolumnData, schema, depth = 0) {
94512
+ function assembleNested(subcolumnData, schema, parsers, depth = 0) {
93948
94513
  const path = schema.path.join(".");
93949
94514
  const optional = schema.element.repetition_type === "OPTIONAL";
93950
94515
  const nextDepth = optional ? depth + 1 : depth;
@@ -93955,7 +94520,7 @@ function assembleNested(subcolumnData, schema, depth = 0) {
93955
94520
  sublist = sublist.children[0];
93956
94521
  subDepth++;
93957
94522
  }
93958
- assembleNested(subcolumnData, sublist, subDepth);
94523
+ assembleNested(subcolumnData, sublist, parsers, subDepth);
93959
94524
  const subcolumn = sublist.path.join(".");
93960
94525
  const values = subcolumnData.get(subcolumn);
93961
94526
  if (!values) throw new Error("parquet list column missing values");
@@ -93966,8 +94531,8 @@ function assembleNested(subcolumnData, schema, depth = 0) {
93966
94531
  }
93967
94532
  if (isMapLike(schema)) {
93968
94533
  const mapName = schema.children[0].element.name;
93969
- assembleNested(subcolumnData, schema.children[0].children[0], nextDepth + 1);
93970
- assembleNested(subcolumnData, schema.children[0].children[1], nextDepth + 1);
94534
+ assembleNested(subcolumnData, schema.children[0].children[0], parsers, nextDepth + 1);
94535
+ assembleNested(subcolumnData, schema.children[0].children[1], parsers, nextDepth + 1);
93971
94536
  const keys = subcolumnData.get(`${path}.${mapName}.key`);
93972
94537
  const values = subcolumnData.get(`${path}.${mapName}.value`);
93973
94538
  if (!keys) throw new Error("parquet map column missing keys");
@@ -93986,7 +94551,7 @@ function assembleNested(subcolumnData, schema, depth = 0) {
93986
94551
  const invertDepth = schema.element.repetition_type === "REQUIRED" ? depth : depth + 1;
93987
94552
  const struct = {};
93988
94553
  for (const child of schema.children) {
93989
- assembleNested(subcolumnData, child, invertDepth);
94554
+ assembleNested(subcolumnData, child, parsers, invertDepth);
93990
94555
  const childData = subcolumnData.get(child.path.join("."));
93991
94556
  if (!childData) throw new Error("parquet struct missing child data");
93992
94557
  struct[child.element.name] = childData;
@@ -93994,7 +94559,10 @@ function assembleNested(subcolumnData, schema, depth = 0) {
93994
94559
  for (const child of schema.children) {
93995
94560
  subcolumnData.delete(child.path.join("."));
93996
94561
  }
93997
- const inverted = invertStruct(struct, invertDepth);
94562
+ let inverted = invertStruct(struct, invertDepth);
94563
+ if (schema.element.logical_type?.type === "VARIANT") {
94564
+ inverted = decodeVariantColumn(inverted, parsers);
94565
+ }
93998
94566
  if (optional) flattenAtDepth(inverted, depth);
93999
94567
  subcolumnData.set(path, inverted);
94000
94568
  }
@@ -94016,9 +94584,9 @@ function assembleMaps(keys, values, depth) {
94016
94584
  } else {
94017
94585
  if (keys[i10]) {
94018
94586
  const obj = {};
94019
- for (let j3 = 0; j3 < keys[i10].length; j3++) {
94020
- const value = values[i10][j3];
94021
- obj[keys[i10][j3]] = value === void 0 ? null : value;
94587
+ for (let j2 = 0; j2 < keys[i10].length; j2++) {
94588
+ const value = values[i10][j2];
94589
+ obj[keys[i10][j2]] = value === void 0 ? null : value;
94022
94590
  }
94023
94591
  out.push(obj);
94024
94592
  } else {
@@ -94088,7 +94656,7 @@ function deltaBinaryUnpack(reader, count2, output) {
94088
94656
  reader.offset += Math.ceil((miniblockCount * Number(bitWidth2) + Number(bitpackPos)) / 8);
94089
94657
  }
94090
94658
  } else {
94091
- for (let j3 = 0; j3 < valuesPerMiniblock && outputIndex < count2; j3++) {
94659
+ for (let j2 = 0; j2 < valuesPerMiniblock && outputIndex < count2; j2++) {
94092
94660
  value += minDelta;
94093
94661
  output[outputIndex++] = int32 ? Number(value) : value;
94094
94662
  }
@@ -94123,9 +94691,6 @@ function deltaByteArray(reader, count2, output) {
94123
94691
  }
94124
94692
 
94125
94693
  // node_modules/hyparquet/src/encoding.js
94126
- function bitWidth(value) {
94127
- return 32 - Math.clz32(value);
94128
- }
94129
94694
  function readRleBitPackedHybrid(reader, width, output, length) {
94130
94695
  if (length === void 0) {
94131
94696
  length = reader.view.getUint32(reader.offset, true);
@@ -94535,6 +95100,9 @@ function readDefinitionLevelsV2(reader, daph2, schemaPath) {
94535
95100
  return values;
94536
95101
  }
94537
95102
  }
95103
+ function bitWidth(value) {
95104
+ return 32 - Math.clz32(value);
95105
+ }
94538
95106
 
94539
95107
  // node_modules/hyparquet/src/column.js
94540
95108
  function readColumn(reader, { groupStart, selectStart, selectEnd }, columnDecoder, onPage) {
@@ -94544,6 +95112,7 @@ function readColumn(reader, { groupStart, selectStart, selectEnd }, columnDecode
94544
95112
  let dictionary = void 0;
94545
95113
  let lastChunk = void 0;
94546
95114
  let rowCount = 0;
95115
+ let skipped = 0;
94547
95116
  const emitLastChunk = onPage && (() => {
94548
95117
  lastChunk && onPage({
94549
95118
  pathInSchema,
@@ -94556,23 +95125,28 @@ function readColumn(reader, { groupStart, selectStart, selectEnd }, columnDecode
94556
95125
  if (reader.offset >= reader.view.byteLength - 1) break;
94557
95126
  const header = parquetHeader(reader);
94558
95127
  if (header.type === "DICTIONARY_PAGE") {
94559
- dictionary = readPage(reader, header, columnDecoder, dictionary, void 0, 0);
94560
- dictionary = convert(dictionary, columnDecoder);
95128
+ const { data } = readPage(reader, header, columnDecoder, dictionary, void 0, 0);
95129
+ if (data) dictionary = convert(data, columnDecoder);
94561
95130
  } else {
94562
95131
  const lastChunkLength = lastChunk?.length || 0;
94563
- const values = readPage(reader, header, columnDecoder, dictionary, lastChunk, selectStart - rowCount);
94564
- if (lastChunk === values) {
94565
- rowCount += values.length - lastChunkLength;
94566
- } else {
95132
+ const result = readPage(reader, header, columnDecoder, dictionary, lastChunk, selectStart - rowCount);
95133
+ if (result.skipped) {
95134
+ if (!chunks.length) {
95135
+ skipped += result.skipped;
95136
+ }
95137
+ rowCount += result.skipped;
95138
+ } else if (result.data && lastChunk === result.data) {
95139
+ rowCount += result.data.length - lastChunkLength;
95140
+ } else if (result.data && result.data.length) {
94567
95141
  emitLastChunk?.();
94568
- chunks.push(values);
94569
- rowCount += values.length;
94570
- lastChunk = values;
95142
+ chunks.push(result.data);
95143
+ rowCount += result.data.length;
95144
+ lastChunk = result.data;
94571
95145
  }
94572
95146
  }
94573
95147
  }
94574
95148
  emitLastChunk?.();
94575
- return chunks;
95149
+ return { data: chunks, skipped };
94576
95150
  }
94577
95151
  function readPage(reader, header, columnDecoder, dictionary, previousChunk, pageStart) {
94578
95152
  const { type, element, schemaPath, codec, compressors } = columnDecoder;
@@ -94586,32 +95160,25 @@ function readPage(reader, header, columnDecoder, dictionary, previousChunk, page
94586
95160
  const daph = header.data_page_header;
94587
95161
  if (!daph) throw new Error("parquet data page header is undefined");
94588
95162
  if (pageStart > daph.num_values && isFlatColumn(schemaPath)) {
94589
- return new Array(daph.num_values);
95163
+ return { skipped: daph.num_values };
94590
95164
  }
94591
95165
  const page = decompressPage(compressedBytes, Number(header.uncompressed_page_size), codec, compressors);
94592
95166
  const { definitionLevels, repetitionLevels, dataPage } = readDataPage(page, daph, columnDecoder);
94593
- let values = convertWithDictionary(dataPage, dictionary, daph.encoding, columnDecoder);
94594
- if (repetitionLevels.length || definitionLevels?.length) {
94595
- const output = Array.isArray(previousChunk) ? previousChunk : [];
94596
- return assembleLists(output, definitionLevels, repetitionLevels, values, schemaPath);
94597
- } else {
94598
- for (let i10 = 2; i10 < schemaPath.length; i10++) {
94599
- if (schemaPath[i10].element.repetition_type !== "REQUIRED") {
94600
- values = Array.from(values, (e12) => [e12]);
94601
- }
94602
- }
94603
- return values;
94604
- }
95167
+ const values = convertWithDictionary(dataPage, dictionary, daph.encoding, columnDecoder);
95168
+ const output = Array.isArray(previousChunk) ? previousChunk : [];
95169
+ const assembled = assembleLists(output, definitionLevels, repetitionLevels, values, schemaPath);
95170
+ return { skipped: 0, data: assembled };
94605
95171
  } else if (header.type === "DATA_PAGE_V2") {
94606
95172
  const daph2 = header.data_page_header_v2;
94607
95173
  if (!daph2) throw new Error("parquet data page header v2 is undefined");
94608
95174
  if (pageStart > daph2.num_rows) {
94609
- return new Array(daph2.num_values);
95175
+ return { skipped: daph2.num_values };
94610
95176
  }
94611
95177
  const { definitionLevels, repetitionLevels, dataPage } = readDataPageV2(compressedBytes, header, columnDecoder);
94612
95178
  const values = convertWithDictionary(dataPage, dictionary, daph2.encoding, columnDecoder);
94613
95179
  const output = Array.isArray(previousChunk) ? previousChunk : [];
94614
- return assembleLists(output, definitionLevels, repetitionLevels, values, schemaPath);
95180
+ const assembled = assembleLists(output, definitionLevels, repetitionLevels, values, schemaPath);
95181
+ return { skipped: 0, data: assembled };
94615
95182
  } else if (header.type === "DICTIONARY_PAGE") {
94616
95183
  const diph = header.dictionary_page_header;
94617
95184
  if (!diph) throw new Error("parquet dictionary page header is undefined");
@@ -94622,7 +95189,8 @@ function readPage(reader, header, columnDecoder, dictionary, previousChunk, page
94622
95189
  compressors
94623
95190
  );
94624
95191
  const reader2 = { view: new DataView(page.buffer, page.byteOffset, page.byteLength), offset: 0 };
94625
- return readPlain(reader2, type, diph.num_values, element.type_length);
95192
+ const dictArray = readPlain(reader2, type, diph.num_values, element.type_length);
95193
+ return { skipped: 0, data: dictArray };
94626
95194
  } else {
94627
95195
  throw new Error(`parquet unsupported page type: ${header.type}`);
94628
95196
  }
@@ -94678,68 +95246,62 @@ function parquetHeader(reader) {
94678
95246
 
94679
95247
  // node_modules/hyparquet/src/rowgroup.js
94680
95248
  function readRowGroup(options, { metadata }, groupPlan) {
94681
- const { file, compressors, utf8 } = options;
94682
95249
  const asyncColumns = [];
94683
- const parsers = { ...DEFAULT_PARSERS, ...options.parsers };
94684
- for (const chunkPlan of groupPlan.chunks) {
94685
- const { columnMetadata } = chunkPlan;
94686
- const schemaPath = getSchemaPath(metadata.schema, columnMetadata.path_in_schema);
95250
+ for (const chunk of groupPlan.chunks) {
95251
+ const { data_page_offset, dictionary_page_offset, path_in_schema: pathInSchema } = chunk.columnMetadata;
95252
+ const schemaPath = getSchemaPath(metadata.schema, pathInSchema);
94687
95253
  const columnDecoder = {
94688
- pathInSchema: columnMetadata.path_in_schema,
94689
- type: columnMetadata.type,
95254
+ pathInSchema,
94690
95255
  element: schemaPath[schemaPath.length - 1].element,
94691
95256
  schemaPath,
94692
- codec: columnMetadata.codec,
94693
- parsers,
94694
- compressors,
94695
- utf8
95257
+ parsers: { ...DEFAULT_PARSERS, ...options.parsers },
95258
+ ...options,
95259
+ ...chunk.columnMetadata
94696
95260
  };
94697
- if (!("offsetIndex" in chunkPlan)) {
95261
+ let { startByte, endByte } = chunk.range;
95262
+ if (!("offsetIndex" in chunk)) {
94698
95263
  asyncColumns.push({
94699
- pathInSchema: columnMetadata.path_in_schema,
94700
- data: Promise.resolve(file.slice(chunkPlan.range.startByte, chunkPlan.range.endByte)).then((buffer2) => {
95264
+ pathInSchema,
95265
+ data: Promise.resolve(options.file.slice(startByte, endByte)).then((buffer2) => {
94701
95266
  const reader = { view: new DataView(buffer2), offset: 0 };
94702
- return {
94703
- pageSkip: 0,
94704
- data: readColumn(reader, groupPlan, columnDecoder, options.onPage)
94705
- };
95267
+ return readColumn(reader, groupPlan, columnDecoder, options.onPage);
94706
95268
  })
94707
95269
  });
94708
95270
  continue;
94709
95271
  }
94710
95272
  asyncColumns.push({
94711
- pathInSchema: columnMetadata.path_in_schema,
95273
+ pathInSchema,
94712
95274
  // fetch offset index
94713
- data: Promise.resolve(file.slice(chunkPlan.offsetIndex.startByte, chunkPlan.offsetIndex.endByte)).then(async (arrayBuffer) => {
94714
- const offsetIndex = readOffsetIndex({ view: new DataView(arrayBuffer), offset: 0 });
95275
+ data: Promise.resolve(options.file.slice(chunk.offsetIndex.startByte, chunk.offsetIndex.endByte)).then(async (arrayBuffer) => {
94715
95276
  const { selectStart, selectEnd } = groupPlan;
94716
- const pages = offsetIndex.page_locations;
94717
- let startByte = NaN;
94718
- let endByte = NaN;
94719
- let pageSkip = 0;
95277
+ const pages = readOffsetIndex({ view: new DataView(arrayBuffer), offset: 0 }).page_locations;
95278
+ let skipped = -1;
95279
+ const hasDict = dictionary_page_offset || data_page_offset < pages[0].offset;
94720
95280
  for (let i10 = 0; i10 < pages.length; i10++) {
94721
95281
  const page = pages[i10];
94722
95282
  const pageStart = Number(page.first_row_index);
94723
95283
  const pageEnd = i10 + 1 < pages.length ? Number(pages[i10 + 1].first_row_index) : groupPlan.groupRows;
94724
- if (pageStart < selectEnd && pageEnd > selectStart) {
94725
- if (Number.isNaN(startByte)) {
94726
- startByte = Number(page.offset);
94727
- pageSkip = pageStart;
94728
- }
95284
+ if (skipped < 0 && !hasDict && pageEnd > selectStart) {
95285
+ startByte = Number(page.offset);
95286
+ skipped = pageStart;
95287
+ }
95288
+ if (pageStart < selectEnd) {
94729
95289
  endByte = Number(page.offset) + page.compressed_page_size;
94730
95290
  }
94731
95291
  }
94732
- const buffer2 = await file.slice(startByte, endByte);
95292
+ if (skipped < 0) skipped = 0;
95293
+ const buffer2 = await options.file.slice(startByte, endByte);
94733
95294
  const reader = { view: new DataView(buffer2), offset: 0 };
94734
- const adjustedGroupPlan = pageSkip ? {
95295
+ const adjustedGroupPlan = skipped ? {
94735
95296
  ...groupPlan,
94736
- groupStart: groupPlan.groupStart + pageSkip,
94737
- selectStart: groupPlan.selectStart - pageSkip,
94738
- selectEnd: groupPlan.selectEnd - pageSkip
95297
+ groupStart: groupPlan.groupStart + skipped,
95298
+ selectStart: groupPlan.selectStart - skipped,
95299
+ selectEnd: groupPlan.selectEnd - skipped
94739
95300
  } : groupPlan;
95301
+ const { data, skipped: columnSkipped } = readColumn(reader, adjustedGroupPlan, columnDecoder, options.onPage);
94740
95302
  return {
94741
- data: readColumn(reader, adjustedGroupPlan, columnDecoder, options.onPage),
94742
- pageSkip
95303
+ data,
95304
+ skipped: skipped + columnSkipped
94743
95305
  };
94744
95306
  })
94745
95307
  });
@@ -94747,69 +95309,71 @@ function readRowGroup(options, { metadata }, groupPlan) {
94747
95309
  return { groupStart: groupPlan.groupStart, groupRows: groupPlan.groupRows, asyncColumns };
94748
95310
  }
94749
95311
  async function asyncGroupToRows({ asyncColumns }, selectStart, selectEnd, columns, rowFormat) {
94750
- const asyncPages = await Promise.all(asyncColumns.map(async ({ data }) => {
94751
- const pages = await data;
94752
- return {
94753
- ...pages,
94754
- data: flatten(pages.data)
94755
- };
94756
- }));
94757
- const includedColumnNames = asyncColumns.map((child) => child.pathInSchema[0]).filter((name) => !columns || columns.includes(name));
94758
- const columnOrder = columns ?? includedColumnNames;
94759
- const columnIndexes = columnOrder.map((name) => asyncColumns.findIndex((column) => column.pathInSchema[0] === name));
95312
+ const asyncPages = await Promise.all(asyncColumns.map(
95313
+ (column) => column.data.then(({ skipped, data }) => ({ skipped, data: flatten(data) }))
95314
+ ));
94760
95315
  const selectCount = selectEnd - selectStart;
94761
95316
  if (rowFormat === "object") {
94762
95317
  const groupData2 = Array(selectCount);
94763
95318
  for (let selectRow = 0; selectRow < selectCount; selectRow++) {
94764
- const row = selectStart + selectRow;
94765
95319
  const rowData = {};
94766
95320
  for (let i10 = 0; i10 < asyncColumns.length; i10++) {
94767
- const { data, pageSkip } = asyncPages[i10];
94768
- rowData[asyncColumns[i10].pathInSchema[0]] = data[row - pageSkip];
95321
+ const { data, skipped } = asyncPages[i10];
95322
+ rowData[asyncColumns[i10].pathInSchema[0]] = data[selectStart + selectRow - skipped];
94769
95323
  }
94770
95324
  groupData2[selectRow] = rowData;
94771
95325
  }
94772
95326
  return groupData2;
94773
95327
  }
95328
+ const includedColumnNames = asyncColumns.map((child) => child.pathInSchema[0]).filter((name) => !columns || columns.includes(name));
95329
+ const columnOrder = columns ?? includedColumnNames;
95330
+ const columnIndexes = columnOrder.map((name) => asyncColumns.findIndex((column) => column.pathInSchema[0] === name));
94774
95331
  const groupData = Array(selectCount);
94775
95332
  for (let selectRow = 0; selectRow < selectCount; selectRow++) {
94776
- const row = selectStart + selectRow;
94777
95333
  const rowData = Array(asyncColumns.length);
94778
95334
  for (let i10 = 0; i10 < columnOrder.length; i10++) {
94779
95335
  const colIdx = columnIndexes[i10];
94780
- if (colIdx >= 0) {
94781
- const { data, pageSkip } = asyncPages[colIdx];
94782
- rowData[i10] = data[row - pageSkip];
94783
- }
95336
+ if (colIdx < 0) throw new Error(`parquet column not found: ${columnOrder[i10]}`);
95337
+ const { data, skipped } = asyncPages[colIdx];
95338
+ rowData[i10] = data[selectStart + selectRow - skipped];
94784
95339
  }
94785
95340
  groupData[selectRow] = rowData;
94786
95341
  }
94787
95342
  return groupData;
94788
95343
  }
94789
- function assembleAsync(asyncRowGroup, schemaTree2) {
95344
+ function assembleAsync(asyncRowGroup, schemaTree2, parsers) {
94790
95345
  const { asyncColumns } = asyncRowGroup;
95346
+ parsers = { ...DEFAULT_PARSERS, ...parsers };
94791
95347
  const assembled = [];
94792
95348
  for (const child of schemaTree2.children) {
94793
95349
  if (child.children.length) {
94794
95350
  const childColumns = asyncColumns.filter((column) => column.pathInSchema[0] === child.element.name);
94795
95351
  if (!childColumns.length) continue;
94796
- const flatData = /* @__PURE__ */ new Map();
94797
- const data = Promise.all(childColumns.map((column) => {
94798
- return column.data.then(({ data: data2 }) => {
94799
- flatData.set(column.pathInSchema.join("."), flatten(data2));
94800
- });
94801
- })).then(() => {
94802
- assembleNested(flatData, child);
94803
- const flatColumn = flatData.get(child.path.join("."));
94804
- if (!flatColumn) throw new Error("parquet column data not assembled");
94805
- return { data: [flatColumn], pageSkip: 0 };
95352
+ assembled.push({
95353
+ pathInSchema: child.path,
95354
+ data: (async () => {
95355
+ const resolved = await Promise.all(childColumns.map((c8) => c8.data));
95356
+ const subcolumnData = /* @__PURE__ */ new Map();
95357
+ let minLength = Infinity;
95358
+ for (let i10 = 0; i10 < childColumns.length; i10++) {
95359
+ const flat = flatten(resolved[i10].data);
95360
+ subcolumnData.set(childColumns[i10].pathInSchema.join("."), flat);
95361
+ minLength = Math.min(minLength, flat.length);
95362
+ }
95363
+ for (const [key, value] of subcolumnData) {
95364
+ if (value.length > minLength) {
95365
+ subcolumnData.set(key, value.slice(0, minLength));
95366
+ }
95367
+ }
95368
+ assembleNested(subcolumnData, child, parsers);
95369
+ const assembled2 = subcolumnData.get(child.element.name);
95370
+ if (!assembled2) throw new Error("parquet column data not assembled");
95371
+ return { data: [assembled2], skipped: 0 };
95372
+ })()
94806
95373
  });
94807
- assembled.push({ pathInSchema: child.path, data });
94808
95374
  } else {
94809
95375
  const asyncColumn = asyncColumns.find((column) => column.pathInSchema[0] === child.element.name);
94810
- if (asyncColumn) {
94811
- assembled.push(asyncColumn);
94812
- }
95376
+ if (asyncColumn) assembled.push(asyncColumn);
94813
95377
  }
94814
95378
  }
94815
95379
  return { ...asyncRowGroup, asyncColumns: assembled };
@@ -94839,21 +95403,20 @@ async function parquetRead(options) {
94839
95403
  requiresProjection = true;
94840
95404
  }
94841
95405
  }
94842
- const readOptions = readColumns !== columns ? { ...options, columns: readColumns } : options;
95406
+ let readOptions = readColumns !== columns ? { ...options, columns: readColumns } : options;
95407
+ readOptions = await withBloomFilters(readOptions);
94843
95408
  const asyncGroups = parquetReadAsync(readOptions);
94844
95409
  if (!onComplete && !onChunk) {
94845
- for (const { asyncColumns } of asyncGroups) {
94846
- for (const { data } of asyncColumns) await data;
94847
- }
95410
+ await awaitAllColumns(asyncGroups);
94848
95411
  return;
94849
95412
  }
94850
95413
  const schemaTree2 = parquetSchema(options.metadata);
94851
- const assembled = asyncGroups.map((arg) => assembleAsync(arg, schemaTree2));
95414
+ const assembled = asyncGroups.map((arg) => assembleAsync(arg, schemaTree2, options.parsers));
94852
95415
  if (onChunk) {
94853
95416
  for (const asyncGroup of assembled) {
94854
95417
  for (const asyncColumn of asyncGroup.asyncColumns) {
94855
- asyncColumn.data.then(({ data, pageSkip }) => {
94856
- let rowStart2 = asyncGroup.groupStart + pageSkip;
95418
+ asyncColumn.data.then(({ data, skipped }) => {
95419
+ let rowStart2 = asyncGroup.groupStart + skipped;
94857
95420
  for (const columnData of data) {
94858
95421
  onChunk({
94859
95422
  columnName: asyncColumn.pathInSchema[0],
@@ -94863,11 +95426,13 @@ async function parquetRead(options) {
94863
95426
  });
94864
95427
  rowStart2 += columnData.length;
94865
95428
  }
95429
+ }, () => {
94866
95430
  });
94867
95431
  }
94868
95432
  }
94869
95433
  }
94870
95434
  if (onComplete) {
95435
+ await awaitAllColumns(assembled);
94871
95436
  const rows = [];
94872
95437
  for (const asyncGroup of assembled) {
94873
95438
  const selectStart = Math.max(rowStart - asyncGroup.groupStart, 0);
@@ -94894,17 +95459,38 @@ async function parquetRead(options) {
94894
95459
  }
94895
95460
  onComplete(rows);
94896
95461
  } else {
94897
- for (const { asyncColumns } of assembled) {
94898
- for (const { data } of asyncColumns) await data;
94899
- }
95462
+ await awaitAllColumns(assembled);
94900
95463
  }
94901
95464
  }
95465
+ async function awaitAllColumns(asyncGroups) {
95466
+ const all4 = asyncGroups.flatMap((g3) => g3.asyncColumns.map((c8) => c8.data));
95467
+ const results = await Promise.allSettled(all4);
95468
+ const failed = results.find((r11) => r11.status === "rejected");
95469
+ if (failed) throw failed.reason;
95470
+ }
94902
95471
  function parquetReadAsync(options) {
94903
95472
  if (!options.metadata) throw new Error("parquet requires metadata");
94904
95473
  const plan = parquetPlan(options);
94905
95474
  options.file = prefetchAsyncBuffer(options.file, plan);
94906
95475
  return plan.groups.map((groupPlan) => readRowGroup(options, plan, groupPlan));
94907
95476
  }
95477
+ async function withBloomFilters(options) {
95478
+ if (!options.useBloomFilters) return options;
95479
+ if (!options.filter || !options.metadata) return options;
95480
+ const schemaTree2 = parquetSchema(options.metadata);
95481
+ const schemaElements = {};
95482
+ for (const child of schemaTree2.children) schemaElements[child.element.name] = child.element;
95483
+ const bloomFiltersByGroup = await prefetchBloomFilters({
95484
+ file: options.file,
95485
+ metadata: options.metadata,
95486
+ filter: options.filter,
95487
+ filterStrict: options.filterStrict
95488
+ });
95489
+ return (
95490
+ /** @type {BaseParquetReadOptions} */
95491
+ { ...options, bloomFiltersByGroup, schemaElements }
95492
+ );
95493
+ }
94908
95494
  function parquetReadObjects(options) {
94909
95495
  return new Promise((onComplete, reject) => {
94910
95496
  parquetRead({
@@ -99182,8 +99768,8 @@ self.QrCreator = H3;
99182
99768
  h7 = c8.size / e12;
99183
99769
  a6.beginPath();
99184
99770
  for (r11 = 0; r11 < e12; r11 += 1) for (b4 = 0; b4 < e12; b4 += 1) {
99185
- var g3 = a6, x3 = c8.left + b4 * h7, u5 = c8.top + r11 * h7, p6 = r11, q = b4, f5 = d4.a, k3 = x3 + h7, m5 = u5 + h7, D2 = p6 - 1, E3 = p6 + 1, n13 = q - 1, l7 = q + 1, y5 = Math.floor(Math.min(0.5, Math.max(0, c8.R)) * h7), v4 = f5(p6, q), I3 = f5(D2, n13), w4 = f5(D2, q);
99186
- D2 = f5(D2, l7);
99771
+ var g3 = a6, x3 = c8.left + b4 * h7, u5 = c8.top + r11 * h7, p6 = r11, q = b4, f5 = d4.a, k3 = x3 + h7, m5 = u5 + h7, D3 = p6 - 1, E3 = p6 + 1, n13 = q - 1, l7 = q + 1, y5 = Math.floor(Math.min(0.5, Math.max(0, c8.R)) * h7), v4 = f5(p6, q), I3 = f5(D3, n13), w4 = f5(D3, q);
99772
+ D3 = f5(D3, l7);
99187
99773
  var F = f5(p6, l7);
99188
99774
  l7 = f5(E3, l7);
99189
99775
  q = f5(
@@ -99196,7 +99782,7 @@ self.QrCreator = H3;
99196
99782
  u5 = Math.round(u5);
99197
99783
  k3 = Math.round(k3);
99198
99784
  m5 = Math.round(m5);
99199
- v4 ? C3(g3, x3, u5, k3, m5, y5, !w4 && !p6, !w4 && !F, !q && !F, !q && !p6) : z3(g3, x3, u5, k3, m5, y5, w4 && p6 && I3, w4 && F && D2, q && F && l7, q && p6 && E3);
99785
+ v4 ? C3(g3, x3, u5, k3, m5, y5, !w4 && !p6, !w4 && !F, !q && !F, !q && !p6) : z3(g3, x3, u5, k3, m5, y5, w4 && p6 && I3, w4 && F && D3, q && F && l7, q && p6 && E3);
99200
99786
  }
99201
99787
  A3(a6, c8);
99202
99788
  a6.fill();
@@ -100637,10 +101223,10 @@ var n11 = e6(class extends f4 {
100637
101223
  }
100638
101224
  update(i10, [s7]) {
100639
101225
  const e12 = s7 !== this.G;
100640
- return e12 && void 0 !== this.G && this.rt(void 0), (e12 || this.lt !== this.ct) && (this.G = s7, this.ht = i10.options?.host, this.rt(this.ct = i10.element)), A;
101226
+ return e12 && this.rt(void 0), (e12 || this.lt !== this.ct) && (this.G = s7, this.ht = i10.options?.host, this.rt(this.ct = i10.element)), A;
100641
101227
  }
100642
101228
  rt(t8) {
100643
- if (this.isConnected || (t8 = void 0), "function" == typeof this.G) {
101229
+ if (void 0 !== this.G) if (this.isConnected || (t8 = void 0), "function" == typeof this.G) {
100644
101230
  const i10 = this.ht ?? globalThis;
100645
101231
  let s7 = o12.get(i10);
100646
101232
  void 0 === s7 && (s7 = /* @__PURE__ */ new WeakMap(), o12.set(i10, s7)), void 0 !== s7.get(this.G) && this.G.call(this.ht, void 0), s7.set(this.G, t8), void 0 !== t8 && this.G.call(this.ht, t8);
@@ -107682,7 +108268,7 @@ var _SlAlert = class _SlAlert2 extends ShoelaceElement {
107682
108268
  * calling this method again. The returned promise will resolve after the alert is hidden.
107683
108269
  */
107684
108270
  async toast() {
107685
- return new Promise((resolve) => {
108271
+ return new Promise((resolve2) => {
107686
108272
  this.handleCountdownChange();
107687
108273
  if (_SlAlert2.toastStack.parentElement === null) {
107688
108274
  document.body.append(_SlAlert2.toastStack);
@@ -107696,7 +108282,7 @@ var _SlAlert = class _SlAlert2 extends ShoelaceElement {
107696
108282
  "sl-after-hide",
107697
108283
  () => {
107698
108284
  _SlAlert2.toastStack.removeChild(this);
107699
- resolve();
108285
+ resolve2();
107700
108286
  if (_SlAlert2.toastStack.querySelector("sl-alert") === null) {
107701
108287
  _SlAlert2.toastStack.remove();
107702
108288
  }
@@ -108995,7 +109581,7 @@ var dataset_input_styles_default = i`
108995
109581
  `;
108996
109582
 
108997
109583
  // node_modules/@tabler/icons/icons/outline/file.svg
108998
- var file_default = 'data:image/svg+xml,<svg%0A xmlns="http://www.w3.org/2000/svg"%0A width="24"%0A height="24"%0A viewBox="0 0 24 24"%0A fill="none"%0A stroke="currentColor"%0A stroke-width="2"%0A stroke-linecap="round"%0A stroke-linejoin="round"%0A class="icon icon-tabler icons-tabler-outline icon-tabler-file"%0A>%0A <path stroke="none" d="M0 0h24v24H0z" fill="none"/>%0A <path d="M14 3v4a1 1 0 0 0 1 1h4" />%0A <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2" />%0A</svg>';
109584
+ var file_default = 'data:image/svg+xml,<svg%0A xmlns="http://www.w3.org/2000/svg"%0A width="24"%0A height="24"%0A viewBox="0 0 24 24"%0A fill="none"%0A stroke="currentColor"%0A stroke-width="2"%0A stroke-linecap="round"%0A stroke-linejoin="round"%0A class="icon icon-tabler icons-tabler-outline icon-tabler-file"%0A>%0A <path stroke="none" d="M0 0h24v24H0z" fill="none" />%0A <path d="M14 3v4a1 1 0 0 0 1 1h4" />%0A <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2" />%0A</svg>';
108999
109585
 
109000
109586
  // components/dataset-input/dataset-input.ts
109001
109587
  var DatasetInput = class extends LitElementWw {
@@ -109269,10 +109855,12 @@ var FeatureTransformation = class {
109269
109855
  };
109270
109856
 
109271
109857
  // lib/tflib.ts
109272
- async function getTF() {
109273
- if (window.TF == null)
109274
- window.TF = await Promise.resolve().then(() => (init_dist7(), dist_exports4));
109275
- return window.TF;
109858
+ function getTF() {
109859
+ const w3 = window;
109860
+ if (w3.__TFPromise == null) {
109861
+ w3.__TFPromise = w3.TF != null ? Promise.resolve(w3.TF) : Promise.resolve().then(() => (init_dist7(), dist_exports4)).then((tf5) => w3.TF = tf5);
109862
+ }
109863
+ return w3.__TFPromise;
109276
109864
  }
109277
109865
 
109278
109866
  // lib/dataset/class.ts
@@ -109757,13 +110345,13 @@ var ImageTransformation = class extends FeatureTransformation {
109757
110345
  const ctx = canvas.getContext("2d");
109758
110346
  const imageData = new ImageData(imageDataArray, width, height);
109759
110347
  ctx.putImageData(imageData, 0, 0);
109760
- return new Promise((resolve) => {
110348
+ return new Promise((resolve2) => {
109761
110349
  canvas.toBlob((blob) => {
109762
110350
  const reader = new FileReader();
109763
110351
  reader.onloadend = () => {
109764
110352
  const base64 = reader.result.toString().split(",")[1];
109765
110353
  const binary = atob(base64);
109766
- resolve(binary);
110354
+ resolve2(binary);
109767
110355
  };
109768
110356
  reader.readAsDataURL(blob);
109769
110357
  }, "image/png");
@@ -110539,7 +111127,7 @@ lit-html/directives/ref.js:
110539
111127
  papaparse/papaparse.min.js:
110540
111128
  (* @license
110541
111129
  Papa Parse
110542
- v5.5.3
111130
+ v5.5.4
110543
111131
  https://github.com/mholt/PapaParse
110544
111132
  License: MIT
110545
111133
  *)
@@ -112141,86 +112729,27 @@ lit-html/directives/style-map.js:
112141
112729
  *)
112142
112730
 
112143
112731
  @lit/reactive-element/reactive-element.js:
112144
- (**
112145
- * @license
112146
- * Copyright 2017 Google LLC
112147
- * SPDX-License-Identifier: BSD-3-Clause
112148
- *)
112149
-
112150
112732
  lit-html/lit-html.js:
112151
- (**
112152
- * @license
112153
- * Copyright 2017 Google LLC
112154
- * SPDX-License-Identifier: BSD-3-Clause
112155
- *)
112156
-
112157
112733
  lit-element/lit-element.js:
112158
- (**
112159
- * @license
112160
- * Copyright 2017 Google LLC
112161
- * SPDX-License-Identifier: BSD-3-Clause
112162
- *)
112163
-
112164
- lit-html/is-server.js:
112165
- (**
112166
- * @license
112167
- * Copyright 2022 Google LLC
112168
- * SPDX-License-Identifier: BSD-3-Clause
112169
- *)
112170
-
112171
112734
  @lit/reactive-element/decorators/custom-element.js:
112172
- (**
112173
- * @license
112174
- * Copyright 2017 Google LLC
112175
- * SPDX-License-Identifier: BSD-3-Clause
112176
- *)
112177
-
112178
112735
  @lit/reactive-element/decorators/property.js:
112179
- (**
112180
- * @license
112181
- * Copyright 2017 Google LLC
112182
- * SPDX-License-Identifier: BSD-3-Clause
112183
- *)
112184
-
112185
112736
  @lit/reactive-element/decorators/state.js:
112186
- (**
112187
- * @license
112188
- * Copyright 2017 Google LLC
112189
- * SPDX-License-Identifier: BSD-3-Clause
112190
- *)
112191
-
112192
112737
  @lit/reactive-element/decorators/event-options.js:
112193
- (**
112194
- * @license
112195
- * Copyright 2017 Google LLC
112196
- * SPDX-License-Identifier: BSD-3-Clause
112197
- *)
112198
-
112199
112738
  @lit/reactive-element/decorators/base.js:
112200
- (**
112201
- * @license
112202
- * Copyright 2017 Google LLC
112203
- * SPDX-License-Identifier: BSD-3-Clause
112204
- *)
112205
-
112206
112739
  @lit/reactive-element/decorators/query.js:
112207
- (**
112208
- * @license
112209
- * Copyright 2017 Google LLC
112210
- * SPDX-License-Identifier: BSD-3-Clause
112211
- *)
112212
-
112213
112740
  @lit/reactive-element/decorators/query-all.js:
112741
+ @lit/reactive-element/decorators/query-async.js:
112742
+ @lit/reactive-element/decorators/query-assigned-nodes.js:
112214
112743
  (**
112215
112744
  * @license
112216
112745
  * Copyright 2017 Google LLC
112217
112746
  * SPDX-License-Identifier: BSD-3-Clause
112218
112747
  *)
112219
112748
 
112220
- @lit/reactive-element/decorators/query-async.js:
112749
+ lit-html/is-server.js:
112221
112750
  (**
112222
112751
  * @license
112223
- * Copyright 2017 Google LLC
112752
+ * Copyright 2022 Google LLC
112224
112753
  * SPDX-License-Identifier: BSD-3-Clause
112225
112754
  *)
112226
112755
 
@@ -112230,12 +112759,5 @@ lit-html/directives/style-map.js:
112230
112759
  * Copyright 2021 Google LLC
112231
112760
  * SPDX-License-Identifier: BSD-3-Clause
112232
112761
  *)
112233
-
112234
- @lit/reactive-element/decorators/query-assigned-nodes.js:
112235
- (**
112236
- * @license
112237
- * Copyright 2017 Google LLC
112238
- * SPDX-License-Identifier: BSD-3-Clause
112239
- *)
112240
112762
  *)
112241
112763
  */