ember-native-devtools 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (468) hide show
  1. package/bin/devtools.js +95 -0
  2. package/download/chrome-devtools-frontend.appspot.com/robots.txt/index.html +4 -0
  3. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/3d-center.svg +1 -0
  4. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/3d-pan.svg +1 -0
  5. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/3d-rotate.svg +1 -0
  6. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/Images.js +259 -0
  7. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-back.svg +1 -0
  8. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-bottom.png +0 -0
  9. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-front.svg +1 -0
  10. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-left.png +0 -0
  11. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-right.png +0 -0
  12. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-top.png +0 -0
  13. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/account-box.svg +1 -0
  14. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-center.svg +1 -0
  15. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-end.svg +1 -0
  16. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-space-around.svg +1 -0
  17. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-space-between.svg +1 -0
  18. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-space-evenly.svg +1 -0
  19. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-start.svg +1 -0
  20. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-stretch.svg +1 -0
  21. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-items-baseline.svg +1 -0
  22. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-items-center.svg +1 -0
  23. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-items-end.svg +1 -0
  24. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-items-start.svg +1 -0
  25. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-items-stretch.svg +1 -0
  26. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-self-center.svg +1 -0
  27. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-self-end.svg +1 -0
  28. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-self-start.svg +1 -0
  29. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-self-stretch.svg +1 -0
  30. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-back.svg +1 -0
  31. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-down.svg +1 -0
  32. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-drop-down-dark.svg +1 -0
  33. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-drop-down-light.svg +1 -0
  34. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-forward.svg +1 -0
  35. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-up-down-circle.svg +1 -0
  36. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-up-down.svg +1 -0
  37. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-up.svg +1 -0
  38. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bell.svg +1 -0
  39. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bezier-curve-filled.svg +1 -0
  40. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bin.svg +1 -0
  41. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bottom-panel-close.svg +1 -0
  42. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bottom-panel-open.svg +1 -0
  43. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/brackets.svg +1 -0
  44. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/breakpoint-circle.svg +1 -0
  45. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/breakpoint-crossed-filled.svg +1 -0
  46. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/breakpoint-crossed.svg +1 -0
  47. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/brush-filled.svg +1 -0
  48. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/brush.svg +1 -0
  49. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bug.svg +1 -0
  50. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bundle.svg +1 -0
  51. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/calendar-today.svg +1 -0
  52. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/check-circle.svg +1 -0
  53. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/check-double.svg +1 -0
  54. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/checker.svg +1 -0
  55. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/checkmark.svg +1 -0
  56. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-double-right.svg +1 -0
  57. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-down.svg +1 -0
  58. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-left-dot.svg +1 -0
  59. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-left.svg +1 -0
  60. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-right.svg +1 -0
  61. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-up.svg +1 -0
  62. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chromeLeft.avif +0 -0
  63. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chromeMiddle.avif +0 -0
  64. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chromeRight.avif +0 -0
  65. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/class.svg +1 -0
  66. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/clear-list.svg +1 -0
  67. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/clear.svg +1 -0
  68. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cloud.svg +1 -0
  69. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/code-circle.svg +1 -0
  70. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/code.svg +1 -0
  71. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/colon.svg +1 -0
  72. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/color-picker-filled.svg +1 -0
  73. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/color-picker.svg +1 -0
  74. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/console-conditional-breakpoint.svg +1 -0
  75. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/console-logpoint.svg +1 -0
  76. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cookie.svg +1 -0
  77. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/copy.svg +1 -0
  78. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/corporate-fare.svg +1 -0
  79. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/credit-card.svg +1 -0
  80. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cross-circle-filled.svg +1 -0
  81. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cross-circle.svg +1 -0
  82. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cross.svg +1 -0
  83. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cssoverview_icons_2x.avif +0 -0
  84. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/custom-typography.svg +1 -0
  85. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/database.svg +1 -0
  86. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/deployed.svg +1 -0
  87. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/device-fold.svg +1 -0
  88. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/devices.svg +1 -0
  89. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/devtools.svg +1 -0
  90. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dock-bottom.svg +1 -0
  91. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dock-left.svg +1 -0
  92. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dock-right.svg +1 -0
  93. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dock-window.svg +1 -0
  94. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/document.svg +1 -0
  95. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dog-paw.svg +1 -0
  96. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dots-horizontal.svg +1 -0
  97. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dots-vertical.svg +1 -0
  98. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/download.svg +1 -0
  99. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/edit.svg +1 -0
  100. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/empty.svg +1 -0
  101. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/errorWave.svg +1 -0
  102. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/exclamation.svg +1 -0
  103. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/experiment-check.svg +1 -0
  104. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/experiment.svg +1 -0
  105. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/extension.svg +1 -0
  106. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/eye.svg +1 -0
  107. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-document.svg +1 -0
  108. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-fetch-xhr.svg +1 -0
  109. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-font.svg +1 -0
  110. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-generic.svg +1 -0
  111. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-image.svg +1 -0
  112. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-json.svg +1 -0
  113. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-manifest.svg +1 -0
  114. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-media.svg +1 -0
  115. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-script.svg +1 -0
  116. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-snippet.svg +1 -0
  117. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-stylesheet.svg +1 -0
  118. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-wasm.svg +1 -0
  119. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-websocket.svg +1 -0
  120. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/filter-clear.svg +1 -0
  121. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/filter-filled.svg +1 -0
  122. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/filter.svg +1 -0
  123. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/flex-direction.svg +1 -0
  124. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/flex-no-wrap.svg +1 -0
  125. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/flex-wrap.svg +1 -0
  126. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/flow.svg +1 -0
  127. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/fold-more.svg +1 -0
  128. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/folder.svg +1 -0
  129. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/frame-crossed.svg +1 -0
  130. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/frame-icon.svg +1 -0
  131. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/frame.svg +1 -0
  132. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/gear-filled.svg +1 -0
  133. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/gear.svg +1 -0
  134. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/gears.svg +1 -0
  135. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/globe.svg +1 -0
  136. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/google.svg +1 -0
  137. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/goto-filled.svg +1 -0
  138. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/heap-snapshot.svg +1 -0
  139. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/heap-snapshots.svg +1 -0
  140. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/help.svg +1 -0
  141. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/hover.svg +1 -0
  142. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/iframe-crossed.svg +1 -0
  143. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/iframe.svg +1 -0
  144. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/import.svg +1 -0
  145. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/indeterminate-question-box.svg +1 -0
  146. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/info-filled.svg +1 -0
  147. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/info.svg +1 -0
  148. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/issue-cross-filled.svg +1 -0
  149. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/issue-exclamation-filled.svg +1 -0
  150. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/issue-questionmark-filled.svg +1 -0
  151. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/issue-text-filled.svg +1 -0
  152. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-center.svg +1 -0
  153. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-end.svg +1 -0
  154. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-space-around.svg +1 -0
  155. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-space-between.svg +1 -0
  156. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-space-evenly.svg +1 -0
  157. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-start.svg +1 -0
  158. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-items-center.svg +1 -0
  159. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-items-end.svg +1 -0
  160. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-items-start.svg +1 -0
  161. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-items-stretch.svg +1 -0
  162. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/keyboard-arrow-right.svg +1 -0
  163. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/keyboard-pen.svg +1 -0
  164. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/keyboard.svg +1 -0
  165. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/large-arrow-right-filled.svg +1 -0
  166. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/layers-filled.svg +1 -0
  167. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/layers.svg +1 -0
  168. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/left-panel-close.svg +1 -0
  169. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/left-panel-open.svg +1 -0
  170. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/lightbulb-spark.svg +1 -0
  171. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/lightbulb.svg +1 -0
  172. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/lighthouse_logo.svg +1 -0
  173. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/list.svg +1 -0
  174. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/location-on.svg +1 -0
  175. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/lock.svg +1 -0
  176. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/match-case.svg +1 -0
  177. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/match-whole-word.svg +1 -0
  178. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/memory.svg +1 -0
  179. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/minus.svg +1 -0
  180. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/mop.svg +1 -0
  181. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/mouse.svg +1 -0
  182. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/navigationControls.png +0 -0
  183. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/navigationControls_2x.png +0 -0
  184. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/network-settings.svg +1 -0
  185. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/nodeIcon.avif +0 -0
  186. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/open-externally.svg +1 -0
  187. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/pause.svg +1 -0
  188. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/pen-spark.svg +1 -0
  189. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/performance.svg +1 -0
  190. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/person.svg +1 -0
  191. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/play.svg +1 -0
  192. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/plus.svg +1 -0
  193. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/policy.svg +1 -0
  194. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/popoverArrows.png +0 -0
  195. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/popup.svg +1 -0
  196. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/preview_feature_video_thumbnail.svg +1 -0
  197. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/profile.svg +1 -0
  198. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/psychiatry.svg +1 -0
  199. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/record-start.svg +1 -0
  200. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/record-stop.svg +1 -0
  201. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/redo.svg +1 -0
  202. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/refresh.svg +1 -0
  203. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/regular-expression.svg +1 -0
  204. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/replace.svg +1 -0
  205. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/replay.svg +1 -0
  206. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/report.svg +1 -0
  207. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/resizeDiagonal.svg +1 -0
  208. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/resizeHorizontal.svg +1 -0
  209. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/resizeVertical.svg +1 -0
  210. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/resume.svg +1 -0
  211. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/review.svg +1 -0
  212. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/right-panel-close.svg +1 -0
  213. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/right-panel-open.svg +1 -0
  214. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/scissors.svg +1 -0
  215. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/screen-rotation.svg +1 -0
  216. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/search.svg +1 -0
  217. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/select-element.svg +1 -0
  218. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/send.svg +1 -0
  219. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/shadow.svg +1 -0
  220. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/small-status-dot.svg +1 -0
  221. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/snippet.svg +1 -0
  222. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/spark-info.svg +1 -0
  223. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/spark.svg +1 -0
  224. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/star.svg +1 -0
  225. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/step-into.svg +1 -0
  226. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/step-out.svg +1 -0
  227. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/step-over.svg +1 -0
  228. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/step.svg +1 -0
  229. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/stop.svg +1 -0
  230. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/symbol.svg +1 -0
  231. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/sync.svg +1 -0
  232. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/table.svg +1 -0
  233. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/thumb-down.svg +1 -0
  234. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/thumb-up.svg +1 -0
  235. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/toolbarResizerVertical.png +0 -0
  236. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/top-panel-close.svg +1 -0
  237. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/top-panel-open.svg +1 -0
  238. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/touch-app.svg +1 -0
  239. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/touchCursor.png +0 -0
  240. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/touchCursor_2x.png +0 -0
  241. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/triangle-bottom-right.svg +1 -0
  242. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/triangle-down.svg +1 -0
  243. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/triangle-left.svg +1 -0
  244. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/triangle-right.svg +1 -0
  245. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/triangle-up.svg +1 -0
  246. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/tune.svg +1 -0
  247. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/undo.svg +1 -0
  248. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/warning-filled.svg +1 -0
  249. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/warning.svg +1 -0
  250. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/watch.svg +1 -0
  251. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/whatsnew.avif +0 -0
  252. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/width.svg +1 -0
  253. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/zoom-in.svg +1 -0
  254. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/common/common.js +1 -0
  255. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/dom_extension/dom_extension.js +1 -0
  256. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/host/host.js +1 -0
  257. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/i18n/i18n.js +1 -0
  258. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/i18n/locales/en-US.json +1 -0
  259. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/platform/platform.js +1 -0
  260. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/protocol_client/protocol_client.js +1 -0
  261. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/root/root.js +1 -0
  262. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/sdk/sdk.js +1 -0
  263. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/devtools_app.html +18 -0
  264. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/devtools_compatibility.js +1774 -0
  265. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ember_app.html +26 -0
  266. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/devtools_app/devtools_app.js +1 -0
  267. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/formatter_worker/formatter_worker-entrypoint.js +1 -0
  268. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/formatter_worker/formatter_worker.js +1 -0
  269. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
  270. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
  271. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/inspector/inspector.js +1 -0
  272. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/inspector_main/inspector_main.js +1 -0
  273. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/lighthouse_worker/lighthouse_worker.js +1 -0
  274. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/main/main.js +1 -0
  275. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/shell/shell.js +1 -0
  276. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
  277. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/wasmparser_worker/wasmparser_worker.js +1 -0
  278. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/inspector.html +18 -0
  279. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/autofill_manager/autofill_manager.js +1 -0
  280. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/bindings/bindings.js +1 -0
  281. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/breakpoints/breakpoints.js +1 -0
  282. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/cpu_profile/cpu_profile.js +1 -0
  283. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/crux-manager/crux-manager.js +1 -0
  284. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/emulation/emulation.js +1 -0
  285. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/extensions/extensions.js +1 -0
  286. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/formatter/formatter.js +1 -0
  287. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/har/har.js +1 -0
  288. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/heap_snapshot_model/heap_snapshot_model.js +1 -0
  289. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/issues_manager/issues_manager.js +1 -0
  290. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/javascript_metadata/javascript_metadata.js +1 -0
  291. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/live-metrics/live-metrics.js +1 -0
  292. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/live-metrics/web-vitals-injected/spec/spec.js +1 -0
  293. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/live-metrics/web-vitals-injected/web-vitals-injected.generated.js +1 -0
  294. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/logs/logs.js +1 -0
  295. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/persistence/persistence.js +1 -0
  296. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/source_map_scopes/source_map_scopes.js +1 -0
  297. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/text_utils/text_utils.js +1 -0
  298. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/timeline_model/timeline_model.js +1 -0
  299. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/extras/extras.js +1 -0
  300. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/handlers/handlers.js +1 -0
  301. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/helpers/helpers.js +1 -0
  302. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/insights/insights.js +1 -0
  303. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/core/core.js +1 -0
  304. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/graph/graph.js +1 -0
  305. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/lantern.js +1 -0
  306. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/metrics/metrics.js +1 -0
  307. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/simulation/simulation.js +1 -0
  308. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/types/types.js +1 -0
  309. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/root-causes/root-causes.js +1 -0
  310. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/trace.js +1 -0
  311. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/types/types.js +1 -0
  312. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/workspace/workspace.js +1 -0
  313. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/workspace_diff/workspace_diff.js +1 -0
  314. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/accessibility/accessibility.js +1 -0
  315. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/animation/animation.js +1 -0
  316. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/application/application.js +41 -0
  317. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/application/components/components.js +614 -0
  318. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/application/preloading/components/components.js +292 -0
  319. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/application/preloading/helper/helper.js +1 -0
  320. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/autofill/autofill.js +88 -0
  321. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/browser_debugger/browser_debugger.js +1 -0
  322. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/changes/changes.js +1 -0
  323. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/console/console.js +6 -0
  324. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/console_counters/console_counters.js +1 -0
  325. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/coverage/coverage.js +1 -0
  326. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/css_overview/components/components.js +23 -0
  327. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/css_overview/css_overview.js +147 -0
  328. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/developer_resources/developer_resources.js +1 -0
  329. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/elements/components/components.js +272 -0
  330. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/elements/elements.js +8 -0
  331. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/emulation/components/components.js +39 -0
  332. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/emulation/emulation.js +1 -0
  333. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/event_listeners/event_listeners.js +1 -0
  334. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/explain/explain.js +203 -0
  335. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/freestyler/freestyler.js +177 -0
  336. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/issues/components/components.js +14 -0
  337. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/issues/issues.js +1 -0
  338. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/layer_viewer/layer_viewer.js +1 -0
  339. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/layers/layers.js +1 -0
  340. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/lighthouse/lighthouse.js +64 -0
  341. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/linear_memory_inspector/components/components.js +177 -0
  342. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/linear_memory_inspector/linear_memory_inspector.js +1 -0
  343. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/media/media.js +25 -0
  344. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/mobile_throttling/mobile_throttling.js +1 -0
  345. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/network/components/components.js +315 -0
  346. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/network/forward/forward.js +1 -0
  347. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/network/network.js +1 -0
  348. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/performance_monitor/performance_monitor.js +1 -0
  349. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/profiler/profiler.js +8 -0
  350. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/protocol_monitor/components/components.js +180 -0
  351. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/protocol_monitor/protocol_monitor.js +1 -0
  352. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/components/components.js +714 -0
  353. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/controllers/controllers.js +1 -0
  354. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/converters/converters.js +1 -0
  355. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/extensions/extensions.js +1 -0
  356. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/injected/injected.generated.js +1 -0
  357. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/models/models.js +1 -0
  358. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/recorder.js +120 -0
  359. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/util/util.js +1 -0
  360. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/screencast/screencast.js +1 -0
  361. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/search/search.js +1 -0
  362. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/security/security.js +1 -0
  363. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/sensors/sensors.js +1 -0
  364. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/settings/components/components.js +23 -0
  365. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/settings/emulation/components/components.js +222 -0
  366. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/settings/emulation/emulation.js +1 -0
  367. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/settings/emulation/utils/utils.js +1 -0
  368. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/settings/settings.js +130 -0
  369. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/snippets/snippets.js +1 -0
  370. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/sources/components/components.js +162 -0
  371. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/sources/sources.js +14 -0
  372. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/components/components.js +623 -0
  373. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/components/insights/insights.js +85 -0
  374. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/extensions/extensions.js +1 -0
  375. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/overlays/components/components.js +52 -0
  376. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/overlays/overlays.js +1 -0
  377. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/timeline.js +4 -0
  378. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/utils/utils.js +1 -0
  379. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/utils/utils.js +1 -0
  380. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/web_audio/graph_visualizer/graph_visualizer.js +1 -0
  381. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/web_audio/web_audio.js +23 -0
  382. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/webauthn/webauthn.js +6 -0
  383. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/services/puppeteer/puppeteer.js +1 -0
  384. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/services/trace_bounds/trace_bounds.js +1 -0
  385. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/services/tracing/tracing.js +1 -0
  386. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/services/window_bounds/window_bounds.js +1 -0
  387. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/setup-ember-extension.js +160 -0
  388. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/acorn/acorn.js +1 -0
  389. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/chromium/client-variations/client-variations.js +1 -0
  390. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/angular.js +2 -0
  391. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/codemirror.js +2 -0
  392. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/cpp.js +2 -0
  393. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/java.js +2 -0
  394. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/legacy.js +2 -0
  395. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/less.js +2 -0
  396. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/markdown.js +2 -0
  397. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/php.js +2 -0
  398. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/python.js +2 -0
  399. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/sass.js +2 -0
  400. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/svelte.js +2 -0
  401. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/vue.js +2 -0
  402. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/wast.js +2 -0
  403. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/xml.js +2 -0
  404. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/codemirror.next.js +2 -0
  405. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/csp_evaluator/csp_evaluator.js +194 -0
  406. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/diff/diff.js +1 -0
  407. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/i18n/i18n.js +1 -0
  408. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/intl-messageformat/intl-messageformat.js +15 -0
  409. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/lighthouse/lighthouse-dt-bundle.js +2137 -0
  410. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/lighthouse/report/report.js +39 -0
  411. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/lit/lit.js +110 -0
  412. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/marked/marked.js +1 -0
  413. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/puppeteer/debug/index.html +4 -0
  414. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/puppeteer/puppeteer.js +378 -0
  415. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/puppeteer-replay/lighthouse/index.html +4 -0
  416. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/puppeteer-replay/puppeteer/index.html +4 -0
  417. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/puppeteer-replay/puppeteer-replay.js +1 -0
  418. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/wasmparser/wasmparser.js +1 -0
  419. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/adorners/adorners.js +3 -0
  420. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/buttons/buttons.js +11 -0
  421. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/chrome_link/chrome_link.js +5 -0
  422. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/code_highlighter/code_highlighter.js +1 -0
  423. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/data_grid/data_grid.js +69 -0
  424. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/dialogs/dialogs.js +81 -0
  425. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/diff_view/diff_view.js +8 -0
  426. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/expandable_list/expandable_list.js +17 -0
  427. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/helpers/helpers.js +1 -0
  428. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/highlighting/highlighting.js +1 -0
  429. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/icon_button/icon_button.js +12 -0
  430. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/input/input.js +1 -0
  431. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/issue_counter/issue_counter.js +9 -0
  432. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/legacy_wrapper/legacy_wrapper.js +1 -0
  433. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/linkifier/linkifier.js +1 -0
  434. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/markdown_view/markdown_view.js +41 -0
  435. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/menus/menus.js +73 -0
  436. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/node_text/node_text.js +3 -0
  437. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/panel_feedback/panel_feedback.js +37 -0
  438. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/panel_introduction_steps/panel_introduction_steps.js +9 -0
  439. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/render_coordinator/render_coordinator.js +1 -0
  440. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/report_view/report_view.js +21 -0
  441. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/request_link_icon/request_link_icon.js +8 -0
  442. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/settings/settings.js +16 -0
  443. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/split_view/split_view.js +9 -0
  444. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/srgb_overlay/srgb_overlay.js +6 -0
  445. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/suggestion_input/suggestion_input.js +29 -0
  446. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/switch/switch.js +10 -0
  447. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/text_editor/text_editor.js +1 -0
  448. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/text_prompt/text_prompt.js +3 -0
  449. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/tree_outline/tree_outline.js +30 -0
  450. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/color_picker/color_picker.js +1 -0
  451. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/cookie_table/cookie_table.js +1 -0
  452. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/data_grid/data_grid.js +1 -0
  453. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/inline_editor/inline_editor.js +46 -0
  454. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/object_ui/object_ui.js +9 -0
  455. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/perf_ui/perf_ui.js +59 -0
  456. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/quick_open/quick_open.js +1 -0
  457. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/source_frame/source_frame.js +1 -0
  458. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/utils/utils.js +1 -0
  459. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/legacy.js +3 -0
  460. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/theme_support/theme_support.js +1 -0
  461. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/lit-html/lit-html.js +1 -0
  462. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/visual_logging/visual_logging.js +1 -0
  463. package/download/googlechrome.github.io/lighthouse/scorecalc/calc.js +838 -0
  464. package/download/googlechrome.github.io/lighthouse/scorecalc/index.html +78 -0
  465. package/download/googlechrome.github.io/lighthouse/scorecalc/style.css +554 -0
  466. package/download/wicg.github.io/attribution-reporting-api/validate-headers/index.html +104 -0
  467. package/download/wicg.github.io/attribution-reporting-api/validate-headers.js +1 -0
  468. package/package.json +31 -0
@@ -0,0 +1,6 @@
1
+ import*as t from"../../../core/common/common.js";import*as e from"../render_coordinator/render_coordinator.js";import*as o from"../../lit-html/lit-html.js";const r=new CSSStyleSheet;r.replaceSync(":host{position:absolute;left:0;top:0;width:100%;height:100%}.gamut-line{stroke:color-mix(in sRGB,var(--ref-palette-neutral100) 50%,transparent);fill:none}.label{position:absolute;bottom:3px;margin-right:5px;color:color-mix(in sRGB,var(--ref-palette-neutral100) 50%,transparent)}\n/*# sourceURL=srgbOverlay.css */\n");const n=e.RenderCoordinator.RenderCoordinator.instance();function s(e){const o=t.Color.hsva2rgba([...e,1]),r=t.ColorConverter.ColorConverter.displayP3ToXyzd50(o[0],o[1],o[2]);return t.ColorConverter.ColorConverter.xyzd50ToSrgb(r[0],r[1],r[2]).every((t=>t+.001>=0&&t-.001<=1))}class l extends HTMLElement{static litTagName=o.literal`devtools-spectrum-srgb-overlay`;#t=this.attachShadow({mode:"open"});constructor(){super(),this.#t.adoptedStyleSheets=[r]}#e({hue:t,width:e,height:o}){if(0===e||0===o)return null;const r=1/window.devicePixelRatio,n=[];let l=0;for(let i=0;i<o;i+=r){const a=1-i/o;for(;l<e;l+=r){if(!s([t,l/e,a])){n.push({x:l,y:i});break}}}if(0===n.length)return null;const i=n[n.length-1];return i.x<e&&n.push({y:i.y,x:e}),n}#o(t,e){let o=1/0,r=null;for(const n of t)Math.abs(e-n.y)<=o&&(o=Math.abs(e-n.y),r=n);return r}render({hue:t,width:e,height:r}){return n.write("Srgb Overlay render",(()=>{const n=this.#e({hue:t,width:e,height:r});if(!n||0===n.length)return;const s=this.#o(n,r-13);s&&o.render(o.html`
2
+ <span class="label" style="right: ${e-s.x}px">sRGB</span>
3
+ <svg>
4
+ <polyline points=${n.map((t=>`${t.x.toFixed(2)},${t.y.toFixed(2)}`)).join(" ")} class="gamut-line" />
5
+ </svg>
6
+ `,this.#t,{host:this})}))}}customElements.define("devtools-spectrum-srgb-overlay",l);var i=Object.freeze({__proto__:null,SrgbOverlay:l});export{i as SrgbOverlay};
@@ -0,0 +1,29 @@
1
+ import*as e from"../code_highlighter/code_highlighter.js";import*as t from"../../lit-html/lit-html.js";import*as o from"../../visual_logging/visual_logging.js";const s=new CSSStyleSheet;s.replaceSync(".token-variable{color:var(--sys-color-token-variable)}.token-property{color:var(--sys-color-token-property)}.token-type{color:var(--sys-color-token-type)}.token-variable-special{color:var(--sys-color-token-variable-special)}.token-definition{color:var(--sys-color-token-definition)}.token-builtin{color:var(--sys-color-token-builtin)}.token-number{color:var(--sys-color-token-number)}.token-string{color:var(--sys-color-token-string)}.token-string-special{color:var(--sys-color-token-string-special)}.token-atom{color:var(--sys-color-token-atom)}.token-keyword{color:var(--sys-color-token-keyword)}.token-comment{color:var(--sys-color-token-comment)}.token-meta{color:var(--sys-color-token-meta)}.token-invalid{color:var(--sys-color-error)}.token-tag{color:var(--sys-color-token-tag)}.token-attribute{color:var(--sys-color-token-attribute)}.token-attribute-value{color:var(--sys-color-token-attribute-value)}.token-inserted{color:var(--sys-color-token-inserted)}.token-deleted{color:var(--sys-color-token-deleted)}.token-heading{color:var(--sys-color-token-variable-special);font-weight:bold}.token-link{color:var(--sys-color-token-variable-special);text-decoration:underline}.token-strikethrough{text-decoration:strike-through}.token-strong{font-weight:bold}.token-emphasis{font-style:italic}\n/*# sourceURL=codeHighlighter.css */\n");const i=new CSSStyleSheet;i.replaceSync('*{box-sizing:border-box;font-size:inherit;margin:0;padding:0}:host{position:relative}devtools-editable-content{background:transparent;border:none;color:var(--override-color-recorder-input,var(--sys-color-on-surface));cursor:text;display:inline-block;line-height:18px;min-height:18px;min-width:0.5em;outline:none;overflow-wrap:anywhere}devtools-editable-content:hover,\ndevtools-editable-content:focus{box-shadow:0 0 0 1px var(--sys-color-divider);border-radius:2px}devtools-editable-content[placeholder]:empty::before{content:attr(placeholder);color:var(--sys-color-on-surface);opacity:50%}devtools-editable-content[placeholder]:empty:focus::before{content:""}devtools-suggestion-box{position:absolute;display:none}devtools-editable-content:focus ~ devtools-suggestion-box{display:block}.suggestions{background-color:var(--sys-color-cdt-base-container);box-shadow:var(--drop-shadow);min-height:1em;min-width:150px;overflow-x:hidden;overflow-y:auto;position:relative;z-index:100;max-height:350px}.suggestions > li{padding:1px;border:1px solid transparent;white-space:nowrap;font-family:var(--source-code-font-family);font-size:var(--source-code-font-size);color:var(--sys-color-on-surface)}.suggestions > li:hover{background-color:var(--sys-color-state-hover-on-subtle)}.suggestions > li.selected{background-color:var(--sys-color-primary);color:var(--sys-color-cdt-base-container)}.strikethrough{text-decoration:line-through}\n/*# sourceURL=suggestionInput.css */\n');var n=self&&self.__decorate||function(e,t,o,s){var i,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,s);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(r=(n<3?i(r):n>3?i(t,o,r):i(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r};function r(e,t="Assertion failed!"){if(!e)throw new Error(t)}const{html:l,Decorators:a,Directives:c,LitElement:h}=t,{customElement:d,property:u,state:g}=a,{classMap:p}=c,v={hasChanged:(e,t)=>JSON.stringify(e)!==JSON.stringify(t)};let y=class extends HTMLElement{static get observedAttributes(){return["disabled","placeholder"]}set disabled(e){this.contentEditable=String(!e)}get disabled(){return"true"!==this.contentEditable}set value(e){this.innerText=e,this.#e()}get value(){return this.innerText}set mimeType(e){this.#t=e,this.#e()}get mimeType(){return this.#t}#t="";constructor(){super(),this.contentEditable="true",this.tabIndex=0,this.addEventListener("focus",(()=>{this.innerHTML=this.innerText})),this.addEventListener("blur",this.#e.bind(this))}#e(){this.#t&&e.CodeHighlighter.highlightNode(this,this.#t)}attributeChangedCallback(e,t,o){if("disabled"===e)this.disabled=null!==o}};y=n([d("devtools-editable-content")],y);class b extends Event{static eventName="suggest";constructor(e){super(b.eventName),this.suggestion=e}}class m extends Event{static eventName="suggestioninit";listeners;constructor(e){super(m.eventName),this.listeners=e}}const k=(e,t)=>e.toLowerCase().startsWith(t.toLowerCase());let f=class extends h{static styles=[i];#o=[];constructor(){super(),this.options=[],this.expression="",this.cursor=0}#s=e=>{if(r(e instanceof KeyboardEvent,"Bound to the wrong event."),this.#o.length>0)switch(e.key){case"ArrowDown":e.stopPropagation(),e.preventDefault(),this.#i(1);break;case"ArrowUp":e.stopPropagation(),e.preventDefault(),this.#i(-1)}if("Enter"===e.key)this.#o[this.cursor]&&this.#n(this.#o[this.cursor]),e.preventDefault()};#i(e){var t,o;this.cursor=(t=this.cursor+e,o=this.#o.length,(t%o+o)%o)}#n(e){this.dispatchEvent(new b(e))}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new m([["keydown",this.#s]]))}willUpdate(e){e.has("options")&&(this.options=Object.freeze([...this.options].sort())),(e.has("expression")||e.has("options"))&&(this.cursor=0,this.#o=this.options.filter((e=>(this.suggestionFilter||k)(e,this.expression))))}render(){if(0!==this.#o.length)return l`<ul class="suggestions">
2
+ ${this.#o.map(((e,t)=>l`<li
3
+ class=${p({selected:t===this.cursor})}
4
+ @mousedown=${this.#n.bind(this,e)}
5
+ jslog=${o.item("suggestion").track({click:!0})}
6
+ >
7
+ ${e}
8
+ </li>`))}
9
+ </ul>`}};n([u(v)],f.prototype,"options",void 0),n([u()],f.prototype,"expression",void 0),n([u()],f.prototype,"suggestionFilter",void 0),n([g()],f.prototype,"cursor",void 0),f=n([d("devtools-suggestion-box")],f);let w=class extends h{static shadowRootOptions={...h.shadowRootOptions,delegatesFocus:!0};static styles=[i,s];constructor(){super(),this.options=[],this.expression="",this.placeholder="",this.value="",this.disabled=!1,this.strikethrough=!0,this.mimeType="",this.autocomplete=!0,this.addEventListener("blur",this.#r);let e=o.value().track({keydown:"ArrowUp|ArrowDown|Enter",change:!0,click:!0});this.jslogContext&&(e=e.context(this.jslogContext)),this.setAttribute("jslog",e.toString())}#l;get#a(){if(this.#l)return this.#l;const e=this.renderRoot.querySelector("devtools-editable-content");if(!e)throw new Error("Attempted to query node before rendering.");return this.#l=e,e}#r=()=>{window.getSelection()?.removeAllRanges(),this.value=this.#a.value,this.expression=this.#a.value};#c=e=>{r(e.target instanceof Node);const t=document.createRange();t.selectNodeContents(e.target);const o=window.getSelection();o.removeAllRanges(),o.addRange(t)};#s=e=>{"Enter"===e.key&&e.preventDefault()};#h=e=>{this.expression=e.target.value};#d=e=>{for(const[t,o]of e.listeners)this.addEventListener(t,o)};#u=e=>{this.#a.value=e.suggestion,setTimeout(this.blur.bind(this),0)};willUpdate(e){e.has("value")&&(this.expression=this.value)}render(){return l`<devtools-editable-content
10
+ ?disabled=${this.disabled}
11
+ class=${p({strikethrough:!this.strikethrough})}
12
+ .enterKeyHint=${"done"}
13
+ .value=${this.value}
14
+ .mimeType=${this.mimeType}
15
+ @focus=${this.#c}
16
+ @input=${this.#h}
17
+ @keydown=${this.#s}
18
+ autocapitalize="off"
19
+ inputmode="text"
20
+ placeholder=${this.placeholder}
21
+ spellcheck="false"
22
+ ></devtools-editable-content>
23
+ <devtools-suggestion-box
24
+ @suggestioninit=${this.#d}
25
+ @suggest=${this.#u}
26
+ .options=${this.options}
27
+ .suggestionFilter=${this.suggestionFilter}
28
+ .expression=${this.autocomplete?this.expression:""}
29
+ ></devtools-suggestion-box>`}};n([u(v)],w.prototype,"options",void 0),n([u()],w.prototype,"autocomplete",void 0),n([u()],w.prototype,"suggestionFilter",void 0),n([g()],w.prototype,"expression",void 0),n([u()],w.prototype,"placeholder",void 0),n([u()],w.prototype,"value",void 0),n([u({type:Boolean})],w.prototype,"disabled",void 0),n([u()],w.prototype,"strikethrough",void 0),n([u()],w.prototype,"mimeType",void 0),n([u()],w.prototype,"jslogContext",void 0),w=n([d("devtools-suggestion-input")],w);var x=Object.freeze({__proto__:null,get SuggestionInput(){return w}});export{x as SuggestionInput};
@@ -0,0 +1,10 @@
1
+ import*as e from"../../lit-html/lit-html.js";import*as s from"../../visual_logging/visual_logging.js";const t=new CSSStyleSheet;t.replaceSync(':host{position:relative;display:inline-block;width:26px;height:var(--sys-size-8)}input{opacity:0%;width:0;height:0}.slider{box-sizing:border-box;position:absolute;cursor:pointer;left:0;top:0;width:100%;height:100%;background-color:var(--sys-color-surface-variant);border:1px solid var(--sys-color-outline);border-radius:var(--sys-shape-corner-full);transition:background-color 80ms linear}.slider::before{position:absolute;content:"";height:var(--sys-size-5);width:var(--sys-size-5);border-radius:var(--sys-shape-corner-full);top:calc(50% - 4px);left:3px;background-color:var(--sys-color-outline);transition:transform 80ms linear,background-color 80ms linear,width 80ms linear,height 80ms linear,top 80ms linear,left 80ms linear}input:focus-visible + .slider{outline:2px solid var(--sys-color-state-focus-ring);outline-offset:2px}input:checked{& + .slider{background-color:var(--sys-color-primary);border:1px solid var(--sys-color-primary)}& + .slider::before{left:11px;height:var(--sys-size-6);width:var(--sys-size-6);top:calc(50% - 6px);background-color:var(--sys-color-on-primary)}}input:disabled:not(:checked){& + .slider{background-color:transparent;border-color:var(--sys-color-state-disabled)}& + .slider::before{background-color:var(--sys-color-state-disabled)}}input:disabled:checked{& + .slider{background-color:var(--sys-color-state-disabled-container);border-color:transparent}& + .slider::before{background-color:var(--sys-color-surface)}}\n/*# sourceURL=switch.css */\n');class o extends Event{checked;static eventName="switchchange";constructor(e){super(o.eventName),this.checked=e}}class r extends HTMLElement{static litTagName=e.literal`devtools-switch`;#e=this.attachShadow({mode:"open"});#s=!1;#t=!1;#o="";connectedCallback(){this.#e.adoptedStyleSheets=[t],this.#r()}set checked(e){this.#s=e,this.#r()}get checked(){return this.#s}set disabled(e){this.#t=e,this.#r()}get disabled(){return this.#t}get jslogContext(){return this.#o}set jslogContext(e){this.#o=e,this.#r()}#i=e=>{this.#s=e.target.checked,this.dispatchEvent(new o(this.#s))};#r(){const t=this.#o&&s.toggle(this.#o).track({change:!0});e.render(e.html`
2
+ <label role="button">
3
+ <input type="checkbox"
4
+ @change=${this.#i}
5
+ ?disabled=${this.#t}
6
+ .checked=${this.#s}
7
+ jslog=${t||e.nothing}>
8
+ <span class="slider" @click=${e=>e.stopPropagation()}></span>
9
+ </label>
10
+ `,this.#e,{host:this})}}customElements.define("devtools-switch",r);var i=Object.freeze({__proto__:null,SwitchChangeEvent:o,Switch:r});export{i as Switch};
@@ -0,0 +1 @@
1
+ import*as t from"../../../core/common/common.js";import*as e from"../../../core/i18n/i18n.js";import*as o from"../../../models/text_utils/text_utils.js";import*as n from"../../../services/window_bounds/window_bounds.js";import*as i from"../../../third_party/codemirror.next/codemirror.next.js";import*as r from"../../legacy/legacy.js";import*as s from"../../visual_logging/visual_logging.js";import*as a from"../code_highlighter/code_highlighter.js";import*as c from"../icon_button/icon_button.js";import*as l from"../../../core/sdk/sdk.js";import*as d from"../../../models/bindings/bindings.js";import*as u from"../../../models/javascript_metadata/javascript_metadata.js";import*as p from"../../../models/source_map_scopes/source_map_scopes.js";import*as m from"../../legacy/theme_support/theme_support.js";import*as h from"../../lit-html/lit-html.js";class f{static#t=300;#e;#o=[];#n=1;#i=!1;constructor(t){this.#e=t,this.#o=this.#e.get()}clear(){this.#o=[],this.#e.set([]),this.#n=1}length(){return this.#o.length}pushHistoryItem(t){this.#i&&(this.#o.pop(),this.#i=!1),this.#n=1,t!==this.#r()&&this.#o.push(t),this.#s()}#a(t){this.#i&&this.#o.pop(),this.#i=!0,this.#o.push(t)}previous(t){if(!(this.#n>this.#o.length))return 1===this.#n&&this.#a(t),++this.#n,this.#r()}next(){if(1!==this.#n)return--this.#n,this.#r()}matchingEntries(t,e=50){const o=new Set;for(let n=this.#o.length-1;n>=0&&o.size<e;--n){const e=this.#o[n];e.startsWith(t)&&o.add(e)}return o}#r(){return this.#o[this.#o.length-this.#n]}#s(){this.#e.set(this.#o.slice(-f.#t))}}var g=Object.freeze({__proto__:null,AutocompleteHistory:f});const y=i.EditorView.theme({"&.cm-editor":{color:"color: var(--sys-color-on-subtle)",cursor:"auto","&.cm-focused":{outline:"none"}},".cm-scroller":{lineHeight:"1.4em",fontFamily:"var(--source-code-font-family)",fontSize:"var(--source-code-font-size)"},".cm-content":{lineHeight:"1.4em"},".cm-panels":{backgroundColor:"var(--sys-color-cdt-base-container)"},".cm-panels-bottom":{borderTop:"1px solid var(--sys-color-divider)"},".cm-selectionMatch":{backgroundColor:"var(--sys-color-yellow-container)"},".cm-cursor":{borderLeft:"1px solid var(--sys-color-inverse-surface)"},"&.cm-readonly .cm-cursor":{display:"none"},".cm-cursor-secondary":{borderLeft:"1px solid var(--sys-color-neutral-outline)"},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"var(--sys-color-tonal-container)"},".cm-selectionBackground":{background:"var(--sys-color-neutral-container)"},".cm-gutters":{borderRight:"none",whiteSpace:"nowrap",backgroundColor:"var(--sys-color-cdt-base-container)"},".cm-gutters .cm-foldGutterElement":{cursor:"pointer",opacity:"0%",transition:"opacity 0.2s"},".cm-gutters .cm-foldGutterElement-folded, .cm-gutters:hover .cm-foldGutterElement":{opacity:"100%"},".cm-lineNumbers":{overflow:"visible",minWidth:"40px"},".cm-lineNumbers .cm-gutterElement":{color:"var(--sys-color-outline)",padding:"0 3px 0 9px"},".cm-foldPlaceholder":{background:"transparent",border:"none",color:"var(--sys-color-token-subtle)"},".cm-matchingBracket, .cm-nonmatchingBracket":{background:"transparent",borderBottom:"none"},"&:focus-within .cm-matchingBracket":{color:"inherit",backgroundColor:"var(--sys-color-surface-variant)",borderBottom:"1px solid var(--sys-color-outline)"},"&:focus-within .cm-nonmatchingBracket":{backgroundColor:"var(--sys-color-error-container)",borderBottom:"1px solid var(--sys-color-error)"},".cm-trailingWhitespace":{backgroundColor:"var(--sys-color-error-container)"},".cm-highlightedTab":{display:"inline-block",position:"relative","&:before":{content:'""',borderBottom:"1px solid var(--sys-color-token-subtle)",position:"absolute",left:"5%",bottom:"50%",width:"90%",pointerEvents:"none"}},".cm-highlightedSpaces:before":{color:"var(--sys-color-token-subtle)",content:"attr(data-display)",position:"absolute",pointerEvents:"none"},".cm-placeholder":{color:"var(--sys-color-token-subtle)"},".cm-completionHint":{color:"var(--sys-color-token-subtle)"},".cm-tooltip":{boxShadow:"var(--drop-shadow)",backgroundColor:"var(--sys-color-neutral-container)"},".cm-argumentHints":{pointerEvents:"none",padding:"0 4px",whiteSpace:"nowrap",lineHeight:"20px",marginBottom:"4px",width:"fit-content"},".cm-tooltip.cm-tooltip-autocomplete > ul":{backgroundColor:"var(--sys-color-cdt-base-container)",maxHeight:"25em",minWidth:"16em","& > li":{display:"flex",justifyContent:"space-between",border:"1px solid var(--sys-color-cdt-base-container)"},"& > li.cm-secondaryCompletion":{display:"flex",backgroundColor:"var(--sys-color-neutral-container)",borderColor:"var(--sys-color-neutral-container)",justifyContent:"space-between","&::before":{content:'">"',fontWeight:"bold",color:"var(--sys-color-primary-bright)",marginRight:"5px"}},"& > li:hover":{backgroundColor:"var(--sys-color-state-hover-on-subtle)"},"& > li[aria-selected]":{backgroundColor:"var(--sys-color-tonal-container)",borderColor:"var(--sys-color-tonal-container)","&, &.cm-secondaryCompletion::before":{color:"var(--sys-color-on-tonal-container)"},"&::after":{content:'"tab"',color:"var(--sys-color-primary-bright)",border:"1px solid var(--sys-color-primary-bright)",borderRadius:"2px",marginLeft:"5px",padding:"1px 3px",fontSize:"10px",lineHeight:"10px"}}},".cm-tooltip.cm-tooltip-autocomplete.cm-conservativeCompletion > ul > li[aria-selected]":{backgroundColor:"var(--sys-color-cdt-base-container)",border:"1px dotted var(--sys-color-on-surface)","&, &.cm-secondaryCompletion::before":{color:"var(--sys-color-on-surface)"},"&::after":{border:"1px solid var(--sys-color-neutral-outline)",color:"var(--sys-color-token-subtle)"}},".cm-completionMatchedText":{textDecoration:"none",fontWeight:"bold"},".cm-highlightedLine":{animation:"cm-fading-highlight 2s 0s"},"@keyframes cm-fading-highlight":{from:{backgroundColor:"var(--sys-color-yellow-container)"},to:{backgroundColor:"transparent"}}}),b={codeEditor:"Code editor",sSuggestionSOfS:"{PH1}, suggestion {PH2} of {PH3}"},v=e.i18n.registerUIStrings("ui/components/text_editor/config.ts",b),w=e.i18n.getLocalizedString.bind(void 0,v),x=[],S=i.Facet.define();class C{settingName;getExtension;compartment=new i.Compartment;constructor(t,e){this.settingName=t,this.getExtension=e}settingValue(){return t.Settings.Settings.instance().moduleSetting(this.settingName).get()}instance(){return[this.compartment.of(this.getExtension(this.settingValue())),S.of(this)]}sync(t,e){const o=this.compartment.get(t),n=this.getExtension(e);return o===n?null:this.compartment.reconfigure(n)}static bool(t,e,o=x){return new C(t,(t=>t?e:o))}static none=[]}const E=C.bool("text-editor-tab-moves-focus",[],i.keymap.of([{key:"Tab",run:t=>!!t.state.doc.length&&i.indentMore(t),shift:t=>!!t.state.doc.length&&i.indentLess(t)}])),k=i.StateEffect.define(),M=i.StateField.define({create:()=>!0,update:(t,e)=>"active"!==i.completionStatus(e.state)||(i.selectedCompletionIndex(e.startState)??0)===(i.selectedCompletionIndex(e.state)??0)&&!e.effects.some((t=>t.is(k)))&&t});function T(t){return!t.state.field(M,!1)&&i.acceptCompletion(t)}function D(t){const e=t.state.selection.main.head,o=t.state.doc.lineAt(e);return!!(e-o.from>=o.length)&&i.acceptCompletion(t)}function j(t,e="option"){return o=>{if("active"!==i.completionStatus(o.state))return!1;if(o.state.field(M,!1))return o.dispatch({effects:k.of(null)}),O(o),!0;const n=i.moveCompletionSelection(t,e)(o);return O(o),n}}function L(){return t=>"active"===i.completionStatus(t.state)&&(i.moveCompletionSelection(!1)(t),O(t),!0)}function O(t){const e=w(b.sSuggestionSOfS,{PH1:i.selectedCompletion(t.state)?.label||"",PH2:(i.selectedCompletionIndex(t.state)||0)+1,PH3:i.currentCompletions(t.state).length});r.ARIAUtils.alert(e)}const P=new C("text-editor-autocompletion",(t=>[i.autocompletion({activateOnTyping:t,icons:!1,optionClass:t=>"secondary"===t.type?"cm-secondaryCompletion":"",tooltipClass:t=>t.field(M,!1)?"cm-conservativeCompletion":"",defaultKeymap:!1,updateSyncTime:100}),i.Prec.highest(i.keymap.of([{key:"End",run:D},{key:"ArrowRight",run:D},{key:"Ctrl-Space",run:i.startCompletion},{key:"Escape",run:i.closeCompletion},{key:"ArrowDown",run:j(!0)},{key:"ArrowUp",run:L()},{mac:"Ctrl-n",run:j(!0)},{mac:"Ctrl-p",run:L()},{key:"PageDown",run:i.moveCompletionSelection(!0,"page")},{key:"PageUp",run:i.moveCompletionSelection(!1,"page")},{key:"Enter",run:T}]))])),_=C.bool("text-editor-bracket-matching",i.bracketMatching()),I=C.bool("text-editor-code-folding",[i.foldGutter({markerDOM(t){const e=t?"triangle-down":"triangle-right",o=new c.Icon.Icon;return o.setAttribute("class",t?"cm-foldGutterElement":"cm-foldGutterElement cm-foldGutterElement-folded"),o.setAttribute("jslog",`${s.expand().track({click:!0})}`),o.data={iconName:e,color:"var(--icon-fold-marker)",width:"14px",height:"14px"},o}}),i.keymap.of(i.foldKeymap)]),H=i.Prec.highest(i.indentUnit.compute([],(e=>{const n=e.doc.iterLines(1,Math.min(e.doc.lines+1,1e3));return o.TextUtils.detectIndentation(n)??t.Settings.Settings.instance().moduleSetting("text-editor-indent").get()}))),N=C.bool("text-editor-auto-detect-indent",H);function A(t){return i.ViewPlugin.define((e=>({decorations:t.createDeco(e),update(e){this.decorations=t.updateDeco(e,this.decorations)}})),{decorations:t=>t.decorations})}const B=new Map;const R=A(new i.MatchDecorator({regexp:/\t| +/g,decoration:t=>function(t){const e=B.get(t);if(e)return e;const o=i.Decoration.mark({attributes:"\t"===t?{class:"cm-highlightedTab"}:{class:"cm-highlightedSpaces","data-display":"·".repeat(t.length)}});return B.set(t,o),o}(t[0]),boundary:/\S/})),z=A(new i.MatchDecorator({regexp:/\s+$/g,decoration:i.Decoration.mark({class:"cm-trailingWhitespace"}),boundary:/\S/})),F=new C("show-whitespaces-in-editor",(t=>"all"===t?R:"trailing"===t?z:x)),W=C.bool("allow-scroll-past-eof",i.scrollPastEnd()),V=Object.create(null);const $=new C("text-editor-indent",(function(t){let e=V[t];return e||(e=V[t]=i.indentUnit.of(t)),e})),U=C.bool("dom-word-wrap",i.EditorView.lineWrapping);function G(t){return/\r\n/.test(t)&&!/(^|[^\r])\n/.test(t)?i.EditorState.lineSeparator.of("\r\n"):[]}const K=i.keymap.of([{key:"Tab",run:i.acceptCompletion},{key:"Ctrl-m",run:i.cursorMatchingBracket,shift:i.selectMatchingBracket},{key:"Mod-/",run:i.toggleComment},{key:"Mod-d",run:i.selectNextOccurrence},{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:i.cursorSyntaxLeft,shift:i.selectSyntaxLeft},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:i.cursorSyntaxRight,shift:i.selectSyntaxRight},{key:"Ctrl-ArrowLeft",mac:"Alt-ArrowLeft",run:i.cursorGroupLeft,shift:i.selectGroupLeft},{key:"Ctrl-ArrowRight",mac:"Alt-ArrowRight",run:i.cursorGroupRight,shift:i.selectGroupRight},...i.standardKeymap,...i.historyKeymap]);function J(){const e=t.Settings.Settings.instance().moduleSetting("ui-theme").get();return"systemPreferred"===e?window.matchMedia("(prefers-color-scheme: dark)").matches:"dark"===e}const q=i.EditorView.theme({},{dark:!0}),Q=new i.Compartment;function X(){return[y,J()?Q.of(q):Q.of([])]}let Y=null;function Z(){return Y||(Y=n.WindowBoundsService.WindowBoundsServiceImpl.instance().getDevToolsBoundingElement()),Y.getBoundingClientRect()}function tt(t){return[X(),i.highlightSpecialChars(),i.highlightSelectionMatches(),i.history(),i.drawSelection(),i.EditorState.allowMultipleSelections.of(!0),i.indentOnInput(),i.syntaxHighlighting(a.CodeHighlighter.highlightStyle),K,i.EditorView.clickAddsSelectionRange.of((t=>t.altKey||t.ctrlKey)),E.instance(),_.instance(),$.instance(),i.Prec.lowest(i.EditorView.contentAttributes.of({"aria-label":w(b.codeEditor)})),t instanceof i.Text?[]:G(t),i.tooltips({parent:nt(),tooltipSpace:Z}),i.bidiIsolates()]}const et=C.bool("text-editor-bracket-closing",[i.html.autoCloseTags,i.closeBrackets(),i.keymap.of(i.closeBracketsKeymap)]);let ot=null;function nt(){if(!ot){const t=i.EditorState.create({extensions:[y,J()?q:[],i.syntaxHighlighting(a.CodeHighlighter.highlightStyle),i.showTooltip.of({pos:0,create:()=>({dom:document.createElement("div")})})]}).facet(i.EditorView.styleModule),e=document.body.appendChild(document.createElement("div"));e.className="editor-tooltip-host",ot=e.attachShadow({mode:"open"}),i.StyleModule.mount(ot,t)}return ot}class it extends i.WidgetType{text;constructor(t){super(),this.text=t}eq(t){return this.text===t.text}toDOM(){const t=document.createElement("span");return t.className="cm-completionHint",t.textContent=this.text,t}}const rt=i.ViewPlugin.fromClass(class{decorations=i.Decoration.none;currentHint=null;update(t){const e=this.currentHint=this.topCompletion(t.state);!e||t.state.field(M,!1)?this.decorations=i.Decoration.none:this.decorations=i.Decoration.set([i.Decoration.widget({widget:new it(e),side:1}).range(t.state.selection.main.head)])}topCompletion(t){const e=i.selectedCompletion(t);if(!e)return null;let{label:o,apply:n}=e;if("string"==typeof n&&(o=n,n=void 0),n||o.length>100||o.indexOf("\n")>-1||"secondary"===e.type)return null;const r=t.selection.main.head,s=t.doc.lineAt(r);if(r!==s.to)return null;const a=("'"===o[0]?/'(\\.|[^'\\])*$/:'"'===o[0]?/"(\\.|[^"\\])*$/:/#?[\w$]+$/).exec(s.text);return a&&!o.startsWith(a[0])?null:o.slice(a?a[0].length:0)}},{decorations:t=>t.decorations});var st=Object.freeze({__proto__:null,dynamicSetting:S,DynamicSetting:C,tabMovesFocus:E,conservativeCompletion:M,autocompletion:P,bracketMatching:_,codeFolding:I,autoDetectIndent:N,showWhitespace:F,allowScrollPastEof:W,indentUnit:$,domWordWrap:U,dummyDarkTheme:q,themeSelection:Q,theme:X,baseConfiguration:tt,closeBrackets:et,showCompletionHint:rt,contentIncludingHint:function(t){const e=t.plugin(rt);let o=t.state.doc.toString();if(e&&e.currentHint){const{head:n}=t.state.selection.main;o=o.slice(0,n)+e.currentHint+o.slice(n)}return o}});const at=i.StateEffect.define(),ct=i.StateEffect.define();var lt=Object.freeze({__proto__:null,setHighlightedPosition:at,clearHighlightedPosition:ct,positionHighlighter:function(t,e){const o=i.Decoration.line({attributes:{class:t}}),n=i.Decoration.mark({attributes:{class:e}}),r=i.StateField.define({create:()=>null,update(t,e){t&&(t=e.changes.mapPos(t,-1,i.MapMode.TrackDel));for(const o of e.effects)o.is(ct)?t=null:o.is(at)&&(t=Math.max(0,Math.min(o.value,e.newDoc.length-1)));return t}});function s(t){return t.field(r)}return[r,i.ViewPlugin.fromClass(class{tree;decorations;constructor({state:t}){this.tree=i.syntaxTree(t),this.decorations=this.#c(t,s(t))}update(t){const e=i.syntaxTree(t.state),o=s(t.state),n=o!==s(t.startState);e.length!==this.tree.length||n?(this.tree=e,this.decorations=this.#c(t.state,o)):this.decorations=this.decorations.map(t.changes)}#c(t,e){const r=new i.RangeSetBuilder;if(null!==e){const{doc:s}=t,a=s.lineAt(e);r.add(a.from,a.from,o);const c=i.syntaxTree(t).resolveInner(e,1),l=Math.min(a.to,c.to);l>e&&r.add(e,l,n)}return r.finish()}},{decorations:({decorations:t})=>t})]}});const dt=i.StateEffect.define();class ut{completions;seen;constructor(t=[],e=new Set){this.completions=t,this.seen=e}add(t){this.seen.has(t.label)||(this.seen.add(t.label),this.completions.push(t))}copy(){return new ut(this.completions.slice(),new Set(this.seen))}}const pt=["async","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","function","if","import","in","instanceof","let","new","null","of","return","static","super","switch","this","throw","true","try","typeof","var","void","while","with","yield"],mt=["clear","copy","debug","dir","dirxml","getEventListeners","inspect","keys","monitor","monitorEvents","profile","profileEnd","queryObjects","table","undebug","unmonitor","unmonitorEvents","values"],ht=["$","$$","$x","$0","$_"],ft=new ut;for(const t of pt)ft.add({label:t,type:"keyword"});for(const t of mt)ft.add({label:t,type:"function"});for(const t of ht)ft.add({label:t,type:"variable"});const gt=new Set(["TemplateString","LineComment","BlockComment","TypeDefinition","VariableDefinition","PropertyDefinition","TypeName"]);function yt(t,e,o){let n=t.resolveInner(e,-1);const i=n.parent;if(gt.has(n.name))return null;if("PropertyName"===n.name||"PrivatePropertyName"===n.name)return"MemberExpression"!==i?.name?null:{type:1,from:n.from,relatedNode:i};if("VariableName"===n.name||!n.firstChild&&n.to-n.from<20&&!/[^a-z]/.test(o.sliceString(n.from,n.to)))return{type:0,from:n.from};if("String"===n.name){const t=n.parent;return"MemberExpression"===t?.name&&"["===t.childBefore(n.from)?.name?{type:2,from:n.from,relatedNode:t}:null}if(n=n.enterUnfinishedNodesBefore(e),n.to===e&&"MemberExpression"===n.parent?.name&&(n=n.parent),"MemberExpression"===n.name){const t=n.childBefore(Math.min(e,n.to));if("["===t?.name)return{type:2,relatedNode:n};if("."===t?.name||"?."===t?.name)return{type:1,relatedNode:n}}if("("===n.name&&"ArgList"===i?.name&&"CallExpression"===i?.parent?.name){const t=i?.parent?.firstChild;if("MemberExpression"===t?.name){const e=t?.lastChild;if(e&&"get"===o.sliceString(e.from,e.to)){const e=t?.firstChild;return{type:3,relatedNode:e||void 0}}}}return{type:0}}async function bt(t){const e=yt(i.syntaxTree(t.state),t.pos,t.state.doc);if(!e||void 0===e.from&&!t.explicit&&0===e.type)return null;const o=St()?.debuggerModel.selectedCallFrame()?.script;if(o&&d.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().pluginManager.hasPluginForScript(o))return null;let n,r;if(0===e.type){const[t,e]=await Promise.all([Dt(),jt()]);if(t.completions.length){n=t;for(const t of e.completions)n.add(t)}else n=e}else if(1===e.type||2===e.type){const o=e.relatedNode.getChild("Expression");if(2===e.type&&(r=void 0===e.from?"'":t.state.sliceDoc(e.from,e.from+1)),!o)return null;n=await async function(t,e,o=!1){const n=Mt.instance();if(!e){const e=n.get(t);if(e)return e}const i=St();if(!i)return new ut;const r=Tt(t,i,e,o);e||n.set(t,r);return r}(t.state.sliceDoc(o.from,o.to),r,"]"===t.state.sliceDoc(t.pos,t.pos+1))}else{if(3!==e.type)return null;{const o=e.relatedNode;if(!o)return null;n=await async function(t){const e=new ut,o=St();if(!o)return e;const n=await Ct(o,`[...Map.prototype.keys.call(${t})]`,"completion");if(!n)return e;const i=l.RemoteObject.RemoteArray.objectAsArray(n),r=i.length();for(let t=0;t<r;t++)e.add({label:`"${(await i.at(t)).value}")`,type:"constant",boost:-1*t});return e}(t.state.sliceDoc(o.from,o.to))}}return{from:e.from??t.pos,options:n.completions,validFor:r?"'"===r?wt:xt:vt}}const vt=/^#?(?:[$_\p{ID_Start}])(?:[$_\u200C\u200D\p{ID_Continue}])*$/u,wt=/^\'(\\.|[^\\'\n])*'?$/,xt=/^"(\\.|[^\\"\n])*"?$/;function St(){return r.Context.Context.instance().flavor(l.RuntimeModel.ExecutionContext)}async function Ct(t,e,o){const n=await t.evaluate({expression:e,objectGroup:o,includeCommandLineAPI:!0,silent:!0,returnByValue:!1,generatePreview:!1,throwOnSideEffect:!0,timeout:500,replMode:!0},!1,!1);return"error"in n||n.exceptionDetails||!n.object?null:n.object}const Et=new Map([["string","String"],["symbol","Symbol"],["number","Number"],["boolean","Boolean"],["bigint","BigInt"]]);let kt=null;class Mt{#l=new Map;constructor(){const t=()=>this.#l.clear();l.TargetManager.TargetManager.instance().addModelListener(l.ConsoleModel.ConsoleModel,l.ConsoleModel.Events.CommandEvaluated,t),r.Context.Context.instance().addFlavorChangeListener(l.RuntimeModel.ExecutionContext,t),l.TargetManager.TargetManager.instance().addModelListener(l.DebuggerModel.DebuggerModel,l.DebuggerModel.Events.DebuggerResumed,t),l.TargetManager.TargetManager.instance().addModelListener(l.DebuggerModel.DebuggerModel,l.DebuggerModel.Events.DebuggerPaused,t)}get(t){return this.#l.get(t)}set(t,e){this.#l.set(t,e),window.setTimeout((()=>{this.#l.get(t)===e&&this.#l.delete(t)}),3e4)}static instance(){return kt||(kt=new Mt),kt}}async function Tt(t,e,o,n=!1){const i=new ut;if(!e)return i;let r=await Ct(e,t,"completion");if(!r)return i;for(;"object"===r.type&&"proxy"===r.subtype;){const t=await r.getOwnProperties(!1),e=t.internalProperties?.find((t=>"[[Target]]"===t.name))?.value;if(!e)break;r=e}const s=Et.get(r.type);s&&(r=await Ct(e,s+".prototype","completion"));const a="globalThis"===t?"function":"method",c="globalThis"===t?"variable":"property";if(r&&("object"===r.type||"function"===r.type)){const t=await r.getAllProperties(!1,!1,!0),e="function"===r.type;for(const r of t.properties||[])if(!r.symbol&&(!e||"arguments"!==r.name&&"caller"!==r.name)&&(o||vt.test(r.name))){const t=o?o+r.name.replaceAll("\\","\\\\").replaceAll(o,"\\"+o)+o:r.name,e=o&&!n?`${t}]`:void 0,s=2*Number(r.isOwn)+1*Number(r.enumerable),l="function"===r.value?.type?a:c;i.add({apply:e,label:t,type:l,boost:s})}}return e.runtimeModel.releaseObjectGroup("completion"),i}async function Dt(){const t=new ut,e=St()?.debuggerModel.selectedCallFrame();if(!e)return t;const o=await Promise.all(e.scopeChain().map((t=>p.NamesResolver.resolveScopeInObject(t).getAllProperties(!1,!1))));for(const e of o)for(const o of e.properties||[])t.add({label:o.name,type:"function"===o.value?.type?"function":"variable"});return t}async function jt(){const t=Mt.instance(),e=t.get("");if(e)return e;const o=St();if(!o)return ft;const n=ft.copy(),i=Tt("globalThis",o).then((t=>o.globalLexicalScopeNames().then((e=>{for(const e of t.completions)n.add(e);for(const t of e||[])n.add({label:t,type:"variable"});return n}))));return t.set("",i),i}async function Lt(t,e){const o=i.syntaxTree(t).resolveInner(e).enterUnfinishedNodesBefore(e);if("ArgList"!==o.name)return null;const n=o.parent?.getChild("Expression");if(!n)return null;const r=await async function(t,e){const o=St();if(!o)return null;const n=e.sliceString(t.from,t.to),i=await Ct(o,n,"argumentsHint");if(!i||"function"!==i.type)return null;const r=async()=>{const n=t.firstChild;return n&&"MemberExpression"===t.name?Ct(o,e.sliceString(n.from,n.to),"argumentsHint"):null};return Pt(i,r,n).finally((()=>o.runtimeModel.releaseObjectGroup("argumentsHint")))}(n,t.doc);if(!r)return null;let s=0;for(let t=e;;){const e=o.childBefore(t);if(!e)break;e.type.is("Expression")&&s++,t=e.from}return()=>function(t,e){const o=document.createElement("div");o.className="cm-argumentHints";for(const n of t){const t=document.createElement("span");for(let o=0;o<n.length;o++){if(o===e||o<e&&n[o].startsWith("...")){t.appendChild(document.createElement("b")).appendChild(document.createTextNode(n[o]))}else t.appendChild(document.createTextNode(n[o]));o<n.length-1&&t.appendChild(document.createTextNode(", "))}const i=o.appendChild(document.createElement("div"));i.className="source-code",i.appendChild(document.createTextNode("ƒ(")),i.appendChild(t),i.appendChild(document.createTextNode(")"))}return{dom:o}}(r,s)}function Ot(t){function e(e){for(;"ParamList"!==e.name&&e.nextSibling(););const o=[];if("ParamList"===e.name&&e.firstChild()){let n="";do{switch(e.name){case"ArrayPattern":o.push(n+"arr"),n="";break;case"ObjectPattern":o.push(n+"obj"),n="";break;case"VariableDefinition":o.push(n+t.slice(e.from,e.to)),n="";break;case"Spread":n="..."}}while(e.nextSibling())}return o}try{try{const{parser:o}=i.javascript.javascriptLanguage.configure({strict:!0,top:"SingleClassItem"}),n=o.parse(t).cursor();if(n.firstChild()&&"MethodDeclaration"===n.name&&n.firstChild())return e(n);throw new Error("SingleClassItem rule is expected to have exactly one MethodDeclaration child")}catch{const{parser:o}=i.javascript.javascriptLanguage.configure({strict:!0,top:"SingleExpression"}),n=o.parse(t).cursor();if(!n.firstChild())throw new Error("SingleExpression rule is expected to have children");switch(n.name){case"ArrowFunction":case"FunctionExpression":if(!n.firstChild())throw new Error(`${n.name} rule is expected to have children`);return e(n);case"ClassExpression":if(!n.firstChild())throw new Error(`${n.name} rule is expected to have children`);for(;n.nextSibling()&&"ClassBody"!==n.name;);if("ClassBody"===n.name&&n.firstChild())do{if("MethodDeclaration"===n.name&&n.firstChild()){if("PropertyDefinition"===n.name&&"constructor"===t.slice(n.from,n.to))return e(n);n.parent()}}while(n.nextSibling());return[]}throw new Error("Unexpected expression")}}catch(e){throw new Error(`Failed to parse for arguments list: ${t}`,{cause:e})}}async function Pt(t,e,o){const n=t.description;if(!n)return null;if(!n.endsWith("{ [native code] }"))return[Ot(n)];if("function () { [native code] }"===n){const e=await async function(t){const{internalProperties:e}=await t.getOwnProperties(!1);if(!e)return null;const o=e.find((t=>"[[TargetFunction]]"===t.name))?.value,n=e.find((t=>"[[BoundArgs]]"===t.name))?.value,i=e.find((t=>"[[BoundThis]]"===t.name))?.value;if(!i||!o||!n)return null;const r=await Pt(o,(()=>Promise.resolve(i))),s=l.RemoteObject.RemoteObject.arrayLength(n);if(!r)return null;return r.map((t=>{const e=t.findIndex((t=>t.startsWith("...")));return e>-1&&e<s?t.slice(e):t.slice(s)}))}(t);if(e)return e}const i=u.JavaScriptMetadata.JavaScriptMetadataImpl.instance(),r=/^function ([^(]*)\(/.exec(n),s=r&&r[1]||o;if(!s)return null;const a=i.signaturesForNativeFunction(s);if(a)return a;const c=await e();if(!c)return null;const d=c.className;if(d){const t=i.signaturesForInstanceMethod(s,d);if(t)return t}if(c.description&&"function"===c.type&&c.description.endsWith("{ [native code] }")){const t=/^function ([^(]*)\(/.exec(c.description);if(t){const e=t[1],o=i.signaturesForStaticMethod(s,e);if(o)return o}}for(const t of await async function(t){if("number"===t.type)return["Number","Object"];if("string"===t.type)return["String","Object"];if("symbol"===t.type)return["Symbol","Object"];if("bigint"===t.type)return["BigInt","Object"];if("boolean"===t.type)return["Boolean","Object"];if("undefined"===t.type||"null"===t.subtype)return[];return await t.callFunctionJSON((function(){const t=[];for(let e=this;e;e=Object.getPrototypeOf(e))"object"==typeof e&&e.constructor&&e.constructor.name&&(t[t.length]=e.constructor.name);return t}),[])}(c)){const e=i.signaturesForInstanceMethod(s,t);if(e)return e}return null}var _t=Object.freeze({__proto__:null,completion:function(){return i.javascript.javascriptLanguage.data.of({autocomplete:bt})},completeInContext:async function(t,e,o=!1){const n=i.EditorState.create({doc:t+e,selection:{anchor:t.length},extensions:i.javascript.javascriptLanguage}),r=await bt(new i.CompletionContext(n,n.doc.length,o));return r?r.options.filter((t=>t.label.startsWith(e))).map((t=>({text:t.label,priority:100+(t.boost||0),isSecondary:"secondary"===t.type}))):[]},getQueryType:yt,javascriptCompletionSource:bt,isExpressionComplete:async function(t){const e=r.Context.Context.instance().flavor(l.RuntimeModel.ExecutionContext);if(!e)return!0;const o=await e.runtimeModel.compileScript(t,"",!1,e.id);if(!o||!o.exceptionDetails||!o.exceptionDetails.exception)return!0;const n=o.exceptionDetails.exception.description;return!!n&&(!n.startsWith("SyntaxError: Unexpected end of input")&&!n.startsWith("SyntaxError: Unterminated template literal"))},argumentHints:function(){return function(t){const e=i.StateEffect.define();return[i.StateField.define({create:()=>null,update(t,o){if(o.selection&&(t=null),t&&!o.changes.empty){const e=o.changes.mapPos(t.pos,-1,i.MapMode.TrackDel);t=null===e?null:{pos:e,create:t.create,above:!0}}for(const n of o.effects)n.is(e)?t={pos:o.state.selection.main.from,create:n.value,above:!0}:n.is(dt)&&(t=null);return t},provide:t=>i.showTooltip.from(t)}),i.ViewPlugin.fromClass(class{pending=-1;updateID=0;update(t){this.updateID++,t.transactions.some((t=>t.selection))&&t.state.selection.main.empty&&this.#d(t.view)}#d(t){this.pending>-1&&clearTimeout(this.pending),this.pending=window.setTimeout((()=>this.#u(t)),50)}#u(o){this.pending=-1;const{main:n}=o.state.selection;if(n.empty){const{updateID:i}=this;t(o.state,n.from).then((t=>{this.updateID!==i?this.pending<0&&this.#d(o):t?o.dispatch({effects:e.of(t)}):o.dispatch({effects:dt.of(null)})}))}}})]}(Lt)},closeArgumentsHintsTooltip:function(t,e){return null!==t.state.field(e)&&(t.dispatch({effects:dt.of(null)}),!0)},argumentsList:Ot});function It(t,{lineNumber:e,columnNumber:o}){const n=t.line(Math.max(1,Math.min(t.lines,e+1)));return Math.max(n.from,Math.min(n.to,n.from+o))}function Ht(t,e){e=Math.max(0,Math.min(e,t.length));const o=t.lineAt(e);return{lineNumber:o.number-1,columnNumber:e-o.from}}var Nt=Object.freeze({__proto__:null,toOffset:It,toLineColumn:Ht});class At extends HTMLElement{static litTagName=h.literal`devtools-text-editor`;#p=this.attachShadow({mode:"open"});#m=void 0;#h=C.none;#f=[];#g;#y;#b=-1;#v=()=>{this.#b<0&&(this.#b=window.setTimeout((()=>{this.#b=-1,this.#m&&i.repositionTooltips(this.#m)}),50))};#w=new ResizeObserver(this.#v);constructor(t){super(),this.#g=t,this.#p.adoptedStyleSheets=[a.Style.default]}#x(){return this.#m=new i.EditorView({state:this.state,parent:this.#p,root:this.#p,dispatch:(t,e)=>{e.update([t]),this.#S(t),t.reconfigured&&this.#C()},scrollTo:this.#y}),this.#m.scrollDOM.addEventListener("scroll",(()=>{this.#m&&(this.#y=this.#m.scrollSnapshot(),this.scrollEventHandledToSaveScrollPositionForTest())})),this.#C(),this.#E(),m.ThemeSupport.instance().addEventListener(m.ThemeChangeEvent.eventName,(()=>{const t="dark"===m.ThemeSupport.instance().themeName()?q:[];this.editor.dispatch({effects:Q.reconfigure(t)})})),this.#m}get editor(){return this.#m||this.#x()}dispatch(t){return this.editor.dispatch(t)}get state(){return this.#m?this.#m.state:(this.#g||(this.#g=i.EditorState.create({extensions:tt("")})),this.#g)}set state(t){this.#g!==t&&(this.#g=t,this.#m&&(this.#m.setState(t),this.#C()))}scrollEventHandledToSaveScrollPositionForTest(){}connectedCallback(){this.#m?this.#m.dispatch({effects:this.#y}):this.#x()}disconnectedCallback(){this.#m&&(this.#m.dispatch({effects:Bt.of(null)}),this.#g=this.#m.state,this.#w.disconnect(),window.removeEventListener("resize",this.#v),this.#m.destroy(),this.#m=void 0,this.#C())}focus(){this.#m&&this.#m.focus()}#C(){const e=this.#m?this.#m.state.facet(S):C.none;if(e===this.#h)return;this.#h=e;for(const[t,e]of this.#f)t.removeChangeListener(e);this.#f=[];const o=t.Settings.Settings.instance();for(const t of e){const e=({data:e})=>{const o=t.sync(this.state,e);o&&this.#m&&this.#m.dispatch({effects:o})},n=o.moduleSetting(t.settingName);n.addChangeListener(e),this.#f.push([n,e])}}#E(){const t=n.WindowBoundsService.WindowBoundsServiceImpl.instance().getDevToolsBoundingElement();t&&this.#w.observe(t),window.addEventListener("resize",this.#v)}#S(t){const e=t.annotation(i.Transaction.userEvent),o=e?Ft.get(e):null;o&&this.dispatchEvent(new InputEvent("input",{inputType:o}))}revealPosition(t,e=!0){const o=this.#m;if(!o)return;const n=o.state.doc.lineAt(t.main.head),r=[];e&&(o.state.field(zt,!1)?o.dispatch({effects:Bt.of(null)}):o.dispatch({effects:i.StateEffect.appendConfig.of(zt)}),r.push(Rt.of(n.from)));const s=o.scrollDOM.getBoundingClientRect(),a=o.coordsAtPos(t.main.head);t.main.empty?!a||a.top<s.top||a.bottom>s.bottom?r.push(i.EditorView.scrollIntoView(t.main,{y:"center"})):(a.left<s.left||a.right>s.right)&&r.push(i.EditorView.scrollIntoView(t.main,{x:"center"})):r.push(i.EditorView.scrollIntoView(t.main)),o.dispatch({selection:t,effects:r,userEvent:"select.reveal"})}createSelection(t,e){const{doc:o}=this.state,n=It(o,t);return i.EditorSelection.single(e?It(o,e):n,n)}toLineColumn(t){return Ht(this.state.doc,t)}toOffset(t){return It(this.state.doc,t)}}customElements.define("devtools-text-editor",At);const Bt=i.StateEffect.define(),Rt=i.StateEffect.define(),zt=i.StateField.define({create:()=>i.Decoration.none,update(t,e){!e.changes.empty&&t.size&&(t=t.map(e.changes));for(const o of e.effects)o.is(Bt)?t=i.Decoration.none:o.is(Rt)&&(t=i.Decoration.set([i.Decoration.line({attributes:{class:"cm-highlightedLine"}}).range(o.value)]));return t},provide:t=>i.EditorView.decorations.from(t,(t=>t))}),Ft=new Map([["input.type","insertText"],["input.type.compose","insertCompositionText"],["input.paste","insertFromPaste"],["input.drop","insertFromDrop"],["input.complete","insertReplacementText"],["delete.selection","deleteContent"],["delete.forward","deleteContentForward"],["delete.backward","deleteContentBackward"],["delete.cut","deleteByCut"],["move.drop","deleteByDrag"],["undo","historyUndo"],["redo","historyRedo"]]);var Wt=Object.freeze({__proto__:null,TextEditor:At});var Vt=Object.freeze({__proto__:null,TextEditorHistory:class{#k;#M;constructor(t,e){this.#k=t,this.#M=e}moveHistory(t,e=!1){const{editor:o}=this.#k,{main:n}=o.state.selection,r=-1===t;if(!e){if(!n.empty)return!1;const t=o.coordsAtPos(n.head),e=o.coordsAtPos(r?0:o.state.doc.length);if(t&&e&&(r?t.top>e.top+5:t.bottom<e.bottom-5))return!1}const s=o.state.doc.toString(),a=this.#M,c=r?a.previous(s):a.next();if(void 0===c)return!1;const l=c.length;if(o.dispatch({changes:{from:0,to:o.state.doc.length,insert:c},selection:i.EditorSelection.cursor(l),scrollIntoView:!0}),r){const t=c.search(/\n|$/);o.dispatch({selection:i.EditorSelection.cursor(t)})}return!0}historyCompletions(t){const{explicit:e,pos:o,state:n}=t,i=n.doc.toString();if(!(o===i.length)||!i.length&&!e)return null;const r=this.#M.matchingEntries(i);if(!r.size)return null;const s=[...r].map((t=>({label:t,type:"secondary",boost:-1e5})));return{from:0,to:i.length,options:s}}}});export{g as AutocompleteHistory,st as Config,lt as ExecutionPositionHighlighter,_t as JavaScript,Nt as Position,Wt as TextEditor,Vt as TextEditorHistory};
@@ -0,0 +1,3 @@
1
+ import*as t from"../../../core/platform/platform.js";import*as e from"../../lit-html/lit-html.js";const s=new CSSStyleSheet;s.replaceSync(":host{white-space:pre;overflow:hidden;display:flex}input{font-size:14px}.prefix{flex:none;color:var(--sys-color-primary)}.text-prompt-input{flex:auto;position:relative}.text-prompt-input input{width:100%;border:none;outline:none;position:absolute;left:0;padding:0;z-index:2;background-color:transparent}.text-prompt-input .suggestion{color:var(--sys-color-state-disabled);position:absolute;left:0;z-index:1}\n/*# sourceURL=textPrompt.css */\n");class i extends Event{static eventName="promptinputchanged";data;constructor(t){super(i.eventName),this.data=t}}class n extends HTMLElement{static litTagName=e.literal`devtools-text-prompt`;#t=this.attachShadow({mode:"open"});#e="";#s="";#i="";connectedCallback(){this.#t.adoptedStyleSheets=[s]}set data(t){this.#e=t.ariaLabel,this.#s=t.prefix,this.#i=t.suggestion,this.#n()}get data(){return{ariaLabel:this.#e,prefix:this.#s,suggestion:this.#i}}focus(){this.#o().focus()}#o(){const t=this.#t.querySelector(".input");if(!t)throw new Error("Expected an input element!");return t}moveCaretToEndOfInput(){this.setSelectedRange(this.#a().length,this.#a().length)}onInput(){this.#r().value=this.#a(),this.dispatchEvent(new i(this.#a()))}onKeyDown(e){e.key===t.KeyboardUtilities.ENTER_KEY&&e.preventDefault()}setSelectedRange(t,e){if(t<0)throw new RangeError("Selected range start must be a nonnegative integer");const s=this.#a().length;e>s&&(e=s),e<t&&(e=t),this.#o().setSelectionRange(t,e)}setPrefix(t){this.#s=t,this.#n()}setSuggestion(t){this.#i=t,this.#r().value+=this.#i,this.#n()}setText(t){this.#o().value=t,this.#r().value=this.#a(),this.#o().hasFocus()&&(this.moveCaretToEndOfInput(),this.#o().scrollIntoView())}#r(){const t=this.#t.querySelector(".suggestion");if(!t)throw new Error("Expected an suggestion element!");return t}#a(){return this.#o().value||""}#n(){const t=e.html`
2
+ <span class="prefix">${this.#s} </span>
3
+ <span class="text-prompt-input"><input class="input" aria-label=${this.#e} spellcheck="false" @input=${this.onInput} @keydown=${this.onKeyDown}/><input class="suggestion" aria-label=${this.#e+" Suggestion"}></span>`;e.render(t,this.#t,{host:this})}}customElements.define("devtools-text-prompt",n);var o=Object.freeze({__proto__:null,PromptInputEvent:i,TextPrompt:n});export{o as TextPrompt};
@@ -0,0 +1,30 @@
1
+ import*as e from"../../../core/platform/platform.js";import*as t from"../../lit-html/lit-html.js";import*as r from"../../visual_logging/visual_logging.js";import*as o from"../code_highlighter/code_highlighter.js";import*as n from"../helpers/helpers.js";import*as i from"../render_coordinator/render_coordinator.js";const s=new CSSStyleSheet;function a(e){return"children"in e}s.replaceSync(':host{--list-group-padding:16px}li{border:2px solid transparent;list-style:none;text-overflow:ellipsis;min-height:12px}.compact{border:0}.tree-item:hover{background-color:var(--sys-color-state-hover-on-subtle)}.tree-node-key{white-space:var(--override-key-whitespace-wrapping);min-width:0;flex-grow:1}.arrow-icon{display:block;user-select:none;mask-image:var(--image-file-triangle-right);background-color:var(--icon-default);content:"";text-shadow:none;height:14px;width:14px;overflow:hidden;flex:none;transition:transform 200ms}ul{margin:0;padding:0}ul[role="group"]{padding-left:var(--list-group-padding)}li:not(.parent) > .arrow-and-key-wrapper > .arrow-icon{mask-size:0}li.parent.expanded > .arrow-and-key-wrapper > .arrow-icon{transform:rotate(90deg)}li.is-top-level{border-top:var(--override-top-node-border)}li.is-top-level:last-child{border-bottom:var(--override-top-node-border)}:host([animated]) li:not(.is-top-level){animation-name:slideIn;animation-duration:150ms;animation-timing-function:cubic-bezier(0,0,0.3,1);animation-fill-mode:forwards}@keyframes slideIn{from{transform:translateY(-5px);opacity:0%}to{transform:none;opacity:100%}}.arrow-and-key-wrapper{display:flex;align-content:center;align-items:center;& ::selection{background-color:var(--sys-color-state-focus-select)}}[role="treeitem"]:focus{outline:0}ul[role="tree"]:focus-within [role="treeitem"].selected > .arrow-and-key-wrapper{background-color:var(--sys-color-tonal-container)}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inline-icon{vertical-align:sub}@media (forced-colors: active){.arrow-icon{background-color:ButtonText}ul[role="tree"]:focus-within [role="treeitem"].selected{outline:solid 1px ButtonText}}\n/*# sourceURL=treeOutline.css */\n');class d extends t.Directive.Directive{constructor(e){if(super(e),e.type!==t.Directive.PartType.ATTRIBUTE)throw new Error("TrackDOMNodeToTreeNode directive must be used as an attribute.")}update(e,[t,r]){const o=e.element;if(!(o instanceof HTMLLIElement))throw new Error("trackTreeNodeToDOMNode must be used on <li> elements.");t.set(o,r)}render(e,t){}}const l=t.Directive.directive(d),c=e=>{const t=e.parentElement?.parentElement;if(t&&t instanceof HTMLLIElement){const e=t.nextElementSibling;return e&&e instanceof HTMLLIElement?e:c(t)}return null},h=e=>{const t=e.querySelector(':scope > [role="group"] > [role="treeitem"]:first-child');if(!t)throw new Error("Could not find child of expanded node.");return t},p=e=>null!==e.getAttribute("aria-expanded"),u=e=>p(e)&&"true"===e.getAttribute("aria-expanded"),f=e=>{const t=e.querySelector(':scope > [role="group"] > [role="treeitem"]:last-child');if(!t)throw new Error("Could not find child of expanded node.");return u(t)?f(t):t},m=e=>{let t=e.parentElement;if(!t)return null;for(;t&&"treeitem"!==t.getAttribute("role")&&t instanceof HTMLLIElement==!1;)t=t.parentElement;return t},w=new WeakMap,N=async e=>{if(!e.children)throw new Error("Asked for children of node that does not have any children.");const t=w.get(e);if(t)return t;const r=await e.children();return w.set(e,r),r},g=async(e,t)=>{for(const r of e){const e=await v(r,t,[r]);if(null!==e)return e}return null},v=async(e,t,r)=>{if(e.id===t)return r;if(e.children){const o=await N(e);for(const e of o){const o=await v(e,t,[...r,e]);if(null!==o)return o}}return null},y=e=>{const{currentDOMNode:t,currentTreeNode:r,direction:o,setNodeExpandedState:n}=e;if(!r)return t;if("ArrowDown"===o){if(u(t))return h(t);const e=(e=>{const t=e.nextElementSibling;return t&&t instanceof HTMLLIElement?t:null})(t);if(e)return e;const r=c(t);if(r)return r}else{if("ArrowRight"===o)return p(t)?u(t)?h(t):(n(r,!0),t):t;if("ArrowUp"===o){const e=(e=>{const t=e.previousElementSibling;return t&&t instanceof HTMLLIElement?t:null})(t);if(e)return u(e)?f(e):e;const r=m(t);if(r&&r instanceof HTMLLIElement)return r}else if("ArrowLeft"===o){if(u(t))return n(r,!1),t;const e=m(t);if(e&&e instanceof HTMLLIElement)return e}}return t};var T=Object.freeze({__proto__:null,isExpandableNode:a,trackDOMNodeToTreeNode:l,getNodeChildren:N,getPathToTreeNode:g,findNextNodeForTreeOutlineKeyboardNavigation:y});const E=i.RenderCoordinator.RenderCoordinator.instance();class x extends Event{static eventName="itemselected";data;constructor(e){super(x.eventName,{bubbles:!0,composed:!0}),this.data={node:e}}}class b extends Event{static eventName="itemmouseover";data;constructor(e){super(b.eventName,{bubbles:!0,composed:!0}),this.data={node:e}}}class S extends Event{static eventName="itemmouseout";data;constructor(e){super(S.eventName,{bubbles:!0,composed:!0}),this.data={node:e}}}class k extends HTMLElement{static litTagName=t.literal`devtools-tree-outline`;#e=this.attachShadow({mode:"open"});#t=[];#r=new Map;#o=new WeakMap;#n=!1;#i=null;#s=null;#a=(e,r)=>("string"!=typeof e.treeNodeData&&console.warn(`The default TreeOutline renderer simply stringifies its given value. You passed in ${JSON.stringify(e.treeNodeData,null,2)}. Consider providing a different defaultRenderer that can handle nodes of this type.`),t.html`${String(e.treeNodeData)}`);#d;#l=!1;#c=!1;#h=!1;static get observedAttributes(){return["nowrap","toplevelbordercolor"]}attributeChangedCallback(e,t,r){switch(e){case"nowrap":this.#p(r);break;case"toplevelbordercolor":this.#u(r)}}connectedCallback(){this.#u(this.getAttribute("toplevelbordercolor")),this.#p(this.getAttribute("nowrap")),this.#e.adoptedStyleSheets=[s,o.Style.default]}get data(){return{tree:this.#t,defaultRenderer:this.#a}}set data(e){this.#a=e.defaultRenderer,this.#t=e.tree,this.#d=e.filter,this.#l=e.compact||!1,this.#n||(this.#s=this.#t[0]),this.#f()}async expandRecursively(e=2){await Promise.all(this.#t.map((t=>this.#m(t,0,e)))),await this.#f()}async collapseAllNodes(){this.#r.clear(),await this.#f()}async expandToAndSelectTreeNode(e){return this.expandToAndSelectTreeNodeId(e.id)}async expandToAndSelectTreeNodeId(e){const t=await g(this.#t,e);if(null===t)throw new Error(`Could not find node with id ${e} in the tree.`);t.forEach(((e,r)=>{r<t.length-1&&this.#w(e,!0)})),this.#i=e,await this.#f()}expandNodeIds(e){return e.forEach((e=>this.#r.set(e,!0))),this.#f()}focusNodeId(e){return this.#i=e,this.#f()}async collapseChildrenOfNode(e){const t=this.#o.get(e);t&&(await this.#N(t),await this.#f())}#p(e){this.style.setProperty("--override-key-whitespace-wrapping",null!==e?"nowrap":"initial")}#u(e){this.style.setProperty("--override-top-node-border",e?`1px solid ${e}`:"")}async#N(e){if(!a(e)||!this.#g(e))return;const t=await this.#v(e),r=Promise.all(t.map((e=>this.#N(e))));await r,this.#w(e,!1)}async#y(e,t){const r=await N(e),o=[];for(const e of r){const r=t(e.treeNodeData),n=this.#T(e)||e.id===this.#i,i=this.#r.get(e.id);if("SHOW"===r||n||i)o.push(e);else if("FLATTEN"===r&&a(e)){const r=await this.#y(e,t);o.push(...r)}}return o}async#v(e){const t=await N(e),r=this.#d;if(!r)return t;const o=await this.#y(e,r);return o.length?o:t}#w(e,t){this.#r.set(e.id,t)}#g(e){return this.#r.get(e.id)||!1}async#m(e,t,r){if(!a(e))return;if(this.#w(e,!0),t===r||!a(e))return;const o=await this.#v(e);await Promise.all(o.map((e=>this.#m(e,t+1,r))))}#E(e){return t=>{t.stopPropagation(),a(e)&&(this.#w(e,!this.#g(e)),this.#f())}}#x(e){e.stopPropagation();const t=null!==this.getAttribute("clickabletitle"),r=e.currentTarget,o=this.#o.get(r);t&&o&&a(o)&&this.#w(o,!this.#g(o)),this.#b(r)}async#b(e){const t=this.#o.get(e);t&&(this.#s=t,await this.#f(),this.dispatchEvent(new x(t)),E.write("DOMNode focus",(()=>{e.focus()})))}#S(e){if("Home"===e){const e=this.#e.querySelector('ul[role="tree"] > li[role="treeitem"]');e&&this.#b(e)}else if("End"===e){const e=this.#e.querySelectorAll('li[role="treeitem"]'),t=e[e.length-1];t&&this.#b(t)}}async#k(e,t){const r=this.#o.get(t);if(!r)return;const o=y({currentDOMNode:t,currentTreeNode:r,direction:e,setNodeExpandedState:(e,t)=>this.#w(e,t)});await this.#b(o)}#I(e){const t=this.#o.get(e);if(t&&a(t)){const e=this.#g(t);this.#w(t,!e),this.#f()}}async#C(t){if(!(t.target instanceof HTMLLIElement))throw new Error("event.target was not an <li> element");"Home"===t.key||"End"===t.key?(t.preventDefault(),this.#S(t.key)):e.KeyboardUtilities.keyIsArrowKey(t.key)?(t.preventDefault(),await this.#k(t.key,t.target)):"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.#I(t.target))}#A(e){this.#i=null,this.#b(e)}#T(e){return!!this.#s&&e.id===this.#s.id}#D(e,{depth:o,setSize:i,positionInSet:s}){let d;const c=this.#g(e);if(a(e)&&c){const r=this.#v(e).then((e=>e.map(((t,r)=>this.#D(t,{depth:o+1,setSize:e.length,positionInSet:r})))));d=t.html`<ul role="group">${t.Directives.until(r)}</ul>`}else d=t.nothing;const h=this.#T(e)?0:-1,p=t.Directives.classMap({expanded:a(e)&&c,parent:a(e),selected:this.#T(e),"is-top-level":0===o,compact:this.#l}),u=t.Directives.ifDefined(a(e)?String(c):void 0);let f;return f=e.renderer?e.renderer(e,{isExpanded:c}):this.#a(e,{isExpanded:c}),t.html`
2
+ <li role="treeitem"
3
+ tabindex=${h}
4
+ aria-setsize=${i}
5
+ aria-expanded=${u}
6
+ aria-level=${o+1}
7
+ aria-posinset=${s+1}
8
+ class=${p}
9
+ jslog=${r.treeItem(e.jslogContext).track({click:!0,keydown:"ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter|Space|Home|End"})}
10
+ @click=${this.#x}
11
+ track-dom-node-to-tree-node=${l(this.#o,e)}
12
+ on-render=${n.Directives.nodeRenderedCallback((t=>{t instanceof HTMLLIElement&&this.#i&&e.id===this.#i&&this.#A(t)}))}
13
+ >
14
+ <span class="arrow-and-key-wrapper"
15
+ @mouseover=${()=>{this.dispatchEvent(new b(e))}}
16
+ @mouseout=${()=>{this.dispatchEvent(new S(e))}}
17
+ >
18
+ <span class="arrow-icon" @click=${this.#E(e)} jslog=${r.expand().track({click:!0})}>
19
+ </span>
20
+ <span class="tree-node-key" data-node-key=${e.treeNodeData}>${f}</span>
21
+ </span>
22
+ ${d}
23
+ </li>
24
+ `}async#f(){if(!this.#c)return this.#c=!0,await E.write("TreeOutline render",(()=>{t.render(t.html`
25
+ <div class="wrapping-container">
26
+ <ul role="tree" @keydown=${this.#C}>
27
+ ${this.#t.map(((e,t)=>this.#D(e,{depth:0,setSize:this.#t.length,positionInSet:t})))}
28
+ </ul>
29
+ </div>
30
+ `,this.#e,{host:this})})),this.#n=!0,this.#c=!1,this.#h?(this.#h=!1,this.#f()):void 0;this.#h=!0}}customElements.define("devtools-tree-outline",k);var I=Object.freeze({__proto__:null,defaultRenderer:function(e){return t.html`${e.treeNodeData}`},ItemSelectedEvent:x,ItemMouseOverEvent:b,ItemMouseOutEvent:S,TreeOutline:k});export{I as TreeOutline,T as TreeOutlineUtils};
@@ -0,0 +1 @@
1
+ import*as t from"../../../../core/common/common.js";import*as e from"../../../../core/platform/platform.js";import*as o from"../../../../core/host/host.js";import*as s from"../../../../core/i18n/i18n.js";import*as r from"../../../../core/root/root.js";import*as n from"../../../components/icon_button/icon_button.js";import*as a from"../../legacy.js";import*as i from"../../../../core/sdk/sdk.js";import*as l from"../../../components/srgb_overlay/srgb_overlay.js";import*as c from"../../../visual_logging/visual_logging.js";const h=t=>t.map((t=>e.StringUtilities.stringifyWithPrecision(t,2))),d=t=>`${t[0]} ${t[1]} ${t[2]} / ${t[3]}`,p={rgb:{label:"RGBA",toValues:function(t){return h(t.as("rgba").canonicalRGBA())},fromValues:function(e){return t.Color.parse(`rgb(${d(e)})`)}},hsl:{label:"HSLA",toValues:function(t){const e=h(t.as("hsla").canonicalHSLA());return e[1]=e[1]+"%",e[2]=e[2]+"%",e},fromValues:function(e){return t.Color.parse(`hsl(${d(e)})`)}},hwb:{label:"HWBA",toValues:function(t){const e=h(t.as("hwba").canonicalHWBA());return e[1]=e[1]+"%",e[2]=e[2]+"%",e},fromValues:function(e){return t.Color.parse(`hwb(${d(e)})`)}},lch:{label:"lchA",toValues:function(t){const e=t.as("lch");return h([e.l,e.c,e.h,e.alpha??1])},fromValues:function(e){return t.Color.parse(`lch(${d(e)})`)}},oklch:{label:"lchA",toValues:function(t){const e=t.as("oklch");return h([e.l,e.c,e.h,e.alpha??1])},fromValues:function(e){return t.Color.parse(`oklch(${d(e)})`)}},lab:{label:"labA",toValues:function(t){const e=t.as("lab");return h([e.l,e.a,e.b,e.alpha??1])},fromValues:function(e){return t.Color.parse(`lab(${d(e)})`)}},oklab:{label:"labA",toValues:function(t){const e=t.as("oklab");return h([e.l,e.a,e.b,e.alpha??1])},fromValues:function(e){return t.Color.parse(`oklab(${d(e)})`)}},srgb:{label:"RGBA",toValues:function(t){const e=t.as("srgb");return h([e.p0,e.p1,e.p2,e.alpha??1])},fromValues:function(e){return t.Color.parse(`color(srgb ${d(e)})`)}},"srgb-linear":{label:"RGBA",toValues:function(t){const e=t.as("srgb-linear");return h([e.p0,e.p1,e.p2,e.alpha??1])},fromValues:function(e){return t.Color.parse(`color(srgb-linear ${d(e)})`)}},"display-p3":{label:"RGBA",toValues(t){const e=t.as("display-p3");return h([e.p0,e.p1,e.p2,1])},fromValues:e=>t.Color.parse(`color(display-p3 ${d(e)})`)},"a98-rgb":{label:"RGBA",toValues:function(t){const e=t.as("a98-rgb");return h([e.p0,e.p1,e.p2,e.alpha??1])},fromValues:function(e){return t.Color.parse(`color(a98-rgb ${d(e)})`)}},"prophoto-rgb":{label:"RGBA",toValues:function(t){const e=t.as("prophoto-rgb");return h([e.p0,e.p1,e.p2,e.alpha??1])},fromValues:function(e){return t.Color.parse(`color(prophoto-rgb ${d(e)})`)}},rec2020:{label:"RGBA",toValues:function(t){const e=t.as("rec2020");return h([e.p0,e.p1,e.p2,e.alpha??1])},fromValues:function(e){return t.Color.parse(`color(rec2020 ${d(e)})`)}},xyz:{label:"xyzA",toValues:function(t){const e=t.as("xyz");return h([e.p0,e.p1,e.p2,e.alpha??1])},fromValues:function(e){return t.Color.parse(`color(xyz ${d(e)})`)}},"xyz-d50":{label:"xyzA",toValues:function(t){const e=t.as("xyz-d50");return h([e.p0,e.p1,e.p2,e.alpha??1])},fromValues:function(e){return t.Color.parse(`color(xyz-d50 ${d(e)})`)}},"xyz-d65":{label:"xyzA",toValues:function(t){const e=t.as("xyz-d65");return h([e.p0,e.p1,e.p2,e.alpha??1])},fromValues:function(e){return t.Color.parse(`color(xyz-d65 ${d(e)})`)}}};var u=Object.freeze({__proto__:null,colorFormatSpec:p});const g={noContrastInformationAvailable:"No contrast information available",contrastRatio:"Contrast ratio",showMore:"Show more",pickBackgroundColor:"Pick background color",toggleBackgroundColorPicker:"Toggle background color picker",useSuggestedColorStoFixLow:"Use suggested color {PH1}to fix low contrast",apca:"APCA",aa:"AA",placeholderWithColon:": {PH1}",aaa:"AAA",showLess:"Show less"},m=s.i18n.registerUIStrings("ui/legacy/components/color_picker/ContrastDetails.ts",g),C=s.i18n.getLocalizedString.bind(void 0,m);class b extends t.ObjectWrapper.ObjectWrapper{contrastInfo;elementInternal;toggleMainColorPicker;expandedChangedCallback;colorSelectedCallback;expandedInternal;passesAA;contrastUnknown;visibleInternal;noContrastInfoAvailable;contrastValueBubble;contrastValue;contrastValueBubbleIcons;expandButton;expandedDetails;contrastThresholds;contrastAA;contrastPassFailAA;contrastAAA;contrastPassFailAAA;contrastAPCA;contrastPassFailAPCA;chooseBgColor;bgColorPickerButton;bgColorPickedBound;bgColorSwatch;constructor(t,e,o,s,r){super(),this.contrastInfo=t,this.elementInternal=e.createChild("div","spectrum-contrast-details collapsed"),this.toggleMainColorPicker=o,this.expandedChangedCallback=s,this.colorSelectedCallback=r,this.expandedInternal=!1,this.passesAA=!0,this.contrastUnknown=!1,this.visibleInternal=!1,this.noContrastInfoAvailable=e.createChild("div","no-contrast-info-available"),this.noContrastInfoAvailable.textContent=C(g.noContrastInformationAvailable),this.noContrastInfoAvailable.classList.add("hidden");const i=this.elementInternal.createChild("div");i.addEventListener("click",this.topRowClicked.bind(this));const l=i.createChild("div","container");a.UIUtils.createTextChild(l,C(g.contrastRatio)),this.contrastValueBubble=l.createChild("span","contrast-details-value"),this.contrastValue=this.contrastValueBubble.createChild("span"),this.contrastValueBubbleIcons=[],this.contrastValueBubbleIcons.push(this.contrastValueBubble.appendChild(n.Icon.create("checkmark"))),this.contrastValueBubbleIcons.push(this.contrastValueBubble.appendChild(n.Icon.create("check-double"))),this.contrastValueBubbleIcons.push(this.contrastValueBubble.appendChild(n.Icon.create("clear"))),this.contrastValueBubbleIcons.forEach((t=>t.addEventListener("click",(t=>{b.showHelp(),t.consume(!1)}))));const c=new a.Toolbar.Toolbar("expand",l);this.expandButton=new a.Toolbar.ToolbarButton(C(g.showMore),"chevron-down"),this.expandButton.addEventListener("Click",this.expandButtonClicked.bind(this)),a.ARIAUtils.setExpanded(this.expandButton.element,!1),c.appendToolbarItem(this.expandButton),this.expandedDetails=this.elementInternal.createChild("div","expanded-details"),a.ARIAUtils.setControls(this.expandButton.element,this.expandedDetails),this.contrastThresholds=this.expandedDetails.createChild("div","contrast-thresholds"),this.contrastAA=this.contrastThresholds.createChild("div","contrast-threshold"),this.contrastPassFailAA=this.contrastAA.createChild("div","contrast-pass-fail"),this.contrastAAA=this.contrastThresholds.createChild("div","contrast-threshold"),this.contrastPassFailAAA=this.contrastAAA.createChild("div","contrast-pass-fail"),this.contrastAPCA=this.contrastThresholds.createChild("div","contrast-threshold"),this.contrastPassFailAPCA=this.contrastAPCA.createChild("div","contrast-pass-fail"),this.chooseBgColor=this.expandedDetails.createChild("div","contrast-choose-bg-color"),this.chooseBgColor.textContent=C(g.pickBackgroundColor);const h=this.expandedDetails.createChild("div","background-color"),d=new a.Toolbar.Toolbar("spectrum-eye-dropper",h);this.bgColorPickerButton=new a.Toolbar.ToolbarToggle(C(g.toggleBackgroundColorPicker),"color-picker","color-picker-filled"),this.bgColorPickerButton.addEventListener("Click",this.toggleBackgroundColorPickerInternal.bind(this,void 0,!0)),d.appendToolbarItem(this.bgColorPickerButton),this.bgColorPickedBound=this.bgColorPicked.bind(this),this.bgColorSwatch=new f(h),this.contrastInfo.addEventListener("ContrastInfoUpdated",this.update.bind(this))}showNoContrastInfoAvailableMessage(){this.noContrastInfoAvailable.classList.remove("hidden")}hideNoContrastInfoAvailableMessage(){this.noContrastInfoAvailable.classList.add("hidden")}computeSuggestedColor(e){const o=this.contrastInfo.color(),s=this.contrastInfo.bgColor();if(!o||!s)return;if("APCA"===e){const e=this.contrastInfo.contrastRatioAPCAThreshold();if(null===e)return;return t.Color.findFgColorForContrastAPCA(o,s,e+1)}const r=this.contrastInfo.contrastRatioThreshold(e);return r?t.Color.findFgColorForContrast(o,s,r+.1):void 0}onSuggestColor(t){const e=this.computeSuggestedColor(t);e&&this.colorSelectedCallback(e)}createFixColorButton(t,e){const o=t.createChild("button","contrast-fix-button"),s=e.asString(this.contrastInfo.colorFormat()),r=s?s+" ":"",n=C(g.useSuggestedColorStoFixLow,{PH1:r});return a.ARIAUtils.setLabel(o,n),a.Tooltip.Tooltip.install(o,n),o.tabIndex=0,o.style.backgroundColor=r,o}update(){if(this.contrastInfo.isNull())return this.showNoContrastInfoAvailableMessage(),void this.setVisible(!1);this.setVisible(!0),this.hideNoContrastInfoAvailableMessage();const t=r.Runtime.experiments.isEnabled("apca"),o=this.contrastInfo.color(),s=this.contrastInfo.bgColor();if(t){const t=this.contrastInfo.contrastRatioAPCA();if(null===t||!s||!o)return this.contrastUnknown=!0,this.contrastValue.textContent="",this.contrastValueBubble.classList.add("contrast-unknown"),this.chooseBgColor.classList.remove("hidden"),this.contrastThresholds.classList.add("hidden"),void this.showNoContrastInfoAvailableMessage();this.contrastUnknown=!1,this.chooseBgColor.classList.add("hidden"),this.contrastThresholds.classList.remove("hidden"),this.contrastValueBubble.classList.remove("contrast-unknown"),this.contrastValue.textContent=`${e.NumberUtilities.floor(t,2)}%`;const r=this.contrastInfo.contrastRatioAPCAThreshold(),a=!(!t||!r)&&Math.abs(t)>=r;this.contrastPassFailAPCA.removeChildren();const i=this.contrastPassFailAPCA.createChild("span","contrast-link-label");if(i.textContent=C(g.apca),null!==r&&(this.contrastPassFailAPCA.createChild("span").textContent=`: ${r.toFixed(2)}%`),a){const t=new n.Icon.Icon;t.data={iconName:"checkmark",color:"var(--icon-checkmark-green)",width:"20px",height:"14px"},this.contrastPassFailAPCA.appendChild(t)}else{const t=new n.Icon.Icon;t.data={iconName:"clear",color:"var(--icon-error)",width:"14px",height:"14px"},this.contrastPassFailAPCA.appendChild(t);const e=this.computeSuggestedColor("APCA");if(e){this.createFixColorButton(this.contrastPassFailAPCA,e).addEventListener("click",(()=>this.onSuggestColor("APCA")))}}return i.addEventListener("click",(t=>b.showHelp())),this.elementInternal.classList.toggle("contrast-fail",!a),this.contrastValueBubble.classList.toggle("contrast-aa",a),void this.bgColorSwatch.setColors(o,s)}const a=this.contrastInfo.contrastRatio();if(!a||!s||!o)return this.contrastUnknown=!0,this.contrastValue.textContent="",this.contrastValueBubble.classList.add("contrast-unknown"),this.chooseBgColor.classList.remove("hidden"),this.contrastThresholds.classList.add("hidden"),void this.showNoContrastInfoAvailableMessage();this.contrastUnknown=!1,this.chooseBgColor.classList.add("hidden"),this.contrastThresholds.classList.remove("hidden"),this.contrastValueBubble.classList.remove("contrast-unknown"),this.contrastValue.textContent=String(e.NumberUtilities.floor(a,2)),this.bgColorSwatch.setColors(o,s);const i=this.contrastInfo.contrastRatioThreshold("aa")||0;this.passesAA=(this.contrastInfo.contrastRatio()||0)>=i,this.contrastPassFailAA.removeChildren();const l=this.contrastPassFailAA.createChild("span","contrast-link-label");if(l.textContent=C(g.aa),this.contrastPassFailAA.createChild("span").textContent=C(g.placeholderWithColon,{PH1:i.toFixed(1)}),this.passesAA){const t=new n.Icon.Icon;t.data={iconName:"checkmark",color:"var(--icon-checkmark-green)",width:"20px",height:"14px"},this.contrastPassFailAA.appendChild(t)}else{const t=new n.Icon.Icon;t.data={iconName:"clear",color:"var(--icon-error)",width:"14px",height:"14px"},this.contrastPassFailAA.appendChild(t);const e=this.computeSuggestedColor("aa");if(e){this.createFixColorButton(this.contrastPassFailAA,e).addEventListener("click",(()=>this.onSuggestColor("aa")))}}const c=this.contrastInfo.contrastRatioThreshold("aaa")||0,h=(this.contrastInfo.contrastRatio()||0)>=c;this.contrastPassFailAAA.removeChildren();const d=this.contrastPassFailAAA.createChild("span","contrast-link-label");if(d.textContent=C(g.aaa),this.contrastPassFailAAA.createChild("span").textContent=C(g.placeholderWithColon,{PH1:c.toFixed(1)}),h){const t=new n.Icon.Icon;t.data={iconName:"checkmark",color:"var(--icon-checkmark-green)",width:"20px",height:"14px"},this.contrastPassFailAAA.appendChild(t)}else{const t=new n.Icon.Icon;t.data={iconName:"clear",color:"var(--icon-error)",width:"14px",height:"14px"},this.contrastPassFailAAA.appendChild(t);const e=this.computeSuggestedColor("aaa");if(e){this.createFixColorButton(this.contrastPassFailAAA,e).addEventListener("click",(()=>this.onSuggestColor("aaa")))}}[l,d].forEach((t=>t.addEventListener("click",(()=>b.showHelp())))),this.elementInternal.classList.toggle("contrast-fail",!this.passesAA),this.contrastValueBubble.classList.toggle("contrast-aa",this.passesAA&&!h),this.contrastValueBubble.classList.toggle("contrast-aaa",h)}static showHelp(){o.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(a.UIUtils.addReferrerToURL("https://web.dev/color-and-contrast-accessibility/"))}setVisible(t){this.visibleInternal=t,this.elementInternal.classList.toggle("hidden",!t)}visible(){return this.visibleInternal}element(){return this.elementInternal}expandButtonClicked(){const t=this.contrastValueBubble.getComponentSelection();t&&t.empty(),this.toggleExpanded()}topRowClicked(t){const e=this.contrastValueBubble.getComponentSelection();e&&e.empty(),this.toggleExpanded(),t.consume(!0)}toggleExpanded(){this.expandedInternal=!this.expandedInternal,a.ARIAUtils.setExpanded(this.expandButton.element,this.expandedInternal),this.elementInternal.classList.toggle("collapsed",!this.expandedInternal),this.expandedInternal?(this.toggleMainColorPicker(!1),this.expandButton.setGlyph("chevron-up"),this.expandButton.setTitle(C(g.showLess)),this.contrastUnknown&&this.toggleBackgroundColorPickerInternal(!0)):(this.toggleBackgroundColorPickerInternal(!1),this.expandButton.setGlyph("chevron-down"),this.expandButton.setTitle(C(g.showMore))),this.expandedChangedCallback()}collapse(){this.elementInternal.classList.remove("expanded"),this.toggleBackgroundColorPickerInternal(!1),this.toggleMainColorPicker(!1)}expanded(){return this.expandedInternal}backgroundColorPickerEnabled(){return this.bgColorPickerButton.isToggled()}toggleBackgroundColorPicker(t){this.toggleBackgroundColorPickerInternal(t,!1)}toggleBackgroundColorPickerInternal(t,e=!0){void 0===t&&(t=this.bgColorPickerButton.isToggled()),e&&this.dispatchEventToListeners("BackgroundColorPickerWillBeToggled",t),o.InspectorFrontendHost.InspectorFrontendHostInstance.setEyeDropperActive(t),t?o.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(o.InspectorFrontendHostAPI.Events.EyeDropperPickedColor,this.bgColorPickedBound):o.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(o.InspectorFrontendHostAPI.Events.EyeDropperPickedColor,this.bgColorPickedBound)}bgColorPicked({data:e}){const s=[e.r,e.g,e.b,(e.a/2.55|0)/100],r=t.Color.Legacy.fromRGBA(s);this.contrastInfo.setBgColor(r),this.toggleBackgroundColorPickerInternal(!1),o.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront()}}class f{parentElement;swatchElement;swatchInnerElement;textPreview;constructor(t){this.parentElement=t,this.swatchElement=t.createChild("span","swatch contrast swatch-inner-white"),this.swatchInnerElement=this.swatchElement.createChild("span","swatch-inner"),this.textPreview=this.swatchElement.createChild("div","text-preview"),this.textPreview.textContent="Aa"}setColors(t,e){this.textPreview.style.color=t.asString("rgba"),this.swatchInnerElement.style.backgroundColor=e.asString("rgba"),this.swatchElement.classList.toggle("swatch-inner-white",e.as("hsl").l>.9)}}var v=Object.freeze({__proto__:null,ContrastDetails:b,Swatch:f});class x extends t.ObjectWrapper.ObjectWrapper{isNullInternal;contrastRatioInternal;contrastRatioAPCAInternal;contrastRatioThresholds;contrastRationAPCAThreshold;fgColor;bgColorInternal;colorFormatInternal;constructor(e){if(super(),this.isNullInternal=!0,this.contrastRatioInternal=null,this.contrastRatioAPCAInternal=null,this.contrastRatioThresholds=null,this.contrastRationAPCAThreshold=0,this.fgColor=null,this.bgColorInternal=null,!e)return;if(!e.computedFontSize||!e.computedFontWeight||!e.backgroundColors||1!==e.backgroundColors.length)return;this.isNullInternal=!1,this.contrastRatioThresholds=t.ColorUtils.getContrastThreshold(e.computedFontSize,e.computedFontWeight),this.contrastRationAPCAThreshold=t.ColorUtils.getAPCAThreshold(e.computedFontSize,e.computedFontWeight);const o=e.backgroundColors[0],s=t.Color.parse(o)?.asLegacyColor();s&&this.setBgColorInternal(s)}isNull(){return this.isNullInternal}setColor(t,e){this.fgColor=t,this.colorFormatInternal=e,this.updateContrastRatio(),this.dispatchEventToListeners("ContrastInfoUpdated")}colorFormat(){return this.colorFormatInternal}color(){return this.fgColor}contrastRatio(){return this.contrastRatioInternal}contrastRatioAPCA(){return this.contrastRatioAPCAInternal}contrastRatioAPCAThreshold(){return this.contrastRationAPCAThreshold}setBgColor(t){this.setBgColorInternal(t),this.dispatchEventToListeners("ContrastInfoUpdated")}setBgColorInternal(e){if(this.bgColorInternal=e,!this.fgColor)return;const o=this.fgColor.rgba();if(e.hasAlpha()){const s=t.ColorUtils.blendColors(e.rgba(),o);this.bgColorInternal=new t.Color.Legacy(s,"rgba")}this.contrastRatioInternal=t.ColorUtils.contrastRatio(o,this.bgColorInternal.rgba()),this.contrastRatioAPCAInternal=t.ColorUtils.contrastRatioAPCA(this.fgColor.rgba(),this.bgColorInternal.rgba())}bgColor(){return this.bgColorInternal}updateContrastRatio(){this.bgColorInternal&&this.fgColor&&(this.contrastRatioInternal=t.ColorUtils.contrastRatio(this.fgColor.rgba(),this.bgColorInternal.rgba()),this.contrastRatioAPCAInternal=t.ColorUtils.contrastRatioAPCA(this.fgColor.rgba(),this.bgColorInternal.rgba()))}contrastRatioThreshold(t){return this.contrastRatioThresholds?this.contrastRatioThresholds[t]:null}}var w=Object.freeze({__proto__:null,ContrastInfo:x});class A{contrastInfo;visible;contrastRatioSVG;contrastRatioLines;width;height;contrastRatioLineBuilder;contrastRatioLinesThrottler;drawContrastRatioLinesBound;constructor(e,o){this.contrastInfo=e,this.visible=!1,this.contrastRatioSVG=a.UIUtils.createSVGChild(o,"svg","spectrum-contrast-container fill"),this.contrastRatioLines=new Map,r.Runtime.experiments.isEnabled("apca")?this.contrastRatioLines.set("APCA",a.UIUtils.createSVGChild(this.contrastRatioSVG,"path","spectrum-contrast-line")):(this.contrastRatioLines.set("aa",a.UIUtils.createSVGChild(this.contrastRatioSVG,"path","spectrum-contrast-line")),this.contrastRatioLines.set("aaa",a.UIUtils.createSVGChild(this.contrastRatioSVG,"path","spectrum-contrast-line"))),this.width=0,this.height=0,this.contrastRatioLineBuilder=new y(this.contrastInfo),this.contrastRatioLinesThrottler=new t.Throttler.Throttler(0),this.drawContrastRatioLinesBound=this.drawContrastRatioLines.bind(this),this.contrastInfo.addEventListener("ContrastInfoUpdated",this.update.bind(this))}update(){this.visible&&!this.contrastInfo.isNull()&&(r.Runtime.experiments.isEnabled("apca")&&null===this.contrastInfo.contrastRatioAPCA()||this.contrastInfo.contrastRatio()&&this.contrastRatioLinesThrottler.schedule(this.drawContrastRatioLinesBound))}setDimensions(t,e){this.width=t,this.height=e,this.update()}setVisible(t){this.visible=t,this.contrastRatioSVG.classList.toggle("hidden",!t),this.update()}async drawContrastRatioLines(){for(const[t,e]of this.contrastRatioLines){const o=this.contrastRatioLineBuilder.drawContrastRatioLine(this.width,this.height,t);o?e.setAttribute("d",o):e.removeAttribute("d")}}}class y{contrastInfo;constructor(t){this.contrastInfo=t}drawContrastRatioLine(e,o,s){const n=r.Runtime.experiments.isEnabled("apca"),a=n?this.contrastInfo.contrastRatioAPCAThreshold():this.contrastInfo.contrastRatioThreshold(s);if(!e||!o||null===a)return null;const i=.02,l=this.contrastInfo.color(),c=this.contrastInfo.bgColor();if(!l||!c)return null;const h=l.rgba(),d=l.as("hsl").hsva(),p=c.rgba(),u=t.ColorUtils.luminance(p);let g=t.ColorUtils.blendColors(h,p);const m=t.ColorUtils.luminance(g)>u,C=n?t.ColorUtils.desiredLuminanceAPCA(u,a,m):t.Color.desiredLuminance(u,a,m);if(n&&Math.abs(Math.round(t.ColorUtils.contrastRatioByLuminanceAPCA(C,u)))<a)return null;let b=d[2],f=0;const v=[d[0],0,0,d[3]];let x=[];const w=t.Color.hsva2rgba(v);g=t.ColorUtils.blendColors(w,p);let A,y=e=>t.ColorUtils.luminance(t.ColorUtils.blendColors(t.Color.Legacy.fromHSVA(e).rgba(),p));for(r.Runtime.experiments.isEnabled("apca")&&(y=e=>t.ColorUtils.luminanceAPCA(t.ColorUtils.blendColors(t.Color.Legacy.fromHSVA(e).rgba(),p))),A=0;A<1.02;A+=i){A=Math.min(1,A),v[1]=A,v[2]=b+f*i;const s=t.Color.approachColorValue(v,p,2,C,y);if(null===s)break;f=0===A?0:(s-b)/i,b=s,x.push(x.length?"L":"M"),x.push((A*e).toFixed(2)),x.push(((1-s)*o).toFixed(2))}return A<1.02&&(A-=i,v[2]=1,A=t.Color.approachColorValue(v,p,1,C,y),null!==A&&(x=x.concat(["L",(A*e).toFixed(2),"-0.1"]))),0===x.length?null:x.join(" ")}}var k=Object.freeze({__proto__:null,ContrastOverlay:A,ContrastRatioLineBuilder:y});const E={colorClippedTooltipText:"This color was clipped to match the format's gamut. The actual result was {PH1}"},I=s.i18n.registerUIStrings("ui/legacy/components/color_picker/FormatPickerContextMenu.ts",E),P=s.i18n.getLocalizedString.bind(void 0,I);class F{#t;constructor(t){this.#t=t}async show(e,o){let s;const r=new Promise((t=>{s=t})),n=["hex","hexa","rgb","rgba","hsl","hwb"],i=["lch","oklch","lab","oklab","srgb","srgb-linear","display-p3","a98-rgb","prophoto-rgb","rec2020","xyz","xyz-d50","xyz-d65"],l=new a.ContextMenu.ContextMenu(e,{onSoftMenuClosed:()=>s?.()}),c=l.section("legacy"),h=l.section("wide"),d=l.section("color-function").appendSubMenuItem("color()",!1,"color").section();if(!(this.#t instanceof t.Color.Nickname)){const t=this.#t.asLegacyColor().nickname();t&&this.addColorToSection(t,c,o)}if(!(this.#t instanceof t.Color.ShortHex)){const t=this.#t.as(1===(this.#t.alpha??1)?"hex":"hexa").shortHex();t&&this.addColorToSection(t,c,o)}for(const e of[...n,...i]){if(e===this.#t.format())continue;const s=this.#t.as(e),r=n.includes(e)?c:s instanceof t.Color.ColorFunction?d:h;this.addColorToSection(s,r,o)}await l.show(),await r}addColorToSection(e,o,s){if(e instanceof t.Color.Legacy){const t=1!==(this.#t.alpha??1);if(null!==e.alpha!==t)return}const r=e.asString();if(!r)return;let a;e.isGamutClipped()&&(a=new n.Icon.Icon,a.data={iconName:"warning",color:"var(--icon-default)",width:"16px",height:"16px"},a.style.marginLeft="1px",a.style.marginTop="-1px",a.style.minWidth="16px",a.style.minHeight="16px");const i=a?P(E.colorClippedTooltipText,{PH1:e.getAsRawString()??"none"}):void 0;o.appendItem(r,(()=>s(e)),{additionalElement:a,tooltip:i,jslogContext:e.isGamutClipped()?"color":"clipped-color"})}}var B=Object.freeze({__proto__:null,FormatPickerContextMenu:F});const S=new CSSStyleSheet;S.replaceSync(':host{width:232px;height:319px;user-select:none;overflow:hidden}:selection{background-color:var(--sys-color-tonal-container);color:var(--sys-color-on-tonal-container)}.spectrum-color{position:relative;width:232px;height:127px;border-radius:2px 2px 0 0;overflow:hidden;flex:none;touch-action:none}.spectrum-dragger,\n.spectrum-slider{user-select:none}.spectrum-dragger{border-radius:12px;height:12px;width:12px;border:1px solid var(--sys-color-surface);cursor:move;z-index:1;position:absolute;top:0;left:0;background:var(--sys-color-inverse-surface);box-shadow:var(--drop-shadow)}.spectrum-slider{position:absolute;top:-1px;cursor:ew-resize;width:13px;height:13px;border-radius:13px;background-color:var(--sys-color-neutral-container);box-shadow:var(--drop-shadow)}.spectrum-color:focus .spectrum-dragger{border:1px solid var(--sys-color-state-focus-ring)}.spectrum-tools{position:relative;height:110px;width:100%;flex:none}.spectrum-hue{top:16px;background:linear-gradient(to left,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)}.spectrum-hue.display-p3{background:linear-gradient(to left,color(display-p3 1 0 0) 0%,color(display-p3 1 1 0) 17%,color(display-p3 0 1 0) 33%,color(display-p3 0 1 1) 50%,color(display-p3 0 0 1) 67%,color(display-p3 1 0 1) 83%,color(display-p3 1 0 0) 100%)}.spectrum-alpha{top:35px;background-image:var(--image-file-checker);background-size:12px 11px}.spectrum-alpha-background{height:100%;border-radius:2px}.spectrum-hue,\n.spectrum-alpha{position:absolute;left:86px;width:130px;height:11px;border-radius:2px;touch-action:none}.spectrum-hue:focus-visible .spectrum-slider,\n.spectrum-alpha:focus-visible .spectrum-slider{border:1px solid var(--sys-color-state-focus-ring);width:14px;height:14px;border-radius:14px}.spectrum-sat,\n.-theme-preserve{background-image:linear-gradient(to right,#fff,rgb(204 154 129/0%))}.spectrum-val,\n.-theme-preserve{background-image:linear-gradient(to top,#000,rgb(204 154 129/0%))}.spectrum-contrast-details{position:relative;background-color:var(--sys-color-cdt-base-container);width:100%;height:83px;top:0;font-size:13px;color:var(--sys-color-on-surface);border-top:1px solid var(--sys-color-divider);line-height:initial;overflow:hidden;flex:none}.spectrum-contrast-details.collapsed{height:36px;flex:none}.spectrum-contrast-details div.toolbar.expand{position:absolute;right:6px;top:6px;margin:0}.spectrum-contrast-details.visible{display:initial}.spectrum-contrast-details div.container{margin:10px}.spectrum-contrast-details .expanded-details{display:flex;margin:12px 12px 0 4px}.spectrum-contrast-details.collapsed .expanded-details{display:none}.contrast-pass-fail{margin-left:0.5em;display:flex;align-items:center}.contrast-choose-bg-color{margin:8px 0 0 5px;font-style:italic}.spectrum-contrast-details .contrast-choose-bg-color,\n.spectrum-contrast-details .contrast-thresholds{width:150px}.contrast-threshold:first-child{margin-bottom:5px}.contrast-fix-button{cursor:pointer;font-size:13px;padding:0;margin:0 0 0 10px;background:0;width:12px;height:12px;border:1px solid var(--sys-color-neutral-outline);display:inline-block;position:relative}.contrast-fix-button::after{content:" ";width:13px;height:13px;background-image:var(--image-file-refresh);background-size:contain;position:absolute;left:5.5px;top:3.5px;background-color:var(--sys-color-cdt-base-container);border-radius:50%}.contrast-fix-button:hover,\n.contrast-fix-button:focus{border:1px solid var(--sys-color-state-focus-ring);transform:scale(1.2)}.contrast-link-label{cursor:pointer}.contrast-link-label:hover{text-decoration:underline}.spectrum-contrast-details .background-color{position:absolute;flex:none;right:12px}.spectrum-eye-dropper{width:32px;height:24px;position:relative;left:8px;top:17px;cursor:pointer}.spectrum-contrast-details .spectrum-eye-dropper{top:2px;right:34px;position:absolute;left:auto}.contrast-details-value{color:var(--sys-color-on-surface);margin:1px 5px;user-select:text}.contrast-pass-fail devtools-icon{margin-left:5px}.contrast-details-value devtools-icon{display:none;margin-left:5px;color:var(--sys-color-on-surface)}.spectrum-contrast-details .toolbar-state-on devtools-icon{color:var(--sys-color-token-subtle)}devtools-icon.clear{transform:scale(0.7);color:var(--icon-error)}devtools-icon.checkmark,\ndevtools-icon.check-double{color:var(--icon-checkmark-green)}.spectrum-contrast-details .contrast-details-value.contrast-unknown{background-color:var(--sys-color-cdt-base-container);color:var(--sys-color-on-surface);width:3em;text-align:center}.contrast-details-value .clear,\n.contrast-details-value .checkmark,\n.contrast-details-value .check-double{cursor:pointer;vertical-align:-5px}.spectrum-contrast-details.contrast-fail .contrast-details-value .clear,\n.contrast-details-value.contrast-aa .checkmark,\n.contrast-details-value.contrast-aaa .check-double{display:inline-block}.swatch{width:32px;height:32px;margin:0;position:absolute;top:15px;left:44px;background-image:var(--image-file-checker);border-radius:16px}.swatch-inner,\n.swatch-overlay{position:absolute;width:100%;height:100%;display:inline-block;border-radius:16px}.swatch-inner-white{border:1px solid var(--sys-color-neutral-outline)}.swatch-overlay{cursor:pointer;opacity:0%;padding:4px}.swatch-overlay:hover,\n.swatch-overlay:focus-visible{background-color:var(--color-background-inverted-opacity-30);opacity:100%}.swatch-overlay:active{background-color:var(--color-background-inverted-opacity-50)}devtools-icon.copy-color-icon{color:var(--sys-color-cdt-base-container);margin-top:2px;margin-left:2px}.spectrum-text{position:absolute;top:60px;left:16px}.spectrum-text-value{display:inline-block;width:40px;overflow:hidden;text-align:center;margin-right:6px;line-height:20px;padding:0;color:var(--sys-color-on-surface);border:1px solid var(--sys-color-neutral-outline);white-space:nowrap}.spectrum-text-label{letter-spacing:39.5px;margin-top:8px;display:block;color:var(--sys-color-state-disabled);margin-left:16px;width:174px}.spectrum-text-hex > .spectrum-text-value{width:178px}.spectrum-text-hex > .spectrum-text-label{letter-spacing:normal;margin-left:0;text-align:center}.spectrum-switcher{border-radius:2px;height:20px;width:20px;padding:2px;border:none;background:none;margin:0}.spectrum-display-switcher{top:72px;position:absolute;right:10px}.spectrum-switcher:hover{background-color:var(--sys-color-state-hover-on-subtle)}.spectrum-switcher:focus-visible{background-color:var(--sys-color-state-focus-highlight)}.spectrum-palette-container{border-top:1px solid var(--sys-color-divider);position:relative;width:100%;padding:6px 24px 6px 6px;display:flex;flex-wrap:wrap}.spectrum-palette{display:flex;flex-wrap:wrap;width:198px}.spectrum-palette-color{width:12px;height:12px;flex:0 0 12px;border-radius:2px;margin:6px;cursor:pointer;position:relative;border:1px solid var(--sys-color-divider);background-position:-1px!important;z-index:14}.spectrum-palette-color-shadow{position:absolute;opacity:0%;margin:0;top:-5px;left:3px;border:0;border-radius:1px;width:11px;height:11px}.spectrum-palette-color:hover:not(.spectrum-shades-shown) > .spectrum-palette-color-shadow,\n.spectrum-palette-color:focus:not(.spectrum-shades-shown) > .spectrum-palette-color-shadow{opacity:20%}.spectrum-palette-color:hover:not(.spectrum-shades-shown) > .spectrum-palette-color-shadow:first-child,\n.spectrum-palette-color:focus:not(.spectrum-shades-shown) > .spectrum-palette-color-shadow:first-child{opacity:60%;top:-3px;left:1px}.palette-color-shades{position:absolute;background-color:var(--sys-color-cdt-base-container);height:228px;width:28px;box-shadow:var(--drop-shadow);z-index:14;border-radius:2px;transform-origin:0 228px;margin-top:16px;margin-left:-8px}.spectrum-palette > .spectrum-palette-color.spectrum-shades-shown{z-index:15}.palette-color-shades > .spectrum-palette-color{margin:8px 0 0;margin-left:8px;width:12px}.spectrum-palette > .spectrum-palette-color{transition:transform 100ms cubic-bezier(0,0,0.2,1);will-change:transform;z-index:13}.palette-preview > .spectrum-palette-color{margin-top:1px}.spectrum-palette > .spectrum-palette-color.empty-color{border-color:transparent}.spectrum-palette-color:not(.has-material-shades):focus{border:1px solid var(--sys-color-state-focus-ring);transform:scale(1.4)}.palette-color-shades > .spectrum-palette-color:not(.empty-color):hover,\n.spectrum-palette > .spectrum-palette-color:not(.empty-color):not(.has-material-shades):hover{transform:scale(1.15)}.add-color-toolbar{margin-left:-3px;margin-top:-1px}.spectrum-palette-switcher{right:10px;top:0;margin-top:9px;position:absolute}.palette-panel{width:100%;position:absolute;top:100%;display:flex;flex-direction:column;background-color:var(--sys-color-cdt-base-container);z-index:14;transition:transform 200ms cubic-bezier(0,0,0.2,1),visibility 0s 200ms;border-top:1px solid var(--sys-color-divider);visibility:hidden}.palette-panel-showing > .palette-panel{transform:translateY(-100%);transition-delay:0s;visibility:visible}.palette-panel > div.toolbar{position:absolute;right:6px;top:6px}.palette-panel > div:not(.toolbar){flex:0 0 38px;border-bottom:1px solid var(--sys-color-divider);padding:12px;line-height:14px;color:var(--sys-color-on-surface)}.palette-panel > div.palette-title{font-size:14px;line-height:16px;color:var(--sys-color-on-surface);flex-basis:40px}div.palette-preview{display:flex;cursor:pointer}.palette-preview-title{flex:0 0 84px}.palette-preview:focus-visible,\n.palette-preview:hover{background-color:var(--sys-color-state-hover-on-subtle)}.spectrum-overlay{z-index:13;visibility:hidden;background-color:hsl(0deg 0% 0%/50%);opacity:0%;transition:opacity 100ms cubic-bezier(0,0,0.2,1),visibility 0s 100ms}.palette-panel-showing > .spectrum-overlay{transition-delay:0s;visibility:visible;opacity:100%}.spectrum-contrast-container{width:100%;height:100%}.spectrum-contrast-line,\n:host-context(.theme-with-dark-background) .spectrum-contrast-line{fill:none;stroke:#fff;opacity:70%;stroke-width:1.5px}.delete-color-toolbar{position:absolute;right:0;top:0;background-color:var(--sys-color-cdt-base-container);visibility:hidden;z-index:3;width:36px;display:flex;align-items:center;padding-left:4px;bottom:2px;border-bottom-right-radius:2px}@keyframes showDeleteToolbar{from{opacity:0%}to{opacity:100%}}.delete-color-toolbar.dragging{visibility:visible;animation:showDeleteToolbar 100ms 150ms cubic-bezier(0,0,0.2,1) backwards}.delete-color-toolbar-active{background-color:var(--sys-color-state-hover-on-subtle);color:var(--sys-color-cdt-base-container)}.swatch.contrast{width:30px;height:30px;position:absolute;top:0;right:0;left:auto;background-image:var(--image-file-checker);border-radius:15px;display:flex;align-items:center;justify-content:center}.swatch.contrast .swatch-overlay{padding:0}.background-color .text-preview{color:var(--sys-color-inverse-surface);font-size:16px;position:relative;padding-bottom:2px}.swatch.contrast devtools-icon{margin:-2px}.no-contrast-info-available{border-top:1px solid var(--sys-color-divider);position:relative;width:100%;padding:10px;justify-content:center;display:flex;flex-wrap:wrap}@media (forced-colors: active){:host{border:1px solid canvastext!important}.spectrum-color{forced-color-adjust:none}.spectrum-switcher:hover,\n .spectrum-switcher:focus-visible{forced-color-adjust:none;background-color:Highlight!important}:host-context(.theme-with-dark-background) .spectrum-switcher{filter:unset}.spectrum-switcher:hover svg,\n .spectrum-switcher:focus-visible svg{fill:HighlightText}.swatch{forced-color-adjust:none}.swatch-inner,\n .swatch-overlay,\n .swatch-inner-white{border:1px solid ButtonText}.swatch-overlay:hover,\n .swatch-overlay:focus-visible{background-color:canvas!important}.spectrum-slider{forced-color-adjust:none;background-color:ButtonText!important;box-shadow:0 1px 4px 0 ButtonFace!important}}\n/*# sourceURL=spectrum.css */\n');const L={toggleColorPicker:"Eye dropper [{PH1}]",changeHue:"Change hue",changeAlpha:"Change alpha",hex:"HEX",changeColorFormat:"Change color format",previewPalettes:"Preview palettes",addToPalette:"Add to palette",colorPalettes:"Color Palettes",returnToColorPicker:"Return to color picker",colorS:"Color {PH1}",longclickOrLongpressSpaceToShow:"Long-click or long-press space to show alternate shades of {PH1}",removeColor:"Remove color",removeAllToTheRight:"Remove all to the right",clearPalette:"Clear palette",sInS:"{PH1} in {PH2}",copyColorToClipboard:"Copy color to clipboard",pressArrowKeysMessage:"Press arrow keys with or without modifiers to move swatch position. Arrow key with Shift key moves position largely, with Ctrl key it is less and with Alt key it is even less"},T=s.i18n.registerUIStrings("ui/legacy/components/color_picker/Spectrum.ts",L),D=s.i18n.getLocalizedString.bind(void 0,T),R=new WeakMap,U=new WeakMap,H=["srgb","rgb","hex","hsl","hwb"],V="EyeDropper"in window;function M(t){return!H.includes(t)}function O(e,o){const s=t.Color.Legacy.fromHSVA(o);switch(e){case"display-p3":{const e=t.Color.hsva2rgba(o);return new t.Color.ColorFunction("display-p3",e[0],e[1],e[2],e[3],void 0)}case"srgb":return s}}class z extends(t.ObjectWrapper.eventMixin(a.Widget.VBox)){colorInternal;gamut="srgb";colorElement;colorDragElement;dragX;dragY;colorPickerButton;swatch;hueElement;hueSlider;alphaElement;alphaElementBackground;alphaSlider;displayContainer;textValues;textLabels;hexContainer;hexValue;contrastInfo;srgbOverlay;contrastOverlay;contrastDetails;contrastDetailsBackgroundColorPickedToggledBound;palettes;palettePanel;palettePanelShowing;paletteSectionContainer;paletteContainer;shadesContainer;deleteIconToolbar;deleteButton;addColorToolbar;colorPickedBound;hsv;hueAlphaWidth;dragWidth;dragHeight;colorDragElementHeight;slideHelperWidth;numPaletteRowsShown;selectedColorPalette;customPaletteSetting;colorOffset;closeButton;paletteContainerMutable;shadesCloseHandler;dragElement;dragHotSpotX;dragHotSpotY;colorNameInternal;colorFormat="rgb";eyeDropperAbortController=null;isFormatPickerShown=!1;colorStringInternal;constructor(t){super(!0),this.contentElement.tabIndex=0,this.contentElement.setAttribute("jslog",`${c.dialog("colorPicker").parent("mapped").track({keydown:"Enter|Escape"})}`),this.colorElement=this.contentElement.createChild("div","spectrum-color"),this.colorElement.tabIndex=0,this.colorElement.setAttribute("jslog",`${c.canvas("color").track({click:!0,drag:!0,keydown:"ArrowLeft|ArrowRight|ArrowDown|ArrowUp"})}`),this.setDefaultFocusedElement(this.colorElement),this.colorElement.addEventListener("keydown",this.onSliderKeydown.bind(this,v.bind(this)));const o=D(L.pressArrowKeysMessage);a.ARIAUtils.setLabel(this.colorElement,o),a.ARIAUtils.markAsApplication(this.colorElement),this.colorDragElement=this.colorElement.createChild("div","spectrum-sat fill").createChild("div","spectrum-val fill").createChild("div","spectrum-dragger"),this.dragX=0,this.dragY=0;const s=this.contentElement.createChild("div","spectrum-tools"),r=new a.Toolbar.Toolbar("spectrum-eye-dropper",s),i=a.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction("elements.toggle-eye-dropper"),h=i[0]?.descriptors.flatMap((t=>t.name.split(" + ")))[0];this.colorPickerButton=new a.Toolbar.ToolbarToggle(D(L.toggleColorPicker,{PH1:h||""}),"color-picker","color-picker-filled","color-eye-dropper"),this.colorPickerButton.setToggled(!0),this.colorPickerButton.addEventListener("Click",this.toggleColorPicker.bind(this,void 0)),r.appendToolbarItem(this.colorPickerButton),this.colorPickerButton.element.setAttribute("jslog",`${c.colorEyeDropper().track({click:!0})}`),this.swatch=new Y(s),this.hueElement=s.createChild("div","spectrum-hue"),this.hueElement.setAttribute("jslog",`${c.slider("hue").track({click:!0,drag:!0,keydown:"ArrowLeft|ArrowRight|ArrowDown|ArrowUp"})}`),this.hueElement.tabIndex=0,this.hueElement.addEventListener("keydown",this.onSliderKeydown.bind(this,C.bind(this))),a.ARIAUtils.setLabel(this.hueElement,D(L.changeHue)),a.ARIAUtils.markAsSlider(this.hueElement,0,360),this.hueSlider=this.hueElement.createChild("div","spectrum-slider"),this.alphaElement=s.createChild("div","spectrum-alpha"),this.alphaElement.setAttribute("jslog",`${c.slider("alpha").track({click:!0,drag:!0,keydown:"ArrowLeft|ArrowRight|ArrowDown|ArrowUp"})}`),this.alphaElement.tabIndex=0,this.alphaElement.addEventListener("keydown",this.onSliderKeydown.bind(this,f.bind(this))),a.ARIAUtils.setLabel(this.alphaElement,D(L.changeAlpha)),a.ARIAUtils.markAsSlider(this.alphaElement,0,1),this.alphaElementBackground=this.alphaElement.createChild("div","spectrum-alpha-background"),this.alphaSlider=this.alphaElement.createChild("div","spectrum-slider"),this.displayContainer=s.createChild("div","spectrum-text source-code"),a.ARIAUtils.markAsPoliteLiveRegion(this.displayContainer,!0),this.textValues=[];for(let t=0;t<4;++t){const e=a.UIUtils.createInput("spectrum-text-value");e.setAttribute("jslog",`${c.value().track({change:!0,keydown:"ArrowUp|ArrowDown"}).context(t)}`),this.displayContainer.appendChild(e),e.maxLength=4,this.textValues.push(e),e.addEventListener("keydown",this.inputChanged.bind(this),!1),e.addEventListener("input",this.inputChanged.bind(this),!1),e.addEventListener("wheel",this.inputChanged.bind(this),!1),e.addEventListener("paste",this.pasted.bind(this),!1)}this.textLabels=this.displayContainer.createChild("div","spectrum-text-label"),this.hexContainer=s.createChild("div","spectrum-text spectrum-text-hex source-code"),a.ARIAUtils.markAsPoliteLiveRegion(this.hexContainer,!0),this.hexValue=a.UIUtils.createInput("spectrum-text-value"),this.hexValue.setAttribute("jslog",`${c.value("hex").track({keydown:"ArrowUp|ArrowDown",change:!0})}`),this.hexContainer.appendChild(this.hexValue),this.hexValue.maxLength=9,this.hexValue.addEventListener("keydown",this.inputChanged.bind(this),!1),this.hexValue.addEventListener("input",this.inputChanged.bind(this),!1),this.hexValue.addEventListener("wheel",this.inputChanged.bind(this),!1),this.hexValue.addEventListener("paste",this.pasted.bind(this),!1);const d=this.hexContainer.createChild("div","spectrum-text-label");d.textContent=D(L.hex),a.ARIAUtils.setLabel(this.hexValue,d.textContent);const p=s.createChild("button","spectrum-display-switcher spectrum-switcher");p.setAttribute("jslog",`${c.dropDown("color-format").track({click:!0})}`),x(p),a.UIUtils.setTitle(p,D(L.changeColorFormat)),p.tabIndex=0,p.addEventListener("click",(t=>{this.showFormatPicker(t)})),a.UIUtils.installDragHandle(this.hueElement,this.dragStart.bind(this,C.bind(this)),C.bind(this),null,"ew-resize","crosshair"),a.UIUtils.installDragHandle(this.alphaElement,this.dragStart.bind(this,f.bind(this)),f.bind(this),null,"ew-resize","crosshair"),a.UIUtils.installDragHandle(this.colorElement,this.dragStart.bind(this,v.bind(this)),v.bind(this),null,"move","crosshair"),t&&(this.contrastInfo=t,this.contrastOverlay=new A(this.contrastInfo,this.colorElement),this.contrastDetails=new b(this.contrastInfo,this.contentElement,this.toggleColorPicker.bind(this),this.contrastPanelExpandedChanged.bind(this),this.colorSelected.bind(this)),this.contrastDetailsBackgroundColorPickedToggledBound=this.contrastDetailsBackgroundColorPickedToggled.bind(this)),this.element.classList.add("flex-none"),this.palettes=new Map,this.palettePanel=this.contentElement.createChild("div","palette-panel"),this.palettePanel.setAttribute("jslog",`${c.section("palette-panel")}`),this.palettePanelShowing=!1,this.paletteSectionContainer=this.contentElement.createChild("div","spectrum-palette-container"),this.paletteContainer=this.paletteSectionContainer.createChild("div","spectrum-palette"),this.paletteContainer.addEventListener("contextmenu",this.showPaletteColorContextMenu.bind(this,-1)),this.shadesContainer=this.contentElement.createChild("div","palette-color-shades hidden"),this.shadesContainer.setAttribute("jslog",`${c.paletteColorShades()}`),a.UIUtils.installDragHandle(this.paletteContainer,this.paletteDragStart.bind(this),this.paletteDrag.bind(this),this.paletteDragEnd.bind(this),"default");const u=this.paletteSectionContainer.createChild("div","spectrum-palette-switcher spectrum-switcher");u.setAttribute("jslog",`${c.dropDown("palette-switcher").track({click:!0})}`),x(u),a.UIUtils.setTitle(u,D(L.previewPalettes)),a.ARIAUtils.markAsButton(u),u.tabIndex=0,self.onInvokeElement(u,(t=>{this.togglePalettePanel(!0),t.consume(!0)})),this.deleteIconToolbar=new a.Toolbar.Toolbar("delete-color-toolbar"),this.deleteButton=new a.Toolbar.ToolbarButton("","bin"),this.deleteIconToolbar.appendToolbarItem(this.deleteButton);this.contentElement.createChild("div","spectrum-overlay fill").addEventListener("click",this.togglePalettePanel.bind(this,!1)),this.addColorToolbar=new a.Toolbar.Toolbar("add-color-toolbar");const g=new a.Toolbar.ToolbarButton(D(L.addToPalette),"plus",void 0,"add-color");function m(t,e){const o=e,s=t.getBoundingClientRect();switch(o.key){case"ArrowLeft":case"ArrowDown":return s.left-1;case"ArrowRight":case"ArrowUp":return s.right+1;default:return e.x}}function C(t){const o=this.hsv.slice(),s=1-(m(this.hueSlider,t)-this.hueElement.getBoundingClientRect().left)/this.hueAlphaWidth;o[0]=e.NumberUtilities.clamp(s,0,1),this.innerSetColor(o,"",void 0,void 0,N.Other);const r=O(this.gamut,o).as("hsl").canonicalHSLA();a.ARIAUtils.setValueNow(this.hueElement,r[0])}function f(t){const o=this.hsv.slice(),s=(m(this.alphaSlider,t)-this.hueElement.getBoundingClientRect().left)/this.hueAlphaWidth,r=Math.round(100*s)/100;o[3]=e.NumberUtilities.clamp(r,0,1),this.innerSetColor(o,"",void 0,void 0,N.Other);const n=O(this.gamut,o).as("hsl").canonicalHSLA();a.ARIAUtils.setValueText(this.alphaElement,n[3])}function v(t){const o=this.hsv.slice(),s=function(t,e){const o=t.getBoundingClientRect(),s=o.x+o.width/2,r=o.y+o.width/2,n=function(t,e){const o=e;o.altKey?t=1:o.ctrlKey?t=10:o.shiftKey&&(t=20);return t}(o.width/4,e);switch(e.key){case"ArrowLeft":return{x:o.left-n,y:r};case"ArrowRight":return{x:o.right+n,y:r};case"ArrowDown":return{x:s,y:o.bottom+n};case"ArrowUp":return{x:s,y:o.top-n};default:return{x:e.x,y:e.y}}}(this.colorDragElement,t);this.colorOffset=this.colorElement.getBoundingClientRect(),o[1]=e.NumberUtilities.clamp((s.x-this.colorOffset.left)/this.dragWidth,0,1),o[2]=e.NumberUtilities.clamp(1-(s.y-this.colorOffset.top)/this.dragHeight,0,1),this.innerSetColor(o,"",void 0,void 0,N.Other)}function x(t){const e=new n.Icon.Icon;e.data={iconName:"fold-more",color:"var(--icon-default)",width:"16px",height:"16px"},t.appendChild(e)}g.addEventListener("Click",this.onAddColorMousedown.bind(this)),g.element.addEventListener("keydown",this.onAddColorKeydown.bind(this)),this.addColorToolbar.appendToolbarItem(g),this.colorPickedBound=this.colorPicked.bind(this),this.numPaletteRowsShown=-1,this.contentElement.addEventListener("focusout",(t=>{this.isFormatPickerShown&&t.stopImmediatePropagation()})),this.srgbOverlay=new l.SrgbOverlay.SrgbOverlay,this.loadPalettes(),new _((t=>{t.colors.length?this.addPalette(t):this.selectedColorPalette.get()===t.title&&this.paletteSelected(K)}))}dragStart(t,e){return this.colorOffset=this.colorElement.getBoundingClientRect(),t(e),!0}contrastDetailsBackgroundColorPickedToggled(t){t.data&&this.toggleColorPicker(!1)}contrastPanelExpandedChanged(){this.contrastOverlay&&this.contrastDetails&&(this.contrastOverlay.setVisible(this.contrastDetails.expanded()),this.resizeForSelectedPalette(!0),this.contrastDetails.expanded()?this.hideSrgbOverlay():this.showSrgbOverlay())}updatePalettePanel(){this.palettePanel.removeChildren();this.palettePanel.createChild("div","palette-title").textContent=D(L.colorPalettes);const t=new a.Toolbar.Toolbar("",this.palettePanel);this.closeButton=new a.Toolbar.ToolbarButton(D(L.returnToColorPicker),"cross"),this.closeButton.addEventListener("Click",this.togglePalettePanel.bind(this,!1)),this.closeButton.element.addEventListener("keydown",this.onCloseBtnKeydown.bind(this)),this.closeButton.element.setAttribute("jslog",`${c.close().track({click:!0})}`),t.appendToolbarItem(this.closeButton);for(const t of this.palettes.values())this.palettePanel.appendChild(this.createPreviewPaletteElement(t));this.contentElement.scrollIntoView({block:"end"})}togglePalettePanel(t){this.palettePanelShowing!==t&&(t&&this.updatePalettePanel(),this.palettePanelShowing=t,this.contentElement.classList.toggle("palette-panel-showing",t),this.focusInternal())}onCloseBtnKeydown(t){(e.KeyboardUtilities.isEscKey(t)||e.KeyboardUtilities.isEnterOrSpaceKey(t))&&(this.togglePalettePanel(!1),t.consume(!0))}onSliderKeydown(t,e){switch(e.key){case"ArrowLeft":case"ArrowRight":case"ArrowDown":case"ArrowUp":t(e),e.consume(!0)}}focusInternal(){this.isShowing()&&(this.palettePanelShowing&&this.closeButton?this.closeButton.element.focus({preventScroll:!0}):this.contentElement.focus())}createPaletteColor(t,o,s){const r=document.createElement("div");return r.classList.add("spectrum-palette-color"),r.setAttribute("jslog",`${c.item().track({click:!0,drag:!0,keydown:"ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Escape|Tab"})}`),r.style.background=e.StringUtilities.sprintf("linear-gradient(%s, %s), var(--image-file-checker)",t,t),s&&r.animate([{opacity:0},{opacity:1}],{duration:100,delay:s,fill:"backwards"}),a.Tooltip.Tooltip.install(r,o||t),r}showPalette(t,e,o){this.resizeForSelectedPalette(),this.paletteContainer.removeChildren();for(let o=0;o<t.colors.length;o++){const s=e?100*o/t.colors.length:0,r=this.createPaletteColor(t.colors[o],t.colorNames[o],s);if(a.ARIAUtils.markAsButton(r),a.ARIAUtils.setLabel(r,D(L.colorS,{PH1:t.colors[o]})),r.tabIndex=-1,r.addEventListener("mousedown",this.paletteColorSelected.bind(this,t.colors[o],t.colorNames[o],Boolean(t.matchUserFormat))),r.addEventListener("focus",this.paletteColorSelected.bind(this,t.colors[o],t.colorNames[o],Boolean(t.matchUserFormat))),r.addEventListener("keydown",this.onPaletteColorKeydown.bind(this,o)),t.mutable)R.set(r,!0),U.set(r,t.colors[o]),r.addEventListener("contextmenu",this.showPaletteColorContextMenu.bind(this,o));else if(t===K){r.classList.add("has-material-shades");let e=r.createChild("div","spectrum-palette-color spectrum-palette-color-shadow");e.style.background=t.colors[o],e=r.createChild("div","spectrum-palette-color spectrum-palette-color-shadow"),e.style.background=t.colors[o];const s=D(L.longclickOrLongpressSpaceToShow,{PH1:t.colors[o]});a.Tooltip.Tooltip.install(r,s),a.ARIAUtils.setLabel(r,s),new a.UIUtils.LongClickController(r,this.showLightnessShades.bind(this,r,t.colors[o]))}this.paletteContainer.appendChild(r)}this.paletteContainer.childNodes.length>0&&(this.paletteContainer.childNodes[0].tabIndex=0),this.paletteContainerMutable=t.mutable,t.mutable?(this.paletteContainer.appendChild(this.addColorToolbar.element),this.paletteContainer.appendChild(this.deleteIconToolbar.element)):(this.addColorToolbar.element.remove(),this.deleteIconToolbar.element.remove()),this.togglePalettePanel(!1),this.focusInternal()}showLightnessShades(t,e,o){this.shadesCloseHandler&&this.shadesCloseHandler(),this.shadesContainer.classList.remove("hidden"),this.shadesContainer.removeChildren(),this.shadesContainer.animate([{transform:"scaleY(0)",opacity:"0"},{transform:"scaleY(1)",opacity:"1"}],{duration:200,easing:"cubic-bezier(0.4, 0, 0.2, 1)"});let s=this.paletteContainer.offsetTop+t.offsetTop+(t.parentElement?t.parentElement.offsetTop:0);this.contrastDetails&&(s+=this.contrastDetails.element().offsetHeight),this.shadesContainer.style.top=s+"px",this.shadesContainer.style.left=t.offsetLeft+"px",t.classList.add("spectrum-shades-shown");const r=G.get(e);if(void 0!==r)for(let e=r.length-1;e>=0;e--){const o=this.createPaletteColor(r[e],void 0,200*e/r.length+100);a.ARIAUtils.markAsButton(o),a.ARIAUtils.setLabel(o,D(L.colorS,{PH1:r[e]})),o.tabIndex=-1,o.addEventListener("mousedown",this.paletteColorSelected.bind(this,r[e],r[e],!1)),o.addEventListener("focus",this.paletteColorSelected.bind(this,r[e],r[e],!1)),o.addEventListener("keydown",this.onShadeColorKeydown.bind(this,t)),this.shadesContainer.appendChild(o)}this.shadesContainer.childNodes.length>0&&this.shadesContainer.childNodes[this.shadesContainer.childNodes.length-1].focus(),this.shadesCloseHandler=function(t){this.shadesContainer.classList.add("hidden"),t.classList.remove("spectrum-shades-shown"),this.shadesCloseHandler&&this.shadesContainer.ownerDocument.removeEventListener("mousedown",this.shadesCloseHandler,!0),delete this.shadesCloseHandler}.bind(this,t),this.shadesContainer.ownerDocument.addEventListener("mousedown",this.shadesCloseHandler,!0)}slotIndexForEvent(t){const e=t,o=e.pageX-this.paletteContainer.getBoundingClientRect().left,s=e.pageY-this.paletteContainer.getBoundingClientRect().top,r=Math.min(o/j|0,W-1),n=s/j|0;return Math.min(n*W+r,this.customPaletteSetting.get().colors.length-1)}isDraggingToBin(t){return t.pageX>this.deleteIconToolbar.element.getBoundingClientRect().left}paletteDragStart(t){const e=a.UIUtils.deepElementFromEvent(t);if(!e||!R.get(e))return!1;const o=this.slotIndexForEvent(t);this.dragElement=e;const s=t;return this.dragHotSpotX=s.pageX-o%W*j,this.dragHotSpotY=s.pageY-(o/W|0)*j,!0}paletteDrag(t){const e=t;if(e.pageX<this.paletteContainer.getBoundingClientRect().left||e.pageY<this.paletteContainer.getBoundingClientRect().top)return;if(!this.dragElement||void 0===this.dragHotSpotX||void 0===this.dragHotSpotY)return;const o=this.slotIndexForEvent(t),s=e.pageX-o%W*j,r=e.pageY-(o/W|0)*j,n=this.isDraggingToBin(t);this.deleteIconToolbar.element.classList.add("dragging"),this.deleteIconToolbar.element.classList.toggle("delete-color-toolbar-active",n);const a="translateX("+(s-this.dragHotSpotX)+"px) translateY("+(r-this.dragHotSpotY)+"px)";this.dragElement.style.transform=n?a+" scale(0.8)":a;const i=[...this.paletteContainer.children],l=i.indexOf(this.dragElement),c=new Map;for(const t of i)c.set(t,t.getBoundingClientRect());l!==o&&this.paletteContainer.insertBefore(this.dragElement,i[o>l?o+1:o]);for(const t of i){if(t===this.dragElement)continue;const e=c.get(t),o=t.getBoundingClientRect();!e||e.left===o.left&&e.top===o.top||t.animate([{transform:"translateX("+(e.left-o.left)+"px) translateY("+(e.top-o.top)+"px)"},{transform:"none"}],{duration:100,easing:"cubic-bezier(0, 0, 0.2, 1)"})}}paletteDragEnd(t){if(!this.dragElement)return;this.isDraggingToBin(t)&&this.dragElement.remove(),this.dragElement.style.removeProperty("transform");const e=this.paletteContainer.children,o=[];for(let t=0;t<e.length;++t){const s=U.get(e[t]);s&&o.push(s)}const s=this.customPaletteSetting.get();s.colors=o,this.customPaletteSetting.set(s),this.showPalette(s,!1),this.deleteIconToolbar.element.classList.remove("dragging"),this.deleteIconToolbar.element.classList.remove("delete-color-toolbar-active")}loadPalettes(){this.palettes.set(K.title,K);const e={title:"Custom",colors:[],colorNames:[],mutable:!0,matchUserFormat:void 0};this.customPaletteSetting=t.Settings.Settings.instance().createSetting("custom-color-palette",e);const o=this.customPaletteSetting.get();o.colorNames=o.colorNames||[],this.palettes.set(o.title,o),this.selectedColorPalette=t.Settings.Settings.instance().createSetting("selected-color-palette",$);const s=this.palettes.get(this.selectedColorPalette.get());s&&this.showPalette(s,!0)}addPalette(t){this.palettes.set(t.title,t),this.selectedColorPalette.get()===t.title&&this.showPalette(t,!0)}createPreviewPaletteElement(t){const e=document.createElement("div");e.classList.add("palette-preview"),a.ARIAUtils.markAsButton(e),e.tabIndex=0;let o;for(e.createChild("div","palette-preview-title").textContent=t.title,o=0;o<5&&o<t.colors.length;o++)e.appendChild(this.createPaletteColor(t.colors[o],t.colorNames[o]));for(;o<5;o++)e.createChild("div","spectrum-palette-color empty-color");return self.onInvokeElement(e,(e=>{this.paletteSelected(t),e.consume(!0)})),e}paletteSelected(t){this.selectedColorPalette.set(t.title),this.showPalette(t,!0)}resizeForSelectedPalette(t){const e=this.palettes.get(this.selectedColorPalette.get());if(!e)return;let o=e.colors.length;e===this.customPaletteSetting.get()&&o++;const s=Math.max(1,Math.ceil(o/W));if(this.numPaletteRowsShown===s&&!t)return;this.numPaletteRowsShown=s;let r=236;this.contrastDetails&&(this.contrastDetails.expanded()?r+=78:r+=36),this.element.style.height=r+12+24*s+"px",this.dispatchEventToListeners("SizeChanged")}paletteColorSelected(e,o,s){const r=t.Color.parse(e);r&&this.innerSetColor(r,e,o,s?this.colorFormat:r.format(),N.Other)}onPaletteColorKeydown(t,e){let o;switch(e.key){case"ArrowLeft":o=t-1;break;case"ArrowRight":o=t+1;break;case"ArrowUp":o=t-W;break;case"ArrowDown":o=t+W}void 0!==o&&o>-1&&o<this.paletteContainer.childNodes.length&&this.paletteContainer.childNodes[o].focus()}onShadeColorKeydown(t,o){const s=o.target;e.KeyboardUtilities.isEscKey(o)||"Tab"===o.key?(t.focus(),this.shadesCloseHandler&&this.shadesCloseHandler(),o.consume(!0)):"ArrowUp"===o.key&&s.previousElementSibling?(s.previousElementSibling.focus(),o.consume(!0)):"ArrowDown"===o.key&&s.nextElementSibling&&(s.nextElementSibling.focus(),o.consume(!0))}onAddColorMousedown(){this.addColorToCustomPalette()}onAddColorKeydown(t){e.KeyboardUtilities.isEnterOrSpaceKey(t)&&(this.addColorToCustomPalette(),t.consume(!0))}addColorToCustomPalette(){const t=this.customPaletteSetting.get();t.colors.push(this.colorString()),this.customPaletteSetting.set(t),this.showPalette(t,!1);const e=this.paletteContainer.querySelectorAll(".spectrum-palette-color");e[e.length-1].focus()}showPaletteColorContextMenu(t,e){if(!this.paletteContainerMutable)return;const o=new a.ContextMenu.ContextMenu(e);-1!==t&&(o.defaultSection().appendItem(D(L.removeColor),this.deletePaletteColors.bind(this,t,!1),{jslogContext:"remove-color"}),o.defaultSection().appendItem(D(L.removeAllToTheRight),this.deletePaletteColors.bind(this,t,!0),{jslogContext:"remove-all-to-the-right"})),o.defaultSection().appendItem(D(L.clearPalette),this.deletePaletteColors.bind(this,-1,!0),{jslogContext:"clear-palette"}),o.show()}deletePaletteColors(t,e){const o=this.customPaletteSetting.get();e?o.colors.splice(t+1,o.colors.length-t-1):o.colors.splice(t,1),this.customPaletteSetting.set(o),this.showPalette(o,!1)}setColor(t){this.innerSetColor(t,"",void 0,t.format(),N.Model);const e=t.as("hsl").canonicalHSLA();a.ARIAUtils.setValueNow(this.hueElement,e[0]),a.ARIAUtils.setValueText(this.alphaElement,e[3])}colorSelected(t){this.innerSetColor(t,"",void 0,void 0,N.Other)}get color(){return this.colorInternal?this.colorInternal:O(this.gamut,this.hsv)}innerSetColor(e,o,s,r,n){if(void 0!==o&&(this.colorStringInternal=o),void 0!==r&&(this.colorFormat=function(t){return"rgba"===t?"rgb":"hsla"===t?"hsl":"hwba"===t?"hwb":"hexa"===t?"hex":t}(r),this.gamut=M(this.colorFormat)?"display-p3":"srgb"),Array.isArray(e))this.colorInternal=void 0,this.hsv=e;else if(void 0!==e){this.colorInternal=e;const o=this.hsv?this.hsv[0]:null;this.hsv=function(e,o){switch(e){case"display-p3":{const e=o.as("display-p3");return[...t.Color.rgb2hsv([e.p0,e.p1,e.p2]),e.alpha||1]}case"srgb":return o.as("hsl").hsva()}}(this.gamut,e),null!==o&&e.as("lch").isHuePowerless()&&(this.hsv[0]=o)}this.colorNameInternal=s,this.contrastInfo&&this.contrastInfo.setColor(t.Color.Legacy.fromHSVA(this.hsv),this.colorFormat),this.updateHelperLocations(),this.updateUI(),n!==N.Input&&this.updateInput(),n!==N.Model&&this.dispatchEventToListeners("ColorChanged",this.colorString())}colorName(){return this.colorNameInternal}colorString(){if(this.colorStringInternal)return this.colorStringInternal;const t=this.color;let e=this.colorFormat&&this.colorFormat!==t.format()?t.asString(this.colorFormat):t.getAuthoredText()??t.asString();return e||(e="hex"===this.colorFormat?t.asString("hexa"):"hsl"===this.colorFormat?t.asString("hsla"):"hwb"===this.colorFormat?t.asString("hwba"):t.asString("rgba"),console.assert(Boolean(e)),e||"")}updateHelperLocations(){const t=this.hsv[0],e=this.hsv[1],o=this.hsv[2],s=this.hsv[3];this.dragX=e*this.dragWidth,this.dragY=this.dragHeight-o*this.dragHeight;const r=Math.max(-this.colorDragElementHeight,Math.min(this.dragWidth-this.colorDragElementHeight,this.dragX-this.colorDragElementHeight)),n=Math.max(-this.colorDragElementHeight,Math.min(this.dragHeight-this.colorDragElementHeight,this.dragY-this.colorDragElementHeight));this.colorDragElement.positionAt(r,n);const a=(1-t)*this.hueAlphaWidth-this.slideHelperWidth;this.hueSlider.style.left=a+"px";const i=s*this.hueAlphaWidth-this.slideHelperWidth;this.alphaSlider.style.left=i+"px"}updateInput(){if("hex"===this.colorFormat)this.hexContainer.hidden=!1,this.displayContainer.hidden=!0,this.hexValue.value=this.color.asString(1!==(this.color.alpha??1)?"hexa":"hex");else{this.hexContainer.hidden=!0,this.displayContainer.hidden=!1;const t=p[this.colorFormat],e=t.toValues(this.color);this.textLabels.textContent=t.label;for(let t=0;t<this.textValues.length;++t)a.ARIAUtils.setLabel(this.textValues[t],D(L.sInS,{PH1:this.textLabels.textContent.charAt(t),PH2:this.textLabels.textContent})),this.textValues[t].value=String(e[t])}}hideSrgbOverlay(){this.colorElement.contains(this.srgbOverlay)&&this.colorElement.removeChild(this.srgbOverlay)}showSrgbOverlay(){this.contrastDetails&&this.contrastDetails.expanded()||"display-p3"!==this.gamut||(this.srgbOverlay.render({hue:this.hsv[0],width:this.dragWidth,height:this.dragHeight}),this.colorElement.contains(this.srgbOverlay)||this.colorElement.appendChild(this.srgbOverlay))}updateSrgbOverlay(){"display-p3"===this.gamut?this.showSrgbOverlay():this.hideSrgbOverlay()}updateUI(){this.colorElement.style.backgroundColor=O(this.gamut,[this.hsv[0],1,1,1]).asString(),this.contrastOverlay&&this.contrastOverlay.setDimensions(this.dragWidth,this.dragHeight),this.updateSrgbOverlay(),this.swatch.setColor(this.color,this.colorString()),this.colorDragElement.style.backgroundColor=this.color.asString("lch");const o=t.Color.Legacy.fromHSVA(this.hsv.slice(0,3).concat(1));this.alphaElementBackground.style.backgroundImage=e.StringUtilities.sprintf("linear-gradient(to right, rgba(0,0,0,0), %s)",o.asString("lch")),this.hueElement.classList.toggle("display-p3",M(this.colorFormat))}async showFormatPicker(t){const e=new F(this.color);this.isFormatPickerShown=!0,await e.show(t,(t=>{this.innerSetColor(t,void 0,void 0,t.format(),N.Other)})),this.isFormatPickerShown=!1}pasted(e){if(!e.clipboardData)return;const o=e.clipboardData.getData("text"),s=t.Color.parse(o);s&&(this.innerSetColor(s,o,void 0,void 0,N.Other),e.preventDefault())}inputChanged(e){const o=e.currentTarget,s=a.UIUtils.createReplacementString(o.value,e);s&&(o.value=s,o.selectionStart=0,o.selectionEnd=s.length,e.consume(!0));let r=null;if("hex"===this.colorFormat)r=t.Color.parse(this.hexValue.value);else{const t=p[this.colorFormat],e=this.textValues.map((t=>t.value));if(4!==e.length)return;r=t.fromValues(e)}r&&this.innerSetColor(r,void 0,void 0,undefined,N.Input)}wasShown(){this.registerCSSFiles([S]),this.hueAlphaWidth=this.hueElement.offsetWidth,this.slideHelperWidth=this.hueSlider.offsetWidth/2,this.dragWidth=this.colorElement.offsetWidth,this.dragHeight=this.colorElement.offsetHeight,this.colorDragElementHeight=this.colorDragElement.offsetHeight/2,this.innerSetColor(void 0,void 0,void 0,void 0,N.Model),V?this.colorPickerButton.setToggled(!1):this.toggleColorPicker(!0),this.contrastDetails&&this.contrastDetailsBackgroundColorPickedToggledBound&&this.contrastDetails.addEventListener("BackgroundColorPickerWillBeToggled",this.contrastDetailsBackgroundColorPickedToggledBound)}willHide(){this.toggleColorPicker(!1),this.contrastDetails&&this.contrastDetailsBackgroundColorPickedToggledBound&&this.contrastDetails.removeEventListener("BackgroundColorPickerWillBeToggled",this.contrastDetailsBackgroundColorPickedToggledBound)}async toggleColorPicker(e){if(void 0===e&&(e=this.colorPickerButton.isToggled()),this.contrastDetails&&e&&this.contrastDetails.backgroundColorPickerEnabled()&&this.contrastDetails.toggleBackgroundColorPicker(!1),V)if(V&&e){const e=new window.EyeDropper;this.eyeDropperAbortController=new AbortController;try{const o=await e.open({signal:this.eyeDropperAbortController.signal}),s=t.Color.parse(o.sRGBHex);this.innerSetColor(s??void 0,"",void 0,void 0,N.Other)}catch(t){"AbortError"!==t.name&&console.error(t)}this.colorPickerButton.setToggled(!1)}else V&&!e&&(this.eyeDropperAbortController?.abort(),this.eyeDropperAbortController=null);else o.InspectorFrontendHost.InspectorFrontendHostInstance.setEyeDropperActive(e),e?o.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(o.InspectorFrontendHostAPI.Events.EyeDropperPickedColor,this.colorPickedBound):o.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(o.InspectorFrontendHostAPI.Events.EyeDropperPickedColor,this.colorPickedBound)}colorPicked({data:e}){const s=[e.r,e.g,e.b,(e.a/2.55|0)/100],r=t.Color.Legacy.fromRGBA(s);this.innerSetColor(r,"",void 0,void 0,N.Other),o.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront()}}const N={Input:"Input",Model:"Model",Other:"Other"},j=24,W=8,$="Page colors";class _{callback;frequencyMap;constructor(t){this.callback=t,this.frequencyMap=new Map;const e=[];for(const t of i.TargetManager.TargetManager.instance().models(i.CSSModel.CSSModel))for(const o of t.allStyleSheets())e.push(this.processStylesheet(o));Promise.all(e).catch((t=>{console.error(t)})).then(this.finish.bind(this))}frequencyComparator(t,e){return this.frequencyMap.get(e)-this.frequencyMap.get(t)}finish(){let e=[...this.frequencyMap.keys()];e=e.sort(this.frequencyComparator.bind(this));const o=new Map;for(;o.size<24&&e.length;){const s=e.shift(),r=t.Color.parse(s);r&&o.set(s,r)}this.callback({title:$,colors:[...o.keys()].sort((function(t,e){const s=o.get(t).as("hsl").hsva(),r=o.get(e).as("hsl").hsva();return r[1]<.12&&s[1]<.12?r[2]*r[3]-s[2]*s[3]:r[1]<.12?-1:s[1]<.12?1:r[0]===s[0]?r[1]*r[3]-s[1]*s[3]:(r[0]+.94)%1-(s[0]+.94)%1})),colorNames:[],mutable:!1,matchUserFormat:void 0})}async processStylesheet(t){let e=(await t.requestContent()).content||"";e=e.toLowerCase();const o=e.matchAll(/((?:rgb|hsl|hwb)a?\([^)]+\)|#[0-9a-f]{6}|#[0-9a-f]{3})/g);for(const{0:t,index:s}of o){if(e.indexOf(";",s)<0||e.indexOf(":",s)>-1&&e.indexOf(":",s)<e.indexOf(";",s))continue;const o=1+(this.frequencyMap.get(t)??0);this.frequencyMap.set(t,o)}}}const G=new Map([["#F44336",["#FFEBEE","#FFCDD2","#EF9A9A","#E57373","#EF5350","#F44336","#E53935","#D32F2F","#C62828","#B71C1C"]],["#E91E63",["#FCE4EC","#F8BBD0","#F48FB1","#F06292","#EC407A","#E91E63","#D81B60","#C2185B","#AD1457","#880E4F"]],["#9C27B0",["#F3E5F5","#E1BEE7","#CE93D8","#BA68C8","#AB47BC","#9C27B0","#8E24AA","#7B1FA2","#6A1B9A","#4A148C"]],["#673AB7",["#EDE7F6","#D1C4E9","#B39DDB","#9575CD","#7E57C2","#673AB7","#5E35B1","#512DA8","#4527A0","#311B92"]],["#3F51B5",["#E8EAF6","#C5CAE9","#9FA8DA","#7986CB","#5C6BC0","#3F51B5","#3949AB","#303F9F","#283593","#1A237E"]],["#2196F3",["#E3F2FD","#BBDEFB","#90CAF9","#64B5F6","#42A5F5","#2196F3","#1E88E5","#1976D2","#1565C0","#0D47A1"]],["#03A9F4",["#E1F5FE","#B3E5FC","#81D4FA","#4FC3F7","#29B6F6","#03A9F4","#039BE5","#0288D1","#0277BD","#01579B"]],["#00BCD4",["#E0F7FA","#B2EBF2","#80DEEA","#4DD0E1","#26C6DA","#00BCD4","#00ACC1","#0097A7","#00838F","#006064"]],["#009688",["#E0F2F1","#B2DFDB","#80CBC4","#4DB6AC","#26A69A","#009688","#00897B","#00796B","#00695C","#004D40"]],["#4CAF50",["#E8F5E9","#C8E6C9","#A5D6A7","#81C784","#66BB6A","#4CAF50","#43A047","#388E3C","#2E7D32","#1B5E20"]],["#8BC34A",["#F1F8E9","#DCEDC8","#C5E1A5","#AED581","#9CCC65","#8BC34A","#7CB342","#689F38","#558B2F","#33691E"]],["#CDDC39",["#F9FBE7","#F0F4C3","#E6EE9C","#DCE775","#D4E157","#CDDC39","#C0CA33","#AFB42B","#9E9D24","#827717"]],["#FFEB3B",["#FFFDE7","#FFF9C4","#FFF59D","#FFF176","#FFEE58","#FFEB3B","#FDD835","#FBC02D","#F9A825","#F57F17"]],["#FFC107",["#FFF8E1","#FFECB3","#FFE082","#FFD54F","#FFCA28","#FFC107","#FFB300","#FFA000","#FF8F00","#FF6F00"]],["#FF9800",["#FFF3E0","#FFE0B2","#FFCC80","#FFB74D","#FFA726","#FF9800","#FB8C00","#F57C00","#EF6C00","#E65100"]],["#FF5722",["#FBE9E7","#FFCCBC","#FFAB91","#FF8A65","#FF7043","#FF5722","#F4511E","#E64A19","#D84315","#BF360C"]],["#795548",["#EFEBE9","#D7CCC8","#BCAAA4","#A1887F","#8D6E63","#795548","#6D4C41","#5D4037","#4E342E","#3E2723"]],["#9E9E9E",["#FAFAFA","#F5F5F5","#EEEEEE","#E0E0E0","#BDBDBD","#9E9E9E","#757575","#616161","#424242","#212121"]],["#607D8B",["#ECEFF1","#CFD8DC","#B0BEC5","#90A4AE","#78909C","#607D8B","#546E7A","#455A64","#37474F","#263238"]]]),K={title:"Material",mutable:!1,matchUserFormat:!0,colors:[...G.keys()],colorNames:[]};class Y{colorString;swatchInnerElement;swatchOverlayElement;swatchCopyIcon;constructor(t){const e=t.createChild("span","swatch");e.setAttribute("jslog",`${c.action("copy-color").track({click:!0})}`),this.swatchInnerElement=e.createChild("span","swatch-inner"),this.swatchOverlayElement=e.createChild("span","swatch-overlay"),a.ARIAUtils.markAsButton(this.swatchOverlayElement),a.ARIAUtils.setPressed(this.swatchOverlayElement,!1),this.swatchOverlayElement.tabIndex=0,self.onInvokeElement(this.swatchOverlayElement,this.onCopyText.bind(this)),this.swatchOverlayElement.addEventListener("mouseout",this.onCopyIconMouseout.bind(this)),this.swatchOverlayElement.addEventListener("blur",this.onCopyIconMouseout.bind(this)),this.swatchCopyIcon=n.Icon.create("copy","copy-color-icon"),a.Tooltip.Tooltip.install(this.swatchCopyIcon,D(L.copyColorToClipboard)),this.swatchOverlayElement.appendChild(this.swatchCopyIcon),a.ARIAUtils.setLabel(this.swatchOverlayElement,this.swatchCopyIcon.title)}setColor(t,e){const o=t.as("lch");this.swatchInnerElement.style.backgroundColor=o.asString(),this.swatchInnerElement.classList.toggle("swatch-inner-white",o.l>90),this.colorString=e||null,this.swatchOverlayElement.hidden=!e}onCopyText(t){this.swatchCopyIcon.name="checkmark",o.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.colorString),a.ARIAUtils.setPressed(this.swatchOverlayElement,!0),t.consume()}onCopyIconMouseout(){this.swatchCopyIcon.name="copy",a.ARIAUtils.setPressed(this.swatchOverlayElement,!1)}}var X=Object.freeze({__proto__:null,Spectrum:z,ChangeSource:N,PaletteGenerator:_,MaterialPalette:K,Swatch:Y});export{u as ColorFormatSpec,v as ContrastDetails,w as ContrastInfo,k as ContrastOverlay,B as FormatPickerContextMenu,X as Spectrum};
@@ -0,0 +1 @@
1
+ import*as e from"../../../../core/common/common.js";import*as t from"../../../../core/i18n/i18n.js";import*as i from"../../../../core/platform/platform.js";import*as o from"../../../../core/root/root.js";import*as s from"../../../../core/sdk/sdk.js";import*as a from"../../../../models/issues_manager/issues_manager.js";import*as r from"../../../../panels/network/forward/forward.js";import*as n from"../../../components/icon_button/icon_button.js";import*as l from"../../legacy.js";import*as d from"../data_grid/data_grid.js";const c=new CSSStyleSheet;c.replaceSync(".cookies-table devtools-icon{margin-right:4px}.cookies-table td.flagged-cookie-attribute-cell devtools-icon{filter:grayscale()}.cookies-table tr.revealed.data-grid-data-grid-node.flagged-cookie-attribute-row:not(.selected):nth-child(odd){background-color:var(--sys-color-surface-yellow-high)}.cookies-table tr.revealed.data-grid-data-grid-node.flagged-cookie-attribute-row:not(.selected):nth-child(even){background-color:var(--sys-color-surface-yellow)}\n/*# sourceURL=cookiesTable.css */\n");const h={session:"Session",name:"Name",value:"Value",size:"Size",editableCookies:"Editable Cookies",cookies:"Cookies",na:"N/A",showRequestsWithThisCookie:"Show Requests With This Cookie",showIssueAssociatedWithThis:"Show issue associated with this cookie",sourcePortTooltip:"Shows the source port (range 1-65535) the cookie was set on. If the port is unknown, this shows -1.",sourceSchemeTooltip:"Shows the source scheme (`Secure`, `NonSecure`) the cookie was set on. If the scheme is unknown, this shows `Unset`.",timeAfter:"after {date}",timeAfterTooltip:"The expiration timestamp is {seconds}, which corresponds to a date after {date}",opaquePartitionKey:"(opaque)"},u=t.i18n.registerUIStrings("ui/legacy/components/cookie_table/CookiesTable.ts",h),p=t.i18n.getLocalizedString.bind(void 0,u),m=t.i18n.getLazilyComputedLocalizedString.bind(void 0,u)(h.session);class k extends l.Widget.VBox{saveCallback;refreshCallback;deleteCallback;dataGrid;lastEditedColumnId;data;cookieDomain;cookieToBlockedReasons;cookieToExemptionReason;constructor(e,t,i,s,a){super(),this.element.classList.add("cookies-table"),this.saveCallback=t,this.refreshCallback=i,this.deleteCallback=a;const r=Boolean(t),n=[{id:"name",title:p(h.name),sortable:!0,disclosure:r,sort:d.DataGrid.Order.Ascending,longText:!0,weight:24,editable:r},{id:"value",title:p(h.value),sortable:!0,longText:!0,weight:34,editable:r},{id:"domain",title:"Domain",sortable:!0,weight:7,editable:r},{id:"path",title:"Path",sortable:!0,weight:7,editable:r},{id:"expires",title:"Expires / Max-Age",sortable:!0,weight:7,editable:r},{id:"size",title:p(h.size),sortable:!0,align:"right",weight:7},{id:"http-only",title:"HttpOnly",sortable:!0,align:"center",weight:7,dataType:"Boolean",editable:r},{id:"secure",title:"Secure",sortable:!0,align:"center",weight:7,dataType:"Boolean",editable:r},{id:"same-site",title:"SameSite",sortable:!0,weight:7,editable:r},{id:"partition-key-site",title:"Partition Key Site",sortable:!0,weight:7,editable:r},{id:"has-cross-site-ancestor",title:"Cross Site",sortable:!0,align:"center",weight:7,dataType:"Boolean",editable:r},{id:"priority",title:"Priority",sortable:!0,weight:7,editable:r}];if(o.Runtime.experiments.isEnabled("experimental-cookie-features")){const e=[{id:"source-scheme",title:"SourceScheme",sortable:!0,align:"center",weight:7,editable:r},{id:"source-port",title:"SourcePort",sortable:!0,align:"center",weight:7,editable:r}];n.push(...e)}this.dataGrid=r?new d.DataGrid.DataGridImpl({displayName:p(h.editableCookies),columns:n,editCallback:this.onUpdateCookie.bind(this),deleteCallback:this.onDeleteCookie.bind(this),refreshCallback:i}):new d.DataGrid.DataGridImpl({displayName:p(h.cookies),columns:n,editCallback:void 0,deleteCallback:void 0,refreshCallback:void 0}),this.dataGrid.setStriped(!0),this.dataGrid.setName("cookies-table"),this.dataGrid.addEventListener("SortingChanged",this.rebuildTable,this),this.dataGrid.setRowContextMenuCallback(this.populateContextMenu.bind(this)),e&&this.dataGrid.renderInline(),s&&this.dataGrid.addEventListener("SelectedNode",s,this),this.lastEditedColumnId=null,this.dataGrid.asWidget().show(this.element),this.data=[],this.cookieDomain="",this.cookieToBlockedReasons=null,this.cookieToExemptionReason=null}wasShown(){this.registerCSSFiles([c])}setCookies(e,t,i){this.setCookieFolders([{cookies:e,folderName:null}],t,i)}setCookieFolders(e,t,i){this.data=e,this.cookieToBlockedReasons=t||null,this.cookieToExemptionReason=i||null,this.rebuildTable()}setCookieDomain(e){this.cookieDomain=e}selectedCookie(){const e=this.dataGrid.selectedNode;return e?e.cookie:null}getSelectionCookies(){const e=this.dataGrid.selectedNode,t=e&&e.traverseNextNode(!0),i=e&&e.traversePreviousNode(!0);return{current:e&&e.cookie,neighbor:t&&t.cookie||i&&i.cookie}}willHide(){this.lastEditedColumnId=null}findSelectedCookie(e,t){if(!t)return null;const i=e.current,o=t.find((e=>this.isSameCookie(e,i)));if(o)return o;const s=e.neighbor,a=t.find((e=>this.isSameCookie(e,s)));return a||null}isSameCookie(e,t){return null!=t&&t.name()===e.name()&&t.domain()===e.domain()&&t.path()===e.path()}rebuildTable(){const e=this.dataGrid.element?.contains(document.activeElement),t=this.getSelectionCookies(),i=this.lastEditedColumnId;this.lastEditedColumnId=null,this.dataGrid.rootNode().removeChildren();for(let e=0;e<this.data.length;++e){const o=this.data[e],s=this.findSelectedCookie(t,o.cookies);if(o.folderName){const e={};e.name=o.folderName,e.value="",e.size=this.totalSize(o.cookies),e.domain="",e.path="",e.expires="",e["http-only"]="",e.secure="",e["same-site"]="",e["source-port"]="",e["source-scheme"]="",e.priority="";const t=new d.DataGrid.DataGridNode(e);t.selectable=!0,this.dataGrid.rootNode().appendChild(t),t.element().classList.add("row-group"),this.populateNode(t,o.cookies,s,i),t.expand()}else this.populateNode(this.dataGrid.rootNode(),o.cookies,s,i)}t.current&&i&&!this.dataGrid.selectedNode&&this.addInactiveNode(this.dataGrid.rootNode(),t.current,i),this.saveCallback&&this.dataGrid.addCreationNode(!1),e&&this.dataGrid.element.focus()}populateNode(e,t,i,o){if(e.removeChildren(),t){this.sortCookies(t);for(let s=0;s<t.length;++s){const a=t[s],r=this.createGridNode(a);e.appendChild(r),this.isSameCookie(a,i)&&(r.select(),null!==o&&this.dataGrid.startEditingNextEditableColumnOfDataGridNode(r,o))}}}addInactiveNode(e,t,i){const o=this.createGridNode(t);e.appendChild(o),o.select(),o.setInactive(!0),null!==i&&this.dataGrid.startEditingNextEditableColumnOfDataGridNode(o,i)}totalSize(e){let t=0;for(let i=0;e&&i<e.length;++i)t+=e[i].size();return t}sortCookies(e){const t=this.dataGrid.isSortOrderAscending()?1:-1;function o(e,t){switch(t){case"name":default:return String(e.name());case"value":return String(e.value());case"domain":return String(e.domain());case"path":return String(e.path());case"http-only":return String(e.httpOnly());case"secure":return String(e.secure());case"same-site":return String(e.sameSite());case"partition-key-site":return e.partitionKeyOpaque()?p(h.opaquePartitionKey):String(e.topLevelSite());case"has-cross-site-ancestor":return String(!!e.partitioned()&&e.hasCrossSiteAncestor());case"source-scheme":return String(e.sourceScheme())}}function s(e,i,o){return t*(e(i)-e(o))}let a;const r=this.dataGrid.sortColumnId()||"name";a="expires"===r?function(e,i){return e.session()!==i.session()?t*(e.session()?1:-1):e.session()?0:e.maxAge()&&i.maxAge()?t*(e.maxAge()-i.maxAge()):e.expires()&&i.expires()?t*(e.expires()-i.expires()):t*(e.expires()?1:-1)}:"size"===r?s.bind(null,(e=>e.size())):"source-port"===r?s.bind(null,(e=>e.sourcePort())):"priority"===r?function(e,i){const o=["Low","Medium","High"],s=o.indexOf(e.priority()),a=o.indexOf(i.priority());return t*(s-a)}:function(e,s,a){return t*i.StringUtilities.compare(o(s,e),o(a,e))}.bind(null,r),e.sort(a)}createGridNode(e){const i={};let o;if(i.name=e.name(),i.value=e.value(),0===e.type()?(i.domain=e.domain()?e.domain():p(h.na),i.path=e.path()?e.path():p(h.na)):(i.domain=e.domain()||"",i.path=e.path()||""),e.maxAge())i.expires=t.TimeUtilities.secondsToString(Math.floor(e.maxAge()));else if(e.expires()){const t=e.expires();if(t<0)i.expires=m();else{const e=864e13;if(t>e){const s=new Date(e).toISOString();i.expires=p(h.timeAfter,{date:s}),o=p(h.timeAfterTooltip,{seconds:t,date:s})}else i.expires=new Date(t).toISOString()}}else i.expires=0===e.type()?p(h.na):m();i.size=e.size(),i["http-only"]=e.httpOnly(),i.secure=e.secure(),i["same-site"]=e.sameSite()||"",i["source-port"]=e.sourcePort(),i["source-scheme"]=e.sourceScheme(),i.priority=e.priority()||"",i["partition-key-site"]=e.topLevelSite(),i["has-cross-site-ancestor"]=e.hasCrossSiteAncestor()?"true":"";const s=this.cookieToBlockedReasons?.get(e),a=this.cookieToExemptionReason?.get(e),r=new g(i,e,s||null,a||null);return o&&r.setExpiresTooltip(o),r.selectable=!0,r}onDeleteCookie(e){e.cookie&&this.deleteCallback&&this.deleteCallback(e.cookie,(()=>this.refresh()))}onUpdateCookie(e,t,i,o){this.lastEditedColumnId=t,this.setDefaults(e),this.isValidCookieData(e.data)?this.saveNode(e):e.setDirty(!0)}setDefaults(e){null===e.data.name&&(e.data.name=""),null===e.data.value&&(e.data.value=""),null===e.data.domain&&(e.data.domain=this.cookieDomain),null===e.data.path&&(e.data.path="/"),null===e.data.expires&&(e.data.expires=m()),null===e.data["partition-key"]&&(e.data["partition-key"]="")}saveNode(e){const t=e.cookie,i=this.createCookieFromData(e.data);e.cookie=i,this.saveCallback&&this.saveCallback(i,t).then((t=>{t?this.refresh():e.setDirty(!0)}))}createCookieFromData(e){const t=new s.Cookie.Cookie(e.name,e.value,null,e.priority);return t.addAttribute("domain",e.domain),t.addAttribute("path",e.path),e.expires&&e.expires!==m()&&t.addAttribute("expires",new Date(e.expires).toUTCString()),e["http-only"]&&t.addAttribute("http-only"),e.secure&&t.addAttribute("secure"),e["same-site"]&&t.addAttribute("same-site",e["same-site"]),"source-scheme"in e&&t.addAttribute("source-scheme",e["source-scheme"]),"source-port"in e&&t.addAttribute("source-port",Number.parseInt(e["source-port"],10)||void 0),e["partition-key-site"]&&t.setPartitionKey(e["partition-key-site"],Boolean(!!e["has-cross-site-ancestor"]&&e["has-cross-site-ancestor"])),t.setSize(e.name.length+e.value.length),t}isValidCookieData(e){return(Boolean(e.name)||Boolean(e.value))&&this.isValidDomain(e.domain)&&this.isValidPath(e.path)&&this.isValidDate(e.expires)&&this.isValidPartitionKey(e.PartitionKeySite)}isValidDomain(t){if(!t)return!0;const i=e.ParsedURL.ParsedURL.fromString("http://"+t);return null!==i&&i.domain()===t}isValidPath(t){const i=e.ParsedURL.ParsedURL.fromString("http://example.com"+t);return null!==i&&i.path===t}isValidDate(e){return""===e||e===m()||!isNaN(Date.parse(e))}isValidPartitionKey(t){if(!t)return!0;return null!==e.ParsedURL.ParsedURL.fromString(t)}refresh(){this.refreshCallback&&this.refreshCallback()}populateContextMenu(t,i){const o=i.cookie;if(!o)return;const s=o;t.revealSection().appendItem(p(h.showRequestsWithThisCookie),(()=>{const t=r.UIFilter.UIRequestFilter.filters([{filterType:r.UIFilter.FilterType.CookieDomain,filterValue:s.domain()},{filterType:r.UIFilter.FilterType.CookieName,filterValue:s.name()}]);e.Revealer.reveal(t)}),{jslogContext:"show-requests-with-this-cookie"}),a.RelatedIssue.hasIssues(s)&&t.revealSection().appendItem(p(h.showIssueAssociatedWithThis),(()=>{a.RelatedIssue.reveal(s)}),{jslogContext:"show-issue-associated-with-this"})}}class g extends d.DataGrid.DataGridNode{cookie;blockedReasons;exemptionReason;expiresTooltip;constructor(e,t,i,o){super(e),this.cookie=t,this.blockedReasons=i,this.exemptionReason=o}createCells(e){super.createCells(e),this.blockedReasons&&this.blockedReasons.length&&e.classList.add("flagged-cookie-attribute-row")}setExpiresTooltip(e){this.expiresTooltip=e}createCell(e){const t=super.createCell(e);"source-port"===e?l.Tooltip.Tooltip.install(t,p(h.sourcePortTooltip)):"source-scheme"===e?l.Tooltip.Tooltip.install(t,p(h.sourceSchemeTooltip)):"expires"===e&&this.expiresTooltip?l.Tooltip.Tooltip.install(t,this.expiresTooltip):l.Tooltip.Tooltip.install(t,t.textContent||"");let i="";if(this.blockedReasons)for(const t of this.blockedReasons){const o=t.attribute===e,s=!t.attribute&&"name"===e;(o||s)&&(i&&(i+="\n"),i+=t.uiString)}if(i){const o=new n.Icon.Icon;"name"===e&&a.RelatedIssue.hasThirdPartyPhaseoutCookieIssue(this.cookie)?(o.data={iconName:"warning-filled",color:"var(--icon-warning)",width:"14px",height:"14px"},o.onclick=()=>a.RelatedIssue.reveal(this.cookie),o.style.cursor="pointer"):(o.data={iconName:"info",color:"var(--icon-info)",width:"14px",height:"14px"},t.classList.add("flagged-cookie-attribute-cell")),o.title=i,t.insertBefore(o,t.firstChild)}if(this.exemptionReason?.uiString&&"name"===e){const e=new n.Icon.Icon;e.data={iconName:"info",color:"var(--icon-info)",width:"14px",height:"14px"},t.classList.add("flagged-cookie-attribute-cell"),e.title=this.exemptionReason.uiString,t.insertBefore(e,t.firstChild)}return t}}var b=Object.freeze({__proto__:null,CookiesTable:k,DataGridNode:g});export{b as CookiesTable};
@@ -0,0 +1 @@
1
+ import*as e from"../../../../core/common/common.js";import*as t from"../../../../core/i18n/i18n.js";import*as i from"../../../../core/platform/platform.js";import*as s from"../../../visual_logging/visual_logging.js";import*as n from"../../legacy.js";import*as r from"../../../components/render_coordinator/render_coordinator.js";const l=new CSSStyleSheet;l.replaceSync('.data-grid{position:relative;border:1px solid var(--sys-color-divider)!important;line-height:120%}.data-grid table{table-layout:fixed;border-spacing:0;border-collapse:separate;height:100%;width:100%}.data-grid .data-container{position:absolute;top:0;bottom:0;left:0;right:0;overflow-x:hidden;overflow-y:overlay;transform:translateZ(0);background-color:var(--sys-color-cdt-base-container)}.data-grid thead{position:sticky;top:0;height:21px;z-index:1}.data-grid .aria-live-label{width:1px;height:1px;overflow:hidden}.data-grid.inline .data-container{position:static}.data-grid .corner{width:14px;padding-right:0;padding-left:0;border-left:0 none transparent!important}.data-grid.inline .corner{display:none}.data-grid.data-grid-fits-viewport .corner{display:none}.data-grid .top-filler-td,\n.data-grid .bottom-filler-td{height:auto!important;padding:0!important}.data-grid table.data{position:absolute;left:0;top:0;right:0;bottom:0;border-top:0 none transparent;table-layout:fixed}.data-grid.inline table.data{position:static}.data-grid tbody tr{display:none;height:20px}.data-grid tbody tr.revealed{display:table-row}.striped-data-grid .revealed.data-grid-data-grid-node:nth-child(odd):not(.dirty):not(.selected),\n.striped-data-grid-starts-with-odd .revealed.data-grid-data-grid-node:nth-child(even):not(.dirty):not(.selected){background-color:var(--sys-color-surface1)}.data-grid td,\n.data-grid th{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:18px;height:18px;border-left:1px solid var(--sys-color-divider);padding:1px 4px}.data-grid td{vertical-align:top;user-select:text}.data-grid tr:has(th){background-color:var(--sys-color-surface1)}.data-grid th{border-bottom:1px solid var(--sys-color-divider);text-align:left;font-weight:normal;vertical-align:middle}.data-grid th:first-child,\n.data-grid td:first-child{border-left-width:0}.data-grid tr.selected td,\n.data-grid tr.selected th{border-left-color:var(--sys-color-divider-on-tonal-container)}.data-grid td > div,\n.data-grid th > div{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:8px}.data-grid td.editing > div{text-overflow:clip}.data-grid .center{text-align:center}.data-grid .right{text-align:right}.data-grid th.sortable{position:relative}.data-grid th .sort-order-icon-container{min-width:0;position:absolute;top:1px;right:0;bottom:1px;display:flex;align-items:center}.data-grid th .sort-order-icon{margin-right:4px;margin-bottom:-2px;width:14px;height:14px;display:none;background-color:var(--icon-default)}.data-grid th.sort-ascending .sort-order-icon{display:inline-block;mask-image:var(--image-file-triangle-up)}.data-grid th.sort-descending .sort-order-icon{display:inline-block;mask-image:var(--image-file-triangle-down)}.data-grid th.sort-ascending,\n.data-grid th.sort-descending{padding-right:14px}.data-grid th.sortable:hover{background-color:var(--sys-color-state-hover-on-subtle)}.data-grid .top-filler-td{border-bottom:0 none transparent;line-height:0}.data-grid button{line-height:18px;color:inherit}.data-grid td.disclosure::before{user-select:none;mask-image:var(--image-file-triangle-right);float:left;width:14px;height:14px;margin-right:2px;content:"";position:relative;top:3px;background-color:var(--icon-default);transition:transform 200ms}.data-grid tr:not(.parent) td.disclosure::before{background-color:transparent}.data-grid tr.expanded td.disclosure::before{transform:rotate(90deg)}.data-grid tbody tr.revealed.selected{background-color:var(--sys-color-neutral-container);color:inherit;& ::selection{background-color:var(--sys-color-state-focus-select)}}.data-grid tbody tr.revealed:focus-within{background-color:var(--sys-color-tonal-container)}.data-grid tbody tr.revealed:not(.data-grid-filler-row):not(.selected):hover{background-color:var(--sys-color-state-hover-on-subtle)}.data-grid tbody tr.revealed.selected.dirty{color:var(--sys-color-on-tonal-container)}.data-grid.no-selection:focus-visible{border:1px solid var(--sys-color-state-focus-ring)!important}.data-grid:focus tbody tr.selected{background-color:var(--sys-color-tonal-container);color:var(--sys-color-on-tonal-container)}.data-grid tbody tr.selected.dirty{--override-data-grid-dirty-background-color:var(--sys-color-error);background-color:var(--override-data-grid-dirty-background-color)}.data-grid:focus tr.selected.dirty{--override-data-grid-dirty-background-color:var(--sys-color-error-container)}.data-grid:focus tr.selected .devtools-link{color:var(--sys-color-on-tonal-container)}.data-grid:focus tr.parent.selected td.disclosure::before{background-color:var(--sys-color-on-tonal-container)}.data-grid tr.inactive{color:var(--sys-color-state-disabled);font-style:italic}.data-grid tr.dirty{--override-data-grid-dirty-background-color:var(--sys-color-surface-error);background-color:var(--override-data-grid-dirty-background-color);color:var(--sys-color-error);font-style:normal}.data-grid td.show-more{white-space:normal;gap:4px;devtools-button{margin-right:var(--sys-size-6)}}.data-grid td.show-more::before{display:none}.data-grid-resizer{position:absolute;top:0;bottom:0;width:5px;z-index:500}@media (forced-colors: active){.sort-order-icon-container .sort-order-icon{forced-color-adjust:none;background-color:ButtonText}.data-grid td.disclosure::before{forced-color-adjust:none;color:ButtonText}.data-grid.no-selection:focus-visible *{color:ButtonText}.data-grid th.sortable:hover *,\n .data-grid tr.parent.selected td.disclosure::before,\n .data-grid:focus tr.parent.selected td.disclosure::before,\n .data-grid tbody tr.parent.revealed:hover td.disclosure::before{color:HighlightText}.data-grid th.sortable:hover .sort-order-icon-container .sort-order-icon{background-color:HighlightText}.striped-data-grid .revealed.data-grid-data-grid-node:nth-child(odd):not(.dirty):not(.selected),\n .striped-data-grid-starts-with-odd .revealed.data-grid-data-grid-node:nth-child(even):not(.dirty):not(.selected),\n .request-cookies-view tr.revealed.data-grid-data-grid-node.flagged-cookie-attribute-row:not(.selected):nth-child(2n),\n .cookies-table tr.revealed.data-grid-data-grid-node.flagged-cookie-attribute-row:not(.selected):nth-child(odd){background-color:canvas}.data-grid.no-selection:focus-visible{forced-color-adjust:none;border-color:Highlight}.data-grid th.sortable:hover,\n .data-grid tbody tr.revealed:hover,\n .data-grid tbody tr.revealed.selected,\n .striped-data-grid .revealed:hover.data-grid-data-grid-node:nth-child(odd):not(.dirty):not(.selected),\n .striped-data-grid-starts-with-odd .revealed:hover.data-grid-data-grid-node:nth-child(even):not(.dirty):not(.selected),\n .request-cookies-view tr.revealed:hover.data-grid-data-grid-node.flagged-cookie-attribute-row:not(.selected):nth-child(2n),\n .cookies-table tr.revealed:hover.data-grid-data-grid-node.flagged-cookie-attribute-row:not(.selected):nth-child(odd){forced-color-adjust:none;background-color:Highlight}.data-grid tbody tr.revealed:hover *,\n .data-grid tbody tr.revealed.selected *,\n .data-grid tbody tr.revealed:focus *,\n .data-grid tbody tr.revealed:hover .heap-object-tag{color:HighlightText}.data-grid th{background-color:canvas;border-color:Highlight}}\n/*# sourceURL=dataGrid.css */\n');const d={expanded:"expanded",collapsed:"collapsed",sRowS:"{PH1} Row {PH2}",rowsS:"Rows: {PH1}",sSUseTheUpAndDownArrowKeysTo:"{PH1} {PH2}, use the up and down arrow keys to navigate and interact with the rows of the table; Use browse mode to read cell by cell.",sortByString:"Sort By",resetColumns:"Reset Columns",headerOptions:"Header Options",refresh:"Refresh",addNew:"Add new",editS:'Edit "{PH1}"',delete:"Delete",levelS:"level {PH1}",checked:"checked",emptyRowCreated:"An empty table row has been created. You may double click or use context menu to edit."},o=t.i18n.registerUIStrings("ui/legacy/components/data_grid/DataGrid.ts",d),a=t.i18n.getLocalizedString.bind(void 0,o),h=new WeakMap,c=new WeakMap,u=new WeakMap,g=new WeakMap,p=new WeakMap;class m extends e.ObjectWrapper.ObjectWrapper{element;displayName;editCallback;deleteCallback;refreshCallback;dataTableHeaders;scrollContainerInternal;dataContainerInternal;dataTable;inline;columnsArray;columns;visibleColumnsArray;cellClass;dataTableHeadInternal;headerRow;dataTableColumnGroup;dataTableBody;topFillerRow;bottomFillerRow;editing;selectedNode;expandNodesWhenArrowing;indentWidth;resizers;columnWidthsInitialized;cornerWidth;resizeMethod;headerContextMenuCallback;rowContextMenuCallback;elementToDataGridNode;disclosureColumnId;sortColumnCell;rootNodeInternal;editingNode;columnWeightsSetting;creationNode;currentResizer;dataGridWidget;constructor(e){super();const{displayName:t,columns:i,editCallback:s,deleteCallback:r,refreshCallback:l}=e;this.element=document.createElement("div"),this.element.classList.add("data-grid"),this.element.tabIndex=0,this.element.addEventListener("keydown",this.keyDown.bind(this),!1),this.element.addEventListener("contextmenu",this.contextMenu.bind(this),!0),this.element.addEventListener("focusin",(e=>{this.updateGridAccessibleNameOnFocus(),e.consume(!0)})),this.element.addEventListener("focusout",(e=>{e.consume(!0)})),n.ARIAUtils.markAsApplication(this.element),this.displayName=t,this.editCallback=s,this.deleteCallback=r,this.refreshCallback=l,this.dataTableHeaders={},this.dataContainerInternal=this.element.createChild("div","data-container"),this.dataTable=this.dataContainerInternal.createChild("table","data"),this.scrollContainerInternal=this.dataContainerInternal,s&&this.dataTable.addEventListener("dblclick",this.ondblclick.bind(this),!1),this.dataTable.addEventListener("mousedown",this.mouseDownInDataTable.bind(this)),this.dataTable.addEventListener("click",this.clickInDataTable.bind(this),!0),this.inline=!1,this.columnsArray=[],this.columns={},this.visibleColumnsArray=i,i.forEach((e=>this.innerAddColumn(e))),this.cellClass=null,this.dataTableColumnGroup=this.dataTable.createChild("colgroup"),this.dataTableHeadInternal=this.dataTable.createChild("thead"),this.headerRow=this.dataTableHeadInternal.createChild("tr"),this.dataTableBody=this.dataTable.createChild("tbody"),this.topFillerRow=this.dataTableBody.createChild("tr","data-grid-filler-row revealed"),n.ARIAUtils.setHidden(this.topFillerRow,!0),this.bottomFillerRow=this.dataTableBody.createChild("tr","data-grid-filler-row revealed"),n.ARIAUtils.setHidden(this.bottomFillerRow,!0),this.setVerticalPadding(0,0,!0),this.refreshHeader(),this.editing=!1,this.selectedNode=null,this.expandNodesWhenArrowing=!1,this.setRootNode(new N),this.setHasSelection(!1),this.indentWidth=15,this.resizers=[],this.columnWidthsInitialized=!1,this.cornerWidth=f,this.resizeMethod="nearest",this.headerContextMenuCallback=null,this.rowContextMenuCallback=null,this.elementToDataGridNode=new WeakMap}firstSelectableNode(){let e=this.rootNodeInternal;for(;e&&!e.selectable;)e=e.traverseNextNode(!0)||void 0;return e}lastSelectableNode(){let e=this.rootNodeInternal,t=this.rootNodeInternal;for(;t;)t.selectable&&(e=t),t=t.traverseNextNode(!0)||void 0;return e}setElementContent(e,t){const i=this.columnIdFromNode(e);if(!i)return;const s=this.columns[i],n=e.parentElement;let r;n&&(r=this.elementToDataGridNode.get(n)),"Boolean"===s.dataType?m.setElementBoolean(e,Boolean(t),r):null!==t&&m.setElementText(e,t,Boolean(s.longText),r)}static setElementText(e,t,s,r){s&&t.length>1e3?(e.textContent=i.StringUtilities.trimEndWithMaxLength(t,1e3),n.Tooltip.Tooltip.install(e,t),h.set(e,t)):(e.textContent=t,n.Tooltip.Tooltip.install(e,""),h.delete(e)),r&&m.updateNodeAccessibleText(r)}static setElementBoolean(e,t,i){e.textContent=t?"✓":"",n.Tooltip.Tooltip.install(e,""),i&&m.updateNodeAccessibleText(i)}static updateNodeAccessibleText(e){let t="",i=e.elementInternal?.children[0]||null;if(i){for(;i&&!i.classList.contains("corner");){let s=null;for(const e of i.classList)if(e.includes("-column")){s=e.substring(0,e.indexOf("-column"));break}if(s&&e.dataGrid){const n=e.dataGrid.columns[s];n&&(t+=`${n.title}: ${i.textContent}, `)}i=i.nextElementSibling}t.length>0&&(t=t.substring(0,t.length-2)),e.nodeAccessibleText=t}}setStriped(e){this.element.classList.toggle("striped-data-grid",e)}setFocusable(e){this.element.tabIndex=e?0:-1,!1===e&&n.ARIAUtils.removeRole(this.element)}setHasSelection(e){this.element.classList.toggle("no-selection",!e)}announceSelectedGridNode(){if(this.element===i.DOMUtilities.deepActiveElement(this.element.ownerDocument)&&this.selectedNode&&this.selectedNode.existingElement()){let e;this.selectedNode.hasChildren()&&(e=this.selectedNode.expanded?a(d.expanded):a(d.collapsed));const t=e?`${this.selectedNode.nodeAccessibleText}, ${e}`:this.selectedNode.nodeAccessibleText;n.ARIAUtils.alert(t)}}updateGridAccessibleNameOnFocus(){let e;if(this.selectedNode&&this.selectedNode.existingElement()){let t="";this.selectedNode.hasChildren()&&(t=this.selectedNode.expanded?a(d.expanded):a(d.collapsed));e=`${a(d.sRowS,{PH1:this.displayName,PH2:t})} ${this.selectedNode.nodeAccessibleText}`}else{if(!this.rootNodeInternal)return;const t=this.enumerateChildren(this.rootNodeInternal,[],1),i=a(d.rowsS,{PH1:t.length});e=a(d.sSUseTheUpAndDownArrowKeysTo,{PH1:this.displayName,PH2:i})}n.ARIAUtils.alert(e)}innerAddColumn(e,t){e.defaultWeight=e.weight;const n=e.id;n in this.columns&&this.innerRemoveColumn(n),void 0===t&&(t=this.columnsArray.length),this.columnsArray.splice(t,0,e),this.columns[n]=e,e.disclosure&&(this.disclosureColumnId=n);const r=document.createElement("th");r.setAttribute("jslog",`${s.tableHeader().track({click:e.sortable,resize:!0}).context(i.StringUtilities.toKebabCase(n))}`),r.className=n+"-column",c.set(r,n),this.dataTableHeaders[n]=r;const l=document.createElement("div");if(e.titleDOMFragment?l.appendChild(e.titleDOMFragment):l.textContent=e.title||null,r.appendChild(l),e.sort&&(r.classList.add(e.sort),this.sortColumnCell=r),e.sortable){r.addEventListener("click",this.clickInHeaderCell.bind(this),!1),r.classList.add("sortable");const e=document.createElement("span");e.className="sort-order-icon",r.createChild("div","sort-order-icon-container").appendChild(e)}}addColumn(e,t){this.innerAddColumn(e,t)}innerRemoveColumn(e){if(!this.columns[e])return;delete this.columns[e];const t=this.columnsArray.findIndex((t=>t.id===e));this.columnsArray.splice(t,1);const i=this.dataTableHeaders[e];i.parentElement&&i.parentElement.removeChild(i),delete this.dataTableHeaders[e]}removeColumn(e){this.innerRemoveColumn(e)}setCellClass(e){this.cellClass=e}refreshHeader(){this.dataTableColumnGroup.removeChildren(),this.headerRow.removeChildren(),this.topFillerRow.removeChildren(),this.bottomFillerRow.removeChildren();for(let e=0;e<this.visibleColumnsArray.length;++e){const t=this.visibleColumnsArray[e],i=t.id,s=this.dataTableColumnGroup.createChild("col");t.width&&(s.style.width=t.width),this.headerRow.appendChild(this.dataTableHeaders[i]);const n=this.topFillerRow.createChild("th","top-filler-td");n.textContent=t.title||null,n.scope="col";const r=this.bottomFillerRow.createChild("td","bottom-filler-td");c.set(r,i)}const e=this.headerRow.createChild("th","corner");n.ARIAUtils.setHidden(e,!0);const t=this.topFillerRow.createChild("th","corner");t.classList.add("top-filler-td"),t.scope="col",this.bottomFillerRow.createChild("td","corner").classList.add("bottom-filler-td"),this.dataTableColumnGroup.createChild("col","corner")}setVerticalPadding(e,t,i=!1){const s=e+"px",n=e||t?t+"px":"auto";this.topFillerRow.style.height===s&&this.bottomFillerRow.style.height===n||(this.topFillerRow.style.height=s,this.bottomFillerRow.style.height=n,i||this.dispatchEventToListeners("PaddingChanged"))}setRootNode(e){this.rootNodeInternal&&(this.rootNodeInternal.removeChildren(),this.rootNodeInternal.dataGrid=null,this.rootNodeInternal.isRoot=!1),this.rootNodeInternal=e,e.isRoot=!0,e.setHasChildren(!1),e.expandedInternal=!0,e.revealedInternal=!0,e.selectable=!1,e.dataGrid=this}rootNode(){let e=this.rootNodeInternal;return e||(e=new N,this.setRootNode(e)),e}ondblclick(e){if(this.editing||this.editingNode)return;const t=this.columnIdFromNode(e.target);t&&this.columns[t].editable&&this.startEditing(e.target)}startEditingColumnOfDataGridNode(e,t){this.editing=!0,this.editingNode=e,this.editingNode.select();const i=this.editingNode.element();if(!i)return;const s=i.children[t],r=h.get(s);r&&(s.textContent=r);const l=this.visibleColumnsArray[t];if("Boolean"===l.dataType){const t=n.UIUtils.CheckboxLabel.create(void 0,e.data[l.id]);n.ARIAUtils.setLabel(t,l.title||"");let i=!1;t.style.height="100%";const r=t.checkboxElement;r.classList.add("inside-datagrid");const d=r.checked;r.addEventListener("change",(()=>{i=!0,this.editingCommitted(s,r.checked,d,void 0,"forward")}),!1),r.addEventListener("keydown",(e=>{if("Tab"===e.key)return e.consume(!0),i=!0,this.editingCommitted(s,r.checked,d,void 0,e.shiftKey?"backward":"forward");" "===e.key?(e.consume(!0),r.checked=!r.checked):"Enter"===e.key&&(e.consume(!0),i=!0,this.editingCommitted(s,r.checked,d,void 0,"forward"))}),!1),r.addEventListener("blur",(()=>{i||this.editingCommitted(s,r.checked,r.checked,void 0,"next")}),!1),s.innerHTML="",s.appendChild(t),r.focus()}else{n.InplaceEditor.InplaceEditor.startEditing(s,this.startEditingConfig(s));const e=s.getComponentSelection();e&&e.selectAllChildren(s)}}startEditingNextEditableColumnOfDataGridNode(e,t,i){const s=this.columns[t],n=this.visibleColumnsArray.indexOf(s),r=this.nextEditableColumn(n,!1,i);-1!==r&&this.startEditingColumnOfDataGridNode(e,r)}startEditing(e){if(!n.UIUtils.enclosingNodeOrSelfWithNodeName(e,"td"))return;if(this.editingNode=this.dataGridNodeFromNode(e),!this.editingNode){if(!this.creationNode)return;this.editingNode=this.creationNode}if(this.editingNode instanceof x&&this.editingNode.isCreationNode)return void this.startEditingColumnOfDataGridNode(this.editingNode,this.nextEditableColumn(-1));const t=this.columnIdFromNode(e);if(!t)return;const i=this.columns[t],s=this.visibleColumnsArray.indexOf(i);this.editingNode&&this.startEditingColumnOfDataGridNode(this.editingNode,s)}renderInline(){this.element.classList.add("inline"),this.cornerWidth=0,this.inline=!0,this.updateWidths()}startEditingConfig(e){return new n.InplaceEditor.Config(this.editingCommitted.bind(this),this.editingCancelled.bind(this))}editingCommitted(e,t,i,s,n){const r=this.columnIdFromNode(e);if(!r)return void this.editingCancelled(e);const l=this.columns[r],d=this.visibleColumnsArray.indexOf(l);if(!this.editingNode)return;const o=null===this.editingNode.data[r]?"":this.editingNode.data[r],a=this.editingNode;function h(e){if(n){if("forward"===n){const t=this.nextEditableColumn(-1),i=a instanceof x&&a.isCreationNode;if(i&&d===t&&!e)return;const s=this.nextEditableColumn(d);if(-1!==s)return void this.startEditingColumnOfDataGridNode(a,s);const n=a.traverseNextNode(!0,null,!0);return n?void this.startEditingColumnOfDataGridNode(n,t):i&&e&&this.creationNode?(this.addCreationNode(!1),void this.startEditingColumnOfDataGridNode(this.creationNode,t)):void 0}if("backward"!==n);else{const e=this.nextEditableColumn(d,!0);if(-1!==e)return void this.startEditingColumnOfDataGridNode(a,e);const t=this.nextEditableColumn(this.visibleColumnsArray.length,!0),i=a.traversePreviousNode(!0,!0);i&&this.startEditingColumnOfDataGridNode(i,t)}}}if(this.setElementContent(e,t),o===t)return this.editingCancelled(e),void h.call(this,!1);this.editingNode.data[r]=t,this.editCallback&&(this.editCallback(this.editingNode,r,o,t),this.editingNode instanceof x&&this.editingNode.isCreationNode&&this.addCreationNode(!1),this.editingCancelled(e),h.call(this,!0))}editingCancelled(e){this.editing=!1,this.editingNode=null}nextEditableColumn(e,t,i){const s=t?-1:1,n=i?e:e+s,r=this.visibleColumnsArray;for(let e=n;e>=0&&e<r.length;e+=s)if(r[e].editable)return e;return-1}sortColumnId(){return this.sortColumnCell&&c.get(this.sortColumnCell)||null}sortOrder(){return!this.sortColumnCell||this.sortColumnCell.classList.contains(b.Ascending)?b.Ascending:this.sortColumnCell.classList.contains(b.Descending)?b.Descending:null}isSortOrderAscending(){return!this.sortColumnCell||this.sortColumnCell.classList.contains(b.Ascending)}autoSizeWidths(e,t,i){t&&(t=Math.min(t,Math.floor(100/e.length)));let s=0;for(let t=0;t<e.length;++t)s+=e[t];let n=0;for(let r=0;r<e.length;++r){let l=Math.round(100*e[r]/s);t&&l<t?l=t:i&&l>i&&(l=i),n+=l,e[r]=l}let r=n-100;for(;t&&r>0;)for(let i=0;i<e.length&&(!(e[i]>t)||(--e[i],--r,r));++i);for(;i&&r<0;)for(let t=0;t<e.length&&(!(e[t]<i)||(++e[t],++r,r));++t);return e}autoSizeColumns(e,t,i){let s=[];for(let e=0;e<this.columnsArray.length;++e)s.push((this.columnsArray[e].title||"").length);if(i=i||0,!this.rootNodeInternal)return;const n=this.enumerateChildren(this.rootNodeInternal,[],i+1);for(let e=0;e<n.length;++e){const t=n[e];for(let e=0;e<this.columnsArray.length;++e){const i=String(t.data[this.columnsArray[e].id]);i.length>s[e]&&(s[e]=i.length)}}s=this.autoSizeWidths(s,e,t);for(let e=0;e<this.columnsArray.length;++e)this.columnsArray[e].weight=s[e];this.columnWidthsInitialized=!1,this.updateWidths()}enumerateChildren(e,t,i){if(e.isRoot||t.push(e),!i)return[];for(let s=0;s<e.children.length;++s)this.enumerateChildren(e.children[s],t,i-1);return t}onResize(){this.updateWidths()}updateWidths(){if(!this.columnWidthsInitialized&&this.element.offsetWidth){const e=this.element.offsetWidth-this.cornerWidth,t=this.dataTableHeadInternal.rows[0].cells.length-1;for(let i=0;i<t;i++){const t=this.visibleColumnsArray[i];t.weight||(t.weight=100*this.getPreferredWidth(i)/e||10)}this.columnWidthsInitialized=!0}this.applyColumnWeights()}indexOfVisibleColumn(e){return this.visibleColumnsArray.findIndex((t=>t.id===e))}setName(t){this.columnWeightsSetting=e.Settings.Settings.instance().createSetting("data-grid-"+t+"-column-weights",{}),this.loadColumnWeights()}resetColumnWeights(){for(const e of this.columnsArray)e.defaultWeight&&(e.weight=e.defaultWeight);this.applyColumnWeights(),this.saveColumnWeights()}loadColumnWeights(){if(!this.columnWeightsSetting)return;const e=this.columnWeightsSetting.get();for(let t=0;t<this.columnsArray.length;++t){const i=this.columnsArray[t],s=e[i.id];s&&(i.weight=s)}this.applyColumnWeights()}saveColumnWeights(){if(!this.columnWeightsSetting)return;const e={};for(let t=0;t<this.columnsArray.length;++t){const i=this.columnsArray[t];e[i.id]=i.weight}this.columnWeightsSetting.set(e)}wasShown(){this.loadColumnWeights()}willHide(){}getPreferredWidth(e){return u.get(this.dataTableColumnGroup.children[e])||this.dataTableHeadInternal.rows[0].cells[e].offsetWidth}applyColumnWeights(){let e=this.element.offsetWidth-this.cornerWidth;if(e<=0)return;let t=0;const i=[];for(let s=0;s<this.visibleColumnsArray.length;++s){if(this.visibleColumnsArray[s].fixedWidth){const t=this.getPreferredWidth(s);i[s]=t,e-=t}else t+=this.visibleColumnsArray[s].weight||0}let s=0,n=0;for(let r=0;r<this.visibleColumnsArray.length;++r){const l=this.visibleColumnsArray[r];let d;if(l.fixedWidth)d=i[r];else{s+=l.weight||0;const i=s*e/t|0;d=Math.max(i-n,14),n=i}this.setPreferredWidth(r,d)}this.positionResizers()}setColumnsVisibility(e){this.visibleColumnsArray=[];for(const t of this.columnsArray)e.has(t.id)&&this.visibleColumnsArray.push(t);this.refreshHeader(),this.applyColumnWeights();const t=this.enumerateChildren(this.rootNode(),[],-1);for(const e of t)e.refresh()}get scrollContainer(){return this.scrollContainerInternal}positionResizers(){const e=this.dataTableColumnGroup.children.length-1,t=[],i=this.resizers;for(;i.length>e-1;){const e=i.pop();e&&e.remove()}for(let i=0;i<e-1;i++)t[i]=(t[i-1]||0)+this.dataTableHeadInternal.rows[0].cells[i].offsetWidth;for(let s=0;s<e-1;s++){let e=i[s];e||(e=document.createElement("div"),p.set(e,s),e.classList.add("data-grid-resizer"),n.UIUtils.installDragHandle(e,this.startResizerDragging.bind(this),this.resizerDragging.bind(this),this.endResizerDragging.bind(this),"col-resize"),this.element.appendChild(e),i.push(e)),g.get(e)!==t[s]&&(g.set(e,t[s]),e.style.left=t[s]+"px")}}addCreationNode(e){this.creationNode&&this.creationNode.makeNormal();const t={};for(const e in this.columns)t[e]=null;this.creationNode=new x(t,e),n.ARIAUtils.alert(a(d.emptyRowCreated)),this.rootNode().appendChild(this.creationNode)}keyDown(e){if(!(e instanceof KeyboardEvent))return;if(this.selectedNode&&this.selectedNode.element().tabIndex<0&&s.logKeyDown(this.selectedNode.element(),e),e.shiftKey||e.metaKey||e.ctrlKey||this.editing||n.UIUtils.isEditing())return;let t,i=!1;if(this.selectedNode)if("ArrowUp"!==e.key||e.altKey)if("ArrowDown"!==e.key||e.altKey){if("ArrowLeft"===e.key)this.selectedNode.expanded?(e.altKey?this.selectedNode.collapseRecursively():this.selectedNode.collapse(),i=!0):this.selectedNode.parent&&!this.selectedNode.parent.isRoot&&(i=!0,this.selectedNode.parent.selectable?(t=this.selectedNode.parent,i=!!t):this.selectedNode.parent&&this.selectedNode.parent.collapse());else if("ArrowRight"===e.key)this.selectedNode.revealed?this.selectedNode.hasChildren()&&(i=!0,this.selectedNode.expanded?(t=this.selectedNode.children[0],i=!!t):e.altKey?this.selectedNode.expandRecursively():this.selectedNode.expand()):(this.selectedNode.reveal(),i=!0);else if(8===e.keyCode||46===e.keyCode)this.deleteCallback&&(i=!0,this.deleteCallback(this.selectedNode));else if("Enter"===e.key)if(this.editCallback){i=!0;const e=this.selectedNode.element();if(!e)return;this.startEditing(e.children[this.nextEditableColumn(-1)])}else this.dispatchEventToListeners("OpenedNode",this.selectedNode)}else{for(t=this.selectedNode.traverseNextNode(!0);t&&!t.selectable;)t=t.traverseNextNode(!0);i=!!t}else{for(t=this.selectedNode.traversePreviousNode(!0);t&&!t.selectable;)t=t.traversePreviousNode(!0);i=!!t}else"ArrowUp"!==e.key||e.altKey?"ArrowDown"!==e.key||e.altKey||(t=this.firstSelectableNode()):t=this.lastSelectableNode(),i=!!t;t&&(t.reveal(),t.select()),i&&this.element!==document.activeElement&&!this.element.contains(document.activeElement)&&this.element.focus(),i&&e.consume(!0)}updateSelectionBeforeRemoval(e,t){let i,s=this.selectedNode;for(;s&&s!==e;)s=s.parent;if(!s)return;for(s=e;s&&!s.nextSibling;s=s.parent);for(s&&(i=s.nextSibling);i&&!i.selectable;)i=i.traverseNextNode(!0);const n=i instanceof x&&i.isCreationNode;if(!i||n){if(!e)return;for(i=e.traversePreviousNode(!0);i&&!i.selectable;)i=i.traversePreviousNode(!0)}i?(i.reveal(),i.select()):this.selectedNode&&this.selectedNode.deselect()}dataGridNodeFromNode(e){const t=n.UIUtils.enclosingNodeOrSelfWithNodeName(e,"tr");return t&&this.elementToDataGridNode.get(t)||null}columnIdFromNode(e){const t=n.UIUtils.enclosingNodeOrSelfWithNodeName(e,"td");return t&&c.get(t)||null}clickInHeaderCell(e){const t=n.UIUtils.enclosingNodeOrSelfWithNodeName(e.target,"th");t&&this.sortByColumnHeaderCell(t)}sortByColumnHeaderCell(e){if(!c.has(e)||!e.classList.contains("sortable"))return;let t=b.Ascending;e===this.sortColumnCell&&this.isSortOrderAscending()&&(t=b.Descending),this.sortColumnCell&&this.sortColumnCell.classList.remove(b.Ascending,b.Descending),this.sortColumnCell=e,e.classList.add(t),this.dispatchEventToListeners("SortingChanged")}markColumnAsSortedBy(e,t){this.sortColumnCell&&this.sortColumnCell.classList.remove(b.Ascending,b.Descending),this.sortColumnCell=this.dataTableHeaders[e],this.sortColumnCell.classList.add(t)}headerTableHeader(e){return this.dataTableHeaders[e]}mouseDownInDataTable(e){const t=e.target,i=this.dataGridNodeFromNode(t);if(!i||!i.selectable||i.isEventWithinDisclosureTriangle(e))return;const s=this.columnIdFromNode(t);s&&this.columns[s].nonSelectable||(e.metaKey?i.selected?i.deselect():i.select():(i.select(),this.dispatchEventToListeners("OpenedNode",i)))}setHeaderContextMenuCallback(e){this.headerContextMenuCallback=e}setRowContextMenuCallback(e){this.rowContextMenuCallback=e}contextMenu(e){if(!(e instanceof MouseEvent))return;const t=new n.ContextMenu.ContextMenu(e),s=e.target,r=this.visibleColumnsArray.filter((e=>e.sortable&&e.title)),l=this.columnsArray.filter((e=>-1===r.indexOf(e)&&e.allowInSortByEvenWhenHidden)),o=[...r,...l];if(o.length>0){const e=t.defaultSection().appendSubMenuItem(a(d.sortByString),!1,"sort-by");for(const t of o){const s=this.dataTableHeaders[t.id];e.defaultSection().appendItem(t.title,this.sortByColumnHeaderCell.bind(this,s),{jslogContext:i.StringUtilities.toKebabCase(t.id)})}}if(s.isSelfOrDescendant(this.dataTableHeadInternal))return this.headerContextMenuCallback&&this.headerContextMenuCallback(t),t.defaultSection().appendItem(a(d.resetColumns),this.resetColumnWeights.bind(this),{jslogContext:"reset-columns"}),void t.show();const h=t.defaultSection().appendSubMenuItem(a(d.headerOptions),!1,"header-options");this.headerContextMenuCallback&&this.headerContextMenuCallback(h),h.defaultSection().appendItem(a(d.resetColumns),this.resetColumnWeights.bind(this),{jslogContext:"reset-columns"});const c=0===e.button,u=c?this.selectedNode:this.dataGridNodeFromNode(s),g=this.selectedNode&&this.selectedNode.existingElement();if(c&&g){const e=g.getBoundingClientRect();if(e){const i=(e.right+e.left)/2,s=(e.bottom+e.top)/2;t.setX(i),t.setY(s)}}if(!this.refreshCallback||u&&u===this.creationNode||t.defaultSection().appendItem(a(d.refresh),this.refreshCallback.bind(this),{jslogContext:"refresh"}),u&&u.selectable&&!u.isEventWithinDisclosureTriangle(e)){if(this.editCallback)if(u===this.creationNode){const e=this.nextEditableColumn(-1),i=u.element().children[e];t.defaultSection().appendItem(a(d.addNew),this.startEditing.bind(this,i),{jslogContext:"add-new"})}else if(c){const e=this.nextEditableColumn(-1);if(e>-1){const i=this.visibleColumnsArray[e];i&&i.editable&&t.defaultSection().appendItem(a(d.editS,{PH1:String(i.title)}),this.startEditingColumnOfDataGridNode.bind(this,u,e),{jslogContext:"edit"})}}else{const e=this.columnIdFromNode(s);e&&this.columns[e].editable&&t.defaultSection().appendItem(a(d.editS,{PH1:String(this.columns[e].title)}),this.startEditing.bind(this,s),{jslogContext:"edit"})}this.deleteCallback&&u!==this.creationNode&&t.defaultSection().appendItem(a(d.delete),this.deleteCallback.bind(this,u),{jslogContext:"delete"}),this.rowContextMenuCallback&&this.rowContextMenuCallback(t,u)}t.show()}clickInDataTable(e){const t=this.dataGridNodeFromNode(e.target);t&&t.hasChildren()&&t.isEventWithinDisclosureTriangle(e)&&(t.expanded?e.altKey?t.collapseRecursively():t.collapse():e.altKey?t.expandRecursively():t.expand())}setResizeMethod(e){this.resizeMethod=e}startResizerDragging(e){return this.currentResizer=e.target,!0}endResizerDragging(){this.currentResizer=null,this.saveColumnWeights()}resizerDragging(e){const t=this.currentResizer;if(!t)return;let s=e.clientX-this.element.getBoundingClientRect().left,n=0,r=p.get(t);if(void 0===r)return;let l=r+1;for(let e=0;e<r;e++)n+=this.getPreferredWidth(e);"last"===this.resizeMethod?l=this.resizers.length:"first"===this.resizeMethod&&(n+=this.getPreferredWidth(r)-this.getPreferredWidth(0),r=0);const d=n+this.getPreferredWidth(r)+this.getPreferredWidth(l),o=n+C,a=d-C;if(o>a)return;s=i.NumberUtilities.clamp(s,o,a);const h=s-v;g.set(t,h),t.style.left=h+"px",this.setPreferredWidth(r,s-n),this.setPreferredWidth(l,d-s);const c=this.visibleColumnsArray[r],u=this.visibleColumnsArray[l];if(c.weight&&u.weight){const e=c.weight+u.weight,t=d-n;c.weight=(s-n)*e/t,u.weight=(d-s)*e/t}this.positionResizers(),this.updateWidths(),e.preventDefault()}setPreferredWidth(e,t){const i=this.dataTableColumnGroup.children[e];u.set(i,t),i.style.width=t+"px"}columnOffset(e){if(!this.element.offsetWidth)return 0;for(let t=1;t<this.visibleColumnsArray.length;++t)if(e===this.visibleColumnsArray[t].id&&this.resizers[t-1])return g.get(this.resizers[t-1])||0;return 0}asWidget(){return this.dataGridWidget||(this.dataGridWidget=new I(this)),this.dataGridWidget}topFillerRowElement(){return this.topFillerRow}headerHeightInScroller(){return this.scrollContainer===this.dataContainerInternal?this.headerHeight():0}headerHeight(){return this.dataTableHeadInternal.offsetHeight}revealNode(e){e.scrollIntoViewIfNeeded(!1),e.offsetTop-this.scrollContainer.scrollTop<this.headerHeight()&&(this.scrollContainer.scrollTop=e.offsetTop-this.headerHeight())}}const f=14;var b;!function(e){e.Ascending="sort-ascending",e.Descending="sort-descending"}(b||(b={}));const C=34,v=3;class N{elementInternal;expandedInternal;selectedInternal;dirty;inactive;key;depthInternal;revealedInternal;attachedInternal;savedPosition;shouldRefreshChildrenInternal;dataInternal;hasChildrenInternal;children;dataGrid;parent;previousSibling;nextSibling;#e=15;selectable;isRoot;nodeAccessibleText;cellAccessibleTextMap;isCreationNode;constructor(e,t){this.elementInternal=null,this.expandedInternal=!1,this.selectedInternal=!1,this.dirty=!1,this.inactive=!1,this.attachedInternal=!1,this.savedPosition=null,this.shouldRefreshChildrenInternal=!0,this.dataInternal=e||{},this.hasChildrenInternal=t||!1,this.children=[],this.dataGrid=null,this.parent=null,this.previousSibling=null,this.nextSibling=null,this.selectable=!0,this.isRoot=!1,this.nodeAccessibleText="",this.cellAccessibleTextMap=new Map,this.isCreationNode=!1}element(){if(!this.elementInternal){const e=this.createElement();this.createCells(e)}return this.elementInternal}createElement(){return this.elementInternal=document.createElement("tr"),this.elementInternal.setAttribute("jslog",`${s.tableRow().track({keydown:"ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter|Space"})}`),this.elementInternal.classList.add("data-grid-data-grid-node"),this.dataGrid&&this.dataGrid.elementToDataGridNode.set(this.elementInternal,this),this.hasChildrenInternal&&this.elementInternal.classList.add("parent"),this.expanded&&this.elementInternal.classList.add("expanded"),this.selected&&this.elementInternal.classList.add("selected"),this.revealed&&this.elementInternal.classList.add("revealed"),this.dirty&&this.elementInternal.classList.add("dirty"),this.inactive&&this.elementInternal.classList.add("inactive"),this.isCreationNode&&this.elementInternal.classList.add("creation-node"),this.elementInternal}existingElement(){return this.elementInternal||null}resetElement(){this.elementInternal=null}createCells(e){if(e.removeChildren(),!this.dataGrid||!this.parent)return;const t=this.dataGrid.visibleColumnsArray,i=[];!this.hasChildrenInternal&&this.parent.isRoot||i.push(a(d.levelS,{PH1:this.depth+1}));for(let s=0;s<t.length;++s){const n=t[s],r=e.appendChild(this.createCell(n.id));"Boolean"===n.dataType&&!0===this.data[n.id]&&this.setCellAccessibleName(a(d.checked),r,n.id),i.push(`${n.title}: ${this.cellAccessibleTextMap.get(n.id)||r.textContent}`)}this.nodeAccessibleText=i.join(", ");const s=this.createTDWithClass("corner");n.ARIAUtils.setHidden(s,!0),e.appendChild(s)}get data(){return this.dataInternal}set data(e){this.dataInternal=e||{},this.refresh()}get revealed(){if(void 0!==this.revealedInternal)return this.revealedInternal;let e=this.parent;for(;e&&!e.isRoot;){if(!e.expanded)return this.revealedInternal=!1,!1;e=e.parent}return this.revealed=!0,!0}set revealed(e){if(this.revealedInternal!==e){this.revealedInternal=e,this.elementInternal&&this.elementInternal.classList.toggle("revealed",this.revealedInternal);for(let t=0;t<this.children.length;++t)this.children[t].revealed=e&&this.expanded}}isDirty(){return this.dirty}setDirty(e){this.dirty!==e&&(this.dirty=e,this.elementInternal&&(e?this.elementInternal.classList.add("dirty"):this.elementInternal.classList.remove("dirty")))}isInactive(){return this.inactive}setInactive(e){this.inactive!==e&&(this.inactive=e,this.elementInternal&&(e?this.elementInternal.classList.add("inactive"):this.elementInternal.classList.remove("inactive")))}hasChildren(){return this.hasChildrenInternal}setHasChildren(e){this.hasChildrenInternal!==e&&(this.hasChildrenInternal=e,this.elementInternal&&(this.elementInternal.classList.toggle("parent",this.hasChildrenInternal),this.elementInternal.classList.toggle("expanded",this.hasChildrenInternal&&this.expanded)))}get depth(){return void 0!==this.depthInternal||(this.parent&&!this.parent.isRoot?this.depthInternal=this.parent.depth+1:this.depthInternal=0),this.depthInternal}get leftPadding(){return this.depth*(this.dataGrid?this.dataGrid.indentWidth:1)}get shouldRefreshChildren(){return this.shouldRefreshChildrenInternal}set shouldRefreshChildren(e){this.shouldRefreshChildrenInternal=e,e&&this.expanded&&this.expand()}get selected(){return this.selectedInternal}set selected(e){e?this.select():this.deselect()}get expanded(){return this.expandedInternal}set expanded(e){e?this.expand():this.collapse()}refresh(){this.dataGrid||(this.elementInternal=null),this.elementInternal&&this.createCells(this.elementInternal)}createTDWithClass(e){const t=document.createElement("td");e&&(t.className=e);const i=this.dataGrid?this.dataGrid.cellClass:null;return i&&t.classList.add(i),t}createTD(e){const t=this.createTDWithClass(e+"-column");if(c.set(t,e),this.dataGrid){const n=this.dataGrid.columns[e].editable;t.setAttribute("jslog",`${s.tableCell().track({click:!0,keydown:!!n&&"Enter|Space|Escape",dblclick:n,change:n}).context(i.StringUtilities.toKebabCase(e))}`);const r=this.dataGrid.columns[e].align;r&&t.classList.add(r),e===this.dataGrid.disclosureColumnId&&(t.classList.add("disclosure"),this.leftPadding&&t.style.setProperty("padding-left",this.leftPadding+"px")),n&&(t.tabIndex=0,t.ariaHasPopup="true")}return t}createCell(e){const t=this.createTD(e),i=this.data[e];return i instanceof Node?t.appendChild(i):null!==i&&this.dataGrid&&this.dataGrid.setElementContent(t,i),t}setCellAccessibleName(e,t,i){this.cellAccessibleTextMap.set(i,e);for(let e=0;e<t.children.length;e++)n.ARIAUtils.markAsHidden(t.children[e]);n.ARIAUtils.setLabel(t,e)}nodeSelfHeight(){return 20}appendChild(e){this.insertChild(e,this.children.length)}resetNode(e){delete this.depthInternal,delete this.revealedInternal,e||(this.previousSibling&&(this.previousSibling.nextSibling=this.nextSibling),this.nextSibling&&(this.nextSibling.previousSibling=this.previousSibling),this.dataGrid=null,this.parent=null,this.nextSibling=null,this.previousSibling=null,this.attachedInternal=!1)}insertChild(e,t){if(!e)throw"insertChild: Node can't be undefined or null.";if(e.parent===this){const i=this.children.indexOf(e);if(i<0&&console.assert(!1,"Inconsistent DataGrid state"),i===t)return;i<t&&--t}e.remove(),this.children.splice(t,0,e),this.setHasChildren(!0),e.parent=this,e.dataGrid=this.dataGrid,e.recalculateSiblings(t),e.shouldRefreshChildrenInternal=!0;let i=e.children[0];for(;i;)i.resetNode(!0),i.dataGrid=this.dataGrid,i.attachedInternal=!1,i.shouldRefreshChildrenInternal=!0,i=i.traverseNextNode(!1,e,!0);this.expanded&&e.attach(),this.revealed||(e.revealed=!1)}remove(){this.parent&&this.parent.removeChild(this)}removeChild(e){if(!e)throw"removeChild: Node can't be undefined or null.";if(e.parent!==this)throw"removeChild: Node is not a child of this node.";this.dataGrid&&this.dataGrid.updateSelectionBeforeRemoval(e,!1),e.detach(),e.resetNode(),i.ArrayUtilities.removeElement(this.children,e,!0),this.children.length<=0&&this.setHasChildren(!1)}removeChildren(){this.dataGrid&&this.dataGrid.updateSelectionBeforeRemoval(this,!0);for(let e=0;e<this.children.length;++e){const t=this.children[e];t.detach(),t.resetNode()}this.children=[],this.setHasChildren(!1)}recalculateSiblings(e){if(!this.parent)return;const t=this.parent.children[e-1]||null;t&&(t.nextSibling=this),this.previousSibling=t;const i=this.parent.children[e+1]||null;i&&(i.previousSibling=this),this.nextSibling=i}collapse(){if(!this.isRoot){this.elementInternal&&this.elementInternal.classList.remove("expanded"),this.expandedInternal=!1,this.selected&&this.dataGrid&&this.dataGrid.announceSelectedGridNode();for(let e=0;e<this.children.length;++e)this.children[e].revealed=!1}}collapseRecursively(){let e=this;for(;e;)e.expanded&&e.collapse(),e=e.traverseNextNode(!1,this,!0)}populate(){}expand(){if(this.hasChildrenInternal&&!this.expandedInternal&&!this.isRoot){if(this.revealed&&!this.shouldRefreshChildrenInternal)for(let e=0;e<this.children.length;++e)this.children[e].revealed=!0;if(this.shouldRefreshChildrenInternal){for(let e=0;e<this.children.length;++e)this.children[e].detach();if(this.populate(),this.attachedInternal)for(let e=0;e<this.children.length;++e){const t=this.children[e];this.revealed&&(t.revealed=!0),t.attach()}this.shouldRefreshChildrenInternal=!1}this.elementInternal&&this.elementInternal.classList.add("expanded"),this.selected&&this.dataGrid&&this.dataGrid.announceSelectedGridNode(),this.expandedInternal=!0}}expandRecursively(){let e=this;for(;e;)e.expand(),e=e.traverseNextNode(!1,this)}reveal(){if(this.isRoot||!this.dataGrid)return;let e=this.parent;for(;e&&!e.isRoot;)e.expanded||e.expand(),e=e.parent;this.dataGrid.revealNode(this.element())}select(e){this.dataGrid&&this.selectable&&!this.selected&&(this.dataGrid.selectedNode&&this.dataGrid.selectedNode.deselect(),this.selectedInternal=!0,this.dataGrid.selectedNode=this,this.elementInternal&&(this.elementInternal.classList.add("selected"),this.elementInternal.focus(),this.dataGrid.setHasSelection(!0),this.dataGrid.announceSelectedGridNode()),e||this.dataGrid.dispatchEventToListeners("SelectedNode",this))}revealAndSelect(){this.isRoot||(this.reveal(),this.select())}deselect(e){this.dataGrid&&this.dataGrid.selectedNode===this&&this.selected&&(this.selectedInternal=!1,this.dataGrid.selectedNode=null,this.elementInternal&&(this.elementInternal.classList.remove("selected"),this.dataGrid.setHasSelection(!1)),e||this.dataGrid.dispatchEventToListeners("DeselectedNode"))}traverseNextNode(e,t,i,s){!i&&this.hasChildrenInternal&&this.populate(),s&&(s.depthChange=0);let n=!e||this.revealed?this.children[0]:null;if(n&&(!e||this.expanded))return s&&(s.depthChange=1),n;if(this===t)return null;if(n=!e||this.revealed?this.nextSibling:null,n)return n;for(n=this;n&&!n.isRoot&&(e&&!n.revealed||!n.nextSibling)&&n.parent!==t;)s&&(s.depthChange-=1),n=n.parent;return n&&(!e||n.revealed)?n.nextSibling:null}traversePreviousNode(e,t){let i=!e||this.revealed?this.previousSibling:null;for(!t&&i&&i.hasChildrenInternal&&i.populate();i&&(!e||i.revealed&&i.expanded)&&i.children[i.children.length-1];)!t&&i.hasChildrenInternal&&i.populate(),i=!e||i.revealed&&i.expanded?i.children[i.children.length-1]:null;return i||(!this.parent||this.parent.isRoot?null:this.parent)}isEventWithinDisclosureTriangle(e){if(!this.hasChildrenInternal)return!1;const t=n.UIUtils.enclosingNodeOrSelfWithNodeName(e.target,"td");if(!(t&&t instanceof HTMLElement&&t.classList.contains("disclosure")))return!1;const i=t.getBoundingClientRect().left+this.leftPadding;return e.pageX>=i&&e.pageX<=i+this.#e}attach(){if(!this.dataGrid||this.attachedInternal)return;this.attachedInternal=!0;const e=this.traversePreviousNode(!0,!0),t=e?e.element():this.dataGrid.topFillerRow;if(this.dataGrid.dataTableBody.insertBefore(this.element(),t.nextSibling),this.expandedInternal)for(let e=0;e<this.children.length;++e)this.children[e].attach()}detach(){if(this.attachedInternal){this.attachedInternal=!1,this.elementInternal&&this.elementInternal.remove();for(let e=0;e<this.children.length;++e)this.children[e].detach()}}savePosition(){if(!this.savedPosition){if(!this.parent)throw"savePosition: Node must have a parent.";this.savedPosition={parent:this.parent,index:this.parent.children.indexOf(this)}}}restorePosition(){this.savedPosition&&(this.parent!==this.savedPosition.parent&&this.savedPosition.parent.insertChild(this,this.savedPosition.index),this.savedPosition=null)}}class x extends N{isCreationNode;constructor(e,t){super(e,t),this.isCreationNode=!0}makeNormal(){this.isCreationNode=!1}}class I extends n.Widget.VBox{dataGrid;constructor(e){super(),this.dataGrid=e,this.element.appendChild(e.element),this.setDefaultFocusedElement(e.element)}wasShown(){this.registerCSSFiles([l]),this.dataGrid.wasShown()}willHide(){this.dataGrid.willHide()}onResize(){this.dataGrid.onResize()}elementsToRestoreScrollPositionsFor(){return[this.dataGrid.scrollContainer]}}var w=Object.freeze({__proto__:null,DataGridImpl:m,CornerWidth:f,get Order(){return b},ColumnResizePadding:C,CenterResizerOverBorderAdjustment:v,DataGridNode:N,CreationDataGridNode:x,DataGridWidget:I});const y=r.RenderCoordinator.RenderCoordinator.instance();class S extends(e.ObjectWrapper.eventMixin(m)){onScrollBound;visibleNodes;stickToBottom;updateIsFromUser;lastScrollTop;firstVisibleIsStriped;isStriped;constructor(e){super(e),this.onScrollBound=this.onScroll.bind(this),this.scrollContainer.addEventListener("scroll",this.onScrollBound,!0),this.visibleNodes=[],this.inline=!1,this.stickToBottom=!1,this.updateIsFromUser=!1,this.lastScrollTop=0,this.firstVisibleIsStriped=!1,this.isStriped=!1,this.setRootNode(new k)}setStriped(e){this.isStriped=e;let t=!0;if(this.visibleNodes.length){const e=this.rootNode().flatChildren();t=Boolean(e.indexOf(this.visibleNodes[0]))}this.updateStripesClass(t)}updateStripesClass(e){this.element.classList.toggle("striped-data-grid",!e&&this.isStriped),this.element.classList.toggle("striped-data-grid-starts-with-odd",e&&this.isStriped)}setScrollContainer(e){this.scrollContainer.removeEventListener("scroll",this.onScrollBound,!0),this.scrollContainerInternal=e,this.scrollContainer.addEventListener("scroll",this.onScrollBound,!0)}onResize(){this.stickToBottom&&(this.scrollContainer.scrollTop=this.scrollContainer.scrollHeight-this.scrollContainer.clientHeight),this.scheduleUpdate(),super.onResize()}setStickToBottom(e){this.stickToBottom=e}onScroll(e){this.lastScrollTop!==this.scrollContainer.scrollTop&&this.scheduleUpdate(!0)}scheduleUpdateStructure(){this.scheduleUpdate()}scheduleUpdate(e){this.updateIsFromUser=this.updateIsFromUser||Boolean(e),y.write("ViewportDataGrid.render",this.update.bind(this))}updateInstantly(){this.update()}renderInline(){this.inline=!0,super.renderInline(),this.update()}calculateVisibleNodes(e,t){const i=this.rootNode().flatChildren();if(this.inline)return{topPadding:0,bottomPadding:0,contentHeight:0,visibleNodes:i,offset:0};const s=i.length;let n=0,r=0;for(;n<s&&r+i[n].nodeSelfHeight()<t;++n)r+=i[n].nodeSelfHeight();const l=n,d=r;for(;n<s&&r<t+e;++n)r+=i[n].nodeSelfHeight();const o=n;let a=0;for(;n<s;++n)a+=i[n].nodeSelfHeight();return this.stickToBottom=o===i.length,{topPadding:d,bottomPadding:a,contentHeight:r-d,visibleNodes:i.slice(l,o),offset:l}}contentHeight(){const e=this.rootNode().flatChildren();let t=0;for(let i=0,s=e.length;i<s;++i)t+=e[i].nodeSelfHeight();return t}update(){const e=this.scrollContainer.clientHeight-this.headerHeightInScroller();let t=this.scrollContainer.scrollTop;const i=t,s=Math.max(0,this.contentHeight()-e);!this.updateIsFromUser&&this.stickToBottom&&(t=s),this.updateIsFromUser=!1,t=Math.min(s,t);const n=this.calculateVisibleNodes(e,t),r=n.visibleNodes,l=new Set(r);for(let e=0;e<this.visibleNodes.length;++e){const t=this.visibleNodes[e];if(!l.has(t)&&t.attached()){const e=t.existingElement();e&&e.remove()}}let d=this.topFillerRowElement();const o=this.dataTableBody;let a=n.offset;if(r.length){const e=this.rootNode().flatChildren().indexOf(r[0]);this.updateStripesClass(Boolean(e%2)),this.stickToBottom&&-1!==e&&Boolean(e%2)!==this.firstVisibleIsStriped&&(a+=1)}this.firstVisibleIsStriped=Boolean(a%2);for(let e=0;e<r.length;++e){const t=r[e],i=t.element();t.setStriped((a+e)%2==0),i!==d.nextSibling&&o.insertBefore(i,d.nextSibling),t.revealed=!0,d=i}this.setVerticalPadding(n.topPadding,n.bottomPadding),this.lastScrollTop=t,t!==i&&(this.scrollContainer.scrollTop=t);const h=n.contentHeight<=e&&n.topPadding+n.bottomPadding===0;h!==this.element.classList.contains("data-grid-fits-viewport")&&(this.element.classList.toggle("data-grid-fits-viewport",h),this.updateWidths()),this.visibleNodes=r,this.dispatchEventToListeners("ViewportCalculated")}revealViewportNode(e){const t=this.rootNode().flatChildren(),i=t.indexOf(e);if(-1===i)return;let s=0;for(let e=0;e<i;++e)s+=t[e].nodeSelfHeight();const n=s+e.nodeSelfHeight();let r=this.scrollContainer.scrollTop;const l=this.scrollContainer.offsetHeight-this.headerHeightInScroller();r>s?(r=s,this.stickToBottom=!1):r+l<n&&(r=n-l),this.scrollContainer.scrollTop=r}}class k extends N{stale;flatNodes;isStripedInternal;constructor(e,t){super(e,t),this.stale=!1,this.flatNodes=null,this.isStripedInternal=!1}element(){const e=this.existingElement(),t=e||this.createElement();return e&&!this.stale||(this.createCells(t),this.stale=!1),t}setStriped(e){this.isStripedInternal=e,this.element().classList.toggle("odd",e)}isStriped(){return this.isStripedInternal}clearFlatNodes(){this.flatNodes=null;const e=this.parent;e&&e.clearFlatNodes()}flatChildren(){if(this.flatNodes)return this.flatNodes;const e=[],t=[this.children],i=[0];let s=0;for(;s>=0;){if(t[s].length<=i[s]){s--;continue}const n=t[s][i[s]++];e.push(n),n.expanded&&n.children.length&&(s++,t[s]=n.children,i[s]=0)}return this.flatNodes=e,e}insertChild(e,t){if(this.clearFlatNodes(),e.parent===this){const i=this.children.indexOf(e);if(i<0&&console.assert(!1,"Inconsistent DataGrid state"),i===t)return;i<t&&--t}e.remove(),e.parent=this,e.dataGrid=this.dataGrid,this.children.length||this.setHasChildren(!0),this.children.splice(t,0,e),e.recalculateSiblings(t),this.expanded&&this.dataGrid&&this.dataGrid.scheduleUpdateStructure()}removeChild(e){if(this.clearFlatNodes(),this.dataGrid&&this.dataGrid.updateSelectionBeforeRemoval(e,!1),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),e.nextSibling&&(e.nextSibling.previousSibling=e.previousSibling),e.parent!==this)throw"removeChild: Node is not a child of this node.";i.ArrayUtilities.removeElement(this.children,e,!0),e.unlink(),this.children.length||this.setHasChildren(!1),this.expanded&&this.dataGrid&&this.dataGrid.scheduleUpdateStructure()}removeChildren(){this.clearFlatNodes(),this.dataGrid&&this.dataGrid.updateSelectionBeforeRemoval(this,!0);for(let e=0;e<this.children.length;++e)this.children[e].unlink();this.children=[],this.expanded&&this.dataGrid&&this.dataGrid.scheduleUpdateStructure()}unlink(){const e=this.existingElement();this.attached()&&e&&e.remove(),this.resetNode()}collapse(){if(!this.expanded)return;this.clearFlatNodes(),this.expandedInternal=!1;const e=this.existingElement();e&&e.classList.remove("expanded"),this.selected&&this.dataGrid.announceSelectedGridNode(),this.dataGrid.scheduleUpdateStructure()}expand(){this.expanded||(this.dataGrid.stickToBottom=!1,this.clearFlatNodes(),super.expand(),this.dataGrid.scheduleUpdateStructure())}attached(){const e=this.existingElement();return Boolean(this.dataGrid&&e&&e.parentElement)}refresh(){this.attached()?(this.stale=!0,this.dataGrid.scheduleUpdate()):this.resetElement()}reveal(){this.dataGrid.revealViewportNode(this)}recalculateSiblings(e){this.clearFlatNodes(),super.recalculateSiblings(e)}}var A=Object.freeze({__proto__:null,ViewportDataGrid:S,ViewportDataGridNode:k});class G extends S{sortingFunction;constructor(e){super(e),this.sortingFunction=G.TrivialComparator,this.setRootNode(new T)}static TrivialComparator(e,t){return 0}static NumericComparator(e,t,i){const s=t.data[e],n=i.data[e],r=Number(s instanceof Node?s.textContent:s),l=Number(n instanceof Node?n.textContent:n);return r<l?-1:r>l?1:0}static StringComparator(e,t,i){const s=t.data[e],n=i.data[e],r=s instanceof Node?s.textContent:String(s),l=n instanceof Node?n.textContent:String(n);return r&&l?r<l?-1:r>l?1:0:0}static Comparator(e,t,i,s){return t?e(s,i):e(i,s)}static create(e,t,i){const s=e.length;if(!s)return null;const n=[];for(let t=0;t<e.length;++t){const i=String(t);n.push({id:i,title:e[t],sortable:!0})}const r=[];for(let i=0;i<t.length/s;++i){const n={};for(let r=0;r<e.length;++r)n[r]=t[s*i+r];const l=new T(n);l.selectable=!1,r.push(l)}const l=new G({displayName:i,columns:n}),d=r.length,o=l.rootNode();for(let e=0;e<d;++e)o.appendChild(r[e]);return l.addEventListener("SortingChanged",(function(){const e=l.rootNode().children,t=l.sortColumnId();if(!t)return;let i=!0;for(let s=0;s<e.length;s++){const n=e[s].data[t];if(isNaN(n instanceof Node?n.textContent:n)){i=!1;break}}const s=i?G.NumericComparator:G.StringComparator;l.sortNodes(s.bind(null,t),!l.isSortOrderAscending())})),l}insertChild(e){this.rootNode().insertChildOrdered(e)}sortNodes(e,t){this.sortingFunction=G.Comparator.bind(null,e,t),this.rootNode().recalculateSiblings(0),this.rootNode().sortChildren(),this.scheduleUpdateStructure()}}class T extends k{constructor(e,t){super(e,t)}insertChildOrdered(e){const t=this.dataGrid;t&&this.insertChild(e,i.ArrayUtilities.upperBound(this.children,e,t.sortingFunction))}sortChildren(){const e=this.dataGrid;if(e){this.children.sort(e.sortingFunction);for(let e=0;e<this.children.length;++e){this.children[e].recalculateSiblings(e)}for(let e=0;e<this.children.length;++e){this.children[e].sortChildren()}}}}var R=Object.freeze({__proto__:null,SortableDataGrid:G,SortableDataGridNode:T});const E={showDBefore:"Show {PH1} before",showDAfter:"Show {PH1} after",showAllD:"Show all {PH1}"},H=t.i18n.registerUIStrings("ui/legacy/components/data_grid/ShowMoreDataGridNode.ts",E),L=t.i18n.getLocalizedString.bind(void 0,H);var W=Object.freeze({__proto__:null,ShowMoreDataGridNode:class extends N{callback;startPosition;endPosition;chunkSize;showNext;showAll;showLast;selectable;hasCells;constructor(e,t,i,s){super({summaryRow:!0},!1),this.callback=e,this.startPosition=t,this.endPosition=i,this.chunkSize=s,this.showNext=n.UIUtils.createTextButton(L(E.showDBefore,{PH1:this.chunkSize})),this.showNext.addEventListener("click",this.showNextChunk.bind(this),!1),this.showAll=n.UIUtils.createTextButton(""),this.showAll.addEventListener("click",this.showAllInternal.bind(this),!1),this.showLast=n.UIUtils.createTextButton(L(E.showDAfter,{PH1:this.chunkSize})),this.showLast.addEventListener("click",this.showLastChunk.bind(this),!1),this.updateLabels(),this.selectable=!1}showNextChunk(){this.callback(this.startPosition,this.startPosition+this.chunkSize)}showAllInternal(){this.callback(this.startPosition,this.endPosition)}showLastChunk(){this.callback(this.endPosition-this.chunkSize,this.endPosition)}updateLabels(){const e=this.endPosition-this.startPosition;e>this.chunkSize?(this.showNext.classList.remove("hidden"),this.showLast.classList.remove("hidden")):(this.showNext.classList.add("hidden"),this.showLast.classList.add("hidden")),this.showAll.textContent=L(E.showAllD,{PH1:e})}createCells(e){this.hasCells=!1,super.createCells(e)}createCell(e){const t=this.createTD(e);return t.classList.add("show-more"),this.hasCells||(this.hasCells=!0,this.depth&&this.dataGrid&&t.style.setProperty("padding-left",this.depth*this.dataGrid.indentWidth+"px"),t.appendChild(this.showNext),t.appendChild(this.showAll),t.appendChild(this.showLast)),t}setStartPosition(e){this.startPosition=e,this.updateLabels()}setEndPosition(e){this.endPosition=e,this.updateLabels()}nodeSelfHeight(){return 40}dispose(){}}});export{w as DataGrid,W as ShowMoreDataGridNode,R as SortableDataGrid,A as ViewportDataGrid};