easytouch-linux 1.0.7 → 1.0.18

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 (337) hide show
  1. package/LICENSE.txt +201 -0
  2. package/README.md +33 -314
  3. package/SKILL.md +366 -0
  4. package/bin/arm64/et +0 -0
  5. package/bin/et.js +60 -0
  6. package/bin/x64/et +0 -0
  7. package/package.json +19 -37
  8. package/.playwright/node/LICENSE +0 -2607
  9. package/.playwright/node/linux-x64/node +0 -0
  10. package/.playwright/package/README.md +0 -3
  11. package/.playwright/package/ThirdPartyNotices.txt +0 -1602
  12. package/.playwright/package/api.json +0 -1
  13. package/.playwright/package/bin/install_media_pack.ps1 +0 -5
  14. package/.playwright/package/bin/reinstall_chrome_beta_linux.sh +0 -42
  15. package/.playwright/package/bin/reinstall_chrome_beta_mac.sh +0 -13
  16. package/.playwright/package/bin/reinstall_chrome_beta_win.ps1 +0 -24
  17. package/.playwright/package/bin/reinstall_chrome_stable_linux.sh +0 -42
  18. package/.playwright/package/bin/reinstall_chrome_stable_mac.sh +0 -12
  19. package/.playwright/package/bin/reinstall_chrome_stable_win.ps1 +0 -24
  20. package/.playwright/package/bin/reinstall_msedge_beta_linux.sh +0 -48
  21. package/.playwright/package/bin/reinstall_msedge_beta_mac.sh +0 -11
  22. package/.playwright/package/bin/reinstall_msedge_beta_win.ps1 +0 -23
  23. package/.playwright/package/bin/reinstall_msedge_dev_linux.sh +0 -48
  24. package/.playwright/package/bin/reinstall_msedge_dev_mac.sh +0 -11
  25. package/.playwright/package/bin/reinstall_msedge_dev_win.ps1 +0 -23
  26. package/.playwright/package/bin/reinstall_msedge_stable_linux.sh +0 -48
  27. package/.playwright/package/bin/reinstall_msedge_stable_mac.sh +0 -11
  28. package/.playwright/package/bin/reinstall_msedge_stable_win.ps1 +0 -24
  29. package/.playwright/package/browsers.json +0 -66
  30. package/.playwright/package/cli.js +0 -18
  31. package/.playwright/package/index.d.ts +0 -17
  32. package/.playwright/package/index.js +0 -33
  33. package/.playwright/package/index.mjs +0 -28
  34. package/.playwright/package/lib/androidServerImpl.js +0 -69
  35. package/.playwright/package/lib/browserServerImpl.js +0 -92
  36. package/.playwright/package/lib/cli/driver.js +0 -95
  37. package/.playwright/package/lib/cli/program.js +0 -583
  38. package/.playwright/package/lib/cli/programWithTestStub.js +0 -67
  39. package/.playwright/package/lib/client/accessibility.js +0 -50
  40. package/.playwright/package/lib/client/android.js +0 -473
  41. package/.playwright/package/lib/client/api.js +0 -285
  42. package/.playwright/package/lib/client/artifact.js +0 -79
  43. package/.playwright/package/lib/client/browser.js +0 -145
  44. package/.playwright/package/lib/client/browserContext.js +0 -559
  45. package/.playwright/package/lib/client/browserType.js +0 -241
  46. package/.playwright/package/lib/client/cdpSession.js +0 -53
  47. package/.playwright/package/lib/client/channelOwner.js +0 -215
  48. package/.playwright/package/lib/client/clientHelper.js +0 -57
  49. package/.playwright/package/lib/client/clientInstrumentation.js +0 -52
  50. package/.playwright/package/lib/client/clock.js +0 -68
  51. package/.playwright/package/lib/client/connection.js +0 -333
  52. package/.playwright/package/lib/client/consoleMessage.js +0 -55
  53. package/.playwright/package/lib/client/coverage.js +0 -41
  54. package/.playwright/package/lib/client/dialog.js +0 -57
  55. package/.playwright/package/lib/client/download.js +0 -62
  56. package/.playwright/package/lib/client/electron.js +0 -135
  57. package/.playwright/package/lib/client/elementHandle.js +0 -321
  58. package/.playwright/package/lib/client/errors.js +0 -77
  59. package/.playwright/package/lib/client/eventEmitter.js +0 -314
  60. package/.playwright/package/lib/client/events.js +0 -94
  61. package/.playwright/package/lib/client/fetch.js +0 -391
  62. package/.playwright/package/lib/client/fileChooser.js +0 -45
  63. package/.playwright/package/lib/client/frame.js +0 -504
  64. package/.playwright/package/lib/client/harRouter.js +0 -99
  65. package/.playwright/package/lib/client/input.js +0 -111
  66. package/.playwright/package/lib/client/jsHandle.js +0 -121
  67. package/.playwright/package/lib/client/jsonPipe.js +0 -35
  68. package/.playwright/package/lib/client/localUtils.js +0 -36
  69. package/.playwright/package/lib/client/locator.js +0 -448
  70. package/.playwright/package/lib/client/network.js +0 -769
  71. package/.playwright/package/lib/client/page.js +0 -748
  72. package/.playwright/package/lib/client/playwright.js +0 -80
  73. package/.playwright/package/lib/client/selectors.js +0 -67
  74. package/.playwright/package/lib/client/stream.js +0 -54
  75. package/.playwright/package/lib/client/tracing.js +0 -147
  76. package/.playwright/package/lib/client/types.js +0 -24
  77. package/.playwright/package/lib/client/video.js +0 -51
  78. package/.playwright/package/lib/client/waiter.js +0 -162
  79. package/.playwright/package/lib/client/webError.js +0 -37
  80. package/.playwright/package/lib/client/worker.js +0 -71
  81. package/.playwright/package/lib/client/writableStream.js +0 -54
  82. package/.playwright/package/lib/common/socksProxy.js +0 -569
  83. package/.playwright/package/lib/common/timeoutSettings.js +0 -73
  84. package/.playwright/package/lib/common/types.js +0 -5
  85. package/.playwright/package/lib/generated/clockSource.js +0 -7
  86. package/.playwright/package/lib/generated/consoleApiSource.js +0 -7
  87. package/.playwright/package/lib/generated/injectedScriptSource.js +0 -7
  88. package/.playwright/package/lib/generated/pollingRecorderSource.js +0 -7
  89. package/.playwright/package/lib/generated/utilityScriptSource.js +0 -7
  90. package/.playwright/package/lib/generated/webSocketMockSource.js +0 -7
  91. package/.playwright/package/lib/image_tools/colorUtils.js +0 -98
  92. package/.playwright/package/lib/image_tools/compare.js +0 -108
  93. package/.playwright/package/lib/image_tools/imageChannel.js +0 -70
  94. package/.playwright/package/lib/image_tools/stats.js +0 -102
  95. package/.playwright/package/lib/inProcessFactory.js +0 -56
  96. package/.playwright/package/lib/inprocess.js +0 -20
  97. package/.playwright/package/lib/outofprocess.js +0 -67
  98. package/.playwright/package/lib/protocol/debug.js +0 -27
  99. package/.playwright/package/lib/protocol/serializers.js +0 -173
  100. package/.playwright/package/lib/protocol/transport.js +0 -82
  101. package/.playwright/package/lib/protocol/validator.js +0 -2780
  102. package/.playwright/package/lib/protocol/validatorPrimitives.js +0 -139
  103. package/.playwright/package/lib/remote/playwrightConnection.js +0 -275
  104. package/.playwright/package/lib/remote/playwrightServer.js +0 -111
  105. package/.playwright/package/lib/server/accessibility.js +0 -62
  106. package/.playwright/package/lib/server/android/android.js +0 -441
  107. package/.playwright/package/lib/server/android/backendAdb.js +0 -172
  108. package/.playwright/package/lib/server/artifact.js +0 -104
  109. package/.playwright/package/lib/server/bidi/bidiBrowser.js +0 -314
  110. package/.playwright/package/lib/server/bidi/bidiChromium.js +0 -124
  111. package/.playwright/package/lib/server/bidi/bidiConnection.js +0 -204
  112. package/.playwright/package/lib/server/bidi/bidiExecutionContext.js +0 -175
  113. package/.playwright/package/lib/server/bidi/bidiFirefox.js +0 -104
  114. package/.playwright/package/lib/server/bidi/bidiInput.js +0 -160
  115. package/.playwright/package/lib/server/bidi/bidiNetworkManager.js +0 -337
  116. package/.playwright/package/lib/server/bidi/bidiOverCdp.js +0 -103
  117. package/.playwright/package/lib/server/bidi/bidiPage.js +0 -518
  118. package/.playwright/package/lib/server/bidi/bidiPdf.js +0 -140
  119. package/.playwright/package/lib/server/bidi/third_party/bidiDeserializer.js +0 -93
  120. package/.playwright/package/lib/server/bidi/third_party/bidiKeyboard.js +0 -240
  121. package/.playwright/package/lib/server/bidi/third_party/bidiProtocol.js +0 -139
  122. package/.playwright/package/lib/server/bidi/third_party/bidiSerializer.js +0 -144
  123. package/.playwright/package/lib/server/bidi/third_party/firefoxPrefs.js +0 -221
  124. package/.playwright/package/lib/server/browser.js +0 -148
  125. package/.playwright/package/lib/server/browserContext.js +0 -675
  126. package/.playwright/package/lib/server/browserType.js +0 -338
  127. package/.playwright/package/lib/server/chromium/appIcon.png +0 -0
  128. package/.playwright/package/lib/server/chromium/chromium.js +0 -354
  129. package/.playwright/package/lib/server/chromium/chromiumSwitches.js +0 -46
  130. package/.playwright/package/lib/server/chromium/crAccessibility.js +0 -237
  131. package/.playwright/package/lib/server/chromium/crBrowser.js +0 -516
  132. package/.playwright/package/lib/server/chromium/crConnection.js +0 -228
  133. package/.playwright/package/lib/server/chromium/crCoverage.js +0 -246
  134. package/.playwright/package/lib/server/chromium/crDevTools.js +0 -104
  135. package/.playwright/package/lib/server/chromium/crDragDrop.js +0 -143
  136. package/.playwright/package/lib/server/chromium/crExecutionContext.js +0 -132
  137. package/.playwright/package/lib/server/chromium/crInput.js +0 -182
  138. package/.playwright/package/lib/server/chromium/crNetworkManager.js +0 -767
  139. package/.playwright/package/lib/server/chromium/crPage.js +0 -1122
  140. package/.playwright/package/lib/server/chromium/crPdf.js +0 -153
  141. package/.playwright/package/lib/server/chromium/crProtocolHelper.js +0 -133
  142. package/.playwright/package/lib/server/chromium/crServiceWorker.js +0 -112
  143. package/.playwright/package/lib/server/chromium/defaultFontFamilies.js +0 -145
  144. package/.playwright/package/lib/server/chromium/videoRecorder.js +0 -155
  145. package/.playwright/package/lib/server/clock.js +0 -125
  146. package/.playwright/package/lib/server/codegen/csharp.js +0 -304
  147. package/.playwright/package/lib/server/codegen/java.js +0 -243
  148. package/.playwright/package/lib/server/codegen/javascript.js +0 -253
  149. package/.playwright/package/lib/server/codegen/jsonl.js +0 -47
  150. package/.playwright/package/lib/server/codegen/language.js +0 -88
  151. package/.playwright/package/lib/server/codegen/languages.js +0 -30
  152. package/.playwright/package/lib/server/codegen/python.js +0 -262
  153. package/.playwright/package/lib/server/codegen/types.js +0 -5
  154. package/.playwright/package/lib/server/console.js +0 -57
  155. package/.playwright/package/lib/server/cookieStore.js +0 -185
  156. package/.playwright/package/lib/server/debugController.js +0 -212
  157. package/.playwright/package/lib/server/debugger.js +0 -132
  158. package/.playwright/package/lib/server/deviceDescriptors.js +0 -26
  159. package/.playwright/package/lib/server/deviceDescriptorsSource.json +0 -1669
  160. package/.playwright/package/lib/server/dialog.js +0 -71
  161. package/.playwright/package/lib/server/dispatchers/androidDispatcher.js +0 -204
  162. package/.playwright/package/lib/server/dispatchers/artifactDispatcher.js +0 -118
  163. package/.playwright/package/lib/server/dispatchers/browserContextDispatcher.js +0 -357
  164. package/.playwright/package/lib/server/dispatchers/browserDispatcher.js +0 -170
  165. package/.playwright/package/lib/server/dispatchers/browserTypeDispatcher.js +0 -55
  166. package/.playwright/package/lib/server/dispatchers/cdpSessionDispatcher.js +0 -48
  167. package/.playwright/package/lib/server/dispatchers/debugControllerDispatcher.js +0 -105
  168. package/.playwright/package/lib/server/dispatchers/dialogDispatcher.js +0 -44
  169. package/.playwright/package/lib/server/dispatchers/dispatcher.js +0 -395
  170. package/.playwright/package/lib/server/dispatchers/electronDispatcher.js +0 -93
  171. package/.playwright/package/lib/server/dispatchers/elementHandlerDispatcher.js +0 -228
  172. package/.playwright/package/lib/server/dispatchers/frameDispatcher.js +0 -294
  173. package/.playwright/package/lib/server/dispatchers/jsHandleDispatcher.js +0 -97
  174. package/.playwright/package/lib/server/dispatchers/jsonPipeDispatcher.js +0 -59
  175. package/.playwright/package/lib/server/dispatchers/localUtilsDispatcher.js +0 -413
  176. package/.playwright/package/lib/server/dispatchers/networkDispatchers.js +0 -221
  177. package/.playwright/package/lib/server/dispatchers/pageDispatcher.js +0 -367
  178. package/.playwright/package/lib/server/dispatchers/playwrightDispatcher.js +0 -107
  179. package/.playwright/package/lib/server/dispatchers/selectorsDispatcher.js +0 -36
  180. package/.playwright/package/lib/server/dispatchers/streamDispatcher.js +0 -62
  181. package/.playwright/package/lib/server/dispatchers/tracingDispatcher.js +0 -64
  182. package/.playwright/package/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -188
  183. package/.playwright/package/lib/server/dispatchers/writableStreamDispatcher.js +0 -58
  184. package/.playwright/package/lib/server/dom.js +0 -893
  185. package/.playwright/package/lib/server/download.js +0 -60
  186. package/.playwright/package/lib/server/electron/electron.js +0 -296
  187. package/.playwright/package/lib/server/electron/loader.js +0 -57
  188. package/.playwright/package/lib/server/errors.js +0 -68
  189. package/.playwright/package/lib/server/fetch.js +0 -663
  190. package/.playwright/package/lib/server/fileChooser.js +0 -42
  191. package/.playwright/package/lib/server/fileUploadUtils.js +0 -75
  192. package/.playwright/package/lib/server/firefox/ffAccessibility.js +0 -216
  193. package/.playwright/package/lib/server/firefox/ffBrowser.js +0 -462
  194. package/.playwright/package/lib/server/firefox/ffConnection.js +0 -168
  195. package/.playwright/package/lib/server/firefox/ffExecutionContext.js +0 -123
  196. package/.playwright/package/lib/server/firefox/ffInput.js +0 -161
  197. package/.playwright/package/lib/server/firefox/ffNetworkManager.js +0 -233
  198. package/.playwright/package/lib/server/firefox/ffPage.js +0 -544
  199. package/.playwright/package/lib/server/firefox/firefox.js +0 -99
  200. package/.playwright/package/lib/server/formData.js +0 -75
  201. package/.playwright/package/lib/server/frameSelectors.js +0 -171
  202. package/.playwright/package/lib/server/frames.js +0 -1663
  203. package/.playwright/package/lib/server/har/harRecorder.js +0 -139
  204. package/.playwright/package/lib/server/har/harTracer.js +0 -542
  205. package/.playwright/package/lib/server/helper.js +0 -103
  206. package/.playwright/package/lib/server/index.js +0 -108
  207. package/.playwright/package/lib/server/input.js +0 -309
  208. package/.playwright/package/lib/server/instrumentation.js +0 -70
  209. package/.playwright/package/lib/server/isomorphic/utilityScriptSerializers.js +0 -226
  210. package/.playwright/package/lib/server/javascript.js +0 -293
  211. package/.playwright/package/lib/server/launchApp.js +0 -91
  212. package/.playwright/package/lib/server/macEditingCommands.js +0 -139
  213. package/.playwright/package/lib/server/network.js +0 -617
  214. package/.playwright/package/lib/server/page.js +0 -863
  215. package/.playwright/package/lib/server/pipeTransport.js +0 -85
  216. package/.playwright/package/lib/server/playwright.js +0 -88
  217. package/.playwright/package/lib/server/progress.js +0 -99
  218. package/.playwright/package/lib/server/protocolError.js +0 -49
  219. package/.playwright/package/lib/server/recorder/chat.js +0 -177
  220. package/.playwright/package/lib/server/recorder/contextRecorder.js +0 -290
  221. package/.playwright/package/lib/server/recorder/recorderApp.js +0 -187
  222. package/.playwright/package/lib/server/recorder/recorderCollection.js +0 -104
  223. package/.playwright/package/lib/server/recorder/recorderFrontend.js +0 -5
  224. package/.playwright/package/lib/server/recorder/recorderRunner.js +0 -159
  225. package/.playwright/package/lib/server/recorder/recorderUtils.js +0 -89
  226. package/.playwright/package/lib/server/recorder/throttledFile.js +0 -46
  227. package/.playwright/package/lib/server/recorder.js +0 -367
  228. package/.playwright/package/lib/server/registry/browserFetcher.js +0 -168
  229. package/.playwright/package/lib/server/registry/dependencies.js +0 -322
  230. package/.playwright/package/lib/server/registry/index.js +0 -1165
  231. package/.playwright/package/lib/server/registry/nativeDeps.js +0 -496
  232. package/.playwright/package/lib/server/registry/oopDownloadBrowserMain.js +0 -138
  233. package/.playwright/package/lib/server/screenshotter.js +0 -348
  234. package/.playwright/package/lib/server/selectors.js +0 -73
  235. package/.playwright/package/lib/server/socksClientCertificatesInterceptor.js +0 -340
  236. package/.playwright/package/lib/server/socksInterceptor.js +0 -100
  237. package/.playwright/package/lib/server/trace/recorder/snapshotter.js +0 -161
  238. package/.playwright/package/lib/server/trace/recorder/snapshotterInjected.js +0 -518
  239. package/.playwright/package/lib/server/trace/recorder/tracing.js +0 -596
  240. package/.playwright/package/lib/server/trace/test/inMemorySnapshotter.js +0 -93
  241. package/.playwright/package/lib/server/trace/viewer/traceViewer.js +0 -219
  242. package/.playwright/package/lib/server/transport.js +0 -192
  243. package/.playwright/package/lib/server/types.js +0 -24
  244. package/.playwright/package/lib/server/usKeyboardLayout.js +0 -555
  245. package/.playwright/package/lib/server/webkit/webkit.js +0 -87
  246. package/.playwright/package/lib/server/webkit/wkAccessibility.js +0 -194
  247. package/.playwright/package/lib/server/webkit/wkBrowser.js +0 -329
  248. package/.playwright/package/lib/server/webkit/wkConnection.js +0 -173
  249. package/.playwright/package/lib/server/webkit/wkExecutionContext.js +0 -131
  250. package/.playwright/package/lib/server/webkit/wkInput.js +0 -179
  251. package/.playwright/package/lib/server/webkit/wkInterceptableRequest.js +0 -162
  252. package/.playwright/package/lib/server/webkit/wkPage.js +0 -1207
  253. package/.playwright/package/lib/server/webkit/wkProvisionalPage.js +0 -94
  254. package/.playwright/package/lib/server/webkit/wkWorkers.js +0 -104
  255. package/.playwright/package/lib/third_party/pixelmatch.js +0 -255
  256. package/.playwright/package/lib/utils/ascii.js +0 -31
  257. package/.playwright/package/lib/utils/comparators.js +0 -159
  258. package/.playwright/package/lib/utils/crypto.js +0 -171
  259. package/.playwright/package/lib/utils/debug.js +0 -46
  260. package/.playwright/package/lib/utils/debugLogger.js +0 -93
  261. package/.playwright/package/lib/utils/env.js +0 -49
  262. package/.playwright/package/lib/utils/eventsHelper.js +0 -38
  263. package/.playwright/package/lib/utils/expectUtils.js +0 -33
  264. package/.playwright/package/lib/utils/fileUtils.js +0 -205
  265. package/.playwright/package/lib/utils/happy-eyeballs.js +0 -194
  266. package/.playwright/package/lib/utils/headers.js +0 -52
  267. package/.playwright/package/lib/utils/hostPlatform.js +0 -145
  268. package/.playwright/package/lib/utils/httpServer.js +0 -233
  269. package/.playwright/package/lib/utils/index.js +0 -368
  270. package/.playwright/package/lib/utils/isomorphic/ariaSnapshot.js +0 -391
  271. package/.playwright/package/lib/utils/isomorphic/cssParser.js +0 -250
  272. package/.playwright/package/lib/utils/isomorphic/cssTokenizer.js +0 -979
  273. package/.playwright/package/lib/utils/isomorphic/locatorGenerators.js +0 -660
  274. package/.playwright/package/lib/utils/isomorphic/locatorParser.js +0 -185
  275. package/.playwright/package/lib/utils/isomorphic/locatorUtils.js +0 -62
  276. package/.playwright/package/lib/utils/isomorphic/mimeType.js +0 -29
  277. package/.playwright/package/lib/utils/isomorphic/selectorParser.js +0 -397
  278. package/.playwright/package/lib/utils/isomorphic/stringUtils.js +0 -169
  279. package/.playwright/package/lib/utils/isomorphic/traceUtils.js +0 -39
  280. package/.playwright/package/lib/utils/isomorphic/urlMatch.js +0 -122
  281. package/.playwright/package/lib/utils/linuxUtils.js +0 -78
  282. package/.playwright/package/lib/utils/manualPromise.js +0 -109
  283. package/.playwright/package/lib/utils/multimap.js +0 -75
  284. package/.playwright/package/lib/utils/network.js +0 -160
  285. package/.playwright/package/lib/utils/processLauncher.js +0 -248
  286. package/.playwright/package/lib/utils/profiler.js +0 -53
  287. package/.playwright/package/lib/utils/rtti.js +0 -44
  288. package/.playwright/package/lib/utils/semaphore.js +0 -51
  289. package/.playwright/package/lib/utils/sequence.js +0 -64
  290. package/.playwright/package/lib/utils/spawnAsync.js +0 -45
  291. package/.playwright/package/lib/utils/stackTrace.js +0 -134
  292. package/.playwright/package/lib/utils/task.js +0 -58
  293. package/.playwright/package/lib/utils/time.js +0 -37
  294. package/.playwright/package/lib/utils/timeoutRunner.js +0 -66
  295. package/.playwright/package/lib/utils/traceUtils.js +0 -44
  296. package/.playwright/package/lib/utils/userAgent.js +0 -105
  297. package/.playwright/package/lib/utils/wsServer.js +0 -128
  298. package/.playwright/package/lib/utils/zipFile.js +0 -75
  299. package/.playwright/package/lib/utils/zones.js +0 -69
  300. package/.playwright/package/lib/utilsBundle.js +0 -81
  301. package/.playwright/package/lib/utilsBundleImpl/index.js +0 -210
  302. package/.playwright/package/lib/utilsBundleImpl/xdg-open +0 -1066
  303. package/.playwright/package/lib/vite/htmlReport/index.html +0 -69
  304. package/.playwright/package/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +0 -1
  305. package/.playwright/package/lib/vite/recorder/assets/codeMirrorModule-k-61wZCK.js +0 -24
  306. package/.playwright/package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  307. package/.playwright/package/lib/vite/recorder/assets/index-B70BEW3b.js +0 -184
  308. package/.playwright/package/lib/vite/recorder/assets/index-eHBmevrY.css +0 -1
  309. package/.playwright/package/lib/vite/recorder/index.html +0 -29
  310. package/.playwright/package/lib/vite/recorder/playwright-logo.svg +0 -9
  311. package/.playwright/package/lib/vite/traceViewer/assets/codeMirrorModule-CyuxU5C-.js +0 -24
  312. package/.playwright/package/lib/vite/traceViewer/assets/defaultSettingsView-5nVJRt0A.js +0 -243
  313. package/.playwright/package/lib/vite/traceViewer/assets/xtermModule-c-SNdYZy.js +0 -9
  314. package/.playwright/package/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +0 -1
  315. package/.playwright/package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  316. package/.playwright/package/lib/vite/traceViewer/defaultSettingsView.2xeEXCXv.css +0 -1
  317. package/.playwright/package/lib/vite/traceViewer/index.CFOW-Ezb.css +0 -1
  318. package/.playwright/package/lib/vite/traceViewer/index.html +0 -43
  319. package/.playwright/package/lib/vite/traceViewer/index.qVn2ZnpC.js +0 -2
  320. package/.playwright/package/lib/vite/traceViewer/playwright-logo.svg +0 -9
  321. package/.playwright/package/lib/vite/traceViewer/snapshot.html +0 -21
  322. package/.playwright/package/lib/vite/traceViewer/sw.bundle.js +0 -3
  323. package/.playwright/package/lib/vite/traceViewer/uiMode.BatfzHMG.css +0 -1
  324. package/.playwright/package/lib/vite/traceViewer/uiMode.html +0 -17
  325. package/.playwright/package/lib/vite/traceViewer/uiMode.m4IPRPOd.js +0 -5
  326. package/.playwright/package/lib/vite/traceViewer/xtermModule.Beg8tuEN.css +0 -32
  327. package/.playwright/package/lib/zipBundle.js +0 -25
  328. package/.playwright/package/lib/zipBundleImpl.js +0 -5
  329. package/.playwright/package/package.json +0 -44
  330. package/.playwright/package/protocol.yml +0 -3758
  331. package/.playwright/package/types/protocol.d.ts +0 -21868
  332. package/.playwright/package/types/structs.d.ts +0 -45
  333. package/.playwright/package/types/types.d.ts +0 -22663
  334. package/et +0 -0
  335. package/install.js +0 -19
  336. package/playwright.ps1 +0 -7
  337. package/scripts/playwright-bridge.js +0 -560
@@ -1,979 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.WhitespaceToken = exports.URLToken = exports.SuffixMatchToken = exports.SubstringMatchToken = exports.StringValuedToken = exports.StringToken = exports.SemicolonToken = exports.PrefixMatchToken = exports.PercentageToken = exports.OpenSquareToken = exports.OpenParenToken = exports.OpenCurlyToken = exports.NumberToken = exports.InvalidCharacterError = exports.IncludeMatchToken = exports.IdentToken = exports.HashToken = exports.GroupingToken = exports.FunctionToken = exports.EOFToken = exports.DimensionToken = exports.DelimToken = exports.DashMatchToken = exports.CommaToken = exports.ColumnToken = exports.ColonToken = exports.CloseSquareToken = exports.CloseParenToken = exports.CloseCurlyToken = exports.CSSParserToken = exports.CDOToken = exports.CDCToken = exports.BadURLToken = exports.BadStringToken = exports.AtKeywordToken = void 0;
7
- exports.tokenize = tokenize;
8
- /* eslint-disable notice/notice */
9
-
10
- /*
11
- * The code in this file is licensed under the CC0 license.
12
- * http://creativecommons.org/publicdomain/zero/1.0/
13
- * It is free to use for any purpose. No attribution, permission, or reproduction of this license is required.
14
- */
15
-
16
- // Original at https://github.com/tabatkins/parse-css
17
- // Changes:
18
- // - JS is replaced with TS.
19
- // - Universal Module Definition wrapper is removed.
20
- // - Everything not related to tokenizing - below the first exports block - is removed.
21
-
22
- const between = function (num, first, last) {
23
- return num >= first && num <= last;
24
- };
25
- function digit(code) {
26
- return between(code, 0x30, 0x39);
27
- }
28
- function hexdigit(code) {
29
- return digit(code) || between(code, 0x41, 0x46) || between(code, 0x61, 0x66);
30
- }
31
- function uppercaseletter(code) {
32
- return between(code, 0x41, 0x5a);
33
- }
34
- function lowercaseletter(code) {
35
- return between(code, 0x61, 0x7a);
36
- }
37
- function letter(code) {
38
- return uppercaseletter(code) || lowercaseletter(code);
39
- }
40
- function nonascii(code) {
41
- return code >= 0x80;
42
- }
43
- function namestartchar(code) {
44
- return letter(code) || nonascii(code) || code === 0x5f;
45
- }
46
- function namechar(code) {
47
- return namestartchar(code) || digit(code) || code === 0x2d;
48
- }
49
- function nonprintable(code) {
50
- return between(code, 0, 8) || code === 0xb || between(code, 0xe, 0x1f) || code === 0x7f;
51
- }
52
- function newline(code) {
53
- return code === 0xa;
54
- }
55
- function whitespace(code) {
56
- return newline(code) || code === 9 || code === 0x20;
57
- }
58
- const maximumallowedcodepoint = 0x10ffff;
59
- class InvalidCharacterError extends Error {
60
- constructor(message) {
61
- super(message);
62
- this.name = 'InvalidCharacterError';
63
- }
64
- }
65
- exports.InvalidCharacterError = InvalidCharacterError;
66
- function preprocess(str) {
67
- // Turn a string into an array of code points,
68
- // following the preprocessing cleanup rules.
69
- const codepoints = [];
70
- for (let i = 0; i < str.length; i++) {
71
- let code = str.charCodeAt(i);
72
- if (code === 0xd && str.charCodeAt(i + 1) === 0xa) {
73
- code = 0xa;
74
- i++;
75
- }
76
- if (code === 0xd || code === 0xc) code = 0xa;
77
- if (code === 0x0) code = 0xfffd;
78
- if (between(code, 0xd800, 0xdbff) && between(str.charCodeAt(i + 1), 0xdc00, 0xdfff)) {
79
- // Decode a surrogate pair into an astral codepoint.
80
- const lead = code - 0xd800;
81
- const trail = str.charCodeAt(i + 1) - 0xdc00;
82
- code = Math.pow(2, 16) + lead * Math.pow(2, 10) + trail;
83
- i++;
84
- }
85
- codepoints.push(code);
86
- }
87
- return codepoints;
88
- }
89
- function stringFromCode(code) {
90
- if (code <= 0xffff) return String.fromCharCode(code);
91
- // Otherwise, encode astral char as surrogate pair.
92
- code -= Math.pow(2, 16);
93
- const lead = Math.floor(code / Math.pow(2, 10)) + 0xd800;
94
- const trail = code % Math.pow(2, 10) + 0xdc00;
95
- return String.fromCharCode(lead) + String.fromCharCode(trail);
96
- }
97
- function tokenize(str1) {
98
- const str = preprocess(str1);
99
- let i = -1;
100
- const tokens = [];
101
- let code;
102
-
103
- // Line number information.
104
- let line = 0;
105
- let column = 0;
106
- // The only use of lastLineLength is in reconsume().
107
- let lastLineLength = 0;
108
- const incrLineno = function () {
109
- line += 1;
110
- lastLineLength = column;
111
- column = 0;
112
- };
113
- const locStart = {
114
- line: line,
115
- column: column
116
- };
117
- const codepoint = function (i) {
118
- if (i >= str.length) return -1;
119
- return str[i];
120
- };
121
- const next = function (num) {
122
- if (num === undefined) num = 1;
123
- if (num > 3) throw 'Spec Error: no more than three codepoints of lookahead.';
124
- return codepoint(i + num);
125
- };
126
- const consume = function (num) {
127
- if (num === undefined) num = 1;
128
- i += num;
129
- code = codepoint(i);
130
- if (newline(code)) incrLineno();else column += num;
131
- // console.log('Consume '+i+' '+String.fromCharCode(code) + ' 0x' + code.toString(16));
132
- return true;
133
- };
134
- const reconsume = function () {
135
- i -= 1;
136
- if (newline(code)) {
137
- line -= 1;
138
- column = lastLineLength;
139
- } else {
140
- column -= 1;
141
- }
142
- locStart.line = line;
143
- locStart.column = column;
144
- return true;
145
- };
146
- const eof = function (codepoint) {
147
- if (codepoint === undefined) codepoint = code;
148
- return codepoint === -1;
149
- };
150
- const donothing = function () {};
151
- const parseerror = function () {
152
- // Language bindings don't like writing to stdout!
153
- // console.log('Parse error at index ' + i + ', processing codepoint 0x' + code.toString(16) + '.'); return true;
154
- };
155
- const consumeAToken = function () {
156
- consumeComments();
157
- consume();
158
- if (whitespace(code)) {
159
- while (whitespace(next())) consume();
160
- return new WhitespaceToken();
161
- } else if (code === 0x22) {
162
- return consumeAStringToken();
163
- } else if (code === 0x23) {
164
- if (namechar(next()) || areAValidEscape(next(1), next(2))) {
165
- const token = new HashToken('');
166
- if (wouldStartAnIdentifier(next(1), next(2), next(3))) token.type = 'id';
167
- token.value = consumeAName();
168
- return token;
169
- } else {
170
- return new DelimToken(code);
171
- }
172
- } else if (code === 0x24) {
173
- if (next() === 0x3d) {
174
- consume();
175
- return new SuffixMatchToken();
176
- } else {
177
- return new DelimToken(code);
178
- }
179
- } else if (code === 0x27) {
180
- return consumeAStringToken();
181
- } else if (code === 0x28) {
182
- return new OpenParenToken();
183
- } else if (code === 0x29) {
184
- return new CloseParenToken();
185
- } else if (code === 0x2a) {
186
- if (next() === 0x3d) {
187
- consume();
188
- return new SubstringMatchToken();
189
- } else {
190
- return new DelimToken(code);
191
- }
192
- } else if (code === 0x2b) {
193
- if (startsWithANumber()) {
194
- reconsume();
195
- return consumeANumericToken();
196
- } else {
197
- return new DelimToken(code);
198
- }
199
- } else if (code === 0x2c) {
200
- return new CommaToken();
201
- } else if (code === 0x2d) {
202
- if (startsWithANumber()) {
203
- reconsume();
204
- return consumeANumericToken();
205
- } else if (next(1) === 0x2d && next(2) === 0x3e) {
206
- consume(2);
207
- return new CDCToken();
208
- } else if (startsWithAnIdentifier()) {
209
- reconsume();
210
- return consumeAnIdentlikeToken();
211
- } else {
212
- return new DelimToken(code);
213
- }
214
- } else if (code === 0x2e) {
215
- if (startsWithANumber()) {
216
- reconsume();
217
- return consumeANumericToken();
218
- } else {
219
- return new DelimToken(code);
220
- }
221
- } else if (code === 0x3a) {
222
- return new ColonToken();
223
- } else if (code === 0x3b) {
224
- return new SemicolonToken();
225
- } else if (code === 0x3c) {
226
- if (next(1) === 0x21 && next(2) === 0x2d && next(3) === 0x2d) {
227
- consume(3);
228
- return new CDOToken();
229
- } else {
230
- return new DelimToken(code);
231
- }
232
- } else if (code === 0x40) {
233
- if (wouldStartAnIdentifier(next(1), next(2), next(3))) return new AtKeywordToken(consumeAName());else return new DelimToken(code);
234
- } else if (code === 0x5b) {
235
- return new OpenSquareToken();
236
- } else if (code === 0x5c) {
237
- if (startsWithAValidEscape()) {
238
- reconsume();
239
- return consumeAnIdentlikeToken();
240
- } else {
241
- parseerror();
242
- return new DelimToken(code);
243
- }
244
- } else if (code === 0x5d) {
245
- return new CloseSquareToken();
246
- } else if (code === 0x5e) {
247
- if (next() === 0x3d) {
248
- consume();
249
- return new PrefixMatchToken();
250
- } else {
251
- return new DelimToken(code);
252
- }
253
- } else if (code === 0x7b) {
254
- return new OpenCurlyToken();
255
- } else if (code === 0x7c) {
256
- if (next() === 0x3d) {
257
- consume();
258
- return new DashMatchToken();
259
- } else if (next() === 0x7c) {
260
- consume();
261
- return new ColumnToken();
262
- } else {
263
- return new DelimToken(code);
264
- }
265
- } else if (code === 0x7d) {
266
- return new CloseCurlyToken();
267
- } else if (code === 0x7e) {
268
- if (next() === 0x3d) {
269
- consume();
270
- return new IncludeMatchToken();
271
- } else {
272
- return new DelimToken(code);
273
- }
274
- } else if (digit(code)) {
275
- reconsume();
276
- return consumeANumericToken();
277
- } else if (namestartchar(code)) {
278
- reconsume();
279
- return consumeAnIdentlikeToken();
280
- } else if (eof()) {
281
- return new EOFToken();
282
- } else {
283
- return new DelimToken(code);
284
- }
285
- };
286
- const consumeComments = function () {
287
- while (next(1) === 0x2f && next(2) === 0x2a) {
288
- consume(2);
289
- while (true) {
290
- consume();
291
- if (code === 0x2a && next() === 0x2f) {
292
- consume();
293
- break;
294
- } else if (eof()) {
295
- parseerror();
296
- return;
297
- }
298
- }
299
- }
300
- };
301
- const consumeANumericToken = function () {
302
- const num = consumeANumber();
303
- if (wouldStartAnIdentifier(next(1), next(2), next(3))) {
304
- const token = new DimensionToken();
305
- token.value = num.value;
306
- token.repr = num.repr;
307
- token.type = num.type;
308
- token.unit = consumeAName();
309
- return token;
310
- } else if (next() === 0x25) {
311
- consume();
312
- const token = new PercentageToken();
313
- token.value = num.value;
314
- token.repr = num.repr;
315
- return token;
316
- } else {
317
- const token = new NumberToken();
318
- token.value = num.value;
319
- token.repr = num.repr;
320
- token.type = num.type;
321
- return token;
322
- }
323
- };
324
- const consumeAnIdentlikeToken = function () {
325
- const str = consumeAName();
326
- if (str.toLowerCase() === 'url' && next() === 0x28) {
327
- consume();
328
- while (whitespace(next(1)) && whitespace(next(2))) consume();
329
- if (next() === 0x22 || next() === 0x27) return new FunctionToken(str);else if (whitespace(next()) && (next(2) === 0x22 || next(2) === 0x27)) return new FunctionToken(str);else return consumeAURLToken();
330
- } else if (next() === 0x28) {
331
- consume();
332
- return new FunctionToken(str);
333
- } else {
334
- return new IdentToken(str);
335
- }
336
- };
337
- const consumeAStringToken = function (endingCodePoint) {
338
- if (endingCodePoint === undefined) endingCodePoint = code;
339
- let string = '';
340
- while (consume()) {
341
- if (code === endingCodePoint || eof()) {
342
- return new StringToken(string);
343
- } else if (newline(code)) {
344
- parseerror();
345
- reconsume();
346
- return new BadStringToken();
347
- } else if (code === 0x5c) {
348
- if (eof(next())) donothing();else if (newline(next())) consume();else string += stringFromCode(consumeEscape());
349
- } else {
350
- string += stringFromCode(code);
351
- }
352
- }
353
- throw new Error('Internal error');
354
- };
355
- const consumeAURLToken = function () {
356
- const token = new URLToken('');
357
- while (whitespace(next())) consume();
358
- if (eof(next())) return token;
359
- while (consume()) {
360
- if (code === 0x29 || eof()) {
361
- return token;
362
- } else if (whitespace(code)) {
363
- while (whitespace(next())) consume();
364
- if (next() === 0x29 || eof(next())) {
365
- consume();
366
- return token;
367
- } else {
368
- consumeTheRemnantsOfABadURL();
369
- return new BadURLToken();
370
- }
371
- } else if (code === 0x22 || code === 0x27 || code === 0x28 || nonprintable(code)) {
372
- parseerror();
373
- consumeTheRemnantsOfABadURL();
374
- return new BadURLToken();
375
- } else if (code === 0x5c) {
376
- if (startsWithAValidEscape()) {
377
- token.value += stringFromCode(consumeEscape());
378
- } else {
379
- parseerror();
380
- consumeTheRemnantsOfABadURL();
381
- return new BadURLToken();
382
- }
383
- } else {
384
- token.value += stringFromCode(code);
385
- }
386
- }
387
- throw new Error('Internal error');
388
- };
389
- const consumeEscape = function () {
390
- // Assume the current character is the \
391
- // and the next code point is not a newline.
392
- consume();
393
- if (hexdigit(code)) {
394
- // Consume 1-6 hex digits
395
- const digits = [code];
396
- for (let total = 0; total < 5; total++) {
397
- if (hexdigit(next())) {
398
- consume();
399
- digits.push(code);
400
- } else {
401
- break;
402
- }
403
- }
404
- if (whitespace(next())) consume();
405
- let value = parseInt(digits.map(function (x) {
406
- return String.fromCharCode(x);
407
- }).join(''), 16);
408
- if (value > maximumallowedcodepoint) value = 0xfffd;
409
- return value;
410
- } else if (eof()) {
411
- return 0xfffd;
412
- } else {
413
- return code;
414
- }
415
- };
416
- const areAValidEscape = function (c1, c2) {
417
- if (c1 !== 0x5c) return false;
418
- if (newline(c2)) return false;
419
- return true;
420
- };
421
- const startsWithAValidEscape = function () {
422
- return areAValidEscape(code, next());
423
- };
424
- const wouldStartAnIdentifier = function (c1, c2, c3) {
425
- if (c1 === 0x2d) return namestartchar(c2) || c2 === 0x2d || areAValidEscape(c2, c3);else if (namestartchar(c1)) return true;else if (c1 === 0x5c) return areAValidEscape(c1, c2);else return false;
426
- };
427
- const startsWithAnIdentifier = function () {
428
- return wouldStartAnIdentifier(code, next(1), next(2));
429
- };
430
- const wouldStartANumber = function (c1, c2, c3) {
431
- if (c1 === 0x2b || c1 === 0x2d) {
432
- if (digit(c2)) return true;
433
- if (c2 === 0x2e && digit(c3)) return true;
434
- return false;
435
- } else if (c1 === 0x2e) {
436
- if (digit(c2)) return true;
437
- return false;
438
- } else if (digit(c1)) {
439
- return true;
440
- } else {
441
- return false;
442
- }
443
- };
444
- const startsWithANumber = function () {
445
- return wouldStartANumber(code, next(1), next(2));
446
- };
447
- const consumeAName = function () {
448
- let result = '';
449
- while (consume()) {
450
- if (namechar(code)) {
451
- result += stringFromCode(code);
452
- } else if (startsWithAValidEscape()) {
453
- result += stringFromCode(consumeEscape());
454
- } else {
455
- reconsume();
456
- return result;
457
- }
458
- }
459
- throw new Error('Internal parse error');
460
- };
461
- const consumeANumber = function () {
462
- let repr = '';
463
- let type = 'integer';
464
- if (next() === 0x2b || next() === 0x2d) {
465
- consume();
466
- repr += stringFromCode(code);
467
- }
468
- while (digit(next())) {
469
- consume();
470
- repr += stringFromCode(code);
471
- }
472
- if (next(1) === 0x2e && digit(next(2))) {
473
- consume();
474
- repr += stringFromCode(code);
475
- consume();
476
- repr += stringFromCode(code);
477
- type = 'number';
478
- while (digit(next())) {
479
- consume();
480
- repr += stringFromCode(code);
481
- }
482
- }
483
- const c1 = next(1),
484
- c2 = next(2),
485
- c3 = next(3);
486
- if ((c1 === 0x45 || c1 === 0x65) && digit(c2)) {
487
- consume();
488
- repr += stringFromCode(code);
489
- consume();
490
- repr += stringFromCode(code);
491
- type = 'number';
492
- while (digit(next())) {
493
- consume();
494
- repr += stringFromCode(code);
495
- }
496
- } else if ((c1 === 0x45 || c1 === 0x65) && (c2 === 0x2b || c2 === 0x2d) && digit(c3)) {
497
- consume();
498
- repr += stringFromCode(code);
499
- consume();
500
- repr += stringFromCode(code);
501
- consume();
502
- repr += stringFromCode(code);
503
- type = 'number';
504
- while (digit(next())) {
505
- consume();
506
- repr += stringFromCode(code);
507
- }
508
- }
509
- const value = convertAStringToANumber(repr);
510
- return {
511
- type: type,
512
- value: value,
513
- repr: repr
514
- };
515
- };
516
- const convertAStringToANumber = function (string) {
517
- // CSS's number rules are identical to JS, afaik.
518
- return +string;
519
- };
520
- const consumeTheRemnantsOfABadURL = function () {
521
- while (consume()) {
522
- if (code === 0x29 || eof()) {
523
- return;
524
- } else if (startsWithAValidEscape()) {
525
- consumeEscape();
526
- donothing();
527
- } else {
528
- donothing();
529
- }
530
- }
531
- };
532
- let iterationCount = 0;
533
- while (!eof(next())) {
534
- tokens.push(consumeAToken());
535
- iterationCount++;
536
- if (iterationCount > str.length * 2) throw new Error("I'm infinite-looping!");
537
- }
538
- return tokens;
539
- }
540
- class CSSParserToken {
541
- constructor() {
542
- this.tokenType = '';
543
- this.value = void 0;
544
- }
545
- toJSON() {
546
- return {
547
- token: this.tokenType
548
- };
549
- }
550
- toString() {
551
- return this.tokenType;
552
- }
553
- toSource() {
554
- return '' + this;
555
- }
556
- }
557
- exports.CSSParserToken = CSSParserToken;
558
- class BadStringToken extends CSSParserToken {
559
- constructor(...args) {
560
- super(...args);
561
- this.tokenType = 'BADSTRING';
562
- }
563
- }
564
- exports.BadStringToken = BadStringToken;
565
- class BadURLToken extends CSSParserToken {
566
- constructor(...args) {
567
- super(...args);
568
- this.tokenType = 'BADURL';
569
- }
570
- }
571
- exports.BadURLToken = BadURLToken;
572
- class WhitespaceToken extends CSSParserToken {
573
- constructor(...args) {
574
- super(...args);
575
- this.tokenType = 'WHITESPACE';
576
- }
577
- toString() {
578
- return 'WS';
579
- }
580
- toSource() {
581
- return ' ';
582
- }
583
- }
584
- exports.WhitespaceToken = WhitespaceToken;
585
- class CDOToken extends CSSParserToken {
586
- constructor(...args) {
587
- super(...args);
588
- this.tokenType = 'CDO';
589
- }
590
- toSource() {
591
- return '<!--';
592
- }
593
- }
594
- exports.CDOToken = CDOToken;
595
- class CDCToken extends CSSParserToken {
596
- constructor(...args) {
597
- super(...args);
598
- this.tokenType = 'CDC';
599
- }
600
- toSource() {
601
- return '-->';
602
- }
603
- }
604
- exports.CDCToken = CDCToken;
605
- class ColonToken extends CSSParserToken {
606
- constructor(...args) {
607
- super(...args);
608
- this.tokenType = ':';
609
- }
610
- }
611
- exports.ColonToken = ColonToken;
612
- class SemicolonToken extends CSSParserToken {
613
- constructor(...args) {
614
- super(...args);
615
- this.tokenType = ';';
616
- }
617
- }
618
- exports.SemicolonToken = SemicolonToken;
619
- class CommaToken extends CSSParserToken {
620
- constructor(...args) {
621
- super(...args);
622
- this.tokenType = ',';
623
- }
624
- }
625
- exports.CommaToken = CommaToken;
626
- class GroupingToken extends CSSParserToken {
627
- constructor(...args) {
628
- super(...args);
629
- this.value = '';
630
- this.mirror = '';
631
- }
632
- }
633
- exports.GroupingToken = GroupingToken;
634
- class OpenCurlyToken extends GroupingToken {
635
- constructor() {
636
- super();
637
- this.tokenType = '{';
638
- this.value = '{';
639
- this.mirror = '}';
640
- }
641
- }
642
- exports.OpenCurlyToken = OpenCurlyToken;
643
- class CloseCurlyToken extends GroupingToken {
644
- constructor() {
645
- super();
646
- this.tokenType = '}';
647
- this.value = '}';
648
- this.mirror = '{';
649
- }
650
- }
651
- exports.CloseCurlyToken = CloseCurlyToken;
652
- class OpenSquareToken extends GroupingToken {
653
- constructor() {
654
- super();
655
- this.tokenType = '[';
656
- this.value = '[';
657
- this.mirror = ']';
658
- }
659
- }
660
- exports.OpenSquareToken = OpenSquareToken;
661
- class CloseSquareToken extends GroupingToken {
662
- constructor() {
663
- super();
664
- this.tokenType = ']';
665
- this.value = ']';
666
- this.mirror = '[';
667
- }
668
- }
669
- exports.CloseSquareToken = CloseSquareToken;
670
- class OpenParenToken extends GroupingToken {
671
- constructor() {
672
- super();
673
- this.tokenType = '(';
674
- this.value = '(';
675
- this.mirror = ')';
676
- }
677
- }
678
- exports.OpenParenToken = OpenParenToken;
679
- class CloseParenToken extends GroupingToken {
680
- constructor() {
681
- super();
682
- this.tokenType = ')';
683
- this.value = ')';
684
- this.mirror = '(';
685
- }
686
- }
687
- exports.CloseParenToken = CloseParenToken;
688
- class IncludeMatchToken extends CSSParserToken {
689
- constructor(...args) {
690
- super(...args);
691
- this.tokenType = '~=';
692
- }
693
- }
694
- exports.IncludeMatchToken = IncludeMatchToken;
695
- class DashMatchToken extends CSSParserToken {
696
- constructor(...args) {
697
- super(...args);
698
- this.tokenType = '|=';
699
- }
700
- }
701
- exports.DashMatchToken = DashMatchToken;
702
- class PrefixMatchToken extends CSSParserToken {
703
- constructor(...args) {
704
- super(...args);
705
- this.tokenType = '^=';
706
- }
707
- }
708
- exports.PrefixMatchToken = PrefixMatchToken;
709
- class SuffixMatchToken extends CSSParserToken {
710
- constructor(...args) {
711
- super(...args);
712
- this.tokenType = '$=';
713
- }
714
- }
715
- exports.SuffixMatchToken = SuffixMatchToken;
716
- class SubstringMatchToken extends CSSParserToken {
717
- constructor(...args) {
718
- super(...args);
719
- this.tokenType = '*=';
720
- }
721
- }
722
- exports.SubstringMatchToken = SubstringMatchToken;
723
- class ColumnToken extends CSSParserToken {
724
- constructor(...args) {
725
- super(...args);
726
- this.tokenType = '||';
727
- }
728
- }
729
- exports.ColumnToken = ColumnToken;
730
- class EOFToken extends CSSParserToken {
731
- constructor(...args) {
732
- super(...args);
733
- this.tokenType = 'EOF';
734
- }
735
- toSource() {
736
- return '';
737
- }
738
- }
739
- exports.EOFToken = EOFToken;
740
- class DelimToken extends CSSParserToken {
741
- constructor(code) {
742
- super();
743
- this.tokenType = 'DELIM';
744
- this.value = '';
745
- this.value = stringFromCode(code);
746
- }
747
- toString() {
748
- return 'DELIM(' + this.value + ')';
749
- }
750
- toJSON() {
751
- const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);
752
- json.value = this.value;
753
- return json;
754
- }
755
- toSource() {
756
- if (this.value === '\\') return '\\\n';else return this.value;
757
- }
758
- }
759
- exports.DelimToken = DelimToken;
760
- class StringValuedToken extends CSSParserToken {
761
- constructor(...args) {
762
- super(...args);
763
- this.value = '';
764
- }
765
- ASCIIMatch(str) {
766
- return this.value.toLowerCase() === str.toLowerCase();
767
- }
768
- toJSON() {
769
- const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);
770
- json.value = this.value;
771
- return json;
772
- }
773
- }
774
- exports.StringValuedToken = StringValuedToken;
775
- class IdentToken extends StringValuedToken {
776
- constructor(val) {
777
- super();
778
- this.tokenType = 'IDENT';
779
- this.value = val;
780
- }
781
- toString() {
782
- return 'IDENT(' + this.value + ')';
783
- }
784
- toSource() {
785
- return escapeIdent(this.value);
786
- }
787
- }
788
- exports.IdentToken = IdentToken;
789
- class FunctionToken extends StringValuedToken {
790
- constructor(val) {
791
- super();
792
- this.tokenType = 'FUNCTION';
793
- this.mirror = void 0;
794
- this.value = val;
795
- this.mirror = ')';
796
- }
797
- toString() {
798
- return 'FUNCTION(' + this.value + ')';
799
- }
800
- toSource() {
801
- return escapeIdent(this.value) + '(';
802
- }
803
- }
804
- exports.FunctionToken = FunctionToken;
805
- class AtKeywordToken extends StringValuedToken {
806
- constructor(val) {
807
- super();
808
- this.tokenType = 'AT-KEYWORD';
809
- this.value = val;
810
- }
811
- toString() {
812
- return 'AT(' + this.value + ')';
813
- }
814
- toSource() {
815
- return '@' + escapeIdent(this.value);
816
- }
817
- }
818
- exports.AtKeywordToken = AtKeywordToken;
819
- class HashToken extends StringValuedToken {
820
- constructor(val) {
821
- super();
822
- this.tokenType = 'HASH';
823
- this.type = void 0;
824
- this.value = val;
825
- this.type = 'unrestricted';
826
- }
827
- toString() {
828
- return 'HASH(' + this.value + ')';
829
- }
830
- toJSON() {
831
- const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);
832
- json.value = this.value;
833
- json.type = this.type;
834
- return json;
835
- }
836
- toSource() {
837
- if (this.type === 'id') return '#' + escapeIdent(this.value);else return '#' + escapeHash(this.value);
838
- }
839
- }
840
- exports.HashToken = HashToken;
841
- class StringToken extends StringValuedToken {
842
- constructor(val) {
843
- super();
844
- this.tokenType = 'STRING';
845
- this.value = val;
846
- }
847
- toString() {
848
- return '"' + escapeString(this.value) + '"';
849
- }
850
- }
851
- exports.StringToken = StringToken;
852
- class URLToken extends StringValuedToken {
853
- constructor(val) {
854
- super();
855
- this.tokenType = 'URL';
856
- this.value = val;
857
- }
858
- toString() {
859
- return 'URL(' + this.value + ')';
860
- }
861
- toSource() {
862
- return 'url("' + escapeString(this.value) + '")';
863
- }
864
- }
865
- exports.URLToken = URLToken;
866
- class NumberToken extends CSSParserToken {
867
- constructor() {
868
- super();
869
- this.tokenType = 'NUMBER';
870
- this.type = void 0;
871
- this.repr = void 0;
872
- this.type = 'integer';
873
- this.repr = '';
874
- }
875
- toString() {
876
- if (this.type === 'integer') return 'INT(' + this.value + ')';
877
- return 'NUMBER(' + this.value + ')';
878
- }
879
- toJSON() {
880
- const json = super.toJSON();
881
- json.value = this.value;
882
- json.type = this.type;
883
- json.repr = this.repr;
884
- return json;
885
- }
886
- toSource() {
887
- return this.repr;
888
- }
889
- }
890
- exports.NumberToken = NumberToken;
891
- class PercentageToken extends CSSParserToken {
892
- constructor() {
893
- super();
894
- this.tokenType = 'PERCENTAGE';
895
- this.repr = void 0;
896
- this.repr = '';
897
- }
898
- toString() {
899
- return 'PERCENTAGE(' + this.value + ')';
900
- }
901
- toJSON() {
902
- const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);
903
- json.value = this.value;
904
- json.repr = this.repr;
905
- return json;
906
- }
907
- toSource() {
908
- return this.repr + '%';
909
- }
910
- }
911
- exports.PercentageToken = PercentageToken;
912
- class DimensionToken extends CSSParserToken {
913
- constructor() {
914
- super();
915
- this.tokenType = 'DIMENSION';
916
- this.type = void 0;
917
- this.repr = void 0;
918
- this.unit = void 0;
919
- this.type = 'integer';
920
- this.repr = '';
921
- this.unit = '';
922
- }
923
- toString() {
924
- return 'DIM(' + this.value + ',' + this.unit + ')';
925
- }
926
- toJSON() {
927
- const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);
928
- json.value = this.value;
929
- json.type = this.type;
930
- json.repr = this.repr;
931
- json.unit = this.unit;
932
- return json;
933
- }
934
- toSource() {
935
- const source = this.repr;
936
- let unit = escapeIdent(this.unit);
937
- if (unit[0].toLowerCase() === 'e' && (unit[1] === '-' || between(unit.charCodeAt(1), 0x30, 0x39))) {
938
- // Unit is ambiguous with scinot
939
- // Remove the leading "e", replace with escape.
940
- unit = '\\65 ' + unit.slice(1, unit.length);
941
- }
942
- return source + unit;
943
- }
944
- }
945
- exports.DimensionToken = DimensionToken;
946
- function escapeIdent(string) {
947
- string = '' + string;
948
- let result = '';
949
- const firstcode = string.charCodeAt(0);
950
- for (let i = 0; i < string.length; i++) {
951
- const code = string.charCodeAt(i);
952
- if (code === 0x0) throw new InvalidCharacterError('Invalid character: the input contains U+0000.');
953
- if (between(code, 0x1, 0x1f) || code === 0x7f || i === 0 && between(code, 0x30, 0x39) || i === 1 && between(code, 0x30, 0x39) && firstcode === 0x2d) result += '\\' + code.toString(16) + ' ';else if (code >= 0x80 || code === 0x2d || code === 0x5f || between(code, 0x30, 0x39) || between(code, 0x41, 0x5a) || between(code, 0x61, 0x7a)) result += string[i];else result += '\\' + string[i];
954
- }
955
- return result;
956
- }
957
- function escapeHash(string) {
958
- // Escapes the contents of "unrestricted"-type hash tokens.
959
- // Won't preserve the ID-ness of "id"-type hash tokens;
960
- // use escapeIdent() for that.
961
- string = '' + string;
962
- let result = '';
963
- for (let i = 0; i < string.length; i++) {
964
- const code = string.charCodeAt(i);
965
- if (code === 0x0) throw new InvalidCharacterError('Invalid character: the input contains U+0000.');
966
- if (code >= 0x80 || code === 0x2d || code === 0x5f || between(code, 0x30, 0x39) || between(code, 0x41, 0x5a) || between(code, 0x61, 0x7a)) result += string[i];else result += '\\' + code.toString(16) + ' ';
967
- }
968
- return result;
969
- }
970
- function escapeString(string) {
971
- string = '' + string;
972
- let result = '';
973
- for (let i = 0; i < string.length; i++) {
974
- const code = string.charCodeAt(i);
975
- if (code === 0x0) throw new InvalidCharacterError('Invalid character: the input contains U+0000.');
976
- if (between(code, 0x1, 0x1f) || code === 0x7f) result += '\\' + code.toString(16) + ' ';else if (code === 0x22 || code === 0x5c) result += '\\' + string[i];else result += string[i];
977
- }
978
- return result;
979
- }