@tushar-br/desktop 1.0.274 → 1.0.276

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.

Potentially problematic release.


This version of @tushar-br/desktop might be problematic. Click here for more details.

Files changed (241) hide show
  1. package/package.json +1 -1
  2. package/staging_area/desktop/rilvox/node_modules/@next/swc-win32-x64-msvc/README.md +3 -0
  3. package/staging_area/desktop/rilvox/node_modules/@next/swc-win32-x64-msvc/package.json +23 -0
  4. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/LICENSE +21 -0
  5. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/README.md +171 -0
  6. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
  7. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
  8. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
  9. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
  10. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
  11. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
  12. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
  13. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
  14. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
  15. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
  16. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
  17. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
  18. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
  19. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
  20. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
  21. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
  22. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
  23. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
  24. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
  25. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
  26. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.scandir/package.json +44 -0
  27. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/LICENSE +21 -0
  28. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/README.md +126 -0
  29. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
  30. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
  31. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
  32. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/index.js +26 -0
  33. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
  34. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
  35. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
  36. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
  37. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
  38. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
  39. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
  40. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
  41. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.stat/package.json +37 -0
  42. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/LICENSE +21 -0
  43. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/README.md +215 -0
  44. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
  45. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/index.js +34 -0
  46. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
  47. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
  48. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
  49. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
  50. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
  51. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
  52. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
  53. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
  54. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
  55. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
  56. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
  57. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
  58. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
  59. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
  60. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
  61. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
  62. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
  63. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
  64. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
  65. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
  66. package/staging_area/desktop/rilvox/node_modules/@nodelib/fs.walk/package.json +44 -0
  67. package/staging_area/desktop/rilvox/node_modules/@nolyfill/is-core-module/LICENSE +21 -0
  68. package/staging_area/desktop/rilvox/node_modules/@nolyfill/is-core-module/index.d.ts +3 -0
  69. package/staging_area/desktop/rilvox/node_modules/@nolyfill/is-core-module/index.js +1 -0
  70. package/staging_area/desktop/rilvox/node_modules/@nolyfill/is-core-module/package.json +35 -0
  71. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/LICENSE.md +21 -0
  72. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/README.md +72 -0
  73. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/node/cjs/index.js +50 -0
  74. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/node/cjs/runtime/fallback.js +23 -0
  75. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/node/cjs/runtime/hkdf.js +16 -0
  76. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/node/esm/index.js +46 -0
  77. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/node/esm/package.json +1 -0
  78. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/node/esm/runtime/fallback.js +21 -0
  79. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/node/esm/runtime/hkdf.js +14 -0
  80. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/types/index.d.ts +2 -0
  81. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/web/index.js +46 -0
  82. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/web/package.json +1 -0
  83. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/dist/web/runtime/hkdf.js +18 -0
  84. package/staging_area/desktop/rilvox/node_modules/@panva/hkdf/package.json +49 -0
  85. package/staging_area/desktop/rilvox/node_modules/@prisma/client/LICENSE +201 -0
  86. package/staging_area/desktop/rilvox/node_modules/@prisma/client/README.md +27 -0
  87. package/staging_area/desktop/rilvox/node_modules/@prisma/client/default.d.ts +1 -0
  88. package/staging_area/desktop/rilvox/node_modules/@prisma/client/default.js +3 -0
  89. package/staging_area/desktop/rilvox/node_modules/@prisma/client/edge.d.ts +1 -0
  90. package/staging_area/desktop/rilvox/node_modules/@prisma/client/edge.js +4 -0
  91. package/staging_area/desktop/rilvox/node_modules/@prisma/client/extension.d.ts +1 -0
  92. package/staging_area/desktop/rilvox/node_modules/@prisma/client/extension.js +4 -0
  93. package/staging_area/desktop/rilvox/node_modules/@prisma/client/generator-build/index.js +15404 -0
  94. package/staging_area/desktop/rilvox/node_modules/@prisma/client/index-browser.js +3 -0
  95. package/staging_area/desktop/rilvox/node_modules/@prisma/client/index.d.ts +1 -0
  96. package/staging_area/desktop/rilvox/node_modules/@prisma/client/index.js +4 -0
  97. package/staging_area/desktop/rilvox/node_modules/@prisma/client/package.json +281 -0
  98. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/client.d.mts +3317 -0
  99. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/client.d.ts +3317 -0
  100. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/client.js +82 -0
  101. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/client.js.map +7 -0
  102. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/client.mjs +89 -0
  103. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/client.mjs.map +7 -0
  104. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/index-browser.d.mts +87 -0
  105. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/index-browser.d.ts +87 -0
  106. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/index-browser.js +2 -0
  107. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/index-browser.js.map +7 -0
  108. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/index-browser.mjs +2 -0
  109. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/index-browser.mjs.map +7 -0
  110. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.cockroachdb.js +2 -0
  111. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.cockroachdb.mjs +2 -0
  112. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.cockroachdb.wasm-base64.js +2 -0
  113. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.cockroachdb.wasm-base64.mjs +2 -0
  114. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.mysql.js +2 -0
  115. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.mysql.mjs +2 -0
  116. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.mysql.wasm-base64.js +2 -0
  117. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.mysql.wasm-base64.mjs +2 -0
  118. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.postgresql.js +2 -0
  119. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.postgresql.mjs +2 -0
  120. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.js +2 -0
  121. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.mjs +2 -0
  122. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.sqlite.js +2 -0
  123. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.sqlite.mjs +2 -0
  124. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.sqlite.wasm-base64.js +2 -0
  125. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.sqlite.wasm-base64.mjs +2 -0
  126. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.sqlserver.js +2 -0
  127. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.sqlserver.mjs +2 -0
  128. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.sqlserver.wasm-base64.js +2 -0
  129. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/query_compiler_bg.sqlserver.wasm-base64.mjs +2 -0
  130. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/wasm-compiler-edge.d.ts +1 -0
  131. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/wasm-compiler-edge.js +72 -0
  132. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/wasm-compiler-edge.js.map +7 -0
  133. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/wasm-compiler-edge.mjs +72 -0
  134. package/staging_area/desktop/rilvox/node_modules/@prisma/client/runtime/wasm-compiler-edge.mjs.map +7 -0
  135. package/staging_area/desktop/rilvox/node_modules/@prisma/client/scripts/colors.js +176 -0
  136. package/staging_area/desktop/rilvox/node_modules/@prisma/client/scripts/default-index.d.ts +110 -0
  137. package/staging_area/desktop/rilvox/node_modules/@prisma/client/scripts/default-index.js +65 -0
  138. package/staging_area/desktop/rilvox/node_modules/@prisma/client/sql.d.ts +1 -0
  139. package/staging_area/desktop/rilvox/node_modules/@prisma/client/sql.js +4 -0
  140. package/staging_area/desktop/rilvox/node_modules/@prisma/client/sql.mjs +1 -0
  141. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/LICENSE +201 -0
  142. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/README.md +11 -0
  143. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/errors/ErrorWithBatchIndex.d.ts +4 -0
  144. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/errors/PrismaClientInitializationError.d.ts +7 -0
  145. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/errors/PrismaClientKnownRequestError.d.ts +16 -0
  146. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/errors/PrismaClientRustError.d.ts +16 -0
  147. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/errors/PrismaClientRustPanicError.d.ts +5 -0
  148. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/errors/PrismaClientUnknownRequestError.d.ts +12 -0
  149. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/errors/PrismaClientValidationError.d.ts +10 -0
  150. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/errors/index.d.ts +7 -0
  151. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/errors/log.d.ts +50 -0
  152. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/errors/setClassName.d.ts +9 -0
  153. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/index.d.mts +460 -0
  154. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/index.d.ts +460 -0
  155. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/index.js +2552 -0
  156. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/index.mjs +2502 -0
  157. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/dist/nullTypes.d.ts +42 -0
  158. package/staging_area/desktop/rilvox/node_modules/@prisma/client-runtime-utils/package.json +39 -0
  159. package/staging_area/desktop/rilvox/node_modules/@prisma/config/LICENSE +201 -0
  160. package/staging_area/desktop/rilvox/node_modules/@prisma/config/dist/index.d.ts +224 -0
  161. package/staging_area/desktop/rilvox/node_modules/@prisma/config/dist/index.js +696 -0
  162. package/staging_area/desktop/rilvox/node_modules/@prisma/config/package.json +35 -0
  163. package/staging_area/desktop/rilvox/node_modules/@prisma/debug/LICENSE +201 -0
  164. package/staging_area/desktop/rilvox/node_modules/@prisma/debug/README.md +29 -0
  165. package/staging_area/desktop/rilvox/node_modules/@prisma/debug/dist/index.d.mts +40 -0
  166. package/staging_area/desktop/rilvox/node_modules/@prisma/debug/dist/index.d.ts +40 -0
  167. package/staging_area/desktop/rilvox/node_modules/@prisma/debug/dist/index.js +236 -0
  168. package/staging_area/desktop/rilvox/node_modules/@prisma/debug/dist/index.mjs +213 -0
  169. package/staging_area/desktop/rilvox/node_modules/@prisma/debug/dist/util.d.ts +2 -0
  170. package/staging_area/desktop/rilvox/node_modules/@prisma/debug/package.json +47 -0
  171. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/accelerate-UHQZHRYG.js +1 -0
  172. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/chunk-4Q54Y6ZK.js +1 -0
  173. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/chunk-7EOUKLQR.js +3 -0
  174. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/chunk-EPFUMVT3.js +1 -0
  175. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/chunk-LMPFMHCB.js +1 -0
  176. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/chunk-RBVZVBDC.js +1 -0
  177. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/chunk-ZCVJ53EE.js +3 -0
  178. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/daemon.cjs +5 -0
  179. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/daemon.d.cts +17 -0
  180. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/daemon.d.ts +17 -0
  181. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/daemon.js +1 -0
  182. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/db.cjs +1 -0
  183. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/db.d.cts +40 -0
  184. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/db.d.ts +40 -0
  185. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/db.js +1 -0
  186. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/index.cjs +5 -0
  187. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/index.d.cts +33 -0
  188. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/index.d.ts +33 -0
  189. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/index.js +1 -0
  190. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/state.cjs +3 -0
  191. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/state.d.cts +168 -0
  192. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/state.d.ts +168 -0
  193. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/state.js +1 -0
  194. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/dist/utility-YJ4TFSMW.js +1 -0
  195. package/staging_area/desktop/rilvox/node_modules/@prisma/dev/package.json +104 -0
  196. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/LICENSE +201 -0
  197. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/README.md +13 -0
  198. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/dist/index.d.ts +15 -0
  199. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/dist/index.js +67 -0
  200. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/dist/scripts/localinstall.d.ts +1 -0
  201. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/dist/scripts/localinstall.js +2043 -0
  202. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/dist/scripts/postinstall.d.ts +1 -0
  203. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/dist/scripts/postinstall.js +79 -0
  204. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/.cache/prisma/master/0c8ef2ce45c83248ab3df073180d5eda9e8be7a3/windows/schema-engine +0 -0
  205. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/.cache/prisma/master/0c8ef2ce45c83248ab3df073180d5eda9e8be7a3/windows/schema-engine.gz.sha256 +1 -0
  206. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/.cache/prisma/master/0c8ef2ce45c83248ab3df073180d5eda9e8be7a3/windows/schema-engine.sha256 +1 -0
  207. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/LICENSE +201 -0
  208. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/README.md +16 -0
  209. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/binaryTargets.d.ts +2 -0
  210. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/binaryTargets.js +26 -0
  211. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/chunk-2ESYSVXG.js +67 -0
  212. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/chunk-3UEKS5W6.js +15104 -0
  213. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/chunk-6HZWON4S.js +1 -0
  214. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/chunk-7MLUNQIZ.js +62 -0
  215. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/chunk-7PMGXL6S.js +585 -0
  216. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/chunk-FWMN4WME.js +41 -0
  217. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/chunk-GGL63BNP.js +167 -0
  218. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/chunk-IPLRRT6O.js +53 -0
  219. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/chunk-M5T7GI2R.js +429 -0
  220. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/chunk-YVXCXD3A.js +70 -0
  221. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/getPlatform.d.ts +105 -0
  222. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/getPlatform.js +38 -0
  223. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/index.d.ts +5 -0
  224. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/index.js +41 -0
  225. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/link.d.ts +1 -0
  226. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/link.js +26 -0
  227. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/logger.d.ts +8 -0
  228. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/logger.js +29 -0
  229. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/magic-string.es-3WRPFX2A.js +1315 -0
  230. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/test-utils/binaryTargetRegex.d.ts +8 -0
  231. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/test-utils/binaryTargetRegex.js +27 -0
  232. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/test-utils/index.d.ts +1 -0
  233. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/test-utils/index.js +30 -0
  234. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/test-utils/jestContext.d.ts +122 -0
  235. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/test-utils/jestContext.js +29 -0
  236. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/test-utils/jestSnapshotSerializer.js +151 -0
  237. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/test-utils/vitestContext.d.ts +123 -0
  238. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/dist/test-utils/vitestContext.js +17621 -0
  239. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/node_modules/@prisma/get-platform/package.json +48 -0
  240. package/staging_area/desktop/rilvox/node_modules/@prisma/engines/package.json +41 -0
  241. package/staging_area/desktop/rilvox/node_modules/@next/swc-win32-x64-msvc/next-swc.win32-x64-msvc.node.ts_part_1 +0 -0
@@ -0,0 +1,1315 @@
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 magic_string_es_3WRPFX2A_exports = {};
20
+ __export(magic_string_es_3WRPFX2A_exports, {
21
+ Bundle: () => Bundle,
22
+ SourceMap: () => SourceMap,
23
+ default: () => MagicString
24
+ });
25
+ module.exports = __toCommonJS(magic_string_es_3WRPFX2A_exports);
26
+ var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
27
+ var comma = ",".charCodeAt(0);
28
+ var semicolon = ";".charCodeAt(0);
29
+ var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
30
+ var intToChar = new Uint8Array(64);
31
+ var charToInt = new Uint8Array(128);
32
+ for (let i = 0; i < chars.length; i++) {
33
+ const c = chars.charCodeAt(i);
34
+ intToChar[i] = c;
35
+ charToInt[c] = i;
36
+ }
37
+ function encodeInteger(builder, num, relative) {
38
+ let delta = num - relative;
39
+ delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
40
+ do {
41
+ let clamped = delta & 31;
42
+ delta >>>= 5;
43
+ if (delta > 0)
44
+ clamped |= 32;
45
+ builder.write(intToChar[clamped]);
46
+ } while (delta > 0);
47
+ return num;
48
+ }
49
+ var bufLength = 1024 * 16;
50
+ var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
51
+ decode(buf) {
52
+ const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
53
+ return out.toString();
54
+ }
55
+ } : {
56
+ decode(buf) {
57
+ let out = "";
58
+ for (let i = 0; i < buf.length; i++) {
59
+ out += String.fromCharCode(buf[i]);
60
+ }
61
+ return out;
62
+ }
63
+ };
64
+ var StringWriter = class {
65
+ constructor() {
66
+ this.pos = 0;
67
+ this.out = "";
68
+ this.buffer = new Uint8Array(bufLength);
69
+ }
70
+ write(v) {
71
+ const { buffer } = this;
72
+ buffer[this.pos++] = v;
73
+ if (this.pos === bufLength) {
74
+ this.out += td.decode(buffer);
75
+ this.pos = 0;
76
+ }
77
+ }
78
+ flush() {
79
+ const { buffer, out, pos } = this;
80
+ return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
81
+ }
82
+ };
83
+ function encode(decoded) {
84
+ const writer = new StringWriter();
85
+ let sourcesIndex = 0;
86
+ let sourceLine = 0;
87
+ let sourceColumn = 0;
88
+ let namesIndex = 0;
89
+ for (let i = 0; i < decoded.length; i++) {
90
+ const line = decoded[i];
91
+ if (i > 0)
92
+ writer.write(semicolon);
93
+ if (line.length === 0)
94
+ continue;
95
+ let genColumn = 0;
96
+ for (let j = 0; j < line.length; j++) {
97
+ const segment = line[j];
98
+ if (j > 0)
99
+ writer.write(comma);
100
+ genColumn = encodeInteger(writer, segment[0], genColumn);
101
+ if (segment.length === 1)
102
+ continue;
103
+ sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
104
+ sourceLine = encodeInteger(writer, segment[2], sourceLine);
105
+ sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
106
+ if (segment.length === 4)
107
+ continue;
108
+ namesIndex = encodeInteger(writer, segment[4], namesIndex);
109
+ }
110
+ }
111
+ return writer.flush();
112
+ }
113
+ var BitSet = class _BitSet {
114
+ constructor(arg) {
115
+ this.bits = arg instanceof _BitSet ? arg.bits.slice() : [];
116
+ }
117
+ add(n2) {
118
+ this.bits[n2 >> 5] |= 1 << (n2 & 31);
119
+ }
120
+ has(n2) {
121
+ return !!(this.bits[n2 >> 5] & 1 << (n2 & 31));
122
+ }
123
+ };
124
+ var Chunk = class _Chunk {
125
+ constructor(start, end, content) {
126
+ this.start = start;
127
+ this.end = end;
128
+ this.original = content;
129
+ this.intro = "";
130
+ this.outro = "";
131
+ this.content = content;
132
+ this.storeName = false;
133
+ this.edited = false;
134
+ {
135
+ this.previous = null;
136
+ this.next = null;
137
+ }
138
+ }
139
+ appendLeft(content) {
140
+ this.outro += content;
141
+ }
142
+ appendRight(content) {
143
+ this.intro = this.intro + content;
144
+ }
145
+ clone() {
146
+ const chunk = new _Chunk(this.start, this.end, this.original);
147
+ chunk.intro = this.intro;
148
+ chunk.outro = this.outro;
149
+ chunk.content = this.content;
150
+ chunk.storeName = this.storeName;
151
+ chunk.edited = this.edited;
152
+ return chunk;
153
+ }
154
+ contains(index) {
155
+ return this.start < index && index < this.end;
156
+ }
157
+ eachNext(fn) {
158
+ let chunk = this;
159
+ while (chunk) {
160
+ fn(chunk);
161
+ chunk = chunk.next;
162
+ }
163
+ }
164
+ eachPrevious(fn) {
165
+ let chunk = this;
166
+ while (chunk) {
167
+ fn(chunk);
168
+ chunk = chunk.previous;
169
+ }
170
+ }
171
+ edit(content, storeName, contentOnly) {
172
+ this.content = content;
173
+ if (!contentOnly) {
174
+ this.intro = "";
175
+ this.outro = "";
176
+ }
177
+ this.storeName = storeName;
178
+ this.edited = true;
179
+ return this;
180
+ }
181
+ prependLeft(content) {
182
+ this.outro = content + this.outro;
183
+ }
184
+ prependRight(content) {
185
+ this.intro = content + this.intro;
186
+ }
187
+ reset() {
188
+ this.intro = "";
189
+ this.outro = "";
190
+ if (this.edited) {
191
+ this.content = this.original;
192
+ this.storeName = false;
193
+ this.edited = false;
194
+ }
195
+ }
196
+ split(index) {
197
+ const sliceIndex = index - this.start;
198
+ const originalBefore = this.original.slice(0, sliceIndex);
199
+ const originalAfter = this.original.slice(sliceIndex);
200
+ this.original = originalBefore;
201
+ const newChunk = new _Chunk(index, this.end, originalAfter);
202
+ newChunk.outro = this.outro;
203
+ this.outro = "";
204
+ this.end = index;
205
+ if (this.edited) {
206
+ newChunk.edit("", false);
207
+ this.content = "";
208
+ } else {
209
+ this.content = originalBefore;
210
+ }
211
+ newChunk.next = this.next;
212
+ if (newChunk.next) newChunk.next.previous = newChunk;
213
+ newChunk.previous = this;
214
+ this.next = newChunk;
215
+ return newChunk;
216
+ }
217
+ toString() {
218
+ return this.intro + this.content + this.outro;
219
+ }
220
+ trimEnd(rx) {
221
+ this.outro = this.outro.replace(rx, "");
222
+ if (this.outro.length) return true;
223
+ const trimmed = this.content.replace(rx, "");
224
+ if (trimmed.length) {
225
+ if (trimmed !== this.content) {
226
+ this.split(this.start + trimmed.length).edit("", void 0, true);
227
+ if (this.edited) {
228
+ this.edit(trimmed, this.storeName, true);
229
+ }
230
+ }
231
+ return true;
232
+ } else {
233
+ this.edit("", void 0, true);
234
+ this.intro = this.intro.replace(rx, "");
235
+ if (this.intro.length) return true;
236
+ }
237
+ }
238
+ trimStart(rx) {
239
+ this.intro = this.intro.replace(rx, "");
240
+ if (this.intro.length) return true;
241
+ const trimmed = this.content.replace(rx, "");
242
+ if (trimmed.length) {
243
+ if (trimmed !== this.content) {
244
+ const newChunk = this.split(this.end - trimmed.length);
245
+ if (this.edited) {
246
+ newChunk.edit(trimmed, this.storeName, true);
247
+ }
248
+ this.edit("", void 0, true);
249
+ }
250
+ return true;
251
+ } else {
252
+ this.edit("", void 0, true);
253
+ this.outro = this.outro.replace(rx, "");
254
+ if (this.outro.length) return true;
255
+ }
256
+ }
257
+ };
258
+ function getBtoa() {
259
+ if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function") {
260
+ return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
261
+ } else if (typeof Buffer === "function") {
262
+ return (str) => Buffer.from(str, "utf-8").toString("base64");
263
+ } else {
264
+ return () => {
265
+ throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
266
+ };
267
+ }
268
+ }
269
+ var btoa = /* @__PURE__ */ getBtoa();
270
+ var SourceMap = class {
271
+ constructor(properties) {
272
+ this.version = 3;
273
+ this.file = properties.file;
274
+ this.sources = properties.sources;
275
+ this.sourcesContent = properties.sourcesContent;
276
+ this.names = properties.names;
277
+ this.mappings = encode(properties.mappings);
278
+ if (typeof properties.x_google_ignoreList !== "undefined") {
279
+ this.x_google_ignoreList = properties.x_google_ignoreList;
280
+ }
281
+ if (typeof properties.debugId !== "undefined") {
282
+ this.debugId = properties.debugId;
283
+ }
284
+ }
285
+ toString() {
286
+ return JSON.stringify(this);
287
+ }
288
+ toUrl() {
289
+ return "data:application/json;charset=utf-8;base64," + btoa(this.toString());
290
+ }
291
+ };
292
+ function guessIndent(code) {
293
+ const lines = code.split("\n");
294
+ const tabbed = lines.filter((line) => /^\t+/.test(line));
295
+ const spaced = lines.filter((line) => /^ {2,}/.test(line));
296
+ if (tabbed.length === 0 && spaced.length === 0) {
297
+ return null;
298
+ }
299
+ if (tabbed.length >= spaced.length) {
300
+ return " ";
301
+ }
302
+ const min = spaced.reduce((previous, current) => {
303
+ const numSpaces = /^ +/.exec(current)[0].length;
304
+ return Math.min(numSpaces, previous);
305
+ }, Infinity);
306
+ return new Array(min + 1).join(" ");
307
+ }
308
+ function getRelativePath(from, to) {
309
+ const fromParts = from.split(/[/\\]/);
310
+ const toParts = to.split(/[/\\]/);
311
+ fromParts.pop();
312
+ while (fromParts[0] === toParts[0]) {
313
+ fromParts.shift();
314
+ toParts.shift();
315
+ }
316
+ if (fromParts.length) {
317
+ let i = fromParts.length;
318
+ while (i--) fromParts[i] = "..";
319
+ }
320
+ return fromParts.concat(toParts).join("/");
321
+ }
322
+ var toString = Object.prototype.toString;
323
+ function isObject(thing) {
324
+ return toString.call(thing) === "[object Object]";
325
+ }
326
+ function getLocator(source) {
327
+ const originalLines = source.split("\n");
328
+ const lineOffsets = [];
329
+ for (let i = 0, pos = 0; i < originalLines.length; i++) {
330
+ lineOffsets.push(pos);
331
+ pos += originalLines[i].length + 1;
332
+ }
333
+ return function locate(index) {
334
+ let i = 0;
335
+ let j = lineOffsets.length;
336
+ while (i < j) {
337
+ const m = i + j >> 1;
338
+ if (index < lineOffsets[m]) {
339
+ j = m;
340
+ } else {
341
+ i = m + 1;
342
+ }
343
+ }
344
+ const line = i - 1;
345
+ const column = index - lineOffsets[line];
346
+ return { line, column };
347
+ };
348
+ }
349
+ var wordRegex = /\w/;
350
+ var Mappings = class {
351
+ constructor(hires) {
352
+ this.hires = hires;
353
+ this.generatedCodeLine = 0;
354
+ this.generatedCodeColumn = 0;
355
+ this.raw = [];
356
+ this.rawSegments = this.raw[this.generatedCodeLine] = [];
357
+ this.pending = null;
358
+ }
359
+ addEdit(sourceIndex, content, loc, nameIndex) {
360
+ if (content.length) {
361
+ const contentLengthMinusOne = content.length - 1;
362
+ let contentLineEnd = content.indexOf("\n", 0);
363
+ let previousContentLineEnd = -1;
364
+ while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {
365
+ const segment2 = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
366
+ if (nameIndex >= 0) {
367
+ segment2.push(nameIndex);
368
+ }
369
+ this.rawSegments.push(segment2);
370
+ this.generatedCodeLine += 1;
371
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
372
+ this.generatedCodeColumn = 0;
373
+ previousContentLineEnd = contentLineEnd;
374
+ contentLineEnd = content.indexOf("\n", contentLineEnd + 1);
375
+ }
376
+ const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
377
+ if (nameIndex >= 0) {
378
+ segment.push(nameIndex);
379
+ }
380
+ this.rawSegments.push(segment);
381
+ this.advance(content.slice(previousContentLineEnd + 1));
382
+ } else if (this.pending) {
383
+ this.rawSegments.push(this.pending);
384
+ this.advance(content);
385
+ }
386
+ this.pending = null;
387
+ }
388
+ addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {
389
+ let originalCharIndex = chunk.start;
390
+ let first = true;
391
+ let charInHiresBoundary = false;
392
+ while (originalCharIndex < chunk.end) {
393
+ if (original[originalCharIndex] === "\n") {
394
+ loc.line += 1;
395
+ loc.column = 0;
396
+ this.generatedCodeLine += 1;
397
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
398
+ this.generatedCodeColumn = 0;
399
+ first = true;
400
+ charInHiresBoundary = false;
401
+ } else {
402
+ if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
403
+ const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
404
+ if (this.hires === "boundary") {
405
+ if (wordRegex.test(original[originalCharIndex])) {
406
+ if (!charInHiresBoundary) {
407
+ this.rawSegments.push(segment);
408
+ charInHiresBoundary = true;
409
+ }
410
+ } else {
411
+ this.rawSegments.push(segment);
412
+ charInHiresBoundary = false;
413
+ }
414
+ } else {
415
+ this.rawSegments.push(segment);
416
+ }
417
+ }
418
+ loc.column += 1;
419
+ this.generatedCodeColumn += 1;
420
+ first = false;
421
+ }
422
+ originalCharIndex += 1;
423
+ }
424
+ this.pending = null;
425
+ }
426
+ advance(str) {
427
+ if (!str) return;
428
+ const lines = str.split("\n");
429
+ if (lines.length > 1) {
430
+ for (let i = 0; i < lines.length - 1; i++) {
431
+ this.generatedCodeLine++;
432
+ this.raw[this.generatedCodeLine] = this.rawSegments = [];
433
+ }
434
+ this.generatedCodeColumn = 0;
435
+ }
436
+ this.generatedCodeColumn += lines[lines.length - 1].length;
437
+ }
438
+ };
439
+ var n = "\n";
440
+ var warned = {
441
+ insertLeft: false,
442
+ insertRight: false,
443
+ storeName: false
444
+ };
445
+ var MagicString = class _MagicString {
446
+ constructor(string, options = {}) {
447
+ const chunk = new Chunk(0, string.length, string);
448
+ Object.defineProperties(this, {
449
+ original: { writable: true, value: string },
450
+ outro: { writable: true, value: "" },
451
+ intro: { writable: true, value: "" },
452
+ firstChunk: { writable: true, value: chunk },
453
+ lastChunk: { writable: true, value: chunk },
454
+ lastSearchedChunk: { writable: true, value: chunk },
455
+ byStart: { writable: true, value: {} },
456
+ byEnd: { writable: true, value: {} },
457
+ filename: { writable: true, value: options.filename },
458
+ indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
459
+ sourcemapLocations: { writable: true, value: new BitSet() },
460
+ storedNames: { writable: true, value: {} },
461
+ indentStr: { writable: true, value: void 0 },
462
+ ignoreList: { writable: true, value: options.ignoreList },
463
+ offset: { writable: true, value: options.offset || 0 }
464
+ });
465
+ this.byStart[0] = chunk;
466
+ this.byEnd[string.length] = chunk;
467
+ }
468
+ addSourcemapLocation(char) {
469
+ this.sourcemapLocations.add(char);
470
+ }
471
+ append(content) {
472
+ if (typeof content !== "string") throw new TypeError("outro content must be a string");
473
+ this.outro += content;
474
+ return this;
475
+ }
476
+ appendLeft(index, content) {
477
+ index = index + this.offset;
478
+ if (typeof content !== "string") throw new TypeError("inserted content must be a string");
479
+ this._split(index);
480
+ const chunk = this.byEnd[index];
481
+ if (chunk) {
482
+ chunk.appendLeft(content);
483
+ } else {
484
+ this.intro += content;
485
+ }
486
+ return this;
487
+ }
488
+ appendRight(index, content) {
489
+ index = index + this.offset;
490
+ if (typeof content !== "string") throw new TypeError("inserted content must be a string");
491
+ this._split(index);
492
+ const chunk = this.byStart[index];
493
+ if (chunk) {
494
+ chunk.appendRight(content);
495
+ } else {
496
+ this.outro += content;
497
+ }
498
+ return this;
499
+ }
500
+ clone() {
501
+ const cloned = new _MagicString(this.original, { filename: this.filename, offset: this.offset });
502
+ let originalChunk = this.firstChunk;
503
+ let clonedChunk = cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone();
504
+ while (originalChunk) {
505
+ cloned.byStart[clonedChunk.start] = clonedChunk;
506
+ cloned.byEnd[clonedChunk.end] = clonedChunk;
507
+ const nextOriginalChunk = originalChunk.next;
508
+ const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();
509
+ if (nextClonedChunk) {
510
+ clonedChunk.next = nextClonedChunk;
511
+ nextClonedChunk.previous = clonedChunk;
512
+ clonedChunk = nextClonedChunk;
513
+ }
514
+ originalChunk = nextOriginalChunk;
515
+ }
516
+ cloned.lastChunk = clonedChunk;
517
+ if (this.indentExclusionRanges) {
518
+ cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
519
+ }
520
+ cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
521
+ cloned.intro = this.intro;
522
+ cloned.outro = this.outro;
523
+ return cloned;
524
+ }
525
+ generateDecodedMap(options) {
526
+ options = options || {};
527
+ const sourceIndex = 0;
528
+ const names = Object.keys(this.storedNames);
529
+ const mappings = new Mappings(options.hires);
530
+ const locate = getLocator(this.original);
531
+ if (this.intro) {
532
+ mappings.advance(this.intro);
533
+ }
534
+ this.firstChunk.eachNext((chunk) => {
535
+ const loc = locate(chunk.start);
536
+ if (chunk.intro.length) mappings.advance(chunk.intro);
537
+ if (chunk.edited) {
538
+ mappings.addEdit(
539
+ sourceIndex,
540
+ chunk.content,
541
+ loc,
542
+ chunk.storeName ? names.indexOf(chunk.original) : -1
543
+ );
544
+ } else {
545
+ mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);
546
+ }
547
+ if (chunk.outro.length) mappings.advance(chunk.outro);
548
+ });
549
+ return {
550
+ file: options.file ? options.file.split(/[/\\]/).pop() : void 0,
551
+ sources: [
552
+ options.source ? getRelativePath(options.file || "", options.source) : options.file || ""
553
+ ],
554
+ sourcesContent: options.includeContent ? [this.original] : void 0,
555
+ names,
556
+ mappings: mappings.raw,
557
+ x_google_ignoreList: this.ignoreList ? [sourceIndex] : void 0
558
+ };
559
+ }
560
+ generateMap(options) {
561
+ return new SourceMap(this.generateDecodedMap(options));
562
+ }
563
+ _ensureindentStr() {
564
+ if (this.indentStr === void 0) {
565
+ this.indentStr = guessIndent(this.original);
566
+ }
567
+ }
568
+ _getRawIndentString() {
569
+ this._ensureindentStr();
570
+ return this.indentStr;
571
+ }
572
+ getIndentString() {
573
+ this._ensureindentStr();
574
+ return this.indentStr === null ? " " : this.indentStr;
575
+ }
576
+ indent(indentStr, options) {
577
+ const pattern = /^[^\r\n]/gm;
578
+ if (isObject(indentStr)) {
579
+ options = indentStr;
580
+ indentStr = void 0;
581
+ }
582
+ if (indentStr === void 0) {
583
+ this._ensureindentStr();
584
+ indentStr = this.indentStr || " ";
585
+ }
586
+ if (indentStr === "") return this;
587
+ options = options || {};
588
+ const isExcluded = {};
589
+ if (options.exclude) {
590
+ const exclusions = typeof options.exclude[0] === "number" ? [options.exclude] : options.exclude;
591
+ exclusions.forEach((exclusion) => {
592
+ for (let i = exclusion[0]; i < exclusion[1]; i += 1) {
593
+ isExcluded[i] = true;
594
+ }
595
+ });
596
+ }
597
+ let shouldIndentNextCharacter = options.indentStart !== false;
598
+ const replacer = (match) => {
599
+ if (shouldIndentNextCharacter) return `${indentStr}${match}`;
600
+ shouldIndentNextCharacter = true;
601
+ return match;
602
+ };
603
+ this.intro = this.intro.replace(pattern, replacer);
604
+ let charIndex = 0;
605
+ let chunk = this.firstChunk;
606
+ while (chunk) {
607
+ const end = chunk.end;
608
+ if (chunk.edited) {
609
+ if (!isExcluded[charIndex]) {
610
+ chunk.content = chunk.content.replace(pattern, replacer);
611
+ if (chunk.content.length) {
612
+ shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === "\n";
613
+ }
614
+ }
615
+ } else {
616
+ charIndex = chunk.start;
617
+ while (charIndex < end) {
618
+ if (!isExcluded[charIndex]) {
619
+ const char = this.original[charIndex];
620
+ if (char === "\n") {
621
+ shouldIndentNextCharacter = true;
622
+ } else if (char !== "\r" && shouldIndentNextCharacter) {
623
+ shouldIndentNextCharacter = false;
624
+ if (charIndex === chunk.start) {
625
+ chunk.prependRight(indentStr);
626
+ } else {
627
+ this._splitChunk(chunk, charIndex);
628
+ chunk = chunk.next;
629
+ chunk.prependRight(indentStr);
630
+ }
631
+ }
632
+ }
633
+ charIndex += 1;
634
+ }
635
+ }
636
+ charIndex = chunk.end;
637
+ chunk = chunk.next;
638
+ }
639
+ this.outro = this.outro.replace(pattern, replacer);
640
+ return this;
641
+ }
642
+ insert() {
643
+ throw new Error(
644
+ "magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)"
645
+ );
646
+ }
647
+ insertLeft(index, content) {
648
+ if (!warned.insertLeft) {
649
+ console.warn(
650
+ "magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"
651
+ );
652
+ warned.insertLeft = true;
653
+ }
654
+ return this.appendLeft(index, content);
655
+ }
656
+ insertRight(index, content) {
657
+ if (!warned.insertRight) {
658
+ console.warn(
659
+ "magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"
660
+ );
661
+ warned.insertRight = true;
662
+ }
663
+ return this.prependRight(index, content);
664
+ }
665
+ move(start, end, index) {
666
+ start = start + this.offset;
667
+ end = end + this.offset;
668
+ index = index + this.offset;
669
+ if (index >= start && index <= end) throw new Error("Cannot move a selection inside itself");
670
+ this._split(start);
671
+ this._split(end);
672
+ this._split(index);
673
+ const first = this.byStart[start];
674
+ const last = this.byEnd[end];
675
+ const oldLeft = first.previous;
676
+ const oldRight = last.next;
677
+ const newRight = this.byStart[index];
678
+ if (!newRight && last === this.lastChunk) return this;
679
+ const newLeft = newRight ? newRight.previous : this.lastChunk;
680
+ if (oldLeft) oldLeft.next = oldRight;
681
+ if (oldRight) oldRight.previous = oldLeft;
682
+ if (newLeft) newLeft.next = first;
683
+ if (newRight) newRight.previous = last;
684
+ if (!first.previous) this.firstChunk = last.next;
685
+ if (!last.next) {
686
+ this.lastChunk = first.previous;
687
+ this.lastChunk.next = null;
688
+ }
689
+ first.previous = newLeft;
690
+ last.next = newRight || null;
691
+ if (!newLeft) this.firstChunk = first;
692
+ if (!newRight) this.lastChunk = last;
693
+ return this;
694
+ }
695
+ overwrite(start, end, content, options) {
696
+ options = options || {};
697
+ return this.update(start, end, content, { ...options, overwrite: !options.contentOnly });
698
+ }
699
+ update(start, end, content, options) {
700
+ start = start + this.offset;
701
+ end = end + this.offset;
702
+ if (typeof content !== "string") throw new TypeError("replacement content must be a string");
703
+ if (this.original.length !== 0) {
704
+ while (start < 0) start += this.original.length;
705
+ while (end < 0) end += this.original.length;
706
+ }
707
+ if (end > this.original.length) throw new Error("end is out of bounds");
708
+ if (start === end)
709
+ throw new Error(
710
+ "Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead"
711
+ );
712
+ this._split(start);
713
+ this._split(end);
714
+ if (options === true) {
715
+ if (!warned.storeName) {
716
+ console.warn(
717
+ "The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"
718
+ );
719
+ warned.storeName = true;
720
+ }
721
+ options = { storeName: true };
722
+ }
723
+ const storeName = options !== void 0 ? options.storeName : false;
724
+ const overwrite = options !== void 0 ? options.overwrite : false;
725
+ if (storeName) {
726
+ const original = this.original.slice(start, end);
727
+ Object.defineProperty(this.storedNames, original, {
728
+ writable: true,
729
+ value: true,
730
+ enumerable: true
731
+ });
732
+ }
733
+ const first = this.byStart[start];
734
+ const last = this.byEnd[end];
735
+ if (first) {
736
+ let chunk = first;
737
+ while (chunk !== last) {
738
+ if (chunk.next !== this.byStart[chunk.end]) {
739
+ throw new Error("Cannot overwrite across a split point");
740
+ }
741
+ chunk = chunk.next;
742
+ chunk.edit("", false);
743
+ }
744
+ first.edit(content, storeName, !overwrite);
745
+ } else {
746
+ const newChunk = new Chunk(start, end, "").edit(content, storeName);
747
+ last.next = newChunk;
748
+ newChunk.previous = last;
749
+ }
750
+ return this;
751
+ }
752
+ prepend(content) {
753
+ if (typeof content !== "string") throw new TypeError("outro content must be a string");
754
+ this.intro = content + this.intro;
755
+ return this;
756
+ }
757
+ prependLeft(index, content) {
758
+ index = index + this.offset;
759
+ if (typeof content !== "string") throw new TypeError("inserted content must be a string");
760
+ this._split(index);
761
+ const chunk = this.byEnd[index];
762
+ if (chunk) {
763
+ chunk.prependLeft(content);
764
+ } else {
765
+ this.intro = content + this.intro;
766
+ }
767
+ return this;
768
+ }
769
+ prependRight(index, content) {
770
+ index = index + this.offset;
771
+ if (typeof content !== "string") throw new TypeError("inserted content must be a string");
772
+ this._split(index);
773
+ const chunk = this.byStart[index];
774
+ if (chunk) {
775
+ chunk.prependRight(content);
776
+ } else {
777
+ this.outro = content + this.outro;
778
+ }
779
+ return this;
780
+ }
781
+ remove(start, end) {
782
+ start = start + this.offset;
783
+ end = end + this.offset;
784
+ if (this.original.length !== 0) {
785
+ while (start < 0) start += this.original.length;
786
+ while (end < 0) end += this.original.length;
787
+ }
788
+ if (start === end) return this;
789
+ if (start < 0 || end > this.original.length) throw new Error("Character is out of bounds");
790
+ if (start > end) throw new Error("end must be greater than start");
791
+ this._split(start);
792
+ this._split(end);
793
+ let chunk = this.byStart[start];
794
+ while (chunk) {
795
+ chunk.intro = "";
796
+ chunk.outro = "";
797
+ chunk.edit("");
798
+ chunk = end > chunk.end ? this.byStart[chunk.end] : null;
799
+ }
800
+ return this;
801
+ }
802
+ reset(start, end) {
803
+ start = start + this.offset;
804
+ end = end + this.offset;
805
+ if (this.original.length !== 0) {
806
+ while (start < 0) start += this.original.length;
807
+ while (end < 0) end += this.original.length;
808
+ }
809
+ if (start === end) return this;
810
+ if (start < 0 || end > this.original.length) throw new Error("Character is out of bounds");
811
+ if (start > end) throw new Error("end must be greater than start");
812
+ this._split(start);
813
+ this._split(end);
814
+ let chunk = this.byStart[start];
815
+ while (chunk) {
816
+ chunk.reset();
817
+ chunk = end > chunk.end ? this.byStart[chunk.end] : null;
818
+ }
819
+ return this;
820
+ }
821
+ lastChar() {
822
+ if (this.outro.length) return this.outro[this.outro.length - 1];
823
+ let chunk = this.lastChunk;
824
+ do {
825
+ if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];
826
+ if (chunk.content.length) return chunk.content[chunk.content.length - 1];
827
+ if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];
828
+ } while (chunk = chunk.previous);
829
+ if (this.intro.length) return this.intro[this.intro.length - 1];
830
+ return "";
831
+ }
832
+ lastLine() {
833
+ let lineIndex = this.outro.lastIndexOf(n);
834
+ if (lineIndex !== -1) return this.outro.substr(lineIndex + 1);
835
+ let lineStr = this.outro;
836
+ let chunk = this.lastChunk;
837
+ do {
838
+ if (chunk.outro.length > 0) {
839
+ lineIndex = chunk.outro.lastIndexOf(n);
840
+ if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;
841
+ lineStr = chunk.outro + lineStr;
842
+ }
843
+ if (chunk.content.length > 0) {
844
+ lineIndex = chunk.content.lastIndexOf(n);
845
+ if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;
846
+ lineStr = chunk.content + lineStr;
847
+ }
848
+ if (chunk.intro.length > 0) {
849
+ lineIndex = chunk.intro.lastIndexOf(n);
850
+ if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;
851
+ lineStr = chunk.intro + lineStr;
852
+ }
853
+ } while (chunk = chunk.previous);
854
+ lineIndex = this.intro.lastIndexOf(n);
855
+ if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;
856
+ return this.intro + lineStr;
857
+ }
858
+ slice(start = 0, end = this.original.length - this.offset) {
859
+ start = start + this.offset;
860
+ end = end + this.offset;
861
+ if (this.original.length !== 0) {
862
+ while (start < 0) start += this.original.length;
863
+ while (end < 0) end += this.original.length;
864
+ }
865
+ let result = "";
866
+ let chunk = this.firstChunk;
867
+ while (chunk && (chunk.start > start || chunk.end <= start)) {
868
+ if (chunk.start < end && chunk.end >= end) {
869
+ return result;
870
+ }
871
+ chunk = chunk.next;
872
+ }
873
+ if (chunk && chunk.edited && chunk.start !== start)
874
+ throw new Error(`Cannot use replaced character ${start} as slice start anchor.`);
875
+ const startChunk = chunk;
876
+ while (chunk) {
877
+ if (chunk.intro && (startChunk !== chunk || chunk.start === start)) {
878
+ result += chunk.intro;
879
+ }
880
+ const containsEnd = chunk.start < end && chunk.end >= end;
881
+ if (containsEnd && chunk.edited && chunk.end !== end)
882
+ throw new Error(`Cannot use replaced character ${end} as slice end anchor.`);
883
+ const sliceStart = startChunk === chunk ? start - chunk.start : 0;
884
+ const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
885
+ result += chunk.content.slice(sliceStart, sliceEnd);
886
+ if (chunk.outro && (!containsEnd || chunk.end === end)) {
887
+ result += chunk.outro;
888
+ }
889
+ if (containsEnd) {
890
+ break;
891
+ }
892
+ chunk = chunk.next;
893
+ }
894
+ return result;
895
+ }
896
+ // TODO deprecate this? not really very useful
897
+ snip(start, end) {
898
+ const clone = this.clone();
899
+ clone.remove(0, start);
900
+ clone.remove(end, clone.original.length);
901
+ return clone;
902
+ }
903
+ _split(index) {
904
+ if (this.byStart[index] || this.byEnd[index]) return;
905
+ let chunk = this.lastSearchedChunk;
906
+ const searchForward = index > chunk.end;
907
+ while (chunk) {
908
+ if (chunk.contains(index)) return this._splitChunk(chunk, index);
909
+ chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
910
+ }
911
+ }
912
+ _splitChunk(chunk, index) {
913
+ if (chunk.edited && chunk.content.length) {
914
+ const loc = getLocator(this.original)(index);
915
+ throw new Error(
916
+ `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} \u2013 "${chunk.original}")`
917
+ );
918
+ }
919
+ const newChunk = chunk.split(index);
920
+ this.byEnd[index] = chunk;
921
+ this.byStart[index] = newChunk;
922
+ this.byEnd[newChunk.end] = newChunk;
923
+ if (chunk === this.lastChunk) this.lastChunk = newChunk;
924
+ this.lastSearchedChunk = chunk;
925
+ return true;
926
+ }
927
+ toString() {
928
+ let str = this.intro;
929
+ let chunk = this.firstChunk;
930
+ while (chunk) {
931
+ str += chunk.toString();
932
+ chunk = chunk.next;
933
+ }
934
+ return str + this.outro;
935
+ }
936
+ isEmpty() {
937
+ let chunk = this.firstChunk;
938
+ do {
939
+ if (chunk.intro.length && chunk.intro.trim() || chunk.content.length && chunk.content.trim() || chunk.outro.length && chunk.outro.trim())
940
+ return false;
941
+ } while (chunk = chunk.next);
942
+ return true;
943
+ }
944
+ length() {
945
+ let chunk = this.firstChunk;
946
+ let length = 0;
947
+ do {
948
+ length += chunk.intro.length + chunk.content.length + chunk.outro.length;
949
+ } while (chunk = chunk.next);
950
+ return length;
951
+ }
952
+ trimLines() {
953
+ return this.trim("[\\r\\n]");
954
+ }
955
+ trim(charType) {
956
+ return this.trimStart(charType).trimEnd(charType);
957
+ }
958
+ trimEndAborted(charType) {
959
+ const rx = new RegExp((charType || "\\s") + "+$");
960
+ this.outro = this.outro.replace(rx, "");
961
+ if (this.outro.length) return true;
962
+ let chunk = this.lastChunk;
963
+ do {
964
+ const end = chunk.end;
965
+ const aborted = chunk.trimEnd(rx);
966
+ if (chunk.end !== end) {
967
+ if (this.lastChunk === chunk) {
968
+ this.lastChunk = chunk.next;
969
+ }
970
+ this.byEnd[chunk.end] = chunk;
971
+ this.byStart[chunk.next.start] = chunk.next;
972
+ this.byEnd[chunk.next.end] = chunk.next;
973
+ }
974
+ if (aborted) return true;
975
+ chunk = chunk.previous;
976
+ } while (chunk);
977
+ return false;
978
+ }
979
+ trimEnd(charType) {
980
+ this.trimEndAborted(charType);
981
+ return this;
982
+ }
983
+ trimStartAborted(charType) {
984
+ const rx = new RegExp("^" + (charType || "\\s") + "+");
985
+ this.intro = this.intro.replace(rx, "");
986
+ if (this.intro.length) return true;
987
+ let chunk = this.firstChunk;
988
+ do {
989
+ const end = chunk.end;
990
+ const aborted = chunk.trimStart(rx);
991
+ if (chunk.end !== end) {
992
+ if (chunk === this.lastChunk) this.lastChunk = chunk.next;
993
+ this.byEnd[chunk.end] = chunk;
994
+ this.byStart[chunk.next.start] = chunk.next;
995
+ this.byEnd[chunk.next.end] = chunk.next;
996
+ }
997
+ if (aborted) return true;
998
+ chunk = chunk.next;
999
+ } while (chunk);
1000
+ return false;
1001
+ }
1002
+ trimStart(charType) {
1003
+ this.trimStartAborted(charType);
1004
+ return this;
1005
+ }
1006
+ hasChanged() {
1007
+ return this.original !== this.toString();
1008
+ }
1009
+ _replaceRegexp(searchValue, replacement) {
1010
+ function getReplacement(match, str) {
1011
+ if (typeof replacement === "string") {
1012
+ return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => {
1013
+ if (i === "$") return "$";
1014
+ if (i === "&") return match[0];
1015
+ const num = +i;
1016
+ if (num < match.length) return match[+i];
1017
+ return `$${i}`;
1018
+ });
1019
+ } else {
1020
+ return replacement(...match, match.index, str, match.groups);
1021
+ }
1022
+ }
1023
+ function matchAll(re, str) {
1024
+ let match;
1025
+ const matches = [];
1026
+ while (match = re.exec(str)) {
1027
+ matches.push(match);
1028
+ }
1029
+ return matches;
1030
+ }
1031
+ if (searchValue.global) {
1032
+ const matches = matchAll(searchValue, this.original);
1033
+ matches.forEach((match) => {
1034
+ if (match.index != null) {
1035
+ const replacement2 = getReplacement(match, this.original);
1036
+ if (replacement2 !== match[0]) {
1037
+ this.overwrite(match.index, match.index + match[0].length, replacement2);
1038
+ }
1039
+ }
1040
+ });
1041
+ } else {
1042
+ const match = this.original.match(searchValue);
1043
+ if (match && match.index != null) {
1044
+ const replacement2 = getReplacement(match, this.original);
1045
+ if (replacement2 !== match[0]) {
1046
+ this.overwrite(match.index, match.index + match[0].length, replacement2);
1047
+ }
1048
+ }
1049
+ }
1050
+ return this;
1051
+ }
1052
+ _replaceString(string, replacement) {
1053
+ const { original } = this;
1054
+ const index = original.indexOf(string);
1055
+ if (index !== -1) {
1056
+ this.overwrite(index, index + string.length, replacement);
1057
+ }
1058
+ return this;
1059
+ }
1060
+ replace(searchValue, replacement) {
1061
+ if (typeof searchValue === "string") {
1062
+ return this._replaceString(searchValue, replacement);
1063
+ }
1064
+ return this._replaceRegexp(searchValue, replacement);
1065
+ }
1066
+ _replaceAllString(string, replacement) {
1067
+ const { original } = this;
1068
+ const stringLength = string.length;
1069
+ for (let index = original.indexOf(string); index !== -1; index = original.indexOf(string, index + stringLength)) {
1070
+ const previous = original.slice(index, index + stringLength);
1071
+ if (previous !== replacement) this.overwrite(index, index + stringLength, replacement);
1072
+ }
1073
+ return this;
1074
+ }
1075
+ replaceAll(searchValue, replacement) {
1076
+ if (typeof searchValue === "string") {
1077
+ return this._replaceAllString(searchValue, replacement);
1078
+ }
1079
+ if (!searchValue.global) {
1080
+ throw new TypeError(
1081
+ "MagicString.prototype.replaceAll called with a non-global RegExp argument"
1082
+ );
1083
+ }
1084
+ return this._replaceRegexp(searchValue, replacement);
1085
+ }
1086
+ };
1087
+ var hasOwnProp = Object.prototype.hasOwnProperty;
1088
+ var Bundle = class _Bundle {
1089
+ constructor(options = {}) {
1090
+ this.intro = options.intro || "";
1091
+ this.separator = options.separator !== void 0 ? options.separator : "\n";
1092
+ this.sources = [];
1093
+ this.uniqueSources = [];
1094
+ this.uniqueSourceIndexByFilename = {};
1095
+ }
1096
+ addSource(source) {
1097
+ if (source instanceof MagicString) {
1098
+ return this.addSource({
1099
+ content: source,
1100
+ filename: source.filename,
1101
+ separator: this.separator
1102
+ });
1103
+ }
1104
+ if (!isObject(source) || !source.content) {
1105
+ throw new Error(
1106
+ "bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`"
1107
+ );
1108
+ }
1109
+ ["filename", "ignoreList", "indentExclusionRanges", "separator"].forEach((option) => {
1110
+ if (!hasOwnProp.call(source, option)) source[option] = source.content[option];
1111
+ });
1112
+ if (source.separator === void 0) {
1113
+ source.separator = this.separator;
1114
+ }
1115
+ if (source.filename) {
1116
+ if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {
1117
+ this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;
1118
+ this.uniqueSources.push({ filename: source.filename, content: source.content.original });
1119
+ } else {
1120
+ const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];
1121
+ if (source.content.original !== uniqueSource.content) {
1122
+ throw new Error(`Illegal source: same filename (${source.filename}), different contents`);
1123
+ }
1124
+ }
1125
+ }
1126
+ this.sources.push(source);
1127
+ return this;
1128
+ }
1129
+ append(str, options) {
1130
+ this.addSource({
1131
+ content: new MagicString(str),
1132
+ separator: options && options.separator || ""
1133
+ });
1134
+ return this;
1135
+ }
1136
+ clone() {
1137
+ const bundle = new _Bundle({
1138
+ intro: this.intro,
1139
+ separator: this.separator
1140
+ });
1141
+ this.sources.forEach((source) => {
1142
+ bundle.addSource({
1143
+ filename: source.filename,
1144
+ content: source.content.clone(),
1145
+ separator: source.separator
1146
+ });
1147
+ });
1148
+ return bundle;
1149
+ }
1150
+ generateDecodedMap(options = {}) {
1151
+ const names = [];
1152
+ let x_google_ignoreList = void 0;
1153
+ this.sources.forEach((source) => {
1154
+ Object.keys(source.content.storedNames).forEach((name) => {
1155
+ if (!~names.indexOf(name)) names.push(name);
1156
+ });
1157
+ });
1158
+ const mappings = new Mappings(options.hires);
1159
+ if (this.intro) {
1160
+ mappings.advance(this.intro);
1161
+ }
1162
+ this.sources.forEach((source, i) => {
1163
+ if (i > 0) {
1164
+ mappings.advance(this.separator);
1165
+ }
1166
+ const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;
1167
+ const magicString = source.content;
1168
+ const locate = getLocator(magicString.original);
1169
+ if (magicString.intro) {
1170
+ mappings.advance(magicString.intro);
1171
+ }
1172
+ magicString.firstChunk.eachNext((chunk) => {
1173
+ const loc = locate(chunk.start);
1174
+ if (chunk.intro.length) mappings.advance(chunk.intro);
1175
+ if (source.filename) {
1176
+ if (chunk.edited) {
1177
+ mappings.addEdit(
1178
+ sourceIndex,
1179
+ chunk.content,
1180
+ loc,
1181
+ chunk.storeName ? names.indexOf(chunk.original) : -1
1182
+ );
1183
+ } else {
1184
+ mappings.addUneditedChunk(
1185
+ sourceIndex,
1186
+ chunk,
1187
+ magicString.original,
1188
+ loc,
1189
+ magicString.sourcemapLocations
1190
+ );
1191
+ }
1192
+ } else {
1193
+ mappings.advance(chunk.content);
1194
+ }
1195
+ if (chunk.outro.length) mappings.advance(chunk.outro);
1196
+ });
1197
+ if (magicString.outro) {
1198
+ mappings.advance(magicString.outro);
1199
+ }
1200
+ if (source.ignoreList && sourceIndex !== -1) {
1201
+ if (x_google_ignoreList === void 0) {
1202
+ x_google_ignoreList = [];
1203
+ }
1204
+ x_google_ignoreList.push(sourceIndex);
1205
+ }
1206
+ });
1207
+ return {
1208
+ file: options.file ? options.file.split(/[/\\]/).pop() : void 0,
1209
+ sources: this.uniqueSources.map((source) => {
1210
+ return options.file ? getRelativePath(options.file, source.filename) : source.filename;
1211
+ }),
1212
+ sourcesContent: this.uniqueSources.map((source) => {
1213
+ return options.includeContent ? source.content : null;
1214
+ }),
1215
+ names,
1216
+ mappings: mappings.raw,
1217
+ x_google_ignoreList
1218
+ };
1219
+ }
1220
+ generateMap(options) {
1221
+ return new SourceMap(this.generateDecodedMap(options));
1222
+ }
1223
+ getIndentString() {
1224
+ const indentStringCounts = {};
1225
+ this.sources.forEach((source) => {
1226
+ const indentStr = source.content._getRawIndentString();
1227
+ if (indentStr === null) return;
1228
+ if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;
1229
+ indentStringCounts[indentStr] += 1;
1230
+ });
1231
+ return Object.keys(indentStringCounts).sort((a, b) => {
1232
+ return indentStringCounts[a] - indentStringCounts[b];
1233
+ })[0] || " ";
1234
+ }
1235
+ indent(indentStr) {
1236
+ if (!arguments.length) {
1237
+ indentStr = this.getIndentString();
1238
+ }
1239
+ if (indentStr === "") return this;
1240
+ let trailingNewline = !this.intro || this.intro.slice(-1) === "\n";
1241
+ this.sources.forEach((source, i) => {
1242
+ const separator = source.separator !== void 0 ? source.separator : this.separator;
1243
+ const indentStart = trailingNewline || i > 0 && /\r?\n$/.test(separator);
1244
+ source.content.indent(indentStr, {
1245
+ exclude: source.indentExclusionRanges,
1246
+ indentStart
1247
+ //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator )
1248
+ });
1249
+ trailingNewline = source.content.lastChar() === "\n";
1250
+ });
1251
+ if (this.intro) {
1252
+ this.intro = indentStr + this.intro.replace(/^[^\n]/gm, (match, index) => {
1253
+ return index > 0 ? indentStr + match : match;
1254
+ });
1255
+ }
1256
+ return this;
1257
+ }
1258
+ prepend(str) {
1259
+ this.intro = str + this.intro;
1260
+ return this;
1261
+ }
1262
+ toString() {
1263
+ const body = this.sources.map((source, i) => {
1264
+ const separator = source.separator !== void 0 ? source.separator : this.separator;
1265
+ const str = (i > 0 ? separator : "") + source.content.toString();
1266
+ return str;
1267
+ }).join("");
1268
+ return this.intro + body;
1269
+ }
1270
+ isEmpty() {
1271
+ if (this.intro.length && this.intro.trim()) return false;
1272
+ if (this.sources.some((source) => !source.content.isEmpty())) return false;
1273
+ return true;
1274
+ }
1275
+ length() {
1276
+ return this.sources.reduce(
1277
+ (length, source) => length + source.content.length(),
1278
+ this.intro.length
1279
+ );
1280
+ }
1281
+ trimLines() {
1282
+ return this.trim("[\\r\\n]");
1283
+ }
1284
+ trim(charType) {
1285
+ return this.trimStart(charType).trimEnd(charType);
1286
+ }
1287
+ trimStart(charType) {
1288
+ const rx = new RegExp("^" + (charType || "\\s") + "+");
1289
+ this.intro = this.intro.replace(rx, "");
1290
+ if (!this.intro) {
1291
+ let source;
1292
+ let i = 0;
1293
+ do {
1294
+ source = this.sources[i++];
1295
+ if (!source) {
1296
+ break;
1297
+ }
1298
+ } while (!source.content.trimStartAborted(charType));
1299
+ }
1300
+ return this;
1301
+ }
1302
+ trimEnd(charType) {
1303
+ const rx = new RegExp((charType || "\\s") + "+$");
1304
+ let source;
1305
+ let i = this.sources.length - 1;
1306
+ do {
1307
+ source = this.sources[i--];
1308
+ if (!source) {
1309
+ this.intro = this.intro.replace(rx, "");
1310
+ break;
1311
+ }
1312
+ } while (!source.content.trimEndAborted(charType));
1313
+ return this;
1314
+ }
1315
+ };