@limrun/playwright-core 1.56.1-lim.1 → 1.61.0-lim.1

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 (378) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +5 -0
  3. package/ThirdPartyNotices.txt +7 -1496
  4. package/bin/install_webkit_wsl.ps1 +1 -3
  5. package/bin/reinstall_chrome_beta_linux.sh +1 -1
  6. package/bin/reinstall_chrome_beta_mac.sh +1 -1
  7. package/bin/reinstall_chrome_stable_linux.sh +1 -1
  8. package/bin/reinstall_chrome_stable_mac.sh +1 -1
  9. package/bin/reinstall_msedge_beta_linux.sh +1 -1
  10. package/bin/reinstall_msedge_beta_mac.sh +1 -1
  11. package/bin/reinstall_msedge_dev_linux.sh +1 -1
  12. package/bin/reinstall_msedge_dev_mac.sh +1 -1
  13. package/bin/reinstall_msedge_stable_linux.sh +1 -1
  14. package/bin/reinstall_msedge_stable_mac.sh +1 -1
  15. package/browsers.json +23 -22
  16. package/cli.js +4 -1
  17. package/index.js +2 -17
  18. package/lib/bootstrap.js +88 -0
  19. package/lib/coreBundle.js +73385 -0
  20. package/lib/entry/cliDaemon.js +5 -0
  21. package/lib/entry/dashboardApp.js +3 -0
  22. package/lib/entry/mcp.js +10 -0
  23. package/lib/entry/oopBrowserDownload.js +3 -0
  24. package/lib/{server/deviceDescriptors.js → package.js} +18 -7
  25. package/lib/server/deviceDescriptorsSource.json +1142 -182
  26. package/lib/server/electron/loader.js +99 -13
  27. package/lib/serverRegistry.js +7343 -0
  28. package/lib/serverRegistry.js.LICENSE +354 -0
  29. package/lib/tools/cli-client/channelSessions.js +141 -0
  30. package/lib/tools/cli-client/cli.js +6 -0
  31. package/lib/tools/cli-client/help.json +693 -0
  32. package/lib/tools/cli-client/minimist.js +128 -0
  33. package/lib/tools/cli-client/output.js +343 -0
  34. package/lib/tools/cli-client/program.js +404 -0
  35. package/lib/tools/cli-client/registry.js +176 -0
  36. package/lib/tools/cli-client/session.js +254 -0
  37. package/lib/tools/cli-client/skill/SKILL.md +404 -0
  38. package/lib/tools/cli-client/skill/references/element-attributes.md +23 -0
  39. package/lib/tools/cli-client/skill/references/playwright-tests.md +39 -0
  40. package/lib/tools/cli-client/skill/references/request-mocking.md +87 -0
  41. package/lib/tools/cli-client/skill/references/running-code.md +241 -0
  42. package/lib/tools/cli-client/skill/references/session-management.md +225 -0
  43. package/lib/tools/cli-client/skill/references/spec-driven-testing.md +305 -0
  44. package/lib/tools/cli-client/skill/references/storage-state.md +275 -0
  45. package/lib/tools/cli-client/skill/references/test-generation.md +134 -0
  46. package/lib/tools/cli-client/skill/references/tracing.md +139 -0
  47. package/lib/tools/cli-client/skill/references/video-recording.md +143 -0
  48. package/lib/tools/dashboard/appIcon.png +0 -0
  49. package/lib/tools/trace/SKILL.md +171 -0
  50. package/lib/{server/utils/profiler.js → tools/utils/extension.js} +42 -29
  51. package/lib/tools/utils/socketConnection.js +108 -0
  52. package/lib/utilsBundle.js +86695 -68
  53. package/lib/utilsBundle.js.LICENSE +2056 -0
  54. package/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  55. package/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  56. package/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  57. package/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  58. package/lib/vite/dashboard/assets/index-BY2S1tHT.css +1 -0
  59. package/lib/vite/dashboard/assets/index-C_5TMfeg.js +52 -0
  60. package/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  61. package/lib/vite/dashboard/index.html +29 -0
  62. package/lib/vite/dashboard/playwright-logo.svg +24 -0
  63. package/lib/vite/htmlReport/index.html +2 -70
  64. package/lib/vite/htmlReport/report.css +1 -0
  65. package/lib/vite/htmlReport/report.js +72 -0
  66. package/lib/vite/{traceViewer/codeMirrorModule.C3UTv-Ge.css → recorder/assets/codeMirrorModule-DYBRYzYX.css} +1 -1
  67. package/lib/vite/recorder/assets/codeMirrorModule-DeBYQozu.js +32 -0
  68. package/lib/vite/recorder/assets/index-4ZiSSCmn.css +1 -0
  69. package/lib/vite/recorder/assets/index-Bq-mQf8S.js +193 -0
  70. package/lib/vite/recorder/index.html +2 -2
  71. package/lib/vite/traceViewer/assets/codeMirrorModule-LEHpjmcn.js +32 -0
  72. package/lib/vite/traceViewer/assets/defaultSettingsView-BNmKHKpQ.js +264 -0
  73. package/lib/vite/traceViewer/assets/urlMatch-BYQrIQwR.js +1 -0
  74. package/lib/vite/{recorder/assets/codeMirrorModule-C3UTv-Ge.css → traceViewer/codeMirrorModule.DYBRYzYX.css} +1 -1
  75. package/lib/vite/traceViewer/defaultSettingsView.CjdS-WJx.css +1 -0
  76. package/lib/vite/traceViewer/index.CzXZzn5A.css +1 -0
  77. package/lib/vite/traceViewer/index.DEBl1tfz.js +2 -0
  78. package/lib/vite/traceViewer/index.html +7 -6
  79. package/lib/vite/traceViewer/manifest.webmanifest +16 -0
  80. package/lib/vite/traceViewer/snapshot.html +4 -15
  81. package/lib/vite/traceViewer/snapshot.v8KI4P3m.js +2 -0
  82. package/lib/vite/traceViewer/sw.bundle.js +5 -3
  83. package/lib/vite/traceViewer/uiMode.BZQ54Kgt.css +1 -0
  84. package/lib/vite/traceViewer/uiMode.Ut8wwJNp.js +6 -0
  85. package/lib/vite/traceViewer/uiMode.html +5 -4
  86. package/package.json +4 -12
  87. package/types/protocol.d.ts +2101 -602
  88. package/types/types.d.ts +6183 -4591
  89. package/lib/androidServerImpl.js +0 -65
  90. package/lib/browserServerImpl.js +0 -120
  91. package/lib/cli/driver.js +0 -97
  92. package/lib/cli/program.js +0 -633
  93. package/lib/cli/programWithTestStub.js +0 -74
  94. package/lib/client/accessibility.js +0 -49
  95. package/lib/client/android.js +0 -361
  96. package/lib/client/api.js +0 -137
  97. package/lib/client/artifact.js +0 -79
  98. package/lib/client/browser.js +0 -163
  99. package/lib/client/browserContext.js +0 -529
  100. package/lib/client/browserType.js +0 -184
  101. package/lib/client/cdpSession.js +0 -51
  102. package/lib/client/channelOwner.js +0 -194
  103. package/lib/client/clientHelper.js +0 -64
  104. package/lib/client/clientInstrumentation.js +0 -55
  105. package/lib/client/clientStackTrace.js +0 -69
  106. package/lib/client/clock.js +0 -68
  107. package/lib/client/connection.js +0 -314
  108. package/lib/client/consoleMessage.js +0 -54
  109. package/lib/client/coverage.js +0 -44
  110. package/lib/client/dialog.js +0 -56
  111. package/lib/client/download.js +0 -62
  112. package/lib/client/electron.js +0 -138
  113. package/lib/client/elementHandle.js +0 -281
  114. package/lib/client/errors.js +0 -77
  115. package/lib/client/eventEmitter.js +0 -314
  116. package/lib/client/events.js +0 -99
  117. package/lib/client/fetch.js +0 -369
  118. package/lib/client/fileChooser.js +0 -46
  119. package/lib/client/fileUtils.js +0 -34
  120. package/lib/client/frame.js +0 -408
  121. package/lib/client/harRouter.js +0 -87
  122. package/lib/client/input.js +0 -84
  123. package/lib/client/jsHandle.js +0 -109
  124. package/lib/client/jsonPipe.js +0 -39
  125. package/lib/client/localUtils.js +0 -60
  126. package/lib/client/locator.js +0 -366
  127. package/lib/client/network.js +0 -747
  128. package/lib/client/page.js +0 -721
  129. package/lib/client/platform.js +0 -74
  130. package/lib/client/playwright.js +0 -75
  131. package/lib/client/selectors.js +0 -55
  132. package/lib/client/stream.js +0 -39
  133. package/lib/client/timeoutSettings.js +0 -79
  134. package/lib/client/tracing.js +0 -117
  135. package/lib/client/types.js +0 -28
  136. package/lib/client/video.js +0 -59
  137. package/lib/client/waiter.js +0 -142
  138. package/lib/client/webError.js +0 -39
  139. package/lib/client/webSocket.js +0 -93
  140. package/lib/client/worker.js +0 -63
  141. package/lib/client/writableStream.js +0 -39
  142. package/lib/generated/bindingsControllerSource.js +0 -28
  143. package/lib/generated/clockSource.js +0 -28
  144. package/lib/generated/injectedScriptSource.js +0 -28
  145. package/lib/generated/pollingRecorderSource.js +0 -28
  146. package/lib/generated/storageScriptSource.js +0 -28
  147. package/lib/generated/utilityScriptSource.js +0 -28
  148. package/lib/generated/webSocketMockSource.js +0 -336
  149. package/lib/inProcessFactory.js +0 -62
  150. package/lib/inprocess.js +0 -3
  151. package/lib/outofprocess.js +0 -76
  152. package/lib/protocol/serializers.js +0 -192
  153. package/lib/protocol/validator.js +0 -2912
  154. package/lib/protocol/validatorPrimitives.js +0 -193
  155. package/lib/remote/playwrightConnection.js +0 -129
  156. package/lib/remote/playwrightServer.js +0 -335
  157. package/lib/server/accessibility.js +0 -69
  158. package/lib/server/android/android.js +0 -465
  159. package/lib/server/android/backendAdb.js +0 -177
  160. package/lib/server/artifact.js +0 -127
  161. package/lib/server/bidi/bidiBrowser.js +0 -490
  162. package/lib/server/bidi/bidiChromium.js +0 -153
  163. package/lib/server/bidi/bidiConnection.js +0 -212
  164. package/lib/server/bidi/bidiExecutionContext.js +0 -221
  165. package/lib/server/bidi/bidiFirefox.js +0 -130
  166. package/lib/server/bidi/bidiInput.js +0 -146
  167. package/lib/server/bidi/bidiNetworkManager.js +0 -383
  168. package/lib/server/bidi/bidiOverCdp.js +0 -102
  169. package/lib/server/bidi/bidiPage.js +0 -552
  170. package/lib/server/bidi/bidiPdf.js +0 -106
  171. package/lib/server/bidi/third_party/bidiCommands.d.js +0 -22
  172. package/lib/server/bidi/third_party/bidiDeserializer.js +0 -98
  173. package/lib/server/bidi/third_party/bidiKeyboard.js +0 -256
  174. package/lib/server/bidi/third_party/bidiProtocol.js +0 -24
  175. package/lib/server/bidi/third_party/bidiProtocolCore.js +0 -179
  176. package/lib/server/bidi/third_party/bidiProtocolPermissions.js +0 -42
  177. package/lib/server/bidi/third_party/bidiSerializer.js +0 -148
  178. package/lib/server/bidi/third_party/firefoxPrefs.js +0 -259
  179. package/lib/server/browser.js +0 -149
  180. package/lib/server/browserContext.js +0 -696
  181. package/lib/server/browserType.js +0 -328
  182. package/lib/server/callLog.js +0 -82
  183. package/lib/server/chromium/chromium.js +0 -391
  184. package/lib/server/chromium/chromiumSwitches.js +0 -95
  185. package/lib/server/chromium/crAccessibility.js +0 -263
  186. package/lib/server/chromium/crBrowser.js +0 -502
  187. package/lib/server/chromium/crConnection.js +0 -202
  188. package/lib/server/chromium/crCoverage.js +0 -235
  189. package/lib/server/chromium/crDevTools.js +0 -113
  190. package/lib/server/chromium/crDragDrop.js +0 -131
  191. package/lib/server/chromium/crExecutionContext.js +0 -146
  192. package/lib/server/chromium/crInput.js +0 -187
  193. package/lib/server/chromium/crNetworkManager.js +0 -666
  194. package/lib/server/chromium/crPage.js +0 -1069
  195. package/lib/server/chromium/crPdf.js +0 -121
  196. package/lib/server/chromium/crProtocolHelper.js +0 -145
  197. package/lib/server/chromium/crServiceWorker.js +0 -123
  198. package/lib/server/chromium/defaultFontFamilies.js +0 -162
  199. package/lib/server/chromium/protocol.d.js +0 -16
  200. package/lib/server/chromium/videoRecorder.js +0 -113
  201. package/lib/server/clock.js +0 -149
  202. package/lib/server/codegen/csharp.js +0 -327
  203. package/lib/server/codegen/java.js +0 -274
  204. package/lib/server/codegen/javascript.js +0 -270
  205. package/lib/server/codegen/jsonl.js +0 -52
  206. package/lib/server/codegen/language.js +0 -132
  207. package/lib/server/codegen/languages.js +0 -68
  208. package/lib/server/codegen/python.js +0 -279
  209. package/lib/server/codegen/types.js +0 -16
  210. package/lib/server/console.js +0 -53
  211. package/lib/server/cookieStore.js +0 -206
  212. package/lib/server/debugController.js +0 -191
  213. package/lib/server/debugger.js +0 -119
  214. package/lib/server/dialog.js +0 -116
  215. package/lib/server/dispatchers/androidDispatcher.js +0 -325
  216. package/lib/server/dispatchers/artifactDispatcher.js +0 -118
  217. package/lib/server/dispatchers/browserContextDispatcher.js +0 -364
  218. package/lib/server/dispatchers/browserDispatcher.js +0 -118
  219. package/lib/server/dispatchers/browserTypeDispatcher.js +0 -64
  220. package/lib/server/dispatchers/cdpSessionDispatcher.js +0 -44
  221. package/lib/server/dispatchers/debugControllerDispatcher.js +0 -78
  222. package/lib/server/dispatchers/dialogDispatcher.js +0 -47
  223. package/lib/server/dispatchers/dispatcher.js +0 -371
  224. package/lib/server/dispatchers/electronDispatcher.js +0 -89
  225. package/lib/server/dispatchers/elementHandlerDispatcher.js +0 -181
  226. package/lib/server/dispatchers/frameDispatcher.js +0 -227
  227. package/lib/server/dispatchers/jsHandleDispatcher.js +0 -85
  228. package/lib/server/dispatchers/jsonPipeDispatcher.js +0 -58
  229. package/lib/server/dispatchers/localUtilsDispatcher.js +0 -149
  230. package/lib/server/dispatchers/networkDispatchers.js +0 -213
  231. package/lib/server/dispatchers/pageDispatcher.js +0 -401
  232. package/lib/server/dispatchers/playwrightDispatcher.js +0 -112
  233. package/lib/server/dispatchers/streamDispatcher.js +0 -67
  234. package/lib/server/dispatchers/tracingDispatcher.js +0 -68
  235. package/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -165
  236. package/lib/server/dispatchers/writableStreamDispatcher.js +0 -79
  237. package/lib/server/dom.js +0 -806
  238. package/lib/server/download.js +0 -70
  239. package/lib/server/electron/electron.js +0 -270
  240. package/lib/server/errors.js +0 -69
  241. package/lib/server/fetch.js +0 -621
  242. package/lib/server/fileChooser.js +0 -43
  243. package/lib/server/fileUploadUtils.js +0 -84
  244. package/lib/server/firefox/ffAccessibility.js +0 -238
  245. package/lib/server/firefox/ffBrowser.js +0 -428
  246. package/lib/server/firefox/ffConnection.js +0 -147
  247. package/lib/server/firefox/ffExecutionContext.js +0 -150
  248. package/lib/server/firefox/ffInput.js +0 -159
  249. package/lib/server/firefox/ffNetworkManager.js +0 -256
  250. package/lib/server/firefox/ffPage.js +0 -503
  251. package/lib/server/firefox/firefox.js +0 -105
  252. package/lib/server/firefox/protocol.d.js +0 -16
  253. package/lib/server/formData.js +0 -147
  254. package/lib/server/frameSelectors.js +0 -156
  255. package/lib/server/frames.js +0 -1448
  256. package/lib/server/har/harRecorder.js +0 -147
  257. package/lib/server/har/harTracer.js +0 -607
  258. package/lib/server/harBackend.js +0 -157
  259. package/lib/server/helper.js +0 -96
  260. package/lib/server/index.js +0 -58
  261. package/lib/server/input.js +0 -273
  262. package/lib/server/instrumentation.js +0 -69
  263. package/lib/server/javascript.js +0 -291
  264. package/lib/server/launchApp.js +0 -128
  265. package/lib/server/localUtils.js +0 -218
  266. package/lib/server/macEditingCommands.js +0 -143
  267. package/lib/server/network.js +0 -629
  268. package/lib/server/page.js +0 -870
  269. package/lib/server/pipeTransport.js +0 -89
  270. package/lib/server/playwright.js +0 -71
  271. package/lib/server/progress.js +0 -112
  272. package/lib/server/protocolError.js +0 -52
  273. package/lib/server/recorder/chat.js +0 -161
  274. package/lib/server/recorder/recorderApp.js +0 -387
  275. package/lib/server/recorder/recorderRunner.js +0 -138
  276. package/lib/server/recorder/recorderSignalProcessor.js +0 -83
  277. package/lib/server/recorder/recorderUtils.js +0 -157
  278. package/lib/server/recorder/throttledFile.js +0 -57
  279. package/lib/server/recorder.js +0 -498
  280. package/lib/server/registry/browserFetcher.js +0 -175
  281. package/lib/server/registry/dependencies.js +0 -371
  282. package/lib/server/registry/index.js +0 -1333
  283. package/lib/server/registry/nativeDeps.js +0 -1280
  284. package/lib/server/registry/oopDownloadBrowserMain.js +0 -120
  285. package/lib/server/screenshotter.js +0 -333
  286. package/lib/server/selectors.js +0 -112
  287. package/lib/server/socksClientCertificatesInterceptor.js +0 -383
  288. package/lib/server/socksInterceptor.js +0 -95
  289. package/lib/server/trace/recorder/snapshotter.js +0 -147
  290. package/lib/server/trace/recorder/snapshotterInjected.js +0 -541
  291. package/lib/server/trace/recorder/tracing.js +0 -602
  292. package/lib/server/trace/test/inMemorySnapshotter.js +0 -87
  293. package/lib/server/trace/viewer/traceViewer.js +0 -240
  294. package/lib/server/transport.js +0 -181
  295. package/lib/server/types.js +0 -28
  296. package/lib/server/usKeyboardLayout.js +0 -145
  297. package/lib/server/utils/ascii.js +0 -44
  298. package/lib/server/utils/comparators.js +0 -161
  299. package/lib/server/utils/crypto.js +0 -216
  300. package/lib/server/utils/debug.js +0 -42
  301. package/lib/server/utils/debugLogger.js +0 -122
  302. package/lib/server/utils/env.js +0 -73
  303. package/lib/server/utils/eventsHelper.js +0 -39
  304. package/lib/server/utils/expectUtils.js +0 -38
  305. package/lib/server/utils/fileUtils.js +0 -191
  306. package/lib/server/utils/happyEyeballs.js +0 -207
  307. package/lib/server/utils/hostPlatform.js +0 -111
  308. package/lib/server/utils/httpServer.js +0 -218
  309. package/lib/server/utils/image_tools/colorUtils.js +0 -89
  310. package/lib/server/utils/image_tools/compare.js +0 -109
  311. package/lib/server/utils/image_tools/imageChannel.js +0 -78
  312. package/lib/server/utils/image_tools/stats.js +0 -102
  313. package/lib/server/utils/linuxUtils.js +0 -71
  314. package/lib/server/utils/network.js +0 -227
  315. package/lib/server/utils/nodePlatform.js +0 -148
  316. package/lib/server/utils/pipeTransport.js +0 -84
  317. package/lib/server/utils/processLauncher.js +0 -241
  318. package/lib/server/utils/socksProxy.js +0 -511
  319. package/lib/server/utils/spawnAsync.js +0 -41
  320. package/lib/server/utils/task.js +0 -51
  321. package/lib/server/utils/userAgent.js +0 -98
  322. package/lib/server/utils/wsServer.js +0 -121
  323. package/lib/server/utils/zipFile.js +0 -74
  324. package/lib/server/utils/zones.js +0 -57
  325. package/lib/server/webkit/protocol.d.js +0 -16
  326. package/lib/server/webkit/webkit.js +0 -119
  327. package/lib/server/webkit/wkAccessibility.js +0 -237
  328. package/lib/server/webkit/wkBrowser.js +0 -339
  329. package/lib/server/webkit/wkConnection.js +0 -149
  330. package/lib/server/webkit/wkExecutionContext.js +0 -154
  331. package/lib/server/webkit/wkInput.js +0 -181
  332. package/lib/server/webkit/wkInterceptableRequest.js +0 -169
  333. package/lib/server/webkit/wkPage.js +0 -1134
  334. package/lib/server/webkit/wkProvisionalPage.js +0 -83
  335. package/lib/server/webkit/wkWorkers.js +0 -104
  336. package/lib/server/webkit/wsl/webkit-wsl-transport-client.js +0 -74
  337. package/lib/server/webkit/wsl/webkit-wsl-transport-server.js +0 -113
  338. package/lib/third_party/pixelmatch.js +0 -255
  339. package/lib/utils/isomorphic/ariaSnapshot.js +0 -392
  340. package/lib/utils/isomorphic/assert.js +0 -31
  341. package/lib/utils/isomorphic/colors.js +0 -72
  342. package/lib/utils/isomorphic/cssParser.js +0 -245
  343. package/lib/utils/isomorphic/cssTokenizer.js +0 -1051
  344. package/lib/utils/isomorphic/headers.js +0 -53
  345. package/lib/utils/isomorphic/locatorGenerators.js +0 -673
  346. package/lib/utils/isomorphic/locatorParser.js +0 -176
  347. package/lib/utils/isomorphic/locatorUtils.js +0 -81
  348. package/lib/utils/isomorphic/manualPromise.js +0 -114
  349. package/lib/utils/isomorphic/mimeType.js +0 -459
  350. package/lib/utils/isomorphic/multimap.js +0 -80
  351. package/lib/utils/isomorphic/protocolFormatter.js +0 -78
  352. package/lib/utils/isomorphic/protocolMetainfo.js +0 -321
  353. package/lib/utils/isomorphic/rtti.js +0 -43
  354. package/lib/utils/isomorphic/selectorParser.js +0 -386
  355. package/lib/utils/isomorphic/semaphore.js +0 -54
  356. package/lib/utils/isomorphic/stackTrace.js +0 -158
  357. package/lib/utils/isomorphic/stringUtils.js +0 -155
  358. package/lib/utils/isomorphic/time.js +0 -49
  359. package/lib/utils/isomorphic/timeoutRunner.js +0 -66
  360. package/lib/utils/isomorphic/traceUtils.js +0 -58
  361. package/lib/utils/isomorphic/types.js +0 -16
  362. package/lib/utils/isomorphic/urlMatch.js +0 -176
  363. package/lib/utils/isomorphic/utilityScriptSerializers.js +0 -251
  364. package/lib/utils.js +0 -107
  365. package/lib/utilsBundleImpl/index.js +0 -218
  366. package/lib/vite/recorder/assets/codeMirrorModule-RJCXzfmE.js +0 -24
  367. package/lib/vite/recorder/assets/index-Ri0uHF7I.css +0 -1
  368. package/lib/vite/recorder/assets/index-Y-X2TGJv.js +0 -193
  369. package/lib/vite/traceViewer/assets/codeMirrorModule-eyVcHN77.js +0 -24
  370. package/lib/vite/traceViewer/assets/defaultSettingsView-w0zYjHsW.js +0 -265
  371. package/lib/vite/traceViewer/defaultSettingsView.TQ8_7ybu.css +0 -1
  372. package/lib/vite/traceViewer/index.Bx16ehp1.js +0 -2
  373. package/lib/vite/traceViewer/index.I8N9v4jT.css +0 -1
  374. package/lib/vite/traceViewer/uiMode.Btcz36p_.css +0 -1
  375. package/lib/vite/traceViewer/uiMode.DRQ310U5.js +0 -5
  376. package/lib/zipBundle.js +0 -34
  377. package/lib/zipBundleImpl.js +0 -5
  378. /package/lib/{utilsBundleImpl/xdg-open → xdg-open} +0 -0
@@ -1,1051 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var cssTokenizer_exports = {};
20
- __export(cssTokenizer_exports, {
21
- AtKeywordToken: () => AtKeywordToken,
22
- BadStringToken: () => BadStringToken,
23
- BadURLToken: () => BadURLToken,
24
- CDCToken: () => CDCToken,
25
- CDOToken: () => CDOToken,
26
- CSSParserToken: () => CSSParserToken,
27
- CloseCurlyToken: () => CloseCurlyToken,
28
- CloseParenToken: () => CloseParenToken,
29
- CloseSquareToken: () => CloseSquareToken,
30
- ColonToken: () => ColonToken,
31
- ColumnToken: () => ColumnToken,
32
- CommaToken: () => CommaToken,
33
- DashMatchToken: () => DashMatchToken,
34
- DelimToken: () => DelimToken,
35
- DimensionToken: () => DimensionToken,
36
- EOFToken: () => EOFToken,
37
- FunctionToken: () => FunctionToken,
38
- GroupingToken: () => GroupingToken,
39
- HashToken: () => HashToken,
40
- IdentToken: () => IdentToken,
41
- IncludeMatchToken: () => IncludeMatchToken,
42
- InvalidCharacterError: () => InvalidCharacterError,
43
- NumberToken: () => NumberToken,
44
- OpenCurlyToken: () => OpenCurlyToken,
45
- OpenParenToken: () => OpenParenToken,
46
- OpenSquareToken: () => OpenSquareToken,
47
- PercentageToken: () => PercentageToken,
48
- PrefixMatchToken: () => PrefixMatchToken,
49
- SemicolonToken: () => SemicolonToken,
50
- StringToken: () => StringToken,
51
- StringValuedToken: () => StringValuedToken,
52
- SubstringMatchToken: () => SubstringMatchToken,
53
- SuffixMatchToken: () => SuffixMatchToken,
54
- URLToken: () => URLToken,
55
- WhitespaceToken: () => WhitespaceToken,
56
- tokenize: () => tokenize
57
- });
58
- module.exports = __toCommonJS(cssTokenizer_exports);
59
- const between = function(num, first, last) {
60
- return num >= first && num <= last;
61
- };
62
- function digit(code) {
63
- return between(code, 48, 57);
64
- }
65
- function hexdigit(code) {
66
- return digit(code) || between(code, 65, 70) || between(code, 97, 102);
67
- }
68
- function uppercaseletter(code) {
69
- return between(code, 65, 90);
70
- }
71
- function lowercaseletter(code) {
72
- return between(code, 97, 122);
73
- }
74
- function letter(code) {
75
- return uppercaseletter(code) || lowercaseletter(code);
76
- }
77
- function nonascii(code) {
78
- return code >= 128;
79
- }
80
- function namestartchar(code) {
81
- return letter(code) || nonascii(code) || code === 95;
82
- }
83
- function namechar(code) {
84
- return namestartchar(code) || digit(code) || code === 45;
85
- }
86
- function nonprintable(code) {
87
- return between(code, 0, 8) || code === 11 || between(code, 14, 31) || code === 127;
88
- }
89
- function newline(code) {
90
- return code === 10;
91
- }
92
- function whitespace(code) {
93
- return newline(code) || code === 9 || code === 32;
94
- }
95
- const maximumallowedcodepoint = 1114111;
96
- class InvalidCharacterError extends Error {
97
- constructor(message) {
98
- super(message);
99
- this.name = "InvalidCharacterError";
100
- }
101
- }
102
- function preprocess(str) {
103
- const codepoints = [];
104
- for (let i = 0; i < str.length; i++) {
105
- let code = str.charCodeAt(i);
106
- if (code === 13 && str.charCodeAt(i + 1) === 10) {
107
- code = 10;
108
- i++;
109
- }
110
- if (code === 13 || code === 12)
111
- code = 10;
112
- if (code === 0)
113
- code = 65533;
114
- if (between(code, 55296, 56319) && between(str.charCodeAt(i + 1), 56320, 57343)) {
115
- const lead = code - 55296;
116
- const trail = str.charCodeAt(i + 1) - 56320;
117
- code = Math.pow(2, 16) + lead * Math.pow(2, 10) + trail;
118
- i++;
119
- }
120
- codepoints.push(code);
121
- }
122
- return codepoints;
123
- }
124
- function stringFromCode(code) {
125
- if (code <= 65535)
126
- return String.fromCharCode(code);
127
- code -= Math.pow(2, 16);
128
- const lead = Math.floor(code / Math.pow(2, 10)) + 55296;
129
- const trail = code % Math.pow(2, 10) + 56320;
130
- return String.fromCharCode(lead) + String.fromCharCode(trail);
131
- }
132
- function tokenize(str1) {
133
- const str = preprocess(str1);
134
- let i = -1;
135
- const tokens = [];
136
- let code;
137
- let line = 0;
138
- let column = 0;
139
- let lastLineLength = 0;
140
- const incrLineno = function() {
141
- line += 1;
142
- lastLineLength = column;
143
- column = 0;
144
- };
145
- const locStart = { line, column };
146
- const codepoint = function(i2) {
147
- if (i2 >= str.length)
148
- return -1;
149
- return str[i2];
150
- };
151
- const next = function(num) {
152
- if (num === void 0)
153
- num = 1;
154
- if (num > 3)
155
- throw "Spec Error: no more than three codepoints of lookahead.";
156
- return codepoint(i + num);
157
- };
158
- const consume = function(num) {
159
- if (num === void 0)
160
- num = 1;
161
- i += num;
162
- code = codepoint(i);
163
- if (newline(code))
164
- incrLineno();
165
- else
166
- column += num;
167
- return true;
168
- };
169
- const reconsume = function() {
170
- i -= 1;
171
- if (newline(code)) {
172
- line -= 1;
173
- column = lastLineLength;
174
- } else {
175
- column -= 1;
176
- }
177
- locStart.line = line;
178
- locStart.column = column;
179
- return true;
180
- };
181
- const eof = function(codepoint2) {
182
- if (codepoint2 === void 0)
183
- codepoint2 = code;
184
- return codepoint2 === -1;
185
- };
186
- const donothing = function() {
187
- };
188
- const parseerror = function() {
189
- };
190
- const consumeAToken = function() {
191
- consumeComments();
192
- consume();
193
- if (whitespace(code)) {
194
- while (whitespace(next()))
195
- consume();
196
- return new WhitespaceToken();
197
- } else if (code === 34) {
198
- return consumeAStringToken();
199
- } else if (code === 35) {
200
- if (namechar(next()) || areAValidEscape(next(1), next(2))) {
201
- const token = new HashToken("");
202
- if (wouldStartAnIdentifier(next(1), next(2), next(3)))
203
- token.type = "id";
204
- token.value = consumeAName();
205
- return token;
206
- } else {
207
- return new DelimToken(code);
208
- }
209
- } else if (code === 36) {
210
- if (next() === 61) {
211
- consume();
212
- return new SuffixMatchToken();
213
- } else {
214
- return new DelimToken(code);
215
- }
216
- } else if (code === 39) {
217
- return consumeAStringToken();
218
- } else if (code === 40) {
219
- return new OpenParenToken();
220
- } else if (code === 41) {
221
- return new CloseParenToken();
222
- } else if (code === 42) {
223
- if (next() === 61) {
224
- consume();
225
- return new SubstringMatchToken();
226
- } else {
227
- return new DelimToken(code);
228
- }
229
- } else if (code === 43) {
230
- if (startsWithANumber()) {
231
- reconsume();
232
- return consumeANumericToken();
233
- } else {
234
- return new DelimToken(code);
235
- }
236
- } else if (code === 44) {
237
- return new CommaToken();
238
- } else if (code === 45) {
239
- if (startsWithANumber()) {
240
- reconsume();
241
- return consumeANumericToken();
242
- } else if (next(1) === 45 && next(2) === 62) {
243
- consume(2);
244
- return new CDCToken();
245
- } else if (startsWithAnIdentifier()) {
246
- reconsume();
247
- return consumeAnIdentlikeToken();
248
- } else {
249
- return new DelimToken(code);
250
- }
251
- } else if (code === 46) {
252
- if (startsWithANumber()) {
253
- reconsume();
254
- return consumeANumericToken();
255
- } else {
256
- return new DelimToken(code);
257
- }
258
- } else if (code === 58) {
259
- return new ColonToken();
260
- } else if (code === 59) {
261
- return new SemicolonToken();
262
- } else if (code === 60) {
263
- if (next(1) === 33 && next(2) === 45 && next(3) === 45) {
264
- consume(3);
265
- return new CDOToken();
266
- } else {
267
- return new DelimToken(code);
268
- }
269
- } else if (code === 64) {
270
- if (wouldStartAnIdentifier(next(1), next(2), next(3)))
271
- return new AtKeywordToken(consumeAName());
272
- else
273
- return new DelimToken(code);
274
- } else if (code === 91) {
275
- return new OpenSquareToken();
276
- } else if (code === 92) {
277
- if (startsWithAValidEscape()) {
278
- reconsume();
279
- return consumeAnIdentlikeToken();
280
- } else {
281
- parseerror();
282
- return new DelimToken(code);
283
- }
284
- } else if (code === 93) {
285
- return new CloseSquareToken();
286
- } else if (code === 94) {
287
- if (next() === 61) {
288
- consume();
289
- return new PrefixMatchToken();
290
- } else {
291
- return new DelimToken(code);
292
- }
293
- } else if (code === 123) {
294
- return new OpenCurlyToken();
295
- } else if (code === 124) {
296
- if (next() === 61) {
297
- consume();
298
- return new DashMatchToken();
299
- } else if (next() === 124) {
300
- consume();
301
- return new ColumnToken();
302
- } else {
303
- return new DelimToken(code);
304
- }
305
- } else if (code === 125) {
306
- return new CloseCurlyToken();
307
- } else if (code === 126) {
308
- if (next() === 61) {
309
- consume();
310
- return new IncludeMatchToken();
311
- } else {
312
- return new DelimToken(code);
313
- }
314
- } else if (digit(code)) {
315
- reconsume();
316
- return consumeANumericToken();
317
- } else if (namestartchar(code)) {
318
- reconsume();
319
- return consumeAnIdentlikeToken();
320
- } else if (eof()) {
321
- return new EOFToken();
322
- } else {
323
- return new DelimToken(code);
324
- }
325
- };
326
- const consumeComments = function() {
327
- while (next(1) === 47 && next(2) === 42) {
328
- consume(2);
329
- while (true) {
330
- consume();
331
- if (code === 42 && next() === 47) {
332
- consume();
333
- break;
334
- } else if (eof()) {
335
- parseerror();
336
- return;
337
- }
338
- }
339
- }
340
- };
341
- const consumeANumericToken = function() {
342
- const num = consumeANumber();
343
- if (wouldStartAnIdentifier(next(1), next(2), next(3))) {
344
- const token = new DimensionToken();
345
- token.value = num.value;
346
- token.repr = num.repr;
347
- token.type = num.type;
348
- token.unit = consumeAName();
349
- return token;
350
- } else if (next() === 37) {
351
- consume();
352
- const token = new PercentageToken();
353
- token.value = num.value;
354
- token.repr = num.repr;
355
- return token;
356
- } else {
357
- const token = new NumberToken();
358
- token.value = num.value;
359
- token.repr = num.repr;
360
- token.type = num.type;
361
- return token;
362
- }
363
- };
364
- const consumeAnIdentlikeToken = function() {
365
- const str2 = consumeAName();
366
- if (str2.toLowerCase() === "url" && next() === 40) {
367
- consume();
368
- while (whitespace(next(1)) && whitespace(next(2)))
369
- consume();
370
- if (next() === 34 || next() === 39)
371
- return new FunctionToken(str2);
372
- else if (whitespace(next()) && (next(2) === 34 || next(2) === 39))
373
- return new FunctionToken(str2);
374
- else
375
- return consumeAURLToken();
376
- } else if (next() === 40) {
377
- consume();
378
- return new FunctionToken(str2);
379
- } else {
380
- return new IdentToken(str2);
381
- }
382
- };
383
- const consumeAStringToken = function(endingCodePoint) {
384
- if (endingCodePoint === void 0)
385
- endingCodePoint = code;
386
- let string = "";
387
- while (consume()) {
388
- if (code === endingCodePoint || eof()) {
389
- return new StringToken(string);
390
- } else if (newline(code)) {
391
- parseerror();
392
- reconsume();
393
- return new BadStringToken();
394
- } else if (code === 92) {
395
- if (eof(next()))
396
- donothing();
397
- else if (newline(next()))
398
- consume();
399
- else
400
- string += stringFromCode(consumeEscape());
401
- } else {
402
- string += stringFromCode(code);
403
- }
404
- }
405
- throw new Error("Internal error");
406
- };
407
- const consumeAURLToken = function() {
408
- const token = new URLToken("");
409
- while (whitespace(next()))
410
- consume();
411
- if (eof(next()))
412
- return token;
413
- while (consume()) {
414
- if (code === 41 || eof()) {
415
- return token;
416
- } else if (whitespace(code)) {
417
- while (whitespace(next()))
418
- consume();
419
- if (next() === 41 || eof(next())) {
420
- consume();
421
- return token;
422
- } else {
423
- consumeTheRemnantsOfABadURL();
424
- return new BadURLToken();
425
- }
426
- } else if (code === 34 || code === 39 || code === 40 || nonprintable(code)) {
427
- parseerror();
428
- consumeTheRemnantsOfABadURL();
429
- return new BadURLToken();
430
- } else if (code === 92) {
431
- if (startsWithAValidEscape()) {
432
- token.value += stringFromCode(consumeEscape());
433
- } else {
434
- parseerror();
435
- consumeTheRemnantsOfABadURL();
436
- return new BadURLToken();
437
- }
438
- } else {
439
- token.value += stringFromCode(code);
440
- }
441
- }
442
- throw new Error("Internal error");
443
- };
444
- const consumeEscape = function() {
445
- consume();
446
- if (hexdigit(code)) {
447
- const digits = [code];
448
- for (let total = 0; total < 5; total++) {
449
- if (hexdigit(next())) {
450
- consume();
451
- digits.push(code);
452
- } else {
453
- break;
454
- }
455
- }
456
- if (whitespace(next()))
457
- consume();
458
- let value = parseInt(digits.map(function(x) {
459
- return String.fromCharCode(x);
460
- }).join(""), 16);
461
- if (value > maximumallowedcodepoint)
462
- value = 65533;
463
- return value;
464
- } else if (eof()) {
465
- return 65533;
466
- } else {
467
- return code;
468
- }
469
- };
470
- const areAValidEscape = function(c1, c2) {
471
- if (c1 !== 92)
472
- return false;
473
- if (newline(c2))
474
- return false;
475
- return true;
476
- };
477
- const startsWithAValidEscape = function() {
478
- return areAValidEscape(code, next());
479
- };
480
- const wouldStartAnIdentifier = function(c1, c2, c3) {
481
- if (c1 === 45)
482
- return namestartchar(c2) || c2 === 45 || areAValidEscape(c2, c3);
483
- else if (namestartchar(c1))
484
- return true;
485
- else if (c1 === 92)
486
- return areAValidEscape(c1, c2);
487
- else
488
- return false;
489
- };
490
- const startsWithAnIdentifier = function() {
491
- return wouldStartAnIdentifier(code, next(1), next(2));
492
- };
493
- const wouldStartANumber = function(c1, c2, c3) {
494
- if (c1 === 43 || c1 === 45) {
495
- if (digit(c2))
496
- return true;
497
- if (c2 === 46 && digit(c3))
498
- return true;
499
- return false;
500
- } else if (c1 === 46) {
501
- if (digit(c2))
502
- return true;
503
- return false;
504
- } else if (digit(c1)) {
505
- return true;
506
- } else {
507
- return false;
508
- }
509
- };
510
- const startsWithANumber = function() {
511
- return wouldStartANumber(code, next(1), next(2));
512
- };
513
- const consumeAName = function() {
514
- let result = "";
515
- while (consume()) {
516
- if (namechar(code)) {
517
- result += stringFromCode(code);
518
- } else if (startsWithAValidEscape()) {
519
- result += stringFromCode(consumeEscape());
520
- } else {
521
- reconsume();
522
- return result;
523
- }
524
- }
525
- throw new Error("Internal parse error");
526
- };
527
- const consumeANumber = function() {
528
- let repr = "";
529
- let type = "integer";
530
- if (next() === 43 || next() === 45) {
531
- consume();
532
- repr += stringFromCode(code);
533
- }
534
- while (digit(next())) {
535
- consume();
536
- repr += stringFromCode(code);
537
- }
538
- if (next(1) === 46 && digit(next(2))) {
539
- consume();
540
- repr += stringFromCode(code);
541
- consume();
542
- repr += stringFromCode(code);
543
- type = "number";
544
- while (digit(next())) {
545
- consume();
546
- repr += stringFromCode(code);
547
- }
548
- }
549
- const c1 = next(1), c2 = next(2), c3 = next(3);
550
- if ((c1 === 69 || c1 === 101) && digit(c2)) {
551
- consume();
552
- repr += stringFromCode(code);
553
- consume();
554
- repr += stringFromCode(code);
555
- type = "number";
556
- while (digit(next())) {
557
- consume();
558
- repr += stringFromCode(code);
559
- }
560
- } else if ((c1 === 69 || c1 === 101) && (c2 === 43 || c2 === 45) && digit(c3)) {
561
- consume();
562
- repr += stringFromCode(code);
563
- consume();
564
- repr += stringFromCode(code);
565
- consume();
566
- repr += stringFromCode(code);
567
- type = "number";
568
- while (digit(next())) {
569
- consume();
570
- repr += stringFromCode(code);
571
- }
572
- }
573
- const value = convertAStringToANumber(repr);
574
- return { type, value, repr };
575
- };
576
- const convertAStringToANumber = function(string) {
577
- return +string;
578
- };
579
- const consumeTheRemnantsOfABadURL = function() {
580
- while (consume()) {
581
- if (code === 41 || eof()) {
582
- return;
583
- } else if (startsWithAValidEscape()) {
584
- consumeEscape();
585
- donothing();
586
- } else {
587
- donothing();
588
- }
589
- }
590
- };
591
- let iterationCount = 0;
592
- while (!eof(next())) {
593
- tokens.push(consumeAToken());
594
- iterationCount++;
595
- if (iterationCount > str.length * 2)
596
- throw new Error("I'm infinite-looping!");
597
- }
598
- return tokens;
599
- }
600
- class CSSParserToken {
601
- constructor() {
602
- this.tokenType = "";
603
- }
604
- toJSON() {
605
- return { token: this.tokenType };
606
- }
607
- toString() {
608
- return this.tokenType;
609
- }
610
- toSource() {
611
- return "" + this;
612
- }
613
- }
614
- class BadStringToken extends CSSParserToken {
615
- constructor() {
616
- super(...arguments);
617
- this.tokenType = "BADSTRING";
618
- }
619
- }
620
- class BadURLToken extends CSSParserToken {
621
- constructor() {
622
- super(...arguments);
623
- this.tokenType = "BADURL";
624
- }
625
- }
626
- class WhitespaceToken extends CSSParserToken {
627
- constructor() {
628
- super(...arguments);
629
- this.tokenType = "WHITESPACE";
630
- }
631
- toString() {
632
- return "WS";
633
- }
634
- toSource() {
635
- return " ";
636
- }
637
- }
638
- class CDOToken extends CSSParserToken {
639
- constructor() {
640
- super(...arguments);
641
- this.tokenType = "CDO";
642
- }
643
- toSource() {
644
- return "<!--";
645
- }
646
- }
647
- class CDCToken extends CSSParserToken {
648
- constructor() {
649
- super(...arguments);
650
- this.tokenType = "CDC";
651
- }
652
- toSource() {
653
- return "-->";
654
- }
655
- }
656
- class ColonToken extends CSSParserToken {
657
- constructor() {
658
- super(...arguments);
659
- this.tokenType = ":";
660
- }
661
- }
662
- class SemicolonToken extends CSSParserToken {
663
- constructor() {
664
- super(...arguments);
665
- this.tokenType = ";";
666
- }
667
- }
668
- class CommaToken extends CSSParserToken {
669
- constructor() {
670
- super(...arguments);
671
- this.tokenType = ",";
672
- }
673
- }
674
- class GroupingToken extends CSSParserToken {
675
- constructor() {
676
- super(...arguments);
677
- this.value = "";
678
- this.mirror = "";
679
- }
680
- }
681
- class OpenCurlyToken extends GroupingToken {
682
- constructor() {
683
- super();
684
- this.tokenType = "{";
685
- this.value = "{";
686
- this.mirror = "}";
687
- }
688
- }
689
- class CloseCurlyToken extends GroupingToken {
690
- constructor() {
691
- super();
692
- this.tokenType = "}";
693
- this.value = "}";
694
- this.mirror = "{";
695
- }
696
- }
697
- class OpenSquareToken extends GroupingToken {
698
- constructor() {
699
- super();
700
- this.tokenType = "[";
701
- this.value = "[";
702
- this.mirror = "]";
703
- }
704
- }
705
- class CloseSquareToken extends GroupingToken {
706
- constructor() {
707
- super();
708
- this.tokenType = "]";
709
- this.value = "]";
710
- this.mirror = "[";
711
- }
712
- }
713
- class OpenParenToken extends GroupingToken {
714
- constructor() {
715
- super();
716
- this.tokenType = "(";
717
- this.value = "(";
718
- this.mirror = ")";
719
- }
720
- }
721
- class CloseParenToken extends GroupingToken {
722
- constructor() {
723
- super();
724
- this.tokenType = ")";
725
- this.value = ")";
726
- this.mirror = "(";
727
- }
728
- }
729
- class IncludeMatchToken extends CSSParserToken {
730
- constructor() {
731
- super(...arguments);
732
- this.tokenType = "~=";
733
- }
734
- }
735
- class DashMatchToken extends CSSParserToken {
736
- constructor() {
737
- super(...arguments);
738
- this.tokenType = "|=";
739
- }
740
- }
741
- class PrefixMatchToken extends CSSParserToken {
742
- constructor() {
743
- super(...arguments);
744
- this.tokenType = "^=";
745
- }
746
- }
747
- class SuffixMatchToken extends CSSParserToken {
748
- constructor() {
749
- super(...arguments);
750
- this.tokenType = "$=";
751
- }
752
- }
753
- class SubstringMatchToken extends CSSParserToken {
754
- constructor() {
755
- super(...arguments);
756
- this.tokenType = "*=";
757
- }
758
- }
759
- class ColumnToken extends CSSParserToken {
760
- constructor() {
761
- super(...arguments);
762
- this.tokenType = "||";
763
- }
764
- }
765
- class EOFToken extends CSSParserToken {
766
- constructor() {
767
- super(...arguments);
768
- this.tokenType = "EOF";
769
- }
770
- toSource() {
771
- return "";
772
- }
773
- }
774
- class DelimToken extends CSSParserToken {
775
- constructor(code) {
776
- super();
777
- this.tokenType = "DELIM";
778
- this.value = "";
779
- this.value = stringFromCode(code);
780
- }
781
- toString() {
782
- return "DELIM(" + this.value + ")";
783
- }
784
- toJSON() {
785
- const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);
786
- json.value = this.value;
787
- return json;
788
- }
789
- toSource() {
790
- if (this.value === "\\")
791
- return "\\\n";
792
- else
793
- return this.value;
794
- }
795
- }
796
- class StringValuedToken extends CSSParserToken {
797
- constructor() {
798
- super(...arguments);
799
- this.value = "";
800
- }
801
- ASCIIMatch(str) {
802
- return this.value.toLowerCase() === str.toLowerCase();
803
- }
804
- toJSON() {
805
- const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);
806
- json.value = this.value;
807
- return json;
808
- }
809
- }
810
- class IdentToken extends StringValuedToken {
811
- constructor(val) {
812
- super();
813
- this.tokenType = "IDENT";
814
- this.value = val;
815
- }
816
- toString() {
817
- return "IDENT(" + this.value + ")";
818
- }
819
- toSource() {
820
- return escapeIdent(this.value);
821
- }
822
- }
823
- class FunctionToken extends StringValuedToken {
824
- constructor(val) {
825
- super();
826
- this.tokenType = "FUNCTION";
827
- this.value = val;
828
- this.mirror = ")";
829
- }
830
- toString() {
831
- return "FUNCTION(" + this.value + ")";
832
- }
833
- toSource() {
834
- return escapeIdent(this.value) + "(";
835
- }
836
- }
837
- class AtKeywordToken extends StringValuedToken {
838
- constructor(val) {
839
- super();
840
- this.tokenType = "AT-KEYWORD";
841
- this.value = val;
842
- }
843
- toString() {
844
- return "AT(" + this.value + ")";
845
- }
846
- toSource() {
847
- return "@" + escapeIdent(this.value);
848
- }
849
- }
850
- class HashToken extends StringValuedToken {
851
- constructor(val) {
852
- super();
853
- this.tokenType = "HASH";
854
- this.value = val;
855
- this.type = "unrestricted";
856
- }
857
- toString() {
858
- return "HASH(" + this.value + ")";
859
- }
860
- toJSON() {
861
- const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);
862
- json.value = this.value;
863
- json.type = this.type;
864
- return json;
865
- }
866
- toSource() {
867
- if (this.type === "id")
868
- return "#" + escapeIdent(this.value);
869
- else
870
- return "#" + escapeHash(this.value);
871
- }
872
- }
873
- class StringToken extends StringValuedToken {
874
- constructor(val) {
875
- super();
876
- this.tokenType = "STRING";
877
- this.value = val;
878
- }
879
- toString() {
880
- return '"' + escapeString(this.value) + '"';
881
- }
882
- }
883
- class URLToken extends StringValuedToken {
884
- constructor(val) {
885
- super();
886
- this.tokenType = "URL";
887
- this.value = val;
888
- }
889
- toString() {
890
- return "URL(" + this.value + ")";
891
- }
892
- toSource() {
893
- return 'url("' + escapeString(this.value) + '")';
894
- }
895
- }
896
- class NumberToken extends CSSParserToken {
897
- constructor() {
898
- super();
899
- this.tokenType = "NUMBER";
900
- this.type = "integer";
901
- this.repr = "";
902
- }
903
- toString() {
904
- if (this.type === "integer")
905
- return "INT(" + this.value + ")";
906
- return "NUMBER(" + this.value + ")";
907
- }
908
- toJSON() {
909
- const json = super.toJSON();
910
- json.value = this.value;
911
- json.type = this.type;
912
- json.repr = this.repr;
913
- return json;
914
- }
915
- toSource() {
916
- return this.repr;
917
- }
918
- }
919
- class PercentageToken extends CSSParserToken {
920
- constructor() {
921
- super();
922
- this.tokenType = "PERCENTAGE";
923
- this.repr = "";
924
- }
925
- toString() {
926
- return "PERCENTAGE(" + this.value + ")";
927
- }
928
- toJSON() {
929
- const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);
930
- json.value = this.value;
931
- json.repr = this.repr;
932
- return json;
933
- }
934
- toSource() {
935
- return this.repr + "%";
936
- }
937
- }
938
- class DimensionToken extends CSSParserToken {
939
- constructor() {
940
- super();
941
- this.tokenType = "DIMENSION";
942
- this.type = "integer";
943
- this.repr = "";
944
- this.unit = "";
945
- }
946
- toString() {
947
- return "DIM(" + this.value + "," + this.unit + ")";
948
- }
949
- toJSON() {
950
- const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);
951
- json.value = this.value;
952
- json.type = this.type;
953
- json.repr = this.repr;
954
- json.unit = this.unit;
955
- return json;
956
- }
957
- toSource() {
958
- const source = this.repr;
959
- let unit = escapeIdent(this.unit);
960
- if (unit[0].toLowerCase() === "e" && (unit[1] === "-" || between(unit.charCodeAt(1), 48, 57))) {
961
- unit = "\\65 " + unit.slice(1, unit.length);
962
- }
963
- return source + unit;
964
- }
965
- }
966
- function escapeIdent(string) {
967
- string = "" + string;
968
- let result = "";
969
- const firstcode = string.charCodeAt(0);
970
- for (let i = 0; i < string.length; i++) {
971
- const code = string.charCodeAt(i);
972
- if (code === 0)
973
- throw new InvalidCharacterError("Invalid character: the input contains U+0000.");
974
- if (between(code, 1, 31) || code === 127 || i === 0 && between(code, 48, 57) || i === 1 && between(code, 48, 57) && firstcode === 45)
975
- result += "\\" + code.toString(16) + " ";
976
- else if (code >= 128 || code === 45 || code === 95 || between(code, 48, 57) || between(code, 65, 90) || between(code, 97, 122))
977
- result += string[i];
978
- else
979
- result += "\\" + string[i];
980
- }
981
- return result;
982
- }
983
- function escapeHash(string) {
984
- string = "" + string;
985
- let result = "";
986
- for (let i = 0; i < string.length; i++) {
987
- const code = string.charCodeAt(i);
988
- if (code === 0)
989
- throw new InvalidCharacterError("Invalid character: the input contains U+0000.");
990
- if (code >= 128 || code === 45 || code === 95 || between(code, 48, 57) || between(code, 65, 90) || between(code, 97, 122))
991
- result += string[i];
992
- else
993
- result += "\\" + code.toString(16) + " ";
994
- }
995
- return result;
996
- }
997
- function escapeString(string) {
998
- string = "" + string;
999
- let result = "";
1000
- for (let i = 0; i < string.length; i++) {
1001
- const code = string.charCodeAt(i);
1002
- if (code === 0)
1003
- throw new InvalidCharacterError("Invalid character: the input contains U+0000.");
1004
- if (between(code, 1, 31) || code === 127)
1005
- result += "\\" + code.toString(16) + " ";
1006
- else if (code === 34 || code === 92)
1007
- result += "\\" + string[i];
1008
- else
1009
- result += string[i];
1010
- }
1011
- return result;
1012
- }
1013
- // Annotate the CommonJS export names for ESM import in node:
1014
- 0 && (module.exports = {
1015
- AtKeywordToken,
1016
- BadStringToken,
1017
- BadURLToken,
1018
- CDCToken,
1019
- CDOToken,
1020
- CSSParserToken,
1021
- CloseCurlyToken,
1022
- CloseParenToken,
1023
- CloseSquareToken,
1024
- ColonToken,
1025
- ColumnToken,
1026
- CommaToken,
1027
- DashMatchToken,
1028
- DelimToken,
1029
- DimensionToken,
1030
- EOFToken,
1031
- FunctionToken,
1032
- GroupingToken,
1033
- HashToken,
1034
- IdentToken,
1035
- IncludeMatchToken,
1036
- InvalidCharacterError,
1037
- NumberToken,
1038
- OpenCurlyToken,
1039
- OpenParenToken,
1040
- OpenSquareToken,
1041
- PercentageToken,
1042
- PrefixMatchToken,
1043
- SemicolonToken,
1044
- StringToken,
1045
- StringValuedToken,
1046
- SubstringMatchToken,
1047
- SuffixMatchToken,
1048
- URLToken,
1049
- WhitespaceToken,
1050
- tokenize
1051
- });