@e-llm-studio/citation 0.0.69 → 0.0.71

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 (236) hide show
  1. package/dist/_virtual/browser.js +2 -0
  2. package/dist/_virtual/browser.js.map +1 -0
  3. package/dist/_virtual/form_data.js +2 -0
  4. package/dist/_virtual/form_data.js.map +1 -0
  5. package/dist/_virtual/index14.js +2 -0
  6. package/dist/_virtual/index14.js.map +1 -0
  7. package/dist/_virtual/index15.js +2 -0
  8. package/dist/_virtual/index15.js.map +1 -0
  9. package/dist/_virtual/index16.js +2 -0
  10. package/dist/_virtual/index16.js.map +1 -0
  11. package/dist/_virtual/index17.js +2 -0
  12. package/dist/_virtual/index17.js.map +1 -0
  13. package/dist/_virtual/index18.js +2 -0
  14. package/dist/_virtual/index18.js.map +1 -0
  15. package/dist/_virtual/index19.js +2 -0
  16. package/dist/_virtual/index19.js.map +1 -0
  17. package/dist/_virtual/node.js +2 -0
  18. package/dist/_virtual/node.js.map +1 -0
  19. package/dist/_virtual/serialOrdered.js +2 -0
  20. package/dist/_virtual/serialOrdered.js.map +1 -0
  21. package/dist/cjs/_virtual/browser.js +2 -0
  22. package/dist/cjs/_virtual/browser.js.map +1 -0
  23. package/dist/cjs/_virtual/form_data.js +2 -0
  24. package/dist/cjs/_virtual/form_data.js.map +1 -0
  25. package/dist/cjs/_virtual/index14.js +2 -0
  26. package/dist/cjs/_virtual/index14.js.map +1 -0
  27. package/dist/cjs/_virtual/index15.js +2 -0
  28. package/dist/cjs/_virtual/index15.js.map +1 -0
  29. package/dist/cjs/_virtual/index16.js +2 -0
  30. package/dist/cjs/_virtual/index16.js.map +1 -0
  31. package/dist/cjs/_virtual/index17.js +2 -0
  32. package/dist/cjs/_virtual/index17.js.map +1 -0
  33. package/dist/cjs/_virtual/index18.js +2 -0
  34. package/dist/cjs/_virtual/index18.js.map +1 -0
  35. package/dist/cjs/_virtual/index19.js +2 -0
  36. package/dist/cjs/_virtual/index19.js.map +1 -0
  37. package/dist/cjs/_virtual/node.js +2 -0
  38. package/dist/cjs/_virtual/node.js.map +1 -0
  39. package/dist/cjs/_virtual/serialOrdered.js +2 -0
  40. package/dist/cjs/_virtual/serialOrdered.js.map +1 -0
  41. package/dist/cjs/features/Bookemon/BookOverviewCard/BookOverviewCard.js +1 -1
  42. package/dist/cjs/features/Bookemon/BookPreview/BookPreview.js +1 -1
  43. package/dist/cjs/node_modules/asynckit/index.js +2 -0
  44. package/dist/cjs/node_modules/asynckit/index.js.map +1 -0
  45. package/dist/cjs/node_modules/asynckit/lib/abort.js +2 -0
  46. package/dist/cjs/node_modules/asynckit/lib/abort.js.map +1 -0
  47. package/dist/cjs/node_modules/asynckit/lib/async.js +2 -0
  48. package/dist/cjs/node_modules/asynckit/lib/async.js.map +1 -0
  49. package/dist/cjs/node_modules/asynckit/lib/defer.js +2 -0
  50. package/dist/cjs/node_modules/asynckit/lib/defer.js.map +1 -0
  51. package/dist/cjs/node_modules/asynckit/lib/iterate.js +2 -0
  52. package/dist/cjs/node_modules/asynckit/lib/iterate.js.map +1 -0
  53. package/dist/cjs/node_modules/asynckit/lib/state.js +2 -0
  54. package/dist/cjs/node_modules/asynckit/lib/state.js.map +1 -0
  55. package/dist/cjs/node_modules/asynckit/lib/terminator.js +2 -0
  56. package/dist/cjs/node_modules/asynckit/lib/terminator.js.map +1 -0
  57. package/dist/cjs/node_modules/asynckit/parallel.js +2 -0
  58. package/dist/cjs/node_modules/asynckit/parallel.js.map +1 -0
  59. package/dist/cjs/node_modules/asynckit/serial.js +2 -0
  60. package/dist/cjs/node_modules/asynckit/serial.js.map +1 -0
  61. package/dist/cjs/node_modules/asynckit/serialOrdered.js +2 -0
  62. package/dist/cjs/node_modules/asynckit/serialOrdered.js.map +1 -0
  63. package/dist/cjs/node_modules/axios/lib/adapters/http.js +2 -0
  64. package/dist/cjs/node_modules/axios/lib/adapters/http.js.map +1 -0
  65. package/dist/cjs/node_modules/axios/lib/helpers/AxiosTransformStream.js +2 -0
  66. package/dist/cjs/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +1 -0
  67. package/dist/cjs/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +2 -0
  68. package/dist/cjs/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +1 -0
  69. package/dist/cjs/node_modules/axios/lib/helpers/callbackify.js +2 -0
  70. package/dist/cjs/node_modules/axios/lib/helpers/callbackify.js.map +1 -0
  71. package/dist/cjs/node_modules/axios/lib/helpers/formDataToStream.js +2 -0
  72. package/dist/cjs/node_modules/axios/lib/helpers/formDataToStream.js.map +1 -0
  73. package/dist/cjs/node_modules/axios/lib/helpers/fromDataURI.js +2 -0
  74. package/dist/cjs/node_modules/axios/lib/helpers/fromDataURI.js.map +1 -0
  75. package/dist/cjs/node_modules/axios/lib/helpers/readBlob.js +2 -0
  76. package/dist/cjs/node_modules/axios/lib/helpers/readBlob.js.map +1 -0
  77. package/dist/cjs/node_modules/axios/lib/platform/node/classes/FormData.js +2 -0
  78. package/dist/cjs/node_modules/axios/lib/platform/node/classes/FormData.js.map +1 -0
  79. package/dist/cjs/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +2 -0
  80. package/dist/cjs/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +1 -0
  81. package/dist/cjs/node_modules/axios/lib/platform/node/index.js +2 -0
  82. package/dist/cjs/node_modules/axios/lib/platform/node/index.js.map +1 -0
  83. package/dist/cjs/node_modules/combined-stream/lib/combined_stream.js +2 -0
  84. package/dist/cjs/node_modules/combined-stream/lib/combined_stream.js.map +1 -0
  85. package/dist/cjs/node_modules/debug/src/browser.js +2 -0
  86. package/dist/cjs/node_modules/debug/src/browser.js.map +1 -0
  87. package/dist/cjs/node_modules/debug/src/common.js +2 -0
  88. package/dist/cjs/node_modules/debug/src/common.js.map +1 -0
  89. package/dist/cjs/node_modules/debug/src/index.js +2 -0
  90. package/dist/cjs/node_modules/debug/src/index.js.map +1 -0
  91. package/dist/cjs/node_modules/debug/src/node.js +2 -0
  92. package/dist/cjs/node_modules/debug/src/node.js.map +1 -0
  93. package/dist/cjs/node_modules/decode-named-character-reference/index.js +2 -0
  94. package/dist/cjs/node_modules/decode-named-character-reference/index.js.map +1 -0
  95. package/dist/cjs/node_modules/decode-named-character-reference/node_modules/character-entities/index.js +2 -0
  96. package/dist/cjs/node_modules/decode-named-character-reference/node_modules/character-entities/index.js.map +1 -0
  97. package/dist/cjs/node_modules/delayed-stream/lib/delayed_stream.js +2 -0
  98. package/dist/cjs/node_modules/delayed-stream/lib/delayed_stream.js.map +1 -0
  99. package/dist/cjs/node_modules/follow-redirects/debug.js +2 -0
  100. package/dist/cjs/node_modules/follow-redirects/debug.js.map +1 -0
  101. package/dist/cjs/node_modules/follow-redirects/index.js +2 -0
  102. package/dist/cjs/node_modules/follow-redirects/index.js.map +1 -0
  103. package/dist/cjs/node_modules/form-data/lib/form_data.js +2 -0
  104. package/dist/cjs/node_modules/form-data/lib/form_data.js.map +1 -0
  105. package/dist/cjs/node_modules/form-data/lib/populate.js +2 -0
  106. package/dist/cjs/node_modules/form-data/lib/populate.js.map +1 -0
  107. package/dist/cjs/node_modules/has-flag/index.js +2 -0
  108. package/dist/cjs/node_modules/has-flag/index.js.map +1 -0
  109. package/dist/cjs/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js +2 -0
  110. package/dist/cjs/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
  111. package/dist/cjs/node_modules/mdast-util-find-and-replace/lib/index.js +2 -0
  112. package/dist/cjs/node_modules/mdast-util-find-and-replace/lib/index.js.map +1 -0
  113. package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js +2 -0
  114. package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js.map +1 -0
  115. package/dist/cjs/node_modules/mdast-util-newline-to-break/lib/index.js +2 -0
  116. package/dist/cjs/node_modules/mdast-util-newline-to-break/lib/index.js.map +1 -0
  117. package/dist/cjs/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js +2 -0
  118. package/dist/cjs/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
  119. package/dist/cjs/node_modules/mime-db/db.json.js +2 -0
  120. package/dist/cjs/node_modules/mime-db/db.json.js.map +1 -0
  121. package/dist/cjs/node_modules/mime-db/index.js +8 -0
  122. package/dist/cjs/node_modules/mime-db/index.js.map +1 -0
  123. package/dist/cjs/node_modules/mime-types/index.js +8 -0
  124. package/dist/cjs/node_modules/mime-types/index.js.map +1 -0
  125. package/dist/cjs/node_modules/ms/index.js +2 -0
  126. package/dist/cjs/node_modules/ms/index.js.map +1 -0
  127. package/dist/cjs/node_modules/proxy-from-env/index.js +2 -0
  128. package/dist/cjs/node_modules/proxy-from-env/index.js.map +1 -0
  129. package/dist/cjs/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js +2 -0
  130. package/dist/cjs/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
  131. package/dist/cjs/node_modules/react-resizable-panels/dist/react-resizable-panels.js +2 -0
  132. package/dist/cjs/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +1 -0
  133. package/dist/cjs/node_modules/remark-breaks/lib/index.js +2 -0
  134. package/dist/cjs/node_modules/remark-breaks/lib/index.js.map +1 -0
  135. package/dist/cjs/node_modules/supports-color/index.js +2 -0
  136. package/dist/cjs/node_modules/supports-color/index.js.map +1 -0
  137. package/dist/features/Bookemon/BookOverviewCard/BookOverviewCard.js +1 -1
  138. package/dist/features/Bookemon/BookPreview/BookPreview.js +1 -1
  139. package/dist/node_modules/asynckit/index.js +2 -0
  140. package/dist/node_modules/asynckit/index.js.map +1 -0
  141. package/dist/node_modules/asynckit/lib/abort.js +2 -0
  142. package/dist/node_modules/asynckit/lib/abort.js.map +1 -0
  143. package/dist/node_modules/asynckit/lib/async.js +2 -0
  144. package/dist/node_modules/asynckit/lib/async.js.map +1 -0
  145. package/dist/node_modules/asynckit/lib/defer.js +2 -0
  146. package/dist/node_modules/asynckit/lib/defer.js.map +1 -0
  147. package/dist/node_modules/asynckit/lib/iterate.js +2 -0
  148. package/dist/node_modules/asynckit/lib/iterate.js.map +1 -0
  149. package/dist/node_modules/asynckit/lib/state.js +2 -0
  150. package/dist/node_modules/asynckit/lib/state.js.map +1 -0
  151. package/dist/node_modules/asynckit/lib/terminator.js +2 -0
  152. package/dist/node_modules/asynckit/lib/terminator.js.map +1 -0
  153. package/dist/node_modules/asynckit/parallel.js +2 -0
  154. package/dist/node_modules/asynckit/parallel.js.map +1 -0
  155. package/dist/node_modules/asynckit/serial.js +2 -0
  156. package/dist/node_modules/asynckit/serial.js.map +1 -0
  157. package/dist/node_modules/asynckit/serialOrdered.js +2 -0
  158. package/dist/node_modules/asynckit/serialOrdered.js.map +1 -0
  159. package/dist/node_modules/axios/lib/adapters/http.js +2 -0
  160. package/dist/node_modules/axios/lib/adapters/http.js.map +1 -0
  161. package/dist/node_modules/axios/lib/helpers/AxiosTransformStream.js +2 -0
  162. package/dist/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +1 -0
  163. package/dist/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +2 -0
  164. package/dist/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +1 -0
  165. package/dist/node_modules/axios/lib/helpers/callbackify.js +2 -0
  166. package/dist/node_modules/axios/lib/helpers/callbackify.js.map +1 -0
  167. package/dist/node_modules/axios/lib/helpers/formDataToStream.js +2 -0
  168. package/dist/node_modules/axios/lib/helpers/formDataToStream.js.map +1 -0
  169. package/dist/node_modules/axios/lib/helpers/fromDataURI.js +2 -0
  170. package/dist/node_modules/axios/lib/helpers/fromDataURI.js.map +1 -0
  171. package/dist/node_modules/axios/lib/helpers/readBlob.js +2 -0
  172. package/dist/node_modules/axios/lib/helpers/readBlob.js.map +1 -0
  173. package/dist/node_modules/axios/lib/platform/node/classes/FormData.js +2 -0
  174. package/dist/node_modules/axios/lib/platform/node/classes/FormData.js.map +1 -0
  175. package/dist/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +2 -0
  176. package/dist/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +1 -0
  177. package/dist/node_modules/axios/lib/platform/node/index.js +2 -0
  178. package/dist/node_modules/axios/lib/platform/node/index.js.map +1 -0
  179. package/dist/node_modules/combined-stream/lib/combined_stream.js +2 -0
  180. package/dist/node_modules/combined-stream/lib/combined_stream.js.map +1 -0
  181. package/dist/node_modules/debug/src/browser.js +2 -0
  182. package/dist/node_modules/debug/src/browser.js.map +1 -0
  183. package/dist/node_modules/debug/src/common.js +2 -0
  184. package/dist/node_modules/debug/src/common.js.map +1 -0
  185. package/dist/node_modules/debug/src/index.js +2 -0
  186. package/dist/node_modules/debug/src/index.js.map +1 -0
  187. package/dist/node_modules/debug/src/node.js +2 -0
  188. package/dist/node_modules/debug/src/node.js.map +1 -0
  189. package/dist/node_modules/decode-named-character-reference/index.js +2 -0
  190. package/dist/node_modules/decode-named-character-reference/index.js.map +1 -0
  191. package/dist/node_modules/decode-named-character-reference/node_modules/character-entities/index.js +2 -0
  192. package/dist/node_modules/decode-named-character-reference/node_modules/character-entities/index.js.map +1 -0
  193. package/dist/node_modules/delayed-stream/lib/delayed_stream.js +2 -0
  194. package/dist/node_modules/delayed-stream/lib/delayed_stream.js.map +1 -0
  195. package/dist/node_modules/follow-redirects/debug.js +2 -0
  196. package/dist/node_modules/follow-redirects/debug.js.map +1 -0
  197. package/dist/node_modules/follow-redirects/index.js +2 -0
  198. package/dist/node_modules/follow-redirects/index.js.map +1 -0
  199. package/dist/node_modules/form-data/lib/form_data.js +2 -0
  200. package/dist/node_modules/form-data/lib/form_data.js.map +1 -0
  201. package/dist/node_modules/form-data/lib/populate.js +2 -0
  202. package/dist/node_modules/form-data/lib/populate.js.map +1 -0
  203. package/dist/node_modules/has-flag/index.js +2 -0
  204. package/dist/node_modules/has-flag/index.js.map +1 -0
  205. package/dist/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js +2 -0
  206. package/dist/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
  207. package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +2 -0
  208. package/dist/node_modules/mdast-util-find-and-replace/lib/index.js.map +1 -0
  209. package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js +2 -0
  210. package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js.map +1 -0
  211. package/dist/node_modules/mdast-util-newline-to-break/lib/index.js +2 -0
  212. package/dist/node_modules/mdast-util-newline-to-break/lib/index.js.map +1 -0
  213. package/dist/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js +2 -0
  214. package/dist/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
  215. package/dist/node_modules/mime-db/db.json.js +2 -0
  216. package/dist/node_modules/mime-db/db.json.js.map +1 -0
  217. package/dist/node_modules/mime-db/index.js +8 -0
  218. package/dist/node_modules/mime-db/index.js.map +1 -0
  219. package/dist/node_modules/mime-types/index.js +8 -0
  220. package/dist/node_modules/mime-types/index.js.map +1 -0
  221. package/dist/node_modules/ms/index.js +2 -0
  222. package/dist/node_modules/ms/index.js.map +1 -0
  223. package/dist/node_modules/proxy-from-env/index.js +2 -0
  224. package/dist/node_modules/proxy-from-env/index.js.map +1 -0
  225. package/dist/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js +2 -0
  226. package/dist/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
  227. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js +2 -0
  228. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +1 -0
  229. package/dist/node_modules/remark-breaks/lib/index.js +2 -0
  230. package/dist/node_modules/remark-breaks/lib/index.js.map +1 -0
  231. package/dist/node_modules/supports-color/index.js +2 -0
  232. package/dist/node_modules/supports-color/index.js.map +1 -0
  233. package/dist/types/src/BookemonTest.d.ts.map +1 -1
  234. package/dist/types/src/features/Bookemon/BookOverviewCard/BookOverviewCard.d.ts.map +1 -1
  235. package/dist/types/src/features/Bookemon/BookPreview/BookPreview.d.ts.map +1 -1
  236. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../node_modules/proxy-from-env/index.js"],"sourcesContent":["'use strict';\n\nvar parseUrl = require('url').parse;\n\nvar DEFAULT_PORTS = {\n ftp: 21,\n gopher: 70,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443,\n};\n\nvar stringEndsWith = String.prototype.endsWith || function(s) {\n return s.length <= this.length &&\n this.indexOf(s, this.length - s.length) !== -1;\n};\n\n/**\n * @param {string|object} url - The URL, or the result from url.parse.\n * @return {string} The URL of the proxy that should handle the request to the\n * given URL. If no proxy is set, this will be an empty string.\n */\nfunction getProxyForUrl(url) {\n var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {};\n var proto = parsedUrl.protocol;\n var hostname = parsedUrl.host;\n var port = parsedUrl.port;\n if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') {\n return ''; // Don't proxy URLs without a valid scheme or host.\n }\n\n proto = proto.split(':', 1)[0];\n // Stripping ports in this way instead of using parsedUrl.hostname to make\n // sure that the brackets around IPv6 addresses are kept.\n hostname = hostname.replace(/:\\d*$/, '');\n port = parseInt(port) || DEFAULT_PORTS[proto] || 0;\n if (!shouldProxy(hostname, port)) {\n return ''; // Don't proxy URLs that match NO_PROXY.\n }\n\n var proxy =\n getEnv('npm_config_' + proto + '_proxy') ||\n getEnv(proto + '_proxy') ||\n getEnv('npm_config_proxy') ||\n getEnv('all_proxy');\n if (proxy && proxy.indexOf('://') === -1) {\n // Missing scheme in proxy, default to the requested URL's scheme.\n proxy = proto + '://' + proxy;\n }\n return proxy;\n}\n\n/**\n * Determines whether a given URL should be proxied.\n *\n * @param {string} hostname - The host name of the URL.\n * @param {number} port - The effective port of the URL.\n * @returns {boolean} Whether the given URL should be proxied.\n * @private\n */\nfunction shouldProxy(hostname, port) {\n var NO_PROXY =\n (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase();\n if (!NO_PROXY) {\n return true; // Always proxy if NO_PROXY is not set.\n }\n if (NO_PROXY === '*') {\n return false; // Never proxy if wildcard is set.\n }\n\n return NO_PROXY.split(/[,\\s]/).every(function(proxy) {\n if (!proxy) {\n return true; // Skip zero-length hosts.\n }\n var parsedProxy = proxy.match(/^(.+):(\\d+)$/);\n var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;\n var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;\n if (parsedProxyPort && parsedProxyPort !== port) {\n return true; // Skip if ports don't match.\n }\n\n if (!/^[.*]/.test(parsedProxyHostname)) {\n // No wildcards, so stop proxying if there is an exact match.\n return hostname !== parsedProxyHostname;\n }\n\n if (parsedProxyHostname.charAt(0) === '*') {\n // Remove leading wildcard.\n parsedProxyHostname = parsedProxyHostname.slice(1);\n }\n // Stop proxying if the hostname ends with the no_proxy host.\n return !stringEndsWith.call(hostname, parsedProxyHostname);\n });\n}\n\n/**\n * Get the value for an environment variable.\n *\n * @param {string} key - The name of the environment variable.\n * @return {string} The value of the environment variable.\n * @private\n */\nfunction getEnv(key) {\n return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';\n}\n\nexports.getProxyForUrl = getProxyForUrl;\n"],"names":["parseUrl","require$$0","parse","DEFAULT_PORTS","ftp","gopher","http","https","ws","wss","stringEndsWith","String","prototype","endsWith","s","length","this","indexOf","getEnv","key","process","env","toLowerCase","toUpperCase","proxyFromEnv","__exports","getProxyForUrl","url","parsedUrl","proto","protocol","hostname","host","port","split","NO_PROXY","every","proxy","parsedProxy","match","parsedProxyHostname","parsedProxyPort","parseInt","test","charAt","slice","call","shouldProxy","replace"],"mappings":"0QAEA,IAAIA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AQ,WAC/BX,EAAOW,EAAQ,WACfX,EAAO,qBACPA,EAAO,aAKT,OAJImB,IAAmC,IAA1BA,EAAMpB,QAAQ,SAEzBoB,EAAQR,EAAQ,MAAQQ,GAEnBA,CACT"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.color=function(e){return""+e+""};
2
+ //# sourceMappingURL=color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.js","sources":["../../../../../../../node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js"],"sourcesContent":["/**\n * @param {string} d\n * @returns {string}\n */\nexport function color(d) {\n return '\\u001B[33m' + d + '\\u001B[39m'\n}\n"],"names":["d"],"mappings":"kFAIO,SAAeA,GACpB,MAAO,QAAeA,EAAI,OAC5B"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function n(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var t=n(e);const r="undefined"!=typeof window,o=e.createContext(null);o.displayName="PanelGroupContext";const a={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},l=r?e.useLayoutEffect:()=>{},i=t["useId".toString()],u="function"==typeof i?i:()=>null;let s=0;function c(n=null){const t=u(),r=e.useRef(n||t||null);return null===r.current&&(r.current=""+s++),null!=n?n:r.current}function d({children:n,className:t="",collapsedSize:r,collapsible:i,defaultSize:u,forwardedRef:s,id:d,maxSize:f,minSize:p,onCollapse:g,onExpand:y,onResize:m,order:h,style:v,tagName:z="div",...b}){const x=e.useContext(o);if(null===x)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:w,getPanelSize:I,getPanelStyle:E,groupId:P,isPanelCollapsed:C,reevaluatePanelConstraints:A,registerPanel:k,resizePanel:D,unregisterPanel:R}=x,L=c(d),$=e.useRef({callbacks:{onCollapse:g,onExpand:y,onResize:m},constraints:{collapsedSize:r,collapsible:i,defaultSize:u,maxSize:f,minSize:p},id:L,idIsFromProps:void 0!==d,order:h});e.useRef({didLogMissingDefaultSizeWarning:!1}),l((()=>{const{callbacks:e,constraints:n}=$.current,t={...n};$.current.id=L,$.current.idIsFromProps=void 0!==d,$.current.order=h,e.onCollapse=g,e.onExpand=y,e.onResize=m,n.collapsedSize=r,n.collapsible=i,n.defaultSize=u,n.maxSize=f,n.minSize=p,t.collapsedSize===n.collapsedSize&&t.collapsible===n.collapsible&&t.maxSize===n.maxSize&&t.minSize===n.minSize||A($.current,t)})),l((()=>{const e=$.current;return k(e),()=>{R(e)}}),[h,L,k,R]),e.useImperativeHandle(s,(()=>({collapse:()=>{S($.current)},expand:e=>{w($.current,e)},getId:()=>L,getSize:()=>I($.current),isCollapsed:()=>C($.current),isExpanded:()=>!C($.current),resize:e=>{D($.current,e)}})),[S,w,I,C,L,D]);const M=E($.current,u);return e.createElement(z,{...b,children:n,className:t,id:L,style:{...M,...v},[a.groupId]:P,[a.panel]:"",[a.panelCollapsible]:i||void 0,[a.panelId]:L,[a.panelSize]:parseFloat(""+M.flexGrow).toFixed(1)})}const f=e.forwardRef(((n,t)=>e.createElement(d,{...n,forwardedRef:t})));d.displayName="Panel",f.displayName="forwardRef(Panel)";let p=null,g=-1,y=null;function m(e,n,t){var r,o;const a=function(e,n){const t=!!(n&D),r=!!(n&R);if(n){if(n&A)return t?"se-resize":r?"ne-resize":"e-resize";if(n&k)return t?"sw-resize":r?"nw-resize":"w-resize";if(t)return"s-resize";if(r)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}(e,n);if(p!==a){var l;if(p=a,null===y&&(y=document.createElement("style"),document.head.appendChild(y)),g>=0)null===(l=y.sheet)||void 0===l||l.removeRule(g);g=null!==(r=null===(o=y.sheet)||void 0===o?void 0:o.insertRule(`*{cursor: ${a} !important;}`))&&void 0!==r?r:-1}}function h(e){return"keydown"===e.type}function v(e){return e.type.startsWith("pointer")}function z(e){return e.type.startsWith("mouse")}function b(e){if(v(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(z(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function x(e,n,t){return t?e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y:e.x<=n.x+n.width&&e.x+e.width>=n.x&&e.y<=n.y+n.height&&e.y+e.height>=n.y}const S=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function w(e){const n=getComputedStyle(e);return"fixed"===n.position||(!("auto"===n.zIndex||"static"===n.position&&!function(e){var n;const t=getComputedStyle(null!==(n=C(e))&&void 0!==n?n:e).display;return"flex"===t||"inline-flex"===t}(e))||(+n.opacity<1||("transform"in n&&"none"!==n.transform||("webkitTransform"in n&&"none"!==n.webkitTransform||("mixBlendMode"in n&&"normal"!==n.mixBlendMode||("filter"in n&&"none"!==n.filter||("webkitFilter"in n&&"none"!==n.webkitFilter||("isolation"in n&&"isolate"===n.isolation||(!!S.test(n.willChange)||"touch"===n.webkitOverflowScrolling)))))))))}function I(e){let n=e.length;for(;n--;){const t=e[n];if(J(t,"Missing node"),w(t))return t}return null}function E(e){return e&&Number(getComputedStyle(e).zIndex)||0}function P(e){const n=[];for(;e;)n.push(e),e=C(e);return n}function C(e){const{parentNode:n}=e;return n&&n instanceof ShadowRoot?n.host:n}const A=1,k=2,D=4,R=8,L="coarse"===function(){if("function"==typeof matchMedia)return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}();let $=[],M=!1,N=new Map,H=new Map;const F=new Set;function G(e){const{target:n}=e,{x:t,y:r}=b(e);M=!0,j({target:n,x:t,y:r}),_(),$.length>0&&(q("down",e),V(),e.preventDefault(),T(n)||e.stopImmediatePropagation())}function O(e){const{x:n,y:t}=b(e);if(M&&"pointerleave"!==e.type&&0===e.buttons&&(M=!1,q("up",e)),!M){const{target:r}=e;j({target:r,x:n,y:t})}q("move",e),V(),$.length>0&&e.preventDefault()}function B(e){const{target:n}=e,{x:t,y:r}=b(e);H.clear(),M=!1,$.length>0&&(e.preventDefault(),T(n)||e.stopImmediatePropagation()),q("up",e),j({target:n,x:t,y:r}),V(),_()}function T(e){let n=e;for(;n;){if(n.hasAttribute(a.resizeHandle))return!0;n=n.parentElement}return!1}function j({target:e,x:n,y:t}){$.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),F.forEach((e=>{const{element:o,hitAreaMargins:a}=e,l=o.getBoundingClientRect(),{bottom:i,left:u,right:s,top:c}=l,d=L?a.coarse:a.fine;if(n>=u-d&&n<=s+d&&t>=c-d&&t<=i+d){if(null!==r&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&function(e,n){if(e===n)throw new Error("Cannot compare node with itself");const t={a:P(e),b:P(n)};let r;for(;t.a.at(-1)===t.b.at(-1);)e=t.a.pop(),n=t.b.pop(),r=e;J(r,"Stacking order can only be calculated for elements with a common ancestor");const o=E(I(t.a)),a=E(I(t.b));if(o===a){const e=r.childNodes,n={a:t.a.at(-1),b:t.b.at(-1)};let o=e.length;for(;o--;){const t=e[o];if(t===n.a)return 1;if(t===n.b)return-1}}return Math.sign(o-a)}(r,o)>0){let e=r,n=!1;for(;e&&!e.contains(o);){if(x(e.getBoundingClientRect(),l,!0)){n=!0;break}e=e.parentElement}if(n)return}$.push(e)}}))}function U(e,n){H.set(e,n)}function V(){let e=!1,n=!1;$.forEach((t=>{const{direction:r}=t;"horizontal"===r?e=!0:n=!0}));let t=0;H.forEach((e=>{t|=e})),e&&n?m("intersection",t):e?m("horizontal",t):n?m("vertical",t):null!==y&&(document.head.removeChild(y),p=null,y=null,g=-1)}let W;function _(){var e;null===(e=W)||void 0===e||e.abort(),W=new AbortController;const n={capture:!0,signal:W.signal};F.size&&(M?($.length>0&&N.forEach(((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",B,n),r.addEventListener("pointerleave",O,n),r.addEventListener("pointermove",O,n))})),N.forEach(((e,t)=>{const{body:r}=t;r.addEventListener("pointerup",B,n),r.addEventListener("pointercancel",B,n)}))):N.forEach(((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",G,n),r.addEventListener("pointermove",O,n))})))}function q(e,n){F.forEach((t=>{const{setResizeHandlerState:r}=t,o=$.includes(t);r(e,o,n)}))}function J(e,n){if(!e)throw console.error(n),Error(n)}function K(e,n,t=10){return e.toFixed(t)===n.toFixed(t)?0:e>n?1:-1}function X(e,n,t=10){return 0===K(e,n,t)}function Y(e,n,t){return 0===K(e,n,t)}function Q({panelConstraints:e,panelIndex:n,size:t}){const r=e[n];J(null!=r,`Panel constraints not found for index ${n}`);let{collapsedSize:o=0,collapsible:a,maxSize:l=100,minSize:i=0}=r;if(K(t,i)<0)if(a){t=K(t,(o+i)/2)<0?o:i}else t=i;return t=Math.min(l,t),t=parseFloat(t.toFixed(10))}function Z({delta:e,initialLayout:n,panelConstraints:t,pivotIndices:r,prevLayout:o,trigger:a}){if(Y(e,0))return n;const l=[...n],[i,u]=r;J(null!=i,"Invalid first pivot index"),J(null!=u,"Invalid second pivot index");let s=0;if("keyboard"===a){{const r=e<0?u:i,o=t[r];J(o,`Panel constraints not found for index ${r}`);const{collapsedSize:a=0,collapsible:l,minSize:s=0}=o;if(l){const t=n[r];if(J(null!=t,`Previous layout not found for panel index ${r}`),Y(t,a)){const n=s-t;K(n,Math.abs(e))>0&&(e=e<0?0-n:n)}}}{const r=e<0?i:u,o=t[r];J(o,`No panel constraints found for index ${r}`);const{collapsedSize:a=0,collapsible:l,minSize:s=0}=o;if(l){const t=n[r];if(J(null!=t,`Previous layout not found for panel index ${r}`),Y(t,s)){const n=t-a;K(n,Math.abs(e))>0&&(e=e<0?0-n:n)}}}}{const r=e<0?1:-1;let o=e<0?u:i,a=0;for(;;){const e=n[o];J(null!=e,`Previous layout not found for panel index ${o}`);if(a+=Q({panelConstraints:t,panelIndex:o,size:100})-e,o+=r,o<0||o>=t.length)break}const l=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-l:l}{let r=e<0?i:u;for(;r>=0&&r<t.length;){const o=Math.abs(e)-Math.abs(s),a=n[r];J(null!=a,`Previous layout not found for panel index ${r}`);const i=Q({panelConstraints:t,panelIndex:r,size:a-o});if(!Y(a,i)&&(s+=a-i,l[r]=i,s.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(function(e,n,t){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!Y(e[r],n[r],t))return!1;return!0}(o,l))return o;{const r=e<0?u:i,o=n[r];J(null!=o,`Previous layout not found for panel index ${r}`);const a=o+s,c=Q({panelConstraints:t,panelIndex:r,size:a});if(l[r]=c,!Y(c,a)){let n=a-c;let r=e<0?u:i;for(;r>=0&&r<t.length;){const o=l[r];J(null!=o,`Previous layout not found for panel index ${r}`);const a=Q({panelConstraints:t,panelIndex:r,size:o+n});if(Y(o,a)||(n-=a-o,l[r]=a),Y(n,0))break;e>0?r--:r++}}}return Y(l.reduce(((e,n)=>n+e),0),100)?l:o}function ee({layout:e,panelsArray:n,pivotIndices:t}){let r=0,o=100,a=0,l=0;const i=t[0];J(null!=i,"No pivot index found"),n.forEach(((e,n)=>{const{constraints:t}=e,{maxSize:u=100,minSize:s=0}=t;n===i?(r=s,o=u):(a+=s,l+=u)}));return{valueMax:Math.min(o,100-a),valueMin:Math.max(r,100-l),valueNow:e[i]}}function ne(e,n=document){return Array.from(n.querySelectorAll(`[${a.resizeHandleId}][data-panel-group-id="${e}"]`))}function te(e,n,t=document){const r=ne(e,t).findIndex((e=>e.getAttribute(a.resizeHandleId)===n));return null!=r?r:null}function re(e,n,t){const r=te(e,n,t);return null!=r?[r,r+1]:[-1,-1]}function oe(e,n=document){if(((t=n)instanceof HTMLElement||"object"==typeof t&&null!==t&&"tagName"in t&&"getAttribute"in t)&&n.dataset.panelGroupId==e)return n;var t;const r=n.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function ae(e,n=document){const t=n.querySelector(`[${a.resizeHandleId}="${e}"]`);return t||null}function le(e,n,t,r=document){var o,a,l,i;const u=ae(n,r),s=ne(e,r),c=u?s.indexOf(u):-1;return[null!==(o=null===(a=t[c])||void 0===a?void 0:a.id)&&void 0!==o?o:null,null!==(l=null===(i=t[c+1])||void 0===i?void 0:i.id)&&void 0!==l?l:null]}function ie(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function ue(e,n){const t="horizontal"===e,{x:r,y:o}=b(n);return t?r:o}function se(e,n,t,r,o,l){if(h(e)){const n="horizontal"===t;let r=0;r=e.shiftKey?100:null!=o?o:10;let a=0;switch(e.key){case"ArrowDown":a=n?0:r;break;case"ArrowLeft":a=n?-r:0;break;case"ArrowRight":a=n?r:0;break;case"ArrowUp":a=n?0:-r;break;case"End":a=100;break;case"Home":a=-100}return a}return null==r?0:function(e,n,t,r,o){const l="horizontal"===t,i=ae(n,o);J(i,`No resize handle element found for id "${n}"`);const u=i.getAttribute(a.groupId);J(u,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const c=ue(t,e),d=oe(u,o);J(d,`No group element found for id "${u}"`);const f=d.getBoundingClientRect();return(c-s)/(l?f.width:f.height)*100}(e,n,t,r,l)}function ce(e,n,t){n.forEach(((n,r)=>{const o=e[r];J(o,`Panel data not found for index ${r}`);const{callbacks:a,constraints:l,id:i}=o,{collapsedSize:u=0,collapsible:s}=l,c=t[i];if(null==c||n!==c){t[i]=n;const{onCollapse:e,onExpand:r,onResize:o}=a;o&&o(n,c),s&&(e||r)&&(!r||null!=c&&!X(c,u)||X(n,u)||r(),!e||null!=c&&X(c,u)||!X(n,u)||e())}}))}function de(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!=n[t])return!1;return!0}function fe(e){try{if("undefined"==typeof localStorage)throw new Error("localStorage not supported in this environment");e.getItem=e=>localStorage.getItem(e),e.setItem=(e,n)=>{localStorage.setItem(e,n)}}catch(n){console.error(n),e.getItem=()=>null,e.setItem=()=>{}}}function pe(e){return`react-resizable-panels:${e}`}function ge(e){return e.map((e=>{const{constraints:n,id:t,idIsFromProps:r,order:o}=e;return r?t:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)})).sort(((e,n)=>e.localeCompare(n))).join(",")}function ye(e,n){try{const t=pe(e),r=n.getItem(t);if(r){const e=JSON.parse(r);if("object"==typeof e&&null!=e)return e}}catch(e){}return null}function me(e,n,t,r,o){var a;const l=pe(e),i=ge(n),u=null!==(a=ye(e,o))&&void 0!==a?a:{};u[i]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{o.setItem(l,JSON.stringify(u))}catch(e){console.error(e)}}function he({layout:e,panelConstraints:n}){const t=[...e],r=t.reduce(((e,n)=>e+n),0);if(t.length!==n.length)throw Error(`Invalid ${n.length} panel layout: ${t.map((e=>`${e}%`)).join(", ")}`);if(!Y(r,100)&&t.length>0)for(let e=0;e<n.length;e++){const n=t[e];J(null!=n,`No layout data found for index ${e}`);const o=100/r*n;t[e]=o}let o=0;for(let e=0;e<n.length;e++){const r=t[e];J(null!=r,`No layout data found for index ${e}`);const a=Q({panelConstraints:n,panelIndex:e,size:r});r!=a&&(o+=r-a,t[e]=a)}if(!Y(o,0))for(let e=0;e<n.length;e++){const r=t[e];J(null!=r,`No layout data found for index ${e}`);const a=Q({panelConstraints:n,panelIndex:e,size:r+o});if(r!==a&&(o-=a-r,t[e]=a,Y(o,0)))break}return t}const ve={getItem:e=>(fe(ve),ve.getItem(e)),setItem:(e,n)=>{fe(ve),ve.setItem(e,n)}},ze={};function be({autoSaveId:n=null,children:t,className:r="",direction:i,forwardedRef:u,id:s=null,onLayout:d=null,keyboardResizeBy:f=null,storage:p=ve,style:g,tagName:y="div",...m}){const b=c(s),x=e.useRef(null),[S,w]=e.useState(null),[I,E]=e.useState([]),P=function(){const[n,t]=e.useState(0);return e.useCallback((()=>t((e=>e+1))),[])}(),C=e.useRef({}),L=e.useRef(new Map),$=e.useRef(0),M=e.useRef({autoSaveId:n,direction:i,dragState:S,id:b,keyboardResizeBy:f,onLayout:d,storage:p}),N=e.useRef({layout:I,panelDataArray:[],panelDataArrayChanged:!1});e.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),e.useImperativeHandle(u,(()=>({getId:()=>M.current.id,getLayout:()=>{const{layout:e}=N.current;return e},setLayout:e=>{const{onLayout:n}=M.current,{layout:t,panelDataArray:r}=N.current,o=he({layout:e,panelConstraints:r.map((e=>e.constraints))});ie(t,o)||(E(o),N.current.layout=o,n&&n(o),ce(r,o,C.current))}})),[]),l((()=>{M.current.autoSaveId=n,M.current.direction=i,M.current.dragState=S,M.current.id=b,M.current.onLayout=d,M.current.storage=p})),function({committedValuesRef:n,eagerValuesRef:t,groupId:r,layout:o,panelDataArray:i,panelGroupElement:u,setLayout:s}){e.useRef({didWarnAboutMissingResizeHandle:!1}),l((()=>{if(!u)return;const e=ne(r,u);for(let n=0;n<i.length-1;n++){const{valueMax:t,valueMin:r,valueNow:a}=ee({layout:o,panelsArray:i,pivotIndices:[n,n+1]}),l=e[n];if(null==l);else{const e=i[n];J(e,`No panel data found for index "${n}"`),l.setAttribute("aria-controls",e.id),l.setAttribute("aria-valuemax",""+Math.round(t)),l.setAttribute("aria-valuemin",""+Math.round(r)),l.setAttribute("aria-valuenow",null!=a?""+Math.round(a):"")}}return()=>{e.forEach(((e,n)=>{e.removeAttribute("aria-controls"),e.removeAttribute("aria-valuemax"),e.removeAttribute("aria-valuemin"),e.removeAttribute("aria-valuenow")}))}}),[r,o,i,u]),e.useEffect((()=>{if(!u)return;const e=t.current;J(e,"Eager values not found");const{panelDataArray:n}=e;J(null!=oe(r,u),`No group found for id "${r}"`);const l=ne(r,u);J(l,`No resize handles found for group id "${r}"`);const i=l.map((e=>{const t=e.getAttribute(a.resizeHandleId);J(t,"Resize handle element has no handle id attribute");const[l,i]=le(r,t,n,u);if(null==l||null==i)return()=>{};const c=e=>{if(!e.defaultPrevented)switch(e.key){case"Enter":{e.preventDefault();const a=n.findIndex((e=>e.id===l));if(a>=0){const e=n[a];J(e,`No panel data found for index ${a}`);const l=o[a],{collapsedSize:i=0,collapsible:c,minSize:d=0}=e.constraints;if(null!=l&&c){const e=Z({delta:Y(l,i)?d-i:i-l,initialLayout:o,panelConstraints:n.map((e=>e.constraints)),pivotIndices:re(r,t,u),prevLayout:o,trigger:"keyboard"});o!==e&&s(e)}}break}}};return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}));return()=>{i.forEach((e=>e()))}}),[u,n,t,r,o,i,s])}({committedValuesRef:M,eagerValuesRef:N,groupId:b,layout:I,panelDataArray:N.current.panelDataArray,setLayout:E,panelGroupElement:x.current}),e.useEffect((()=>{const{panelDataArray:e}=N.current;if(n){if(0===I.length||I.length!==e.length)return;let t=ze[n];null==t&&(t=function(e,n=10){let t=null;return(...r)=>{null!==t&&clearTimeout(t),t=setTimeout((()=>{e(...r)}),n)}}(me,100),ze[n]=t);const r=[...e],o=new Map(L.current);t(n,r,o,I,p)}}),[n,I,p]),e.useEffect((()=>{}));const H=e.useCallback((e=>{const{onLayout:n}=M.current,{layout:t,panelDataArray:r}=N.current;if(e.constraints.collapsible){const o=r.map((e=>e.constraints)),{collapsedSize:a=0,panelSize:l,pivotIndices:i}=we(r,e,t);if(J(null!=l,`Panel size not found for panel "${e.id}"`),!X(l,a)){L.current.set(e.id,l);const u=Z({delta:Se(r,e)===r.length-1?l-a:a-l,initialLayout:t,panelConstraints:o,pivotIndices:i,prevLayout:t,trigger:"imperative-api"});de(t,u)||(E(u),N.current.layout=u,n&&n(u),ce(r,u,C.current))}}}),[]),F=e.useCallback(((e,n)=>{const{onLayout:t}=M.current,{layout:r,panelDataArray:o}=N.current;if(e.constraints.collapsible){const a=o.map((e=>e.constraints)),{collapsedSize:l=0,panelSize:i=0,minSize:u=0,pivotIndices:s}=we(o,e,r),c=null!=n?n:u;if(X(i,l)){const n=L.current.get(e.id),l=null!=n&&n>=c?n:c,u=Z({delta:Se(o,e)===o.length-1?i-l:l-i,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:"imperative-api"});de(r,u)||(E(u),N.current.layout=u,t&&t(u),ce(o,u,C.current))}}}),[]),G=e.useCallback((e=>{const{layout:n,panelDataArray:t}=N.current,{panelSize:r}=we(t,e,n);return J(null!=r,`Panel size not found for panel "${e.id}"`),r}),[]),O=e.useCallback(((e,n)=>{const{panelDataArray:t}=N.current,r=Se(t,e);return function({defaultSize:e,dragState:n,layout:t,panelData:r,panelIndex:o,precision:a=3}){const l=t[o];let i;return i=null==l?null!=e?e.toFixed(a):"1":1===r.length?"1":l.toFixed(a),{flexBasis:0,flexGrow:i,flexShrink:1,overflow:"hidden",pointerEvents:null!==n?"none":void 0}}({defaultSize:n,dragState:S,layout:I,panelData:t,panelIndex:r})}),[S,I]),B=e.useCallback((e=>{const{layout:n,panelDataArray:t}=N.current,{collapsedSize:r=0,collapsible:o,panelSize:a}=we(t,e,n);return J(null!=a,`Panel size not found for panel "${e.id}"`),!0===o&&X(a,r)}),[]),T=e.useCallback((e=>{const{layout:n,panelDataArray:t}=N.current,{collapsedSize:r=0,collapsible:o,panelSize:a}=we(t,e,n);return J(null!=a,`Panel size not found for panel "${e.id}"`),!o||K(a,r)>0}),[]),j=e.useCallback((e=>{const{panelDataArray:n}=N.current;n.push(e),n.sort(((e,n)=>{const t=e.order,r=n.order;return null==t&&null==r?0:null==t?-1:null==r?1:t-r})),N.current.panelDataArrayChanged=!0,P()}),[P]);l((()=>{if(N.current.panelDataArrayChanged){N.current.panelDataArrayChanged=!1;const{autoSaveId:e,onLayout:n,storage:t}=M.current,{layout:r,panelDataArray:o}=N.current;let a=null;if(e){const n=function(e,n,t){var r,o;return null!==(o=(null!==(r=ye(e,t))&&void 0!==r?r:{})[ge(n)])&&void 0!==o?o:null}(e,o,t);n&&(L.current=new Map(Object.entries(n.expandToSizes)),a=n.layout)}null==a&&(a=function({panelDataArray:e}){const n=Array(e.length),t=e.map((e=>e.constraints));let r=0,o=100;for(let a=0;a<e.length;a++){const e=t[a];J(e,`Panel constraints not found for index ${a}`);const{defaultSize:l}=e;null!=l&&(r++,n[a]=l,o-=l)}for(let a=0;a<e.length;a++){const l=t[a];J(l,`Panel constraints not found for index ${a}`);const{defaultSize:i}=l;if(null!=i)continue;const u=o/(e.length-r);r++,n[a]=u,o-=u}return n}({panelDataArray:o}));const l=he({layout:a,panelConstraints:o.map((e=>e.constraints))});ie(r,l)||(E(l),N.current.layout=l,n&&n(l),ce(o,l,C.current))}})),l((()=>{const e=N.current;return()=>{e.layout=[]}}),[]);const V=e.useCallback((e=>{let n=!1;const t=x.current;if(t){"rtl"===window.getComputedStyle(t,null).getPropertyValue("direction")&&(n=!0)}return function(t){t.preventDefault();const r=x.current;if(!r)return()=>null;const{direction:o,dragState:a,id:l,keyboardResizeBy:i,onLayout:u}=M.current,{layout:s,panelDataArray:c}=N.current,{initialLayout:d}=null!=a?a:{},f=re(l,e,r);let p=se(t,e,o,a,i,r);const g="horizontal"===o;g&&n&&(p=-p);const y=Z({delta:p,initialLayout:null!=d?d:s,panelConstraints:c.map((e=>e.constraints)),pivotIndices:f,prevLayout:s,trigger:h(t)?"keyboard":"mouse-or-touch"}),m=!de(s,y);(v(t)||z(t))&&$.current!=p&&($.current=p,U(e,m||0===p?0:g?p<0?A:k:p<0?D:R)),m&&(E(y),N.current.layout=y,u&&u(y),ce(c,y,C.current))}}),[]),W=e.useCallback(((e,n)=>{const{onLayout:t}=M.current,{layout:r,panelDataArray:o}=N.current,a=o.map((e=>e.constraints)),{panelSize:l,pivotIndices:i}=we(o,e,r);J(null!=l,`Panel size not found for panel "${e.id}"`);const u=Z({delta:Se(o,e)===o.length-1?l-n:n-l,initialLayout:r,panelConstraints:a,pivotIndices:i,prevLayout:r,trigger:"imperative-api"});de(r,u)||(E(u),N.current.layout=u,t&&t(u),ce(o,u,C.current))}),[]),_=e.useCallback(((e,n)=>{const{layout:t,panelDataArray:r}=N.current,{collapsedSize:o=0,collapsible:a}=n,{collapsedSize:l=0,collapsible:i,maxSize:u=100,minSize:s=0}=e.constraints,{panelSize:c}=we(r,e,t);null!=c&&(a&&i&&X(c,o)?X(o,l)||W(e,l):c<s?W(e,s):c>u&&W(e,u))}),[W]),q=e.useCallback(((e,n)=>{const{direction:t}=M.current,{layout:r}=N.current;if(!x.current)return;const o=ae(e,x.current);J(o,`Drag handle element not found for id "${e}"`);const a=ue(t,n);w({dragHandleId:e,dragHandleRect:o.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})}),[]),Q=e.useCallback((()=>{w(null)}),[]),te=e.useCallback((e=>{const{panelDataArray:n}=N.current,t=Se(n,e);t>=0&&(n.splice(t,1),delete C.current[e.id],N.current.panelDataArrayChanged=!0,P())}),[P]),fe=e.useMemo((()=>({collapsePanel:H,direction:i,dragState:S,expandPanel:F,getPanelSize:G,getPanelStyle:O,groupId:b,isPanelCollapsed:B,isPanelExpanded:T,reevaluatePanelConstraints:_,registerPanel:j,registerResizeHandle:V,resizePanel:W,startDragging:q,stopDragging:Q,unregisterPanel:te,panelGroupElement:x.current})),[H,S,i,F,G,O,b,B,T,_,j,V,W,q,Q,te]),pe={display:"flex",flexDirection:"horizontal"===i?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return e.createElement(o.Provider,{value:fe},e.createElement(y,{...m,children:t,className:r,id:s,ref:x,style:{...pe,...g},[a.group]:"",[a.groupDirection]:i,[a.groupId]:b}))}const xe=e.forwardRef(((n,t)=>e.createElement(be,{...n,forwardedRef:t})));function Se(e,n){return e.findIndex((e=>e===n||e.id===n.id))}function we(e,n,t){const r=Se(e,n),o=r===e.length-1?[r-1,r]:[r,r+1],a=t[r];return{...n.constraints,panelSize:a,pivotIndices:o}}function Ie({children:n=null,className:t="",disabled:r=!1,hitAreaMargins:i,id:u,onBlur:s,onClick:d,onDragging:f,onFocus:p,onPointerDown:g,onPointerUp:y,style:m={},tabIndex:h=0,tagName:v="div",...z}){var b,x;const S=e.useRef(null),w=e.useRef({onClick:d,onDragging:f,onPointerDown:g,onPointerUp:y});e.useEffect((()=>{w.current.onClick=d,w.current.onDragging=f,w.current.onPointerDown=g,w.current.onPointerUp=y}));const I=e.useContext(o);if(null===I)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:E,groupId:P,registerResizeHandle:C,startDragging:A,stopDragging:k,panelGroupElement:D}=I,R=c(u),[L,M]=e.useState("inactive"),[G,O]=e.useState(!1),[B,T]=e.useState(null),j=e.useRef({state:L});l((()=>{j.current.state=L})),e.useEffect((()=>{if(r)T(null);else{const e=C(R);T((()=>e))}}),[r,R,C]);const U=null!==(b=null==i?void 0:i.coarse)&&void 0!==b?b:15,W=null!==(x=null==i?void 0:i.fine)&&void 0!==x?x:5;e.useEffect((()=>{if(r||null==B)return;const e=S.current;J(e,"Element ref not attached");let n=!1;return function(e,n,t,r,o){var a;const{ownerDocument:l}=n,i={direction:t,element:n,hitAreaMargins:r,setResizeHandlerState:o},u=null!==(a=N.get(l))&&void 0!==a?a:0;return N.set(l,u+1),F.add(i),_(),function(){var n;H.delete(e),F.delete(i);const t=null!==(n=N.get(l))&&void 0!==n?n:1;if(N.set(l,t-1),_(),1===t&&N.delete(l),$.includes(i)){const e=$.indexOf(i);e>=0&&$.splice(e,1),V(),o("up",!0,null)}}}(R,e,E,{coarse:U,fine:W},((e,t,r)=>{if(t)switch(e){case"down":{M("drag"),n=!1,J(r,'Expected event to be defined for "down" action'),A(R,r);const{onDragging:e,onPointerDown:t}=w.current;null==e||e(!0),null==t||t();break}case"move":{const{state:e}=j.current;n=!0,"drag"!==e&&M("hover"),J(r,'Expected event to be defined for "move" action'),B(r);break}case"up":{M("hover"),k();const{onClick:e,onDragging:t,onPointerUp:r}=w.current;null==t||t(!1),null==r||r(),n||null==e||e();break}}else M("inactive")}))}),[U,E,r,W,C,R,B,A,k]),function({disabled:n,handleId:t,resizeHandler:r,panelGroupElement:o}){e.useEffect((()=>{if(n||null==r||null==o)return;const e=ae(t,o);if(null==e)return;const l=n=>{if(!n.defaultPrevented)switch(n.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":n.preventDefault(),r(n);break;case"F6":{n.preventDefault();const r=e.getAttribute(a.groupId);J(r,`No group element found for id "${r}"`);const l=ne(r,o),i=te(r,t,o);J(null!==i,`No resize element found for id "${t}"`),l[n.shiftKey?i>0?i-1:l.length-1:i+1<l.length?i+1:0].focus();break}}};return e.addEventListener("keydown",l),()=>{e.removeEventListener("keydown",l)}}),[o,n,t,r])}({disabled:r,handleId:R,resizeHandler:B,panelGroupElement:D});return e.createElement(v,{...z,children:n,className:t,id:u,onBlur:()=>{O(!1),null==s||s()},onFocus:()=>{O(!0),null==p||p()},ref:S,role:"separator",style:{touchAction:"none",userSelect:"none",...m},tabIndex:h,[a.groupDirection]:E,[a.groupId]:P,[a.resizeHandle]:"",[a.resizeHandleActive]:"drag"===L?"pointer":G?"keyboard":void 0,[a.resizeHandleEnabled]:!r,[a.resizeHandleId]:R,[a.resizeHandleState]:L})}be.displayName="PanelGroup",xe.displayName="forwardRef(PanelGroup)",Ie.displayName="PanelResizeHandle",exports.DATA_ATTRIBUTES=a,exports.Panel=f,exports.PanelGroup=xe,exports.PanelResizeHandle=Ie,exports.assert=J,exports.getPanelGroupElement=oe,exports.getResizeHandleElement=ae,exports.getResizeHandleElementIndex=te,exports.getResizeHandleElementsForGroup=ne,exports.getResizeHandlePanelIds=le,exports.intersects=x;
2
+ //# sourceMappingURL=react-resizable-panels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-resizable-panels.js","sources":["../../../../../node_modules/react-resizable-panels/dist/react-resizable-panels.js"],"sourcesContent":["import * as React from 'react';\nimport { createContext, useLayoutEffect, useRef, forwardRef, createElement, useContext, useImperativeHandle, useState, useCallback, useEffect, useMemo } from 'react';\n\nconst isBrowser = typeof window !== \"undefined\";\n\n// The \"contextmenu\" event is not supported as a PointerEvent in all browsers yet, so MouseEvent still need to be handled\n\nconst PanelGroupContext = createContext(null);\nPanelGroupContext.displayName = \"PanelGroupContext\";\n\nconst DATA_ATTRIBUTES = {\n group: \"data-panel-group\",\n groupDirection: \"data-panel-group-direction\",\n groupId: \"data-panel-group-id\",\n panel: \"data-panel\",\n panelCollapsible: \"data-panel-collapsible\",\n panelId: \"data-panel-id\",\n panelSize: \"data-panel-size\",\n resizeHandle: \"data-resize-handle\",\n resizeHandleActive: \"data-resize-handle-active\",\n resizeHandleEnabled: \"data-panel-resize-handle-enabled\",\n resizeHandleId: \"data-panel-resize-handle-id\",\n resizeHandleState: \"data-resize-handle-state\"\n};\nconst PRECISION = 10;\n\nconst useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : () => {};\n\nconst useId = React[\"useId\".toString()];\nconst wrappedUseId = typeof useId === \"function\" ? useId : () => null;\nlet counter = 0;\nfunction useUniqueId(idFromParams = null) {\n const idFromUseId = wrappedUseId();\n const idRef = useRef(idFromParams || idFromUseId || null);\n if (idRef.current === null) {\n idRef.current = \"\" + counter++;\n }\n return idFromParams !== null && idFromParams !== void 0 ? idFromParams : idRef.current;\n}\n\nfunction PanelWithForwardedRef({\n children,\n className: classNameFromProps = \"\",\n collapsedSize,\n collapsible,\n defaultSize,\n forwardedRef,\n id: idFromProps,\n maxSize,\n minSize,\n onCollapse,\n onExpand,\n onResize,\n order,\n style: styleFromProps,\n tagName: Type = \"div\",\n ...rest\n}) {\n const context = useContext(PanelGroupContext);\n if (context === null) {\n throw Error(`Panel components must be rendered within a PanelGroup container`);\n }\n const {\n collapsePanel,\n expandPanel,\n getPanelSize,\n getPanelStyle,\n groupId,\n isPanelCollapsed,\n reevaluatePanelConstraints,\n registerPanel,\n resizePanel,\n unregisterPanel\n } = context;\n const panelId = useUniqueId(idFromProps);\n const panelDataRef = useRef({\n callbacks: {\n onCollapse,\n onExpand,\n onResize\n },\n constraints: {\n collapsedSize,\n collapsible,\n defaultSize,\n maxSize,\n minSize\n },\n id: panelId,\n idIsFromProps: idFromProps !== undefined,\n order\n });\n useRef({\n didLogMissingDefaultSizeWarning: false\n });\n useIsomorphicLayoutEffect(() => {\n const {\n callbacks,\n constraints\n } = panelDataRef.current;\n const prevConstraints = {\n ...constraints\n };\n panelDataRef.current.id = panelId;\n panelDataRef.current.idIsFromProps = idFromProps !== undefined;\n panelDataRef.current.order = order;\n callbacks.onCollapse = onCollapse;\n callbacks.onExpand = onExpand;\n callbacks.onResize = onResize;\n constraints.collapsedSize = collapsedSize;\n constraints.collapsible = collapsible;\n constraints.defaultSize = defaultSize;\n constraints.maxSize = maxSize;\n constraints.minSize = minSize;\n\n // If constraints have changed, we should revisit panel sizes.\n // This is uncommon but may happen if people are trying to implement pixel based constraints.\n if (prevConstraints.collapsedSize !== constraints.collapsedSize || prevConstraints.collapsible !== constraints.collapsible || prevConstraints.maxSize !== constraints.maxSize || prevConstraints.minSize !== constraints.minSize) {\n reevaluatePanelConstraints(panelDataRef.current, prevConstraints);\n }\n });\n useIsomorphicLayoutEffect(() => {\n const panelData = panelDataRef.current;\n registerPanel(panelData);\n return () => {\n unregisterPanel(panelData);\n };\n }, [order, panelId, registerPanel, unregisterPanel]);\n useImperativeHandle(forwardedRef, () => ({\n collapse: () => {\n collapsePanel(panelDataRef.current);\n },\n expand: minSize => {\n expandPanel(panelDataRef.current, minSize);\n },\n getId() {\n return panelId;\n },\n getSize() {\n return getPanelSize(panelDataRef.current);\n },\n isCollapsed() {\n return isPanelCollapsed(panelDataRef.current);\n },\n isExpanded() {\n return !isPanelCollapsed(panelDataRef.current);\n },\n resize: size => {\n resizePanel(panelDataRef.current, size);\n }\n }), [collapsePanel, expandPanel, getPanelSize, isPanelCollapsed, panelId, resizePanel]);\n const style = getPanelStyle(panelDataRef.current, defaultSize);\n return createElement(Type, {\n ...rest,\n children,\n className: classNameFromProps,\n id: panelId,\n style: {\n ...style,\n ...styleFromProps\n },\n // CSS selectors\n [DATA_ATTRIBUTES.groupId]: groupId,\n [DATA_ATTRIBUTES.panel]: \"\",\n [DATA_ATTRIBUTES.panelCollapsible]: collapsible || undefined,\n [DATA_ATTRIBUTES.panelId]: panelId,\n [DATA_ATTRIBUTES.panelSize]: parseFloat(\"\" + style.flexGrow).toFixed(1)\n });\n}\nconst Panel = forwardRef((props, ref) => createElement(PanelWithForwardedRef, {\n ...props,\n forwardedRef: ref\n}));\nPanelWithForwardedRef.displayName = \"Panel\";\nPanel.displayName = \"forwardRef(Panel)\";\n\nlet nonce;\nfunction getNonce() {\n return nonce;\n}\nfunction setNonce(value) {\n nonce = value;\n}\n\nlet currentCursorStyle = null;\nlet enabled = true;\nlet getCustomCursorStyleFunction = null;\nlet prevRuleIndex = -1;\nlet styleElement = null;\nfunction customizeGlobalCursorStyles(callback) {\n getCustomCursorStyleFunction = callback;\n}\nfunction disableGlobalCursorStyles() {\n enabled = false;\n}\nfunction enableGlobalCursorStyles() {\n enabled = true;\n}\nfunction getCursorStyle(state, constraintFlags, isPointerDown) {\n const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0;\n const horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0;\n const verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0;\n const verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0;\n if (getCustomCursorStyleFunction) {\n return getCustomCursorStyleFunction({\n exceedsHorizontalMaximum: horizontalMax,\n exceedsHorizontalMinimum: horizontalMin,\n exceedsVerticalMaximum: verticalMax,\n exceedsVerticalMinimum: verticalMin,\n intersectsHorizontalDragHandle: state === \"horizontal\" || state === \"intersection\",\n intersectsVerticalDragHandle: state === \"vertical\" || state === \"intersection\",\n isPointerDown\n });\n }\n if (constraintFlags) {\n if (horizontalMin) {\n if (verticalMin) {\n return \"se-resize\";\n } else if (verticalMax) {\n return \"ne-resize\";\n } else {\n return \"e-resize\";\n }\n } else if (horizontalMax) {\n if (verticalMin) {\n return \"sw-resize\";\n } else if (verticalMax) {\n return \"nw-resize\";\n } else {\n return \"w-resize\";\n }\n } else if (verticalMin) {\n return \"s-resize\";\n } else if (verticalMax) {\n return \"n-resize\";\n }\n }\n switch (state) {\n case \"horizontal\":\n return \"ew-resize\";\n case \"intersection\":\n return \"move\";\n case \"vertical\":\n return \"ns-resize\";\n }\n}\nfunction resetGlobalCursorStyle() {\n if (styleElement !== null) {\n document.head.removeChild(styleElement);\n currentCursorStyle = null;\n styleElement = null;\n prevRuleIndex = -1;\n }\n}\nfunction setGlobalCursorStyle(state, constraintFlags, isPointerDown) {\n var _styleElement$sheet$i, _styleElement$sheet2;\n if (!enabled) {\n return;\n }\n const style = getCursorStyle(state, constraintFlags, isPointerDown);\n if (currentCursorStyle === style) {\n return;\n }\n currentCursorStyle = style;\n if (styleElement === null) {\n styleElement = document.createElement(\"style\");\n const nonce = getNonce();\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n document.head.appendChild(styleElement);\n }\n if (prevRuleIndex >= 0) {\n var _styleElement$sheet;\n (_styleElement$sheet = styleElement.sheet) === null || _styleElement$sheet === void 0 ? void 0 : _styleElement$sheet.removeRule(prevRuleIndex);\n }\n prevRuleIndex = (_styleElement$sheet$i = (_styleElement$sheet2 = styleElement.sheet) === null || _styleElement$sheet2 === void 0 ? void 0 : _styleElement$sheet2.insertRule(`*{cursor: ${style} !important;}`)) !== null && _styleElement$sheet$i !== void 0 ? _styleElement$sheet$i : -1;\n}\n\nfunction isKeyDown(event) {\n return event.type === \"keydown\";\n}\nfunction isPointerEvent(event) {\n return event.type.startsWith(\"pointer\");\n}\nfunction isMouseEvent(event) {\n return event.type.startsWith(\"mouse\");\n}\n\nfunction getResizeEventCoordinates(event) {\n if (isPointerEvent(event)) {\n if (event.isPrimary) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n } else if (isMouseEvent(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n return {\n x: Infinity,\n y: Infinity\n };\n}\n\nfunction getInputType() {\n if (typeof matchMedia === \"function\") {\n return matchMedia(\"(pointer:coarse)\").matches ? \"coarse\" : \"fine\";\n }\n}\n\nfunction intersects(rectOne, rectTwo, strict) {\n if (strict) {\n return rectOne.x < rectTwo.x + rectTwo.width && rectOne.x + rectOne.width > rectTwo.x && rectOne.y < rectTwo.y + rectTwo.height && rectOne.y + rectOne.height > rectTwo.y;\n } else {\n return rectOne.x <= rectTwo.x + rectTwo.width && rectOne.x + rectOne.width >= rectTwo.x && rectOne.y <= rectTwo.y + rectTwo.height && rectOne.y + rectOne.height >= rectTwo.y;\n }\n}\n\n// Forked from NPM stacking-order@2.0.0\n\n/**\n * Determine which of two nodes appears in front of the other —\n * if `a` is in front, returns 1, otherwise returns -1\n * @param {HTMLElement | SVGElement} a\n * @param {HTMLElement | SVGElement} b\n */\nfunction compare(a, b) {\n if (a === b) throw new Error(\"Cannot compare node with itself\");\n const ancestors = {\n a: get_ancestors(a),\n b: get_ancestors(b)\n };\n let common_ancestor;\n\n // remove shared ancestors\n while (ancestors.a.at(-1) === ancestors.b.at(-1)) {\n a = ancestors.a.pop();\n b = ancestors.b.pop();\n common_ancestor = a;\n }\n assert(common_ancestor, \"Stacking order can only be calculated for elements with a common ancestor\");\n const z_indexes = {\n a: get_z_index(find_stacking_context(ancestors.a)),\n b: get_z_index(find_stacking_context(ancestors.b))\n };\n if (z_indexes.a === z_indexes.b) {\n const children = common_ancestor.childNodes;\n const furthest_ancestors = {\n a: ancestors.a.at(-1),\n b: ancestors.b.at(-1)\n };\n let i = children.length;\n while (i--) {\n const child = children[i];\n if (child === furthest_ancestors.a) return 1;\n if (child === furthest_ancestors.b) return -1;\n }\n }\n return Math.sign(z_indexes.a - z_indexes.b);\n}\nconst props = /\\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\\b/;\n\n/** @param {HTMLElement | SVGElement} node */\nfunction is_flex_item(node) {\n var _get_parent;\n // @ts-ignore\n const display = getComputedStyle((_get_parent = get_parent(node)) !== null && _get_parent !== void 0 ? _get_parent : node).display;\n return display === \"flex\" || display === \"inline-flex\";\n}\n\n/** @param {HTMLElement | SVGElement} node */\nfunction creates_stacking_context(node) {\n const style = getComputedStyle(node);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context\n if (style.position === \"fixed\") return true;\n // Forked to fix upstream bug https://github.com/Rich-Harris/stacking-order/issues/3\n // if (\n // (style.zIndex !== \"auto\" && style.position !== \"static\") ||\n // is_flex_item(node)\n // )\n if (style.zIndex !== \"auto\" && (style.position !== \"static\" || is_flex_item(node))) return true;\n if (+style.opacity < 1) return true;\n if (\"transform\" in style && style.transform !== \"none\") return true;\n if (\"webkitTransform\" in style && style.webkitTransform !== \"none\") return true;\n if (\"mixBlendMode\" in style && style.mixBlendMode !== \"normal\") return true;\n if (\"filter\" in style && style.filter !== \"none\") return true;\n if (\"webkitFilter\" in style && style.webkitFilter !== \"none\") return true;\n if (\"isolation\" in style && style.isolation === \"isolate\") return true;\n if (props.test(style.willChange)) return true;\n // @ts-expect-error\n if (style.webkitOverflowScrolling === \"touch\") return true;\n return false;\n}\n\n/** @param {(HTMLElement| SVGElement)[]} nodes */\nfunction find_stacking_context(nodes) {\n let i = nodes.length;\n while (i--) {\n const node = nodes[i];\n assert(node, \"Missing node\");\n if (creates_stacking_context(node)) return node;\n }\n return null;\n}\n\n/** @param {HTMLElement | SVGElement} node */\nfunction get_z_index(node) {\n return node && Number(getComputedStyle(node).zIndex) || 0;\n}\n\n/** @param {HTMLElement} node */\nfunction get_ancestors(node) {\n const ancestors = [];\n while (node) {\n ancestors.push(node);\n // @ts-ignore\n node = get_parent(node);\n }\n return ancestors; // [ node, ... <body>, <html>, document ]\n}\n\n/** @param {HTMLElement} node */\nfunction get_parent(node) {\n const {\n parentNode\n } = node;\n if (parentNode && parentNode instanceof ShadowRoot) {\n return parentNode.host;\n }\n return parentNode;\n}\n\nconst EXCEEDED_HORIZONTAL_MIN = 0b0001;\nconst EXCEEDED_HORIZONTAL_MAX = 0b0010;\nconst EXCEEDED_VERTICAL_MIN = 0b0100;\nconst EXCEEDED_VERTICAL_MAX = 0b1000;\nconst isCoarsePointer = getInputType() === \"coarse\";\nlet intersectingHandles = [];\nlet isPointerDown = false;\nlet ownerDocumentCounts = new Map();\nlet panelConstraintFlags = new Map();\nconst registeredResizeHandlers = new Set();\nfunction registerResizeHandle(resizeHandleId, element, direction, hitAreaMargins, setResizeHandlerState) {\n var _ownerDocumentCounts$;\n const {\n ownerDocument\n } = element;\n const data = {\n direction,\n element,\n hitAreaMargins,\n setResizeHandlerState\n };\n const count = (_ownerDocumentCounts$ = ownerDocumentCounts.get(ownerDocument)) !== null && _ownerDocumentCounts$ !== void 0 ? _ownerDocumentCounts$ : 0;\n ownerDocumentCounts.set(ownerDocument, count + 1);\n registeredResizeHandlers.add(data);\n updateListeners();\n return function unregisterResizeHandle() {\n var _ownerDocumentCounts$2;\n panelConstraintFlags.delete(resizeHandleId);\n registeredResizeHandlers.delete(data);\n const count = (_ownerDocumentCounts$2 = ownerDocumentCounts.get(ownerDocument)) !== null && _ownerDocumentCounts$2 !== void 0 ? _ownerDocumentCounts$2 : 1;\n ownerDocumentCounts.set(ownerDocument, count - 1);\n updateListeners();\n if (count === 1) {\n ownerDocumentCounts.delete(ownerDocument);\n }\n\n // If the resize handle that is currently unmounting is intersecting with the pointer,\n // update the global pointer to account for the change\n if (intersectingHandles.includes(data)) {\n const index = intersectingHandles.indexOf(data);\n if (index >= 0) {\n intersectingHandles.splice(index, 1);\n }\n updateCursor();\n\n // Also instruct the handle to stop dragging; this prevents the parent group from being left in an inconsistent state\n // See github.com/bvaughn/react-resizable-panels/issues/402\n setResizeHandlerState(\"up\", true, null);\n }\n };\n}\nfunction handlePointerDown(event) {\n const {\n target\n } = event;\n const {\n x,\n y\n } = getResizeEventCoordinates(event);\n isPointerDown = true;\n recalculateIntersectingHandles({\n target,\n x,\n y\n });\n updateListeners();\n if (intersectingHandles.length > 0) {\n updateResizeHandlerStates(\"down\", event);\n\n // Update cursor based on return value(s) from active handles\n updateCursor();\n event.preventDefault();\n if (!isWithinResizeHandle(target)) {\n event.stopImmediatePropagation();\n }\n }\n}\nfunction handlePointerMove(event) {\n const {\n x,\n y\n } = getResizeEventCoordinates(event);\n\n // Edge case (see #340)\n // Detect when the pointer has been released outside an iframe on a different domain\n if (isPointerDown &&\n // Skip this check for \"pointerleave\" events, else Firefox triggers a false positive (see #514)\n event.type !== \"pointerleave\" && event.buttons === 0) {\n isPointerDown = false;\n updateResizeHandlerStates(\"up\", event);\n }\n if (!isPointerDown) {\n const {\n target\n } = event;\n\n // Recalculate intersecting handles whenever the pointer moves, except if it has already been pressed\n // at that point, the handles may not move with the pointer (depending on constraints)\n // but the same set of active handles should be locked until the pointer is released\n recalculateIntersectingHandles({\n target,\n x,\n y\n });\n }\n updateResizeHandlerStates(\"move\", event);\n\n // Update cursor based on return value(s) from active handles\n updateCursor();\n if (intersectingHandles.length > 0) {\n event.preventDefault();\n }\n}\nfunction handlePointerUp(event) {\n const {\n target\n } = event;\n const {\n x,\n y\n } = getResizeEventCoordinates(event);\n panelConstraintFlags.clear();\n isPointerDown = false;\n if (intersectingHandles.length > 0) {\n event.preventDefault();\n if (!isWithinResizeHandle(target)) {\n event.stopImmediatePropagation();\n }\n }\n updateResizeHandlerStates(\"up\", event);\n recalculateIntersectingHandles({\n target,\n x,\n y\n });\n updateCursor();\n updateListeners();\n}\nfunction isWithinResizeHandle(element) {\n let currentElement = element;\n while (currentElement) {\n if (currentElement.hasAttribute(DATA_ATTRIBUTES.resizeHandle)) {\n return true;\n }\n currentElement = currentElement.parentElement;\n }\n return false;\n}\nfunction recalculateIntersectingHandles({\n target,\n x,\n y\n}) {\n intersectingHandles.splice(0);\n let targetElement = null;\n if (target instanceof HTMLElement || target instanceof SVGElement) {\n targetElement = target;\n }\n registeredResizeHandlers.forEach(data => {\n const {\n element: dragHandleElement,\n hitAreaMargins\n } = data;\n const dragHandleRect = dragHandleElement.getBoundingClientRect();\n const {\n bottom,\n left,\n right,\n top\n } = dragHandleRect;\n const margin = isCoarsePointer ? hitAreaMargins.coarse : hitAreaMargins.fine;\n const eventIntersects = x >= left - margin && x <= right + margin && y >= top - margin && y <= bottom + margin;\n if (eventIntersects) {\n // TRICKY\n // We listen for pointers events at the root in order to support hit area margins\n // (determining when the pointer is close enough to an element to be considered a \"hit\")\n // Clicking on an element \"above\" a handle (e.g. a modal) should prevent a hit though\n // so at this point we need to compare stacking order of a potentially intersecting drag handle,\n // and the element that was actually clicked/touched\n if (targetElement !== null && document.contains(targetElement) && dragHandleElement !== targetElement && !dragHandleElement.contains(targetElement) && !targetElement.contains(dragHandleElement) &&\n // Calculating stacking order has a cost, so we should avoid it if possible\n // That is why we only check potentially intersecting handles,\n // and why we skip if the event target is within the handle's DOM\n compare(targetElement, dragHandleElement) > 0) {\n // If the target is above the drag handle, then we also need to confirm they overlap\n // If they are beside each other (e.g. a panel and its drag handle) then the handle is still interactive\n //\n // It's not enough to compare only the target\n // The target might be a small element inside of a larger container\n // (For example, a SPAN or a DIV inside of a larger modal dialog)\n let currentElement = targetElement;\n let didIntersect = false;\n while (currentElement) {\n if (currentElement.contains(dragHandleElement)) {\n break;\n } else if (intersects(currentElement.getBoundingClientRect(), dragHandleRect, true)) {\n didIntersect = true;\n break;\n }\n currentElement = currentElement.parentElement;\n }\n if (didIntersect) {\n return;\n }\n }\n intersectingHandles.push(data);\n }\n });\n}\nfunction reportConstraintsViolation(resizeHandleId, flag) {\n panelConstraintFlags.set(resizeHandleId, flag);\n}\nfunction updateCursor() {\n let intersectsHorizontal = false;\n let intersectsVertical = false;\n intersectingHandles.forEach(data => {\n const {\n direction\n } = data;\n if (direction === \"horizontal\") {\n intersectsHorizontal = true;\n } else {\n intersectsVertical = true;\n }\n });\n let constraintFlags = 0;\n panelConstraintFlags.forEach(flag => {\n constraintFlags |= flag;\n });\n if (intersectsHorizontal && intersectsVertical) {\n setGlobalCursorStyle(\"intersection\", constraintFlags, isPointerDown);\n } else if (intersectsHorizontal) {\n setGlobalCursorStyle(\"horizontal\", constraintFlags, isPointerDown);\n } else if (intersectsVertical) {\n setGlobalCursorStyle(\"vertical\", constraintFlags, isPointerDown);\n } else {\n resetGlobalCursorStyle();\n }\n}\nlet listenersAbortController;\nfunction updateListeners() {\n var _listenersAbortContro;\n (_listenersAbortContro = listenersAbortController) === null || _listenersAbortContro === void 0 ? void 0 : _listenersAbortContro.abort();\n listenersAbortController = new AbortController();\n const options = {\n capture: true,\n signal: listenersAbortController.signal\n };\n if (!registeredResizeHandlers.size) {\n return;\n }\n if (isPointerDown) {\n if (intersectingHandles.length > 0) {\n ownerDocumentCounts.forEach((count, ownerDocument) => {\n const {\n body\n } = ownerDocument;\n if (count > 0) {\n body.addEventListener(\"contextmenu\", handlePointerUp, options);\n body.addEventListener(\"pointerleave\", handlePointerMove, options);\n body.addEventListener(\"pointermove\", handlePointerMove, options);\n }\n });\n }\n ownerDocumentCounts.forEach((_, ownerDocument) => {\n const {\n body\n } = ownerDocument;\n body.addEventListener(\"pointerup\", handlePointerUp, options);\n body.addEventListener(\"pointercancel\", handlePointerUp, options);\n });\n } else {\n ownerDocumentCounts.forEach((count, ownerDocument) => {\n const {\n body\n } = ownerDocument;\n if (count > 0) {\n body.addEventListener(\"pointerdown\", handlePointerDown, options);\n body.addEventListener(\"pointermove\", handlePointerMove, options);\n }\n });\n }\n}\nfunction updateResizeHandlerStates(action, event) {\n registeredResizeHandlers.forEach(data => {\n const {\n setResizeHandlerState\n } = data;\n const isActive = intersectingHandles.includes(data);\n setResizeHandlerState(action, isActive, event);\n });\n}\n\nfunction useForceUpdate() {\n const [_, setCount] = useState(0);\n return useCallback(() => setCount(prevCount => prevCount + 1), []);\n}\n\nfunction assert(expectedCondition, message) {\n if (!expectedCondition) {\n console.error(message);\n throw Error(message);\n }\n}\n\nfunction fuzzyCompareNumbers(actual, expected, fractionDigits = PRECISION) {\n if (actual.toFixed(fractionDigits) === expected.toFixed(fractionDigits)) {\n return 0;\n } else {\n return actual > expected ? 1 : -1;\n }\n}\nfunction fuzzyNumbersEqual$1(actual, expected, fractionDigits = PRECISION) {\n return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0;\n}\n\nfunction fuzzyNumbersEqual(actual, expected, fractionDigits) {\n return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0;\n}\n\nfunction fuzzyLayoutsEqual(actual, expected, fractionDigits) {\n if (actual.length !== expected.length) {\n return false;\n }\n for (let index = 0; index < actual.length; index++) {\n const actualSize = actual[index];\n const expectedSize = expected[index];\n if (!fuzzyNumbersEqual(actualSize, expectedSize, fractionDigits)) {\n return false;\n }\n }\n return true;\n}\n\n// Panel size must be in percentages; pixel values should be pre-converted\nfunction resizePanel({\n panelConstraints: panelConstraintsArray,\n panelIndex,\n size\n}) {\n const panelConstraints = panelConstraintsArray[panelIndex];\n assert(panelConstraints != null, `Panel constraints not found for index ${panelIndex}`);\n let {\n collapsedSize = 0,\n collapsible,\n maxSize = 100,\n minSize = 0\n } = panelConstraints;\n if (fuzzyCompareNumbers(size, minSize) < 0) {\n if (collapsible) {\n // Collapsible panels should snap closed or open only once they cross the halfway point between collapsed and min size.\n const halfwayPoint = (collapsedSize + minSize) / 2;\n if (fuzzyCompareNumbers(size, halfwayPoint) < 0) {\n size = collapsedSize;\n } else {\n size = minSize;\n }\n } else {\n size = minSize;\n }\n }\n size = Math.min(maxSize, size);\n size = parseFloat(size.toFixed(PRECISION));\n return size;\n}\n\n// All units must be in percentages; pixel values should be pre-converted\nfunction adjustLayoutByDelta({\n delta,\n initialLayout,\n panelConstraints: panelConstraintsArray,\n pivotIndices,\n prevLayout,\n trigger\n}) {\n if (fuzzyNumbersEqual(delta, 0)) {\n return initialLayout;\n }\n const nextLayout = [...initialLayout];\n const [firstPivotIndex, secondPivotIndex] = pivotIndices;\n assert(firstPivotIndex != null, \"Invalid first pivot index\");\n assert(secondPivotIndex != null, \"Invalid second pivot index\");\n let deltaApplied = 0;\n\n // const DEBUG = [];\n // DEBUG.push(`adjustLayoutByDelta()`);\n // DEBUG.push(` initialLayout: ${initialLayout.join(\", \")}`);\n // DEBUG.push(` prevLayout: ${prevLayout.join(\", \")}`);\n // DEBUG.push(` delta: ${delta}`);\n // DEBUG.push(` pivotIndices: ${pivotIndices.join(\", \")}`);\n // DEBUG.push(` trigger: ${trigger}`);\n // DEBUG.push(\"\");\n\n // A resizing panel affects the panels before or after it.\n //\n // A negative delta means the panel(s) immediately after the resize handle should grow/expand by decreasing its offset.\n // Other panels may also need to shrink/contract (and shift) to make room, depending on the min weights.\n //\n // A positive delta means the panel(s) immediately before the resize handle should \"expand\".\n // This is accomplished by shrinking/contracting (and shifting) one or more of the panels after the resize handle.\n\n {\n // If this is a resize triggered by a keyboard event, our logic for expanding/collapsing is different.\n // We no longer check the halfway threshold because this may prevent the panel from expanding at all.\n if (trigger === \"keyboard\") {\n {\n // Check if we should expand a collapsed panel\n const index = delta < 0 ? secondPivotIndex : firstPivotIndex;\n const panelConstraints = panelConstraintsArray[index];\n assert(panelConstraints, `Panel constraints not found for index ${index}`);\n const {\n collapsedSize = 0,\n collapsible,\n minSize = 0\n } = panelConstraints;\n\n // DEBUG.push(`edge case check 1: ${index}`);\n // DEBUG.push(` -> collapsible? ${collapsible}`);\n if (collapsible) {\n const prevSize = initialLayout[index];\n assert(prevSize != null, `Previous layout not found for panel index ${index}`);\n if (fuzzyNumbersEqual(prevSize, collapsedSize)) {\n const localDelta = minSize - prevSize;\n // DEBUG.push(` -> expand delta: ${localDelta}`);\n\n if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) {\n delta = delta < 0 ? 0 - localDelta : localDelta;\n // DEBUG.push(` -> delta: ${delta}`);\n }\n }\n }\n }\n\n {\n // Check if we should collapse a panel at its minimum size\n const index = delta < 0 ? firstPivotIndex : secondPivotIndex;\n const panelConstraints = panelConstraintsArray[index];\n assert(panelConstraints, `No panel constraints found for index ${index}`);\n const {\n collapsedSize = 0,\n collapsible,\n minSize = 0\n } = panelConstraints;\n\n // DEBUG.push(`edge case check 2: ${index}`);\n // DEBUG.push(` -> collapsible? ${collapsible}`);\n if (collapsible) {\n const prevSize = initialLayout[index];\n assert(prevSize != null, `Previous layout not found for panel index ${index}`);\n if (fuzzyNumbersEqual(prevSize, minSize)) {\n const localDelta = prevSize - collapsedSize;\n // DEBUG.push(` -> expand delta: ${localDelta}`);\n\n if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) {\n delta = delta < 0 ? 0 - localDelta : localDelta;\n // DEBUG.push(` -> delta: ${delta}`);\n }\n }\n }\n }\n }\n // DEBUG.push(\"\");\n }\n\n {\n // Pre-calculate max available delta in the opposite direction of our pivot.\n // This will be the maximum amount we're allowed to expand/contract the panels in the primary direction.\n // If this amount is less than the requested delta, adjust the requested delta.\n // If this amount is greater than the requested delta, that's useful information too–\n // as an expanding panel might change from collapsed to min size.\n\n const increment = delta < 0 ? 1 : -1;\n let index = delta < 0 ? secondPivotIndex : firstPivotIndex;\n let maxAvailableDelta = 0;\n\n // DEBUG.push(\"pre calc...\");\n while (true) {\n const prevSize = initialLayout[index];\n assert(prevSize != null, `Previous layout not found for panel index ${index}`);\n const maxSafeSize = resizePanel({\n panelConstraints: panelConstraintsArray,\n panelIndex: index,\n size: 100\n });\n const delta = maxSafeSize - prevSize;\n // DEBUG.push(` ${index}: ${prevSize} -> ${maxSafeSize}`);\n\n maxAvailableDelta += delta;\n index += increment;\n if (index < 0 || index >= panelConstraintsArray.length) {\n break;\n }\n }\n\n // DEBUG.push(` -> max available delta: ${maxAvailableDelta}`);\n const minAbsDelta = Math.min(Math.abs(delta), Math.abs(maxAvailableDelta));\n delta = delta < 0 ? 0 - minAbsDelta : minAbsDelta;\n // DEBUG.push(` -> adjusted delta: ${delta}`);\n // DEBUG.push(\"\");\n }\n\n {\n // Delta added to a panel needs to be subtracted from other panels (within the constraints that those panels allow).\n\n const pivotIndex = delta < 0 ? firstPivotIndex : secondPivotIndex;\n let index = pivotIndex;\n while (index >= 0 && index < panelConstraintsArray.length) {\n const deltaRemaining = Math.abs(delta) - Math.abs(deltaApplied);\n const prevSize = initialLayout[index];\n assert(prevSize != null, `Previous layout not found for panel index ${index}`);\n const unsafeSize = prevSize - deltaRemaining;\n const safeSize = resizePanel({\n panelConstraints: panelConstraintsArray,\n panelIndex: index,\n size: unsafeSize\n });\n if (!fuzzyNumbersEqual(prevSize, safeSize)) {\n deltaApplied += prevSize - safeSize;\n nextLayout[index] = safeSize;\n if (deltaApplied.toFixed(3).localeCompare(Math.abs(delta).toFixed(3), undefined, {\n numeric: true\n }) >= 0) {\n break;\n }\n }\n if (delta < 0) {\n index--;\n } else {\n index++;\n }\n }\n }\n // DEBUG.push(`after 1: ${nextLayout.join(\", \")}`);\n // DEBUG.push(` deltaApplied: ${deltaApplied}`);\n // DEBUG.push(\"\");\n\n // If we were unable to resize any of the panels panels, return the previous state.\n // This will essentially bailout and ignore e.g. drags past a panel's boundaries\n if (fuzzyLayoutsEqual(prevLayout, nextLayout)) {\n // DEBUG.push(`bailout to previous layout: ${prevLayout.join(\", \")}`);\n // console.log(DEBUG.join(\"\\n\"));\n\n return prevLayout;\n }\n {\n // Now distribute the applied delta to the panels in the other direction\n const pivotIndex = delta < 0 ? secondPivotIndex : firstPivotIndex;\n const prevSize = initialLayout[pivotIndex];\n assert(prevSize != null, `Previous layout not found for panel index ${pivotIndex}`);\n const unsafeSize = prevSize + deltaApplied;\n const safeSize = resizePanel({\n panelConstraints: panelConstraintsArray,\n panelIndex: pivotIndex,\n size: unsafeSize\n });\n\n // Adjust the pivot panel before, but only by the amount that surrounding panels were able to shrink/contract.\n nextLayout[pivotIndex] = safeSize;\n\n // Edge case where expanding or contracting one panel caused another one to change collapsed state\n if (!fuzzyNumbersEqual(safeSize, unsafeSize)) {\n let deltaRemaining = unsafeSize - safeSize;\n const pivotIndex = delta < 0 ? secondPivotIndex : firstPivotIndex;\n let index = pivotIndex;\n while (index >= 0 && index < panelConstraintsArray.length) {\n const prevSize = nextLayout[index];\n assert(prevSize != null, `Previous layout not found for panel index ${index}`);\n const unsafeSize = prevSize + deltaRemaining;\n const safeSize = resizePanel({\n panelConstraints: panelConstraintsArray,\n panelIndex: index,\n size: unsafeSize\n });\n if (!fuzzyNumbersEqual(prevSize, safeSize)) {\n deltaRemaining -= safeSize - prevSize;\n nextLayout[index] = safeSize;\n }\n if (fuzzyNumbersEqual(deltaRemaining, 0)) {\n break;\n }\n if (delta > 0) {\n index--;\n } else {\n index++;\n }\n }\n }\n }\n // DEBUG.push(`after 2: ${nextLayout.join(\", \")}`);\n // DEBUG.push(` deltaApplied: ${deltaApplied}`);\n // DEBUG.push(\"\");\n\n const totalSize = nextLayout.reduce((total, size) => size + total, 0);\n // DEBUG.push(`total size: ${totalSize}`);\n\n // If our new layout doesn't add up to 100%, that means the requested delta can't be applied\n // In that case, fall back to our most recent valid layout\n if (!fuzzyNumbersEqual(totalSize, 100)) {\n // DEBUG.push(`bailout to previous layout: ${prevLayout.join(\", \")}`);\n // console.log(DEBUG.join(\"\\n\"));\n\n return prevLayout;\n }\n\n // console.log(DEBUG.join(\"\\n\"));\n return nextLayout;\n}\n\nfunction calculateAriaValues({\n layout,\n panelsArray,\n pivotIndices\n}) {\n let currentMinSize = 0;\n let currentMaxSize = 100;\n let totalMinSize = 0;\n let totalMaxSize = 0;\n const firstIndex = pivotIndices[0];\n assert(firstIndex != null, \"No pivot index found\");\n\n // A panel's effective min/max sizes also need to account for other panel's sizes.\n panelsArray.forEach((panelData, index) => {\n const {\n constraints\n } = panelData;\n const {\n maxSize = 100,\n minSize = 0\n } = constraints;\n if (index === firstIndex) {\n currentMinSize = minSize;\n currentMaxSize = maxSize;\n } else {\n totalMinSize += minSize;\n totalMaxSize += maxSize;\n }\n });\n const valueMax = Math.min(currentMaxSize, 100 - totalMinSize);\n const valueMin = Math.max(currentMinSize, 100 - totalMaxSize);\n const valueNow = layout[firstIndex];\n return {\n valueMax,\n valueMin,\n valueNow\n };\n}\n\nfunction getResizeHandleElementsForGroup(groupId, scope = document) {\n return Array.from(scope.querySelectorAll(`[${DATA_ATTRIBUTES.resizeHandleId}][data-panel-group-id=\"${groupId}\"]`));\n}\n\nfunction getResizeHandleElementIndex(groupId, id, scope = document) {\n const handles = getResizeHandleElementsForGroup(groupId, scope);\n const index = handles.findIndex(handle => handle.getAttribute(DATA_ATTRIBUTES.resizeHandleId) === id);\n return index !== null && index !== void 0 ? index : null;\n}\n\nfunction determinePivotIndices(groupId, dragHandleId, panelGroupElement) {\n const index = getResizeHandleElementIndex(groupId, dragHandleId, panelGroupElement);\n return index != null ? [index, index + 1] : [-1, -1];\n}\n\nfunction isHTMLElement(target) {\n if (target instanceof HTMLElement) {\n return true;\n }\n\n // Fallback to duck typing to handle edge case of portals within a popup window\n return typeof target === \"object\" && target !== null && \"tagName\" in target && \"getAttribute\" in target;\n}\n\nfunction getPanelGroupElement(id, rootElement = document) {\n // If the root element is the PanelGroup\n if (isHTMLElement(rootElement) && rootElement.dataset.panelGroupId == id) {\n return rootElement;\n }\n\n // Else query children\n const element = rootElement.querySelector(`[data-panel-group][data-panel-group-id=\"${id}\"]`);\n if (element) {\n return element;\n }\n return null;\n}\n\nfunction getResizeHandleElement(id, scope = document) {\n const element = scope.querySelector(`[${DATA_ATTRIBUTES.resizeHandleId}=\"${id}\"]`);\n if (element) {\n return element;\n }\n return null;\n}\n\nfunction getResizeHandlePanelIds(groupId, handleId, panelsArray, scope = document) {\n var _panelsArray$index$id, _panelsArray$index, _panelsArray$id, _panelsArray;\n const handle = getResizeHandleElement(handleId, scope);\n const handles = getResizeHandleElementsForGroup(groupId, scope);\n const index = handle ? handles.indexOf(handle) : -1;\n const idBefore = (_panelsArray$index$id = (_panelsArray$index = panelsArray[index]) === null || _panelsArray$index === void 0 ? void 0 : _panelsArray$index.id) !== null && _panelsArray$index$id !== void 0 ? _panelsArray$index$id : null;\n const idAfter = (_panelsArray$id = (_panelsArray = panelsArray[index + 1]) === null || _panelsArray === void 0 ? void 0 : _panelsArray.id) !== null && _panelsArray$id !== void 0 ? _panelsArray$id : null;\n return [idBefore, idAfter];\n}\n\n// https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/\n\nfunction useWindowSplitterPanelGroupBehavior({\n committedValuesRef,\n eagerValuesRef,\n groupId,\n layout,\n panelDataArray,\n panelGroupElement,\n setLayout\n}) {\n useRef({\n didWarnAboutMissingResizeHandle: false\n });\n useIsomorphicLayoutEffect(() => {\n if (!panelGroupElement) {\n return;\n }\n const resizeHandleElements = getResizeHandleElementsForGroup(groupId, panelGroupElement);\n for (let index = 0; index < panelDataArray.length - 1; index++) {\n const {\n valueMax,\n valueMin,\n valueNow\n } = calculateAriaValues({\n layout,\n panelsArray: panelDataArray,\n pivotIndices: [index, index + 1]\n });\n const resizeHandleElement = resizeHandleElements[index];\n if (resizeHandleElement == null) ; else {\n const panelData = panelDataArray[index];\n assert(panelData, `No panel data found for index \"${index}\"`);\n resizeHandleElement.setAttribute(\"aria-controls\", panelData.id);\n resizeHandleElement.setAttribute(\"aria-valuemax\", \"\" + Math.round(valueMax));\n resizeHandleElement.setAttribute(\"aria-valuemin\", \"\" + Math.round(valueMin));\n resizeHandleElement.setAttribute(\"aria-valuenow\", valueNow != null ? \"\" + Math.round(valueNow) : \"\");\n }\n }\n return () => {\n resizeHandleElements.forEach((resizeHandleElement, index) => {\n resizeHandleElement.removeAttribute(\"aria-controls\");\n resizeHandleElement.removeAttribute(\"aria-valuemax\");\n resizeHandleElement.removeAttribute(\"aria-valuemin\");\n resizeHandleElement.removeAttribute(\"aria-valuenow\");\n });\n };\n }, [groupId, layout, panelDataArray, panelGroupElement]);\n useEffect(() => {\n if (!panelGroupElement) {\n return;\n }\n const eagerValues = eagerValuesRef.current;\n assert(eagerValues, `Eager values not found`);\n const {\n panelDataArray\n } = eagerValues;\n const groupElement = getPanelGroupElement(groupId, panelGroupElement);\n assert(groupElement != null, `No group found for id \"${groupId}\"`);\n const handles = getResizeHandleElementsForGroup(groupId, panelGroupElement);\n assert(handles, `No resize handles found for group id \"${groupId}\"`);\n const cleanupFunctions = handles.map(handle => {\n const handleId = handle.getAttribute(DATA_ATTRIBUTES.resizeHandleId);\n assert(handleId, `Resize handle element has no handle id attribute`);\n const [idBefore, idAfter] = getResizeHandlePanelIds(groupId, handleId, panelDataArray, panelGroupElement);\n if (idBefore == null || idAfter == null) {\n return () => {};\n }\n const onKeyDown = event => {\n if (event.defaultPrevented) {\n return;\n }\n switch (event.key) {\n case \"Enter\":\n {\n event.preventDefault();\n const index = panelDataArray.findIndex(panelData => panelData.id === idBefore);\n if (index >= 0) {\n const panelData = panelDataArray[index];\n assert(panelData, `No panel data found for index ${index}`);\n const size = layout[index];\n const {\n collapsedSize = 0,\n collapsible,\n minSize = 0\n } = panelData.constraints;\n if (size != null && collapsible) {\n const nextLayout = adjustLayoutByDelta({\n delta: fuzzyNumbersEqual(size, collapsedSize) ? minSize - collapsedSize : collapsedSize - size,\n initialLayout: layout,\n panelConstraints: panelDataArray.map(panelData => panelData.constraints),\n pivotIndices: determinePivotIndices(groupId, handleId, panelGroupElement),\n prevLayout: layout,\n trigger: \"keyboard\"\n });\n if (layout !== nextLayout) {\n setLayout(nextLayout);\n }\n }\n }\n break;\n }\n }\n };\n handle.addEventListener(\"keydown\", onKeyDown);\n return () => {\n handle.removeEventListener(\"keydown\", onKeyDown);\n };\n });\n return () => {\n cleanupFunctions.forEach(cleanupFunction => cleanupFunction());\n };\n }, [panelGroupElement, committedValuesRef, eagerValuesRef, groupId, layout, panelDataArray, setLayout]);\n}\n\nfunction areEqual(arrayA, arrayB) {\n if (arrayA.length !== arrayB.length) {\n return false;\n }\n for (let index = 0; index < arrayA.length; index++) {\n if (arrayA[index] !== arrayB[index]) {\n return false;\n }\n }\n return true;\n}\n\nfunction getResizeEventCursorPosition(direction, event) {\n const isHorizontal = direction === \"horizontal\";\n const {\n x,\n y\n } = getResizeEventCoordinates(event);\n return isHorizontal ? x : y;\n}\n\nfunction calculateDragOffsetPercentage(event, dragHandleId, direction, initialDragState, panelGroupElement) {\n const isHorizontal = direction === \"horizontal\";\n const handleElement = getResizeHandleElement(dragHandleId, panelGroupElement);\n assert(handleElement, `No resize handle element found for id \"${dragHandleId}\"`);\n const groupId = handleElement.getAttribute(DATA_ATTRIBUTES.groupId);\n assert(groupId, `Resize handle element has no group id attribute`);\n let {\n initialCursorPosition\n } = initialDragState;\n const cursorPosition = getResizeEventCursorPosition(direction, event);\n const groupElement = getPanelGroupElement(groupId, panelGroupElement);\n assert(groupElement, `No group element found for id \"${groupId}\"`);\n const groupRect = groupElement.getBoundingClientRect();\n const groupSizeInPixels = isHorizontal ? groupRect.width : groupRect.height;\n const offsetPixels = cursorPosition - initialCursorPosition;\n const offsetPercentage = offsetPixels / groupSizeInPixels * 100;\n return offsetPercentage;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementX\nfunction calculateDeltaPercentage(event, dragHandleId, direction, initialDragState, keyboardResizeBy, panelGroupElement) {\n if (isKeyDown(event)) {\n const isHorizontal = direction === \"horizontal\";\n let delta = 0;\n if (event.shiftKey) {\n delta = 100;\n } else if (keyboardResizeBy != null) {\n delta = keyboardResizeBy;\n } else {\n delta = 10;\n }\n let movement = 0;\n switch (event.key) {\n case \"ArrowDown\":\n movement = isHorizontal ? 0 : delta;\n break;\n case \"ArrowLeft\":\n movement = isHorizontal ? -delta : 0;\n break;\n case \"ArrowRight\":\n movement = isHorizontal ? delta : 0;\n break;\n case \"ArrowUp\":\n movement = isHorizontal ? 0 : -delta;\n break;\n case \"End\":\n movement = 100;\n break;\n case \"Home\":\n movement = -100;\n break;\n }\n return movement;\n } else {\n if (initialDragState == null) {\n return 0;\n }\n return calculateDragOffsetPercentage(event, dragHandleId, direction, initialDragState, panelGroupElement);\n }\n}\n\nfunction calculateUnsafeDefaultLayout({\n panelDataArray\n}) {\n const layout = Array(panelDataArray.length);\n const panelConstraintsArray = panelDataArray.map(panelData => panelData.constraints);\n let numPanelsWithSizes = 0;\n let remainingSize = 100;\n\n // Distribute default sizes first\n for (let index = 0; index < panelDataArray.length; index++) {\n const panelConstraints = panelConstraintsArray[index];\n assert(panelConstraints, `Panel constraints not found for index ${index}`);\n const {\n defaultSize\n } = panelConstraints;\n if (defaultSize != null) {\n numPanelsWithSizes++;\n layout[index] = defaultSize;\n remainingSize -= defaultSize;\n }\n }\n\n // Remaining size should be distributed evenly between panels without default sizes\n for (let index = 0; index < panelDataArray.length; index++) {\n const panelConstraints = panelConstraintsArray[index];\n assert(panelConstraints, `Panel constraints not found for index ${index}`);\n const {\n defaultSize\n } = panelConstraints;\n if (defaultSize != null) {\n continue;\n }\n const numRemainingPanels = panelDataArray.length - numPanelsWithSizes;\n const size = remainingSize / numRemainingPanels;\n numPanelsWithSizes++;\n layout[index] = size;\n remainingSize -= size;\n }\n return layout;\n}\n\n// Layout should be pre-converted into percentages\nfunction callPanelCallbacks(panelsArray, layout, panelIdToLastNotifiedSizeMap) {\n layout.forEach((size, index) => {\n const panelData = panelsArray[index];\n assert(panelData, `Panel data not found for index ${index}`);\n const {\n callbacks,\n constraints,\n id: panelId\n } = panelData;\n const {\n collapsedSize = 0,\n collapsible\n } = constraints;\n const lastNotifiedSize = panelIdToLastNotifiedSizeMap[panelId];\n if (lastNotifiedSize == null || size !== lastNotifiedSize) {\n panelIdToLastNotifiedSizeMap[panelId] = size;\n const {\n onCollapse,\n onExpand,\n onResize\n } = callbacks;\n if (onResize) {\n onResize(size, lastNotifiedSize);\n }\n if (collapsible && (onCollapse || onExpand)) {\n if (onExpand && (lastNotifiedSize == null || fuzzyNumbersEqual$1(lastNotifiedSize, collapsedSize)) && !fuzzyNumbersEqual$1(size, collapsedSize)) {\n onExpand();\n }\n if (onCollapse && (lastNotifiedSize == null || !fuzzyNumbersEqual$1(lastNotifiedSize, collapsedSize)) && fuzzyNumbersEqual$1(size, collapsedSize)) {\n onCollapse();\n }\n }\n }\n });\n}\n\nfunction compareLayouts(a, b) {\n if (a.length !== b.length) {\n return false;\n } else {\n for (let index = 0; index < a.length; index++) {\n if (a[index] != b[index]) {\n return false;\n }\n }\n }\n return true;\n}\n\n// This method returns a number between 1 and 100 representing\n\n// the % of the group's overall space this panel should occupy.\nfunction computePanelFlexBoxStyle({\n defaultSize,\n dragState,\n layout,\n panelData,\n panelIndex,\n precision = 3\n}) {\n const size = layout[panelIndex];\n let flexGrow;\n if (size == null) {\n // Initial render (before panels have registered themselves)\n // In order to support server rendering, fall back to default size if provided\n flexGrow = defaultSize != undefined ? defaultSize.toFixed(precision) : \"1\";\n } else if (panelData.length === 1) {\n // Special case: Single panel group should always fill full width/height\n flexGrow = \"1\";\n } else {\n flexGrow = size.toFixed(precision);\n }\n return {\n flexBasis: 0,\n flexGrow,\n flexShrink: 1,\n // Without this, Panel sizes may be unintentionally overridden by their content\n overflow: \"hidden\",\n // Disable pointer events inside of a panel during resize\n // This avoid edge cases like nested iframes\n pointerEvents: dragState !== null ? \"none\" : undefined\n };\n}\n\nfunction debounce(callback, durationMs = 10) {\n let timeoutId = null;\n let callable = (...args) => {\n if (timeoutId !== null) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n callback(...args);\n }, durationMs);\n };\n return callable;\n}\n\n// PanelGroup might be rendering in a server-side environment where localStorage is not available\n// or on a browser with cookies/storage disabled.\n// In either case, this function avoids accessing localStorage until needed,\n// and avoids throwing user-visible errors.\nfunction initializeDefaultStorage(storageObject) {\n try {\n if (typeof localStorage !== \"undefined\") {\n // Bypass this check for future calls\n storageObject.getItem = name => {\n return localStorage.getItem(name);\n };\n storageObject.setItem = (name, value) => {\n localStorage.setItem(name, value);\n };\n } else {\n throw new Error(\"localStorage not supported in this environment\");\n }\n } catch (error) {\n console.error(error);\n storageObject.getItem = () => null;\n storageObject.setItem = () => {};\n }\n}\n\nfunction getPanelGroupKey(autoSaveId) {\n return `react-resizable-panels:${autoSaveId}`;\n}\n\n// Note that Panel ids might be user-provided (stable) or useId generated (non-deterministic)\n// so they should not be used as part of the serialization key.\n// Using the min/max size attributes should work well enough as a backup.\n// Pre-sorting by minSize allows remembering layouts even if panels are re-ordered/dragged.\nfunction getPanelKey(panels) {\n return panels.map(panel => {\n const {\n constraints,\n id,\n idIsFromProps,\n order\n } = panel;\n if (idIsFromProps) {\n return id;\n } else {\n return order ? `${order}:${JSON.stringify(constraints)}` : JSON.stringify(constraints);\n }\n }).sort((a, b) => a.localeCompare(b)).join(\",\");\n}\nfunction loadSerializedPanelGroupState(autoSaveId, storage) {\n try {\n const panelGroupKey = getPanelGroupKey(autoSaveId);\n const serialized = storage.getItem(panelGroupKey);\n if (serialized) {\n const parsed = JSON.parse(serialized);\n if (typeof parsed === \"object\" && parsed != null) {\n return parsed;\n }\n }\n } catch (error) {}\n return null;\n}\nfunction loadPanelGroupState(autoSaveId, panels, storage) {\n var _loadSerializedPanelG, _state$panelKey;\n const state = (_loadSerializedPanelG = loadSerializedPanelGroupState(autoSaveId, storage)) !== null && _loadSerializedPanelG !== void 0 ? _loadSerializedPanelG : {};\n const panelKey = getPanelKey(panels);\n return (_state$panelKey = state[panelKey]) !== null && _state$panelKey !== void 0 ? _state$panelKey : null;\n}\nfunction savePanelGroupState(autoSaveId, panels, panelSizesBeforeCollapse, sizes, storage) {\n var _loadSerializedPanelG2;\n const panelGroupKey = getPanelGroupKey(autoSaveId);\n const panelKey = getPanelKey(panels);\n const state = (_loadSerializedPanelG2 = loadSerializedPanelGroupState(autoSaveId, storage)) !== null && _loadSerializedPanelG2 !== void 0 ? _loadSerializedPanelG2 : {};\n state[panelKey] = {\n expandToSizes: Object.fromEntries(panelSizesBeforeCollapse.entries()),\n layout: sizes\n };\n try {\n storage.setItem(panelGroupKey, JSON.stringify(state));\n } catch (error) {\n console.error(error);\n }\n}\n\n// All units must be in percentages; pixel values should be pre-converted\nfunction validatePanelGroupLayout({\n layout: prevLayout,\n panelConstraints\n}) {\n const nextLayout = [...prevLayout];\n const nextLayoutTotalSize = nextLayout.reduce((accumulated, current) => accumulated + current, 0);\n\n // Validate layout expectations\n if (nextLayout.length !== panelConstraints.length) {\n throw Error(`Invalid ${panelConstraints.length} panel layout: ${nextLayout.map(size => `${size}%`).join(\", \")}`);\n } else if (!fuzzyNumbersEqual(nextLayoutTotalSize, 100) && nextLayout.length > 0) {\n for (let index = 0; index < panelConstraints.length; index++) {\n const unsafeSize = nextLayout[index];\n assert(unsafeSize != null, `No layout data found for index ${index}`);\n const safeSize = 100 / nextLayoutTotalSize * unsafeSize;\n nextLayout[index] = safeSize;\n }\n }\n let remainingSize = 0;\n\n // First pass: Validate the proposed layout given each panel's constraints\n for (let index = 0; index < panelConstraints.length; index++) {\n const unsafeSize = nextLayout[index];\n assert(unsafeSize != null, `No layout data found for index ${index}`);\n const safeSize = resizePanel({\n panelConstraints,\n panelIndex: index,\n size: unsafeSize\n });\n if (unsafeSize != safeSize) {\n remainingSize += unsafeSize - safeSize;\n nextLayout[index] = safeSize;\n }\n }\n\n // If there is additional, left over space, assign it to any panel(s) that permits it\n // (It's not worth taking multiple additional passes to evenly distribute)\n if (!fuzzyNumbersEqual(remainingSize, 0)) {\n for (let index = 0; index < panelConstraints.length; index++) {\n const prevSize = nextLayout[index];\n assert(prevSize != null, `No layout data found for index ${index}`);\n const unsafeSize = prevSize + remainingSize;\n const safeSize = resizePanel({\n panelConstraints,\n panelIndex: index,\n size: unsafeSize\n });\n if (prevSize !== safeSize) {\n remainingSize -= safeSize - prevSize;\n nextLayout[index] = safeSize;\n\n // Once we've used up the remainder, bail\n if (fuzzyNumbersEqual(remainingSize, 0)) {\n break;\n }\n }\n }\n }\n return nextLayout;\n}\n\nconst LOCAL_STORAGE_DEBOUNCE_INTERVAL = 100;\nconst defaultStorage = {\n getItem: name => {\n initializeDefaultStorage(defaultStorage);\n return defaultStorage.getItem(name);\n },\n setItem: (name, value) => {\n initializeDefaultStorage(defaultStorage);\n defaultStorage.setItem(name, value);\n }\n};\nconst debounceMap = {};\nfunction PanelGroupWithForwardedRef({\n autoSaveId = null,\n children,\n className: classNameFromProps = \"\",\n direction,\n forwardedRef,\n id: idFromProps = null,\n onLayout = null,\n keyboardResizeBy = null,\n storage = defaultStorage,\n style: styleFromProps,\n tagName: Type = \"div\",\n ...rest\n}) {\n const groupId = useUniqueId(idFromProps);\n const panelGroupElementRef = useRef(null);\n const [dragState, setDragState] = useState(null);\n const [layout, setLayout] = useState([]);\n const forceUpdate = useForceUpdate();\n const panelIdToLastNotifiedSizeMapRef = useRef({});\n const panelSizeBeforeCollapseRef = useRef(new Map());\n const prevDeltaRef = useRef(0);\n const committedValuesRef = useRef({\n autoSaveId,\n direction,\n dragState,\n id: groupId,\n keyboardResizeBy,\n onLayout,\n storage\n });\n const eagerValuesRef = useRef({\n layout,\n panelDataArray: [],\n panelDataArrayChanged: false\n });\n useRef({\n didLogIdAndOrderWarning: false,\n didLogPanelConstraintsWarning: false,\n prevPanelIds: []\n });\n useImperativeHandle(forwardedRef, () => ({\n getId: () => committedValuesRef.current.id,\n getLayout: () => {\n const {\n layout\n } = eagerValuesRef.current;\n return layout;\n },\n setLayout: unsafeLayout => {\n const {\n onLayout\n } = committedValuesRef.current;\n const {\n layout: prevLayout,\n panelDataArray\n } = eagerValuesRef.current;\n const safeLayout = validatePanelGroupLayout({\n layout: unsafeLayout,\n panelConstraints: panelDataArray.map(panelData => panelData.constraints)\n });\n if (!areEqual(prevLayout, safeLayout)) {\n setLayout(safeLayout);\n eagerValuesRef.current.layout = safeLayout;\n if (onLayout) {\n onLayout(safeLayout);\n }\n callPanelCallbacks(panelDataArray, safeLayout, panelIdToLastNotifiedSizeMapRef.current);\n }\n }\n }), []);\n useIsomorphicLayoutEffect(() => {\n committedValuesRef.current.autoSaveId = autoSaveId;\n committedValuesRef.current.direction = direction;\n committedValuesRef.current.dragState = dragState;\n committedValuesRef.current.id = groupId;\n committedValuesRef.current.onLayout = onLayout;\n committedValuesRef.current.storage = storage;\n });\n useWindowSplitterPanelGroupBehavior({\n committedValuesRef,\n eagerValuesRef,\n groupId,\n layout,\n panelDataArray: eagerValuesRef.current.panelDataArray,\n setLayout,\n panelGroupElement: panelGroupElementRef.current\n });\n useEffect(() => {\n const {\n panelDataArray\n } = eagerValuesRef.current;\n\n // If this panel has been configured to persist sizing information, save sizes to local storage.\n if (autoSaveId) {\n if (layout.length === 0 || layout.length !== panelDataArray.length) {\n return;\n }\n let debouncedSave = debounceMap[autoSaveId];\n\n // Limit the frequency of localStorage updates.\n if (debouncedSave == null) {\n debouncedSave = debounce(savePanelGroupState, LOCAL_STORAGE_DEBOUNCE_INTERVAL);\n debounceMap[autoSaveId] = debouncedSave;\n }\n\n // Clone mutable data before passing to the debounced function,\n // else we run the risk of saving an incorrect combination of mutable and immutable values to state.\n const clonedPanelDataArray = [...panelDataArray];\n const clonedPanelSizesBeforeCollapse = new Map(panelSizeBeforeCollapseRef.current);\n debouncedSave(autoSaveId, clonedPanelDataArray, clonedPanelSizesBeforeCollapse, layout, storage);\n }\n }, [autoSaveId, layout, storage]);\n\n // DEV warnings\n useEffect(() => {\n });\n\n // External APIs are safe to memoize via committed values ref\n const collapsePanel = useCallback(panelData => {\n const {\n onLayout\n } = committedValuesRef.current;\n const {\n layout: prevLayout,\n panelDataArray\n } = eagerValuesRef.current;\n if (panelData.constraints.collapsible) {\n const panelConstraintsArray = panelDataArray.map(panelData => panelData.constraints);\n const {\n collapsedSize = 0,\n panelSize,\n pivotIndices\n } = panelDataHelper(panelDataArray, panelData, prevLayout);\n assert(panelSize != null, `Panel size not found for panel \"${panelData.id}\"`);\n if (!fuzzyNumbersEqual$1(panelSize, collapsedSize)) {\n // Store size before collapse;\n // This is the size that gets restored if the expand() API is used.\n panelSizeBeforeCollapseRef.current.set(panelData.id, panelSize);\n const isLastPanel = findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1;\n const delta = isLastPanel ? panelSize - collapsedSize : collapsedSize - panelSize;\n const nextLayout = adjustLayoutByDelta({\n delta,\n initialLayout: prevLayout,\n panelConstraints: panelConstraintsArray,\n pivotIndices,\n prevLayout,\n trigger: \"imperative-api\"\n });\n if (!compareLayouts(prevLayout, nextLayout)) {\n setLayout(nextLayout);\n eagerValuesRef.current.layout = nextLayout;\n if (onLayout) {\n onLayout(nextLayout);\n }\n callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);\n }\n }\n }\n }, []);\n\n // External APIs are safe to memoize via committed values ref\n const expandPanel = useCallback((panelData, minSizeOverride) => {\n const {\n onLayout\n } = committedValuesRef.current;\n const {\n layout: prevLayout,\n panelDataArray\n } = eagerValuesRef.current;\n if (panelData.constraints.collapsible) {\n const panelConstraintsArray = panelDataArray.map(panelData => panelData.constraints);\n const {\n collapsedSize = 0,\n panelSize = 0,\n minSize: minSizeFromProps = 0,\n pivotIndices\n } = panelDataHelper(panelDataArray, panelData, prevLayout);\n const minSize = minSizeOverride !== null && minSizeOverride !== void 0 ? minSizeOverride : minSizeFromProps;\n if (fuzzyNumbersEqual$1(panelSize, collapsedSize)) {\n // Restore this panel to the size it was before it was collapsed, if possible.\n const prevPanelSize = panelSizeBeforeCollapseRef.current.get(panelData.id);\n const baseSize = prevPanelSize != null && prevPanelSize >= minSize ? prevPanelSize : minSize;\n const isLastPanel = findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1;\n const delta = isLastPanel ? panelSize - baseSize : baseSize - panelSize;\n const nextLayout = adjustLayoutByDelta({\n delta,\n initialLayout: prevLayout,\n panelConstraints: panelConstraintsArray,\n pivotIndices,\n prevLayout,\n trigger: \"imperative-api\"\n });\n if (!compareLayouts(prevLayout, nextLayout)) {\n setLayout(nextLayout);\n eagerValuesRef.current.layout = nextLayout;\n if (onLayout) {\n onLayout(nextLayout);\n }\n callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);\n }\n }\n }\n }, []);\n\n // External APIs are safe to memoize via committed values ref\n const getPanelSize = useCallback(panelData => {\n const {\n layout,\n panelDataArray\n } = eagerValuesRef.current;\n const {\n panelSize\n } = panelDataHelper(panelDataArray, panelData, layout);\n assert(panelSize != null, `Panel size not found for panel \"${panelData.id}\"`);\n return panelSize;\n }, []);\n\n // This API should never read from committedValuesRef\n const getPanelStyle = useCallback((panelData, defaultSize) => {\n const {\n panelDataArray\n } = eagerValuesRef.current;\n const panelIndex = findPanelDataIndex(panelDataArray, panelData);\n return computePanelFlexBoxStyle({\n defaultSize,\n dragState,\n layout,\n panelData: panelDataArray,\n panelIndex\n });\n }, [dragState, layout]);\n\n // External APIs are safe to memoize via committed values ref\n const isPanelCollapsed = useCallback(panelData => {\n const {\n layout,\n panelDataArray\n } = eagerValuesRef.current;\n const {\n collapsedSize = 0,\n collapsible,\n panelSize\n } = panelDataHelper(panelDataArray, panelData, layout);\n assert(panelSize != null, `Panel size not found for panel \"${panelData.id}\"`);\n return collapsible === true && fuzzyNumbersEqual$1(panelSize, collapsedSize);\n }, []);\n\n // External APIs are safe to memoize via committed values ref\n const isPanelExpanded = useCallback(panelData => {\n const {\n layout,\n panelDataArray\n } = eagerValuesRef.current;\n const {\n collapsedSize = 0,\n collapsible,\n panelSize\n } = panelDataHelper(panelDataArray, panelData, layout);\n assert(panelSize != null, `Panel size not found for panel \"${panelData.id}\"`);\n return !collapsible || fuzzyCompareNumbers(panelSize, collapsedSize) > 0;\n }, []);\n const registerPanel = useCallback(panelData => {\n const {\n panelDataArray\n } = eagerValuesRef.current;\n panelDataArray.push(panelData);\n panelDataArray.sort((panelA, panelB) => {\n const orderA = panelA.order;\n const orderB = panelB.order;\n if (orderA == null && orderB == null) {\n return 0;\n } else if (orderA == null) {\n return -1;\n } else if (orderB == null) {\n return 1;\n } else {\n return orderA - orderB;\n }\n });\n eagerValuesRef.current.panelDataArrayChanged = true;\n forceUpdate();\n }, [forceUpdate]);\n\n // (Re)calculate group layout whenever panels are registered or unregistered.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useIsomorphicLayoutEffect(() => {\n if (eagerValuesRef.current.panelDataArrayChanged) {\n eagerValuesRef.current.panelDataArrayChanged = false;\n const {\n autoSaveId,\n onLayout,\n storage\n } = committedValuesRef.current;\n const {\n layout: prevLayout,\n panelDataArray\n } = eagerValuesRef.current;\n\n // If this panel has been configured to persist sizing information,\n // default size should be restored from local storage if possible.\n let unsafeLayout = null;\n if (autoSaveId) {\n const state = loadPanelGroupState(autoSaveId, panelDataArray, storage);\n if (state) {\n panelSizeBeforeCollapseRef.current = new Map(Object.entries(state.expandToSizes));\n unsafeLayout = state.layout;\n }\n }\n if (unsafeLayout == null) {\n unsafeLayout = calculateUnsafeDefaultLayout({\n panelDataArray\n });\n }\n\n // Validate even saved layouts in case something has changed since last render\n // e.g. for pixel groups, this could be the size of the window\n const nextLayout = validatePanelGroupLayout({\n layout: unsafeLayout,\n panelConstraints: panelDataArray.map(panelData => panelData.constraints)\n });\n if (!areEqual(prevLayout, nextLayout)) {\n setLayout(nextLayout);\n eagerValuesRef.current.layout = nextLayout;\n if (onLayout) {\n onLayout(nextLayout);\n }\n callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);\n }\n }\n });\n\n // Reset the cached layout if hidden by the Activity/Offscreen API\n useIsomorphicLayoutEffect(() => {\n const eagerValues = eagerValuesRef.current;\n return () => {\n eagerValues.layout = [];\n };\n }, []);\n const registerResizeHandle = useCallback(dragHandleId => {\n let isRTL = false;\n const panelGroupElement = panelGroupElementRef.current;\n if (panelGroupElement) {\n const style = window.getComputedStyle(panelGroupElement, null);\n if (style.getPropertyValue(\"direction\") === \"rtl\") {\n isRTL = true;\n }\n }\n return function resizeHandler(event) {\n event.preventDefault();\n const panelGroupElement = panelGroupElementRef.current;\n if (!panelGroupElement) {\n return () => null;\n }\n const {\n direction,\n dragState,\n id: groupId,\n keyboardResizeBy,\n onLayout\n } = committedValuesRef.current;\n const {\n layout: prevLayout,\n panelDataArray\n } = eagerValuesRef.current;\n const {\n initialLayout\n } = dragState !== null && dragState !== void 0 ? dragState : {};\n const pivotIndices = determinePivotIndices(groupId, dragHandleId, panelGroupElement);\n let delta = calculateDeltaPercentage(event, dragHandleId, direction, dragState, keyboardResizeBy, panelGroupElement);\n const isHorizontal = direction === \"horizontal\";\n if (isHorizontal && isRTL) {\n delta = -delta;\n }\n const panelConstraints = panelDataArray.map(panelData => panelData.constraints);\n const nextLayout = adjustLayoutByDelta({\n delta,\n initialLayout: initialLayout !== null && initialLayout !== void 0 ? initialLayout : prevLayout,\n panelConstraints,\n pivotIndices,\n prevLayout,\n trigger: isKeyDown(event) ? \"keyboard\" : \"mouse-or-touch\"\n });\n const layoutChanged = !compareLayouts(prevLayout, nextLayout);\n\n // Only update the cursor for layout changes triggered by touch/mouse events (not keyboard)\n // Update the cursor even if the layout hasn't changed (we may need to show an invalid cursor state)\n if (isPointerEvent(event) || isMouseEvent(event)) {\n // Watch for multiple subsequent deltas; this might occur for tiny cursor movements.\n // In this case, Panel sizes might not change–\n // but updating cursor in this scenario would cause a flicker.\n if (prevDeltaRef.current != delta) {\n prevDeltaRef.current = delta;\n if (!layoutChanged && delta !== 0) {\n // If the pointer has moved too far to resize the panel any further, note this so we can update the cursor.\n // This mimics VS Code behavior.\n if (isHorizontal) {\n reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX);\n } else {\n reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX);\n }\n } else {\n reportConstraintsViolation(dragHandleId, 0);\n }\n }\n }\n if (layoutChanged) {\n setLayout(nextLayout);\n eagerValuesRef.current.layout = nextLayout;\n if (onLayout) {\n onLayout(nextLayout);\n }\n callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);\n }\n };\n }, []);\n\n // External APIs are safe to memoize via committed values ref\n const resizePanel = useCallback((panelData, unsafePanelSize) => {\n const {\n onLayout\n } = committedValuesRef.current;\n const {\n layout: prevLayout,\n panelDataArray\n } = eagerValuesRef.current;\n const panelConstraintsArray = panelDataArray.map(panelData => panelData.constraints);\n const {\n panelSize,\n pivotIndices\n } = panelDataHelper(panelDataArray, panelData, prevLayout);\n assert(panelSize != null, `Panel size not found for panel \"${panelData.id}\"`);\n const isLastPanel = findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1;\n const delta = isLastPanel ? panelSize - unsafePanelSize : unsafePanelSize - panelSize;\n const nextLayout = adjustLayoutByDelta({\n delta,\n initialLayout: prevLayout,\n panelConstraints: panelConstraintsArray,\n pivotIndices,\n prevLayout,\n trigger: \"imperative-api\"\n });\n if (!compareLayouts(prevLayout, nextLayout)) {\n setLayout(nextLayout);\n eagerValuesRef.current.layout = nextLayout;\n if (onLayout) {\n onLayout(nextLayout);\n }\n callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);\n }\n }, []);\n const reevaluatePanelConstraints = useCallback((panelData, prevConstraints) => {\n const {\n layout,\n panelDataArray\n } = eagerValuesRef.current;\n const {\n collapsedSize: prevCollapsedSize = 0,\n collapsible: prevCollapsible\n } = prevConstraints;\n const {\n collapsedSize: nextCollapsedSize = 0,\n collapsible: nextCollapsible,\n maxSize: nextMaxSize = 100,\n minSize: nextMinSize = 0\n } = panelData.constraints;\n const {\n panelSize: prevPanelSize\n } = panelDataHelper(panelDataArray, panelData, layout);\n if (prevPanelSize == null) {\n // It's possible that the panels in this group have changed since the last render\n return;\n }\n if (prevCollapsible && nextCollapsible && fuzzyNumbersEqual$1(prevPanelSize, prevCollapsedSize)) {\n if (!fuzzyNumbersEqual$1(prevCollapsedSize, nextCollapsedSize)) {\n resizePanel(panelData, nextCollapsedSize);\n }\n } else if (prevPanelSize < nextMinSize) {\n resizePanel(panelData, nextMinSize);\n } else if (prevPanelSize > nextMaxSize) {\n resizePanel(panelData, nextMaxSize);\n }\n }, [resizePanel]);\n\n // TODO Multiple drag handles can be active at the same time so this API is a bit awkward now\n const startDragging = useCallback((dragHandleId, event) => {\n const {\n direction\n } = committedValuesRef.current;\n const {\n layout\n } = eagerValuesRef.current;\n if (!panelGroupElementRef.current) {\n return;\n }\n const handleElement = getResizeHandleElement(dragHandleId, panelGroupElementRef.current);\n assert(handleElement, `Drag handle element not found for id \"${dragHandleId}\"`);\n const initialCursorPosition = getResizeEventCursorPosition(direction, event);\n setDragState({\n dragHandleId,\n dragHandleRect: handleElement.getBoundingClientRect(),\n initialCursorPosition,\n initialLayout: layout\n });\n }, []);\n const stopDragging = useCallback(() => {\n setDragState(null);\n }, []);\n const unregisterPanel = useCallback(panelData => {\n const {\n panelDataArray\n } = eagerValuesRef.current;\n const index = findPanelDataIndex(panelDataArray, panelData);\n if (index >= 0) {\n panelDataArray.splice(index, 1);\n\n // TRICKY\n // When a panel is removed from the group, we should delete the most recent prev-size entry for it.\n // If we don't do this, then a conditionally rendered panel might not call onResize when it's re-mounted.\n // Strict effects mode makes this tricky though because all panels will be registered, unregistered, then re-registered on mount.\n delete panelIdToLastNotifiedSizeMapRef.current[panelData.id];\n eagerValuesRef.current.panelDataArrayChanged = true;\n forceUpdate();\n }\n }, [forceUpdate]);\n const context = useMemo(() => ({\n collapsePanel,\n direction,\n dragState,\n expandPanel,\n getPanelSize,\n getPanelStyle,\n groupId,\n isPanelCollapsed,\n isPanelExpanded,\n reevaluatePanelConstraints,\n registerPanel,\n registerResizeHandle,\n resizePanel,\n startDragging,\n stopDragging,\n unregisterPanel,\n panelGroupElement: panelGroupElementRef.current\n }), [collapsePanel, dragState, direction, expandPanel, getPanelSize, getPanelStyle, groupId, isPanelCollapsed, isPanelExpanded, reevaluatePanelConstraints, registerPanel, registerResizeHandle, resizePanel, startDragging, stopDragging, unregisterPanel]);\n const style = {\n display: \"flex\",\n flexDirection: direction === \"horizontal\" ? \"row\" : \"column\",\n height: \"100%\",\n overflow: \"hidden\",\n width: \"100%\"\n };\n return createElement(PanelGroupContext.Provider, {\n value: context\n }, createElement(Type, {\n ...rest,\n children,\n className: classNameFromProps,\n id: idFromProps,\n ref: panelGroupElementRef,\n style: {\n ...style,\n ...styleFromProps\n },\n // CSS selectors\n [DATA_ATTRIBUTES.group]: \"\",\n [DATA_ATTRIBUTES.groupDirection]: direction,\n [DATA_ATTRIBUTES.groupId]: groupId\n }));\n}\nconst PanelGroup = forwardRef((props, ref) => createElement(PanelGroupWithForwardedRef, {\n ...props,\n forwardedRef: ref\n}));\nPanelGroupWithForwardedRef.displayName = \"PanelGroup\";\nPanelGroup.displayName = \"forwardRef(PanelGroup)\";\nfunction findPanelDataIndex(panelDataArray, panelData) {\n return panelDataArray.findIndex(prevPanelData => prevPanelData === panelData || prevPanelData.id === panelData.id);\n}\nfunction panelDataHelper(panelDataArray, panelData, layout) {\n const panelIndex = findPanelDataIndex(panelDataArray, panelData);\n const isLastPanel = panelIndex === panelDataArray.length - 1;\n const pivotIndices = isLastPanel ? [panelIndex - 1, panelIndex] : [panelIndex, panelIndex + 1];\n const panelSize = layout[panelIndex];\n return {\n ...panelData.constraints,\n panelSize,\n pivotIndices\n };\n}\n\n// https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/\n\nfunction useWindowSplitterResizeHandlerBehavior({\n disabled,\n handleId,\n resizeHandler,\n panelGroupElement\n}) {\n useEffect(() => {\n if (disabled || resizeHandler == null || panelGroupElement == null) {\n return;\n }\n const handleElement = getResizeHandleElement(handleId, panelGroupElement);\n if (handleElement == null) {\n return;\n }\n const onKeyDown = event => {\n if (event.defaultPrevented) {\n return;\n }\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowLeft\":\n case \"ArrowRight\":\n case \"ArrowUp\":\n case \"End\":\n case \"Home\":\n {\n event.preventDefault();\n resizeHandler(event);\n break;\n }\n case \"F6\":\n {\n event.preventDefault();\n const groupId = handleElement.getAttribute(DATA_ATTRIBUTES.groupId);\n assert(groupId, `No group element found for id \"${groupId}\"`);\n const handles = getResizeHandleElementsForGroup(groupId, panelGroupElement);\n const index = getResizeHandleElementIndex(groupId, handleId, panelGroupElement);\n assert(index !== null, `No resize element found for id \"${handleId}\"`);\n const nextIndex = event.shiftKey ? index > 0 ? index - 1 : handles.length - 1 : index + 1 < handles.length ? index + 1 : 0;\n const nextHandle = handles[nextIndex];\n nextHandle.focus();\n break;\n }\n }\n };\n handleElement.addEventListener(\"keydown\", onKeyDown);\n return () => {\n handleElement.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [panelGroupElement, disabled, handleId, resizeHandler]);\n}\n\nfunction PanelResizeHandle({\n children = null,\n className: classNameFromProps = \"\",\n disabled = false,\n hitAreaMargins,\n id: idFromProps,\n onBlur,\n onClick,\n onDragging,\n onFocus,\n onPointerDown,\n onPointerUp,\n style: styleFromProps = {},\n tabIndex = 0,\n tagName: Type = \"div\",\n ...rest\n}) {\n var _hitAreaMargins$coars, _hitAreaMargins$fine;\n const elementRef = useRef(null);\n\n // Use a ref to guard against users passing inline props\n const callbacksRef = useRef({\n onClick,\n onDragging,\n onPointerDown,\n onPointerUp\n });\n useEffect(() => {\n callbacksRef.current.onClick = onClick;\n callbacksRef.current.onDragging = onDragging;\n callbacksRef.current.onPointerDown = onPointerDown;\n callbacksRef.current.onPointerUp = onPointerUp;\n });\n const panelGroupContext = useContext(PanelGroupContext);\n if (panelGroupContext === null) {\n throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);\n }\n const {\n direction,\n groupId,\n registerResizeHandle: registerResizeHandleWithParentGroup,\n startDragging,\n stopDragging,\n panelGroupElement\n } = panelGroupContext;\n const resizeHandleId = useUniqueId(idFromProps);\n const [state, setState] = useState(\"inactive\");\n const [isFocused, setIsFocused] = useState(false);\n const [resizeHandler, setResizeHandler] = useState(null);\n const committedValuesRef = useRef({\n state\n });\n useIsomorphicLayoutEffect(() => {\n committedValuesRef.current.state = state;\n });\n useEffect(() => {\n if (disabled) {\n setResizeHandler(null);\n } else {\n const resizeHandler = registerResizeHandleWithParentGroup(resizeHandleId);\n setResizeHandler(() => resizeHandler);\n }\n }, [disabled, resizeHandleId, registerResizeHandleWithParentGroup]);\n\n // Extract hit area margins before passing them to the effect's dependency array\n // so that inline object values won't trigger re-renders\n const coarseHitAreaMargins = (_hitAreaMargins$coars = hitAreaMargins === null || hitAreaMargins === void 0 ? void 0 : hitAreaMargins.coarse) !== null && _hitAreaMargins$coars !== void 0 ? _hitAreaMargins$coars : 15;\n const fineHitAreaMargins = (_hitAreaMargins$fine = hitAreaMargins === null || hitAreaMargins === void 0 ? void 0 : hitAreaMargins.fine) !== null && _hitAreaMargins$fine !== void 0 ? _hitAreaMargins$fine : 5;\n useEffect(() => {\n if (disabled || resizeHandler == null) {\n return;\n }\n const element = elementRef.current;\n assert(element, \"Element ref not attached\");\n let didMove = false;\n const setResizeHandlerState = (action, isActive, event) => {\n if (!isActive) {\n setState(\"inactive\");\n return;\n }\n switch (action) {\n case \"down\":\n {\n setState(\"drag\");\n didMove = false;\n assert(event, 'Expected event to be defined for \"down\" action');\n startDragging(resizeHandleId, event);\n const {\n onDragging,\n onPointerDown\n } = callbacksRef.current;\n onDragging === null || onDragging === void 0 ? void 0 : onDragging(true);\n onPointerDown === null || onPointerDown === void 0 ? void 0 : onPointerDown();\n break;\n }\n case \"move\":\n {\n const {\n state\n } = committedValuesRef.current;\n didMove = true;\n if (state !== \"drag\") {\n setState(\"hover\");\n }\n assert(event, 'Expected event to be defined for \"move\" action');\n resizeHandler(event);\n break;\n }\n case \"up\":\n {\n setState(\"hover\");\n stopDragging();\n const {\n onClick,\n onDragging,\n onPointerUp\n } = callbacksRef.current;\n onDragging === null || onDragging === void 0 ? void 0 : onDragging(false);\n onPointerUp === null || onPointerUp === void 0 ? void 0 : onPointerUp();\n if (!didMove) {\n onClick === null || onClick === void 0 ? void 0 : onClick();\n }\n break;\n }\n }\n };\n return registerResizeHandle(resizeHandleId, element, direction, {\n coarse: coarseHitAreaMargins,\n fine: fineHitAreaMargins\n }, setResizeHandlerState);\n }, [coarseHitAreaMargins, direction, disabled, fineHitAreaMargins, registerResizeHandleWithParentGroup, resizeHandleId, resizeHandler, startDragging, stopDragging]);\n useWindowSplitterResizeHandlerBehavior({\n disabled,\n handleId: resizeHandleId,\n resizeHandler,\n panelGroupElement\n });\n const style = {\n touchAction: \"none\",\n userSelect: \"none\"\n };\n return createElement(Type, {\n ...rest,\n children,\n className: classNameFromProps,\n id: idFromProps,\n onBlur: () => {\n setIsFocused(false);\n onBlur === null || onBlur === void 0 ? void 0 : onBlur();\n },\n onFocus: () => {\n setIsFocused(true);\n onFocus === null || onFocus === void 0 ? void 0 : onFocus();\n },\n ref: elementRef,\n role: \"separator\",\n style: {\n ...style,\n ...styleFromProps\n },\n tabIndex,\n // CSS selectors\n [DATA_ATTRIBUTES.groupDirection]: direction,\n [DATA_ATTRIBUTES.groupId]: groupId,\n [DATA_ATTRIBUTES.resizeHandle]: \"\",\n [DATA_ATTRIBUTES.resizeHandleActive]: state === \"drag\" ? \"pointer\" : isFocused ? \"keyboard\" : undefined,\n [DATA_ATTRIBUTES.resizeHandleEnabled]: !disabled,\n [DATA_ATTRIBUTES.resizeHandleId]: resizeHandleId,\n [DATA_ATTRIBUTES.resizeHandleState]: state\n });\n}\nPanelResizeHandle.displayName = \"PanelResizeHandle\";\n\nfunction usePanelGroupContext() {\n const context = useContext(PanelGroupContext);\n return {\n direction: context === null || context === void 0 ? void 0 : context.direction,\n groupId: context === null || context === void 0 ? void 0 : context.groupId\n };\n}\n\nfunction getPanelElement(id, scope = document) {\n const element = scope.querySelector(`[data-panel-id=\"${id}\"]`);\n if (element) {\n return element;\n }\n return null;\n}\n\nfunction getPanelElementsForGroup(groupId, scope = document) {\n return Array.from(scope.querySelectorAll(`[data-panel][data-panel-group-id=\"${groupId}\"]`));\n}\n\nfunction getIntersectingRectangle(rectOne, rectTwo, strict) {\n if (!intersects(rectOne, rectTwo, strict)) {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n }\n return {\n x: Math.max(rectOne.x, rectTwo.x),\n y: Math.max(rectOne.y, rectTwo.y),\n width: Math.min(rectOne.x + rectOne.width, rectTwo.x + rectTwo.width) - Math.max(rectOne.x, rectTwo.x),\n height: Math.min(rectOne.y + rectOne.height, rectTwo.y + rectTwo.height) - Math.max(rectOne.y, rectTwo.y)\n };\n}\n\nexport { DATA_ATTRIBUTES, Panel, PanelGroup, PanelResizeHandle, assert, customizeGlobalCursorStyles, disableGlobalCursorStyles, enableGlobalCursorStyles, getIntersectingRectangle, getPanelElement, getPanelElementsForGroup, getPanelGroupElement, getResizeHandleElement, getResizeHandleElementIndex, getResizeHandleElementsForGroup, getResizeHandlePanelIds, intersects, setNonce, usePanelGroupContext };\n"],"names":["isBrowser","window","PanelGroupContext","createContext","displayName","DATA_ATTRIBUTES","group","groupDirection","groupId","panel","panelCollapsible","panelId","panelSize","resizeHandle","resizeHandleActive","resizeHandleEnabled","resizeHandleId","resizeHandleState","useIsomorphicLayoutEffect","useLayoutEffect","useId","React","toString","wrappedUseId","counter","useUniqueId","idFromParams","idFromUseId","idRef","useRef","current","PanelWithForwardedRef","children","className","classNameFromProps","collapsedSize","collapsible","defaultSize","forwardedRef","id","idFromProps","maxSize","minSize","onCollapse","onExpand","onResize","order","style","styleFromProps","tagName","Type","rest","context","useContext","Error","collapsePanel","expandPanel","getPanelSize","getPanelStyle","isPanelCollapsed","reevaluatePanelConstraints","registerPanel","resizePanel","unregisterPanel","panelDataRef","callbacks","constraints","idIsFromProps","undefined","didLogMissingDefaultSizeWarning","prevConstraints","panelData","useImperativeHandle","collapse","expand","getId","getSize","isCollapsed","isExpanded","resize","size","createElement","parseFloat","flexGrow","toFixed","Panel","forwardRef","props","ref","currentCursorStyle","prevRuleIndex","styleElement","setGlobalCursorStyle","state","constraintFlags","isPointerDown","_styleElement$sheet$i","_styleElement$sheet2","verticalMin","EXCEEDED_VERTICAL_MIN","verticalMax","EXCEEDED_VERTICAL_MAX","EXCEEDED_HORIZONTAL_MIN","EXCEEDED_HORIZONTAL_MAX","getCursorStyle","_styleElement$sheet","document","head","appendChild","sheet","removeRule","insertRule","isKeyDown","event","type","isPointerEvent","startsWith","isMouseEvent","getResizeEventCoordinates","isPrimary","x","clientX","y","clientY","Infinity","intersects","rectOne","rectTwo","strict","width","height","creates_stacking_context","node","getComputedStyle","position","zIndex","_get_parent","display","get_parent","is_flex_item","opacity","transform","webkitTransform","mixBlendMode","filter","webkitFilter","isolation","test","willChange","webkitOverflowScrolling","find_stacking_context","nodes","i","length","assert","get_z_index","Number","get_ancestors","ancestors","push","parentNode","ShadowRoot","host","isCoarsePointer","matchMedia","matches","getInputType","intersectingHandles","ownerDocumentCounts","Map","panelConstraintFlags","registeredResizeHandlers","Set","handlePointerDown","target","recalculateIntersectingHandles","updateListeners","updateResizeHandlerStates","updateCursor","preventDefault","isWithinResizeHandle","stopImmediatePropagation","handlePointerMove","buttons","handlePointerUp","clear","element","currentElement","hasAttribute","parentElement","splice","targetElement","HTMLElement","SVGElement","forEach","data","dragHandleElement","hitAreaMargins","dragHandleRect","getBoundingClientRect","bottom","left","right","top","margin","coarse","fine","contains","a","b","common_ancestor","at","pop","z_indexes","childNodes","furthest_ancestors","child","Math","sign","compare","didIntersect","reportConstraintsViolation","flag","set","intersectsHorizontal","intersectsVertical","direction","removeChild","listenersAbortController","_listenersAbortContro","abort","AbortController","options","capture","signal","count","ownerDocument","body","addEventListener","_","action","setResizeHandlerState","isActive","includes","expectedCondition","message","console","error","fuzzyCompareNumbers","actual","expected","fractionDigits","fuzzyNumbersEqual$1","fuzzyNumbersEqual","panelConstraints","panelConstraintsArray","panelIndex","min","adjustLayoutByDelta","delta","initialLayout","pivotIndices","prevLayout","trigger","nextLayout","firstPivotIndex","secondPivotIndex","deltaApplied","index","prevSize","localDelta","abs","increment","maxAvailableDelta","minAbsDelta","deltaRemaining","safeSize","localeCompare","numeric","fuzzyLayoutsEqual","pivotIndex","unsafeSize","reduce","total","calculateAriaValues","layout","panelsArray","currentMinSize","currentMaxSize","totalMinSize","totalMaxSize","firstIndex","valueMax","valueMin","max","valueNow","getResizeHandleElementsForGroup","scope","Array","from","querySelectorAll","getResizeHandleElementIndex","findIndex","handle","getAttribute","determinePivotIndices","dragHandleId","panelGroupElement","getPanelGroupElement","rootElement","dataset","panelGroupId","querySelector","getResizeHandleElement","getResizeHandlePanelIds","handleId","_panelsArray$index$id","_panelsArray$index","_panelsArray$id","_panelsArray","handles","indexOf","areEqual","arrayA","arrayB","getResizeEventCursorPosition","isHorizontal","calculateDeltaPercentage","initialDragState","keyboardResizeBy","shiftKey","movement","key","handleElement","initialCursorPosition","cursorPosition","groupElement","groupRect","calculateDragOffsetPercentage","callPanelCallbacks","panelIdToLastNotifiedSizeMap","lastNotifiedSize","compareLayouts","initializeDefaultStorage","storageObject","localStorage","getItem","name","setItem","value","getPanelGroupKey","autoSaveId","getPanelKey","panels","map","JSON","stringify","sort","join","loadSerializedPanelGroupState","storage","panelGroupKey","serialized","parsed","parse","savePanelGroupState","panelSizesBeforeCollapse","sizes","_loadSerializedPanelG2","panelKey","expandToSizes","Object","fromEntries","entries","validatePanelGroupLayout","nextLayoutTotalSize","accumulated","remainingSize","defaultStorage","debounceMap","PanelGroupWithForwardedRef","onLayout","panelGroupElementRef","dragState","setDragState","useState","setLayout","forceUpdate","setCount","useCallback","prevCount","useForceUpdate","panelIdToLastNotifiedSizeMapRef","panelSizeBeforeCollapseRef","prevDeltaRef","committedValuesRef","eagerValuesRef","panelDataArray","panelDataArrayChanged","didLogIdAndOrderWarning","didLogPanelConstraintsWarning","prevPanelIds","getLayout","unsafeLayout","safeLayout","didWarnAboutMissingResizeHandle","resizeHandleElements","resizeHandleElement","setAttribute","round","removeAttribute","useEffect","eagerValues","cleanupFunctions","idBefore","idAfter","onKeyDown","defaultPrevented","removeEventListener","cleanupFunction","useWindowSplitterPanelGroupBehavior","debouncedSave","callback","durationMs","timeoutId","args","clearTimeout","setTimeout","debounce","clonedPanelDataArray","clonedPanelSizesBeforeCollapse","panelDataHelper","findPanelDataIndex","minSizeOverride","minSizeFromProps","prevPanelSize","get","baseSize","precision","flexBasis","flexShrink","overflow","pointerEvents","computePanelFlexBoxStyle","isPanelExpanded","panelA","panelB","orderA","orderB","_loadSerializedPanelG","_state$panelKey","loadPanelGroupState","numPanelsWithSizes","calculateUnsafeDefaultLayout","registerResizeHandle","isRTL","getPropertyValue","layoutChanged","unsafePanelSize","prevCollapsedSize","prevCollapsible","nextCollapsedSize","nextCollapsible","nextMaxSize","nextMinSize","startDragging","stopDragging","useMemo","flexDirection","Provider","PanelGroup","prevPanelData","PanelResizeHandle","disabled","onBlur","onClick","onDragging","onFocus","onPointerDown","onPointerUp","tabIndex","_hitAreaMargins$coars","_hitAreaMargins$fine","elementRef","callbacksRef","panelGroupContext","registerResizeHandleWithParentGroup","setState","isFocused","setIsFocused","resizeHandler","setResizeHandler","coarseHitAreaMargins","fineHitAreaMargins","didMove","_ownerDocumentCounts$","add","_ownerDocumentCounts$2","delete","focus","useWindowSplitterResizeHandlerBehavior","role","touchAction","userSelect"],"mappings":"qYAGA,MAAMA,EAA8B,oBAAXC,OAInBC,EAAoBC,EAAAA,cAAc,MACxCD,EAAkBE,YAAc,oBAE3B,MAACC,EAAkB,CACtBC,MAAO,mBACPC,eAAgB,6BAChBC,QAAS,sBACTC,MAAO,aACPC,iBAAkB,yBAClBC,QAAS,gBACTC,UAAW,kBACXC,aAAc,qBACdC,mBAAoB,4BACpBC,oBAAqB,mCACrBC,eAAgB,8BAChBC,kBAAmB,4BAIfC,EAA4BlB,EAAYmB,kBAAkB,OAE1DC,EAAQC,EAAM,QAAQC,YACtBC,EAAgC,mBAA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qIEU,CAAuC,CACrC3B,WACA9J,SAAU3S,EACV0d,gBACAvL,sBAMF,OAAOlO,EAAAA,cAAc/B,EAAM,IACtBC,EACHnB,WACAC,UAAWC,EACXK,GAAIC,EACJkb,OAAQ,KACNe,GAAa,GACbf,SAAgDA,GAAQ,EAE1DG,QAAS,KACPY,GAAa,GACbZ,SAAkDA,GAAS,EAE7DrY,IAAK2Y,EACLkB,KAAM,YACNtc,MAAO,CAlBPuc,YAAa,OACbC,WAAY,UAmBPvc,GAELgb,WAEA,CAAC3d,EAAgBE,gBAAiB2N,EAClC,CAAC7N,EAAgBG,SAAUA,EAC3B,CAACH,EAAgBQ,cAAe,GAChC,CAACR,EAAgBS,oBAA+B,SAAV+E,EAAmB,UAAY2Y,EAAY,gBAAapa,EAC9F,CAAC/D,EAAgBU,sBAAuB0c,EACxC,CAACpd,EAAgBW,gBAAiBA,EAClC,CAACX,EAAgBY,mBAAoB4E,GAEzC,CAjPA+R,GAA2BxX,YAAc,aACzCkd,GAAWld,YAAc,yBAiPzBod,GAAkBpd,YAAc"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../mdast-util-newline-to-break/lib/index.js");exports.default=function(){return function(t){e.newlineToBreak(t)}};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/remark-breaks/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Root} Root\n */\n\nimport {newlineToBreak} from 'mdast-util-newline-to-break'\n\n/**\n * Support hard breaks without needing spaces or escapes (turns enters into\n * `<br>`s).\n *\n * @returns\n * Transform.\n */\nexport default function remarkBreaks() {\n /**\n * Transform.\n *\n * @param {Root} tree\n * Tree.\n * @returns {undefined}\n * Nothing.\n */\n return function (tree) {\n newlineToBreak(tree)\n }\n}\n"],"names":["tree","newlineToBreak"],"mappings":"oJAae,WASb,OAAO,SAAUA,GACfC,EAAAA,eAAeD,EAChB,CACH"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("os"),e=require("tty"),t=require("../has-flag/index.js");function o(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var n,i,s=o(r),u=o(e);exports.__require=function(){if(i)return n;i=1;const r=s.default,e=u.default,o=t.__require(),{env:l}=process;let c;function R(r){return 0!==r&&{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function a(e,t){if(0===c)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!t&&void 0===c)return 0;const n=c||0;if("dumb"===l.TERM)return n;if("win32"===process.platform){const e=r.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in l)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((r=>r in l))||"codeship"===l.CI_NAME?1:n;if("TEAMCITY_VERSION"in l)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(l.TEAMCITY_VERSION)?1:0;if("truecolor"===l.COLORTERM)return 3;if("TERM_PROGRAM"in l){const r=parseInt((l.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(l.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(l.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(l.TERM)||"COLORTERM"in l?1:n}return o("no-color")||o("no-colors")||o("color=false")||o("color=never")?c=0:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(c=1),"FORCE_COLOR"in l&&(c="true"===l.FORCE_COLOR?1:"false"===l.FORCE_COLOR?0:0===l.FORCE_COLOR.length?1:Math.min(parseInt(l.FORCE_COLOR,10),3)),n={supportsColor:function(r){return R(a(r,r&&r.isTTY))},stdout:R(a(!0,e.isatty(1))),stderr:R(a(!0,e.isatty(2)))}};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../node_modules/supports-color/index.js"],"sourcesContent":["'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n"],"names":["os","require$$0","tty","require$$1","hasFlag","require$$2","env","process","forceColor","translateLevel","level","hasBasic","has256","has16m","supportsColor","haveStream","streamIsTTY","undefined","min","TERM","platform","osRelease","release","split","Number","some","sign","CI_NAME","test","TEAMCITY_VERSION","COLORTERM","version","parseInt","TERM_PROGRAM_VERSION","TERM_PROGRAM","FORCE_COLOR","length","Math","supportsColor_1","stream","isTTY","stdout","isatty","stderr"],"mappings":"wRACA,MAAMA,EAAKC,EAAAA,QACLC,EAAMC,EAAAA,QACNC,EAAUC,EAAAA,aAEVC,IAACA,GAAOC,QAEd,IAAIC,EAuBJ,SAASC,EAAeC,GACvB,OAAc,IAAVA,GAIG,CACNA,QACAC,UAAU,EACVC,OAAQF,GAAS,EACjBG,OAAQH,GAAS,EAEnB,CAEA,SAASI,EAAcC,EAAYC,GAClC,GAAmB,IAAfR,EACH,OAAO,EAGR,GAAIJ,EAAQ,cACXA,EAAQ,eACRA,EAAQ,mBACR,OAAO,EAGR,GAAIA,EAAQ,aACX,OAAO,EAGR,GAAIW,IAAeC,QAA8BC,IAAfT,EACjC,OAAO,EAGR,MAAMU,EAAMV,GAAc,EAE1B,GAAiB,SAAbF,EAAIa,KACP,OAAOD,EAGR,GAAyB,UAArBX,QAAQa,SAAsB,CAGjC,MAAMC,EAAYrB,EAAGsB,UAAUC,MAAM,KACrC,OACCC,OAAOH,EAAU,KAAO,IACxBG,OAAOH,EAAU,KAAO,MAEjBG,OAAOH,EAAU,KAAO,MAAQ,EAAI,EAGrC,CACT,CAEC,GAAI,OAAQf,EACX,MAAI,CAAC,SAAU,WAAY,WAAY,YAAa,iBAAkB,aAAamB,MAAKC,GAAQA,KAAQpB,KAAwB,aAAhBA,EAAIqB,QAC5G,EAGDT,EAGR,GAAI,qBAAsBZ,EACzB,MAAO,gCAAgCsB,KAAKtB,EAAIuB,kBAAoB,EAAI,EAGzE,GAAsB,cAAlBvB,EAAIwB,UACP,OAAO,EAGR,GAAI,iBAAkBxB,EAAK,CAC1B,MAAMyB,EAAUC,UAAU1B,EAAI2B,sBAAwB,IAAIV,MAAM,KAAK,GAAI,IAEzE,OAAQjB,EAAI4B,cACX,IAAK,YACJ,OAAOH,GAAW,EAAI,EAAI,EAC3B,IAAK,iBACJ,OAAO,EAGX,CAEC,MAAI,iBAAiBH,KAAKtB,EAAIa,MACtB,EAGJ,8DAA8DS,KAAKtB,EAAIa,OAIvE,cAAeb,EAHX,EAODY,CACR,QAnHId,EAAQ,aACXA,EAAQ,cACRA,EAAQ,gBACRA,EAAQ,eACRI,EAAa,GACHJ,EAAQ,UAClBA,EAAQ,WACRA,EAAQ,eACRA,EAAQ,mBACRI,EAAa,GAGV,gBAAiBF,IAEnBE,EADuB,SAApBF,EAAI6B,YACM,EACiB,UAApB7B,EAAI6B,YACD,EAE2B,IAA3B7B,EAAI6B,YAAYC,OAAe,EAAIC,KAAKnB,IAAIc,SAAS1B,EAAI6B,YAAa,IAAK,IAwG1FG,EAAiB,CAChBxB,cAND,SAAyByB,GAExB,OAAO9B,EADOK,EAAcyB,EAAQA,GAAUA,EAAOC,OAEtD,EAICC,OAAQhC,EAAeK,GAAc,EAAMZ,EAAIwC,OAAO,KACtDC,OAAQlC,EAAeK,GAAc,EAAMZ,EAAIwC,OAAO"}
@@ -1,2 +1,2 @@
1
- import{__assign as e,__rest as t}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as n,jsx as i,Fragment as o}from"react/jsx-runtime";import{useState as r}from"react";import{ReactMarkdown as l}from"../../../node_modules/react-markdown/lib/react-markdown.js";var a={card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",padding:"24px"},title:{fontSize:"16px",fontWeight:"bold",marginBottom:"24px"},grid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px, 1fr))",gap:"24px",marginBottom:"24px"},gridItem:{backgroundColor:"#F8FAFC",border:"1px solid #DFE5EC",borderRadius:"8px",padding:"12px 8px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"12px"},gridItemHeight:{height:"50px"},label:{fontSize:"14px",fontWeight:400,color:"#64748B",margin:0},value:{fontWeight:"bold",fontSize:"14px",color:"#434C55",margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"120px"},section:{marginBottom:"12px",padding:"8px 12px",borderRadius:"8px",border:"1px solid #DEE4EB"},sectionLabel:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"8px",whiteSpace:"pre-line"},summaryText:{marginTop:"0px"},sectionText:{fontSize:"16px",fontWeight:400,lineHeight:"1.625",color:"#64748B",marginBottom:"8px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none"},lineClamp:{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"},container:{fontFamily:"Inter, sans-serif",color:"#434C54",marginBottom:"8px"},partContainer:{marginBottom:"8px"},partTitle:{fontSize:"16px",fontWeight:"600",marginBottom:"10px"},chapterList:{listStyle:"none",paddingLeft:"20px",margin:0},chapterItem:{marginBottom:"6px"},chapterLink:{textDecoration:"none",color:"#63748A",fontSize:"16px",lineHeight:"1.5"},chapterLinkHover:{textDecoration:"underline"},singleChapter:{marginBottom:"4px",fontSize:"16px"},chapterNumber:{color:"#63748A"}},d=function(d){var c,s,p,u,m,h,g=d.data,x=r(!1),y=x[0],v=x[1],f=r(!1),b=f[0],T=f[1],C=r(!1),k=C[0],B=C[1];return n("div",e({style:a.card},{children:[n("div",e({style:a.grid},{children:[n("div",e({style:a.gridItem},{children:[i("p",e({style:a.label},{children:"Book Title"})),i("p",e({style:a.value,title:null==g?void 0:g.title},{children:null!==(c=null==g?void 0:g.title)&&void 0!==c?c:"NA"}))]})),n("div",e({style:a.gridItem},{children:[i("p",e({style:a.label},{children:"Book Author"})),i("p",e({style:a.value,title:null==g?void 0:g.author},{children:null!==(s=null==g?void 0:g.author)&&void 0!==s?s:"NA"}))]})),n("div",e({style:a.gridItem},{children:[i("p",e({style:a.label},{children:"Total Sections"})),i("p",e({style:a.value},{children:null!==(p=null==g?void 0:g.totalSectionCount)&&void 0!==p?p:"NA"}))]})),n("div",e({style:a.gridItem},{children:[i("p",e({style:a.label},{children:"Total Pages"})),i("p",e({style:a.value},{children:null!==(u=null==g?void 0:g.totalPages)&&void 0!==u?u:"NA"}))]})),n("div",e({style:a.gridItem},{children:[i("p",e({style:a.label},{children:"Reading Time"})),i("p",e({style:a.value},{children:null!==(m=null==g?void 0:g.readingTime)&&void 0!==m?m:"NA"}))]}))]})),(null==g?void 0:g.bookDescription)&&(null==g?void 0:g.bookDescription.length)>0&&n("div",e({style:a.section},{children:[i("p",e({style:a.sectionLabel},{children:"Book Description"})),i("div",e({style:e(e(e({},a.sectionText),a.summaryText),b?{}:a.lineClamp)},{children:i(l,e({components:{p:function(n){n.node;var o=t(n,["node"]);return i("p",e({style:{marginTop:"0"}},o))}}},{children:null==g?void 0:g.bookDescription}))})),(null==g?void 0:g.bookDescription)&&(null==g?void 0:g.bookDescription.length)>0&&i("button",e({style:e(e({},a.button),{marginBottom:"10px"}),onClick:function(){return T((function(e){return!e}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:b?"View Less":"View More"}))]})),n("div",e({style:a.section},{children:[i("p",e({style:a.sectionLabel},{children:"AI Generated Summary"})),i("p",e({style:e(e({},a.sectionText),y?{}:a.lineClamp)},{children:i(l,e({components:{p:function(n){n.node;var o=t(n,["node"]);return i("p",e({style:{marginTop:"0"}},o))}}},{children:null==g?void 0:g.summary}))})),(null==g?void 0:g.summary)&&(null==g?void 0:g.summary.length)>0&&i("button",e({style:e(e({},a.button),{marginBottom:"10px"}),onClick:function(){return v((function(e){return!e}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:y?"View Less":"View More"}))]})),n("div",e({style:e(e({},a.section),{marginTop:"10px"})},{children:[i("p",e({style:a.sectionLabel},{children:"Table Of Content"})),i("div",e({style:e(e({},a.container),k?{}:a.lineClamp)},{children:null===(h=null==g?void 0:g.tableOfContent)||void 0===h?void 0:h.map((function(t,r){return i("div",e({style:a.partContainer},{children:t.children?n(o,{children:[i("p",e({style:a.partTitle},{children:t.title})),i("ul",e({style:a.chapterList},{children:t.children.map((function(t,o){var r=t.title.replace(/^\d+:\s*/,"");return n("li",e({style:a.chapterItem},{children:[n("span",e({style:a.chapterNumber},{children:[o+1,"."]})),i("span",{style:a.chapterLink,dangerouslySetInnerHTML:{__html:r}})]}),o)}))}))]}):i("div",e({style:a.singleChapter},{children:i("span",{style:a.chapterLink,dangerouslySetInnerHTML:{__html:t.title}})}))}),r)}))})),(null==g?void 0:g.tableOfContent)&&(null==g?void 0:g.tableOfContent.length)>0&&i("button",e({style:e(e({},a.button),{marginBottom:"10px"}),onClick:function(){return B((function(e){return!e}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:k?"View Less":"View More"}))]}))]}))};export{d as default};
1
+ import{__assign as e,__rest as t}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as n,jsx as i,Fragment as o}from"react/jsx-runtime";import{useState as r,useRef as l,useEffect as a}from"react";import{ReactMarkdown as d}from"../../../node_modules/react-markdown/lib/react-markdown.js";import c from"../../../node_modules/remark-breaks/lib/index.js";var u={card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",padding:"24px"},title:{fontSize:"16px",fontWeight:"bold",marginBottom:"24px"},grid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(110px, 1fr))",gap:"24px",marginBottom:"24px"},gridItem:{backgroundColor:"#F8FAFC",border:"1px solid #DFE5EC",borderRadius:"8px",padding:"12px 8px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"12px"},gridItemHeight:{height:"50px"},label:{fontSize:"14px",fontWeight:400,color:"#64748B",margin:0},value:{fontWeight:"bold",fontSize:"14px",color:"#434C55",margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"120px"},section:{marginBottom:"12px",padding:"8px 12px",borderRadius:"8px",border:"1px solid #DEE4EB"},sectionLabel:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"8px",whiteSpace:"pre-line"},summaryText:{marginTop:"0px"},sectionText:{fontSize:"16px",fontWeight:400,lineHeight:"1.625",color:"#64748B",marginBottom:"8px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none"},lineClamp:{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"},container:{fontFamily:"Inter, sans-serif",color:"#434C54",marginBottom:"8px"},partContainer:{marginBottom:"8px"},partTitle:{fontSize:"16px",fontWeight:"600",marginBottom:"10px"},chapterList:{listStyle:"none",paddingLeft:"20px",margin:0},chapterItem:{marginBottom:"6px"},chapterLink:{textDecoration:"none",color:"#63748A",fontSize:"16px",lineHeight:"1.5"},chapterLinkHover:{textDecoration:"underline"},singleChapter:{marginBottom:"4px",fontSize:"16px"},chapterNumber:{color:"#63748A"}},s=function(s){var p,m,h,g,x,f,v=s.data,y=r(!1),b=y[0],C=y[1],T=r(!1),k=T[0],B=T[1],S=r(!1),L=S[0],D=S[1],I=r(!1),w=I[0],O=I[1],M=l(null),F=(null==v?void 0:v.tableOfContent)&&v.tableOfContent.every((function(e){return!e.title||""===e.title.trim()}));return a((function(){var e,t;if(M.current){var n=(null===(e=M.current)||void 0===e?void 0:e.scrollHeight)>(null===(t=M.current)||void 0===t?void 0:t.clientHeight);O(n)}}),[null==v?void 0:v.bookDescription]),n("div",e({style:u.card},{children:[n("div",e({style:u.grid},{children:[n("div",e({style:u.gridItem},{children:[i("p",e({style:u.label},{children:"Book Title"})),i("p",e({style:u.value,title:null==v?void 0:v.title},{children:null!==(p=null==v?void 0:v.title)&&void 0!==p?p:"NA"}))]})),n("div",e({style:u.gridItem},{children:[i("p",e({style:u.label},{children:"Book Author"})),i("p",e({style:u.value,title:null==v?void 0:v.author},{children:null!==(m=null==v?void 0:v.author)&&void 0!==m?m:"NA"}))]})),n("div",e({style:u.gridItem},{children:[i("p",e({style:u.label},{children:"Total Sections"})),i("p",e({style:u.value},{children:null!==(h=null==v?void 0:v.totalSectionCount)&&void 0!==h?h:"NA"}))]})),n("div",e({style:u.gridItem},{children:[i("p",e({style:u.label},{children:"Total Pages"})),i("p",e({style:u.value},{children:null!==(g=null==v?void 0:v.totalPages)&&void 0!==g?g:"NA"}))]})),n("div",e({style:u.gridItem},{children:[i("p",e({style:u.label},{children:"Reading Time"})),i("p",e({style:u.value},{children:null!==(x=null==v?void 0:v.readingTime)&&void 0!==x?x:"NA"}))]}))]})),(null==v?void 0:v.bookDescription)&&(null==v?void 0:v.bookDescription.length)>0&&n("div",e({style:u.section},{children:[i("p",e({style:u.sectionLabel},{children:"Book Description"})),i("div",e({ref:M,style:e(e(e({},u.sectionText),u.summaryText),k?{}:u.lineClamp)},{children:i("div",{dangerouslySetInnerHTML:{__html:null==v?void 0:v.bookDescription}})})),w&&i("button",e({style:e(e({},u.button),{marginBottom:"10px"}),onClick:function(){return B((function(e){return!e}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:k?"View Less":"View More"}))]})),n("div",e({style:u.section},{children:[i("p",e({style:u.sectionLabel},{children:"AI Generated Summary"})),i("p",e({style:e(e({},u.sectionText),b?{}:u.lineClamp)},{children:i(d,e({remarkPlugins:[c],components:{p:function(n){n.node;var o=t(n,["node"]);return i("p",e({style:{marginTop:"0"}},o))}}},{children:null==v?void 0:v.summary}))})),(null==v?void 0:v.summary)&&(null==v?void 0:v.summary.length)>0&&i("button",e({style:e(e({},u.button),{marginBottom:"10px"}),onClick:function(){return C((function(e){return!e}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:b?"View Less":"View More"}))]})),n("div",e({style:e(e({},u.section),{marginTop:"10px"})},{children:[i("p",e({style:e(e({},u.sectionLabel),{marginBottom:"18px"})},{children:"Table Of Content"})),i("div",e({style:e(e({},u.container),L?{}:u.lineClamp)},{children:(null==v?void 0:v.tableOfContent)&&!F?null===(f=null==v?void 0:v.tableOfContent)||void 0===f?void 0:f.map((function(t,r){return i("div",e({style:u.partContainer},{children:t.children?n(o,{children:[i("p",{style:u.partTitle,dangerouslySetInnerHTML:{__html:t.title}}),i("ul",e({style:u.chapterList},{children:t.children.map((function(t,n){return i("li",e({style:u.chapterItem},{children:i("span",{style:u.chapterLink,dangerouslySetInnerHTML:{__html:t.title}})}),n)}))}))]}):i("div",e({style:u.singleChapter},{children:i("span",{style:u.chapterLink,dangerouslySetInnerHTML:{__html:t.title}})}))}),r)})):i("p",e({style:{fontStyle:"italic",fontSize:"16px",color:"#6B7280",margin:"8px 0"}},{children:"Table of Contents not found for this book."}))})),(null==v?void 0:v.tableOfContent)&&!F&&(null==v?void 0:v.tableOfContent.length)>0&&i("button",e({style:e(e({},u.button),{marginBottom:"10px"}),onClick:function(){return D((function(e){return!e}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:L?"View Less":"View More"}))]}))]}))};export{s as default};
2
2
  //# sourceMappingURL=BookOverviewCard.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as i,useEffect as n}from"react";import r from"../../../_virtual/Close.js";import l from"../../../_virtual/ArrowBack.js";import a from"../../BookCitation/BookCitation.js";import{comingSoonStyles as c,defaultIcon as d}from"../Bookemon.js";import s from"../../../node_modules/@material-ui/core/esm/Switch/Switch.js";import u from"../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js";var g=function(g){var h=g.bookOverView,p=g.bookCoverImage,m=g.onClose,f=g.customStyle,v=g.quotesToHighLightData,y=g.updateQuotesToHighLight,x=g.citationLoad,b=g.clickableElementCategory,C=void 0===b?"":b,k=g.comingSoonData,w=g.isNonHighlightedBlur,B=i(!1),S=B[0],j=B[1],I=i(!0),T=I[0],L=I[1],F=!!v.textToHighLight&&!!v.content,H={header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},headerLeft:{display:"flex",alignItems:"center",gap:"8px"},closeButton:{padding:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"},flexCenter:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},coverContainer:{width:"100%",maxWidth:"300px",borderRadius:"12px",padding:"4px",background:"linear-gradient(135deg, #34D399, #3B82F6, #10B981)",position:"relative",overflow:"hidden",boxShadow:"0 10px 25px rgba(0,0,0,0.3)",marginBottom:"24px"},bookCoverStyle:{width:"100%",height:"auto",objectFit:"contain",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},loadingStyle:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},rightPanel:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},clickableElementCategory:{fontSize:"20px",fontWeight:600},previewWrapper:{flex:1,width:"80%",margin:"0 auto",display:"flex",flexDirection:"column",overflow:"hidden",justifyContent:"center",alignItems:"center"},coverImagePreview:{display:"flex",justifyContent:"center",alignItems:"center",aspectRatio:"7 / 10",background:"",padding:0},toggleBlurContainer:{display:"flex",alignItems:"center",gap:"20px"}};return n((function(){L(!0),console.log(x,"citationLoad")}),[x]),t("div",e({style:e(e({},H.rightPanel),(null==f?void 0:f.rightPanel)||{})},{children:[t("div",e({style:H.header},{children:[t("div",e({style:H.headerLeft},{children:[F&&o("button",e({style:H.closeButton,onClick:function(){return y("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(l,{})})),o("h2",e({style:H.clickableElementCategory},{children:C}))]})),t("div",e({style:H.toggleBlurContainer},{children:[F&&t("div",e({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[o(s,{checked:T,onChange:function(e){L(e.target.checked),console.log(e.target.checked,"event.target.checked")},color:"primary",size:"small"}),t("span",e({style:{fontSize:"0.75rem",display:"flex",alignItems:"center",gap:"4px"}},{children:["Blur",o(u,e({title:"Blur Text is enabled by default. Non-highlighted parts of the text will appear blurred to help you focus on the highlighted content. You can turn this off if you want to see all text clearly."},{children:o("span",e({style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#485468",color:"#fff",fontSize:"10px",fontWeight:"bold",cursor:"pointer",lineHeight:"14px",userSelect:"none"}},{children:"i"}))}))]}))]})),o("button",e({style:H.closeButton,onClick:function(){m(),y("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(r,{})}))]}))]})),o("div",e({style:e(e({},H.previewWrapper),null==f?void 0:f.previewWrapper)},{children:F?o(a,{citationNumber:1,defaultState:!0,partialMatch:!0,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==v?void 0:v.content],textToHighlight:[null==v?void 0:v.textToHighLight],externalLinkComponent:"",bookCoverImage:p,customStyle:null==f?void 0:f.citationCustomStyle,isNonHighlightedBlur:w,toggleBlur:T}):x?t("div",e({style:H.loadingStyle},{children:[o("div",e({style:c.iconWrapper},{children:(null==k?void 0:k.icon)||d})),t("p",e({style:c.text},{children:["fetching ",C.toLowerCase(),"...."]}))]})):o("div",e({style:H.flexCenter},{children:o("div",e({style:e(e({},H.coverContainer),S||!p?e(e({},H.coverImagePreview),null==f?void 0:f.coverImagePreview):{})},{children:p&&!S?o("img",{onError:function(){return j(!0)},style:H.bookCoverStyle,src:p,alt:"Book Cover Image"}):o("div",e({className:"book-cover-placeholder"},{children:t("div",e({className:"book-cover-inner"},{children:[o("div",e({className:"book-title"},{children:(null==h?void 0:h.title)||"Unknown Title"})),o("div",e({className:"book-author"},{children:(null==h?void 0:h.author)||"Unknown Author"}))]}))}))}))}))}))]}))};export{g as default};
1
+ import{__assign as e}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as i,useEffect as n}from"react";import r from"../../../_virtual/Close.js";import l from"../../../_virtual/ArrowBack.js";import a from"../../BookCitation/BookCitation.js";import{comingSoonStyles as d,defaultIcon as c}from"../Bookemon.js";import s from"../../../node_modules/@material-ui/core/esm/Switch/Switch.js";import p from"../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js";var u=function(u){var g=u.bookOverView,h=u.bookCoverImage,f=u.onClose,m=u.customStyle,x=u.quotesToHighLightData,y=u.updateQuotesToHighLight,v=u.citationLoad,b=u.clickableElementCategory,k=void 0===b?"":b,C=u.comingSoonData,w=u.isNonHighlightedBlur,S=i(!1),B=S[0],I=S[1],T=i(!0),j=T[0],W=T[1],L=!!x.textToHighLight&&!!x.content,P={header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},headerLeft:{display:"flex",alignItems:"center",gap:"8px"},closeButton:{padding:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"},flexCenter:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},coverContainer:{width:"100%",maxWidth:"300px",borderRadius:"12px",padding:"4px",background:"linear-gradient(135deg, #34D399, #3B82F6, #10B981)",position:"relative",overflow:"hidden",boxShadow:"0 10px 25px rgba(0,0,0,0.3)",marginBottom:"24px"},bookCoverStyle:{width:"100%",height:"auto",objectFit:"contain",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},loadingStyle:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},rightPanel:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},clickableElementCategory:{fontSize:"20px",fontWeight:600},previewWrapper:{flex:1,width:"80%",margin:"0 auto",display:"flex",flexDirection:"column",overflow:"hidden",justifyContent:"center",alignItems:"center"},coverImagePreview:{display:"flex",justifyContent:"center",alignItems:"center",aspectRatio:"7 / 10",background:"",padding:0},toggleBlurContainer:{display:"flex",alignItems:"center",gap:"20px"},bookCoverPlaceholder:{width:"100%",height:"calc(100% - 8px)",background:"linear-gradient(to bottom, #22c55e, #14532d)",borderRadius:"4px",padding:"4px",color:"white",fontSize:"10px",display:"flex",justifyContent:"center",alignItems:"center"},bookCoverInner:{border:"1px solid white",padding:"4px",width:"calc(100% - 26px)",height:"calc(100% - 26px)",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",justifyContent:"space-around"},bookTitle:{fontWeight:800,fontSize:"1.5rem",textTransform:"uppercase",letterSpacing:"0.5px",lineHeight:1.2,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",padding:"0 8px"},bookAuthor:{fontSize:"1rem",fontWeight:500,opacity:.9,marginTop:"8px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"}};return n((function(){W(!0),console.log(v,"citationLoad")}),[v]),t("div",e({style:e(e({},P.rightPanel),(null==m?void 0:m.rightPanel)||{})},{children:[t("div",e({style:P.header},{children:[t("div",e({style:P.headerLeft},{children:[L&&o("button",e({style:P.closeButton,onClick:function(){return y("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(l,{})})),o("h2",e({style:P.clickableElementCategory},{children:k}))]})),t("div",e({style:P.toggleBlurContainer},{children:[L&&t("div",e({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[o(s,{checked:j,onChange:function(e){W(e.target.checked),console.log(e.target.checked,"event.target.checked")},color:"primary",size:"small"}),t("span",e({style:{fontSize:"0.75rem",display:"flex",alignItems:"center",gap:"4px"}},{children:["Blur",o(p,e({title:"Blur Text is enabled by default. Non-highlighted parts of the text will appear blurred to help you focus on the highlighted content. You can turn this off if you want to see all text clearly."},{children:o("span",e({style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#485468",color:"#fff",fontSize:"10px",fontWeight:"bold",cursor:"pointer",lineHeight:"14px",userSelect:"none"}},{children:"i"}))}))]}))]})),o("button",e({style:P.closeButton,onClick:function(){f(),y("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(r,{})}))]}))]})),o("div",e({style:e(e({},P.previewWrapper),null==m?void 0:m.previewWrapper)},{children:L?o(a,{citationNumber:1,defaultState:!0,partialMatch:!0,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==x?void 0:x.content],textToHighlight:[null==x?void 0:x.textToHighLight],externalLinkComponent:"",bookCoverImage:h,customStyle:null==m?void 0:m.citationCustomStyle,isNonHighlightedBlur:w,toggleBlur:j}):v?t("div",e({style:P.loadingStyle},{children:[o("div",e({style:d.iconWrapper},{children:(null==C?void 0:C.icon)||c})),t("p",e({style:d.text},{children:["fetching ",k.toLowerCase(),"...."]}))]})):o("div",e({style:P.flexCenter},{children:o("div",e({style:e(e({},P.coverContainer),B||!h?e(e({},P.coverImagePreview),null==m?void 0:m.coverImagePreview):{})},{children:h&&!B?o("img",{onError:function(){return I(!0)},style:P.bookCoverStyle,src:h,alt:"Book Cover Image"}):o("div",e({style:P.bookCoverPlaceholder},{children:t("div",e({style:P.bookCoverInner},{children:[o("div",e({style:P.bookTitle},{children:(null==g?void 0:g.title)||"Unknown Title"})),o("div",e({style:P.bookAuthor},{children:(null==g?void 0:g.author)||"Unknown Author"}))]}))}))}))}))}))]}))};export{u as default};
2
2
  //# sourceMappingURL=BookPreview.js.map
@@ -0,0 +1,2 @@
1
+ import{__require as r}from"./parallel.js";import{__require as e}from"./serial.js";import{__require as a}from"./serialOrdered.js";var i,s;function l(){return s?i:(s=1,i={parallel:r(),serial:e(),serialOrdered:a()})}export{l as __require};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../node_modules/asynckit/index.js"],"sourcesContent":["module.exports =\n{\n parallel : require('./parallel.js'),\n serial : require('./serial.js'),\n serialOrdered : require('./serialOrdered.js')\n};\n"],"names":["asynckit","parallel","require$$0","serial","require$$1","serialOrdered","require$$2"],"mappings":"sKAAcA,EACd,CACEC,SAAgBC,IAChBC,OAAgBC,IAChBC,cAAgBC"}
@@ -0,0 +1,2 @@
1
+ var n,o;function t(){if(o)return n;function t(n){"function"==typeof this.jobs[n]&&this.jobs[n]()}return o=1,n=function(n){Object.keys(n.jobs).forEach(t.bind(n)),n.jobs={}}}export{t as __require};
2
+ //# sourceMappingURL=abort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abort.js","sources":["../../../../node_modules/asynckit/lib/abort.js"],"sourcesContent":["// API\nmodule.exports = abort;\n\n/**\n * Aborts leftover active jobs\n *\n * @param {object} state - current state object\n */\nfunction abort(state)\n{\n Object.keys(state.jobs).forEach(clean.bind(state));\n\n // reset leftover jobs\n state.jobs = {};\n}\n\n/**\n * Cleans up leftover job by invoking abort function for the provided job id\n *\n * @this state\n * @param {string|number} key - job id to abort\n */\nfunction clean(key)\n{\n if (typeof this.jobs[key] == 'function')\n {\n this.jobs[key]();\n }\n}\n"],"names":["clean","key","this","jobs","abort_1","state","Object","keys","forEach","bind"],"mappings":"mCAsBA,SAASA,EAAMC,GAEgB,mBAAlBC,KAAKC,KAAKF,IAEnBC,KAAKC,KAAKF,IAEd,YA3BAG,EAOA,SAAeC,GAEbC,OAAOC,KAAKF,EAAMF,MAAMK,QAAQR,EAAMS,KAAKJ,IAG3CA,EAAMF,KAAO,EACf"}
@@ -0,0 +1,2 @@
1
+ import{__require as r}from"./defer.js";var n,e;function t(){if(e)return n;e=1;var t=r();return n=function(r){var n=!1;return t((function(){n=!0})),function(e,u){n?r(e,u):t((function(){r(e,u)}))}}}export{t as __require};
2
+ //# sourceMappingURL=async.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"async.js","sources":["../../../../node_modules/asynckit/lib/async.js"],"sourcesContent":["var defer = require('./defer.js');\n\n// API\nmodule.exports = async;\n\n/**\n * Runs provided callback asynchronously\n * even if callback itself is not\n *\n * @param {function} callback - callback to invoke\n * @returns {function} - augmented callback\n */\nfunction async(callback)\n{\n var isAsync = false;\n\n // check if async happened\n defer(function() { isAsync = true; });\n\n return function async_callback(err, result)\n {\n if (isAsync)\n {\n callback(err, result);\n }\n else\n {\n defer(function nextTick_callback()\n {\n callback(err, result);\n });\n }\n };\n}\n"],"names":["defer","require$$0","async_1","callback","isAsync","err","result"],"mappings":"8EAAA,IAAIA,EAAQC,WAGZC,EASA,SAAeC,GAEb,IAAIC,GAAU,EAKd,OAFAJ,GAAM,WAAaI,GAAU,CAAO,IAE7B,SAAwBC,EAAKC,GAE9BF,EAEFD,EAASE,EAAKC,GAIdN,GAAM,WAEJG,EAASE,EAAKC,EACtB,IAGA"}
@@ -0,0 +1,2 @@
1
+ var e,t;function n(){if(t)return e;return t=1,e=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)}}export{n as __require};
2
+ //# sourceMappingURL=defer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defer.js","sources":["../../../../node_modules/asynckit/lib/defer.js"],"sourcesContent":["module.exports = defer;\n\n/**\n * Runs provided function on next iteration of the event loop\n *\n * @param {function} fn - function to run\n */\nfunction defer(fn)\n{\n var nextTick = typeof setImmediate == 'function'\n ? setImmediate\n : (\n typeof process == 'object' && typeof process.nextTick == 'function'\n ? process.nextTick\n : null\n );\n\n if (nextTick)\n {\n nextTick(fn);\n }\n else\n {\n setTimeout(fn, 0);\n }\n}\n"],"names":["defer_1","fn","nextTick","setImmediate","process","setTimeout"],"mappings":"8CAAAA,EAOA,SAAeC,GAEb,IAAIC,EAAkC,mBAAhBC,aAClBA,aAEkB,iBAAXC,SAAkD,mBAApBA,QAAQF,SAC3CE,QAAQF,SACR,KAGFA,EAEFA,EAASD,GAITI,WAAWJ,EAAI,EAEnB"}