@vanelsas/baredom 4.0.0-alpha.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/CHANGELOG.md +337 -9
  2. package/README.md +23 -10
  3. package/custom-elements.json +17352 -4514
  4. package/dist/baredom.d.ts +92 -94
  5. package/dist/baremirror-alpha.js +25 -0
  6. package/dist/base.js +700 -607
  7. package/dist/integrity.json +113 -113
  8. package/dist/requests.d.ts +3 -0
  9. package/dist/requests.js +35 -0
  10. package/dist/x-alert.js +17 -17
  11. package/dist/x-avatar-group.js +10 -9
  12. package/dist/x-avatar.js +14 -14
  13. package/dist/x-badge.js +9 -9
  14. package/dist/x-bento-grid.d.ts +5 -0
  15. package/dist/x-bento-grid.js +6 -5
  16. package/dist/x-bento-item.d.ts +3 -0
  17. package/dist/x-bento-item.js +4 -4
  18. package/dist/x-breadcrumbs.d.ts +6 -5
  19. package/dist/x-breadcrumbs.js +16 -14
  20. package/dist/x-button.d.ts +4 -0
  21. package/dist/x-button.js +1 -1
  22. package/dist/x-calendar.js +42 -39
  23. package/dist/x-cancel-dialogue.js +16 -14
  24. package/dist/x-card.d.ts +4 -0
  25. package/dist/x-card.js +7 -7
  26. package/dist/x-carousel.js +37 -35
  27. package/dist/x-chart.d.ts +2 -0
  28. package/dist/x-chart.js +48 -47
  29. package/dist/x-checkbox.d.ts +11 -4
  30. package/dist/x-checkbox.js +1 -1
  31. package/dist/x-chip.js +1 -1
  32. package/dist/x-code.js +29 -27
  33. package/dist/x-collapse.js +11 -11
  34. package/dist/x-color-picker.d.ts +7 -0
  35. package/dist/x-color-picker.js +48 -46
  36. package/dist/x-combobox.d.ts +12 -4
  37. package/dist/x-combobox.js +36 -30
  38. package/dist/x-command-palette.d.ts +9 -1
  39. package/dist/x-command-palette.js +32 -28
  40. package/dist/x-confetti.js +24 -24
  41. package/dist/x-container.d.ts +4 -0
  42. package/dist/x-container.js +6 -5
  43. package/dist/x-context-menu.js +20 -20
  44. package/dist/x-copy.js +1 -1
  45. package/dist/x-currency-field.d.ts +5 -0
  46. package/dist/x-currency-field.js +26 -24
  47. package/dist/x-date-picker.d.ts +20 -2
  48. package/dist/x-date-picker.js +46 -39
  49. package/dist/x-divider.js +9 -10
  50. package/dist/x-drag-panel.d.ts +45 -0
  51. package/dist/x-drag-panel.js +37 -0
  52. package/dist/x-drawer.js +12 -11
  53. package/dist/x-drop-zone.d.ts +49 -0
  54. package/dist/x-drop-zone.js +12 -0
  55. package/dist/x-dropdown.js +12 -12
  56. package/dist/x-fieldset.js +6 -6
  57. package/dist/x-file-download.d.ts +4 -0
  58. package/dist/x-file-download.js +15 -7
  59. package/dist/x-file-upload.d.ts +10 -5
  60. package/dist/x-file-upload.js +27 -23
  61. package/dist/x-floating-panel.d.ts +50 -0
  62. package/dist/x-floating-panel.js +25 -0
  63. package/dist/x-form-field.d.ts +11 -1
  64. package/dist/x-form-field.js +18 -15
  65. package/dist/x-form.js +10 -11
  66. package/dist/x-gaussian-blur.js +13 -14
  67. package/dist/x-grid.d.ts +9 -0
  68. package/dist/x-grid.js +8 -6
  69. package/dist/x-i18n-provider.js +7 -7
  70. package/dist/x-i18n.js +4 -4
  71. package/dist/x-icon.js +7 -7
  72. package/dist/x-image.js +19 -17
  73. package/dist/x-kbd.js +16 -16
  74. package/dist/x-kinetic-canvas.js +26 -26
  75. package/dist/x-kinetic-font.js +27 -27
  76. package/dist/x-kinetic-typography.js +35 -35
  77. package/dist/x-liquid-dock.js +34 -34
  78. package/dist/x-liquid-fill.js +42 -42
  79. package/dist/x-liquid-glass.js +42 -41
  80. package/dist/x-menu-item.js +9 -8
  81. package/dist/x-menu.js +10 -10
  82. package/dist/x-metaball-cursor.js +23 -23
  83. package/dist/x-modal.js +13 -12
  84. package/dist/x-morph-stack.js +38 -37
  85. package/dist/x-multi-combobox.d.ts +13 -5
  86. package/dist/x-multi-combobox.js +42 -36
  87. package/dist/x-navbar.js +16 -15
  88. package/dist/x-neural-glow.js +31 -30
  89. package/dist/x-notification-center.js +9 -9
  90. package/dist/x-organic-divider.js +18 -18
  91. package/dist/x-organic-progress.js +35 -35
  92. package/dist/x-organic-shape.js +13 -14
  93. package/dist/x-otp-input.d.ts +5 -0
  94. package/dist/x-otp-input.js +23 -22
  95. package/dist/x-pagination.js +16 -14
  96. package/dist/x-particle-button.d.ts +10 -1
  97. package/dist/x-particle-button.js +55 -51
  98. package/dist/x-popover.js +28 -27
  99. package/dist/x-progress-circle.js +8 -9
  100. package/dist/x-progress.js +8 -8
  101. package/dist/x-proximity-list.js +20 -20
  102. package/dist/x-radio.d.ts +10 -3
  103. package/dist/x-radio.js +13 -11
  104. package/dist/x-range-slider.d.ts +7 -0
  105. package/dist/x-range-slider.js +31 -28
  106. package/dist/x-rating.d.ts +7 -0
  107. package/dist/x-rating.js +25 -23
  108. package/dist/x-ripple-effect.js +10 -10
  109. package/dist/x-scroll-parallax.js +17 -17
  110. package/dist/x-scroll-stack.js +17 -17
  111. package/dist/x-scroll-story.js +33 -33
  112. package/dist/x-scroll-timeline.js +46 -46
  113. package/dist/x-scroll.js +39 -38
  114. package/dist/x-search-field.d.ts +10 -3
  115. package/dist/x-search-field.js +1 -1
  116. package/dist/x-select.d.ts +12 -2
  117. package/dist/x-select.js +1 -1
  118. package/dist/x-sidebar.d.ts +4 -0
  119. package/dist/x-sidebar.js +17 -18
  120. package/dist/x-skeleton-group.js +13 -12
  121. package/dist/x-skeleton.js +1 -1
  122. package/dist/x-slider.d.ts +7 -0
  123. package/dist/x-slider.js +17 -16
  124. package/dist/x-soft-body.js +20 -20
  125. package/dist/x-spacer.js +4 -4
  126. package/dist/x-spinner.js +4 -4
  127. package/dist/x-splash.js +13 -12
  128. package/dist/x-split-pane.js +15 -15
  129. package/dist/x-spotlight-card.js +13 -12
  130. package/dist/x-stat.js +10 -10
  131. package/dist/x-stepper.js +15 -13
  132. package/dist/x-switch.d.ts +10 -3
  133. package/dist/x-switch.js +12 -11
  134. package/dist/x-tab.d.ts +5 -0
  135. package/dist/x-tab.js +10 -7
  136. package/dist/x-table-cell.js +21 -21
  137. package/dist/x-table-row.js +9 -8
  138. package/dist/x-table.js +14 -13
  139. package/dist/x-tabs.d.ts +9 -0
  140. package/dist/x-tabs.js +11 -11
  141. package/dist/x-text-area.d.ts +12 -0
  142. package/dist/x-text-area.js +21 -19
  143. package/dist/x-theme.js +26 -25
  144. package/dist/x-timeline-item.js +21 -20
  145. package/dist/x-timeline.js +8 -8
  146. package/dist/x-toast.js +22 -22
  147. package/dist/x-toaster.js +7 -7
  148. package/dist/x-tooltip.js +14 -12
  149. package/dist/x-trace-history.js +119 -127
  150. package/dist/x-typography.js +9 -9
  151. package/dist/x-welcome-tour.js +63 -63
  152. package/package.json +25 -26
  153. package/dist/barebuild-action.d.ts +0 -45
  154. package/dist/barebuild-action.js +0 -9
  155. package/dist/barebuild-data.d.ts +0 -39
  156. package/dist/barebuild-data.js +0 -5
  157. package/dist/barebuild-invalidate-on.d.ts +0 -42
  158. package/dist/barebuild-invalidate-on.js +0 -5
  159. package/dist/barebuild-route.d.ts +0 -39
  160. package/dist/barebuild-route.js +0 -4
  161. package/dist/barebuild-router.d.ts +0 -41
  162. package/dist/barebuild-router.js +0 -13
@@ -1,128 +1,120 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var TM=function(a,b,c){for(var d=$APP.q(a.dc),e=null,f=0,h=0;;)if(h<f){var k=e.C(null,h),m=$APP.B(k,0,null);k=$APP.B(k,1,null);k.J?k.J(m,a,b,c):k.call(null,m,a,b,c);h+=1}else if(d=$APP.q(d))$APP.$c(d)?(e=$APP.Fb(d),d=$APP.Gb(d),m=e,f=$APP.w(e),e=m):(e=$APP.t(d),m=$APP.B(e,0,null),k=$APP.B(e,1,null),k.J?k.J(m,a,b,c):k.call(null,m,a,b,c),d=$APP.v(d),e=null,f=0),h=0;else break},UM=function(a,b){if(a!=null&&a.Bc!=null)a=a.Bc(a,b);else{var c=UM[$APP.aa(a==null?null:a)];if(c!=null)a=c.j?c.j(a,b):c.call(null,
3
- a,b);else if(c=UM._,c!=null)a=c.j?c.j(a,b):c.call(null,a,b);else throw $APP.va("IReset.-reset!",a);}return a},VM=function(a){return a+1},mea=function(a){return a-1},nea=function(a,b){return $APP.jd(function(c,d){c=a.i?a.i(c):a.call(null,c);d=a.i?a.i(d):a.call(null,d);var e=$APP.hd($APP.fd);return e.j?e.j(c,d):e.call(null,c,d)},b)},WM=function(a,b){return nea(a,b)},XM=function(a){if(a instanceof RegExp)return a;var b=$APP.Ah(/^\(\?([idmsux]*)\)/,a),c=$APP.B(b,0,null);b=$APP.B(b,1,null);return new RegExp(a.substring(c==
4
- null?0:c.length),$APP.n(b)?b:"")},oea=function(a){return $APP.Ud($APP.za(function(b,c){return $APP.Wd(b,c,$APP.Lc(b,c,0)+1)},$APP.yb($APP.ke),a))},pea=function(a){return new $APP.J(null,2,5,$APP.K,[$APP.we(200,a),$APP.xe(200,a)],null)},YM=function(a,b){if(a instanceof $APP.ue){var c=a.oc;if(c!=null&&!$APP.n(c.i?c.i(b):c.call(null,b)))throw Error("Validator rejected reference state");c=a.state;a.state=b;a.dc!=null&&TM(a,c,b);return b}return UM(a,b)},ZM=function(){var a=window;var b=a.location.search;
5
- b=b==null?null:$APP.Ah(qea,b);return $APP.D(b)||$APP.l(a,"BAREDOM_TRACE_HISTORY")===!0||$APP.z.j("raw",$APP.l(a,"BAREDOM_TRACE_HISTORY"))},rea=function(a){a=a==null?null:a.tagName;a=a==null?null:a.toLowerCase();return $APP.n(a)?a:"document"},$M=function(a){try{return a==null?null:$APP.gm(a)}catch(b){try{return""+$APP.P.i(a)}catch(c){return"(unprintable)"}}},sea=function(a,b,c){a=$APP.G(a);var d=$APP.C(a,$APP.N),e=$APP.C(a,$APP.or),f=$APP.C(a,aN),h=$APP.C(a,bN);var k=$APP.Hd(d);k=$APP.n(k)?""+$APP.P.i(k)+
6
- "/"+$APP.P.i($APP.kh(d)):$APP.kh(d);b={schemaVersion:1,id:b,t:c,type:k,tag:e,componentId:f,causeId:h};switch(d instanceof $APP.F?d.ea:null){case "event/dispatch":case "event/dispatch-cancelable":case "event/dispatch-document":return c=$APP.ej.i(a),b.eventName=c,c=$M($APP.V.i(a)),b.detail=c,c=$APP.D($APP.fj.i(a)),b.cancelable=c,a=$APP.D($APP.gj.i(a)),b.defaultPrevented=a,b;case "state/instance-field-set":return c=$APP.Ti.i(a),b.field=c,a=$M($APP.Ui.i(a)),b.value=a,b;case "dom/attribute-set":return c=
7
- $APP.oi.i(a),b.attribute=c,a=$APP.Ui.i(a),b.value=a,b;case "dom/attribute-removed":return a=$APP.oi.i(a),b.attribute=a,b;case "lifecycle/attribute-changed":return c=$APP.oi.i(a),b.attribute=c,c=$APP.pi.i(a),b.oldValue=c,a=$APP.qi.i(a),b.newValue=a,b;case "lifecycle/connected":case "lifecycle/disconnected":return b;default:return b}},cN=function(a){a=""+$APP.P.i(a);return a.length<2?"0"+$APP.P.i(a):a},tea=function(a,b){return $APP.Kf.m($APP.ke,$APP.De(function(c){var d=$APP.B(c,0,null);$APP.B(c,1,
8
- null);return $APP.ed(b,d)}),a)},lN=function(a,b,c,d){var e=$APP.G(d);d=$APP.C(e,dN);var f=$APP.C(e,$APP.vt),h=$APP.C(e,eN);e=$APP.C(e,fN);a:{var k=a.length;for(var m=0,r=$APP.yb($APP.dh);;){if(m>=k){k=$APP.Ab(r);break a}var u=a[m].componentId;m+=1;r=u!=null?$APP.zb(r,u):r}k=void 0}k=tea(b,k);b=$APP.D(e);e={};k=$APP.q(k);m=null;for(u=r=0;;)if(u<r){var x=m.C(null,u),y=$APP.B(x,0,null),A=$APP.B(x,1,null);x=e;y=""+$APP.P.i(y);A={tag:$APP.or.i(A),firstSeen:gN.i(A)};x[y]=A;u+=1}else if(k=$APP.q(k))$APP.$c(k)?
9
- (r=$APP.Fb(k),k=$APP.Gb(k),m=r,r=$APP.w(r)):(m=$APP.t(k),r=$APP.B(m,0,null),u=$APP.B(m,1,null),m=e,r=""+$APP.P.i(r),u={tag:$APP.or.i(u),firstSeen:gN.i(u)},m[r]=u,k=$APP.v(k),m=null,r=0),u=0;else break;k=[];c=$APP.q(c);m=null;for(u=r=0;;)if(u<r){x=m.C(null,u);var E=$APP.G(x);x=$APP.C(E,$APP.rt);y=$APP.C(E,$APP.Wj);A=$APP.C(E,hN);var H=$APP.C(E,iN),O=$APP.C(E,jN);E=$APP.C(E,kN);k.push({id:x,label:y,startT:A,endT:H,startId:O,endId:E});u+=1}else if(c=$APP.q(c))$APP.$c(c)?(r=$APP.Fb(c),c=$APP.Gb(c),m=
10
- r,r=$APP.w(r)):(m=$APP.t(c),A=$APP.G(m),m=$APP.C(A,$APP.rt),r=$APP.C(A,$APP.Wj),u=$APP.C(A,hN),x=$APP.C(A,iN),y=$APP.C(A,jN),A=$APP.C(A,kN),k.push({id:m,label:r,startT:u,endT:x,startId:y,endId:A}),c=$APP.v(c),m=null,r=0),u=0;else break;return{schemaVersion:1,exportedAt:d,origin:f,userAgent:h,forensic:b,components:e,sessions:k,records:a}},mN=function(a){if($APP.sa(a)){if(typeof a.schemaVersion!=="number")return new $APP.M(null,1,[$APP.gq,"Envelope is missing schemaVersion."],null);if($APP.I(1,a.schemaVersion))return new $APP.M(null,
11
- 1,[$APP.gq,"Schema version mismatch: expected "+$APP.P.i(1)+", got "+$APP.P.i(a.schemaVersion)+"."],null);if($APP.p($APP.ra(a.records)))return new $APP.M(null,1,[$APP.gq,"Envelope.records is not an array."],null);var b=a.records,c=b.length;a:{for(var d=0;;){if(d>=c){b=null;break a}var e=b[d];if($APP.sa(e)&&typeof e.id==="number"&&typeof e.t==="number"&&typeof e.type==="string")d+=1;else{b=d;break a}}b=void 0}return b==null?new $APP.M(null,1,[$APP.Us,a],null):new $APP.M(null,1,[$APP.gq,"Record at index "+
12
- $APP.P.i(b)+" is missing required fields (id, t, type)."],null)}return new $APP.M(null,1,[$APP.gq,"Envelope is not a JSON object."],null)},uea=function(a,b,c){return $APP.w(a)>=c?$APP.Cd.j($APP.Sc(a),b):$APP.Cd.j(a,b)},vea=function(){var a=fN.i($APP.eb(nN));return $APP.n(a)?$APP.hh(oN):$APP.Wo.j($APP.hh(oN),$APP.Ut)},qN=function(a){var b=$APP.pe(function(c){var d=$APP.B(c,0,null);c=$APP.B(c,1,null);return $APP.ed(c,a)?d:null},wea);return $APP.n(b)?b:pN},rN=function(a){try{var b=JSON.stringify(a)}catch(c){b=
13
- ""}return $APP.n(b)?b.toLowerCase():""},vN=function(a,b){var c=$APP.G(b),d=$APP.C(c,$APP.or),e=$APP.C(c,sN);b=$APP.C(c,tN);c=$APP.Lc(c,uN,rN);if(d=d==null||$APP.z.j("",d)||$APP.z.j("all",d)||$APP.z.j(d,a.tag)){if(e=e==null||$APP.ed(e,qN(a.type)))e=b==null||$APP.z.j("",b)||!((c.i?c.i(a):c.call(null,a)).indexOf(b)<0);d=e}return d},wN=function(a,b){return $APP.bf(WM(function(c){return c.t},$APP.Ee(function(c){return vN(c,b)},$APP.Ec(a))))},xN=function(a,b){return typeof b==="number"?a.find(function(c){return $APP.z.j(b,
14
- c.id)}):null},yN=function(a){if(a!=null)try{var b=JSON.stringify(a),c=""+$APP.P.i(b);return c.length<=60?c:""+$APP.P.i($APP.yd(c,60))+"…"}catch(d){return"(unstringifiable)"}else return null},zN=function(a){switch(a.type){case "event/dispatch":return""+$APP.P.i(a.eventName)+$APP.P.i(function(){var b=yN(a.detail);return $APP.n(b)?" "+$APP.P.i(b):null}());case "event/dispatch-cancelable":return""+$APP.P.i(a.eventName)+$APP.P.i($APP.n(a.defaultPrevented)?" (prevented)":null)+$APP.P.i(function(){var b=
15
- yN(a.detail);return $APP.n(b)?" "+$APP.P.i(b):null}());case "event/dispatch-document":return""+$APP.P.i(a.eventName)+$APP.P.i(function(){var b=yN(a.detail);return $APP.n(b)?" "+$APP.P.i(b):null}());case "state/instance-field-set":return""+$APP.P.i(a.field)+" \x3d "+$APP.P.i(function(){var b=yN(a.value);return $APP.n(b)?b:"null"}());case "dom/attribute-set":return""+$APP.P.i(a.attribute)+"\x3d"+$APP.P.i($APP.Rh($APP.Ec([a.value])));case "dom/attribute-removed":return""+$APP.P.i(a.attribute)+" removed";
16
- case "lifecycle/connected":return"connected";case "lifecycle/disconnected":return"disconnected";case "lifecycle/attribute-changed":return""+$APP.P.i(a.attribute)+": "+$APP.P.i($APP.Rh($APP.Ec([a.oldValue])))+" → "+$APP.P.i($APP.Rh($APP.Ec([a.newValue])));default:return"("+$APP.P.i(a.type)+")"}},AN=function(a){if(typeof a!=="number")return"";if(a<1E3)return""+$APP.P.i(a.toFixed(0))+"ms";if(a<6E4)return""+$APP.P.i((a/1E3).toFixed(3))+"s";var b=$APP.ud(a,6E4)/1E3;return""+$APP.P.i(Math.floor(a/6E4))+
17
- "m"+$APP.P.i(b.toFixed(1))+"s"},CN=function(a){a=qN(a.type);return $APP.C(BN,$APP.n(a)?a:pN)},EN=function(a){a=a.componentId;return $APP.n(a)?a:DN},xea=function(a){return $APP.bf(WM(FN,$APP.ye.j(function(b){var c=$APP.B(b,0,null);b=$APP.B(b,1,null);var d=$APP.t(b);return new $APP.M(null,3,[GN,c,$APP.or,d.tag,FN,$APP.ce($APP.qo,$APP.ye.j(function(e){return e.t},b))],null)},$APP.Zh(EN,a))))},JN=function(a){if($APP.q(a)){var b=$APP.ye.j(function(c){return c.t},a);a=$APP.ce($APP.qo,b);b=$APP.ce($APP.Xo,
18
- b);return new $APP.M(null,3,[HN,a,yea,b,IN,$APP.Xo.j(1,b-a)],null)}return null},zea=function(a,b){return $APP.q(a)?$APP.de(KN,function(c){return Math.abs(c.t-b)},a):null},Aea=function(a){if($APP.q(a)){var b=oea($APP.ye.j(function(d){return qN(d.type)},a)),c=$APP.ce($APP.Xo,$APP.Xg(b));a=$APP.pe(function(d){return $APP.z.j(c,$APP.C(b,d))?d:null},oN);return $APP.n(a)?a:pN}return null},Eea=function(a,b){a=$APP.Zh(function(c){c=b.i?b.i(c):b.call(null,c);return Math.floor(c/4)},a);return $APP.bf(WM(LN,
19
- $APP.ye.j(function(c){var d=$APP.B(c,0,null),e=$APP.B(c,1,null);c=$APP.ye.j(function(f){return f.t},e);e=$APP.bf(WM(function(f){return f.id},e));return new $APP.M(null,7,[LN,d,MN,e,NN,Aea(e),ON,d*4,Bea,(d+1)*4,Cea,$APP.ce($APP.qo,c),Dea,$APP.ce($APP.Xo,c)],null)},a)))},Fea=function(a){return $APP.pe(function(b){return $APP.w(MN.i(b))>3},a)},Gea=function(a){return $APP.q(a)?$APP.ce($APP.Xo,$APP.ye.j(function(b){return $APP.w(MN.i(b))},a)):0},Hea=function(a,b){var c=b.id;a=WM(function(d){return d.t},
20
- $APP.Ee(function(d){return $APP.z.j(c,d.causeId)},$APP.Ec(a)));return new $APP.M(null,2,[$APP.$u,$APP.w(a),MN,$APP.bf($APP.we(50,a))],null)},Iea=function(a,b){return $APP.bf(WM(function(c){return c.id},$APP.Ee(function(c){return $APP.z.j(b,c.causeId)},$APP.Ec(a))))},Jea=function(a,b){var c=pea(PN(a,b));a=$APP.B(c,0,null);c=$APP.B(c,1,null);var d=$APP.Zh(function(e){return e.causeId},a);return $APP.$g.m(function h(f){var k=f.id;k=d.i?d.i(k):d.call(null,k);return new $APP.M(null,2,[QN,f,RN,$APP.He(h,
21
- k)],null)}(b),SN,$APP.D($APP.q(c)))},Kea=function(a,b){return typeof b==="number"?$APP.pe(function(c){return $APP.z.j(b,$APP.rt.i(c))?c:null},TN.i(a)):null},Lea=function(a,b,c,d){b===0?c="No records yet — interact with components to start tracing.":a===0?c=""+$APP.P.i(b)+" "+$APP.P.i($APP.z.j(1,b)?"record":"records")+" · all hidden by filter":(a=""+$APP.P.i(a)+$APP.P.i($APP.I(a,b)?" of "+$APP.P.i(b):null)+" "+$APP.P.i($APP.z.j(1,a)?"record":"records")+" · "+$APP.P.i(d)+" "+$APP.P.i($APP.z.j(1,d)?
22
- "lane":"lanes"),b=$APP.P,d=b.i,c=IN.i(c),c=$APP.n(c)?" · spanning "+$APP.P.i(AN(c)):null,c=a+d.call(b,c));return c},VN=function(a){return $APP.Zc(a)&&$APP.z.j(UN,$APP.t(a))},XN=function(a){return $APP.Zc(a)&&$APP.z.j(WN,$APP.t(a))},YN=function(a){return $APP.Zc(a)&&($APP.z.j(UN,$APP.t(a))||$APP.z.j(WN,$APP.t(a)))?$APP.Hc(a):null},ZN=function(a,b){a=$APP.l(a,"__xTraceHistoryUiState");return $APP.n(a)?(b=$APP.l(a,$APP.kh(b)),void 0===b?null:b):null},$N=function(a,b,c){var d=$APP.l(a,"__xTraceHistoryUiState");
23
- d=$APP.n(d)?d:{};b=$APP.kh(b);d[b]=c;a.__xTraceHistoryUiState=d},bO=function(){var a=MN.i($APP.eb(nN)),b=$APP.eb(aO),c=b[1];if(b[0]===a)return c;b=$APP.gm($APP.bf(a));YM(aO,[a,b]);return b},Mea=function(){var a=cO.J(dO,$APP.$g,eO,!1);a=$APP.G(a);a=$APP.C(a,fO);a=$APP.q(a);for(var b=null,c=0,d=0;;)if(d<c){var e=b.C(null,d);$APP.B(e,0,null);e=$APP.B(e,1,null);try{e.H?e.H():e.call(null)}catch(f){}d+=1}else if(a=$APP.q(a)){if($APP.$c(a))c=$APP.Fb(a),a=$APP.Gb(a),b=c,c=$APP.w(c);else{b=$APP.t(a);$APP.B(b,
24
- 0,null);e=$APP.B(b,1,null);try{e.H?e.H():e.call(null)}catch(f){}a=$APP.v(a);b=null;c=0}d=0}else return null},gO=function(){if(dO instanceof $APP.ue){var a=dO.state;a=$APP.$g.m?$APP.$g.m(a,eO,!0):$APP.$g.call(null,a,eO,!0);if(dO instanceof $APP.ue){var b=dO.oc;if(b!=null&&!$APP.n(b.i?b.i(a):b.call(null,a)))throw Error("Validator rejected reference state");b=dO.state;dO.state=a;dO.dc!=null&&TM(dO,b,a);a=new $APP.J(null,2,5,$APP.K,[b,a],null)}else a=new $APP.J(null,2,5,$APP.K,[$APP.eb(dO),UM(dO,a)],
25
- null)}else a=new $APP.J(null,2,5,$APP.K,[$APP.eb(dO),$APP.Ro(dO,$APP.$g,eO,!0)],null);b=$APP.B(a,0,null);$APP.B(a,1,null);return $APP.n(eO.i(b))?null:requestAnimationFrame(Mea)},Nea=function(a,b){var c=hO.i(a)+1;return iO($APP.$g.m(a,hO,c),new $APP.J(null,2,5,$APP.K,[fO,c],null),b)},Oea=function(a,b,c){if($APP.z.j("document",b))return new $APP.M(null,2,[$APP.rt,null,jO,!1],null);b=$APP.l(a,"__xTraceHistoryId");if(b!=null)return new $APP.M(null,2,[$APP.rt,b,jO,!1],null);a.__xTraceHistoryId=c;return new $APP.M(null,
26
- 2,[$APP.rt,c,jO,!0],null)},mO=function(){var a=cO.J(nN,kO,lO,VM);return lO.i(a)-1},Pea=function(a){cO.j(nO,VM);try{a.H?a.H():a.call(null)}finally{cO.j(nO,mea)}},oO=function(a){var b=a.getRootNode();return b instanceof ShadowRoot?b.host:a.parentNode},pO=function(a){for(;;)if(a!=null&&a instanceof Element){var b=a.localName;var c=b!=null;b=c?b.includes("-"):c;if($APP.n(b))return a;a=oO(a)}else return null},qO=function(a){if(a instanceof Node)for(a=oO(a);;){if(a==null||a===document)return!1;if($APP.n($APP.l(a,
27
- "__xTraceHistoryInternal")))return!0;a=oO(a)}else return!1},rO=function(a){var b=document.body;if($APP.n($APP.n(b)?a!=null:b)){b=[b];for(var c=0;;){if(b.length===0||c>=1E6)return null;var d=b.pop();if(d instanceof Element){if(!$APP.n($APP.l(d,"__xTraceHistoryInternal"))){if($APP.z.j(a,$APP.l(d,"__xTraceHistoryId")))return d;for(var e=d.children,f=e.length,h=0;;)if(h<f)b.push(e[h]),h+=1;else break;d=d.shadowRoot;if($APP.n(d))for(d=d.children,e=d.length,f=0;;)if(f<e)b.push(d[f]),f+=1;else break}c+=
28
- 1}}}else return null},sO=function(a){var b=$APP.li.i(a);return $APP.ed(Qea,$APP.N.i(a))?b instanceof Node?(a=$APP.l(b,"__xTraceHistoryInternal"),$APP.n(a)?a:qO(b)):!1:qO(b)},xO=function(a,b,c,d){var e=$APP.eb(nN),f=$APP.li.i(a);if(!$APP.n(function(){var u=(u=$APP.p(d))?$APP.jq.i(e):u;return $APP.n(u)?u:sO(a)}())){var h=function(){var u=pO(f);return $APP.n(u)?u:f}(),k=rea(h);h=Oea(h,k,tO.i(e));var m=$APP.G(h);h=$APP.C(m,$APP.rt);m=$APP.C(m,jO);var r=$APP.Rc($APP.eb(uO));r=$APP.$g.B(a,$APP.or,k,$APP.Ec([aN,
29
- h,bN,r]));b=sea(r,b,c);b=uea(MN.i(e),b,vO.i(e));c=$APP.n(m)?$APP.$g.m(wO.i(e),h,new $APP.M(null,2,[$APP.or,k,gN,c],null)):wO.i(e);k=$APP.n(m)?h+1:tO.i(e);cO.B(nN,$APP.$g,MN,b,$APP.Ec([tO,k,wO,c]));gO()}},yO=function(a,b){var c=pO(b);b=$APP.l($APP.n(c)?c:b,"__xTraceHistoryId");if($APP.n(b))switch(c=$APP.N.i(a),c instanceof $APP.F?c.ea:null){case "event/dispatch":case "event/dispatch-cancelable":case "event/dispatch-document":return""+$APP.P.i(b)+":evt:"+$APP.P.i($APP.ej.i(a));case "state/instance-field-set":return""+
30
- $APP.P.i(b)+":fld:"+$APP.P.i($APP.Ti.i(a));case "dom/attribute-set":case "dom/attribute-removed":return""+$APP.P.i(b)+":attr:"+$APP.P.i($APP.oi.i(a));default:return null}else return null},AO=function(a,b,c,d){var e=$APP.p(fN.i(a));return e?(b=yO(b,c),$APP.n(b)?(a=$APP.C(zO.i(a),b),$APP.n(a)?d-a<16:null):null):e},BO=function(a,b,c){if($APP.n(fN.i($APP.eb(nN))))return null;a=yO(a,b);return $APP.n(a)?cO.J(nN,iO,new $APP.J(null,2,5,$APP.K,[zO,a],null),c):null},DO=function(a){var b=$APP.N.i(a),c=$APP.li.i(a),
31
- d=performance.now();if($APP.n(function(){var f=$APP.eb(nO)>0;if(f)return f;f=$APP.eb(CO);f=$APP.n(f)?$APP.ed(Rea,b):f;if($APP.n(f))return f;f=sO(a);return $APP.n(f)?f:AO($APP.eb(nN),a,c,d)}()))return null;var e=mO();xO(a,e,d,!1);return BO(a,c,d)},Sea=function(){var a=EventTarget.prototype,b=a.dispatchEvent;$APP.n($APP.l(b,"__xTraceHistoryWrapped"))||(YM(EO,b),b=function(c){var d=$APP.eb(EO);var e=$APP.p($APP.eb(CO));e||(e=$APP.jq.i($APP.eb(nN)),e=$APP.n(e)?e:$APP.eb(nO)>0||qO(this));if($APP.n(e))c=
32
- d.call(this,c);else{e=c instanceof CustomEvent;var f=performance.now(),h=e?new $APP.M(null,2,[$APP.N,this===document?$APP.kj:$APP.n(c.cancelable)?$APP.ij:$APP.dj,$APP.ej,c.type],null):null;if($APP.n(e?AO($APP.eb(nN),h,this,f):e))c=d.call(this,c);else{var k=mO();cO.m(uO,$APP.Cd,k);try{var m=d.call(this,c)}finally{cO.j(uO,$APP.Sc)}if(e)try{xO(new $APP.M(null,6,[$APP.N,this===document?$APP.kj:$APP.n(c.cancelable)?$APP.ij:$APP.dj,$APP.li,this,$APP.ej,c.type,$APP.V,c.detail,$APP.fj,c.cancelable,$APP.gj,
33
- c.defaultPrevented],null),k,f,!0),BO(h,this,f)}catch(r){}c=m}}return c},b.__xTraceHistoryWrapped=!0,a.dispatchEvent=b)},Tea=function(){return bO()},Uea=function(){var a=wO.i($APP.eb(nN)),b={};a=$APP.q(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.C(null,e),h=$APP.B(f,0,null),k=$APP.B(f,1,null);f=b;h=""+$APP.P.i(h);k={tag:$APP.or.i(k),firstSeen:gN.i(k)};f[h]=k;e+=1}else if(a=$APP.q(a))$APP.$c(a)?(d=$APP.Fb(a),a=$APP.Gb(a),c=d,d=$APP.w(d)):(c=$APP.t(a),d=$APP.B(c,0,null),e=$APP.B(c,1,null),c=b,d=""+$APP.P.i(d),
34
- e={tag:$APP.or.i(e),firstSeen:gN.i(e)},c[d]=e,a=$APP.v(a),c=null,d=0),e=0;else break;return b},Vea=function(a){var b=a.components;return b==null?$APP.Ge:$APP.ye.j(function(c){return $APP.l(b,c).tag},Object.keys(b))},Wea=function(){var a=$APP.eb(nN),b=$APP.ye.j($APP.or,$APP.Xg(wO.i(a)));a=$APP.Ce(function(c){c=$APP.G(c);c=$APP.C(c,FO);return Vea(c)},$APP.Ec([GO.i(a)]));return $APP.bf($APP.Kf.j($APP.jh(),$APP.Be.j(b,a)))},HO=function(){cO.J(nN,$APP.$g,$APP.jq,!0);return gO()},IO=function(){cO.J(nN,
35
- $APP.$g,$APP.jq,!1);return gO()},NO=function(){cO.B(nN,$APP.$g,MN,JO,$APP.Ec([lO,0,KO,$APP.Ge,LO,0,MO,null,zO,$APP.ke]));return gO()},OO=function(){return MO.i($APP.eb(nN))},Xea=function(a,b,c,d){return b==null?a:$APP.He(function(e){e=$APP.G(e);var f=$APP.C(e,$APP.rt);return $APP.z.j(f,b)?$APP.$g.B(e,iN,c,$APP.Ec([kN,d])):e},a)},PO=function(){var a=performance.now();cO.j(nN,function(b){return $APP.$g.m(kO.va(b,KO,Xea,MO.i(b),a,lO.i(b)),MO,null)});return gO()},QO=function(){OO()!=null&&(console.warn("[x-trace-history] start-session! called while a session was already active — stopping the previous one"),
36
- PO());var a=performance.now();cO.j(nN,function(b){var c=LO.i(b),d=lO.i(b);return $APP.$g.B(kO.J(b,KO,$APP.Cd,new $APP.M(null,6,[$APP.rt,c,$APP.Wj,"Session "+$APP.P.i(c),hN,a,iN,null,jN,d,kN,null],null)),MO,c,$APP.Ec([LO,c+1]))});gO();return MO.i($APP.eb(nN))},RO=function(a,b){var c=$APP.G(b);b=$APP.C(c,jN);c=$APP.C(c,kN);a=a.id;return a>=b&&(c==null||a<c)},SO=function(){var a=$APP.eb(nN),b=bO(),c=$APP.Ec(b);return $APP.gm($APP.He(function(d){var e=$APP.G(d);d=$APP.C(e,$APP.rt);var f=$APP.C(e,$APP.Wj),
37
- h=$APP.C(e,hN),k=$APP.C(e,iN),m=$APP.w($APP.Ee(function(r){return RO(r,e)},c));return{id:d,label:f,startT:h,endT:$APP.n(k)?k:null,recordCount:m}},KO.i(a)))},TO=function(a){var b=$APP.eb(nN),c=$APP.t($APP.Ee(function(d){return $APP.z.j($APP.rt.i(d),a)},KO.i(b)));return $APP.n(c)?$APP.gm(WM(function(d){return d.t},$APP.Ee(function(d){return RO(d,c)},$APP.Fc(bO())))):[]},Yea=function(a){if(typeof a==="string"){try{var b=JSON.parse(a)}catch(c){b=UO}a=$APP.z.j(b,UO)?new $APP.M(null,1,[$APP.gq,"File is not valid JSON."],
38
- null):mN(b)}else a=$APP.sa(a)?mN(a):new $APP.M(null,1,[$APP.gq,"Import expects a JSON string or a parsed envelope object."],null);return a},VO=function(a){cO.J(nN,kO,GO,function(b){return $APP.bf($APP.Fe(function(c){c=$APP.G(c);c=$APP.C(c,$APP.rt);return $APP.z.j(c,a)},b))});return gO()},XO=function(){return $APP.gm($APP.He(function(a){var b=$APP.G(a);a=$APP.C(b,$APP.rt);var c=$APP.C(b,$APP.Wj),d=$APP.C(b,WO);b=$APP.C(b,FO);return{id:a,label:c,importedAt:d,recordCount:b.records.length}},GO.i($APP.eb(nN))))},
39
- YO=function(a){var b=$APP.t($APP.Ee(function(c){return $APP.z.j($APP.rt.i(c),a)},GO.i($APP.eb(nN))));return $APP.n(b)?FO.i(b).records:[]},ZO=function(a,b){return new $APP.M(null,4,[dN,a.getTime(),$APP.vt,function(){var c=window;c=c==null?null:c.location;c=c==null?null:c.href;return $APP.n(c)?c:""}(),eN,function(){var c=navigator;c=c==null?null:c.userAgent;return $APP.n(c)?c:""}(),fN,b],null)},Zea=function(){var a=$APP.eb(nN),b=bO(),c=ZO(new Date,fN.i(a));return lN(b,wO.i(a),KO.i(a),c)},$O=function(){var a=
40
- new Date,b=$APP.eb(nN),c=bO(),d=ZO(a,fN.i(b));b=lN(c,wO.i(b),KO.i(b),d);b=JSON.stringify(b,null,2);a=""+$APP.P.i("baredom-trace-")+$APP.P.i(a.getFullYear())+$APP.P.i(cN(a.getMonth()+1))+$APP.P.i(cN(a.getDate()))+"-"+$APP.P.i(cN(a.getHours()))+$APP.P.i(cN(a.getMinutes()))+$APP.P.i(cN(a.getSeconds()))+$APP.P.i(".trace.json");b=URL.createObjectURL(new Blob([b],{type:"application/json"}));c=document.createElement("a");c.href=b;c.download=a;c.style.display="none";document.body.appendChild(c);try{var e=
41
- c.click()}finally{document.body.removeChild(c),URL.revokeObjectURL(b)}return e},aP=function(a,b){b=b.getBoundingClientRect();a.style.top=""+$APP.P.i(b.top)+"px";a.style.left=""+$APP.P.i(b.left)+"px";a.style.width=""+$APP.P.i(b.width)+"px";a.style.height=""+$APP.P.i(b.height)+"px"},bP=function(a){a=$APP.l(a,"__xTraceHistoryHighlightBox");$APP.n(a)&&(a.style.display="none")},cP=function(a){var b=$APP.l(a,"__xTraceHistoryHighlightCid");if($APP.n(b)){b=rO(b);if($APP.n(b))return a=$APP.l(a,"__xTraceHistoryHighlightBox"),
42
- $APP.n(a)?(aP(a,b),a.style.display="block"):null;bP(a);return $APP.bj(a,"__xTraceHistoryHighlightCid",null)}return null},dP=function(a){return(""+$APP.P.i(a)).replace($ea,"\x26amp;").replace(afa,"\x26lt;").replace(bfa,"\x26gt;").replace(cfa,"\x26quot;").replace(dfa,"\x26#39;")},efa=function(a){return"\x3coption value\x3d'"+$APP.P.i(dP(a))+"'\x3e"+$APP.P.i(dP(a))+"\x3c/option\x3e"},eP=function(a,b){return"\x3clabel class\x3d'cat'\x3e\x3cx-checkbox data-x-th-cat\x3d'"+$APP.P.i(a)+"' "+$APP.P.i($APP.n(b)?
43
- "checked ":null)+"aria-label\x3d'"+$APP.P.i(a)+"'\x3e\x3c/x-checkbox\x3e"+$APP.P.i(a)+"\x3c/label\x3e"},ffa=function(a,b){return $APP.ce($APP.P,$APP.ye.j(function(c){var d=$APP.G(c);c=$APP.C(d,GN);var e=$APP.C(d,$APP.or),f=$APP.G(d);d=$APP.C(f,GN);f=$APP.C(f,$APP.or);d=$APP.z.j(DN,d)?"document":""+$APP.P.i(f)+" #"+$APP.P.i(d);f=$APP.z.j(DN,c)?"document":e;var h=$APP.z.j(b,f);return"\x3cdiv class\x3d'lane-label"+$APP.P.i(h?" active":null)+"' data-x-th-lane-tag\x3d'"+$APP.P.i(dP(f))+"' title\x3d'"+
44
- $APP.P.i(dP(d))+"'\x3e"+$APP.P.i(dP($APP.z.j(DN,c)?"document":e))+$APP.P.i($APP.I(DN,c)?" \x3cspan class\x3d'cid'\x3e#"+$APP.P.i(c)+"\x3c/span\x3e":null)+"\x3c/div\x3e"},a))},gfa=function(a,b,c){return $APP.n(a)?"\x3cline class\x3d'scrubber' x1\x3d'"+$APP.P.i(b)+"' y1\x3d'0' x2\x3d'"+$APP.P.i(b)+"' y2\x3d'"+$APP.P.i(c)+"' /\x3e":""},fP=function(a,b,c,d){a=WM(function(e){return $APP.z.j(e.id,d)?1:0},a);return $APP.ce($APP.P,$APP.ye.j(function(e){var f=c.i?c.i(e):c.call(null,e),h=b+10,k=$APP.z.j(e.id,
45
- d),m=k?6.5:4.5;return"\x3ccircle class\x3d'dot"+$APP.P.i(k?" selected":null)+"' data-x-th-id\x3d'"+$APP.P.i(e.id)+"' cx\x3d'"+$APP.P.i(f)+"' cy\x3d'"+$APP.P.i(h)+"' r\x3d'"+$APP.P.i(m)+"' fill\x3d'"+$APP.P.i(CN(e))+"' /\x3e"},a))},hfa=function(a,b,c,d){if(c==null)return"";a=$APP.pe(function(e){e=$APP.G(e);e=$APP.C(e,MN);return $APP.pe(function(f){return $APP.z.j(f.id,c)?f:null},e)},a);return $APP.n(a)?(d=d.i?d.i(a):d.call(null,a),"\x3cline class\x3d'density-selected' x1\x3d'"+$APP.P.i(d)+"' y1\x3d'"+
46
- $APP.P.i(b)+"' x2\x3d'"+$APP.P.i(d)+"' y2\x3d'"+$APP.P.i(b+20)+"' /\x3e"):""},ifa=function(a,b,c,d){var e=Gea(a);return""+$APP.P.i($APP.ce($APP.P,$APP.ye.j(function(f){var h=$APP.G(f),k=$APP.C(h,MN);f=$APP.C(h,NN);h=$APP.C(h,ON);var m=$APP.t(k),r=$APP.C(BN,$APP.n(f)?f:pN);var u=$APP.w(k);u=u==null||u===0||e==null||e===0?0:u>=e?1:.4+.6*((u-1)/$APP.Xo.j(1,e-1));var x=dP($APP.kh($APP.n(f)?f:pN));k=$APP.w(k);f=""+$APP.P.i(k)+" "+$APP.P.i($APP.z.j(1,k)?"record":"records")+" · "+$APP.P.i($APP.kh($APP.n(f)?
47
- f:pN));return"\x3crect class\x3d'density-bin' role\x3d'button' aria-label\x3d'"+$APP.P.i(dP(f))+"' data-x-th-bin-record-id\x3d'"+$APP.P.i(m.id)+"' data-x-th-bin-count\x3d'"+$APP.P.i(k)+"' data-x-th-bin-cat\x3d'"+$APP.P.i(x)+"' x\x3d'"+$APP.P.i(h)+"' y\x3d'"+$APP.P.i(b)+"' width\x3d'"+$APP.P.i(4)+"' height\x3d'"+$APP.P.i(20)+"' fill\x3d'"+$APP.P.i(r)+"' fill-opacity\x3d'"+$APP.P.i(u)+"' /\x3e"},a)))+$APP.P.i(hfa(a,b,c,d))},jfa=function(a,b,c,d,e,f){function h(A){a:{var E=$APP.C(x,A.id);var H=a instanceof
48
- $APP.F?a.ea:null;switch(H){case "order":A=$APP.Xo.j(0,e-16);E=u===0||u<0?8:$APP.z.j(1,u)?8+A/2:8+$APP.qo.j($APP.Xo.j(E/(u-1),0),1)*A;break a;case "time":E=A.t;H=$APP.G(d);A=$APP.C(H,HN);H=$APP.C(H,IN);var O=$APP.Xo.j(0,e-16);E=A==null||H==null?8:8+$APP.qo.j($APP.Xo.j((E-A)/H,0),1)*O;break a;default:throw Error("No matching clause: "+$APP.P.i(H));}}return E}var k=$APP.n(f)?f.id:null,m=$APP.Kf.j($APP.ke,$APP.se(function(A,E){E=$APP.G(E);E=$APP.C(E,GN);return new $APP.J(null,2,5,$APP.K,[E,A*20],null)},
49
- c)),r=$APP.Xo.j(20,20*$APP.w(c)),u=$APP.w(b),x=$APP.Kf.j($APP.ke,$APP.se(function(A,E){return new $APP.J(null,2,5,$APP.K,[E.id,A],null)},b)),y=$APP.Zh(EN,b);return"\x3csvg class\x3d'timeline-svg' width\x3d'"+$APP.P.i(e)+"' height\x3d'"+$APP.P.i(r)+"' viewBox\x3d'0 0 "+$APP.P.i(e)+" "+$APP.P.i(r)+"'\x3e"+$APP.P.i($APP.ce($APP.P,$APP.ye.j(function(A){A=$APP.G(A);var E=$APP.C(A,GN);A=$APP.Lc(y,E,$APP.Ge);E=$APP.C(m,E);if($APP.z.j(gP,a)){var H=Eea(A,h);A=$APP.n(Fea(H))?ifa(H,E,k,h):fP(A,E,h,k)}else A=
50
- fP(A,E,h,k);return A},c)))+$APP.P.i(gfa(f,$APP.n(f)?h(f):null,r))+"\x3c/svg\x3e"},kfa=function(a,b,c,d,e,f,h,k){if($APP.w(d)===0)a.innerHTML="",b.innerHTML="\x3cdiv class\x3d'timeline-empty'\x3eNo records match the current filter.\x3c/div\x3e";else{var m=$APP.Xo.j(200,b.clientWidth);a.innerHTML=ffa(e,k);b.innerHTML=jfa(c,d,e,f,m,h)}},hP=function(a){return""+$APP.P.i(a.tag)+" · "+$APP.P.i(a.type)},lfa=function(a){var b=$APP.G(a);a=$APP.C(b,iP);var c=$APP.C(b,jP),d=$APP.C(b,kP);b=$APP.C(b,lP);c+=14;
51
- b-=14;return"\x3cline class\x3d'edge' x1\x3d'"+$APP.P.i(a)+"' y1\x3d'"+$APP.P.i(c)+"' x2\x3d'"+$APP.P.i(d)+"' y2\x3d'"+$APP.P.i(b)+"' /\x3e"},mfa=function(a,b){var c=$APP.G(a);a=$APP.C(c,TN);var d=$APP.C(c,mP),e=$APP.C(c,$APP.Tn);c=$APP.C(c,$APP.Un);return"\x3csvg class\x3d'causality-svg' width\x3d'"+$APP.P.i(e)+"' height\x3d'"+$APP.P.i(c)+"' viewBox\x3d'0 0 "+$APP.P.i(e)+" "+$APP.P.i(c)+"'\x3e"+$APP.P.i($APP.ce($APP.P,$APP.ye.j(lfa,d)))+$APP.P.i($APP.ce($APP.P,$APP.ye.j(function(f){var h=$APP.G(f),
52
- k=$APP.C(h,$APP.rt);f=$APP.C(h,QN);var m=$APP.C(h,nP);h=$APP.C(h,oP);m-=70;var r=h-14,u=$APP.z.j(k,b),x=m+12,y=m+22,A=m+22,E=r+18,H=r+11,O=dP("#"+$APP.P.i(k)+" "+$APP.P.i(hP(f))+" · "+$APP.P.i(zN(f)));k="\x3cg data-x-th-link-id\x3d'"+$APP.P.i(k)+"' role\x3d'button' aria-label\x3d'"+$APP.P.i(O)+"'\x3e\x3ctitle\x3e"+$APP.P.i(O)+"\x3c/title\x3e\x3crect class\x3d'node-rect"+$APP.P.i(u?" selected":null)+"' x\x3d'"+$APP.P.i(m)+"' y\x3d'"+$APP.P.i(r)+"' width\x3d'"+$APP.P.i(140)+"' height\x3d'"+$APP.P.i(28)+
53
- "' /\x3e\x3ccircle class\x3d'node-dot' cx\x3d'"+$APP.P.i(x)+"' cy\x3d'"+$APP.P.i(h)+"' r\x3d'"+$APP.P.i(4)+"' fill\x3d'"+$APP.P.i(CN(f))+"' /\x3e\x3ctext class\x3d'node-text id' x\x3d'"+$APP.P.i(y)+"' y\x3d'"+$APP.P.i(H)+"'\x3e#"+$APP.P.i(k)+"\x3c/text\x3e\x3ctext class\x3d'node-text' x\x3d'"+$APP.P.i(A)+"' y\x3d'"+$APP.P.i(E)+"'\x3e";h=$APP.P;m=h.i;f=hP(f);f=""+$APP.P.i(f);f=f.length<=22?f:""+$APP.P.i(f.substring(0,21))+"…";return k+m.call(h,dP(f))+"\x3c/text\x3e\x3c/g\x3e"},a)))+"\x3c/svg\x3e"},
54
- ofa=function(a,b,c,d){if(d==null)$N(a,pP,null),b.innerHTML="\x3cdiv class\x3d'causality-empty'\x3e"+$APP.P.i(dP("Select a record from the timeline to see its causality tree."))+"\x3c/div\x3e";else{a:{var e=d;for(var f=0;;){var h=e.causeId;if(typeof h!=="number"||f>=5E3)break a;h=xN(c,h);if($APP.n(h))f+=1,e=h;else break a}e=void 0}e=Jea(c,e);c=new $APP.M(null,2,[qP,rP(e),nfa,sP(e)],null);if($APP.n(SN.i(e)))$N(a,pP,null),a=$APP.P,d=a.i,c=$APP.G(c),c=$APP.C(c,qP),c="Causality tree exceeds the "+$APP.P.i(200)+
55
- "-node cap (≥ "+$APP.P.i(c)+" nodes). Pick a smaller leaf record to view its subtree.",b.innerHTML="\x3cdiv class\x3d'causality-empty'\x3e"+d.call(a,dP(c))+"\x3c/div\x3e";else{e=tP(e,0,16);f=$APP.B(e,0,null);$APP.B(e,1,null);e=uP(f);f=vP(f);h=$APP.za($APP.Xo,0,$APP.ye.j(nP,e));var k=$APP.za($APP.Xo,0,$APP.ye.j(oP,e));e=new $APP.M(null,4,[TN,e,mP,f,$APP.Tn,h+70+16,$APP.Un,k+14+16],null);c=$APP.z.j(1,qP.i(c));$N(a,pP,e);b.innerHTML=""+$APP.P.i(c?"\x3cdiv class\x3d'causality-leaf-hint'\x3e"+$APP.P.i(dP("This record has no cause and no effects in the current buffer. Pick an event/dispatch* record (or one with a 'Caused by' link in the detail pane) to see a chain."))+
56
- "\x3c/div\x3e":null)+$APP.P.i(mfa(e,d.id))}}},pfa=function(a){if($APP.n(ZN(a,wP))){var b=$APP.l(a,"__xTraceHistoryCausalityEl"),c=ZN(a,pP),d=xP.i?xP.i(a):xP.call(null,a),e=$APP.n(c)?Kea(c,d):null,f=b==null?null:b.clientWidth;d=b==null?null:b.clientHeight;if($APP.n($APP.n(b)?$APP.n(c)?$APP.n(e)?typeof f==="number"&&typeof d==="number"&&f>0&&d>0:e:c:b)){var h=$APP.G(c);c=$APP.C(h,$APP.Tn);h=$APP.C(h,$APP.Un);var k=nP.i(e),m=oP.i(e);e=k-f/2;k=m-d/2;f=$APP.Xo.j(0,c-f);d=$APP.Xo.j(0,h-d);d=new $APP.M(null,
57
- 2,[yP,$APP.Xo.j(0,$APP.qo.j(f,e)),zP,$APP.Xo.j(0,$APP.qo.j(d,k))],null);f=$APP.G(d);d=$APP.C(f,yP);f=$APP.C(f,zP);b.scrollLeft=d;b.scrollTop=f;$N(a,wP,!1)}}},qfa=function(a){var b=Wea();a:{var c=a.querySelectorAll("option");for(var d=c.length,e=0,f=$APP.yb($APP.dh);;){if(e>=d){c=$APP.Ab(f);break a}var h=c[e].value;e+=1;f=$APP.z.j(h,"all")?f:$APP.zb(f,h)}c=void 0}b=$APP.Fe(c,b);$APP.q(b)&&(b=$APP.ce($APP.P,$APP.ye.j(efa,b)),a.insertAdjacentHTML("beforeend",b))},rfa=function(a){var b=$APP.jq.i($APP.eb(nN));
58
- a.textContent=$APP.n(b)?"Resume":"Pause";a.pressed=b},sfa=function(a){var b=OO()!=null;a.textContent=b?"Stop":"Record";a.pressed=b},tfa=function(a){var b=$APP.G(a);a=$APP.C(b,AP);var c=$APP.C(b,$APP.Mm),d=$APP.C(b,BP),e=$APP.C(b,CP),f=$APP.C(b,$APP.Wj);b=$APP.C(b,DP);return"\x3cbutton class\x3d'session-chip"+$APP.P.i($APP.n(c)?" active":null)+$APP.P.i($APP.n(e)?" import":null)+"' type\x3d'button' data-x-th-session\x3d'"+$APP.P.i(dP(a))+"'\x3e"+$APP.P.i($APP.n(d)?"\x3cspan class\x3d'live-dot' aria-hidden\x3d'true'\x3e\x3c/span\x3e":
59
- null)+$APP.P.i(dP(f))+$APP.P.i($APP.n(e)?"\x3cspan class\x3d'chip-close' role\x3d'button' aria-label\x3d'Remove import' data-x-th-import-close\x3d'"+$APP.P.i(b)+"'\x3e×\x3c/span\x3e":null)+"\x3c/button\x3e"},ufa=function(a,b,c,d){var e=new $APP.M(null,5,[AP,"live",$APP.Mm,$APP.z.j(c,$APP.hq),BP,!1,CP,!1,$APP.Wj,"Live"],null),f=VN(c)?YN(c):null,h=XN(c)?YN(c):null;a=$APP.He(function(k){var m=k.id;return new $APP.M(null,5,[AP,""+$APP.P.i(m),$APP.Mm,$APP.z.j(m,f),BP,$APP.z.j(m,d),CP,!1,$APP.Wj,""+$APP.P.i(k.label)+
60
- " · "+$APP.P.i(k.recordCount)],null)},$APP.Ec(a));b=$APP.He(function(k){var m=k.id;return new $APP.M(null,6,[AP,"import:"+$APP.P.i(m),$APP.Mm,$APP.z.j(m,h),BP,!1,CP,!0,DP,m,$APP.Wj,""+$APP.P.i(k.label)+" · "+$APP.P.i(k.recordCount)],null)},$APP.Ec(b));return $APP.ce($APP.P,$APP.ye.j(tfa,$APP.Be.B(new $APP.J(null,1,5,$APP.K,[e],null),a,$APP.Ec([b]))))},vfa=function(a,b,c,d,e){a.innerHTML=ufa(b,c,d,e);b.length===0&&c.length===0?a.setAttribute("hidden",""):a.removeAttribute("hidden")},EP=function(a){var b=
61
- zN(a);b="#"+$APP.P.i(a.id)+" "+$APP.P.i(a.tag)+" · "+$APP.P.i(a.type)+$APP.P.i($APP.n($APP.n(b)?!$APP.Ii(b):b)?" · "+$APP.P.i(b):null);return"\x3cx-button class\x3d'detail-link' size\x3d'sm' variant\x3d'ghost' data-x-th-link-id\x3d'"+$APP.P.i(a.id)+"' title\x3d'"+$APP.P.i(dP(b))+"'\x3e"+$APP.P.i(dP(b))+"\x3c/x-button\x3e"},wfa=function(a,b,c,d){if($APP.n(d)){var e=JSON.stringify(d,null,2);var f=d.causeId;var h=typeof f==="number"?xN(c,f):null;f=Hea(c,d);e="\x3cpre class\x3d'detail-json'\x3e"+$APP.P.i(dP(e))+
62
- "\x3c/pre\x3e"+$APP.P.i($APP.n(h)?"\x3cdiv class\x3d'detail-section' data-x-th-detail-cause\x3e\x3cdiv class\x3d'detail-label'\x3eCaused by\x3c/div\x3e"+$APP.P.i(EP(h))+"\x3c/div\x3e":null);c=$APP.P;d=c.i;h=$APP.G(f);f=$APP.C(h,$APP.$u);h=$APP.C(h,MN);if(f>0){var k=$APP.w(h);f=$APP.z.j(k,f)?"Effects ("+$APP.P.i(f)+")":"Effects ("+$APP.P.i(k)+" of "+$APP.P.i(f)+")";f="\x3cdiv class\x3d'detail-section' data-x-th-detail-effects\x3e\x3cdiv class\x3d'detail-label'\x3e"+$APP.P.i(f)+"\x3c/div\x3e"+$APP.P.i($APP.ce($APP.P,
63
- $APP.ye.j(EP,h)))+"\x3c/div\x3e"}else f=null;e+=d.call(c,f);a.innerHTML=e;a.removeAttribute("hidden");b.removeAttribute("hidden")}else a.setAttribute("hidden",""),b.setAttribute("hidden","")},GP=function(a){var b=FP.get(a);if($APP.n(b))return b;b=rN(a);FP.set(a,b);return b},HP=function(a){return $APP.z.j(a,$APP.hq)?"live":VN(a)?"session:"+$APP.P.i(YN(a)):XN(a)?"import:"+$APP.P.i(YN(a)):"live"},xP=function(a){var b=$APP.l(a,"__xTraceHistoryView");a=$APP.l(a,"__xTraceHistoryViewSelected");return $APP.n(a)?
64
- $APP.l(a,HP(b)):null},JP=function(a,b){var c=$APP.l(a,"__xTraceHistoryViewSelected");c=$APP.n(c)?c:{};var d=HP($APP.l(a,"__xTraceHistoryView"));b==null?d in c&&delete c[d]:c[d]=b;$APP.Q(a,"__xTraceHistoryViewSelected",c);b!=null&&$APP.z.j(IP,$APP.l(a,"__xTraceHistoryDockMode"))&&$N(a,wP,!0)},xfa=function(a,b,c){var d=xP(a);b=xN(b,d);if(b==null)return null;if(vN(b,$APP.$g.m(c,uN,GP)))return b;JP(a,null);return null},KP=function(a){return $APP.z.j(a,$APP.hq)?bO():VN(a)?(a=TO(YN(a)),a.length===0?bO():
65
- a):XN(a)?(a=YO(YN(a)),a.length===0?bO():a):bO()},yfa=function(a,b,c,d){switch(d instanceof $APP.F?d.ea:null){case "causality":b.setAttribute("hidden","");c.removeAttribute("hidden");a.classList.add("causality-mode");break;default:b.removeAttribute("hidden"),c.setAttribute("hidden",""),a.classList.remove("causality-mode")}},LP=function(a){bP(a);return $APP.bj(a,"__xTraceHistoryHighlightCid",null)},zfa=function(a,b){if(b!=null&&b.componentId!=null&&$APP.I("document",b.tag))if($APP.z.j(b.componentId,
66
- $APP.l(a,"__xTraceHistoryHighlightCid")))b=cP(a);else{var c=b.componentId;b=rO(c);if($APP.n(b)){$APP.bj(a,"__xTraceHistoryHighlightCid",c);c=$APP.l(a,"__xTraceHistoryHighlightBox");if($APP.n(c))a=c;else{c=$APP.pk(a,":host { all: initial; }\n.outline {\n position: absolute;\n pointer-events: none;\n box-sizing: border-box;\n border: 3px solid #ff2d8a;\n border-radius: 3px;\n background: rgba(255, 45, 138, 0.12);\n box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 14px 2px rgba(255, 45, 138, 0.55);\n display: none;\n}\n@media (prefers-reduced-motion: no-preference) {\n .outline {\n transition: top .08s linear, left .08s linear,\n width .08s linear, height .08s linear;\n animation: x-th-highlight-pulse .55s ease-out 1 both;\n }\n @keyframes x-th-highlight-pulse {\n 0% { box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 0 12px rgba(255, 45, 138, 0.55); }\n 100% { box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 14px 2px rgba(255, 45, 138, 0.55); }\n }\n}\n",
67
- 9998);var d=c.shadowRoot,e=document.createElement("div");e.className="outline";d.appendChild(e);$APP.bj(a,"__xTraceHistoryHighlightLayer",c);$APP.bj(a,"__xTraceHistoryHighlightBox",e);a=e}c=b.getBoundingClientRect();d=window.innerWidth;e=window.innerHeight;c.top>=0&&c.left>=0&&c.bottom<=e&&c.right<=d||b.scrollIntoView({block:"nearest",inline:"nearest",behavior:$APP.D($APP.n(MP)?MP.matches:null)?"auto":"smooth"});aP(a,b);a.style.display="block";b=a;b.style.animation="none";b=b.style.animation=""}else b=
68
- LP(a)}else b=LP(a);return b},OP=function(a){var b=$APP.l(a,"__xTraceHistoryTimelineEl"),c=$APP.l(a,"__xTraceHistoryCausalityEl"),d=$APP.l(a,"__xTraceHistoryLanesEl"),e=$APP.l(a,"__xTraceHistorySvgPaneEl"),f=$APP.l(a,"__xTraceHistoryCountEl"),h=$APP.l(a,"__xTraceHistoryDetailEl"),k=$APP.l(a,"__xTraceHistorySplitterEl"),m=$APP.l(a,"__xTraceHistoryHintEl"),r=$APP.l(a,"__xTraceHistoryPauseBtn"),u=$APP.l(a,"__xTraceHistoryRecordBtn"),x=$APP.l(a,"__xTraceHistorySessionsEl"),y=$APP.l(a,"__xTraceHistoryTagSelectEl"),
69
- A=$APP.l(a,"__xTraceHistoryFilter"),E=$APP.l(a,"__xTraceHistoryView"),H=KP(E),O=wN(H,$APP.$g.m(A,uN,GP)),S=$APP.w(O),R=H.length,Z=JN(O),ka=xea(O),ha=xfa(a,H,A),na=SO(),La=XO(),Na=OO(),cb=function(){var Hb=$APP.l(a,"__xTraceHistoryAxisMode");return $APP.n(Hb)?Hb:$APP.Rr}(),nb=function(){var Hb=$APP.l(a,"__xTraceHistoryDockMode");return $APP.n(Hb)?Hb:NP}();qfa(y);yfa(a,b,c,nb);switch(nb instanceof $APP.F?nb.ea:null){case "causality":ofa(a,c,H,ha);break;default:kfa(d,e,cb,O,ka,Z,ha,$APP.or.i(A))}f.textContent=
70
- ""+$APP.P.i(S);m.textContent=Lea(S,R,Z,$APP.w(ka));wfa(h,k,H,ha);rfa(r);sfa(u);vfa(x,na,La,E,Na);pfa(a);return zfa(a,ha)},PP=function(a){return $APP.n(a)?$APP.z.j("circle",a.tagName.toLowerCase()):a},QP=function(a){return $APP.n(a)?$APP.z.j("rect",a.tagName.toLowerCase())&&a.getAttribute("data-x-th-bin-record-id")!=null:a},RP=function(a){a=a.getAttribute("data-x-th-id");return $APP.n(a)?parseInt(a,10):null},SP=function(a,b){$APP.n(b)?a.classList.add("collapsed"):a.classList.remove("collapsed");a=
71
- $APP.l(a,"__xTraceHistoryCollapseBtn");return $APP.n(a)?(a.textContent=$APP.n(b)?"»":"«",a.setAttribute("aria-expanded",$APP.n(b)?"false":"true")):null},TP=function(a){var b=!$APP.D($APP.l(a,"__xTraceHistoryCollapsed"));$APP.Q(a,"__xTraceHistoryCollapsed",b);return SP(a,b)},Afa=function(a,b){$APP.Q(a,"__xTraceHistoryAxisMode",function(){switch(b){case "order":return $APP.Rr;case "time":return gP;default:return $APP.Rr}}());return OP(a)},Bfa=function(a,b){var c=function(){switch(b){case "timeline":return NP;
72
- case "causality":return IP;default:return NP}}();$APP.Q(a,"__xTraceHistoryDockMode",c);$APP.z.j(IP,c)?$N(a,wP,!0):$N(a,wP,!1);return OP(a)},UP=function(a,b,c,d){a.textContent=d;a.removeAttribute("hidden");var e=b.getBoundingClientRect();d=c.clientX-e.left;c=c.clientY-e.top;e=b.scrollTop;var f=b.scrollLeft;b=$APP.Xo.j(0,d+12+280>b.clientWidth?d-12-280:d+12);a.style.left=""+$APP.P.i(b+f)+"px";return a.style.top=""+$APP.P.i(c+e+12)+"px"},Cfa=function(a,b){var c=b.target,d=$APP.l(a,"__xTraceHistoryTooltipEl"),
73
- e=$APP.l(a,"__xTraceHistoryTimelineEl");a=KP($APP.l(a,"__xTraceHistoryView"));if($APP.n(PP(c))){c=RP(c);a=xN(a,c);if($APP.n(a)){c=""+$APP.P.i(a.tag);var f=$APP.P,h=f.i;var k=a.componentId;k=$APP.n(k)?" #"+$APP.P.i(k):null;a=c+h.call(f,k)+"\n"+$APP.P.i(a.type)+"\n"+$APP.P.i(zN(a))+"\n@ "+$APP.P.i(AN(a.t));b=UP(d,e,b,a)}else b=null;return b}if($APP.n(QP(c))){f=c.getAttribute("data-x-th-bin-record-id");h=c.getAttribute("data-x-th-bin-count");c=c.getAttribute("data-x-th-bin-cat");c=$APP.n($APP.n(f)?$APP.n(h)?
74
- c:h:f)?new $APP.M(null,3,[VP,parseInt(f,10),WP,parseInt(h,10),NN,$APP.Lh.i(c)],null):null;if($APP.n(c)){f=$APP.G(c);h=$APP.C(f,VP);c=$APP.C(f,WP);f=$APP.C(f,NN);a=xN(a,h);if($APP.n(a)){h=""+$APP.P.i(a.tag);k=$APP.P;var m=k.i;var r=a.componentId;r=$APP.n(r)?" #"+$APP.P.i(r):null;a=h+m.call(k,r)+"\n"+$APP.P.i(c)+" "+$APP.P.i($APP.z.j(1,c)?"record":"records")+" · "+$APP.P.i($APP.kh($APP.n(f)?f:pN))+"\n@ "+$APP.P.i(AN(a.t));b=UP(d,e,b,a)}else b=null;return b}return null}return d.setAttribute("hidden",
75
- "")},XP=function(a,b,c,d,e,f){a:switch(b=b instanceof $APP.F?b.ea:null,b){case "order":d=$APP.w(c);e=$APP.Xo.j(0,e-16);d===0||d<0?f=null:$APP.z.j(1,d)||e===0?f=0:(f=$APP.qo.j($APP.Xo.j((f-8)/e,0),1),f=Math.round(f*(d-1)));c=$APP.n(f)?$APP.B(c,f,null):null;break a;case "time":var h=$APP.G(d);d=$APP.C(h,HN);b=$APP.C(h,IN);var k=$APP.Xo.j(0,e-16);h==null||d==null||b==null?f=0:e===0||e<0||k===0?f=d:(f=$APP.qo.j($APP.Xo.j((f-8)/k,0),1),f=d+f*b);c=zea(c,f);break a;default:throw Error("No matching clause: "+
76
- $APP.P.i(b));}return $APP.n(c)?(JP(a,c.id),OP(a)):null},Dfa=function(a,b,c){function d(x){return XP(a,k,r,u,f,x.clientX-e.left)}c.preventDefault();b.setPointerCapture(c.pointerId);var e=b.getBoundingClientRect(),f=$APP.Xo.j(200,b.clientWidth),h=$APP.l(a,"__xTraceHistoryFilter"),k=function(){var x=$APP.l(a,"__xTraceHistoryAxisMode");return $APP.n(x)?x:$APP.Rr}(),m=KP($APP.l(a,"__xTraceHistoryView")),r=wN(m,$APP.$g.m(h,uN,GP)),u=JN(r);XP(a,k,r,u,f,c.clientX-e.left);c=function y(){b.removeEventListener("pointermove",
77
- d);b.removeEventListener("pointerup",y);return b.removeEventListener("pointercancel",y)};b.addEventListener("pointermove",d);b.addEventListener("pointerup",c);return b.addEventListener("pointercancel",c)},YP=function(a,b){var c=$APP.l(a,"__xTraceHistoryFilter"),d=KP($APP.l(a,"__xTraceHistoryView"));c=wN(d,$APP.$g.m(c,uN,GP));d=xP(a);a:if($APP.q(c)){if(d!=null)b:if(typeof d==="number"){for(var e=$APP.w(c),f=0;;){if(f>=e){d=null;break b}if($APP.z.j(d,$APP.zc(c,f).id)){d=f;break b}f+=1}d=void 0}else d=
78
- null;else d=null;if(d==null)switch(b=b instanceof $APP.F?b.ea:null,b){case "next":b=$APP.t(c);break a;case "prev":b=$APP.Rc(c);break a;default:throw Error("No matching clause: "+$APP.P.i(b));}else b=$APP.z.j(b,$APP.Er)?$APP.C(c,d+1):$APP.C(c,d-1)}else b=null;return $APP.n(b)?(JP(a,b.id),OP(a)):null},ZP=function(a){var b=$APP.D(a==null?null:a.isContentEditable);b?a=b:(a=a==null?null:a.tagName,a=$APP.ed(Efa,a==null?null:a.toLowerCase()));return a},Ffa=function(a,b){if(ZP(b.target))return null;switch(b.key){case "ArrowRight":return b.preventDefault(),
79
- YP(a,$APP.Er);case "ArrowLeft":return b.preventDefault(),YP(a,$APP.yr);default:return null}},Gfa=function(a,b,c){function d(h){h=$APP.Xo.j(60,f+(e-h.clientY));return a.style.height=""+$APP.P.i(h)+"px"}c.preventDefault();b.setPointerCapture(c.pointerId);b.classList.add("dragging");var e=c.clientY,f=a.offsetHeight;c=function k(){b.removeEventListener("pointermove",d);b.removeEventListener("pointerup",k);b.removeEventListener("pointercancel",k);return b.classList.remove("dragging")};b.addEventListener("pointermove",
80
- d);b.addEventListener("pointerup",c);return b.addEventListener("pointercancel",c)},Hfa=function(a){return a==null||$APP.z.j("",a)?null:$APP.ia(a,".trace.json")?$APP.yd(a,$APP.w(a)-11):$APP.ia(a,".json")?$APP.yd(a,$APP.w(a)-5):a},aQ=function(a,b){var c=$APP.l(a,"__xTraceHistoryHintEl"),d=ZN(a,$P);typeof d==="number"&&clearTimeout(d);c.textContent=b;c.classList.add("error");b=setTimeout(function(){c.classList.remove("error");$N(a,$P,null);return OP(a)},4E3);return $N(a,$P,b)},cQ=function(a,b){var c=
81
- new FileReader,d=Hfa(b.name);c.onload=function(){var e=bQ.j(c.result,d);e!=null?($APP.l(a,"__xTraceHistoryHintEl").classList.remove("error"),$APP.Q(a,"__xTraceHistoryView",new $APP.J(null,2,5,$APP.K,[WN,e],null)),e=OP(a)):e=aQ(a,"Import failed — see console for details.");return e};c.onerror=function(){return aQ(a,"Could not read file.")};return c.readAsText(b)},dQ=function(a){a=a.dataTransfer;return $APP.n(a)?a.types.includes("Files"):null},Ifa=function(a,b){var c=a.shadowRoot;a=$APP.n(c)?c:a.attachShadow({mode:"open"});
82
- if(c==null){c="\x3cstyle\x3e"+$APP.P.i(":host {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n width: min(420px, calc(100vw - 1rem));\n z-index: 1999999;\n font: 11px/1.4 ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;\n color: #cdd6f4;\n pointer-events: auto;\n /* The width transition makes the collapse / expand toggle feel\n responsive without being slow. The dock is otherwise position:\n fixed so transitioning width doesn't reflow the host page. */\n transition: width 160ms ease;\n}\n/* Collapsed mode: shrink the host to a thin vertical strip so the\n user can reach components the full dock would otherwise cover.\n The only interactive element left is the collapse-toggle button,\n which expands the dock back to full width when clicked. */\n:host(.collapsed) {\n width: 32px;\n}\n:host(.collapsed) .dock \x3e *:not(.header) { display: none; }\n:host(.collapsed) .header {\n flex-direction: column;\n align-items: center;\n padding: 8px 0;\n gap: 4px;\n}\n:host(.collapsed) .header \x3e *:not([data-x-th-action\x3d'collapse']) {\n display: none;\n}\n/* Causality mode: hide the axis-mode select (Order / Time only\n affects the timeline pane, so it's noise in causality view). */\n:host(.causality-mode) [data-x-th-axis] {\n display: none;\n}\n@media (prefers-reduced-motion: reduce) {\n :host { transition: none; }\n}\n.dock {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: #11111b;\n border-left: 1px solid rgba(59,130,246,0.6);\n box-shadow: -4px 0 20px rgba(0,0,0,0.4);\n /* Anchor for the absolutely-positioned drop-overlay added in PR 11\n so its `inset: 0` reaches the dock edges. */\n position: relative;\n}\n.header {\n display: flex;\n /* Wrap so the count + action buttons survive narrow viewports\n (`min(420px, calc(100vw - 1rem))` reaches 304px at 320px screens,\n which is too tight for four action buttons + title + count on\n one row). */\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n background: rgba(59,130,246,0.15);\n border-bottom: 1px solid rgba(59,130,246,0.3);\n flex: 0 0 auto;\n}\n.title { font-weight: 700; color: #89b4fa; font-size: 12px; }\n.count { color: #6c7086; margin-left: auto; }\n.filters {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px 12px;\n padding: 6px 10px;\n border-bottom: 1px solid rgba(255,255,255,0.06);\n flex: 0 0 auto;\n}\n/* The tag dropdown is an \x3cx-select\x3e; its own shadow brings styling.\n We just constrain its width and font so it matches the dock's\n ui-monospace 11px tone. */\n.filters x-select {\n font-size: 11px;\n max-width: 140px;\n}\n/* x-checkbox has no slot for its label, so the visible text sits\n next to the checkbox inside a \x3clabel\x3e wrapper. The label uses\n inline-flex to keep the checkbox + text on one row, with a small\n gap. Cursor: pointer mirrors native checkbox-label affordance. */\n.filters label.cat {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: #a6adc8;\n font-size: 10px;\n cursor: pointer;\n user-select: none;\n}\n/* PR 16 — search input. x-search-field brings its own theming via its\n shadow DOM; the dock just constrains the host width so it shares\n the filter row's monospace tone with the tag dropdown. */\n.filters x-search-field {\n font-size: 11px;\n flex: 1 1 140px;\n min-width: 100px;\n max-width: 240px;\n}\n/* Session strip: thin row above the filter row listing the live view\n plus any captured session as a clickable chip. Hidden when the only\n chip is Live (no sessions yet) so the dock stays compact. Scrolls\n horizontally if the chip count overflows the dock width. */\n.sessions {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 10px;\n background: rgba(0,0,0,0.15);\n border-bottom: 1px solid rgba(255,255,255,0.04);\n flex: 0 0 auto;\n overflow-x: auto;\n white-space: nowrap;\n}\n.sessions[hidden] { display: none; }\n.session-chip {\n flex: 0 0 auto;\n background: rgba(255,255,255,0.04);\n color: #a6adc8;\n border: 1px solid rgba(255,255,255,0.08);\n border-radius: 3px;\n padding: 1px 6px;\n font: inherit;\n font-size: 10px;\n cursor: pointer;\n user-select: none;\n}\n.session-chip:hover { background: rgba(59,130,246,0.12); color: #cdd6f4; }\n.session-chip.active {\n background: rgba(59,130,246,0.22);\n border-color: rgba(59,130,246,0.6);\n color: #89b4fa;\n font-weight: 600;\n}\n/* Imported traces are visually distinct from locally-captured\n sessions: amber border instead of blue, plus a small close button\n inside the chip so the user can drop the import without clearing\n live state. */\n.session-chip.import {\n border-color: rgba(249,226,175,0.45);\n color: #f9e2af;\n}\n.session-chip.import.active {\n background: rgba(249,226,175,0.18);\n border-color: rgba(249,226,175,0.7);\n color: #f9e2af;\n}\n.session-chip.import .chip-close {\n background: transparent;\n border: none;\n color: inherit;\n cursor: pointer;\n font: inherit;\n font-size: 12px;\n line-height: 1;\n padding: 0 0 0 6px;\n margin: 0;\n opacity: 0.6;\n}\n.session-chip.import .chip-close:hover { opacity: 1; }\n.session-chip .live-dot {\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: #f38ba8;\n margin-right: 4px;\n vertical-align: middle;\n animation: x-th-pulse 1s ease-in-out infinite;\n}\n@keyframes x-th-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.35; }\n}\n@media (prefers-reduced-motion: reduce) {\n .session-chip .live-dot { animation: none; }\n}\n.timeline {\n flex: 1 1 auto;\n overflow: auto;\n min-height: 0;\n position: relative;\n /* Transparent border reserves 2px so the focus indicator below doesn't\n overlap the leftmost pixels of lane labels or shift content layout. */\n border: 2px solid transparent;\n box-sizing: border-box;\n}\n.timeline-body {\n display: flex;\n align-items: stretch;\n min-height: 100%;\n}\n.lanes {\n flex: 0 0 110px;\n display: flex;\n flex-direction: column;\n border-right: 1px solid rgba(255,255,255,0.06);\n background: #11111b;\n position: sticky;\n left: 0;\n z-index: 1;\n}\n.lane-label {\n height: 20px;\n padding: 0 8px;\n display: flex;\n align-items: center;\n font-size: 11px;\n color: #a6adc8;\n border-bottom: 1px solid rgba(255,255,255,0.04);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n user-select: none;\n}\n.lane-label:hover { background: rgba(59,130,246,0.08); color: #cdd6f4; }\n.lane-label.active {\n background: rgba(59,130,246,0.18);\n color: #89b4fa;\n font-weight: 600;\n}\n.lane-label .cid { color: #6c7086; margin-left: 4px; }\n.svg-pane {\n flex: 1 1 auto;\n min-width: 0;\n display: block;\n}\nsvg.timeline-svg {\n display: block;\n background:\n repeating-linear-gradient(\n to bottom,\n transparent 0,\n transparent 19px,\n rgba(255,255,255,0.03) 19px,\n rgba(255,255,255,0.03) 20px);\n}\n.dot { cursor: pointer; transition: r 80ms ease; }\n.dot:hover { stroke: #fff; stroke-width: 1; }\n.dot.selected { stroke: #fff; stroke-width: 1.5; }\n/* Heatmap bins (PR 18). Each lane that exceeds the density threshold\n renders as a row of these rects rather than individual dots; the\n per-bin fill-opacity is set inline by the renderer (scales with\n the bin's record count relative to the lane's max). */\n.density-bin {\n cursor: pointer;\n transition: stroke 80ms ease, fill-opacity 80ms ease;\n}\n.density-bin:hover {\n stroke: #fff;\n stroke-width: 0.5;\n}\n/* Thin pink bar drawn at the selected record's exact x inside its\n bin — keeps the scrubber-style highlight in dense lanes without\n obscuring the bin's category colour. */\nline.density-selected {\n stroke: #f5c2e7;\n stroke-width: 2;\n pointer-events: none;\n}\nline.scrubber {\n stroke: #f5c2e7;\n stroke-width: 1.5;\n stroke-dasharray: 4 2;\n pointer-events: none;\n}\n.svg-pane { cursor: crosshair; }\n.timeline:focus {\n outline: none;\n border-color: #89b4fa;\n}\n.tooltip {\n position: absolute;\n background: #1e1e2e;\n border: 1px solid rgba(59,130,246,0.6);\n border-radius: 4px;\n padding: 4px 8px;\n font-size: 10px;\n white-space: pre-wrap;\n pointer-events: none;\n max-width: 280px;\n color: #cdd6f4;\n z-index: 10;\n box-shadow: 0 4px 12px rgba(0,0,0,0.5);\n}\n.timeline-empty {\n color: #6c7086;\n font-style: italic;\n text-align: center;\n padding: 20px;\n width: 100%;\n}\n/* Causality DAG pane (PR 17). Shares the flexible vertical slot with\n .timeline — render! toggles which one is hidden by dock-mode. The\n scrollable container holds an inner \x3csvg\x3e sized to the tree's\n bounding box so the scrollbars correctly reflect off-screen depth\n and breadth. */\n.causality {\n flex: 1 1 auto;\n overflow: auto;\n min-height: 0;\n position: relative;\n background: #11111b;\n border: 2px solid transparent;\n box-sizing: border-box;\n}\n.causality:focus { outline: none; border-color: #89b4fa; }\n.causality[hidden] { display: none; }\n.timeline[hidden] { display: none; }\n.causality-empty {\n color: #6c7086;\n font-style: italic;\n text-align: center;\n padding: 20px;\n width: 100%;\n}\n/* Leaf-hint banner rendered ABOVE the SVG when the tree has only\n one node. Pinned via sticky positioning so it stays visible even\n when the user scrolls the pane (the lone node sits at the\n padded origin and could be obscured by the banner otherwise). */\n.causality-leaf-hint {\n position: sticky;\n top: 0;\n left: 0;\n z-index: 1;\n background: rgba(249,226,175,0.10);\n border-bottom: 1px solid rgba(249,226,175,0.35);\n color: #f9e2af;\n font-size: 10px;\n padding: 6px 10px;\n line-height: 1.4;\n}\nsvg.causality-svg { display: block; }\nsvg.causality-svg .edge {\n stroke: rgba(255,255,255,0.18);\n stroke-width: 1;\n fill: none;\n}\nsvg.causality-svg .node-rect {\n fill: rgba(255,255,255,0.04);\n stroke: rgba(255,255,255,0.12);\n stroke-width: 1;\n cursor: pointer;\n rx: 4;\n ry: 4;\n transition: fill 80ms ease, stroke 80ms ease;\n}\nsvg.causality-svg .node-rect:hover {\n fill: rgba(59,130,246,0.16);\n stroke: rgba(59,130,246,0.6);\n}\nsvg.causality-svg .node-rect.selected {\n fill: rgba(245,194,231,0.18);\n stroke: #f5c2e7;\n stroke-width: 1.5;\n}\nsvg.causality-svg .node-dot {\n pointer-events: none;\n}\nsvg.causality-svg .node-text {\n fill: #cdd6f4;\n font: 10px ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;\n pointer-events: none;\n dominant-baseline: middle;\n}\nsvg.causality-svg .node-text.id {\n fill: #a6adc8;\n font-size: 9px;\n}\n.splitter {\n flex: 0 0 auto;\n height: 4px;\n background: rgba(255,255,255,0.04);\n cursor: ns-resize;\n touch-action: none;\n transition: background 120ms ease;\n}\n.splitter:hover, .splitter.dragging { background: rgba(59,130,246,0.6); }\n.detail {\n background: #181825;\n border-top: 1px solid rgba(59,130,246,0.2);\n padding: 8px 10px;\n font-size: 10px;\n color: #cdd6f4;\n flex: 0 0 auto;\n height: 35vh;\n min-height: 60px;\n max-height: 80%;\n overflow-y: auto;\n}\n.detail-json {\n margin: 0 0 8px 0;\n font: inherit;\n white-space: pre-wrap;\n word-break: break-all;\n color: #a6e3a1;\n}\n.detail-section { margin-top: 6px; }\n.detail-label {\n color: #89b4fa;\n font-weight: 600;\n margin-bottom: 2px;\n font-size: 10px;\n letter-spacing: 0.02em;\n}\n/* The host is an \x3cx-button\x3e; its own shadow brings background, hover,\n border-radius, etc. We keep block-layout + width on the host so each\n link fills its row, and reach into the button's `label` part to add\n ellipsis truncation (the summary string can exceed the dock width). */\n.detail-link {\n display: block;\n width: 100%;\n margin: 2px 0;\n}\n.detail-link::part(label) {\n display: block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.detail-link::part(button) {\n width: 100%;\n justify-content: flex-start;\n}\n.detail-empty { color: #6c7086; font-style: italic; font-size: 10px; }\n.empty {\n color: #6c7086;\n font-style: italic;\n text-align: center;\n padding: 20px;\n}\n.hint { color: #6c7086; font-size: 10px; padding: 4px 10px; flex: 0 0 auto; }\n.hint.error { color: #f38ba8; }\n/* Drop overlay — covers the whole dock while a file is being hovered.\n pointer-events:none keeps drag events flowing through to the dock root\n so the dragleave/drop bookkeeping doesn't fight the overlay layer. */\n.drop-overlay {\n position: absolute;\n inset: 0;\n background: rgba(249,226,175,0.10);\n border: 2px dashed rgba(249,226,175,0.6);\n display: flex;\n align-items: center;\n justify-content: center;\n color: #f9e2af;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.02em;\n z-index: 100;\n pointer-events: none;\n}\n.drop-overlay[hidden] { display: none; }\n/* The hidden file input is kept off-screen — clicked programmatically\n by the Import button — but we mark it `display:none` to keep it out\n of layout entirely. */\n.import-input { display: none; }")+
83
- "\x3c/style\x3e";var d=$APP.P,e=d.i;b="\x3cdiv class\x3d'dock'\x3e\x3cdiv class\x3d'header'\x3e\x3cx-button data-x-th-action\x3d'collapse' size\x3d'sm' variant\x3d'ghost' aria-label\x3d'Collapse panel' title\x3d'Collapse / expand panel (Ctrl/Cmd + \\\\)'\x3e«\x3c/x-button\x3e\x3cspan class\x3d'title'\x3ex-trace-history\x3c/span\x3e\x3cx-button data-x-th-action\x3d'pause' size\x3d'sm' variant\x3d'ghost'\x3ePause\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'record' size\x3d'sm' variant\x3d'ghost'\x3eRecord\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'clear' size\x3d'sm' variant\x3d'ghost'\x3eClear\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'export' size\x3d'sm' variant\x3d'ghost' title\x3d'Download trace as .trace.json'\x3eExport\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'import' size\x3d'sm' variant\x3d'ghost' title\x3d'Load a .trace.json file (or drag-drop one onto the dock)'\x3eImport\x3c/x-button\x3e\x3cspan class\x3d'count' data-x-th-count\x3e0\x3c/span\x3e\x3c/div\x3e\x3cdiv class\x3d'sessions' data-x-th-sessions hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'filters'\x3e\x3cx-select data-x-th-tag size\x3d'sm'\x3e\x3coption value\x3d'all' selected\x3eAll tags\x3c/option\x3e\x3c/x-select\x3e\x3cx-search-field data-x-th-search name\x3d'search' placeholder\x3d'Search records…' autocomplete\x3d'off'\x3e\x3c/x-search-field\x3e"+
84
- $APP.P.i(eP("events",$APP.ed(b,$APP.pu)))+$APP.P.i(eP("state",$APP.ed(b,$APP.Ut)))+$APP.P.i(eP("dom",$APP.ed(b,eQ)))+$APP.P.i(eP("lifecycle",$APP.ed(b,fQ)))+"\x3cx-select data-x-th-mode size\x3d'sm'\x3e\x3coption value\x3d'timeline' selected\x3eTimeline\x3c/option\x3e\x3coption value\x3d'causality'\x3eCausality\x3c/option\x3e\x3c/x-select\x3e\x3cx-select data-x-th-axis size\x3d'sm'\x3e\x3coption value\x3d'order' selected\x3eOrder\x3c/option\x3e\x3coption value\x3d'time'\x3eTime\x3c/option\x3e\x3c/x-select\x3e\x3c/div\x3e\x3cdiv class\x3d'timeline' data-x-th-timeline tabindex\x3d'0'\x3e\x3cdiv class\x3d'lanes' data-x-th-lanes\x3e\x3c/div\x3e\x3cdiv class\x3d'svg-pane' data-x-th-svg-pane\x3e\x3c/div\x3e\x3cdiv class\x3d'tooltip' data-x-th-tooltip hidden\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'causality' data-x-th-causality tabindex\x3d'0' hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'splitter' data-x-th-splitter hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'detail' data-x-th-detail hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'hint' data-x-th-hint\x3e\x3c/div\x3e\x3cdiv class\x3d'drop-overlay' data-x-th-drop-overlay hidden\x3eDrop .trace.json to import\x3c/div\x3e\x3cinput class\x3d'import-input' data-x-th-import-input type\x3d'file' accept\x3d'.json,.trace.json,application/json' /\x3e\x3c/div\x3e";
85
- a.innerHTML=c+e.call(d,b)}return a},Jfa=function(a,b){$APP.Q(a,"__xTraceHistoryShadow",b);$APP.Q(a,"__xTraceHistoryTimelineEl",b.querySelector("[data-x-th-timeline]"));$APP.Q(a,"__xTraceHistoryLanesEl",b.querySelector("[data-x-th-lanes]"));$APP.Q(a,"__xTraceHistorySvgPaneEl",b.querySelector("[data-x-th-svg-pane]"));$APP.Q(a,"__xTraceHistoryTooltipEl",b.querySelector("[data-x-th-tooltip]"));$APP.Q(a,"__xTraceHistoryCountEl",b.querySelector("[data-x-th-count]"));$APP.Q(a,"__xTraceHistoryDetailEl",b.querySelector("[data-x-th-detail]"));
86
- $APP.Q(a,"__xTraceHistorySplitterEl",b.querySelector("[data-x-th-splitter]"));$APP.Q(a,"__xTraceHistoryHintEl",b.querySelector("[data-x-th-hint]"));$APP.Q(a,"__xTraceHistoryTagSelectEl",b.querySelector("[data-x-th-tag]"));$APP.Q(a,"__xTraceHistoryCausalityEl",b.querySelector("[data-x-th-causality]"));$APP.Q(a,"__xTraceHistoryPauseBtn",b.querySelector("[data-x-th-action\x3d'pause']"));$APP.Q(a,"__xTraceHistoryRecordBtn",b.querySelector("[data-x-th-action\x3d'record']"));$APP.Q(a,"__xTraceHistorySessionsEl",
87
- b.querySelector("[data-x-th-sessions]"));$APP.Q(a,"__xTraceHistoryImportInput",b.querySelector("[data-x-th-import-input]"));$APP.Q(a,"__xTraceHistoryDropOverlay",b.querySelector("[data-x-th-drop-overlay]"));$APP.Q(a,"__xTraceHistoryCollapseBtn",b.querySelector("[data-x-th-action\x3d'collapse']"))},Kfa=function(a,b,c,d,e,f,h,k){return[[b,"click",function(m){m=m.target;var r=m.closest("[data-x-th-action]");if($APP.n(r))switch(r.getAttribute("data-x-th-action")){case "pause":$APP.n($APP.jq.i($APP.eb(nN)))?
88
- IO():HO();break;case "record":OO()!=null?PO():QO();break;case "clear":$APP.Q(a,"__xTraceHistoryViewSelected",{});$APP.Q(a,"__xTraceHistoryView",$APP.hq);NO();break;case "export":$O();break;case "import":r=$APP.l(a,"__xTraceHistoryImportInput");$APP.n(r)&&(r.value="",r.click());break;case "collapse":TP(a)}r=m.closest("[data-x-th-import-close]");if($APP.n(r)){r=parseInt(r.getAttribute("data-x-th-import-close"),10);var u=$APP.l(a,"__xTraceHistoryView");XN(u)&&$APP.z.j(r,YN(u))&&$APP.Q(a,"__xTraceHistoryView",
89
- $APP.hq);VO(r)}$APP.n(m.closest("[data-x-th-import-close]"))||(r=m.closest("[data-x-th-session]"),$APP.n(r)&&(r=r.getAttribute("data-x-th-session"),r=$APP.z.j(r,"live")?$APP.hq:r.lastIndexOf("import:",0)==0?new $APP.J(null,2,5,$APP.K,[WN,parseInt(r.substring(7),10)],null):new $APP.J(null,2,5,$APP.K,[UN,parseInt(r,10)],null),$APP.Q(a,"__xTraceHistoryView",r),OP(a)));r=m.closest("[data-x-th-lane-tag]");if($APP.n(r)){u=r.getAttribute("data-x-th-lane-tag");r=$APP.l(a,"__xTraceHistoryFilter");var x=$APP.or.i(r);
90
- u=$APP.z.j(u,x)?null:u;r=$APP.$g.m(r,$APP.or,u);$APP.Q(a,"__xTraceHistoryFilter",r);r=$APP.l(a,"__xTraceHistoryTagSelectEl");$APP.n(r)&&(r.value=$APP.n(u)?u:"all");OP(a)}r=m.closest("[data-x-th-link-id]");$APP.n(r)&&(r=r.getAttribute("data-x-th-link-id"),$APP.n(r)&&(r=parseInt(r,10),$APP.n(isNaN(r))||(JP(a,r),OP(a))));r=PP(m);r=$APP.n(r)?r:QP(m);$APP.n(r)?($APP.n(PP(m))?m=RP(m):$APP.n(QP(m))?(m=m.getAttribute("data-x-th-bin-record-id"),m=$APP.n(m)?parseInt(m,10):null):m=null,r=xP(a),m=$APP.z.j(m,
91
- r)?null:m,JP(a,m),m=OP(a)):m=null;return m}],[b,"select-change",function(m){var r=m.target;m=m.detail.value;r.getAttribute("data-x-th-tag")!=null?(r=$APP.$g.m($APP.l(a,"__xTraceHistoryFilter"),$APP.or,$APP.z.j(m,"all")?null:m),$APP.Q(a,"__xTraceHistoryFilter",r),r=OP(a)):r=r.getAttribute("data-x-th-mode")!=null?Bfa(a,m):r.getAttribute("data-x-th-axis")!=null?Afa(a,m):null;return r}],[b,"x-checkbox-change",function(m){var r=m.target.getAttribute("data-x-th-cat");if(r!=null){var u=m.detail.checked;
92
- m=$APP.l(a,"__xTraceHistoryFilter");var x=sN.i(m);x=$APP.n(x)?x:$APP.hh(oN);r=$APP.Lh.i(r);r=$APP.n(u)?$APP.Cd.j(x,r):$APP.Wo.j(x,r);m=$APP.$g.m(m,sN,r);$APP.Q(a,"__xTraceHistoryFilter",m);m=OP(a)}else m=null;return m}],[b,"x-search-field-input",function(m){var r=m.target;$APP.n($APP.n(r)?r.hasAttribute("data-x-th-search"):r)?(m=m.detail.value,m=($APP.n(m)?m:"").toLowerCase(),m=$APP.$g.m($APP.l(a,"__xTraceHistoryFilter"),tN,$APP.z.j("",m)?null:m),$APP.Q(a,"__xTraceHistoryFilter",m),m=OP(a)):m=null;
93
- return m}],[c,"pointermove",function(m){return Cfa(a,m)}],[c,"pointerleave",function(){return $APP.l(a,"__xTraceHistoryTooltipEl").setAttribute("hidden","")}],[c,"pointerdown",function(){return c.focus()}],[k,"pointerdown",function(){return k.focus()}],[b,"keydown",function(m){return Ffa(a,m)}],[d,"pointerdown",function(m){return Dfa(a,$APP.l(a,"__xTraceHistorySvgPaneEl"),m)}],[e,"pointerdown",function(m){return Gfa(f,e,m)}],[h,"change",function(m){m=m.target.files;return m.length>0?cQ(a,m[0]):null}],
94
- [b,"dragenter",function(m){if($APP.n(dQ(m))){m.preventDefault();m=$APP.l(a,"__xTraceHistoryDropOverlay");var r=ZN(a,gQ);$N(a,gQ,($APP.n(r)?r:0)+1);m=m.removeAttribute("hidden")}else m=null;return m}],[b,"dragover",function(m){$APP.n(dQ(m))?(m.preventDefault(),m=m.dataTransfer,m=$APP.n(m)?m.dropEffect="copy":null):m=null;return m}],[b,"dragleave",function(m){if($APP.n(dQ(m))){m=$APP.l(a,"__xTraceHistoryDropOverlay");var r=$APP.Xo.j,u=ZN(a,gQ);r=r.call($APP.Xo,0,($APP.n(u)?u:0)-1);$N(a,gQ,r);m=r===
95
- 0?m.setAttribute("hidden",""):null}else m=null;return m}],[b,"drop",function(m){$APP.n(dQ(m))?(m.preventDefault(),$N(a,gQ,0),$APP.l(a,"__xTraceHistoryDropOverlay").setAttribute("hidden",""),m=m.dataTransfer,m=$APP.n(m)?m.files:null,m=$APP.n($APP.n(m)?m.length>0:m)?cQ(a,m[0]):null):m=null;return m}],[document,"keydown",function(m){var r;if(r=$APP.z.j("\\",m.key))r=m.metaKey,r=$APP.n(r)?r:m.ctrlKey,r=$APP.n(r)?$APP.p(m.altKey)&&$APP.p(m.shiftKey)&&!ZP(m.target):r;$APP.n(r)?(m.preventDefault(),m=TP(a)):
96
- m=null;return m}]]},Lfa=function(a,b){b=Kfa(a,b,$APP.l(a,"__xTraceHistoryTimelineEl"),$APP.l(a,"__xTraceHistorySvgPaneEl"),$APP.l(a,"__xTraceHistorySplitterEl"),$APP.l(a,"__xTraceHistoryDetailEl"),$APP.l(a,"__xTraceHistoryImportInput"),$APP.l(a,"__xTraceHistoryCausalityEl"));$APP.Q(a,"__xTraceHistoryListeners",b);a:{a=b.length;for(var c=0;;)if(c<a){var d=b[c];d[0].addEventListener(d[1],d[2]);c+=1}else break a}},Mfa=function(a){if($APP.n($APP.l(a,"__xTraceHistoryHighlightRaf")))return null;var b=requestAnimationFrame(function(){$APP.bj(a,
97
- "__xTraceHistoryHighlightRaf",null);return cP(a)});return $APP.bj(a,"__xTraceHistoryHighlightRaf",b)},Nfa=function(a){function b(){return Mfa(a)}var c=[[window,"scroll",b,{capture:!0,passive:!0}],[window,"resize",b,{capture:!1,passive:!0}]];$APP.bj(a,"__xTraceHistoryHighlightListeners",c);for(var d=c.length,e=0;;)if(e<d){var f=c[e];f[0].addEventListener(f[1],f[2],f[3]);e+=1}else break},Ofa=function(a,b){$APP.n($APP.l(a,"__xTraceHistoryFilter"))||$APP.Q(a,"__xTraceHistoryFilter",new $APP.M(null,3,
98
- [$APP.or,null,sN,b,tN,null],null));$APP.n($APP.l(a,"__xTraceHistoryView"))||$APP.Q(a,"__xTraceHistoryView",$APP.hq);$APP.n($APP.l(a,"__xTraceHistoryViewSelected"))||$APP.Q(a,"__xTraceHistoryViewSelected",{});$APP.n($APP.l(a,"__xTraceHistoryAxisMode"))||$APP.Q(a,"__xTraceHistoryAxisMode",$APP.Rr);$APP.n($APP.l(a,"__xTraceHistoryDockMode"))||$APP.Q(a,"__xTraceHistoryDockMode",NP);$APP.l(a,"__xTraceHistoryCollapsed")==null&&$APP.Q(a,"__xTraceHistoryCollapsed",!1);SP(a,$APP.D($APP.l(a,"__xTraceHistoryCollapsed")))},
99
- Pfa=function(a){if($APP.n($APP.l(a,"__xTraceHistoryMounted")))return null;a.__xTraceHistoryInternal=!0;var b=bO().length;Pea(function(){var c=vea(),d=Ifa(a,c);Jfa(a,d);Ofa(a,c);Lfa(a,d);Nfa(a);c=hO.i(cO.m(dO,Nea,function(){var e=$APP.l(a,"__xTraceHistoryView"),f=XO(),h=f.length;var k=ZN(a,hQ);k=$APP.n(k)?k:0;h>k?($N(a,hQ,h),$APP.z.j(e,$APP.hq)&&bO().length===0&&$APP.Q(a,"__xTraceHistoryView",new $APP.J(null,2,5,$APP.K,[WN,f[h-1].id],null))):h<k&&$N(a,hQ,h);return OP(a)}));$APP.Q(a,"__xTraceHistorySubToken",
100
- c);OP(a);return $APP.Q(a,"__xTraceHistoryMounted",!0)});return $APP.I(b,bO().length)?console.warn("[x-trace-history] dock mount produced records — internal-host suppression is leaking. ","Wrap dynamic child-component constructors in recorder/with-suppressed-recording!."):null},iQ=function(){return $APP.n(document.querySelector("x-trace-history"))?null:document.body.appendChild(document.createElement("x-trace-history"))},jQ=function(){if(ZM()){var a=cO.B;var b=$APP.l(window,"BAREDOM_TRACE_HISTORY_CAPACITY");
101
- b=typeof b==="number"&&b>0?b:5E3;var c=window,d;(d=$APP.z.j("raw",$APP.l(c,"BAREDOM_TRACE_HISTORY")))||(c=c.location.search,c=c==null?null:$APP.Ah(Qfa,c),d=$APP.D(c));a.call(cO,nN,$APP.$g,vO,b,$APP.Ec([fN,d]));YM($APP.Ri,DO);YM($APP.$h,DO);YM(nO,0);YM(uO,$APP.Ge);Sea();YM(CO,!0);a=$APP.l(window,"BareDOM");a=$APP.n(a)?a:{};a.traceHistory={records:Tea,sessions:SO,"export":Zea,download:$O,stopSession:PO,"import":bQ,pause:HO,importRecords:YO,sessionRecords:TO,startSession:QO,components:Uea,clear:NO,imports:XO,
102
- removeImport:VO,resume:IO};window.BareDOM=a;console.log("%c[BareDOM Trace History]%c Active — see window.BareDOM.traceHistory for the API","color:#3b82f6;font-weight:bold","color:inherit")}$APP.mn();$APP.El();$APP.ok();$APP.Nn();$APP.zi("x-trace-history",Rfa);return ZM()?$APP.n(document.body)?iQ():document.addEventListener("DOMContentLoaded",iQ,{once:!0}):null},kQ=function(){return jQ()},KN=function KN(a){switch(arguments.length){case 2:return KN.j(arguments[0],arguments[1]);case 3:return KN.m(arguments[0],
103
- arguments[1],arguments[2]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return KN.B(arguments[0],arguments[1],arguments[2],3<c.length?new $APP.cc(c.slice(3),0,null):null)}};KN.j=function(a,b){return b};KN.m=function(a,b,c){return(a.i?a.i(b):a.call(null,b))<(a.i?a.i(c):a.call(null,c))?b:c};KN.B=function(a,b,c,d){return $APP.za(function(e,f){return KN.m(a,e,f)},KN.m(a,b,c),d)};
104
- KN.K=function(a){var b=$APP.t(a),c=$APP.v(a);a=$APP.t(c);var d=$APP.v(c);c=$APP.t(d);d=$APP.v(d);return this.B(b,a,c,d)};KN.M=3;var lQ=function lQ(a){switch(arguments.length){case 0:return lQ.H();case 1:return lQ.i(arguments[0]);case 2:return lQ.j(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return lQ.B(arguments[0],arguments[1],2<c.length?new $APP.cc(c.slice(2),0,null):null)}};lQ.H=function(){return 0};lQ.i=function(a){return a};
105
- lQ.j=function(a,b){return a+b};lQ.B=function(a,b,c){return $APP.za(lQ,a+b,c)};lQ.K=function(a){var b=$APP.t(a),c=$APP.v(a);a=$APP.t(c);c=$APP.v(c);return this.B(b,a,c)};lQ.M=2;
106
- var kO=function kO(a){switch(arguments.length){case 3:return kO.m(arguments[0],arguments[1],arguments[2]);case 4:return kO.J(arguments[0],arguments[1],arguments[2],arguments[3]);case 5:return kO.W(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]);case 6:return kO.va(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return kO.B(arguments[0],arguments[1],arguments[2],
107
- arguments[3],arguments[4],arguments[5],6<c.length?new $APP.cc(c.slice(6),0,null):null)}};kO.m=function(a,b,c){var d=$APP.$g.m,e=$APP.C(a,b);c=c.i?c.i(e):c.call(null,e);return d.call($APP.$g,a,b,c)};kO.J=function(a,b,c,d){var e=$APP.$g.m,f=$APP.C(a,b);c=c.j?c.j(f,d):c.call(null,f,d);return e.call($APP.$g,a,b,c)};kO.W=function(a,b,c,d,e){var f=$APP.$g.m,h=$APP.C(a,b);c=c.m?c.m(h,d,e):c.call(null,h,d,e);return f.call($APP.$g,a,b,c)};
108
- kO.va=function(a,b,c,d,e,f){var h=$APP.$g.m,k=$APP.C(a,b);c=c.J?c.J(k,d,e,f):c.call(null,k,d,e,f);return h.call($APP.$g,a,b,c)};kO.B=function(a,b,c,d,e,f,h){return $APP.$g.m(a,b,$APP.ge(c,$APP.C(a,b),d,e,f,$APP.Ec([h])))};kO.K=function(a){var b=$APP.t(a),c=$APP.v(a);a=$APP.t(c);var d=$APP.v(c);c=$APP.t(d);var e=$APP.v(d);d=$APP.t(e);var f=$APP.v(e);e=$APP.t(f);var h=$APP.v(f);f=$APP.t(h);h=$APP.v(h);return this.B(b,a,c,d,e,f,h)};kO.M=6;
109
- var iO=function iO(a,b,c){var e=$APP.q(b);b=$APP.t(e);var f=$APP.v(e);if(f){e=$APP.$g.m;var h=$APP.C(a,b);c=iO.m?iO.m(h,f,c):iO.call(null,h,f,c);a=e.call($APP.$g,a,b,c)}else a=$APP.$g.m(a,b,c);return a},cO=function cO(a){switch(arguments.length){case 2:return cO.j(arguments[0],arguments[1]);case 3:return cO.m(arguments[0],arguments[1],arguments[2]);case 4:return cO.J(arguments[0],arguments[1],arguments[2],arguments[3]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;
110
- else break;return cO.B(arguments[0],arguments[1],arguments[2],arguments[3],4<c.length?new $APP.cc(c.slice(4),0,null):null)}};cO.j=function(a,b){if(a instanceof $APP.ue){var c=a.state;b=b.i?b.i(c):b.call(null,c);a=YM(a,b)}else a=$APP.Ro(a,b);return a};cO.m=function(a,b,c){if(a instanceof $APP.ue){var d=a.state;b=b.j?b.j(d,c):b.call(null,d,c);a=YM(a,b)}else a=$APP.Ro(a,b,c);return a};
111
- cO.J=function(a,b,c,d){if(a instanceof $APP.ue){var e=a.state;b=b.m?b.m(e,c,d):b.call(null,e,c,d);a=YM(a,b)}else a=$APP.Ro(a,b,c,d);return a};cO.B=function(a,b,c,d,e){return a instanceof $APP.ue?YM(a,$APP.fe(b,a.state,c,d,e)):$APP.Ro(a,b,c,d,e)};cO.K=function(a){var b=$APP.t(a),c=$APP.v(a);a=$APP.t(c);var d=$APP.v(c);c=$APP.t(d);var e=$APP.v(d);d=$APP.t(e);e=$APP.v(e);return this.B(b,a,c,d,e)};cO.M=4;
112
- var hN=new $APP.F(null,"start-t","start-t",1829305353),bN=new $APP.F(null,"cause-id","cause-id",-1282947263),Bea=new $APP.F(null,"x-end","x-end",-1725631203),qP=new $APP.F(null,"node-count","node-count",383091297),jN=new $APP.F(null,"start-id","start-id",-456790067),kN=new $APP.F(null,"end-id","end-id",2084513705),yea=new $APP.F(null,"tmax","tmax",2006118392),NP=new $APP.F(null,"timeline","timeline",192903161),WP=new $APP.F(null,"bin-count","bin-count",1792167977),hQ=new $APP.F(null,"auto-switch-import",
113
- "auto-switch-import",-809333661),wP=new $APP.F(null,"causality-needs-fit","causality-needs-fit",1728707358),lP=new $APP.F(null,"to-cy","to-cy",1542880464),kP=new $APP.F(null,"to-cx","to-cx",698995232),zP=new $APP.F(null,"scroll-top","scroll-top",-46723100),AP=new $APP.F(null,"chip-key","chip-key",644014552),tO=new $APP.F(null,"next-component-id","next-component-id",1588977206),eO=new $APP.F(null,"pending?","pending?",-2133618792),zO=new $APP.F(null,"rate-limit","rate-limit",1748082022),HN=new $APP.F(null,
114
- "tmin","tmin",-39508962),Sfa=new $APP.F(null,"to-id","to-id",1021626465),mP=new $APP.F(null,"edges","edges",-694791395),hO=new $APP.F(null,"next-token","next-token",1432414974),Cea=new $APP.F(null,"t-min","t-min",-488887638),eN=new $APP.F(null,"user-agent","user-agent",1220426212),IP=new $APP.F(null,"causality","causality",-712927373),fN=new $APP.F(null,"forensic?","forensic?",188264321),tN=new $APP.F(null,"search","search",1564939822),UN=new $APP.F(null,"session","session",1008279103),lO=new $APP.F(null,
115
- "next-id","next-id",-224240762),sN=new $APP.F(null,"categories","categories",178386610),pP=new $APP.F(null,"causality-layout","causality-layout",-1264013405),Dea=new $APP.F(null,"t-max","t-max",-949530573),vO=new $APP.F(null,"capacity","capacity",72689734),BP=new $APP.F(null,"recording?","recording?",-1477514924),MN=new $APP.F(null,"records","records",1326822832),gP=new $APP.F(null,"time","time",1385887882),NN=new $APP.F(null,"dominant-cat","dominant-cat",-914257775),fQ=new $APP.F(null,"lifecycle",
116
- "lifecycle",341496205),pN=new $APP.F(null,"other","other",995793544),UO=new $APP.F("baredom.dev.x-trace-history.model","parse-error","baredom.dev.x-trace-history.model/parse-error",840657481),jO=new $APP.F(null,"new?","new?",777958557),nfa=new $APP.F(null,"max-depth","max-depth",127060793),FN=new $APP.F(null,"min-t","min-t",-1349871659),SN=new $APP.F(null,"capped?","capped?",-65680820),GO=new $APP.F(null,"imports","imports",-1249933394),LN=new $APP.F(null,"bin-i","bin-i",791326307),gN=new $APP.F(null,
117
- "first-seen","first-seen",390191468),CP=new $APP.F(null,"import?","import?",-40157302),oP=new $APP.F(null,"cy","cy",755331060),RN=new $APP.F(null,"children","children",-940561982),nP=new $APP.F(null,"cx","cx",1272694324),eQ=new $APP.F(null,"dom","dom",-1236537922),LO=new $APP.F(null,"next-session-id","next-session-id",1944278844),ON=new $APP.F(null,"x-start","x-start",1183238797),yP=new $APP.F(null,"scroll-left","scroll-left",-211761103),WO=new $APP.F(null,"imported-at","imported-at",-1157103926),
118
- GN=new $APP.F(null,"lane-id","lane-id",2005926623),uN=new $APP.F(null,"haystack-fn","haystack-fn",1813797862),mQ=new $APP.F(null,"depth","depth",1768663640),VP=new $APP.F(null,"record-id","record-id",-1468971877),MO=new $APP.F(null,"active-session-id","active-session-id",943086451),iP=new $APP.F(null,"from-cx","from-cx",-293616201),jP=new $APP.F(null,"from-cy","from-cy",1126835724),KO=new $APP.F(null,"sessions","sessions",-699316392),dN=new $APP.F(null,"exported-at","exported-at",1661975683),aN=new $APP.F(null,
119
- "component-id","component-id",1551113783),$P=new $APP.F(null,"import-error","import-error",1672727808),gQ=new $APP.F(null,"drag-depth","drag-depth",-226189617),Tfa=new $APP.F(null,"from-id","from-id",-106962526),DP=new $APP.F(null,"import-id","import-id",940580069),TN=new $APP.F(null,"nodes","nodes",-2099585805),iN=new $APP.F(null,"end-t","end-t",-218701242),fO=new $APP.F(null,"by-token","by-token",-1485378511),nQ=new $APP.F(null,"next-import-id","next-import-id",287496955),QN=new $APP.F(null,"record",
120
- "record",-779106859),IN=new $APP.F(null,"span","span",1394872991),DN=new $APP.F("baredom.dev.x-trace-history.model","document","baredom.dev.x-trace-history.model/document",-1776453896),wO=new $APP.F(null,"components","components",-1073188942),WN=new $APP.F(null,"import","import",-1399500709),FO=new $APP.F(null,"envelope","envelope",-236796318);var JO=$APP.Kf.j($APP.dp,$APP.Ge),qea=XM("(?:^\\?|\x26)"+$APP.P.i("baredom-trace-history")+"(?:\x3d|\x26|$)"),Qfa=XM("(?:^\\?|\x26)"+$APP.P.i("baredom-trace-history")+"\x3d"+$APP.P.i("raw")+"(?:\x26|$)"),wea=new $APP.M(null,4,[$APP.pu,new $APP.ch(null,new $APP.M(null,3,["event/dispatch",null,"event/dispatch-document",null,"event/dispatch-cancelable",null],null),null),$APP.Ut,new $APP.ch(null,new $APP.M(null,1,["state/instance-field-set",null],null),null),eQ,new $APP.ch(null,new $APP.M(null,2,["dom/attribute-removed",
121
- null,"dom/attribute-set",null],null),null),fQ,new $APP.ch(null,new $APP.M(null,3,["lifecycle/attribute-changed",null,"lifecycle/connected",null,"lifecycle/disconnected",null],null),null)],null),oN=new $APP.J(null,4,5,$APP.K,[$APP.pu,$APP.Ut,eQ,fQ],null),BN=new $APP.M(null,5,[$APP.pu,"#94e2d5",$APP.Ut,"#f9e2af",eQ,"#fab387",fQ,"#cba6f7",pN,"#6c7086"],null),PN=function PN(a,b){return $APP.Fd(b,new $APP.Id(null,function(){return $APP.Ce(function(d){return PN.j?PN.j(a,d):PN.call(null,a,d)},$APP.Ec([Iea(a,
122
- b.id)]))},null))},rP=function rP(a){return $APP.za(lQ,0,$APP.ye.j(rP,RN.i(a)))+1},sP=function sP(a){return $APP.Tc(RN.i(a))?0:$APP.ce($APP.Xo,$APP.ye.j(sP,RN.i(a)))+1},tP=function tP(a,b,c){var e=QN.i(a),f=RN.i(a);a=30+b*56;if($APP.Tc(f))return new $APP.J(null,2,5,$APP.K,[new $APP.M(null,6,[$APP.rt,e.id,QN,e,nP,c+70,oP,a,mQ,b,RN,$APP.Ge],null),c+158],null);f=$APP.za(function(m,r){var u=$APP.B(m,0,null);m=$APP.B(m,1,null);var x=b+1;m=tP.m?tP.m(r,x,m):tP.call(null,r,x,m);r=$APP.B(m,0,null);m=$APP.B(m,
123
- 1,null);return new $APP.J(null,2,5,$APP.K,[$APP.Cd.j(u,r),m],null)},new $APP.J(null,2,5,$APP.K,[$APP.Ge,c],null),f);c=$APP.B(f,0,null);f=$APP.B(f,1,null);var h=nP.i($APP.t(c)),k=nP.i($APP.Ic(c));return new $APP.J(null,2,5,$APP.K,[new $APP.M(null,6,[$APP.rt,e.id,QN,e,nP,(h+k)/2,oP,a,mQ,b,RN,c],null),f],null)},uP=function uP(a){return $APP.Kf.j(new $APP.J(null,1,5,$APP.K,[$APP.Vo.j(a,RN)],null),$APP.Ce(uP,$APP.Ec([RN.i(a)])))},vP=function vP(a){var c=$APP.rt.i(a),d=nP.i(a),e=oP.i(a);return $APP.bf($APP.Ce(function(f){return $APP.Fd(new $APP.M(null,
124
- 6,[Tfa,c,iP,d,jP,e,Sfa,$APP.rt.i(f),kP,nP.i(f),lP,oP.i(f)],null),vP.i?vP.i(f):vP.call(null,f))},$APP.Ec([RN.i(a)])))};var nN=$APP.ve($APP.Gg([fN,vO,zO,lO,$APP.jq,GO,MN,wO,MO,tO,KO,nQ,LO],[!1,5E3,$APP.ke,0,!1,$APP.Ge,JO,$APP.ke,null,0,$APP.Ge,0,0])),dO=$APP.ve(new $APP.M(null,3,[hO,0,eO,!1,fO,$APP.ke],null)),uO=$APP.ve($APP.Ge),EO=$APP.ve(null),CO=$APP.ve(!1),nO=$APP.ve(0),aO=$APP.ve([null,null]),Qea=new $APP.ch(null,new $APP.M(null,3,[$APP.$i,null,$APP.Si,null,$APP.Zi,null],null),null),Rea=new $APP.ch(null,new $APP.M(null,3,[$APP.ij,null,$APP.kj,null,$APP.dj,null],null),null),bQ=function bQ(a){switch(arguments.length){case 1:return bQ.i(arguments[0]);
125
- case 2:return bQ.j(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",arguments.length].join(""));}};bQ.i=function(a){return bQ.j(a,null)};
126
- bQ.j=function(a,b){a=Yea(a);var c=$APP.G(a);a=$APP.C(c,$APP.Us);c=$APP.C(c,$APP.gq);if($APP.n(c))return console.warn("[x-trace-history] import rejected:",c),null;c=performance.now();var d=nQ.i($APP.eb(nN));b=b==null||$APP.z.j("",b)?"Import "+$APP.P.i(d):b;var e=new $APP.M(null,4,[$APP.rt,d,$APP.Wj,b,WO,c,FO,a],null);cO.j(nN,function(f){return kO.m(kO.J(f,GO,$APP.Cd,e),nQ,VM)});gO();return d};bQ.M=2;var MP,oQ=window.matchMedia;MP=$APP.n(oQ)?oQ.call(window,"(prefers-reduced-motion: reduce)"):null;var $ea=RegExp("\x26","g"),afa=RegExp("\x3c","g"),bfa=RegExp("\x3e","g"),cfa=RegExp('"',"g"),dfa=RegExp("'","g"),FP=new WeakMap,Efa=new $APP.ch(null,new $APP.M(null,5,["x-select",null,"select",null,"input",null,"textarea",null,"x-checkbox",null],null),null),Rfa=new $APP.M(null,5,[$APP.gi,!0,$APP.ji,[],$APP.hi,function(a){return Pfa(a)},$APP.ei,function(a){var b=$APP.l(a,"__xTraceHistorySubToken");$APP.n(b)&&cO.B(dO,kO,fO,$APP.Vo,$APP.Ec([b]));b=ZN(a,$P);$APP.n(b)&&typeof b==="number"&&clearTimeout(b);
127
- b=$APP.l(a,"__xTraceHistoryListeners");if($APP.n(b)){for(var c=b.length,d=0;;)if(d<c){var e=b[d];e[0].removeEventListener(e[1],e[2]);d+=1}else break;$APP.Q(a,"__xTraceHistoryListeners",null)}b=$APP.l(a,"__xTraceHistoryHighlightListeners");if($APP.n(b)){c=b.length;for(d=0;;)if(d<c)e=b[d],e[0].removeEventListener(e[1],e[2],e[3]),d+=1;else break;$APP.bj(a,"__xTraceHistoryHighlightListeners",null)}b=$APP.l(a,"__xTraceHistoryHighlightRaf");$APP.n(b)&&(cancelAnimationFrame(b),$APP.bj(a,"__xTraceHistoryHighlightRaf",
128
- null));b=$APP.l(a,"__xTraceHistoryHighlightLayer");$APP.n(b)&&$APP.rk(b);$APP.bj(a,"__xTraceHistoryHighlightLayer",null);$APP.bj(a,"__xTraceHistoryHighlightBox",null);$APP.bj(a,"__xTraceHistoryHighlightCid",null);$APP.Q(a,"__xTraceHistorySubToken",null);$N(a,$P,null);return $APP.Q(a,"__xTraceHistoryMounted",null)},$APP.di,function(){return null}],null);$APP.fa("baredom.exports.x_trace_history.init",kQ);jQ();export const init=kQ;
2
+ var LM=function(a,b){const c=a.length-b.length;return c>=0&&a.indexOf(b,c)==c},uka=function(a){return a-1},vka=function(a,b){return $APP.pd(function(c,d){c=a.i?a.i(c):a.call(null,c);d=a.i?a.i(d):a.call(null,d);var e=$APP.nd($APP.ld);return e.j?e.j(c,d):e.call(null,c,d)},b)},MM=function(a,b){return vka(a,b)},NM=function(a){if(a instanceof RegExp)return a;var b=$APP.Ah(/^\(\?([idmsux]*)\)/,a),c=$APP.B(b,0,null);b=$APP.B(b,1,null);return new RegExp(a.substring(c==null?0:c.length),$APP.m(b)?b:"")},wka=
3
+ function(a){return $APP.Yd($APP.za(function(b,c){return $APP.$d(b,c,$APP.Rc(b,c,0)+1)},$APP.Bb($APP.oe),a))},xka=function(a){return new $APP.H(null,2,5,$APP.J,[$APP.Me(200,a),$APP.Ne(200,a)],null)},OM=function(){var a=window;var b=a.location.search;b=b==null?null:$APP.Ah(yka,b);return $APP.D(b)||$APP.l(a,"BAREDOM_TRACE_HISTORY")===!0||$APP.z.j("raw",$APP.l(a,"BAREDOM_TRACE_HISTORY"))},zka=function(a){a=a==null?null:a.tagName;a=a==null?null:a.toLowerCase();return $APP.m(a)?a:"document"},PM=function(a){try{return a==
4
+ null?null:$APP.xo(a)}catch(b){try{return""+$APP.N.i(a)}catch(c){return"(unprintable)"}}},Aka=function(a,b,c){a=$APP.G(a);var d=$APP.C(a,$APP.P),e=$APP.C(a,$APP.pv),f=$APP.C(a,QM),h=$APP.C(a,RM);var k=$APP.Od(d);k=$APP.m(k)?""+$APP.N.i(k)+"/"+$APP.N.i($APP.jh(d)):$APP.jh(d);b={schemaVersion:1,id:b,t:c,type:k,tag:e,componentId:f,causeId:h};switch(d instanceof $APP.F?d.da:null){case "event/dispatch":case "event/dispatch-cancelable":case "event/dispatch-document":return c=$APP.bj.i(a),b.eventName=c,c=
5
+ PM($APP.cj.i(a)),b.detail=c,c=$APP.D($APP.dj.i(a)),b.cancelable=c,a=$APP.D($APP.ej.i(a)),b.defaultPrevented=a,b;case "state/instance-field-set":return c=$APP.Ki.i(a),b.field=c,a=PM($APP.Q.i(a)),b.value=a,b;case "dom/attribute-set":return c=$APP.Ui.i(a),b.attribute=c,a=$APP.Q.i(a),b.value=a,b;case "dom/attribute-removed":return a=$APP.Ui.i(a),b.attribute=a,b;case "lifecycle/attribute-changed":return c=$APP.Ui.i(a),b.attribute=c,c=$APP.Kj.i(a),b.oldValue=c,a=$APP.Lj.i(a),b.newValue=a,b;case "lifecycle/connected":case "lifecycle/disconnected":return b;
6
+ default:return b}},SM=function(a){a=""+$APP.N.i(a);return a.length<2?"0"+$APP.N.i(a):a},Bka=function(a,b){return $APP.Xf.l($APP.oe,$APP.Te(function(c){var d=$APP.B(c,0,null);$APP.B(c,1,null);return $APP.kd(b,d)}),a)},aN=function(a,b,c,d){var e=$APP.G(d);d=$APP.C(e,TM);var f=$APP.C(e,$APP.Dt),h=$APP.C(e,UM);e=$APP.C(e,VM);a:{var k=a.length;for(var n=0,r=$APP.Bb($APP.bh);;){if(n>=k){k=$APP.Eb(r);break a}var v=a[n].componentId;n+=1;r=v!=null?$APP.Db(r,v):r}k=void 0}k=Bka(b,k);b=$APP.D(e);e={};k=$APP.q(k);
7
+ n=null;for(v=r=0;;)if(v<r){var x=n.C(null,v),y=$APP.B(x,0,null),A=$APP.B(x,1,null);x=e;y=""+$APP.N.i(y);A={tag:$APP.pv.i(A),firstSeen:WM.i(A)};x[y]=A;v+=1}else if(k=$APP.q(k))$APP.gd(k)?(r=$APP.Jb(k),k=$APP.Kb(k),n=r,r=$APP.w(r)):(n=$APP.t(k),r=$APP.B(n,0,null),v=$APP.B(n,1,null),n=e,r=""+$APP.N.i(r),v={tag:$APP.pv.i(v),firstSeen:WM.i(v)},n[r]=v,k=$APP.u(k),n=null,r=0),v=0;else break;k=[];c=$APP.q(c);n=null;for(v=r=0;;)if(v<r){x=n.C(null,v);var E=$APP.G(x);x=$APP.C(E,$APP.zt);y=$APP.C(E,$APP.Z);A=
8
+ $APP.C(E,XM);var I=$APP.C(E,YM),O=$APP.C(E,ZM);E=$APP.C(E,$M);k.push({id:x,label:y,startT:A,endT:I,startId:O,endId:E});v+=1}else if(c=$APP.q(c))$APP.gd(c)?(r=$APP.Jb(c),c=$APP.Kb(c),n=r,r=$APP.w(r)):(n=$APP.t(c),A=$APP.G(n),n=$APP.C(A,$APP.zt),r=$APP.C(A,$APP.Z),v=$APP.C(A,XM),x=$APP.C(A,YM),y=$APP.C(A,ZM),A=$APP.C(A,$M),k.push({id:n,label:r,startT:v,endT:x,startId:y,endId:A}),c=$APP.u(c),n=null,r=0),v=0;else break;return{schemaVersion:1,exportedAt:d,origin:f,userAgent:h,forensic:b,components:e,sessions:k,
9
+ records:a}},bN=function(a){if($APP.sa(a)){if(typeof a.schemaVersion!=="number")return new $APP.K(null,1,[$APP.Qj,"Envelope is missing schemaVersion."],null);if($APP.M.j(1,a.schemaVersion))return new $APP.K(null,1,[$APP.Qj,"Schema version mismatch: expected "+$APP.N.i(1)+", got "+$APP.N.i(a.schemaVersion)+"."],null);if($APP.p($APP.ra(a.records)))return new $APP.K(null,1,[$APP.Qj,"Envelope.records is not an array."],null);var b=a.records,c=b.length;a:{for(var d=0;;){if(d>=c){b=null;break a}var e=b[d];
10
+ if($APP.sa(e)&&typeof e.id==="number"&&typeof e.t==="number"&&typeof e.type==="string")d+=1;else{b=d;break a}}b=void 0}return b==null?new $APP.K(null,1,[$APP.jt,a],null):new $APP.K(null,1,[$APP.Qj,"Record at index "+$APP.N.i(b)+" is missing required fields (id, t, type)."],null)}return new $APP.K(null,1,[$APP.Qj,"Envelope is not a JSON object."],null)},Cka=function(a,b,c){return $APP.w(a)>=c?$APP.Jd.j($APP.Zc(a),b):$APP.Jd.j(a,b)},Dka=function(){var a=VM.i($APP.db(cN));return $APP.m(a)?$APP.fh(dN):
11
+ $APP.Jq.j($APP.fh(dN),$APP.Lt)},fN=function(a){var b=$APP.te(function(c){var d=$APP.B(c,0,null);c=$APP.B(c,1,null);return $APP.kd(c,a)?d:null},Eka);return $APP.m(b)?b:eN},gN=function(a){try{var b=JSON.stringify(a)}catch(c){b=""}return $APP.m(b)?b.toLowerCase():""},kN=function(a,b){var c=$APP.G(b),d=$APP.C(c,$APP.pv),e=$APP.C(c,hN);b=$APP.C(c,iN);c=$APP.Rc(c,jN,gN);if(d=d==null||$APP.z.j("",d)||$APP.z.j("all",d)||$APP.z.j(d,a.tag)){if(e=e==null||$APP.kd(e,fN(a.type)))e=b==null||$APP.z.j("",b)||!((c.i?
12
+ c.i(a):c.call(null,a)).indexOf(b)<0);d=e}return d},lN=function(a,b){return $APP.rf(MM(function(c){return c.t},$APP.Ue(function(c){return kN(c,b)},$APP.Jc(a))))},mN=function(a,b){return typeof b==="number"?a.find(function(c){return $APP.z.j(b,c.id)}):null},nN=function(a){if(a!=null)try{var b=JSON.stringify(a),c=""+$APP.N.i(b);return c.length<=60?c:""+$APP.N.i($APP.Ed(c,60))+"…"}catch(d){return"(unstringifiable)"}else return null},oN=function(a){switch(a.type){case "event/dispatch":return""+$APP.N.i(a.eventName)+
13
+ $APP.N.i(function(){var b=nN(a.detail);return $APP.m(b)?" "+$APP.N.i(b):null}());case "event/dispatch-cancelable":return""+$APP.N.i(a.eventName)+$APP.N.i($APP.m(a.defaultPrevented)?" (prevented)":null)+$APP.N.i(function(){var b=nN(a.detail);return $APP.m(b)?" "+$APP.N.i(b):null}());case "event/dispatch-document":return""+$APP.N.i(a.eventName)+$APP.N.i(function(){var b=nN(a.detail);return $APP.m(b)?" "+$APP.N.i(b):null}());case "state/instance-field-set":return""+$APP.N.i(a.field)+" \x3d "+$APP.N.i(function(){var b=
14
+ nN(a.value);return $APP.m(b)?b:"null"}());case "dom/attribute-set":return""+$APP.N.i(a.attribute)+"\x3d"+$APP.N.i($APP.Vh($APP.Jc([a.value])));case "dom/attribute-removed":return""+$APP.N.i(a.attribute)+" removed";case "lifecycle/connected":return"connected";case "lifecycle/disconnected":return"disconnected";case "lifecycle/attribute-changed":return""+$APP.N.i(a.attribute)+": "+$APP.N.i($APP.Vh($APP.Jc([a.oldValue])))+" → "+$APP.N.i($APP.Vh($APP.Jc([a.newValue])));default:return"("+$APP.N.i(a.type)+
15
+ ")"}},pN=function(a){if(typeof a!=="number")return"";if(a<1E3)return""+$APP.N.i(a.toFixed(0))+"ms";if(a<6E4)return""+$APP.N.i((a/1E3).toFixed(3))+"s";var b=$APP.Bd(a,6E4)/1E3;return""+$APP.N.i(Math.floor(a/6E4))+"m"+$APP.N.i(b.toFixed(1))+"s"},rN=function(a){a=fN(a.type);return $APP.C(qN,$APP.m(a)?a:eN)},tN=function(a){a=a.componentId;return $APP.m(a)?a:sN},Fka=function(a){return $APP.rf(MM(uN,$APP.Oe.j(function(b){var c=$APP.B(b,0,null);b=$APP.B(b,1,null);var d=$APP.t(b);return new $APP.K(null,3,
16
+ [vN,c,$APP.pv,d.tag,uN,$APP.ge($APP.Dk,$APP.Oe.j(function(e){return e.t},b))],null)},$APP.fi(tN,a))))},yN=function(a){if($APP.q(a)){var b=$APP.Oe.j(function(c){return c.t},a);a=$APP.ge($APP.Dk,b);b=$APP.ge($APP.Sm,b);return new $APP.K(null,3,[wN,a,Gka,b,xN,$APP.Sm.j(1,b-a)],null)}return null},Hka=function(a,b){return $APP.q(a)?$APP.he(zN,function(c){return Math.abs(c.t-b)},a):null},Ika=function(a){if($APP.q(a)){var b=wka($APP.Oe.j(function(d){return fN(d.type)},a)),c=$APP.ge($APP.Sm,$APP.Wg(b));a=
17
+ $APP.te(function(d){return $APP.z.j(c,$APP.C(b,d))?d:null},dN);return $APP.m(a)?a:eN}return null},Mka=function(a,b){a=$APP.fi(function(c){c=b.i?b.i(c):b.call(null,c);return Math.floor(c/4)},a);return $APP.rf(MM(AN,$APP.Oe.j(function(c){var d=$APP.B(c,0,null),e=$APP.B(c,1,null);c=$APP.Oe.j(function(f){return f.t},e);e=$APP.rf(MM(function(f){return f.id},e));return new $APP.K(null,7,[AN,d,BN,e,CN,Ika(e),DN,d*4,Jka,(d+1)*4,Kka,$APP.ge($APP.Dk,c),Lka,$APP.ge($APP.Sm,c)],null)},a)))},Nka=function(a){return $APP.te(function(b){return $APP.w(BN.i(b))>
18
+ 3},a)},Oka=function(a){return $APP.q(a)?$APP.ge($APP.Sm,$APP.Oe.j(function(b){return $APP.w(BN.i(b))},a)):0},Pka=function(a,b){var c=b.id;a=MM(function(d){return d.t},$APP.Ue(function(d){return $APP.z.j(c,d.causeId)},$APP.Jc(a)));return new $APP.K(null,2,[$APP.Fx,$APP.w(a),BN,$APP.rf($APP.Me(50,a))],null)},Qka=function(a,b){return $APP.rf(MM(function(c){return c.id},$APP.Ue(function(c){return $APP.z.j(b,c.causeId)},$APP.Jc(a))))},Rka=function(a,b){var c=xka(EN(a,b));a=$APP.B(c,0,null);c=$APP.B(c,
19
+ 1,null);var d=$APP.fi(function(e){return e.causeId},a);return $APP.Pg.l(function h(f){var k=$APP.Ci.j;var n=f.id;n=d.i?d.i(n):d.call(null,n);return new $APP.K(null,2,[FN,f,$APP.Wv,k.call($APP.Ci,h,n)],null)}(b),GN,$APP.D($APP.q(c)))},Ska=function(a,b){return typeof b==="number"?$APP.te(function(c){return $APP.z.j(b,$APP.zt.i(c))?c:null},$APP.Nk.i(a)):null},Tka=function(a,b,c,d){b===0?c="No records yet — interact with components to start tracing.":a===0?c=""+$APP.N.i(b)+" "+$APP.N.i($APP.z.j(1,b)?
20
+ "record":"records")+" · all hidden by filter":(a=""+$APP.N.i(a)+$APP.N.i($APP.M.j(a,b)?" of "+$APP.N.i(b):null)+" "+$APP.N.i($APP.z.j(1,a)?"record":"records")+" · "+$APP.N.i(d)+" "+$APP.N.i($APP.z.j(1,d)?"lane":"lanes"),b=$APP.N,d=b.i,c=xN.i(c),c=$APP.m(c)?" · spanning "+$APP.N.i(pN(c)):null,c=a+d.call(b,c));return c},IN=function(a){return $APP.fd(a)&&$APP.z.j(HN,$APP.t(a))},KN=function(a){return $APP.fd(a)&&$APP.z.j(JN,$APP.t(a))},LN=function(a){return $APP.fd(a)&&($APP.z.j(HN,$APP.t(a))||$APP.z.j(JN,
21
+ $APP.t(a)))?$APP.Mc(a):null},MN=function(a,b){a=$APP.l(a,"__xTraceHistoryUiState");return $APP.m(a)?(b=$APP.l(a,$APP.jh(b)),void 0===b?null:b):null},NN=function(a,b,c){var d=$APP.l(a,"__xTraceHistoryUiState");d=$APP.m(d)?d:{};b=$APP.jh(b);d[b]=c;a.__xTraceHistoryUiState=d},PN=function(){var a=BN.i($APP.db(cN)),b=$APP.db(ON),c=b[1];if(b[0]===a)return c;b=$APP.xo($APP.rf(a));$APP.Ke(ON,[a,b]);return b},Uka=function(){var a=$APP.Kq.J(QN,$APP.Pg,$APP.Nm,!1);a=$APP.G(a);a=$APP.C(a,RN);a=$APP.q(a);for(var b=
22
+ null,c=0,d=0;;)if(d<c){var e=b.C(null,d);$APP.B(e,0,null);e=$APP.B(e,1,null);try{e.G?e.G():e.call(null)}catch(f){}d+=1}else if(a=$APP.q(a)){if($APP.gd(a))c=$APP.Jb(a),a=$APP.Kb(a),b=c,c=$APP.w(c);else{b=$APP.t(a);$APP.B(b,0,null);e=$APP.B(b,1,null);try{e.G?e.G():e.call(null)}catch(f){}a=$APP.u(a);b=null;c=0}d=0}else return null},SN=function(){if(QN instanceof $APP.He){var a=QN.state;a=$APP.Pg.l?$APP.Pg.l(a,$APP.Nm,!0):$APP.Pg.call(null,a,$APP.Nm,!0);if(QN instanceof $APP.He){var b=QN.uc;if(b!=null&&
23
+ !$APP.m(b.i?b.i(a):b.call(null,a)))throw Error("Validator rejected reference state");b=QN.state;QN.state=a;QN.ic!=null&&$APP.Ie(QN,b,a);a=new $APP.H(null,2,5,$APP.J,[b,a],null)}else a=new $APP.H(null,2,5,$APP.J,[$APP.db(QN),$APP.Lb(QN,a)],null)}else a=new $APP.H(null,2,5,$APP.J,[$APP.db(QN),$APP.Fq(QN,$APP.Pg,$APP.Nm,!0)],null);b=$APP.B(a,0,null);$APP.B(a,1,null);return $APP.m($APP.Nm.i(b))?null:requestAnimationFrame(Uka)},Vka=function(a,b){var c=TN.i(a)+1;return $APP.Lq($APP.Pg.l(a,TN,c),new $APP.H(null,
24
+ 2,5,$APP.J,[RN,c],null),b)},Wka=function(a,b,c){if($APP.z.j("document",b))return new $APP.K(null,2,[$APP.zt,null,UN,!1],null);b=$APP.l(a,"__xTraceHistoryId");if(b!=null)return new $APP.K(null,2,[$APP.zt,b,UN,!1],null);a.__xTraceHistoryId=c;return new $APP.K(null,2,[$APP.zt,c,UN,!0],null)},WN=function(){var a=$APP.Kq.J(cN,$APP.zi,VN,$APP.sc);return VN.i(a)-1},Xka=function(a){$APP.Kq.j(XN,$APP.sc);try{a.G?a.G():a.call(null)}finally{$APP.Kq.j(XN,uka)}},YN=function(a){var b=a.getRootNode();return b instanceof
25
+ ShadowRoot?b.host:a.parentNode},ZN=function(a){for(;;)if(a!=null&&a instanceof Element){var b=a.localName;var c=b!=null;b=c?b.includes("-"):c;if($APP.m(b))return a;a=YN(a)}else return null},$N=function(a){if(a instanceof Node)for(a=YN(a);;){if(a==null||a===document)return!1;if($APP.m($APP.l(a,"__xTraceHistoryInternal")))return!0;a=YN(a)}else return!1},aO=function(a){var b=document.body;if($APP.m($APP.m(b)?a!=null:b)){b=[b];for(var c=0;;){if(b.length===0||c>=1E6)return null;var d=b.pop();if(d instanceof
26
+ Element){if(!$APP.m($APP.l(d,"__xTraceHistoryInternal"))){if($APP.z.j(a,$APP.l(d,"__xTraceHistoryId")))return d;for(var e=d.children,f=e.length,h=0;;)if(h<f)b.push(e[h]),h+=1;else break;d=d.shadowRoot;if($APP.m(d))for(d=d.children,e=d.length,f=0;;)if(f<e)b.push(d[f]),f+=1;else break}c+=1}}}else return null},bO=function(a){var b=$APP.Ji.i(a);return $APP.kd(Yka,$APP.P.i(a))?b instanceof Node?(a=$APP.l(b,"__xTraceHistoryInternal"),$APP.m(a)?a:$N(b)):!1:$N(b)},fO=function(a,b,c,d){var e=$APP.db(cN),f=
27
+ $APP.Ji.i(a);if(!$APP.m(function(){var v=(v=$APP.p(d))?$APP.qr.i(e):v;return $APP.m(v)?v:bO(a)}())){var h=function(){var v=ZN(f);return $APP.m(v)?v:f}(),k=zka(h);h=Wka(h,k,cO.i(e));var n=$APP.G(h);h=$APP.C(n,$APP.zt);n=$APP.C(n,UN);var r=$APP.Yc($APP.db(dO));r=$APP.Pg.o(a,$APP.pv,k,$APP.Jc([QM,h,RM,r]));b=Aka(r,b,c);b=Cka(BN.i(e),b,$APP.Mm.i(e));c=$APP.m(n)?$APP.Pg.l(eO.i(e),h,new $APP.K(null,2,[$APP.pv,k,WM,c],null)):eO.i(e);k=$APP.m(n)?h+1:cO.i(e);$APP.Kq.o(cN,$APP.Pg,BN,b,$APP.Jc([cO,k,eO,c]));
28
+ SN()}},gO=function(a,b){var c=ZN(b);b=$APP.l($APP.m(c)?c:b,"__xTraceHistoryId");if($APP.m(b))switch(c=$APP.P.i(a),c instanceof $APP.F?c.da:null){case "event/dispatch":case "event/dispatch-cancelable":case "event/dispatch-document":return""+$APP.N.i(b)+":evt:"+$APP.N.i($APP.bj.i(a));case "state/instance-field-set":return""+$APP.N.i(b)+":fld:"+$APP.N.i($APP.Ki.i(a));case "dom/attribute-set":case "dom/attribute-removed":return""+$APP.N.i(b)+":attr:"+$APP.N.i($APP.Ui.i(a));default:return null}else return null},
29
+ iO=function(a,b,c,d){var e=$APP.p(VM.i(a));return e?(b=gO(b,c),$APP.m(b)?(a=$APP.C(hO.i(a),b),$APP.m(a)?d-a<16:null):null):e},jO=function(a,b,c){if($APP.m(VM.i($APP.db(cN))))return null;a=gO(a,b);return $APP.m(a)?$APP.Kq.J(cN,$APP.Lq,new $APP.H(null,2,5,$APP.J,[hO,a],null),c):null},lO=function(a){var b=$APP.P.i(a),c=$APP.Ji.i(a),d=performance.now();if($APP.m(function(){var f=$APP.db(XN)>0;if(f)return f;f=$APP.db(kO);f=$APP.m(f)?$APP.kd(Zka,b):f;if($APP.m(f))return f;f=bO(a);return $APP.m(f)?f:iO($APP.db(cN),
30
+ a,c,d)}()))return null;var e=WN();fO(a,e,d,!1);return jO(a,c,d)},$ka=function(){var a=EventTarget.prototype,b=a.dispatchEvent;$APP.m($APP.l(b,"__xTraceHistoryWrapped"))||($APP.Ke(mO,b),b=function(c){var d=$APP.db(mO);var e=$APP.p($APP.db(kO));e||(e=$APP.qr.i($APP.db(cN)),e=$APP.m(e)?e:$APP.db(XN)>0||$N(this));if($APP.m(e))c=d.call(this,c);else{e=c instanceof CustomEvent;var f=performance.now(),h=e?new $APP.K(null,2,[$APP.P,this===document?$APP.ij:$APP.m(c.cancelable)?$APP.gj:$APP.aj,$APP.bj,c.type],
31
+ null):null;if($APP.m(e?iO($APP.db(cN),h,this,f):e))c=d.call(this,c);else{var k=WN();$APP.Kq.l(dO,$APP.Jd,k);try{var n=d.call(this,c)}finally{$APP.Kq.j(dO,$APP.Zc)}if(e)try{fO(new $APP.K(null,6,[$APP.P,this===document?$APP.ij:$APP.m(c.cancelable)?$APP.gj:$APP.aj,$APP.Ji,this,$APP.bj,c.type,$APP.cj,c.detail,$APP.dj,c.cancelable,$APP.ej,c.defaultPrevented],null),k,f,!0),jO(h,this,f)}catch(r){}c=n}}return c},b.__xTraceHistoryWrapped=!0,a.dispatchEvent=b)},ala=function(){return PN()},bla=function(){var a=
32
+ eO.i($APP.db(cN)),b={};a=$APP.q(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.C(null,e),h=$APP.B(f,0,null),k=$APP.B(f,1,null);f=b;h=""+$APP.N.i(h);k={tag:$APP.pv.i(k),firstSeen:WM.i(k)};f[h]=k;e+=1}else if(a=$APP.q(a))$APP.gd(a)?(d=$APP.Jb(a),a=$APP.Kb(a),c=d,d=$APP.w(d)):(c=$APP.t(a),d=$APP.B(c,0,null),e=$APP.B(c,1,null),c=b,d=""+$APP.N.i(d),e={tag:$APP.pv.i(e),firstSeen:WM.i(e)},c[d]=e,a=$APP.u(a),c=null,d=0),e=0;else break;return b},cla=function(a){var b=a.components;return b==null?$APP.Xe:$APP.Oe.j(function(c){return $APP.l(b,
33
+ c).tag},Object.keys(b))},dla=function(){var a=$APP.db(cN),b=$APP.Oe.j($APP.pv,$APP.Wg(eO.i(a)));a=$APP.Se(function(c){c=$APP.G(c);c=$APP.C(c,nO);return cla(c)},$APP.Jc([oO.i(a)]));return $APP.rf($APP.Xf.j($APP.hh(),$APP.Re.j(b,a)))},pO=function(){$APP.Kq.J(cN,$APP.Pg,$APP.qr,!0);return SN()},qO=function(){$APP.Kq.J(cN,$APP.Pg,$APP.qr,!1);return SN()},vO=function(){$APP.Kq.o(cN,$APP.Pg,BN,rO,$APP.Jc([VN,0,sO,$APP.Xe,tO,0,uO,null,hO,$APP.oe]));return SN()},wO=function(){return uO.i($APP.db(cN))},ela=
34
+ function(a,b,c,d){return b==null?a:$APP.Ci.j(function(e){e=$APP.G(e);var f=$APP.C(e,$APP.zt);return $APP.z.j(f,b)?$APP.Pg.o(e,YM,c,$APP.Jc([$M,d])):e},a)},xO=function(){var a=performance.now();$APP.Kq.j(cN,function(b){return $APP.Pg.l($APP.zi.ta(b,sO,ela,uO.i(b),a,VN.i(b)),uO,null)});return SN()},yO=function(){wO()!=null&&(console.warn("[x-trace-history] start-session! called while a session was already active — stopping the previous one"),xO());var a=performance.now();$APP.Kq.j(cN,function(b){var c=
35
+ tO.i(b),d=VN.i(b);return $APP.Pg.o($APP.zi.J(b,sO,$APP.Jd,new $APP.K(null,6,[$APP.zt,c,$APP.Z,"Session "+$APP.N.i(c),XM,a,YM,null,ZM,d,$M,null],null)),uO,c,$APP.Jc([tO,c+1]))});SN();return uO.i($APP.db(cN))},zO=function(a,b){var c=$APP.G(b);b=$APP.C(c,ZM);c=$APP.C(c,$M);a=a.id;return a>=b&&(c==null||a<c)},AO=function(){var a=$APP.db(cN),b=PN(),c=$APP.Jc(b);return $APP.xo($APP.Ci.j(function(d){var e=$APP.G(d);d=$APP.C(e,$APP.zt);var f=$APP.C(e,$APP.Z),h=$APP.C(e,XM),k=$APP.C(e,YM),n=$APP.w($APP.Ue(function(r){return zO(r,
36
+ e)},c));return{id:d,label:f,startT:h,endT:$APP.m(k)?k:null,recordCount:n}},sO.i(a)))},BO=function(a){var b=$APP.db(cN),c=$APP.t($APP.Ue(function(d){return $APP.z.j($APP.zt.i(d),a)},sO.i(b)));return $APP.m(c)?$APP.xo(MM(function(d){return d.t},$APP.Ue(function(d){return zO(d,c)},$APP.Kc(PN())))):[]},fla=function(a){if(typeof a==="string"){try{var b=JSON.parse(a)}catch(c){b=CO}a=$APP.z.j(b,CO)?new $APP.K(null,1,[$APP.Qj,"File is not valid JSON."],null):bN(b)}else a=$APP.sa(a)?bN(a):new $APP.K(null,
37
+ 1,[$APP.Qj,"Import expects a JSON string or a parsed envelope object."],null);return a},DO=function(a){$APP.Kq.J(cN,$APP.zi,oO,function(b){return $APP.rf($APP.We(function(c){c=$APP.G(c);c=$APP.C(c,$APP.zt);return $APP.z.j(c,a)},b))});return SN()},FO=function(){return $APP.xo($APP.Ci.j(function(a){var b=$APP.G(a);a=$APP.C(b,$APP.zt);var c=$APP.C(b,$APP.Z),d=$APP.C(b,EO);b=$APP.C(b,nO);return{id:a,label:c,importedAt:d,recordCount:b.records.length}},oO.i($APP.db(cN))))},GO=function(a){var b=$APP.t($APP.Ue(function(c){return $APP.z.j($APP.zt.i(c),
38
+ a)},oO.i($APP.db(cN))));return $APP.m(b)?nO.i(b).records:[]},HO=function(a,b){return new $APP.K(null,4,[TM,a.getTime(),$APP.Dt,function(){var c=window;c=c==null?null:c.location;c=c==null?null:c.href;return $APP.m(c)?c:""}(),UM,function(){var c=navigator;c=c==null?null:c.userAgent;return $APP.m(c)?c:""}(),VM,b],null)},gla=function(){var a=$APP.db(cN),b=PN(),c=HO(new Date,VM.i(a));return aN(b,eO.i(a),sO.i(a),c)},IO=function(){var a=new Date,b=$APP.db(cN),c=PN(),d=HO(a,VM.i(b));b=aN(c,eO.i(b),sO.i(b),
39
+ d);b=JSON.stringify(b,null,2);a=""+$APP.N.i("baredom-trace-")+$APP.N.i(a.getFullYear())+$APP.N.i(SM(a.getMonth()+1))+$APP.N.i(SM(a.getDate()))+"-"+$APP.N.i(SM(a.getHours()))+$APP.N.i(SM(a.getMinutes()))+$APP.N.i(SM(a.getSeconds()))+$APP.N.i(".trace.json");b=URL.createObjectURL(new Blob([b],{type:"application/json"}));c=document.createElement("a");c.href=b;c.download=a;c.style.display="none";document.body.appendChild(c);try{var e=c.click()}finally{document.body.removeChild(c),URL.revokeObjectURL(b)}return e},
40
+ JO=function(a,b){b=b.getBoundingClientRect();a.style.top=""+$APP.N.i(b.top)+"px";a.style.left=""+$APP.N.i(b.left)+"px";a.style.width=""+$APP.N.i(b.width)+"px";a.style.height=""+$APP.N.i(b.height)+"px"},KO=function(a){a=$APP.l(a,"__xTraceHistoryHighlightBox");$APP.m(a)&&(a.style.display="none")},LO=function(a){var b=$APP.l(a,"__xTraceHistoryHighlightCid");if($APP.m(b)){b=aO(b);if($APP.m(b))return a=$APP.l(a,"__xTraceHistoryHighlightBox"),$APP.m(a)?(JO(a,b),a.style.display="block"):null;KO(a);return $APP.Xi(a,
41
+ "__xTraceHistoryHighlightCid",null)}return null},MO=function(a){return(""+$APP.N.i(a)).replace(hla,"\x26amp;").replace(ila,"\x26lt;").replace(jla,"\x26gt;").replace(kla,"\x26quot;").replace(lla,"\x26#39;")},mla=function(a){return"\x3coption value\x3d'"+$APP.N.i(MO(a))+"'\x3e"+$APP.N.i(MO(a))+"\x3c/option\x3e"},NO=function(a,b){return"\x3clabel class\x3d'cat'\x3e\x3cx-checkbox data-x-th-cat\x3d'"+$APP.N.i(a)+"' "+$APP.N.i($APP.m(b)?"checked ":null)+"aria-label\x3d'"+$APP.N.i(a)+"'\x3e\x3c/x-checkbox\x3e"+
42
+ $APP.N.i(a)+"\x3c/label\x3e"},nla=function(a,b){return $APP.ge($APP.N,$APP.Oe.j(function(c){var d=$APP.G(c);c=$APP.C(d,vN);var e=$APP.C(d,$APP.pv),f=$APP.G(d);d=$APP.C(f,vN);f=$APP.C(f,$APP.pv);d=$APP.z.j(sN,d)?"document":""+$APP.N.i(f)+" #"+$APP.N.i(d);f=$APP.z.j(sN,c)?"document":e;var h=$APP.z.j(b,f);return"\x3cdiv class\x3d'lane-label"+$APP.N.i(h?" active":null)+"' data-x-th-lane-tag\x3d'"+$APP.N.i(MO(f))+"' title\x3d'"+$APP.N.i(MO(d))+"'\x3e"+$APP.N.i(MO($APP.z.j(sN,c)?"document":e))+$APP.N.i($APP.M.j(sN,
43
+ c)?" \x3cspan class\x3d'cid'\x3e#"+$APP.N.i(c)+"\x3c/span\x3e":null)+"\x3c/div\x3e"},a))},ola=function(a,b,c){return $APP.m(a)?"\x3cline class\x3d'scrubber' x1\x3d'"+$APP.N.i(b)+"' y1\x3d'0' x2\x3d'"+$APP.N.i(b)+"' y2\x3d'"+$APP.N.i(c)+"' /\x3e":""},OO=function(a,b,c,d){a=MM(function(e){return $APP.z.j(e.id,d)?1:0},a);return $APP.ge($APP.N,$APP.Oe.j(function(e){var f=c.i?c.i(e):c.call(null,e),h=b+10,k=$APP.z.j(e.id,d),n=k?6.5:4.5;return"\x3ccircle class\x3d'dot"+$APP.N.i(k?" selected":null)+"' data-x-th-id\x3d'"+
44
+ $APP.N.i(e.id)+"' cx\x3d'"+$APP.N.i(f)+"' cy\x3d'"+$APP.N.i(h)+"' r\x3d'"+$APP.N.i(n)+"' fill\x3d'"+$APP.N.i(rN(e))+"' /\x3e"},a))},pla=function(a,b,c,d){if(c==null)return"";a=$APP.te(function(e){e=$APP.G(e);e=$APP.C(e,BN);return $APP.te(function(f){return $APP.z.j(f.id,c)?f:null},e)},a);return $APP.m(a)?(d=d.i?d.i(a):d.call(null,a),"\x3cline class\x3d'density-selected' x1\x3d'"+$APP.N.i(d)+"' y1\x3d'"+$APP.N.i(b)+"' x2\x3d'"+$APP.N.i(d)+"' y2\x3d'"+$APP.N.i(b+20)+"' /\x3e"):""},qla=function(a,b,
45
+ c,d){var e=Oka(a);return""+$APP.N.i($APP.ge($APP.N,$APP.Oe.j(function(f){var h=$APP.G(f),k=$APP.C(h,BN);f=$APP.C(h,CN);h=$APP.C(h,DN);var n=$APP.t(k),r=$APP.C(qN,$APP.m(f)?f:eN);var v=$APP.w(k);v=v==null||v===0||e==null||e===0?0:v>=e?1:.4+.6*((v-1)/$APP.Sm.j(1,e-1));var x=MO($APP.jh($APP.m(f)?f:eN));k=$APP.w(k);f=""+$APP.N.i(k)+" "+$APP.N.i($APP.z.j(1,k)?"record":"records")+" · "+$APP.N.i($APP.jh($APP.m(f)?f:eN));return"\x3crect class\x3d'density-bin' role\x3d'button' aria-label\x3d'"+$APP.N.i(MO(f))+
46
+ "' data-x-th-bin-record-id\x3d'"+$APP.N.i(n.id)+"' data-x-th-bin-count\x3d'"+$APP.N.i(k)+"' data-x-th-bin-cat\x3d'"+$APP.N.i(x)+"' x\x3d'"+$APP.N.i(h)+"' y\x3d'"+$APP.N.i(b)+"' width\x3d'"+$APP.N.i(4)+"' height\x3d'"+$APP.N.i(20)+"' fill\x3d'"+$APP.N.i(r)+"' fill-opacity\x3d'"+$APP.N.i(v)+"' /\x3e"},a)))+$APP.N.i(pla(a,b,c,d))},rla=function(a,b,c,d,e,f){function h(A){a:{var E=$APP.C(x,A.id);var I=a instanceof $APP.F?a.da:null;switch(I){case "order":A=$APP.Sm.j(0,e-16);E=v===0||v<0?8:$APP.z.j(1,v)?
47
+ 8+A/2:8+$APP.Dk.j($APP.Sm.j(E/(v-1),0),1)*A;break a;case "time":E=A.t;I=$APP.G(d);A=$APP.C(I,wN);I=$APP.C(I,xN);var O=$APP.Sm.j(0,e-16);E=A==null||I==null?8:8+$APP.Dk.j($APP.Sm.j((E-A)/I,0),1)*O;break a;default:throw Error("No matching clause: "+$APP.N.i(I));}}return E}var k=$APP.m(f)?f.id:null,n=$APP.Xf.j($APP.oe,$APP.Ee(function(A,E){E=$APP.G(E);E=$APP.C(E,vN);return new $APP.H(null,2,5,$APP.J,[E,A*20],null)},c)),r=$APP.Sm.j(20,20*$APP.w(c)),v=$APP.w(b),x=$APP.Xf.j($APP.oe,$APP.Ee(function(A,E){return new $APP.H(null,
48
+ 2,5,$APP.J,[E.id,A],null)},b)),y=$APP.fi(tN,b);return"\x3csvg class\x3d'timeline-svg' width\x3d'"+$APP.N.i(e)+"' height\x3d'"+$APP.N.i(r)+"' viewBox\x3d'0 0 "+$APP.N.i(e)+" "+$APP.N.i(r)+"'\x3e"+$APP.N.i($APP.ge($APP.N,$APP.Oe.j(function(A){A=$APP.G(A);var E=$APP.C(A,vN);A=$APP.Rc(y,E,$APP.Xe);E=$APP.C(n,E);if($APP.z.j(PO,a)){var I=Mka(A,h);A=$APP.m(Nka(I))?qla(I,E,k,h):OO(A,E,h,k)}else A=OO(A,E,h,k);return A},c)))+$APP.N.i(ola(f,$APP.m(f)?h(f):null,r))+"\x3c/svg\x3e"},sla=function(a,b,c,d,e,f,h,
49
+ k){if($APP.w(d)===0)a.innerHTML="",b.innerHTML="\x3cdiv class\x3d'timeline-empty'\x3eNo records match the current filter.\x3c/div\x3e";else{var n=$APP.Sm.j(200,b.clientWidth);a.innerHTML=nla(e,k);b.innerHTML=rla(c,d,e,f,n,h)}},QO=function(a){return""+$APP.N.i(a.tag)+" · "+$APP.N.i(a.type)},tla=function(a){var b=$APP.G(a);a=$APP.C(b,RO);var c=$APP.C(b,SO),d=$APP.C(b,TO);b=$APP.C(b,UO);c+=14;b-=14;return"\x3cline class\x3d'edge' x1\x3d'"+$APP.N.i(a)+"' y1\x3d'"+$APP.N.i(c)+"' x2\x3d'"+$APP.N.i(d)+"' y2\x3d'"+
50
+ $APP.N.i(b)+"' /\x3e"},ula=function(a,b){var c=$APP.G(a);a=$APP.C(c,$APP.Nk);var d=$APP.C(c,VO),e=$APP.C(c,$APP.fq);c=$APP.C(c,$APP.gq);return"\x3csvg class\x3d'causality-svg' width\x3d'"+$APP.N.i(e)+"' height\x3d'"+$APP.N.i(c)+"' viewBox\x3d'0 0 "+$APP.N.i(e)+" "+$APP.N.i(c)+"'\x3e"+$APP.N.i($APP.ge($APP.N,$APP.Oe.j(tla,d)))+$APP.N.i($APP.ge($APP.N,$APP.Oe.j(function(f){var h=$APP.G(f),k=$APP.C(h,$APP.zt);f=$APP.C(h,FN);var n=$APP.C(h,WO);h=$APP.C(h,XO);n-=70;var r=h-14,v=$APP.z.j(k,b),x=n+12,y=
51
+ n+22,A=n+22,E=r+18,I=r+11,O=MO("#"+$APP.N.i(k)+" "+$APP.N.i(QO(f))+" · "+$APP.N.i(oN(f)));k="\x3cg data-x-th-link-id\x3d'"+$APP.N.i(k)+"' role\x3d'button' aria-label\x3d'"+$APP.N.i(O)+"'\x3e\x3ctitle\x3e"+$APP.N.i(O)+"\x3c/title\x3e\x3crect class\x3d'node-rect"+$APP.N.i(v?" selected":null)+"' x\x3d'"+$APP.N.i(n)+"' y\x3d'"+$APP.N.i(r)+"' width\x3d'"+$APP.N.i(140)+"' height\x3d'"+$APP.N.i(28)+"' /\x3e\x3ccircle class\x3d'node-dot' cx\x3d'"+$APP.N.i(x)+"' cy\x3d'"+$APP.N.i(h)+"' r\x3d'"+$APP.N.i(4)+
52
+ "' fill\x3d'"+$APP.N.i(rN(f))+"' /\x3e\x3ctext class\x3d'node-text id' x\x3d'"+$APP.N.i(y)+"' y\x3d'"+$APP.N.i(I)+"'\x3e#"+$APP.N.i(k)+"\x3c/text\x3e\x3ctext class\x3d'node-text' x\x3d'"+$APP.N.i(A)+"' y\x3d'"+$APP.N.i(E)+"'\x3e";h=$APP.N;n=h.i;f=QO(f);f=""+$APP.N.i(f);f=f.length<=22?f:""+$APP.N.i(f.substring(0,21))+"…";return k+n.call(h,MO(f))+"\x3c/text\x3e\x3c/g\x3e"},a)))+"\x3c/svg\x3e"},wla=function(a,b,c,d){if(d==null)NN(a,YO,null),b.innerHTML="\x3cdiv class\x3d'causality-empty'\x3e"+$APP.N.i(MO("Select a record from the timeline to see its causality tree."))+
53
+ "\x3c/div\x3e";else{a:{var e=d;for(var f=0;;){var h=e.causeId;if(typeof h!=="number"||f>=5E3)break a;h=mN(c,h);if($APP.m(h))f+=1,e=h;else break a}e=void 0}e=Rka(c,e);c=new $APP.K(null,2,[ZO,$O(e),vla,aP(e)],null);if($APP.m(GN.i(e)))NN(a,YO,null),a=$APP.N,d=a.i,c=$APP.G(c),c=$APP.C(c,ZO),c="Causality tree exceeds the "+$APP.N.i(200)+"-node cap (≥ "+$APP.N.i(c)+" nodes). Pick a smaller leaf record to view its subtree.",b.innerHTML="\x3cdiv class\x3d'causality-empty'\x3e"+d.call(a,MO(c))+"\x3c/div\x3e";
54
+ else{e=bP(e,0,16);f=$APP.B(e,0,null);$APP.B(e,1,null);e=cP(f);f=dP(f);h=$APP.za($APP.Sm,0,$APP.Oe.j(WO,e));var k=$APP.za($APP.Sm,0,$APP.Oe.j(XO,e));e=new $APP.K(null,4,[$APP.Nk,e,VO,f,$APP.fq,h+70+16,$APP.gq,k+14+16],null);c=$APP.z.j(1,ZO.i(c));NN(a,YO,e);b.innerHTML=""+$APP.N.i(c?"\x3cdiv class\x3d'causality-leaf-hint'\x3e"+$APP.N.i(MO("This record has no cause and no effects in the current buffer. Pick an event/dispatch* record (or one with a 'Caused by' link in the detail pane) to see a chain."))+
55
+ "\x3c/div\x3e":null)+$APP.N.i(ula(e,d.id))}}},xla=function(a){if($APP.m(MN(a,eP))){var b=$APP.l(a,"__xTraceHistoryCausalityEl"),c=MN(a,YO),d=fP.i?fP.i(a):fP.call(null,a),e=$APP.m(c)?Ska(c,d):null,f=b==null?null:b.clientWidth;d=b==null?null:b.clientHeight;if($APP.m($APP.m(b)?$APP.m(c)?$APP.m(e)?typeof f==="number"&&typeof d==="number"&&f>0&&d>0:e:c:b)){var h=$APP.G(c);c=$APP.C(h,$APP.fq);h=$APP.C(h,$APP.gq);var k=WO.i(e),n=XO.i(e);e=k-f/2;k=n-d/2;f=$APP.Sm.j(0,c-f);d=$APP.Sm.j(0,h-d);d=new $APP.K(null,
56
+ 2,[gP,$APP.Sm.j(0,$APP.Dk.j(f,e)),hP,$APP.Sm.j(0,$APP.Dk.j(d,k))],null);f=$APP.G(d);d=$APP.C(f,gP);f=$APP.C(f,hP);b.scrollLeft=d;b.scrollTop=f;NN(a,eP,!1)}}},yla=function(a){var b=dla();a:{var c=a.querySelectorAll("option");for(var d=c.length,e=0,f=$APP.Bb($APP.bh);;){if(e>=d){c=$APP.Eb(f);break a}var h=c[e].value;e+=1;f=$APP.z.j(h,"all")?f:$APP.Db(f,h)}c=void 0}b=$APP.We(c,b);$APP.q(b)&&(b=$APP.ge($APP.N,$APP.Oe.j(mla,b)),a.insertAdjacentHTML("beforeend",b))},zla=function(a){var b=$APP.qr.i($APP.db(cN));
57
+ a.textContent=$APP.m(b)?"Resume":"Pause";a.pressed=b},Ala=function(a){var b=wO()!=null;a.textContent=b?"Stop":"Record";a.pressed=b},Bla=function(a){var b=$APP.G(a);a=$APP.C(b,iP);var c=$APP.C(b,$APP.cp),d=$APP.C(b,jP),e=$APP.C(b,kP),f=$APP.C(b,$APP.Z);b=$APP.C(b,lP);return"\x3cbutton class\x3d'session-chip"+$APP.N.i($APP.m(c)?" active":null)+$APP.N.i($APP.m(e)?" import":null)+"' type\x3d'button' data-x-th-session\x3d'"+$APP.N.i(MO(a))+"'\x3e"+$APP.N.i($APP.m(d)?"\x3cspan class\x3d'live-dot' aria-hidden\x3d'true'\x3e\x3c/span\x3e":
58
+ null)+$APP.N.i(MO(f))+$APP.N.i($APP.m(e)?"\x3cspan class\x3d'chip-close' role\x3d'button' aria-label\x3d'Remove import' data-x-th-import-close\x3d'"+$APP.N.i(b)+"'\x3e×\x3c/span\x3e":null)+"\x3c/button\x3e"},Cla=function(a,b,c,d){var e=new $APP.K(null,5,[iP,"live",$APP.cp,$APP.z.j(c,$APP.Uu),jP,!1,kP,!1,$APP.Z,"Live"],null),f=IN(c)?LN(c):null,h=KN(c)?LN(c):null;a=$APP.Ci.j(function(k){var n=k.id;return new $APP.K(null,5,[iP,""+$APP.N.i(n),$APP.cp,$APP.z.j(n,f),jP,$APP.z.j(n,d),kP,!1,$APP.Z,""+$APP.N.i(k.label)+
59
+ " · "+$APP.N.i(k.recordCount)],null)},$APP.Jc(a));b=$APP.Ci.j(function(k){var n=k.id;return new $APP.K(null,6,[iP,"import:"+$APP.N.i(n),$APP.cp,$APP.z.j(n,h),jP,!1,kP,!0,lP,n,$APP.Z,""+$APP.N.i(k.label)+" · "+$APP.N.i(k.recordCount)],null)},$APP.Jc(b));return $APP.ge($APP.N,$APP.Oe.j(Bla,$APP.Re.o(new $APP.H(null,1,5,$APP.J,[e],null),a,$APP.Jc([b]))))},Dla=function(a,b,c,d,e){a.innerHTML=Cla(b,c,d,e);b.length===0&&c.length===0?a.setAttribute("hidden",""):a.removeAttribute("hidden")},mP=function(a){var b=
60
+ oN(a);b="#"+$APP.N.i(a.id)+" "+$APP.N.i(a.tag)+" · "+$APP.N.i(a.type)+$APP.N.i($APP.m($APP.m(b)?!$APP.qi(b):b)?" · "+$APP.N.i(b):null);return"\x3cx-button class\x3d'detail-link' size\x3d'sm' variant\x3d'ghost' data-x-th-link-id\x3d'"+$APP.N.i(a.id)+"' title\x3d'"+$APP.N.i(MO(b))+"'\x3e"+$APP.N.i(MO(b))+"\x3c/x-button\x3e"},Ela=function(a,b,c,d){if($APP.m(d)){var e=JSON.stringify(d,null,2);var f=d.causeId;var h=typeof f==="number"?mN(c,f):null;f=Pka(c,d);e="\x3cpre class\x3d'detail-json'\x3e"+$APP.N.i(MO(e))+
61
+ "\x3c/pre\x3e"+$APP.N.i($APP.m(h)?"\x3cdiv class\x3d'detail-section' data-x-th-detail-cause\x3e\x3cdiv class\x3d'detail-label'\x3eCaused by\x3c/div\x3e"+$APP.N.i(mP(h))+"\x3c/div\x3e":null);c=$APP.N;d=c.i;h=$APP.G(f);f=$APP.C(h,$APP.Fx);h=$APP.C(h,BN);if(f>0){var k=$APP.w(h);f=$APP.z.j(k,f)?"Effects ("+$APP.N.i(f)+")":"Effects ("+$APP.N.i(k)+" of "+$APP.N.i(f)+")";f="\x3cdiv class\x3d'detail-section' data-x-th-detail-effects\x3e\x3cdiv class\x3d'detail-label'\x3e"+$APP.N.i(f)+"\x3c/div\x3e"+$APP.N.i($APP.ge($APP.N,
62
+ $APP.Oe.j(mP,h)))+"\x3c/div\x3e"}else f=null;e+=d.call(c,f);a.innerHTML=e;a.removeAttribute("hidden");b.removeAttribute("hidden")}else a.setAttribute("hidden",""),b.setAttribute("hidden","")},oP=function(a){var b=nP.get(a);if($APP.m(b))return b;b=gN(a);nP.set(a,b);return b},pP=function(a){return $APP.z.j(a,$APP.Uu)?"live":IN(a)?"session:"+$APP.N.i(LN(a)):KN(a)?"import:"+$APP.N.i(LN(a)):"live"},fP=function(a){var b=$APP.l(a,"__xTraceHistoryView");a=$APP.l(a,"__xTraceHistoryViewSelected");return $APP.m(a)?
63
+ $APP.l(a,pP(b)):null},rP=function(a,b){var c=$APP.l(a,"__xTraceHistoryViewSelected");c=$APP.m(c)?c:{};var d=pP($APP.l(a,"__xTraceHistoryView"));b==null?d in c&&delete c[d]:c[d]=b;$APP.T(a,"__xTraceHistoryViewSelected",c);b!=null&&$APP.z.j(qP,$APP.l(a,"__xTraceHistoryDockMode"))&&NN(a,eP,!0)},Fla=function(a,b,c){var d=fP(a);b=mN(b,d);if(b==null)return null;if(kN(b,$APP.Pg.l(c,jN,oP)))return b;rP(a,null);return null},sP=function(a){return $APP.z.j(a,$APP.Uu)?PN():IN(a)?(a=BO(LN(a)),a.length===0?PN():
64
+ a):KN(a)?(a=GO(LN(a)),a.length===0?PN():a):PN()},Gla=function(a,b,c,d){switch(d instanceof $APP.F?d.da:null){case "causality":b.setAttribute("hidden","");c.removeAttribute("hidden");a.classList.add("causality-mode");break;default:b.removeAttribute("hidden"),c.setAttribute("hidden",""),a.classList.remove("causality-mode")}},tP=function(a){KO(a);return $APP.Xi(a,"__xTraceHistoryHighlightCid",null)},Hla=function(a,b){if(b!=null&&b.componentId!=null&&$APP.M.j("document",b.tag))if($APP.z.j(b.componentId,
65
+ $APP.l(a,"__xTraceHistoryHighlightCid")))b=LO(a);else{var c=b.componentId;b=aO(c);if($APP.m(b)){$APP.Xi(a,"__xTraceHistoryHighlightCid",c);c=$APP.l(a,"__xTraceHistoryHighlightBox");if($APP.m(c))a=c;else{c=$APP.Rl(a,":host { all: initial; }\n.outline {\n position: absolute;\n pointer-events: none;\n box-sizing: border-box;\n border: 3px solid #ff2d8a;\n border-radius: 3px;\n background: rgba(255, 45, 138, 0.12);\n box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 14px 2px rgba(255, 45, 138, 0.55);\n display: none;\n}\n@media (prefers-reduced-motion: no-preference) {\n .outline {\n transition: top .08s linear, left .08s linear,\n width .08s linear, height .08s linear;\n animation: x-th-highlight-pulse .55s ease-out 1 both;\n }\n @keyframes x-th-highlight-pulse {\n 0% { box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 0 12px rgba(255, 45, 138, 0.55); }\n 100% { box-shadow:\n 0 0 0 1px rgba(0, 0, 0, 0.85),\n 0 0 0 4px rgba(255, 255, 255, 0.85),\n 0 0 14px 2px rgba(255, 45, 138, 0.55); }\n }\n}\n",
66
+ 9998);var d=c.shadowRoot,e=document.createElement("div");e.className="outline";d.appendChild(e);$APP.Xi(a,"__xTraceHistoryHighlightLayer",c);$APP.Xi(a,"__xTraceHistoryHighlightBox",e);a=e}c=b.getBoundingClientRect();d=window.innerWidth;e=window.innerHeight;c.top>=0&&c.left>=0&&c.bottom<=e&&c.right<=d||b.scrollIntoView({block:"nearest",inline:"nearest",behavior:$APP.D($APP.m(uP)?uP.matches:null)?"auto":"smooth"});JO(a,b);a.style.display="block";b=a;b.style.animation="none";b=b.style.animation=""}else b=
67
+ tP(a)}else b=tP(a);return b},wP=function(a){var b=$APP.l(a,"__xTraceHistoryTimelineEl"),c=$APP.l(a,"__xTraceHistoryCausalityEl"),d=$APP.l(a,"__xTraceHistoryLanesEl"),e=$APP.l(a,"__xTraceHistorySvgPaneEl"),f=$APP.l(a,"__xTraceHistoryCountEl"),h=$APP.l(a,"__xTraceHistoryDetailEl"),k=$APP.l(a,"__xTraceHistorySplitterEl"),n=$APP.l(a,"__xTraceHistoryHintEl"),r=$APP.l(a,"__xTraceHistoryPauseBtn"),v=$APP.l(a,"__xTraceHistoryRecordBtn"),x=$APP.l(a,"__xTraceHistorySessionsEl"),y=$APP.l(a,"__xTraceHistoryTagSelectEl"),
68
+ A=$APP.l(a,"__xTraceHistoryFilter"),E=$APP.l(a,"__xTraceHistoryView"),I=sP(E),O=lN(I,$APP.Pg.l(A,jN,oP)),S=$APP.w(O),R=I.length,da=yN(O),na=Fka(O),ka=Fla(a,I,A),oa=AO(),Qa=FO(),Sa=wO(),ob=function(){var Yb=$APP.l(a,"__xTraceHistoryAxisMode");return $APP.m(Yb)?Yb:$APP.ys}(),Cb=function(){var Yb=$APP.l(a,"__xTraceHistoryDockMode");return $APP.m(Yb)?Yb:vP}();yla(y);Gla(a,b,c,Cb);switch(Cb instanceof $APP.F?Cb.da:null){case "causality":wla(a,c,I,ka);break;default:sla(d,e,ob,O,na,da,ka,$APP.pv.i(A))}f.textContent=
69
+ ""+$APP.N.i(S);n.textContent=Tka(S,R,da,$APP.w(na));Ela(h,k,I,ka);zla(r);Ala(v);Dla(x,oa,Qa,E,Sa);xla(a);return Hla(a,ka)},xP=function(a){return $APP.m(a)?$APP.z.j("circle",a.tagName.toLowerCase()):a},yP=function(a){return $APP.m(a)?$APP.z.j("rect",a.tagName.toLowerCase())&&a.getAttribute("data-x-th-bin-record-id")!=null:a},zP=function(a){a=a.getAttribute("data-x-th-id");return $APP.m(a)?parseInt(a,10):null},AP=function(a,b){$APP.m(b)?a.classList.add("collapsed"):a.classList.remove("collapsed");a=
70
+ $APP.l(a,"__xTraceHistoryCollapseBtn");return $APP.m(a)?(a.textContent=$APP.m(b)?"»":"«",a.setAttribute("aria-expanded",$APP.m(b)?"false":"true")):null},BP=function(a){var b=!$APP.D($APP.l(a,"__xTraceHistoryCollapsed"));$APP.T(a,"__xTraceHistoryCollapsed",b);return AP(a,b)},Ila=function(a,b){$APP.T(a,"__xTraceHistoryAxisMode",function(){switch(b){case "order":return $APP.ys;case "time":return PO;default:return $APP.ys}}());return wP(a)},Jla=function(a,b){var c=function(){switch(b){case "timeline":return vP;
71
+ case "causality":return qP;default:return vP}}();$APP.T(a,"__xTraceHistoryDockMode",c);$APP.z.j(qP,c)?NN(a,eP,!0):NN(a,eP,!1);return wP(a)},CP=function(a,b,c,d){a.textContent=d;a.removeAttribute("hidden");var e=b.getBoundingClientRect();d=c.clientX-e.left;c=c.clientY-e.top;e=b.scrollTop;var f=b.scrollLeft;b=$APP.Sm.j(0,d+12+280>b.clientWidth?d-12-280:d+12);a.style.left=""+$APP.N.i(b+f)+"px";return a.style.top=""+$APP.N.i(c+e+12)+"px"},Kla=function(a,b){var c=b.target,d=$APP.l(a,"__xTraceHistoryTooltipEl"),
72
+ e=$APP.l(a,"__xTraceHistoryTimelineEl");a=sP($APP.l(a,"__xTraceHistoryView"));if($APP.m(xP(c))){c=zP(c);a=mN(a,c);if($APP.m(a)){c=""+$APP.N.i(a.tag);var f=$APP.N,h=f.i;var k=a.componentId;k=$APP.m(k)?" #"+$APP.N.i(k):null;a=c+h.call(f,k)+"\n"+$APP.N.i(a.type)+"\n"+$APP.N.i(oN(a))+"\n@ "+$APP.N.i(pN(a.t));b=CP(d,e,b,a)}else b=null;return b}if($APP.m(yP(c))){f=c.getAttribute("data-x-th-bin-record-id");h=c.getAttribute("data-x-th-bin-count");c=c.getAttribute("data-x-th-bin-cat");c=$APP.m($APP.m(f)?$APP.m(h)?
73
+ c:h:f)?new $APP.K(null,3,[DP,parseInt(f,10),EP,parseInt(h,10),CN,$APP.Lh.i(c)],null):null;if($APP.m(c)){f=$APP.G(c);h=$APP.C(f,DP);c=$APP.C(f,EP);f=$APP.C(f,CN);a=mN(a,h);if($APP.m(a)){h=""+$APP.N.i(a.tag);k=$APP.N;var n=k.i;var r=a.componentId;r=$APP.m(r)?" #"+$APP.N.i(r):null;a=h+n.call(k,r)+"\n"+$APP.N.i(c)+" "+$APP.N.i($APP.z.j(1,c)?"record":"records")+" · "+$APP.N.i($APP.jh($APP.m(f)?f:eN))+"\n@ "+$APP.N.i(pN(a.t));b=CP(d,e,b,a)}else b=null;return b}return null}return d.setAttribute("hidden",
74
+ "")},FP=function(a,b,c,d,e,f){a:switch(b=b instanceof $APP.F?b.da:null,b){case "order":d=$APP.w(c);e=$APP.Sm.j(0,e-16);d===0||d<0?f=null:$APP.z.j(1,d)||e===0?f=0:(f=$APP.Dk.j($APP.Sm.j((f-8)/e,0),1),f=Math.round(f*(d-1)));c=$APP.m(f)?$APP.B(c,f,null):null;break a;case "time":var h=$APP.G(d);d=$APP.C(h,wN);b=$APP.C(h,xN);var k=$APP.Sm.j(0,e-16);h==null||d==null||b==null?f=0:e===0||e<0||k===0?f=d:(f=$APP.Dk.j($APP.Sm.j((f-8)/k,0),1),f=d+f*b);c=Hka(c,f);break a;default:throw Error("No matching clause: "+
75
+ $APP.N.i(b));}return $APP.m(c)?(rP(a,c.id),wP(a)):null},Lla=function(a,b,c){function d(x){return FP(a,k,r,v,f,x.clientX-e.left)}c.preventDefault();b.setPointerCapture(c.pointerId);var e=b.getBoundingClientRect(),f=$APP.Sm.j(200,b.clientWidth),h=$APP.l(a,"__xTraceHistoryFilter"),k=function(){var x=$APP.l(a,"__xTraceHistoryAxisMode");return $APP.m(x)?x:$APP.ys}(),n=sP($APP.l(a,"__xTraceHistoryView")),r=lN(n,$APP.Pg.l(h,jN,oP)),v=yN(r);FP(a,k,r,v,f,c.clientX-e.left);c=function y(){b.removeEventListener("pointermove",
76
+ d);b.removeEventListener("pointerup",y);return b.removeEventListener("pointercancel",y)};b.addEventListener("pointermove",d);b.addEventListener("pointerup",c);return b.addEventListener("pointercancel",c)},GP=function(a,b){var c=$APP.l(a,"__xTraceHistoryFilter"),d=sP($APP.l(a,"__xTraceHistoryView"));c=lN(d,$APP.Pg.l(c,jN,oP));d=fP(a);a:if($APP.q(c)){if(d!=null)b:if(typeof d==="number"){for(var e=$APP.w(c),f=0;;){if(f>=e){d=null;break b}if($APP.z.j(d,$APP.Ec(c,f).id)){d=f;break b}f+=1}d=void 0}else d=
77
+ null;else d=null;if(d==null)switch(b=b instanceof $APP.F?b.da:null,b){case "next":b=$APP.t(c);break a;case "prev":b=$APP.Yc(c);break a;default:throw Error("No matching clause: "+$APP.N.i(b));}else b=$APP.z.j(b,$APP.ss)?$APP.C(c,d+1):$APP.C(c,d-1)}else b=null;return $APP.m(b)?(rP(a,b.id),wP(a)):null},HP=function(a){var b=$APP.D(a==null?null:a.isContentEditable);b?a=b:(a=a==null?null:a.tagName,a=$APP.kd(Mla,a==null?null:a.toLowerCase()));return a},Nla=function(a,b){if(HP(b.target))return null;switch(b.key){case "ArrowRight":return b.preventDefault(),
78
+ GP(a,$APP.ss);case "ArrowLeft":return b.preventDefault(),GP(a,$APP.uv);default:return null}},Ola=function(a,b,c){function d(h){h=$APP.Sm.j(60,f+(e-h.clientY));return a.style.height=""+$APP.N.i(h)+"px"}c.preventDefault();b.setPointerCapture(c.pointerId);b.classList.add("dragging");var e=c.clientY,f=a.offsetHeight;c=function k(){b.removeEventListener("pointermove",d);b.removeEventListener("pointerup",k);b.removeEventListener("pointercancel",k);return b.classList.remove("dragging")};b.addEventListener("pointermove",
79
+ d);b.addEventListener("pointerup",c);return b.addEventListener("pointercancel",c)},Pla=function(a){return a==null||$APP.z.j("",a)?null:LM(a,".trace.json")?$APP.Ed(a,$APP.w(a)-11):LM(a,".json")?$APP.Ed(a,$APP.w(a)-5):a},JP=function(a,b){var c=$APP.l(a,"__xTraceHistoryHintEl"),d=MN(a,IP);typeof d==="number"&&clearTimeout(d);c.textContent=b;c.classList.add("error");b=setTimeout(function(){c.classList.remove("error");NN(a,IP,null);return wP(a)},4E3);return NN(a,IP,b)},LP=function(a,b){var c=new FileReader,
80
+ d=Pla(b.name);c.onload=function(){var e=KP.j(c.result,d);e!=null?($APP.l(a,"__xTraceHistoryHintEl").classList.remove("error"),$APP.T(a,"__xTraceHistoryView",new $APP.H(null,2,5,$APP.J,[JN,e],null)),e=wP(a)):e=JP(a,"Import failed — see console for details.");return e};c.onerror=function(){return JP(a,"Could not read file.")};return c.readAsText(b)},MP=function(a){a=a.dataTransfer;return $APP.m(a)?a.types.includes("Files"):null},Qla=function(a,b){var c=a.shadowRoot;a=$APP.m(c)?c:a.attachShadow({mode:"open"});
81
+ if(c==null){c="\x3cstyle\x3e"+$APP.N.i(":host {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n width: min(420px, calc(100vw - 1rem));\n z-index: 1999999;\n font: 11px/1.4 ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;\n color: #cdd6f4;\n pointer-events: auto;\n /* The width transition makes the collapse / expand toggle feel\n responsive without being slow. The dock is otherwise position:\n fixed so transitioning width doesn't reflow the host page. */\n transition: width 160ms ease;\n}\n/* Collapsed mode: shrink the host to a thin vertical strip so the\n user can reach components the full dock would otherwise cover.\n The only interactive element left is the collapse-toggle button,\n which expands the dock back to full width when clicked. */\n:host(.collapsed) {\n width: 32px;\n}\n:host(.collapsed) .dock \x3e *:not(.header) { display: none; }\n:host(.collapsed) .header {\n flex-direction: column;\n align-items: center;\n padding: 8px 0;\n gap: 4px;\n}\n:host(.collapsed) .header \x3e *:not([data-x-th-action\x3d'collapse']) {\n display: none;\n}\n/* Causality mode: hide the axis-mode select (Order / Time only\n affects the timeline pane, so it's noise in causality view). */\n:host(.causality-mode) [data-x-th-axis] {\n display: none;\n}\n@media (prefers-reduced-motion: reduce) {\n :host { transition: none; }\n}\n.dock {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: #11111b;\n border-left: 1px solid rgba(59,130,246,0.6);\n box-shadow: -4px 0 20px rgba(0,0,0,0.4);\n /* Anchor for the absolutely-positioned drop-overlay added in PR 11\n so its `inset: 0` reaches the dock edges. */\n position: relative;\n}\n.header {\n display: flex;\n /* Wrap so the count + action buttons survive narrow viewports\n (`min(420px, calc(100vw - 1rem))` reaches 304px at 320px screens,\n which is too tight for four action buttons + title + count on\n one row). */\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n background: rgba(59,130,246,0.15);\n border-bottom: 1px solid rgba(59,130,246,0.3);\n flex: 0 0 auto;\n}\n.title { font-weight: 700; color: #89b4fa; font-size: 12px; }\n.count { color: #6c7086; margin-left: auto; }\n.filters {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px 12px;\n padding: 6px 10px;\n border-bottom: 1px solid rgba(255,255,255,0.06);\n flex: 0 0 auto;\n}\n/* The tag dropdown is an \x3cx-select\x3e; its own shadow brings styling.\n We just constrain its width and font so it matches the dock's\n ui-monospace 11px tone. */\n.filters x-select {\n font-size: 11px;\n max-width: 140px;\n}\n/* x-checkbox has no slot for its label, so the visible text sits\n next to the checkbox inside a \x3clabel\x3e wrapper. The label uses\n inline-flex to keep the checkbox + text on one row, with a small\n gap. Cursor: pointer mirrors native checkbox-label affordance. */\n.filters label.cat {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: #a6adc8;\n font-size: 10px;\n cursor: pointer;\n user-select: none;\n}\n/* PR 16 — search input. x-search-field brings its own theming via its\n shadow DOM; the dock just constrains the host width so it shares\n the filter row's monospace tone with the tag dropdown. */\n.filters x-search-field {\n font-size: 11px;\n flex: 1 1 140px;\n min-width: 100px;\n max-width: 240px;\n}\n/* Session strip: thin row above the filter row listing the live view\n plus any captured session as a clickable chip. Hidden when the only\n chip is Live (no sessions yet) so the dock stays compact. Scrolls\n horizontally if the chip count overflows the dock width. */\n.sessions {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 10px;\n background: rgba(0,0,0,0.15);\n border-bottom: 1px solid rgba(255,255,255,0.04);\n flex: 0 0 auto;\n overflow-x: auto;\n white-space: nowrap;\n}\n.sessions[hidden] { display: none; }\n.session-chip {\n flex: 0 0 auto;\n background: rgba(255,255,255,0.04);\n color: #a6adc8;\n border: 1px solid rgba(255,255,255,0.08);\n border-radius: 3px;\n padding: 1px 6px;\n font: inherit;\n font-size: 10px;\n cursor: pointer;\n user-select: none;\n}\n.session-chip:hover { background: rgba(59,130,246,0.12); color: #cdd6f4; }\n.session-chip.active {\n background: rgba(59,130,246,0.22);\n border-color: rgba(59,130,246,0.6);\n color: #89b4fa;\n font-weight: 600;\n}\n/* Imported traces are visually distinct from locally-captured\n sessions: amber border instead of blue, plus a small close button\n inside the chip so the user can drop the import without clearing\n live state. */\n.session-chip.import {\n border-color: rgba(249,226,175,0.45);\n color: #f9e2af;\n}\n.session-chip.import.active {\n background: rgba(249,226,175,0.18);\n border-color: rgba(249,226,175,0.7);\n color: #f9e2af;\n}\n.session-chip.import .chip-close {\n background: transparent;\n border: none;\n color: inherit;\n cursor: pointer;\n font: inherit;\n font-size: 12px;\n line-height: 1;\n padding: 0 0 0 6px;\n margin: 0;\n opacity: 0.6;\n}\n.session-chip.import .chip-close:hover { opacity: 1; }\n.session-chip .live-dot {\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: #f38ba8;\n margin-right: 4px;\n vertical-align: middle;\n animation: x-th-pulse 1s ease-in-out infinite;\n}\n@keyframes x-th-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.35; }\n}\n@media (prefers-reduced-motion: reduce) {\n .session-chip .live-dot { animation: none; }\n}\n.timeline {\n flex: 1 1 auto;\n overflow: auto;\n min-height: 0;\n position: relative;\n /* Transparent border reserves 2px so the focus indicator below doesn't\n overlap the leftmost pixels of lane labels or shift content layout. */\n border: 2px solid transparent;\n box-sizing: border-box;\n}\n.timeline-body {\n display: flex;\n align-items: stretch;\n min-height: 100%;\n}\n.lanes {\n flex: 0 0 110px;\n display: flex;\n flex-direction: column;\n border-right: 1px solid rgba(255,255,255,0.06);\n background: #11111b;\n position: sticky;\n left: 0;\n z-index: 1;\n}\n.lane-label {\n height: 20px;\n padding: 0 8px;\n display: flex;\n align-items: center;\n font-size: 11px;\n color: #a6adc8;\n border-bottom: 1px solid rgba(255,255,255,0.04);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n user-select: none;\n}\n.lane-label:hover { background: rgba(59,130,246,0.08); color: #cdd6f4; }\n.lane-label.active {\n background: rgba(59,130,246,0.18);\n color: #89b4fa;\n font-weight: 600;\n}\n.lane-label .cid { color: #6c7086; margin-left: 4px; }\n.svg-pane {\n flex: 1 1 auto;\n min-width: 0;\n display: block;\n}\nsvg.timeline-svg {\n display: block;\n background:\n repeating-linear-gradient(\n to bottom,\n transparent 0,\n transparent 19px,\n rgba(255,255,255,0.03) 19px,\n rgba(255,255,255,0.03) 20px);\n}\n.dot { cursor: pointer; transition: r 80ms ease; }\n.dot:hover { stroke: #fff; stroke-width: 1; }\n.dot.selected { stroke: #fff; stroke-width: 1.5; }\n/* Heatmap bins (PR 18). Each lane that exceeds the density threshold\n renders as a row of these rects rather than individual dots; the\n per-bin fill-opacity is set inline by the renderer (scales with\n the bin's record count relative to the lane's max). */\n.density-bin {\n cursor: pointer;\n transition: stroke 80ms ease, fill-opacity 80ms ease;\n}\n.density-bin:hover {\n stroke: #fff;\n stroke-width: 0.5;\n}\n/* Thin pink bar drawn at the selected record's exact x inside its\n bin — keeps the scrubber-style highlight in dense lanes without\n obscuring the bin's category colour. */\nline.density-selected {\n stroke: #f5c2e7;\n stroke-width: 2;\n pointer-events: none;\n}\nline.scrubber {\n stroke: #f5c2e7;\n stroke-width: 1.5;\n stroke-dasharray: 4 2;\n pointer-events: none;\n}\n.svg-pane { cursor: crosshair; }\n.timeline:focus {\n outline: none;\n border-color: #89b4fa;\n}\n.tooltip {\n position: absolute;\n background: #1e1e2e;\n border: 1px solid rgba(59,130,246,0.6);\n border-radius: 4px;\n padding: 4px 8px;\n font-size: 10px;\n white-space: pre-wrap;\n pointer-events: none;\n max-width: 280px;\n color: #cdd6f4;\n z-index: 10;\n box-shadow: 0 4px 12px rgba(0,0,0,0.5);\n}\n.timeline-empty {\n color: #6c7086;\n font-style: italic;\n text-align: center;\n padding: 20px;\n width: 100%;\n}\n/* Causality DAG pane (PR 17). Shares the flexible vertical slot with\n .timeline — render! toggles which one is hidden by dock-mode. The\n scrollable container holds an inner \x3csvg\x3e sized to the tree's\n bounding box so the scrollbars correctly reflect off-screen depth\n and breadth. */\n.causality {\n flex: 1 1 auto;\n overflow: auto;\n min-height: 0;\n position: relative;\n background: #11111b;\n border: 2px solid transparent;\n box-sizing: border-box;\n}\n.causality:focus { outline: none; border-color: #89b4fa; }\n.causality[hidden] { display: none; }\n.timeline[hidden] { display: none; }\n.causality-empty {\n color: #6c7086;\n font-style: italic;\n text-align: center;\n padding: 20px;\n width: 100%;\n}\n/* Leaf-hint banner rendered ABOVE the SVG when the tree has only\n one node. Pinned via sticky positioning so it stays visible even\n when the user scrolls the pane (the lone node sits at the\n padded origin and could be obscured by the banner otherwise). */\n.causality-leaf-hint {\n position: sticky;\n top: 0;\n left: 0;\n z-index: 1;\n background: rgba(249,226,175,0.10);\n border-bottom: 1px solid rgba(249,226,175,0.35);\n color: #f9e2af;\n font-size: 10px;\n padding: 6px 10px;\n line-height: 1.4;\n}\nsvg.causality-svg { display: block; }\nsvg.causality-svg .edge {\n stroke: rgba(255,255,255,0.18);\n stroke-width: 1;\n fill: none;\n}\nsvg.causality-svg .node-rect {\n fill: rgba(255,255,255,0.04);\n stroke: rgba(255,255,255,0.12);\n stroke-width: 1;\n cursor: pointer;\n rx: 4;\n ry: 4;\n transition: fill 80ms ease, stroke 80ms ease;\n}\nsvg.causality-svg .node-rect:hover {\n fill: rgba(59,130,246,0.16);\n stroke: rgba(59,130,246,0.6);\n}\nsvg.causality-svg .node-rect.selected {\n fill: rgba(245,194,231,0.18);\n stroke: #f5c2e7;\n stroke-width: 1.5;\n}\nsvg.causality-svg .node-dot {\n pointer-events: none;\n}\nsvg.causality-svg .node-text {\n fill: #cdd6f4;\n font: 10px ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;\n pointer-events: none;\n dominant-baseline: middle;\n}\nsvg.causality-svg .node-text.id {\n fill: #a6adc8;\n font-size: 9px;\n}\n.splitter {\n flex: 0 0 auto;\n height: 4px;\n background: rgba(255,255,255,0.04);\n cursor: ns-resize;\n touch-action: none;\n transition: background 120ms ease;\n}\n.splitter:hover, .splitter.dragging { background: rgba(59,130,246,0.6); }\n.detail {\n background: #181825;\n border-top: 1px solid rgba(59,130,246,0.2);\n padding: 8px 10px;\n font-size: 10px;\n color: #cdd6f4;\n flex: 0 0 auto;\n height: 35vh;\n min-height: 60px;\n max-height: 80%;\n overflow-y: auto;\n}\n.detail-json {\n margin: 0 0 8px 0;\n font: inherit;\n white-space: pre-wrap;\n word-break: break-all;\n color: #a6e3a1;\n}\n.detail-section { margin-top: 6px; }\n.detail-label {\n color: #89b4fa;\n font-weight: 600;\n margin-bottom: 2px;\n font-size: 10px;\n letter-spacing: 0.02em;\n}\n/* The host is an \x3cx-button\x3e; its own shadow brings background, hover,\n border-radius, etc. We keep block-layout + width on the host so each\n link fills its row, and reach into the button's `label` part to add\n ellipsis truncation (the summary string can exceed the dock width). */\n.detail-link {\n display: block;\n width: 100%;\n margin: 2px 0;\n}\n.detail-link::part(label) {\n display: block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.detail-link::part(button) {\n width: 100%;\n justify-content: flex-start;\n}\n.detail-empty { color: #6c7086; font-style: italic; font-size: 10px; }\n.empty {\n color: #6c7086;\n font-style: italic;\n text-align: center;\n padding: 20px;\n}\n.hint { color: #6c7086; font-size: 10px; padding: 4px 10px; flex: 0 0 auto; }\n.hint.error { color: #f38ba8; }\n/* Drop overlay — covers the whole dock while a file is being hovered.\n pointer-events:none keeps drag events flowing through to the dock root\n so the dragleave/drop bookkeeping doesn't fight the overlay layer. */\n.drop-overlay {\n position: absolute;\n inset: 0;\n background: rgba(249,226,175,0.10);\n border: 2px dashed rgba(249,226,175,0.6);\n display: flex;\n align-items: center;\n justify-content: center;\n color: #f9e2af;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.02em;\n z-index: 100;\n pointer-events: none;\n}\n.drop-overlay[hidden] { display: none; }\n/* The hidden file input is kept off-screen — clicked programmatically\n by the Import button — but we mark it `display:none` to keep it out\n of layout entirely. */\n.import-input { display: none; }")+
82
+ "\x3c/style\x3e";var d=$APP.N,e=d.i;b="\x3cdiv class\x3d'dock'\x3e\x3cdiv class\x3d'header'\x3e\x3cx-button data-x-th-action\x3d'collapse' size\x3d'sm' variant\x3d'ghost' aria-label\x3d'Collapse panel' title\x3d'Collapse / expand panel (Ctrl/Cmd + \\\\)'\x3e«\x3c/x-button\x3e\x3cspan class\x3d'title'\x3ex-trace-history\x3c/span\x3e\x3cx-button data-x-th-action\x3d'pause' size\x3d'sm' variant\x3d'ghost'\x3ePause\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'record' size\x3d'sm' variant\x3d'ghost'\x3eRecord\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'clear' size\x3d'sm' variant\x3d'ghost'\x3eClear\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'export' size\x3d'sm' variant\x3d'ghost' title\x3d'Download trace as .trace.json'\x3eExport\x3c/x-button\x3e\x3cx-button data-x-th-action\x3d'import' size\x3d'sm' variant\x3d'ghost' title\x3d'Load a .trace.json file (or drag-drop one onto the dock)'\x3eImport\x3c/x-button\x3e\x3cspan class\x3d'count' data-x-th-count\x3e0\x3c/span\x3e\x3c/div\x3e\x3cdiv class\x3d'sessions' data-x-th-sessions hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'filters'\x3e\x3cx-select data-x-th-tag size\x3d'sm'\x3e\x3coption value\x3d'all' selected\x3eAll tags\x3c/option\x3e\x3c/x-select\x3e\x3cx-search-field data-x-th-search name\x3d'search' placeholder\x3d'Search records…' autocomplete\x3d'off'\x3e\x3c/x-search-field\x3e"+
83
+ $APP.N.i(NO("events",$APP.kd(b,$APP.Xt)))+$APP.N.i(NO("state",$APP.kd(b,$APP.Lt)))+$APP.N.i(NO("dom",$APP.kd(b,NP)))+$APP.N.i(NO("lifecycle",$APP.kd(b,OP)))+"\x3cx-select data-x-th-mode size\x3d'sm'\x3e\x3coption value\x3d'timeline' selected\x3eTimeline\x3c/option\x3e\x3coption value\x3d'causality'\x3eCausality\x3c/option\x3e\x3c/x-select\x3e\x3cx-select data-x-th-axis size\x3d'sm'\x3e\x3coption value\x3d'order' selected\x3eOrder\x3c/option\x3e\x3coption value\x3d'time'\x3eTime\x3c/option\x3e\x3c/x-select\x3e\x3c/div\x3e\x3cdiv class\x3d'timeline' data-x-th-timeline tabindex\x3d'0'\x3e\x3cdiv class\x3d'lanes' data-x-th-lanes\x3e\x3c/div\x3e\x3cdiv class\x3d'svg-pane' data-x-th-svg-pane\x3e\x3c/div\x3e\x3cdiv class\x3d'tooltip' data-x-th-tooltip hidden\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'causality' data-x-th-causality tabindex\x3d'0' hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'splitter' data-x-th-splitter hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'detail' data-x-th-detail hidden\x3e\x3c/div\x3e\x3cdiv class\x3d'hint' data-x-th-hint\x3e\x3c/div\x3e\x3cdiv class\x3d'drop-overlay' data-x-th-drop-overlay hidden\x3eDrop .trace.json to import\x3c/div\x3e\x3cinput class\x3d'import-input' data-x-th-import-input type\x3d'file' accept\x3d'.json,.trace.json,application/json' /\x3e\x3c/div\x3e";
84
+ a.innerHTML=c+e.call(d,b)}return a},Rla=function(a,b){$APP.T(a,"__xTraceHistoryShadow",b);$APP.T(a,"__xTraceHistoryTimelineEl",b.querySelector("[data-x-th-timeline]"));$APP.T(a,"__xTraceHistoryLanesEl",b.querySelector("[data-x-th-lanes]"));$APP.T(a,"__xTraceHistorySvgPaneEl",b.querySelector("[data-x-th-svg-pane]"));$APP.T(a,"__xTraceHistoryTooltipEl",b.querySelector("[data-x-th-tooltip]"));$APP.T(a,"__xTraceHistoryCountEl",b.querySelector("[data-x-th-count]"));$APP.T(a,"__xTraceHistoryDetailEl",b.querySelector("[data-x-th-detail]"));
85
+ $APP.T(a,"__xTraceHistorySplitterEl",b.querySelector("[data-x-th-splitter]"));$APP.T(a,"__xTraceHistoryHintEl",b.querySelector("[data-x-th-hint]"));$APP.T(a,"__xTraceHistoryTagSelectEl",b.querySelector("[data-x-th-tag]"));$APP.T(a,"__xTraceHistoryCausalityEl",b.querySelector("[data-x-th-causality]"));$APP.T(a,"__xTraceHistoryPauseBtn",b.querySelector("[data-x-th-action\x3d'pause']"));$APP.T(a,"__xTraceHistoryRecordBtn",b.querySelector("[data-x-th-action\x3d'record']"));$APP.T(a,"__xTraceHistorySessionsEl",
86
+ b.querySelector("[data-x-th-sessions]"));$APP.T(a,"__xTraceHistoryImportInput",b.querySelector("[data-x-th-import-input]"));$APP.T(a,"__xTraceHistoryDropOverlay",b.querySelector("[data-x-th-drop-overlay]"));$APP.T(a,"__xTraceHistoryCollapseBtn",b.querySelector("[data-x-th-action\x3d'collapse']"))},Sla=function(a,b,c,d,e,f,h,k){return[[b,"click",function(n){n=n.target;var r=n.closest("[data-x-th-action]");if($APP.m(r))switch(r.getAttribute("data-x-th-action")){case "pause":$APP.m($APP.qr.i($APP.db(cN)))?
87
+ qO():pO();break;case "record":wO()!=null?xO():yO();break;case "clear":$APP.T(a,"__xTraceHistoryViewSelected",{});$APP.T(a,"__xTraceHistoryView",$APP.Uu);vO();break;case "export":IO();break;case "import":r=$APP.l(a,"__xTraceHistoryImportInput");$APP.m(r)&&(r.value="",r.click());break;case "collapse":BP(a)}r=n.closest("[data-x-th-import-close]");if($APP.m(r)){r=parseInt(r.getAttribute("data-x-th-import-close"),10);var v=$APP.l(a,"__xTraceHistoryView");KN(v)&&$APP.z.j(r,LN(v))&&$APP.T(a,"__xTraceHistoryView",
88
+ $APP.Uu);DO(r)}$APP.m(n.closest("[data-x-th-import-close]"))||(r=n.closest("[data-x-th-session]"),$APP.m(r)&&(r=r.getAttribute("data-x-th-session"),r=$APP.z.j(r,"live")?$APP.Uu:r.lastIndexOf("import:",0)==0?new $APP.H(null,2,5,$APP.J,[JN,parseInt(r.substring(7),10)],null):new $APP.H(null,2,5,$APP.J,[HN,parseInt(r,10)],null),$APP.T(a,"__xTraceHistoryView",r),wP(a)));r=n.closest("[data-x-th-lane-tag]");if($APP.m(r)){v=r.getAttribute("data-x-th-lane-tag");r=$APP.l(a,"__xTraceHistoryFilter");var x=$APP.pv.i(r);
89
+ v=$APP.z.j(v,x)?null:v;r=$APP.Pg.l(r,$APP.pv,v);$APP.T(a,"__xTraceHistoryFilter",r);r=$APP.l(a,"__xTraceHistoryTagSelectEl");$APP.m(r)&&(r.value=$APP.m(v)?v:"all");wP(a)}r=n.closest("[data-x-th-link-id]");$APP.m(r)&&(r=r.getAttribute("data-x-th-link-id"),$APP.m(r)&&(r=parseInt(r,10),$APP.m(isNaN(r))||(rP(a,r),wP(a))));r=xP(n);r=$APP.m(r)?r:yP(n);$APP.m(r)?($APP.m(xP(n))?n=zP(n):$APP.m(yP(n))?(n=n.getAttribute("data-x-th-bin-record-id"),n=$APP.m(n)?parseInt(n,10):null):n=null,r=fP(a),n=$APP.z.j(n,
90
+ r)?null:n,rP(a,n),n=wP(a)):n=null;return n}],[b,"select-change",function(n){var r=n.target;n=n.detail.value;r.getAttribute("data-x-th-tag")!=null?(r=$APP.Pg.l($APP.l(a,"__xTraceHistoryFilter"),$APP.pv,$APP.z.j(n,"all")?null:n),$APP.T(a,"__xTraceHistoryFilter",r),r=wP(a)):r=r.getAttribute("data-x-th-mode")!=null?Jla(a,n):r.getAttribute("data-x-th-axis")!=null?Ila(a,n):null;return r}],[b,"x-checkbox-change",function(n){var r=n.target.getAttribute("data-x-th-cat");if(r!=null){var v=n.detail.checked;
91
+ n=$APP.l(a,"__xTraceHistoryFilter");var x=hN.i(n);x=$APP.m(x)?x:$APP.fh(dN);r=$APP.Lh.i(r);r=$APP.m(v)?$APP.Jd.j(x,r):$APP.Jq.j(x,r);n=$APP.Pg.l(n,hN,r);$APP.T(a,"__xTraceHistoryFilter",n);n=wP(a)}else n=null;return n}],[b,"x-search-field-input",function(n){var r=n.target;$APP.m($APP.m(r)?r.hasAttribute("data-x-th-search"):r)?(n=n.detail.value,n=($APP.m(n)?n:"").toLowerCase(),n=$APP.Pg.l($APP.l(a,"__xTraceHistoryFilter"),iN,$APP.z.j("",n)?null:n),$APP.T(a,"__xTraceHistoryFilter",n),n=wP(a)):n=null;
92
+ return n}],[c,"pointermove",function(n){return Kla(a,n)}],[c,"pointerleave",function(){return $APP.l(a,"__xTraceHistoryTooltipEl").setAttribute("hidden","")}],[c,"pointerdown",function(){return c.focus()}],[k,"pointerdown",function(){return k.focus()}],[b,"keydown",function(n){return Nla(a,n)}],[d,"pointerdown",function(n){return Lla(a,$APP.l(a,"__xTraceHistorySvgPaneEl"),n)}],[e,"pointerdown",function(n){return Ola(f,e,n)}],[h,"change",function(n){n=n.target.files;return n.length>0?LP(a,n[0]):null}],
93
+ [b,"dragenter",function(n){if($APP.m(MP(n))){n.preventDefault();n=$APP.l(a,"__xTraceHistoryDropOverlay");var r=MN(a,PP);NN(a,PP,($APP.m(r)?r:0)+1);n=n.removeAttribute("hidden")}else n=null;return n}],[b,"dragover",function(n){$APP.m(MP(n))?(n.preventDefault(),n=n.dataTransfer,n=$APP.m(n)?n.dropEffect="copy":null):n=null;return n}],[b,"dragleave",function(n){if($APP.m(MP(n))){n=$APP.l(a,"__xTraceHistoryDropOverlay");var r=$APP.Sm.j,v=MN(a,PP);r=r.call($APP.Sm,0,($APP.m(v)?v:0)-1);NN(a,PP,r);n=r===
94
+ 0?n.setAttribute("hidden",""):null}else n=null;return n}],[b,"drop",function(n){$APP.m(MP(n))?(n.preventDefault(),NN(a,PP,0),$APP.l(a,"__xTraceHistoryDropOverlay").setAttribute("hidden",""),n=n.dataTransfer,n=$APP.m(n)?n.files:null,n=$APP.m($APP.m(n)?n.length>0:n)?LP(a,n[0]):null):n=null;return n}],[document,"keydown",function(n){var r;if(r=$APP.z.j("\\",n.key))r=n.metaKey,r=$APP.m(r)?r:n.ctrlKey,r=$APP.m(r)?$APP.p(n.altKey)&&$APP.p(n.shiftKey)&&!HP(n.target):r;$APP.m(r)?(n.preventDefault(),n=BP(a)):
95
+ n=null;return n}]]},Tla=function(a,b){b=Sla(a,b,$APP.l(a,"__xTraceHistoryTimelineEl"),$APP.l(a,"__xTraceHistorySvgPaneEl"),$APP.l(a,"__xTraceHistorySplitterEl"),$APP.l(a,"__xTraceHistoryDetailEl"),$APP.l(a,"__xTraceHistoryImportInput"),$APP.l(a,"__xTraceHistoryCausalityEl"));$APP.T(a,"__xTraceHistoryListeners",b);a:{a=b.length;for(var c=0;;)if(c<a){var d=b[c];d[0].addEventListener(d[1],d[2]);c+=1}else break a}},Ula=function(a){if($APP.m($APP.l(a,"__xTraceHistoryHighlightRaf")))return null;var b=requestAnimationFrame(function(){$APP.Xi(a,
96
+ "__xTraceHistoryHighlightRaf",null);return LO(a)});return $APP.Xi(a,"__xTraceHistoryHighlightRaf",b)},Vla=function(a){function b(){return Ula(a)}var c=[[window,"scroll",b,{capture:!0,passive:!0}],[window,"resize",b,{capture:!1,passive:!0}]];$APP.Xi(a,"__xTraceHistoryHighlightListeners",c);for(var d=c.length,e=0;;)if(e<d){var f=c[e];f[0].addEventListener(f[1],f[2],f[3]);e+=1}else break},Wla=function(a,b){$APP.m($APP.l(a,"__xTraceHistoryFilter"))||$APP.T(a,"__xTraceHistoryFilter",new $APP.K(null,3,
97
+ [$APP.pv,null,hN,b,iN,null],null));$APP.m($APP.l(a,"__xTraceHistoryView"))||$APP.T(a,"__xTraceHistoryView",$APP.Uu);$APP.m($APP.l(a,"__xTraceHistoryViewSelected"))||$APP.T(a,"__xTraceHistoryViewSelected",{});$APP.m($APP.l(a,"__xTraceHistoryAxisMode"))||$APP.T(a,"__xTraceHistoryAxisMode",$APP.ys);$APP.m($APP.l(a,"__xTraceHistoryDockMode"))||$APP.T(a,"__xTraceHistoryDockMode",vP);$APP.l(a,"__xTraceHistoryCollapsed")==null&&$APP.T(a,"__xTraceHistoryCollapsed",!1);AP(a,$APP.D($APP.l(a,"__xTraceHistoryCollapsed")))},
98
+ Xla=function(a){if($APP.m($APP.l(a,"__xTraceHistoryMounted")))return null;a.__xTraceHistoryInternal=!0;var b=PN().length;Xka(function(){var c=Dka(),d=Qla(a,c);Rla(a,d);Wla(a,c);Tla(a,d);Vla(a);c=TN.i($APP.Kq.l(QN,Vka,function(){var e=$APP.l(a,"__xTraceHistoryView"),f=FO(),h=f.length;var k=MN(a,QP);k=$APP.m(k)?k:0;h>k?(NN(a,QP,h),$APP.z.j(e,$APP.Uu)&&PN().length===0&&$APP.T(a,"__xTraceHistoryView",new $APP.H(null,2,5,$APP.J,[JN,f[h-1].id],null))):h<k&&NN(a,QP,h);return wP(a)}));$APP.T(a,"__xTraceHistorySubToken",
99
+ c);wP(a);return $APP.T(a,"__xTraceHistoryMounted",!0)});return $APP.M.j(b,PN().length)?console.warn("[x-trace-history] dock mount produced records — internal-host suppression is leaking. ","Wrap dynamic child-component constructors in recorder/with-suppressed-recording!."):null},RP=function(){return $APP.m(document.querySelector("x-trace-history"))?null:document.body.appendChild(document.createElement("x-trace-history"))},SP=function(){if(OM()){var a=$APP.Kq.o;var b=$APP.l(window,"BAREDOM_TRACE_HISTORY_CAPACITY");
100
+ b=typeof b==="number"&&b>0?b:5E3;var c=window,d;(d=$APP.z.j("raw",$APP.l(c,"BAREDOM_TRACE_HISTORY")))||(c=c.location.search,c=c==null?null:$APP.Ah(Yla,c),d=$APP.D(c));a.call($APP.Kq,cN,$APP.Pg,$APP.Mm,b,$APP.Jc([VM,d]));$APP.Ke($APP.Hi,lO);$APP.Ke($APP.wj,lO);$APP.Ke(XN,0);$APP.Ke(dO,$APP.Xe);$ka();$APP.Ke(kO,!0);a=$APP.l(window,"BareDOM");a=$APP.m(a)?a:{};a.traceHistory={records:ala,sessions:AO,"export":gla,download:IO,stopSession:xO,"import":KP,pause:pO,importRecords:GO,sessionRecords:BO,startSession:yO,
101
+ components:bla,clear:vO,imports:FO,removeImport:DO,resume:qO};window.BareDOM=a;console.log("%c[BareDOM Trace History]%c Active — see window.BareDOM.traceHistory for the API","color:#3b82f6;font-weight:bold","color:inherit")}$APP.Dp();$APP.An();$APP.Ql();$APP.$p();$APP.Oj("x-trace-history",Zla);return OM()?$APP.m(document.body)?RP():document.addEventListener("DOMContentLoaded",RP,{once:!0}):null},TP=function(){return SP()},zN=function zN(a){switch(arguments.length){case 2:return zN.j(arguments[0],
102
+ arguments[1]);case 3:return zN.l(arguments[0],arguments[1],arguments[2]);default:for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return zN.o(arguments[0],arguments[1],arguments[2],3<c.length?new $APP.hc(c.slice(3),0,null):null)}};zN.j=function(a,b){return b};zN.l=function(a,b,c){return(a.i?a.i(b):a.call(null,b))<(a.i?a.i(c):a.call(null,c))?b:c};zN.o=function(a,b,c,d){return $APP.za(function(e,f){return zN.l(a,e,f)},zN.l(a,b,c),d)};
103
+ zN.H=function(a){var b=$APP.t(a),c=$APP.u(a);a=$APP.t(c);var d=$APP.u(c);c=$APP.t(d);d=$APP.u(d);return this.o(b,a,c,d)};zN.K=3;
104
+ var XM=new $APP.F(null,"start-t","start-t",1829305353),ZO=new $APP.F(null,"node-count","node-count",383091297),ZM=new $APP.F(null,"start-id","start-id",-456790067),$M=new $APP.F(null,"end-id","end-id",2084513705),vP=new $APP.F(null,"timeline","timeline",192903161),iP=new $APP.F(null,"chip-key","chip-key",644014552),cO=new $APP.F(null,"next-component-id","next-component-id",1588977206),VO=new $APP.F(null,"edges","edges",-694791395),TN=new $APP.F(null,"next-token","next-token",1432414974),UM=new $APP.F(null,
105
+ "user-agent","user-agent",1220426212),qP=new $APP.F(null,"causality","causality",-712927373),VM=new $APP.F(null,"forensic?","forensic?",188264321),iN=new $APP.F(null,"search","search",1564939822),HN=new $APP.F(null,"session","session",1008279103),YO=new $APP.F(null,"causality-layout","causality-layout",-1264013405),jP=new $APP.F(null,"recording?","recording?",-1477514924),BN=new $APP.F(null,"records","records",1326822832),UN=new $APP.F(null,"new?","new?",777958557),vla=new $APP.F(null,"max-depth",
106
+ "max-depth",127060793),GN=new $APP.F(null,"capped?","capped?",-65680820),XO=new $APP.F(null,"cy","cy",755331060),WO=new $APP.F(null,"cx","cx",1272694324),DN=new $APP.F(null,"x-start","x-start",1183238797),gP=new $APP.F(null,"scroll-left","scroll-left",-211761103),vN=new $APP.F(null,"lane-id","lane-id",2005926623),jN=new $APP.F(null,"haystack-fn","haystack-fn",1813797862),sO=new $APP.F(null,"sessions","sessions",-699316392),YM=new $APP.F(null,"end-t","end-t",-218701242),RN=new $APP.F(null,"by-token",
107
+ "by-token",-1485378511),UP=new $APP.F(null,"next-import-id","next-import-id",287496955),FN=new $APP.F(null,"record","record",-779106859),eO=new $APP.F(null,"components","components",-1073188942),nO=new $APP.F(null,"envelope","envelope",-236796318),RM=new $APP.F(null,"cause-id","cause-id",-1282947263),Jka=new $APP.F(null,"x-end","x-end",-1725631203),Gka=new $APP.F(null,"tmax","tmax",2006118392),EP=new $APP.F(null,"bin-count","bin-count",1792167977),QP=new $APP.F(null,"auto-switch-import","auto-switch-import",
108
+ -809333661),eP=new $APP.F(null,"causality-needs-fit","causality-needs-fit",1728707358),UO=new $APP.F(null,"to-cy","to-cy",1542880464),TO=new $APP.F(null,"to-cx","to-cx",698995232),hP=new $APP.F(null,"scroll-top","scroll-top",-46723100),hO=new $APP.F(null,"rate-limit","rate-limit",1748082022),wN=new $APP.F(null,"tmin","tmin",-39508962),$la=new $APP.F(null,"to-id","to-id",1021626465),Kka=new $APP.F(null,"t-min","t-min",-488887638),VN=new $APP.F(null,"next-id","next-id",-224240762),hN=new $APP.F(null,
109
+ "categories","categories",178386610),Lka=new $APP.F(null,"t-max","t-max",-949530573),PO=new $APP.F(null,"time","time",1385887882),CN=new $APP.F(null,"dominant-cat","dominant-cat",-914257775),OP=new $APP.F(null,"lifecycle","lifecycle",341496205),eN=new $APP.F(null,"other","other",995793544),CO=new $APP.F("baredom.dev.x-trace-history.model","parse-error","baredom.dev.x-trace-history.model/parse-error",840657481),uN=new $APP.F(null,"min-t","min-t",-1349871659),oO=new $APP.F(null,"imports","imports",
110
+ -1249933394),AN=new $APP.F(null,"bin-i","bin-i",791326307),WM=new $APP.F(null,"first-seen","first-seen",390191468),kP=new $APP.F(null,"import?","import?",-40157302),NP=new $APP.F(null,"dom","dom",-1236537922),tO=new $APP.F(null,"next-session-id","next-session-id",1944278844),EO=new $APP.F(null,"imported-at","imported-at",-1157103926),VP=new $APP.F(null,"depth","depth",1768663640),DP=new $APP.F(null,"record-id","record-id",-1468971877),uO=new $APP.F(null,"active-session-id","active-session-id",943086451),
111
+ RO=new $APP.F(null,"from-cx","from-cx",-293616201),SO=new $APP.F(null,"from-cy","from-cy",1126835724),TM=new $APP.F(null,"exported-at","exported-at",1661975683),QM=new $APP.F(null,"component-id","component-id",1551113783),IP=new $APP.F(null,"import-error","import-error",1672727808),PP=new $APP.F(null,"drag-depth","drag-depth",-226189617),ama=new $APP.F(null,"from-id","from-id",-106962526),lP=new $APP.F(null,"import-id","import-id",940580069),xN=new $APP.F(null,"span","span",1394872991),sN=new $APP.F("baredom.dev.x-trace-history.model",
112
+ "document","baredom.dev.x-trace-history.model/document",-1776453896),JN=new $APP.F(null,"import","import",-1399500709);var rO=$APP.Xf.j($APP.Rq,$APP.Xe),yka=NM("(?:^\\?|\x26)"+$APP.N.i("baredom-trace-history")+"(?:\x3d|\x26|$)"),Yla=NM("(?:^\\?|\x26)"+$APP.N.i("baredom-trace-history")+"\x3d"+$APP.N.i("raw")+"(?:\x26|$)"),Eka=new $APP.K(null,4,[$APP.Xt,new $APP.ah(null,new $APP.K(null,3,["event/dispatch",null,"event/dispatch-document",null,"event/dispatch-cancelable",null],null),null),$APP.Lt,new $APP.ah(null,new $APP.K(null,1,["state/instance-field-set",null],null),null),NP,new $APP.ah(null,new $APP.K(null,2,["dom/attribute-removed",
113
+ null,"dom/attribute-set",null],null),null),OP,new $APP.ah(null,new $APP.K(null,3,["lifecycle/attribute-changed",null,"lifecycle/connected",null,"lifecycle/disconnected",null],null),null)],null),dN=new $APP.H(null,4,5,$APP.J,[$APP.Xt,$APP.Lt,NP,OP],null),qN=new $APP.K(null,5,[$APP.Xt,"#94e2d5",$APP.Lt,"#f9e2af",NP,"#fab387",OP,"#cba6f7",eN,"#6c7086"],null),EN=function EN(a,b){return $APP.Md(b,new $APP.Pd(null,function(){return $APP.Se(function(d){return EN.j?EN.j(a,d):EN.call(null,a,d)},$APP.Jc([Qka(a,
114
+ b.id)]))},null))},$O=function $O(a){return $APP.za($APP.xk,0,$APP.Oe.j($O,$APP.Wv.i(a)))+1},aP=function aP(a){return $APP.$c($APP.Wv.i(a))?0:$APP.ge($APP.Sm,$APP.Oe.j(aP,$APP.Wv.i(a)))+1},bP=function bP(a,b,c){var e=FN.i(a),f=$APP.Wv.i(a);a=30+b*56;if($APP.$c(f))return new $APP.H(null,2,5,$APP.J,[new $APP.K(null,6,[$APP.zt,e.id,FN,e,WO,c+70,XO,a,VP,b,$APP.Wv,$APP.Xe],null),c+158],null);f=$APP.za(function(n,r){var v=$APP.B(n,0,null);n=$APP.B(n,1,null);var x=b+1;n=bP.l?bP.l(r,x,n):bP.call(null,r,x,
115
+ n);r=$APP.B(n,0,null);n=$APP.B(n,1,null);return new $APP.H(null,2,5,$APP.J,[$APP.Jd.j(v,r),n],null)},new $APP.H(null,2,5,$APP.J,[$APP.Xe,c],null),f);c=$APP.B(f,0,null);f=$APP.B(f,1,null);var h=WO.i($APP.t(c)),k=WO.i($APP.Nc(c));return new $APP.H(null,2,5,$APP.J,[new $APP.K(null,6,[$APP.zt,e.id,FN,e,WO,(h+k)/2,XO,a,VP,b,$APP.Wv,c],null),f],null)},cP=function cP(a){return $APP.Xf.j(new $APP.H(null,1,5,$APP.J,[$APP.sk.j(a,$APP.Wv)],null),$APP.Se(cP,$APP.Jc([$APP.Wv.i(a)])))},dP=function dP(a){var c=
116
+ $APP.zt.i(a),d=WO.i(a),e=XO.i(a);return $APP.rf($APP.Se(function(f){return $APP.Md(new $APP.K(null,6,[ama,c,RO,d,SO,e,$la,$APP.zt.i(f),TO,WO.i(f),UO,XO.i(f)],null),dP.i?dP.i(f):dP.call(null,f))},$APP.Jc([$APP.Wv.i(a)])))};var cN=$APP.Je($APP.Ag([VM,$APP.Mm,hO,VN,$APP.qr,oO,BN,eO,uO,cO,sO,UP,tO],[!1,5E3,$APP.oe,0,!1,$APP.Xe,rO,$APP.oe,null,0,$APP.Xe,0,0])),QN=$APP.Je(new $APP.K(null,3,[TN,0,$APP.Nm,!1,RN,$APP.oe],null)),dO=$APP.Je($APP.Xe),mO=$APP.Je(null),kO=$APP.Je(!1),XN=$APP.Je(0),ON=$APP.Je([null,null]),Yka=new $APP.ah(null,new $APP.K(null,3,[$APP.Vi,null,$APP.Ii,null,$APP.Ni,null],null),null),Zka=new $APP.ah(null,new $APP.K(null,3,[$APP.gj,null,$APP.ij,null,$APP.aj,null],null),null),KP=function KP(a){switch(arguments.length){case 1:return KP.i(arguments[0]);
117
+ case 2:return KP.j(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",arguments.length].join(""));}};KP.i=function(a){return KP.j(a,null)};
118
+ KP.j=function(a,b){a=fla(a);var c=$APP.G(a);a=$APP.C(c,$APP.jt);c=$APP.C(c,$APP.Qj);if($APP.m(c))return console.warn("[x-trace-history] import rejected:",c),null;c=performance.now();var d=UP.i($APP.db(cN));b=b==null||$APP.z.j("",b)?"Import "+$APP.N.i(d):b;var e=new $APP.K(null,4,[$APP.zt,d,$APP.Z,b,EO,c,nO,a],null);$APP.Kq.j(cN,function(f){return $APP.zi.l($APP.zi.J(f,oO,$APP.Jd,e),UP,$APP.sc)});SN();return d};KP.K=2;var uP,WP=window.matchMedia;uP=$APP.m(WP)?WP.call(window,"(prefers-reduced-motion: reduce)"):null;var hla=RegExp("\x26","g"),ila=RegExp("\x3c","g"),jla=RegExp("\x3e","g"),kla=RegExp('"',"g"),lla=RegExp("'","g"),nP=new WeakMap,Mla=new $APP.ah(null,new $APP.K(null,5,["x-select",null,"select",null,"input",null,"textarea",null,"x-checkbox",null],null),null),Zla=new $APP.K(null,5,[$APP.Dj,!0,$APP.Gj,[],$APP.Ej,function(a){return Xla(a)},$APP.Bj,function(a){var b=$APP.l(a,"__xTraceHistorySubToken");$APP.m(b)&&$APP.Kq.o(QN,$APP.zi,RN,$APP.sk,$APP.Jc([b]));b=MN(a,IP);$APP.m(b)&&typeof b==="number"&&clearTimeout(b);
119
+ b=$APP.l(a,"__xTraceHistoryListeners");if($APP.m(b)){for(var c=b.length,d=0;;)if(d<c){var e=b[d];e[0].removeEventListener(e[1],e[2]);d+=1}else break;$APP.T(a,"__xTraceHistoryListeners",null)}b=$APP.l(a,"__xTraceHistoryHighlightListeners");if($APP.m(b)){c=b.length;for(d=0;;)if(d<c)e=b[d],e[0].removeEventListener(e[1],e[2],e[3]),d+=1;else break;$APP.Xi(a,"__xTraceHistoryHighlightListeners",null)}b=$APP.l(a,"__xTraceHistoryHighlightRaf");$APP.m(b)&&(cancelAnimationFrame(b),$APP.Xi(a,"__xTraceHistoryHighlightRaf",
120
+ null));b=$APP.l(a,"__xTraceHistoryHighlightLayer");$APP.m(b)&&$APP.Tl(b);$APP.Xi(a,"__xTraceHistoryHighlightLayer",null);$APP.Xi(a,"__xTraceHistoryHighlightBox",null);$APP.Xi(a,"__xTraceHistoryHighlightCid",null);$APP.T(a,"__xTraceHistorySubToken",null);NN(a,IP,null);return $APP.T(a,"__xTraceHistoryMounted",null)},$APP.Aj,function(){return null}],null);$APP.ha("baredom.exports.x_trace_history.init",TP);SP();export const init=TP;